Second part of admin-namespace-reorder. Also renamed OrderGroup into Ordergroup. More view-sharing between groups is neccessary.

This commit is contained in:
Benjamin Meichsner 2009-01-14 12:46:01 +01:00
parent 2d5dc03b90
commit fadc951208
83 changed files with 410 additions and 518 deletions

View file

@ -1,27 +0,0 @@
%p
%table{:style => "width:100%"}
%tr
%td
= pagination_links_remote @groups
%td{:style => "text-align:right"}
- if @total > 20
= items_per_page
%table.list
%thead
%tr
%th Name
%th Typ
%th Mitglieder
%th
%tbody
- for group in @groups
%tr{:class => cycle('even','odd', :name => 'groups')}
%td= link_to group.name, :action => 'showGroup', :id => group
%td= group.is_a?(OrderGroup) ? 'Bestellgruppe' : 'Gruppe'
%td= group.users.size
%td
= link_to image_tag('b_users.png', :size => '16x16', :border => "0", :alt => 'Mitlglieder bearbeiten'), :action => 'members', :id => group
= link_to(image_tag('b_edit.png', :size => "16x16", :border => "0", :alt => 'Gruppe bearbeiten'), :action => 'editGroup', :id => group)
= link_to(image_tag('b_drop.png', :size => "16x16", :border => "0", :alt => 'Gruppe löschen'), {:action => 'destroyGroup', :id => group}, |
:confirm => 'Willst du ' + group.name + ' wirklich löschen?', |
:method => "post") |

View file

@ -37,14 +37,14 @@
<% for group in @groups %>
<tr class="<%= cycle('even','odd', :name => 'groups') %>">
<td><%= link_to group.name, :action => 'showGroup', :id => group %></td>
<td><%= group.is_a?(OrderGroup) ? 'Bestellgruppe' : 'Gruppe' %></td>
<td><%= group.is_a?(Ordergroup) ? 'Bestellgruppe' : 'Gruppe' %></td>
<td><%= group.users.size %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'Alle Gruppen', :action => 'listGroups' %> |
<%= link_to "Neue Bestellgruppe", :action => "newOrderGroup" %> |
<%= link_to "Neue Bestellgruppe", :action => "newOrdergroup" %> |
<%= link_to "Neue Gruppe", :action => "newGroup" %>
</div>
</div>

View file

@ -1,2 +0,0 @@
<%= render :partial => 'groups/edit_members' %>
<p style="clear:both"><%= link_to 'Gruppenübersicht', :action => 'listGroups' %></p>

View file

@ -1,8 +0,0 @@
<h1>Neue <%= @group.is_a?(OrderGroup) ? 'Bestellgruppe' : 'Gruppe' %></h1>
<div class="edit_form" style="width:50em">
<% form_tag(:action => (@group.is_a?(OrderGroup) ? 'createOrderGroup' : 'createGroup')) do %>
<%= render :partial => 'groups/form' %>
<br style="clear:both" />
<%= submit_tag "Speichern" %> | <%= link_to "Abbrechen", :action => "listGroups" %>
<% end %>
</div>

View file

@ -0,0 +1,45 @@
- form_for [:admin, @ordergroup] do |@form|
= @form.error_messages
%div{:style => "float:left;width:55%;"}
%p
= @form.label :name
%br/
= @form.text_field :name, :size => 20
%p
= @form.label :description
%br/
= @form.text_field :description, :size => 40
%p
= @form.label :actual_size, "Aktuelle Gruppengröße"
%br/
= @form.text_field :actual_size, :size => 3
%div{:style => "float:right;width:40%"}
%h3 Gruppe hat Zugriff auf
%table
%tr
%td
= @form.label :role_admin, "Administration"
%td= @form.check_box :role_admin
%tr
%td
= @form.label :role_finance, "Finanzen"
%td= @form.check_box :role_finance
%tr
%td
= @form.label :role_suppliers, "Lieferantenverwaltung"
%td= @form.check_box :role_suppliers
%tr
%td
= @form.label :role_article_meta, "Artikelverwaltung"
%td= @form.check_box :role_article_meta
%tr
%td
= @form.label :role_orders, "Bestellungsverwaltung"
%td= @form.check_box :role_orders
%br{ :style => "clear:both" }
= submit_tag "Speichern"
|
= link_to "Abbrechen", admin_ordergroups_path

