started with admin views

This commit is contained in:
Manuel Wiedenmann 2013-02-03 23:16:42 +07:00
parent e0b781fca6
commit 42c97520a1
2 changed files with 36 additions and 16 deletions

View file

@ -1,43 +1,43 @@
- title "Administration" - title t '.title'
%p %p
%i Hier kannst Du die Gruppen und Benutzerinnen der Foodsoft verwalten. %i= t '.first_paragraph'
.row-fluid .row-fluid
.span6 .span6
%section %section
%h2 Neuste Benutzerinnen %h2= t '.newest_users'
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th Benutzername %th= t '.username'
%th Name %th= t '.name'
%th Erstellt am %th= t '.created_at'
- for user in @users - for user in @users
%tr{:class => cycle('even','odd', :name => 'users')} %tr{:class => cycle('even','odd', :name => 'users')}
%td= link_to user.nick, [:admin, user] %td= link_to user.nick, [:admin, user]
%td=h user.name %td=h user.name
%td= format_date(user.created_on) %td= format_date(user.created_on)
= link_to 'Alle Benutzerinnen', admin_users_path = link_to t('.all_users'), admin_users_path
| |
= link_to "Neue Benutzerin", new_admin_user_path, class: 'btn btn-primary btn-small' = link_to t('.new_user'), new_admin_user_path, class: 'btn btn-primary btn-small'
.span6 .span6
%section %section
%h2 Neuste Gruppen %h2= t '.newest_groups'
%table.table.table-striped %table.table.table-striped
%thead %thead
%tr %tr
%th Gruppenname %th= t '.groupname'
%th Typ %th= t '.type'
%th Mitglieder %th= t '.members'
- for group in @groups - for group in @groups
%tr{:class => cycle('even','odd', :name => 'groups')} %tr{:class => cycle('even','odd', :name => 'groups')}
%td= link_to group.name, [:admin, group] %td= link_to group.name, [:admin, group]
%td= group.class.model_name.human %td= group.class.model_name.human
%td= group.users.size %td= group.users.size
= link_to 'Alle Bestellgruppen', admin_ordergroups_path = link_to t('.all_ordergroups'), admin_ordergroups_path
| |
= link_to "Neue Bestellgruppe", new_admin_ordergroup_path, class: 'btn btn-primary btn-small' = link_to t('.new_ordergroup'), new_admin_ordergroup_path, class: 'btn btn-primary btn-small'
| |
= link_to 'Alle Arbeitsgruppen', admin_workgroups_path = link_to t('.all_workgroups'), admin_workgroups_path
| |
= link_to "Neue Arbeitsgruppe", new_admin_workgroup_path, class: 'btn btn-primary btn-small' = link_to t('.new_workgroup'), new_admin_workgroup_path, class: 'btn btn-primary btn-small'

View file

@ -0,0 +1,20 @@
de:
admin:
base:
index:
title: 'Administration'
first_paragraph: 'Hier kannst Du die Gruppen und Benutzerinnen der Foodsoft verwalten.'
newest_users: 'Neuste Benutzerinnen'
username: 'Benutzername'
name: 'Name'
created_at: 'Erstellt am'
all_users: 'Alle Benutzerinnen'
new_user: 'Neue Benutzerin'
newest_groups: 'Neuste Gruppen'
groupname: 'Gruppenname'
type: 'Typ'
members: 'Mitglieder'
all_ordergroups: 'Alle Bestellgruppen'
new_ordergroup: 'Neue Bestellgruppe'
all_workgroups: 'Alle Arbeitsgruppen'
new_workgroup: 'Neue Arbeitsgruppe'