summaryrefslogtreecommitdiff
path: root/app/views/group_permissions
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/group_permissions')
-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
7 files changed, 43 insertions, 0 deletions
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 }