Added ordergroups view to foodcoop namespace.

* For now just a searchable list. Nothing more.
This commit is contained in:
sandoz 2009-04-11 19:39:01 +02:00
parent c6187ebade
commit e95cdad5ec
4 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,23 @@
%p
%table{:style => "width:100%"}
%tr
%td
= pagination_links_remote @order_groups, :update => :order_groups
%td{:style => "text-align:right"}
- if @total > 20
= items_per_page :update => :order_groups
%table.list
%thead
%tr
%th Name
%th #Mitglieder
%th Kontakt
%tbody
- for order_group in @order_groups
%tr{:class => cycle('even','odd', :name => 'order_group')}
%td=h order_group.name
%th=h order_group.users.length
%td=h order_group.contact

View file

@ -0,0 +1,21 @@
%h1 Bestellgruppen der Foodcoop
.left_column{:style => "width:100%"}
.box_title
%h2 Übersicht
.column_content
#user_filter{:style => "margin-right:2em;"}
%form{:name=>"sform", :action=>"", :style=>"display:inline;"}
%label{:for => 'article_name'} Suche nach Name:
= text_field_tag("query", params['query'], :size => 10 )
= observe_field 'query', :frequency => 2, |
:before => "Element.show('loader')", |
:success => "Element.hide('loader')", |
:url => {:action => 'ordergroups'}, |
:update => :order_groups, |
:with => 'query', |
:method => :get |
#order_groups
= render :partial => "ordergroups"

View file

@ -12,6 +12,7 @@
:subnav => [
{ :name => "Mitglieder", :url => "/foodcoop/members"},
{ :name => "Abeitsgruppen", :url => "/foodcoop/workgroups"},
{ :name => "Bestellgruppen", :url => "/foodcoop/ordergroups"},
{ :name => "Nachrichten", :url => "/messages"},
{ :name => "Aufgaben", :url => "/tasks"}
]