View file

@ -0,0 +1,24 @@
%p
%table{:style => "width:100%"}
%tr
%td
= pagination_links_remote @ordergroups, { :update => "ordergroups" }
%td{:style => "text-align:right"}
- if @total > 20
= items_per_page :update => "ordergroups"
%table.list
%thead
%tr
%th Name
%th Mitglieder
%th
%tbody
- for ordergroup in @ordergroups
%tr{:class => cycle('even','odd', :name => 'groups')}
%td= link_to ordergroup.name, [:admin, ordergroup]
%td= ordergroup.users.size
%td
= link_to image_tag('b_users.png', :size => '16x16', :border => "0", :alt => 'Mitlglieder bearbeiten'), memberships_admin_ordergroup_path(ordergroup)
= link_to(image_tag('b_edit.png', :size => "16x16", :border => "0", :alt => 'Gruppe bearbeiten'), edit_admin_ordergroup_path(ordergroup))
= link_to(image_tag('b_drop.png', :size => "16x16", :border => "0", :alt => 'Gruppe löschen'), [:admin, ordergroup], |
:confirm => 'Willst du ' + ordergroup.name + ' wirklich löschen?', :method => :delete) |

View file

@ -0,0 +1,4 @@
- title "Bestellgruppe bearbeiten"
.edit_form{:style => "width:50em"}
= render :partial => 'form'

View file

@ -1,14 +1,17 @@
%h1=_ 'Groups'
- title "Bestellgruppen"
%p
%i
Hier kannst du
= link_to 'neue Gruppen', :action => 'newGroup'
und
= link_to 'neue Bestellgruppen', :action => 'newOrderGroup'
= link_to 'neue Bestellgruppen', new_admin_ordergroup_path
anlegen, Gruppen bearbeiten und löschen.
%p
Beachte dabei den <em>Unterschied zwischen Gruppe und Bestellgruppe</em>:
Eine <em>Bestellgruppe</em> hat ein Konto und kann Essen bestellen, eine <em>Gruppe</em> ist eine Arbeitsgruppe wie z.B. die "Sortiergruppe".
Eine Bestellgruppe hat ein Konto und kann Essen bestellen. In einer
%em= link_to 'Arbeisgruppe', admin_workgroups_path
(z.b. 'Soritiergruppe')
koordinieren sich die Mitglieder mittels Aufgaben und Nachrichten.
Nutzer_innen können immer nur einer Bestellgruppe, aber beliebig vielen anderen Gruppen angehören.
.left_column{:style => "width:100%"}
.box_title
@ -16,17 +19,16 @@
.column_content
#group_filter
%form{:name=>"sform", :action=>"", :style=>"display:inline;"}
%label{:for => 'article_name'} Suche in Name :
%label{:for => 'ordergroup_name'} Suche in Name :
= text_field_tag("query", params['query'], :size => 10 )
= observe_field 'query', :frequency => 2, |
:before => "Element.show('loader')", |
:success => "Element.hide('loader')", |
:url => {:action => 'listGroups'}, |
:with => 'query' |
#table
= render :partial => "listGroups"
- if @current_user.role_admin?
= link_to 'Neue Gruppe', :action => 'newGroup'
|
= link_to 'Neue Bestellgruppe', :action => 'newOrderGroup'
:update => "ordergroups", |
:url => admin_ordergroups_path, |
:with => 'query', |
:method => :get |
#ordergroups
= render :partial => "ordergroups"
= link_to 'Neue Arbeits', new_admin_ordergroup_path

View file

@ -0,0 +1,3 @@
= render :partial => 'admin/memberships/edit_members'
%p{ :style => "clear:both" }
= link_to 'Gruppenübersicht', admin_ordergroups_path

View file

@ -0,0 +1,4 @@
- title "Bestellgruppe anlegen"
.edit_form{:style => "width:50em"}
= render :partial => 'form'

View file

