summaryrefslogtreecommitdiff
path: root/app/views/phones
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:05:14 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:05:14 +0100
commiteaad37485fe59d0306c37cc038dda6d210052910 (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /app/views/phones
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
parentb80bd744ad873f6fc43018bc4bfb90677de167bd (diff)
Merge branch 'develop'
Diffstat (limited to 'app/views/phones')
-rw-r--r--app/views/phones/_form.html.haml7
-rw-r--r--app/views/phones/_form_core.html.haml8
-rw-r--r--app/views/phones/_index_core.html.haml15
-rw-r--r--app/views/phones/edit.html.haml3
-rw-r--r--app/views/phones/index.html.haml6
-rw-r--r--app/views/phones/new.html.haml3
-rw-r--r--app/views/phones/show.html.haml31
7 files changed, 73 insertions, 0 deletions
diff --git a/app/views/phones/_form.html.haml b/app/views/phones/_form.html.haml
new file mode 100644
index 0000000..9bfa226
--- /dev/null
+++ b/app/views/phones/_form.html.haml
@@ -0,0 +1,7 @@
+= simple_form_for([ @phoneable, @phone ]) do |f|
+ = f.error_notification
+
+ = render "form_core", :f => f
+
+ .actions
+ = f.button :submit, conditional_t('phones.form.submit') \ No newline at end of file
diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml
new file mode 100644
index 0000000..51ceff5
--- /dev/null
+++ b/app/views/phones/_form_core.html.haml
@@ -0,0 +1,8 @@
+.inputs
+ = f.input :mac_address, :label => t('phones.form.mac_address.label'), :hint => conditional_hint('phones.form.mac_address.hint')
+ = f.association :phone_model, :label => t('phones.form.phone_model_id.label'), :hint => conditional_hint('phones.form.phone_model_id.hint')
+ = f.input :hot_deskable, :label => t('phones.form.hot_deskable.label'), :hint => conditional_hint('phones.form.hot_deskable.hint')
+ - if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true
+ = f.input :nightly_reboot, :label => t('phones.form.nightly_reboot.label'), :hint => conditional_hint('phones.form.nightly_reboot.hint')
+ - if defined? PROVISIONING_KEY_LENGTH && PROVISIONING_KEY_LENGTH > 0
+ = f.input :provisioning_key_active, :label => t('phones.form.provisioning_key_active.label'), :hint => conditional_hint('phones.form.provisioning_key_active.hint')
diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml
new file mode 100644
index 0000000..c442d7f
--- /dev/null
+++ b/app/views/phones/_index_core.html.haml
@@ -0,0 +1,15 @@
+%table
+ %tr
+ %th= t('phones.index.mac_address')
+ %th= t('phones.index.phone_model_id')
+ %th= t('phones.index.hot_deskable')
+ %th= t('phones.index.ip_address')
+
+ - reset_cycle
+ - for phone in phones
+ %tr{:class => cycle('odd', 'even')}
+ %td= phone.pretty_mac_address
+ %td= phone.phone_model
+ %td= phone.hot_deskable
+ %td= phone.ip_address
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone} \ No newline at end of file
diff --git a/app/views/phones/edit.html.haml b/app/views/phones/edit.html.haml
new file mode 100644
index 0000000..cdbacac
--- /dev/null
+++ b/app/views/phones/edit.html.haml
@@ -0,0 +1,3 @@
+- title t("phones.edit.page_title", :resource => @phone.mac_address)
+
+= render "form"
diff --git a/app/views/phones/index.html.haml b/app/views/phones/index.html.haml
new file mode 100644
index 0000000..785adf9
--- /dev/null
+++ b/app/views/phones/index.html.haml
@@ -0,0 +1,6 @@
+- title t("phones.index.page_title")
+
+- if @phones.count > 0
+ = render "index_core", :phones => @phones
+
+= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Phone} \ No newline at end of file
diff --git a/app/views/phones/new.html.haml b/app/views/phones/new.html.haml
new file mode 100644
index 0000000..61923cc
--- /dev/null
+++ b/app/views/phones/new.html.haml
@@ -0,0 +1,3 @@
+- title t("phones.new.page_title")
+
+= render "form"
diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml
new file mode 100644
index 0000000..2664ffa
--- /dev/null
+++ b/app/views/phones/show.html.haml
@@ -0,0 +1,31 @@
+- title t("phones.show.page_title")
+
+%p
+ %strong= t('phones.show.mac_address') + ":"
+ = @phone.pretty_mac_address
+%p
+ %strong= t('phones.show.phone_model_id') + ":"
+ = @phone.phone_model
+%p
+ %strong= t('phones.show.hot_deskable') + ":"
+ = @phone.hot_deskable
+- if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true
+ %p
+ %strong= t('phones.show.nightly_reboot') + ":"
+ = @phone.nightly_reboot
+
+- if defined? PROVISIONING_KEY_LENGTH && PROVISIONING_KEY_LENGTH > 0
+ %p
+ %strong= t('phones.show.provisioning_key_active') + ":"
+ = @phone.provisioning_key_active
+%p
+ %strong= t('phones.show.ip_address') + ":"
+ = @phone.ip_address
+
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone }
+
+%h2= t("phones.sip_accounts.title")
+- if @phone.phone_sip_accounts.count > 0
+ = render "phone_sip_accounts/index_core", :phone_sip_accounts => @phone.phone_sip_accounts
+
+= render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => PhoneSipAccount}