finish foodcoop i18n + controller + model

This commit is contained in:
wvengen 2013-02-22 00:19:22 +01:00
parent c69a559dc4
commit 8043fd2164
11 changed files with 76 additions and 42 deletions

View file

@ -5,9 +5,9 @@
%table.table.table-striped
%thead
%tr
%th Name
%th Mitglieder
%th zuletzt bestellt
%th= t '.name'
%th= t '.user'
%th= t '.last_ordered'
%tbody
- for ordergroup in @ordergroups

View file

@ -1,13 +1,13 @@
- title "Bestellgruppen"
- title t('.title')
.well
= form_tag foodcoop_ordergroups_path, :method => :get, :remote => true, 'data-submit-onchange' => true,
class: 'form-search' do
= text_field_tag :name, params[:name], class: 'input-medium search-query', placeholder: 'Name ...'
= text_field_tag :name, params[:name], class: 'input-medium search-query', placeholder: t('.name')
%label{:for => 'only_active'}
= check_box_tag 'only_active', 1, params[:only_active]
Nur aktive
%small (mindestens einmal in den letzten 3 Monaten bestellt)
= t '.only_active'
%small= t '.only_active_desc'
#ordergroups
= render :partial => "ordergroups"
= render :partial => "ordergroups"

View file

@ -4,12 +4,12 @@
%table.table.table-striped
%thead
%tr
%th Benutzername
%th Name
%th Email
%th Telefon
%th Bestellgruppe
%th Arbeitsgruppe(n)
%th= t 'simple_form.labels.user.nick'
%th= t 'simple_form.labels.user.name'
%th= t 'simple_form.labels.user.email'
%th= t 'simple_form.labels.user.phone'
%th= t 'simple_form.labels.user.ordergroup'
%th= t 'simple_form.labels.user.workgroup', count: 3
%tbody
- for user in @users
%tr

View file

@ -1,23 +1,18 @@
- title "Mitglieder"
- title t('.title')
%section
%p
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.
= t('.body', profile_link: link_to(t('.profile_link'), my_profile_path)).html_safe
.well
= form_tag foodcoop_users_path, :method => :get, :remote => true,
'data-submit-onchange' => true, class: 'form-search' do
= text_field_tag :user_name, params[:user_name], class: 'input-medium search-query',
placeholder: 'Name ...'
placeholder: t('.ph_name')
= text_field_tag :ordergroup_name, params[:ordergroup_name], class: 'input-medium search-query',
placeholder: 'Bestelllgruppe ...'
placeholder: t('.ph_ordergroup')
%button.btn
%i.icon-search
#users
= render :partial => "users"
= render :partial => "users"

View file

@ -1,7 +1,7 @@
%section.well
%h3= workgroup.name
= render :partial => 'shared/group', :locals => { :group => workgroup }
= link_to "Alle Aufgaben zeigen", workgroup_tasks_path(workgroup_id: workgroup), class: 'btn'
= link_to t('.show_tasks'), workgroup_tasks_path(workgroup_id: workgroup), class: 'btn'
= link_to_new_message message_params: {group_id: workgroup.id}
- if workgroup.member?(current_user)
= link_to "Gruppe bearbeiten", edit_foodcoop_workgroup_path(workgroup), class: 'btn'
= link_to t('.edit'), edit_foodcoop_workgroup_path(workgroup), class: 'btn'

View file

@ -1,11 +1,8 @@
- title "Gruppe bearbeiten"
- title t('.title')
%p
Neue Mitglieder kannst du
= link_to "hier", new_invite_path(id: @workgroup.id)
einladen.
%p= t('.invite_new', invite_link: link_to(t('.invite_link'), new_invite_path(id: @workgroup.id))).html_safe
= simple_form_for [:foodcoop, @workgroup] do |f|
= render :partial => 'shared/group_form_fields', :locals => {:f => f}
.form-actions
= f.submit
= link_to "oder abbrechen", foodcoop_workgroups_path
= link_to t('.or_cancel'), foodcoop_workgroups_path

View file

@ -1,12 +1,9 @@
- title "Arbeitsgruppen"
- title t('.title')
= t('.body').html_safe
%p
Das bearbeiten von Gruppen ist nur für Mitglieder der Gruppe möglich.
%br/
Wenn du einer Gruppe beitreten willst, dann schreib doch den Mitgliedern eine Nachricht.
= render :partial => "workgroup", :collection => @workgroups