@ -0,0 +1,42 @@
- title "Arbeitsgruppe #{@ordergroup.name}"
.left_column{:style => "width:45em"}
.box_title
%h2 Übersicht
.column_content
%p
%b Beschreibung:
=h @ordergroup.description
%p
%b Gruppe hat Zugriff auf:
- roles = Array.new
- roles << 'Administration' if @ordergroup.role_admin?
- roles << 'Finanzen' if @ordergroup.role_finance?
- roles << 'Lieferanten' if @ordergroup.role_suppliers?
- roles << 'Artikel' if @ordergroup.role_article_meta?
- roles << 'Bestellungsverwaltung' if @ordergroup.role_orders?
=h roles.join(', ')
%p
- if @ordergroup.weekly_task
%b wöchentlicher Job:
=h @ordergroup.task_name
am
= weekday(@ordergroup.weekday)
- else
kein wöchentlicher Job definiert
= link_to 'Gruppe bearbeiten', edit_admin_ordergroup_path(@ordergroup)
|
= link_to 'Löschen', [:admin, @ordergroup], :confirm => 'Bist Du sicher?', :method => :delete
|
= link_to 'Nachricht senden', :controller => 'messages', :action => 'group', :id => @ordergroup
.box_title
%h2 Mitglieder
.column_content
- if @ordergroup.memberships.empty?
%i Diese Gruppe hat derzeit keine Mitglieder
- else
%ul{:style => "list-style-type:decimal;"}
- for membership in @ordergroup.memberships
%li= link_to membership.user.nick, [:admin, membership.user]
%p= link_to 'Mitglieder bearbeiten', memberships_admin_ordergroup_path(@ordergroup)
%p{:style => "clear:both"}= link_to "Gruppenübersicht", admin_ordergroups_path

View file

@ -1,54 +0,0 @@
%h1
= @group.is_a?(OrderGroup) ? "Bestellgruppe:" : "Gruppe:"
=h @group.name
.left_column{:style => "width:45em"}
.box_title
%h2 Übersicht
.column_content
%p
%b Beschreibung:
=h @group.description
- if @group.is_a?(OrderGroup)
%p
%b Gruppengröße:
= @group.actual_size
%p
%b Kontostand:
= @group.account_balance
%p
%b Kontostand aktualisiert:
= @group.account_updated
%p
%b Gruppe hat Zugriff auf:
- roles = Array.new
- roles << 'Administration' if @group.role_admin?
- roles << 'Finanzen' if @group.role_finance?
- roles << 'Lieferanten' if @group.role_suppliers?
- roles << 'Artikel' if @group.role_article_meta?
- roles << 'Bestellungsverwaltung' if @group.role_orders?
=h roles.join(', ')
%p
- if @group.weekly_task
%b wöchentlicher Job:
=h @group.task_name
am
= weekday(@group.weekday)
- else
kein wöchentlicher Job definiert
= link_to 'Gruppe bearbeiten', :action => 'editGroup', :id => @group
|
= link_to 'Löschen', { :action => 'destroyGroup', :id => @group }, :confirm => 'Bist Du sicher?', :method => "post"
|
= link_to 'Nachricht senden', :controller => 'messages', :action => 'group', :id => @group
.box_title
%h2 Mitglieder
.column_content
- if @group.memberships.empty?
%i Diese Gruppe hat derzeit keine Mitglieder
- else
%ul{:style => "list-style-type:decimal;"}
- for membership in @group.memberships
%li= link_to membership.user.nick, :action => 'showUser', :id => membership.user
%p= link_to 'Mitglieder bearbeiten', :action => 'members', :id => @group
%p{:style => "clear:both"}= link_to "Gruppenübersicht", :action => "listGroups"

View file

@ -2,10 +2,10 @@
%table{:style => "width:100%"}
%tr
%td
= pagination_links_remote @workgroups
= pagination_links_remote @workgroups, { :update => "workgroups" }
%td{:style => "text-align:right"}
- if @workgroups.size > 20
= items_per_page
- if @total.size > 20
= items_per_page :update => "workgroups"
%table.list
%thead
%tr

View file

@ -1,4 +1,5 @@
%p= pagination_links_remote @articles, 10, {:import_query => params[:import_query], :lists => params[:lists], :regional => params[:regional]}
%p= pagination_links_remote @articles, :per_page => 10, |
:params => {:import_query => params[:import_query], :lists => params[:lists], :regional => params[:regional]} |
%table.list
%thead
%tr

