summaryrefslogtreecommitdiff
path: root/app/views/hunt_group_members
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/hunt_group_members')
-rw-r--r--app/views/hunt_group_members/_form.html.haml7
-rw-r--r--app/views/hunt_group_members/_form_core.html.haml4
-rw-r--r--app/views/hunt_group_members/_index_core.html.haml20
-rw-r--r--app/views/hunt_group_members/_listing.html.haml8
-rw-r--r--app/views/hunt_group_members/edit.html.haml3
-rw-r--r--app/views/hunt_group_members/index.html.haml6
-rw-r--r--app/views/hunt_group_members/new.html.haml3
-rw-r--r--app/views/hunt_group_members/show.html.haml19
8 files changed, 70 insertions, 0 deletions
diff --git a/app/views/hunt_group_members/_form.html.haml b/app/views/hunt_group_members/_form.html.haml
new file mode 100644
index 0000000..1ab7850
--- /dev/null
+++ b/app/views/hunt_group_members/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@hunt_group, @hunt_group_member]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('hunt_group_members.form.submit') \ No newline at end of file
diff --git a/app/views/hunt_group_members/_form_core.html.haml b/app/views/hunt_group_members/_form_core.html.haml
new file mode 100644
index 0000000..2f03fce
--- /dev/null
+++ b/app/views/hunt_group_members/_form_core.html.haml
@@ -0,0 +1,4 @@
+.inputs
+ = f.input :name, :label => t('hunt_group_members.form.name.label'), :hint => conditional_hint('hunt_group_members.form.name.hint')
+ = f.input :active, :label => t('hunt_group_members.form.active.label'), :hint => conditional_hint('hunt_group_members.form.active.hint')
+ = f.input :can_switch_status_itself, :label => t('hunt_group_members.form.can_switch_status_itself.label'), :hint => conditional_hint('hunt_group_members.form.can_switch_status_itself.hint')
diff --git a/app/views/hunt_group_members/_index_core.html.haml b/app/views/hunt_group_members/_index_core.html.haml
new file mode 100644
index 0000000..46b64c8
--- /dev/null
+++ b/app/views/hunt_group_members/_index_core.html.haml
@@ -0,0 +1,20 @@
+%table
+ %tr
+ %th= t('hunt_group_members.index.name')
+ %th= t('hunt_group_members.index.active')
+ %th= t('hunt_group_members.index.can_switch_status_itself')
+ %th= t('hunt_group_members.index.phone_numbers')
+
+ - reset_cycle
+ - for hunt_group_member in hunt_group_members
+ %tr{:class => cycle('odd', 'even')}
+ %td= hunt_group_member.name
+ %td= hunt_group_member.active
+ %td= hunt_group_member.can_switch_status_itself
+ %td
+ - if hunt_group_member.phone_numbers.count > 0
+ =render 'phone_numbers/listing', :phone_numbers => hunt_group_member.phone_numbers
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => hunt_group_member, :child_class => PhoneNumber, :short_link => true}
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => hunt_group_member.hunt_group, :child => hunt_group_member} \ No newline at end of file
diff --git a/app/views/hunt_group_members/_listing.html.haml b/app/views/hunt_group_members/_listing.html.haml
new file mode 100644
index 0000000..b31fd22
--- /dev/null
+++ b/app/views/hunt_group_members/_listing.html.haml
@@ -0,0 +1,8 @@
+- amount_of_hunt_group_members = hunt_group_members.count
+- if amount_of_hunt_group_members > 0
+ - if amount_of_hunt_group_members < 30
+ = hunt_group_members.map{|hunt_group_member| hunt_group_member}.join(', ')
+ - else
+ = hunt_group_members.limit(15).map{|hunt_group_member| hunt_group_member}.join(', ') + ', '
+ = '[...]'
+ = hunt_group_members.offset(amount_of_hunt_group_members - 15).map{|hunt_group_member| hunt_group_member}.join(', ') \ No newline at end of file
diff --git a/app/views/hunt_group_members/edit.html.haml b/app/views/hunt_group_members/edit.html.haml
new file mode 100644
index 0000000..93d7b0a
--- /dev/null
+++ b/app/views/hunt_group_members/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("hunt_group_members.edit.page_title")
+
+= render "form"
diff --git a/app/views/hunt_group_members/index.html.haml b/app/views/hunt_group_members/index.html.haml
new file mode 100644
index 0000000..99dc929
--- /dev/null
+++ b/app/views/hunt_group_members/index.html.haml
@@ -0,0 +1,6 @@
+- title t("hunt_group_members.index.page_title")
+
+- if @hunt_group_members.count > 0
+ = render "index_core", :hunt_group_members => @hunt_group_members
+
+= render :partial => 'shared/create_link', :locals => {:parent => @hunt_group, :child_class => HuntGroupMember} \ No newline at end of file
diff --git a/app/views/hunt_group_members/new.html.haml b/app/views/hunt_group_members/new.html.haml
new file mode 100644
index 0000000..99f52ad
--- /dev/null
+++ b/app/views/hunt_group_members/new.html.haml
@@ -0,0 +1,3 @@
+- title t("hunt_group_members.new.page_title")
+
+= render "form"
diff --git a/app/views/hunt_group_members/show.html.haml b/app/views/hunt_group_members/show.html.haml
new file mode 100644
index 0000000..80123b8
--- /dev/null
+++ b/app/views/hunt_group_members/show.html.haml
@@ -0,0 +1,19 @@
+- title t("hunt_group_members.show.page_title")
+
+%p
+ %strong= t('hunt_group_members.show.name') + ":"
+ = @hunt_group_member.name
+%p
+ %strong= t('hunt_group_members.show.active') + ":"
+ = @hunt_group_member.active
+%p
+ %strong= t('hunt_group_members.show.can_switch_status_itself') + ":"
+ = @hunt_group_member.can_switch_status_itself
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @hunt_group, :child => @hunt_group_member }
+
+%h2= t('hunt_group_members.form.phone_numbers.label')
+- if @hunt_group_member.phone_numbers.count > 0
+ = render 'phone_numbers/index_core', :phone_numbers => @hunt_group_member.phone_numbers
+ %br
+= render :partial => 'shared/create_link', :locals => {:parent => @hunt_group_member, :child_class => PhoneNumber} \ No newline at end of file