Second part of admin-namespace-reorder. Also renamed OrderGroup into Ordergroup. More view-sharing between groups is neccessary.
This commit is contained in:
parent
2d5dc03b90
commit
fadc951208
83 changed files with 410 additions and 518 deletions
|
|
@ -21,8 +21,8 @@
|
|||
- for user in @users
|
||||
%tr{:class => cycle('even','odd', :name => 'users')}
|
||||
- groups = user.groups
|
||||
- ordergroup = groups.detect { |group| group.is_a?(OrderGroup) }
|
||||
- workgroups = groups.select { |group| !group.is_a?(OrderGroup) }.collect(&:name)
|
||||
- ordergroup = groups.detect { |group| group.is_a?(Ordergroup) }
|
||||
- workgroups = groups.select { |group| !group.is_a?(Ordergroup) }.collect(&:name)
|
||||
%td= link_to user.nick, {:controller => "messages", :action => "user", :id => user}, :title => _('Send user an email')
|
||||
%td=h user.first_name if @current_user.role_admin? || user.settings["profile.nameIsPublic"] == '1'
|
||||
%td=h user.last_name if @current_user.role_admin? || user.settings["profile.nameIsPublic"] == '1'
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
%li= link_to _("Write message"), :controller => "messages", :action => "new"
|
||||
|
||||
// Orders
|
||||
- hasOrderGroup = !@current_user.find_ordergroup.nil?
|
||||
- hasOrdergroup = !@current_user.find_ordergroup.nil?
|
||||
- hasOrdersRole = @current_user.role_orders?
|
||||
- if hasOrderGroup || hasOrdersRole
|
||||
- if hasOrdergroup || hasOrdersRole
|
||||
%li
|
||||
= _("Orders")
|
||||
%ul
|
||||
- if hasOrderGroup
|
||||
- if hasOrdergroup
|
||||
%li= link_to _('Order summary'), :controller => "ordering"
|
||||
- if hasOrdersRole
|
||||
%li= link_to _('Finish order'), :controller => 'orders'
|
||||
|
|
@ -39,5 +39,5 @@
|
|||
%li
|
||||
= _('Administration')
|
||||
%ul
|
||||
%li= link_to _("New ordergroup"), :controller => "admin", :action => "newOrderGroup"
|
||||
%li= link_to _("New ordergroup"), :controller => "admin", :action => "newOrdergroup"
|
||||
%li= link_to _("New user"), :controller => "admin", :action => "newUser"
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
// Current orders
|
||||
= render :partial => 'ordering/currentOrders'
|
||||
|
||||
// OrderGroup overview
|
||||
// Ordergroup overview
|
||||
.box_title
|
||||
%h2=_ "My ordergroup"
|
||||
.column_content
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<%= render :partial => 'groups/edit_members' %>
|
||||
<p style="clear:both">
|
||||
<% if @group.is_a?(OrderGroup) -%>
|
||||
<% if @group.is_a?(Ordergroup) -%>
|
||||
<%= link_to "Zurück", :action => "myOrdergroup" %>
|
||||
<% else -%>
|
||||
<%= link_to 'Zurück', :action => 'showGroup', :id => @group %>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ You can also see in which workgroups you are.
|
|||
<% for membership in Membership.find_all_by_user_id(@user.id) %>
|
||||
<p>
|
||||
<%= link_to(membership.group.name, :action => 'showGroup', :id => membership.group) %>
|
||||
<% if membership.group.type != 'OrderGroup' %>
|
||||
<% if membership.group.type != 'Ordergroup' %>
|
||||
(<%= link_to _("Cancel membership"), { :action => 'cancel_membership', :id => membership }, :confirm => _("Are you sure to cancel this membership?"), :method => :post %>)
|
||||
<% end %>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
%h1
|
||||
=h @group.is_a?(OrderGroup) ? "Bestellgruppe:" : "Gruppe:"
|
||||
=h @group.is_a?(Ordergroup) ? "Bestellgruppe:" : "Gruppe:"
|
||||
=h @group.name
|
||||
= render :partial => "showGroup"
|
||||
|
||||
- unless @group.is_a?(OrderGroup)
|
||||
- unless @group.is_a?(Ordergroup)
|
||||
%p{:style => "clear:both"}
|
||||
= link_to "alle Arbeitsgruppen", :action => "workgroups"
|
||||
Loading…
Add table
Add a link
Reference in a new issue