View file

@ -6,10 +6,10 @@
%table{:style => "width:100%"}
%tr
%td
= pagination_links_remote @articles, @per_page, {:sort => params[:sort]}
= pagination_links_remote @articles, :params => {:sort => params[:sort]}
%td{:style => "text-align:right"}
- if @total > 30
= items_per_page([30, 100, 500])
= items_per_page :per_page_options => [30, 100, 500]
%table#articles_table.list.articles
%thead
@ -49,7 +49,7 @@
= hidden_field_tag 'supplier', @supplier.id
%p
= pagination_links_remote @articles, @per_page, {:sort => params[:sort]}
= pagination_links_remote @articles, :params => {:sort => params[:sort]}
:plain
<script type="text/javascript">

View file

@ -6,7 +6,7 @@
= error_messages_for 'result'
%p
Gruppe:
= @form.select "group_order_result_id", OrderGroup.find(:all, :order => "name").collect {|og| [og.name, og.id] }
= @form.select "group_order_result_id", Ordergroup.find(:all, :order => "name").collect {|og| [og.name, og.id] }
%p
Menge:
= @form.text_field "quantity", :size => 5

View file

@ -35,7 +35,7 @@
- @financial_transactions.each do |ft|
%tr{:class => cycle("even","odd", :name => "financial_transaction")}
%td= format_date(ft.created_on)
%td= ft.order_group.name
%td= ft.ordergroup.name
%td{:style => "width:50%"}=h ft.note
%td{:style => "color:#{ft.amount < 0 ? 'red' : 'black'}", :class => "currency"}= number_to_currency(ft.amount)

View file

@ -7,7 +7,7 @@
<p>Anzahl gefundener Transaktionen: <b><%= @total %></b></p>
<p>
<%= pagination_links_remote @financial_transactions, @per_page, {:sort => params[:sort], :query => params['query']}%>
<%= pagination_links_remote @financial_transactions, :params => {:sort => params[:sort], :query => params['query']}%>
</p>

View file

@ -1,6 +1,6 @@
%tr.transaction
%td
%select{:name => 'financial_transactions[][order_group_id]'}
= options_for_select OrderGroup.find(:all, :order => 'name').collect { |g| [ g.name, g.id ] }
%select{:name => 'financial_transactions[][ordergroup_id]'}
= options_for_select Ordergroup.find(:all, :order => 'name').collect { |g| [ g.name, g.id ] }
%td= text_field_tag 'financial_transactions[][amount]'
%td= link_to_function image_tag("b_drop.png", :size => "16x16", :alt => _("Remove"), :border => "0"), "$(this).up('.transaction').remove()", {:title => _("Remove ordergroup")}

View file

@ -5,7 +5,7 @@
%table{:style => "width:100%"}
%tr
%td
= pagination_links_remote @groups, @per_page, {:sort => params[:sort]}
= pagination_links_remote @groups, :params => {:sort => params[:sort]}
%td{:style => "text-align:right"}
- if @total > 20
= items_per_page

View file

@ -22,4 +22,4 @@
= render :partial => "ordergroups"
%br/
- if @current_user.role_admin?
= link_to _("New ordergroup"), :controller => 'admin', :action => 'newOrderGroup'
= link_to _("New ordergroup"), :controller => 'admin', :action => 'newOrdergroup'

View file

@ -3,7 +3,7 @@
.edit_form{ :style => "width:30em" }
- form_for(@financial_transaction, :url => { :action => 'create' }) do |f|
= f.error_messages
= f.hidden_field :order_group_id
= f.hidden_field :ordergroup_id
%p
Group:
%b=h @group.name

View file

@ -5,15 +5,15 @@
%b= _("Note") + ":"
= text_field_tag "note"
%p
%table#OrderGroups{:style => "width:20em"}
%table#Ordergroups{:style => "width:20em"}
%tr
%th=_ "Ordergroup"
%th=_ "Amount"
= render :partial => 'order_group', :collection => [1, 2, 3]
= render :partial => 'ordergroup', :collection => [1, 2, 3]
%p
= link_to_function _("Add another ordergroup") do |page|
- page.insert_html :bottom, :OrderGroups, :partial => 'order_group'
- page.insert_html :bottom, :Ordergroups, :partial => 'ordergroup'
%p
= submit_tag _("Save")
|

