finished admin/users i18n + dry the admin i18n
This commit is contained in:
parent
75c9338fd9
commit
64b3d7e17d
13 changed files with 78 additions and 56 deletions
|
@ -8,4 +8,4 @@
|
|||
= f.input :ignore_apple_restriction
|
||||
.form-actions
|
||||
= f.button :submit
|
||||
= link_to t('.or_cancel'), :back
|
||||
= link_to t('admin.or_cancel'), :back
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
%th= t '.contact'
|
||||
%th= t '.address'
|
||||
%th= t '.members'
|
||||
%th= t '.actions'
|
||||
%th= t 'admin.actions'
|
||||
%tbody
|
||||
- for ordergroup in @ordergroups
|
||||
%tr{:class => cycle('even','odd', :name => 'groups')}
|
||||
|
@ -17,6 +17,6 @@
|
|||
%td= link_to_gmaps ordergroup.contact_address
|
||||
%td= ordergroup.users.size
|
||||
%td
|
||||
= link_to t('.edit'), edit_admin_ordergroup_path(ordergroup), class: 'btn btn-mini'
|
||||
= link_to t('.delete'), [:admin, ordergroup], :confirm => t('.confirm', name: ordergroup.name),
|
||||
= link_to t('admin.edit'), edit_admin_ordergroup_path(ordergroup), class: 'btn btn-mini'
|
||||
= link_to t('admin.delete'), [:admin, ordergroup], :confirm => t('admin.confirm', name: ordergroup.name),
|
||||
:method => :delete, class: 'btn btn-mini btn-danger'
|
|
@ -10,6 +10,6 @@
|
|||
= form_tag admin_ordergroups_path, :method => :get, :remote => true,
|
||||
'data-submit-onchange' => true, class: 'form-search' do
|
||||
= text_field_tag :query, params[:query], class: 'input-medium search-query',
|
||||
placeholder: t('.search_placeholder')
|
||||
placeholder: t('admin.search_placeholder')
|
||||
#ordergroups
|
||||
= render "ordergroups"
|
|
@ -1,5 +1,5 @@
|
|||
= simple_form_for([:admin, @user]) do |f|
|
||||
= render :partial => 'shared/user_form_fields', :locals => {:f => f}
|
||||
= render 'shared/user_form_fields', f: f
|
||||
.form-actions
|
||||
= f.submit
|
||||
= link_to 'oder abbrechen', :back
|
||||
= link_to t('admin.or_cancel'), :back
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th Login
|
||||
%th Name
|
||||
%th Email
|
||||
%th Zugriff auf
|
||||
%th Letzter login
|
||||
%th(colspan="2") Aktionen
|
||||
%th= t '.login'
|
||||
%th= t '.name'
|
||||
%th= t '.email'
|
||||
%th= t 'admin.access_to'
|
||||
%th= t '.last_login'
|
||||
%th(colspan="2")= t 'admin.actions'
|
||||
%tbody
|
||||
- for user in @users
|
||||
%tr
|
||||
|
@ -18,6 +18,6 @@
|
|||
%td= user.email
|
||||
%td= format_roles(user)
|
||||
%td= format_time(user.last_login)
|
||||
%td= link_to 'Bearbeiten', edit_admin_user_path(user), class: 'btn btn-mini'
|
||||
%td= link_to 'Löschen', [:admin, user], :confirm => "Willst du #{user.name} wirklich löschen?",
|
||||
%td= link_to t('admin.edit'), edit_admin_user_path(user), class: 'btn btn-mini'
|
||||
%td= link_to t('admin.delete'), [:admin, user], :confirm => t('admin.confirm', name: user.name),
|
||||
:method => :delete, class: 'btn btn-danger btn-mini'
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
- title "Benutzerin bearbeiten"
|
||||
- title t '.title'
|
||||
|
||||
= render 'form'
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
- title "Admin/Benutzerinnen"
|
||||
- title t '.title'
|
||||
|
||||
- content_for :actionbar do
|
||||
= link_to 'Neue Benutzerin anlegen', new_admin_user_path, class: 'btn btn-primary'
|
||||
= link_to t('.new_user'), new_admin_user_path, class: 'btn btn-primary'
|
||||
|
||||
- content_for :sidebar do
|
||||
%p
|
||||
Hier kannst du Benutzer_innen #{link_to 'neu Anlegen', new_admin_user_path},
|
||||
bearbeiten und natürlich auch löschen.
|
||||
%p= t('.first_paragraph', url: link_to(t('.new_users'), new_admin_user_path)).html_safe
|
||||
|
||||
.well.well-small
|
||||
= form_tag admin_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('admin.search_placeholder')
|
||||
|
||||
#users
|
||||
= render "users"
|
|
@ -1,3 +1,3 @@
|
|||
- title "Neue Benutzerin anlegen"
|
||||
- title t '.title'
|
||||
|
||||
= render 'form'
|
|
@ -3,37 +3,37 @@
|
|||
.row-fluid
|
||||
.span3
|
||||
.well
|
||||
%h4 Person
|
||||
%p Mitglied seit #{distance_of_time_in_words(Time.now, @user.created_on)}
|
||||
%h4= t '.person'
|
||||
%p= t '.member_since', time: distance_of_time_in_words(Time.now, @user.created_on)
|
||||
%dl
|
||||
%dt Nick
|
||||
%dt= t '.nick'
|
||||
%dd= @user.nick
|
||||
%dt Name
|
||||
%dt= t '.name'
|
||||
%dd= h @user.name
|
||||
%dt Email
|
||||
%dt= t '.email'
|
||||
%dd= @user.email
|
||||
%dt Telefon
|
||||
%dt= t '.phone'
|
||||
%dd= @user.phone
|
||||
%dt Zugriff auf
|
||||
%dt= t 'admin.access_to'
|
||||
%dd= format_roles(@user)
|
||||
.span5
|
||||
.well
|
||||
%h4 Einstellungen
|
||||
%h4= t '.preference'
|
||||
%table.table
|
||||
- for setting in User::setting_keys.keys
|
||||
%tr
|
||||
%td= User::setting_keys[setting]
|
||||
%td= @user.settings[setting] == '1' ? 'ja' : 'nein'
|
||||
%td= @user.settings[setting] == '1' ? t('simple_form.yes') : t('simple_form.no')
|
||||
.span3
|
||||
.well
|
||||
%h4 Gruppenabos
|
||||
%h4= t '.groupabos'
|
||||
%ul.unstyled
|
||||
- for membership in Membership.find_all_by_user_id(@user.id)
|
||||
%li= link_to(membership.group.name, [:admin, membership.group])
|
||||
|
||||
%hr/
|
||||
%p
|
||||
= link_to 'Bearbeiten', edit_admin_user_path(@user), class: 'btn'
|
||||
= link_to 'Löschen', [:admin, @user], :confirm => "Willst du #{@user.first_name} wirklich rausschmeißen?",
|
||||
= link_to t('admin.edit'), edit_admin_user_path(@user), class: 'btn'
|
||||
= link_to t('admin.delete'), [:admin, @user], :confirm => t('.confirm', user: @user.first_name),
|
||||
:method => :delete, class: 'btn btn-danger'
|
||||
= link_to "Nachricht senden", new_message_path(:message => {:mail_to => @user.id}), class: 'btn'
|
||||
= link_to t('.send_message'), new_message_path(:message => {:mail_to => @user.id}), class: 'btn'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%p= t('.first_paragraph', url: link_to(t('.here'), new_invite_path(id: @workgroup.id), remote: true)).html_safe
|
||||
= simple_form_for [:admin, @workgroup] do |f|
|
||||
= render :layout => 'shared/group_form_fields', :locals => {:f => f} do
|
||||
%h4 Zugriff auf
|
||||
%h4= t 'admin.access_to'
|
||||
= f.input :role_admin
|
||||
= f.input :role_finance
|
||||
= f.input :role_suppliers
|
||||
|
@ -9,4 +9,4 @@
|
|||
= f.input :role_orders
|
||||
.form-actions
|
||||
= f.button :submit
|
||||
= link_to t('.or_cancel'), :back
|
||||
= link_to t('admin.or_cancel'), :back
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
%tr
|
||||
%th= t '.name'
|
||||
%th= t '.members'
|
||||
%th= t '.access_to'
|
||||
%th= t '.actions'
|
||||
%th= t 'admin.access_to'
|
||||
%th= t 'admin.actions'
|
||||
%tbody
|
||||
- for workgroup in @workgroups
|
||||
%tr
|
||||
|
@ -15,6 +15,6 @@
|
|||
%td= workgroup.users.size
|
||||
%td= format_roles(workgroup)
|
||||
%td
|
||||
= link_to t('.edit'), edit_admin_workgroup_path(workgroup), class: 'btn btn-mini'
|
||||
= link_to t('.delete'), [:admin, workgroup], :confirm => t('.confirm', name: workgroup.name),
|
||||
= link_to t('admin.edit'), edit_admin_workgroup_path(workgroup), class: 'btn btn-mini'
|
||||
= link_to t('admin.delete'), [:admin, workgroup], :confirm => t('admin.confirm', name: workgroup.name),
|
||||
:method => :delete, class: 'btn btn-mini btn-danger'
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
= form_tag admin_workgroups_path, :method => :get, :remote => true,
|
||||
'data-submit-onchange' => true, class: 'form-search' do
|
||||
= text_field_tag :query, params[:query], class: 'input-medium search-query',
|
||||
placeholder: t('.search_placeholder')
|
||||
placeholder: t('admin.search_placeholder')
|
||||
#workgroups
|
||||
= render "workgroups"
|
|
@ -1,5 +1,12 @@
|
|||
de:
|
||||
admin:
|
||||
edit: 'Bearbeiten'
|
||||
delete: 'Löschen'
|
||||
confirm: 'Willst du %{name} wirklich löschen?'
|
||||
actions: 'Aktionen'
|
||||
access_to: 'Zugriff auf'
|
||||
or_cancel: 'oder abbrechen'
|
||||
search_placeholder: 'Name ...'
|
||||
base:
|
||||
index:
|
||||
title: 'Administration'
|
||||
|
@ -26,7 +33,6 @@ de:
|
|||
new_ordergroups: 'neue Bestellgruppen'
|
||||
second_paragraph: "Beachte dabei den <em>Unterschied zwischen Gruppe und Bestellgruppe</em>: Eine Bestellgruppe hat ein Konto und kann Essen bestellen. In einer <em>%{url}</em> (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."
|
||||
workgroup: 'Arbeitsgruppe'
|
||||
search_placeholder: 'Name ...'
|
||||
edit:
|
||||
title: 'Bestellgruppe bearbeiten'
|
||||
new:
|
||||
|
@ -34,7 +40,6 @@ de:
|
|||
form:
|
||||
first_paragraph: 'Neue Mitglieder kannst du %{url} einladen.'
|
||||
here: 'hier'
|
||||
or_cancel: 'oder abbrechen'
|
||||
show:
|
||||
title: 'Bestellgruppe %{name}'
|
||||
edit: 'Gruppe/Mitglieder bearbeiten'
|
||||
|
@ -46,10 +51,6 @@ de:
|
|||
contact: 'Kontakt'
|
||||
address: 'Adresse'
|
||||
members: 'Mitglieder'
|
||||
actions: 'Aktionen'
|
||||
edit: 'Bearbeiten'
|
||||
delete: 'Löschen'
|
||||
confirm: 'Willst du %{name} wirklich löschen?'
|
||||
workgroups:
|
||||
index:
|
||||
title: 'Arbeitsgruppen'
|
||||
|
@ -58,7 +59,6 @@ de:
|
|||
new_workgroups: 'neue Arbeitsgruppen'
|
||||
second_paragraph: "Beachte dabei den <em>Unterschied zwischen Gruppe und Bestellgruppe</em>: Eine %{url} hat ein Konto und kann Essen bestellen. In einer Arbeitsgruppe (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."
|
||||
ordergroup: 'Bestellgruppe'
|
||||
search_placeholder: 'Name ...'
|
||||
edit:
|
||||
title: 'Arbeitsgruppe bearbeiten'
|
||||
new:
|
||||
|
@ -66,7 +66,6 @@ de:
|
|||
form:
|
||||
first_paragraph: 'Neue Mitglieder kannst du %{url} einladen.'
|
||||
here: 'hier'
|
||||
or_cancel: 'oder abbrechen'
|
||||
show:
|
||||
title: 'Arbeitsgruppe %{name}'
|
||||
edit: 'Gruppe/Mitglieder bearbeiten'
|
||||
|
@ -75,8 +74,33 @@ de:
|
|||
workgroups:
|
||||
name: 'Name'
|
||||
members: 'Mitglieder'
|
||||
access_to: 'Zugriff auf'
|
||||
actions: 'Aktionen'
|
||||
edit: 'Bearbeiten'
|
||||
delete: 'Löschen'
|
||||
confirm: 'Willst du %{name} wirklich löschen?'
|
||||
users:
|
||||
index:
|
||||
title: 'Admin/Benutzerinnen'
|
||||
new_user: 'Neue Benutzerin anlegen'
|
||||
first_paragraph: 'Hier kannst du Benutzer_innen %{url}, bearbeiten und natürlich auch löschen.'
|
||||
new_users: 'neu anlegen'
|
||||
edit:
|
||||
title: 'Benutzerin bearbeiten'
|
||||
new:
|
||||
title: 'Neue Benutzerin anlegen'
|
||||
form:
|
||||
first_paragraph: 'Neue Mitglieder kannst du %{url} einladen.'
|
||||
here: 'hier'
|
||||
or_cancel: 'oder abbrechen'
|
||||
show:
|
||||
person: 'Person'
|
||||
member_since: 'Mitglied seit %{time}'
|
||||
nick: 'Nick'
|
||||
name: 'Name'
|
||||
email: 'Email'
|
||||
phone: 'Telefon'
|
||||
preference: 'Einstellungen'
|
||||
groupabos: 'Gruppenabos'
|
||||
confirm: 'Willst du %{user} wirklich rausschmeißen?'
|
||||
send_message: 'Nachricht senden'
|
||||
users:
|
||||
login: 'Login'
|
||||
name: 'Name'
|
||||
email: 'Email'
|
||||
last_login: 'Letzter login'
|
Loading…
Reference in a new issue