From b80bd744ad873f6fc43018bc4bfb90677de167bd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 17 Dec 2012 12:01:45 +0100 Subject: Start of GS5. --- app/views/user_groups/_form.html.haml | 7 +++++++ app/views/user_groups/_form_core.html.haml | 3 +++ app/views/user_groups/_index_core.html.haml | 24 ++++++++++++++++++++++++ app/views/user_groups/edit.html.haml | 3 +++ app/views/user_groups/index.html.haml | 6 ++++++ app/views/user_groups/new.html.haml | 3 +++ app/views/user_groups/show.html.haml | 20 ++++++++++++++++++++ 7 files changed, 66 insertions(+) create mode 100644 app/views/user_groups/_form.html.haml create mode 100644 app/views/user_groups/_form_core.html.haml create mode 100644 app/views/user_groups/_index_core.html.haml create mode 100644 app/views/user_groups/edit.html.haml create mode 100644 app/views/user_groups/index.html.haml create mode 100644 app/views/user_groups/new.html.haml create mode 100644 app/views/user_groups/show.html.haml (limited to 'app/views/user_groups') 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 -- cgit v1.2.3