View file

@ -2,7 +2,7 @@
<!--[form:group]-->
%div{:style => "float:left;width:55%;"}
- if controller.controller_name == "admin" || !@group.is_a?(OrderGroup)
- if controller.controller_name == "admin" || !@group.is_a?(Ordergroup)
%p
%label{:for => "group_name"} Names
%br/
@ -11,7 +11,7 @@
%label{:for => "group_description"} Beschreibung
%br/
= text_field 'group', 'description', :size => 40
- if @group.is_a?(OrderGroup) && controller.controller_name == "admin"
- if @group.is_a?(Ordergroup) && controller.controller_name == "admin"
%p
%label{:for => "group_actual_size"} Aktuelle Gruppengröße
%br/
@ -40,7 +40,7 @@
%td
%label{:for => "group_role_orders"} Bestellungsverwaltung
%td= check_box 'group', 'role_orders'
-unless @group.is_a?(OrderGroup)
-unless @group.is_a?(Ordergroup)
%div{:style => "clear:both"}
%h3
Wöchentliche Jobs definieren?

View file

@ -1,4 +1,4 @@
- for group in Group.find :all, :conditions => "type != 'OrderGroup'"
- for group in Group.find :all, :conditions => "type != 'Ordergroup'"
%h4= link_to_function group.name, "Element.toggle('group_#{group.id}')"
%ul{:style => "display:none"}[group]
- for user in group.users.find :all, :order => "nick"

View file

@ -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'

View file

@ -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"

View file

@ -38,7 +38,7 @@
// Current orders
= render :partial => 'ordering/currentOrders'
// OrderGroup overview
// Ordergroup overview
.box_title
%h2=_ "My ordergroup"
.column_content

View file

@ -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 %>

View file

@ -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>

View file

@ -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"

View file

@ -7,7 +7,7 @@
{ :name => "Workgroups", :url => "/index/workgroups"},
{ :name => "Tasks", :url => "/tasks"},
{ :name => "Messages", :url => "/messages/inbox"},
{ :name => "My Ordergroup", :url => my_order_group_path},
{ :name => "My Ordergroup", :url => my_ordergroup_path},
{ :name => "My Ordergroup", :url => my_profile_path}
]
},
@ -36,11 +36,12 @@
]
},
{ :name => "Administration", :url => "/admin",
:active => ["admin", "admin/users", "admin/workgroups"],
:active => ["admin", "admin/users", "admin/ordergroups", "admin/workgroups"],
:access? => (u.role_admin?),
:subnav => [
{ :name => "Users", :url => "/admin/users" },
{ :name => "Workgroups", :url => "/admin/workgroups" }
{ :name => "Users", :url => admin_users_path },
{ :name => "Ordergroups", :url => admin_ordergroups_path },
{ :name => "Workgroups", :url => admin_workgroups_path }
]
}
]

View file

@ -1,5 +1,5 @@
- if controller.action_name == 'myOrders'
= pagination_links_remote @bookedOrders, 10, {:show_all => params[:show_all]}
= pagination_links_remote @bookedOrders, :per_page => 10, :params => {:show_all => params[:show_all]}
%table.list
%thead
%tr
@ -16,7 +16,7 @@
%td= format_time(order.order.ends)
%td{:class => "currency"}= number_to_currency(order.price)
- else
// check if the OrderGroup has ordered
// check if the Ordergroup has ordered
- if groupOrder = order.group_order(@orderGroup)
%tr{:class=> cycle('even', 'odd', :name => 'bookedOrders')}
%td= link_to order.name, :action => 'my_order_result', :id => order

View file

