diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:05:14 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:05:14 +0100 |
commit | eaad37485fe59d0306c37cc038dda6d210052910 (patch) | |
tree | 072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/user_groups | |
parent | 3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff) | |
parent | b80bd744ad873f6fc43018bc4bfb90677de167bd (diff) |
Merge branch 'develop'
Diffstat (limited to 'app/views/user_groups')
-rw-r--r-- | app/views/user_groups/_form.html.haml | 7 | ||||
-rw-r--r-- | app/views/user_groups/_form_core.html.haml | 3 | ||||
-rw-r--r-- | app/views/user_groups/_index_core.html.haml | 24 | ||||
-rw-r--r-- | app/views/user_groups/edit.html.haml | 3 | ||||
-rw-r--r-- | app/views/user_groups/index.html.haml | 6 | ||||
-rw-r--r-- | app/views/user_groups/new.html.haml | 3 | ||||
-rw-r--r-- | app/views/user_groups/show.html.haml | 20 |
7 files changed, 66 insertions, 0 deletions
diff --git a/app/views/user_groups/_form.html.haml b/app/views/user_groups/_form.html.haml new file mode 100644 index 0000000..cbe3cc4 --- /dev/null +++ b/app/views/user_groups/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@user_group) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('user_groups.form.submit')
\ No newline at end of file diff --git a/app/views/user_groups/_form_core.html.haml b/app/views/user_groups/_form_core.html.haml new file mode 100644 index 0000000..a45ba6f --- /dev/null +++ b/app/views/user_groups/_form_core.html.haml @@ -0,0 +1,3 @@ +.inputs + = f.input :name, :label => t('user_groups.form.name.label'), :hint => conditional_hint('user_groups.form.name.hint') + = f.input :description, :label => t('user_groups.form.description.label'), :hint => conditional_hint('user_groups.form.description.hint') diff --git a/app/views/user_groups/_index_core.html.haml b/app/views/user_groups/_index_core.html.haml new file mode 100644 index 0000000..d2b6e88 --- /dev/null +++ b/app/views/user_groups/_index_core.html.haml @@ -0,0 +1,24 @@ +%table + %tr + %th= t('user_groups.index.name') + %th= t('user_groups.index.description') + - if @user + %th= t('user_groups.index.tenant_id') + - else + %th= t('user_groups.index.members') + + - reset_cycle + - for user_group in user_groups + %tr{:class => cycle('odd', 'even')} + %td= user_group.name + %td= user_group.description + - if @user + %td= user_group.tenant + - else + %td + =render 'users/listing', :users => user_group.users + - if user_group.users.count > 1 + %br + = render :partial => 'shared/create_link', :locals => {:parent => user_group, :child_class => UserGroupMembership} + + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user_group.tenant, :child => user_group} diff --git a/app/views/user_groups/edit.html.haml b/app/views/user_groups/edit.html.haml new file mode 100644 index 0000000..35514e0 --- /dev/null +++ b/app/views/user_groups/edit.html.haml @@ -0,0 +1,3 @@ +- title t("user_groups.edit.page_title", :resource => @user_group) + += render "form" diff --git a/app/views/user_groups/index.html.haml b/app/views/user_groups/index.html.haml new file mode 100644 index 0000000..545b838 --- /dev/null +++ b/app/views/user_groups/index.html.haml @@ -0,0 +1,6 @@ +- title t("user_groups.index.page_title") + +- if @user_groups.count > 0 + = render "index_core", :user_groups => @user_groups + += render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => UserGroup}
\ No newline at end of file diff --git a/app/views/user_groups/new.html.haml b/app/views/user_groups/new.html.haml new file mode 100644 index 0000000..dfef18e --- /dev/null +++ b/app/views/user_groups/new.html.haml @@ -0,0 +1,3 @@ +- title t("user_groups.new.page_title") + += render "form" diff --git a/app/views/user_groups/show.html.haml b/app/views/user_groups/show.html.haml new file mode 100644 index 0000000..00bdeb7 --- /dev/null +++ b/app/views/user_groups/show.html.haml @@ -0,0 +1,20 @@ +- title t("user_groups.show.page_title") + +%p + %strong= t('user_groups.show.name') + ":" + = @user_group.name +%p + %strong= t('user_groups.show.description') + ":" + = @user_group.description +%p + %strong= t('user_groups.show.tenant_id') + ":" + = @user_group.tenant + += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @user_group.tenant, :child => @user_group } + +%h2=t("user_group_memberships.index.page_title") + +- if @user_group.user_group_memberships.count > 0 + = render "user_group_memberships/index_core", :user_group_memberships => @user_group.user_group_memberships + += render :partial => 'shared/create_link', :locals => {:parent => @user_group, :child_class => UserGroupMembership}
\ No newline at end of file |