Moved foodcoop/members into new foodcoop/users restful controller.
This commit is contained in:
parent
0d910dfbbd
commit
5cf75ee32a
6 changed files with 50 additions and 48 deletions
28
app/views/foodcoop/users/_users.html.haml
Normal file
28
app/views/foodcoop/users/_users.html.haml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
- unless params[:sort_by_ordergroups]
|
||||
%p
|
||||
%table{:style => "width:100%"}
|
||||
%tr
|
||||
%td
|
||||
= pagination_links_remote @users, :update => :users
|
||||
%td{:style => "text-align:right"}
|
||||
- if @total > 20
|
||||
= items_per_page :update => :users
|
||||
%table.list
|
||||
%thead
|
||||
%tr
|
||||
%th Benutzername
|
||||
%th Name
|
||||
%th Email
|
||||
%th Telefon
|
||||
%th Bestellgruppe
|
||||
%th Arbeitsgruppe(n)
|
||||
%tbody
|
||||
- for user in @users
|
||||
%tr{:class => cycle('even','odd', :name => 'users')}
|
||||
%td= link_to user.nick, user_message_path(user), :title => _('Send user an email')
|
||||
%td=h user.name if @current_user.role_admin? || user.settings["profile.nameIsPublic"] == '1'
|
||||
%td=h user.email if @current_user.role_admin? || user.settings["profile.emailIsPublic"] == '1'
|
||||
%td=h user.phone if @current_user.role_admin? || user.settings["profile.phoneIsPublic"] == '1'
|
||||
%td=h user.ordergroup_name
|
||||
%td=h user.workgroups.collect(&:name).join(', ')
|
||||
|
||||
32
app/views/foodcoop/users/index.html.haml
Normal file
32
app/views/foodcoop/users/index.html.haml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
%h1 Mitglieder der Foodcoop
|
||||
%p
|
||||
%i
|
||||
Hier kannst Du den Mitgliedern Deiner Foodcoop eine Nachricht schreiben.
|
||||
%br/
|
||||
Damit Deine Kontaktdaten einzusehen sind, musst Du sie unter
|
||||
= link_to "Einstellungen", my_profile_path
|
||||
freigeben.
|
||||
|
||||
.left_column{:style => "width:100%"}
|
||||
.box_title
|
||||
%h2 Übersicht
|
||||
.column_content
|
||||
- unless params[:sort_by_ordergroups]
|
||||
#user_filter{:style => "float:left; 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 => foodcoop_users_path, |
|
||||
:update => :users, |
|
||||
:with => 'query', |
|
||||
:method => :get |
|
||||
|
||||
=_ "Nach Bestellgruppen sortieren:"
|
||||
- form_tag(foodcoop_users_path, :method => "get", :style=>"display:inline;") do
|
||||
= check_box_tag :sort_by_ordergroups, 1, params[:sort_by_ordergroups], :onclick => "submit();"
|
||||
#users
|
||||
= render :partial => "users"
|
||||
Loading…
Add table
Add a link
Reference in a new issue