@ -17,7 +17,7 @@
%td= link_to order.name, :controller => 'ordering', :action => 'order', :id => order
%td=h order.supplier.name
%td=h format_time(order.ends) unless order.ends.nil?
- if (groupOrder = order.group_orders.find(:first, :conditions => ["order_group_id = ?", @orderGroup.id]))
- if (groupOrder = order.group_orders.find(:first, :conditions => ["ordergroup_id = ?", @orderGroup.id]))
- total += groupOrder.price
%td=h groupOrder.updated_by.nil? ? '??' : "#{groupOrder.updated_by.nick} (#{format_time(groupOrder.updated_on)})"
%td= number_to_currency(groupOrder.price)

View file

@ -14,7 +14,7 @@
%td= format_time(order.order.ends)
%td{:class => "currency"}= number_to_currency(order.price)
- else
// check if the OrderGroup has ordered
// check if the Ordergroup has ordered
- if groupOrder = order.group_order(@orderGroup)
%tr{:class=> cycle('even', 'odd', :name => 'finishedOrders')}
%td= link_to order.name, :action => 'my_order_result', :id => order

View file

@ -1,6 +1,6 @@
%h1= _('Order Overview')
// OrderGroups Account Balance
// Ordergroups Account Balance
.left_column{:style => "width:26%"}
.box_title
%h2=h @orderGroup.name

View file

@ -147,7 +147,7 @@
</tr>
<tr>
<td colspan="6"></td>
<td colspan="3" class="currency"><%=_ "New account balance"%>: <strong><span id="new_balance"><%= @order_group.account_balance - total %></span> <%= L18n.number.currency.format.unit %></strong></td>
<td colspan="3" class="currency"><%=_ "New account balance"%>: <strong><span id="new_balance"><%= @ordergroup.account_balance - total %></span> <%= L18n.number.currency.format.unit %></strong></td>
</tr>
<tr>
<td style="text-align:left;"><%= link_to_top %></td>
@ -157,7 +157,7 @@
</tfoot>
</table>
</div>
<input type="hidden" id="total_balance" name="total_balance" value="<%= @order_group.account_balance - total %>"/>
<input type="hidden" id="total_balance" name="total_balance" value="<%= @ordergroup.account_balance - total %>"/>
<input type="hidden" name="version" value="<%= @version %>"/>
<% end %>
</div>

View file

@ -1,4 +1,4 @@
= pagination_links_remote @orders, @per_page, {:sort => params[:sort]}
= pagination_links_remote @orders, :params => {:sort => params[:sort]}
%table.list{:style => "width: 100%"}
%thead
%tr

View file

@ -56,7 +56,7 @@ while (page_number * max_articles_per_page < total_num_articles) do # Start pag
group_result = [truncate(group_order_result.group_name, 20)]
for article in current_articles
# get the OrderGroupResult for this article
# get the OrdergroupResult for this article
result = GroupOrderArticleResult.find(:first,
:conditions => ['order_article_result_id = ? AND group_order_result_id = ?', article.id, group_order_result.id])
group_result << ((result.nil? || result == 0) ? "" : result.quantity.to_i)

View file

@ -34,7 +34,7 @@
= _("Groups ordered") + ":"
%b= @group_orders.size
- unless @finished
= "[#{@group_orders.collect{|g| g.order_group.name}.join(', ')}]" unless @group_orders.empty?
= "[#{@group_orders.collect{|g| g.ordergroup.name}.join(', ')}]" unless @group_orders.empty?
- else
= "[#{@group_orders.collect{|g| g.group_name}.join(', ')}]" unless @group_orders.empty?
%p

View file

@ -29,7 +29,7 @@
%label{:for => "task_group"}
%b=_ 'Group'
%br/
= select(:task, :group_id, Group.find(:all, :conditions => "type != 'OrderGroup'", :order => 'name').collect {|g| [ g.name, g.id ] }, { :include_blank => true })
= select(:task, :group_id, Group.find(:all, :conditions => "type != 'Ordergroup'", :order => 'name').collect {|g| [ g.name, g.id ] }, { :include_blank => true })
%p
%label{:for => "task_due_date"}
%b=_ 'Due date'

View file

@ -15,5 +15,5 @@
%li
=_ 'Group tasks'
%ul
- for group in Group.find :all, :conditions => "type != 'OrderGroup'"
- for group in Group.find :all, :conditions => "type != 'Ordergroup'"
%li= link_to group.name, :action => "workgroup", :id => group