summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-02-22 07:08:23 -0500
committerPeter Kozak <spag@golwen.net>2013-02-22 07:08:23 -0500
commit2a9b798f9e122582abb36605a7d4a1da0e70eca9 (patch)
tree45fe362d677cb243fba57dc7c0c23d01e653863e /app/views
parentd6009d77ffa221c14a4536be98a04e8e4b6474a9 (diff)
pickup group permission model added
Diffstat (limited to 'app/views')
-rw-r--r--app/views/group_memberships/_form.html.haml7
-rw-r--r--app/views/group_memberships/_form_core.html.haml4
-rw-r--r--app/views/group_memberships/_index_core.html.haml11
-rw-r--r--app/views/group_memberships/edit.html.haml3
-rw-r--r--app/views/group_memberships/index.html.haml6
-rw-r--r--app/views/group_memberships/new.html.haml3
-rw-r--r--app/views/group_memberships/show.html.haml10
-rw-r--r--app/views/group_permissions/_form.html.haml7
-rw-r--r--app/views/group_permissions/_form_core.html.haml3
-rw-r--r--app/views/group_permissions/_index_core.html.haml11
-rw-r--r--app/views/group_permissions/edit.html.haml3
-rw-r--r--app/views/group_permissions/index.html.haml6
-rw-r--r--app/views/group_permissions/new.html.haml3
-rw-r--r--app/views/group_permissions/show.html.haml10
-rw-r--r--app/views/groups/_form.html.haml7
-rw-r--r--app/views/groups/_form_core.html.haml4
-rw-r--r--app/views/groups/_index_core.html.haml13
-rw-r--r--app/views/groups/edit.html.haml3
-rw-r--r--app/views/groups/index.html.haml6
-rw-r--r--app/views/groups/new.html.haml3
-rw-r--r--app/views/groups/show.html.haml25
21 files changed, 148 insertions, 0 deletions
diff --git a/app/views/group_memberships/_form.html.haml b/app/views/group_memberships/_form.html.haml
new file mode 100644
index 0000000..c8a6a51
--- /dev/null
+++ b/app/views/group_memberships/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@group, @group_membership]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .form-actions
+ = f.button :submit, conditional_t('group_memberships.form.submit')
diff --git a/app/views/group_memberships/_form_core.html.haml b/app/views/group_memberships/_form_core.html.haml
new file mode 100644
index 0000000..4a28a06
--- /dev/null
+++ b/app/views/group_memberships/_form_core.html.haml
@@ -0,0 +1,4 @@
+.inputs
+ - if @group.group_memberships.count < 1
+ = f.input :item_type, :label => t('group_memberships.form.item_type.label'), :hint => conditional_hint('group_memberships.form.item_type.hint')
+ = f.input :item_id, :label => t('group_memberships.form.item_id.label'), :hint => conditional_hint('group_memberships.form.item_id.hint')
diff --git a/app/views/group_memberships/_index_core.html.haml b/app/views/group_memberships/_index_core.html.haml
new file mode 100644
index 0000000..beeefc9
--- /dev/null
+++ b/app/views/group_memberships/_index_core.html.haml
@@ -0,0 +1,11 @@
+%table.table.table-striped
+ %tr
+ %th= t('group_memberships.index.item_type')
+ %th= t('group_memberships.index.item_id')
+
+
+ - for group_membership in group_memberships
+ %tr
+ %td= group_membership.item_type
+ %td= group_membership.item_id
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => group_membership.group, :child => group_membership}
diff --git a/app/views/group_memberships/edit.html.haml b/app/views/group_memberships/edit.html.haml
new file mode 100644
index 0000000..643c095
--- /dev/null
+++ b/app/views/group_memberships/edit.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("group_memberships.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/group_memberships/index.html.haml b/app/views/group_memberships/index.html.haml
new file mode 100644
index 0000000..b493017
--- /dev/null
+++ b/app/views/group_memberships/index.html.haml
@@ -0,0 +1,6 @@
+- content_for :title, t("group_memberships.index.page_title")
+
+- if @group_memberships && @group_memberships.count > 0
+ = render "index_core", :group_memberships => @group_memberships
+
+= render :partial => 'shared/create_link', :locals => {:parent => @group, :child_class => GroupMembership}
diff --git a/app/views/group_memberships/new.html.haml b/app/views/group_memberships/new.html.haml
new file mode 100644
index 0000000..6cf2ce7
--- /dev/null
+++ b/app/views/group_memberships/new.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("group_memberships.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/group_memberships/show.html.haml b/app/views/group_memberships/show.html.haml
new file mode 100644
index 0000000..0875f0b
--- /dev/null
+++ b/app/views/group_memberships/show.html.haml
@@ -0,0 +1,10 @@
+- content_for :title, t("group_memberships.show.page_title")
+
+%p
+ %strong= t('group_memberships.show.item_type') + ":"
+ = @group_membership.item_type
+%p
+ %strong= t('group_memberships.show.item_id') + ":"
+ = @group_membership.item_id
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @group, :child => @group_membership }
diff --git a/app/views/group_permissions/_form.html.haml b/app/views/group_permissions/_form.html.haml
new file mode 100644
index 0000000..5f593f2
--- /dev/null
+++ b/app/views/group_permissions/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@group, @group_permission]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .form-actions
+ = f.button :submit, conditional_t('group_permissions.form.submit')
diff --git a/app/views/group_permissions/_form_core.html.haml b/app/views/group_permissions/_form_core.html.haml
new file mode 100644
index 0000000..49c9e7c
--- /dev/null
+++ b/app/views/group_permissions/_form_core.html.haml
@@ -0,0 +1,3 @@
+.inputs
+ = f.input :permission, :collection => GroupPermission::PERMISSION_TYPES, :label => t('group_permissions.form.permission.label'), :hint => conditional_hint('group_permissions.form.permission.hint'), :include_blank => false
+ = f.input :target_group_id, :collection => Group.all.collect, :label => t('group_permissions.form.target_group_id.label'), :hint => conditional_hint('group_permissions.form.target_group_id.hint'), :include_blank => false
diff --git a/app/views/group_permissions/_index_core.html.haml b/app/views/group_permissions/_index_core.html.haml
new file mode 100644
index 0000000..ad06b38
--- /dev/null
+++ b/app/views/group_permissions/_index_core.html.haml
@@ -0,0 +1,11 @@
+%table.table.table-striped
+ %tr
+ %th= t('group_permissions.index.permission')
+ %th= t('group_permissions.index.target_group_id')
+
+
+ - for group_permission in group_permissions
+ %tr
+ %td= group_permission.permission
+ %td= group_permission.target_group
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => group_permission.group, :child => group_permission}
diff --git a/app/views/group_permissions/edit.html.haml b/app/views/group_permissions/edit.html.haml
new file mode 100644
index 0000000..c673eea
--- /dev/null
+++ b/app/views/group_permissions/edit.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("group_permissions.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/group_permissions/index.html.haml b/app/views/group_permissions/index.html.haml
new file mode 100644
index 0000000..0bc0c37
--- /dev/null
+++ b/app/views/group_permissions/index.html.haml
@@ -0,0 +1,6 @@
+- content_for :title, t("group_permissions.index.page_title")
+
+- if @group_permissions && @group_permissions.count > 0
+ = render "index_core", :group_permissions => @group_permissions
+
+= render :partial => 'shared/create_link', :locals => {:parent => @group, :child_class => GroupPermission} \ No newline at end of file
diff --git a/app/views/group_permissions/new.html.haml b/app/views/group_permissions/new.html.haml
new file mode 100644
index 0000000..8012273
--- /dev/null
+++ b/app/views/group_permissions/new.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("group_permissions.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/group_permissions/show.html.haml b/app/views/group_permissions/show.html.haml
new file mode 100644
index 0000000..402c5ce
--- /dev/null
+++ b/app/views/group_permissions/show.html.haml
@@ -0,0 +1,10 @@
+- content_for :title, t("group_permissions.show.page_title")
+
+%p
+ %strong= t('group_permissions.show.permission') + ":"
+ = @group_permission.permission
+%p
+ %strong= t('group_permissions.show.target_group_id') + ":"
+ = @group_permission.target_group_id
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @group, :child => @group_permission }
diff --git a/app/views/groups/_form.html.haml b/app/views/groups/_form.html.haml
new file mode 100644
index 0000000..f5bdece
--- /dev/null
+++ b/app/views/groups/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for(@group) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .form-actions
+ = f.button :submit, conditional_t('groups.form.submit')
diff --git a/app/views/groups/_form_core.html.haml b/app/views/groups/_form_core.html.haml
new file mode 100644
index 0000000..1f9a39f
--- /dev/null
+++ b/app/views/groups/_form_core.html.haml
@@ -0,0 +1,4 @@
+.inputs
+ = f.input :name, :label => t('groups.form.name.label'), :hint => conditional_hint('groups.form.name.hint')
+ = f.input :active, :label => t('groups.form.active.label'), :hint => conditional_hint('groups.form.active.hint')
+ = f.input :comment, :label => t('groups.form.comment.label'), :hint => conditional_hint('groups.form.comment.hint')
diff --git a/app/views/groups/_index_core.html.haml b/app/views/groups/_index_core.html.haml
new file mode 100644
index 0000000..d99874a
--- /dev/null
+++ b/app/views/groups/_index_core.html.haml
@@ -0,0 +1,13 @@
+%table.table.table-striped
+ %tr
+ %th= t('groups.index.name')
+ %th= t('groups.index.active')
+ %th= t('groups.index.comment')
+
+
+ - for group in groups
+ %tr
+ %td= group.name
+ %td= group.active
+ %td= group.comment
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => group} \ No newline at end of file
diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml
new file mode 100644
index 0000000..7a3f784
--- /dev/null
+++ b/app/views/groups/edit.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("groups.edit.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/groups/index.html.haml b/app/views/groups/index.html.haml
new file mode 100644
index 0000000..7984b9e
--- /dev/null
+++ b/app/views/groups/index.html.haml
@@ -0,0 +1,6 @@
+- content_for :title, t("groups.index.page_title")
+
+- if @groups && @groups.count > 0
+ = render "index_core", :groups => @groups
+
+= render :partial => 'shared/create_link', :locals => {:child_class => Group} \ No newline at end of file
diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml
new file mode 100644
index 0000000..e8017a8
--- /dev/null
+++ b/app/views/groups/new.html.haml
@@ -0,0 +1,3 @@
+- content_for :title, t("groups.new.page_title")
+
+= render "form" \ No newline at end of file
diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml
new file mode 100644
index 0000000..fc291f3
--- /dev/null
+++ b/app/views/groups/show.html.haml
@@ -0,0 +1,25 @@
+- content_for :title, t("groups.show.page_title")
+
+%p
+ %strong= t('groups.show.name') + ":"
+ = @group.name
+%p
+ %strong= t('groups.show.active') + ":"
+ = @group.active
+%p
+ %strong= t('groups.show.comment') + ":"
+ = @group.comment
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @group }
+
+%h3= t('group_permissions.index.page_title')
+- if @group.group_permissions.any?
+ = render "group_permissions/index_core", :group_permissions => @group.group_permissions
+ %br
+= render :partial => 'shared/create_link', :locals => { :parent => @group, :child_class => GroupPermission }
+
+%h3= t('group_memberships.index.page_title')
+- if @group.group_memberships.any?
+ = render "group_memberships/index_core", :group_memberships => @group.group_memberships
+ %br
+= render :partial => 'shared/create_link', :locals => { :parent => @group, :child_class => GroupMembership }