summaryrefslogtreecommitdiff
path: root/app/views/whitelists
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/whitelists')
-rw-r--r--app/views/whitelists/_form.html.haml7
-rw-r--r--app/views/whitelists/_form_core.html.haml8
-rw-r--r--app/views/whitelists/_index_core.html.haml15
-rw-r--r--app/views/whitelists/edit.html.haml3
-rw-r--r--app/views/whitelists/index.html.haml6
-rw-r--r--app/views/whitelists/new.html.haml3
-rw-r--r--app/views/whitelists/show.html.haml7
7 files changed, 49 insertions, 0 deletions
diff --git a/app/views/whitelists/_form.html.haml b/app/views/whitelists/_form.html.haml
new file mode 100644
index 0000000..c7f787a
--- /dev/null
+++ b/app/views/whitelists/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([@parent, @whitelist]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('whitelists.form.submit') \ No newline at end of file
diff --git a/app/views/whitelists/_form_core.html.haml b/app/views/whitelists/_form_core.html.haml
new file mode 100644
index 0000000..38f1487
--- /dev/null
+++ b/app/views/whitelists/_form_core.html.haml
@@ -0,0 +1,8 @@
+.inputs
+ = f.input :name, :label => t('whitelists.form.name.label'), :hint => conditional_hint('whitelists.form.name.hint')
+
+ %h3= t('whitelists.form.phone_numbers.label')
+ - if !t('whitelists.form.phone_numbers.hint').blank?
+ %p= t('whitelists.form.phone_numbers.hint')
+ = f.simple_fields_for :phone_numbers do |phone_number|
+ = render "phone_numbers/form_core", :f => phone_number
diff --git a/app/views/whitelists/_index_core.html.haml b/app/views/whitelists/_index_core.html.haml
new file mode 100644
index 0000000..b4c5b0c
--- /dev/null
+++ b/app/views/whitelists/_index_core.html.haml
@@ -0,0 +1,15 @@
+%table
+ %tr
+ %th= t('whitelists.index.name')
+ %th= t('whitelists.index.phone_numbers')
+
+ - reset_cycle
+ - for whitelist in whitelists
+ %tr{:class => cycle('odd', 'even')}
+ %td= whitelist.name || '-'
+ %td
+ = render 'phone_numbers/listing', :phone_numbers => whitelist.phone_numbers
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => whitelist, :child_class => PhoneNumber, :short_link => true}
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => whitelist.whitelistable, :child => whitelist} \ No newline at end of file
diff --git a/app/views/whitelists/edit.html.haml b/app/views/whitelists/edit.html.haml
new file mode 100644
index 0000000..9f8af90
--- /dev/null
+++ b/app/views/whitelists/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("whitelists.edit.page_title")
+
+= render "form"
diff --git a/app/views/whitelists/index.html.haml b/app/views/whitelists/index.html.haml
new file mode 100644
index 0000000..0873189
--- /dev/null
+++ b/app/views/whitelists/index.html.haml
@@ -0,0 +1,6 @@
+- title t("whitelists.index.page_title")
+
+- if @whitelists.count > 0
+ = render "index_core", :whitelists => @whitelists
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Whitelist} \ No newline at end of file
diff --git a/app/views/whitelists/new.html.haml b/app/views/whitelists/new.html.haml
new file mode 100644
index 0000000..f1101ad
--- /dev/null
+++ b/app/views/whitelists/new.html.haml
@@ -0,0 +1,3 @@
+- title t("whitelists.new.page_title")
+
+= render "form"
diff --git a/app/views/whitelists/show.html.haml b/app/views/whitelists/show.html.haml
new file mode 100644
index 0000000..77652f9
--- /dev/null
+++ b/app/views/whitelists/show.html.haml
@@ -0,0 +1,7 @@
+- title t("whitelists.show.page_title")
+
+%p
+ %strong= t('whitelists.show.name') + ":"
+ = @whitelist.name
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @whitelist } \ No newline at end of file