summaryrefslogtreecommitdiff
path: root/app/views/phone_numbers
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/phone_numbers')
-rw-r--r--app/views/phone_numbers/_form_core.html.haml6
-rw-r--r--app/views/phone_numbers/_index_core.html.haml7
-rw-r--r--app/views/phone_numbers/edit.html.haml2
-rw-r--r--app/views/phone_numbers/index.html.haml2
-rw-r--r--app/views/phone_numbers/new.html.haml2
-rw-r--r--app/views/phone_numbers/show.html.haml2
6 files changed, 11 insertions, 10 deletions
diff --git a/app/views/phone_numbers/_form_core.html.haml b/app/views/phone_numbers/_form_core.html.haml
index add3039..a1ce1f3 100644
--- a/app/views/phone_numbers/_form_core.html.haml
+++ b/app/views/phone_numbers/_form_core.html.haml
@@ -2,9 +2,9 @@
- if @phone_book_entry
= f.input :name, :collection => ['Office', 'Home', 'Mobile', 'Fax'], :include_blank => false, :label => t('phone_numbers.form.name.label'), :hint => conditional_hint('phone_numbers.form.name.hint')
- = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint')
+ = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :autofocus => true
- else
- if @callthrough || @hunt_group_member || @access_authorization || @current_user.current_tenant.array_of_available_internal_extensions_and_dids.count == 0 || @current_user.current_tenant.array_of_available_internal_extensions_and_dids.count > 250
- = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint')
+ = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :autofocus => true
- else
- = f.input :number, :collection => @current_user.current_tenant.array_of_available_internal_extensions_and_dids, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :include_blank => false
+ = f.input :number, :collection => @current_user.current_tenant.array_of_available_internal_extensions_and_dids, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :include_blank => false, :autofocus => true
diff --git a/app/views/phone_numbers/_index_core.html.haml b/app/views/phone_numbers/_index_core.html.haml
index 06b27c8..f41c949 100644
--- a/app/views/phone_numbers/_index_core.html.haml
+++ b/app/views/phone_numbers/_index_core.html.haml
@@ -1,12 +1,13 @@
-%table
+%table{:class => 'table table-striped'}
%tr
- if phone_numbers.count > 1 && phone_numbers.first.phone_numberable_type == 'PhoneBookEntry'
%th= t('phone_numbers.index.name')
%th= t('phone_numbers.index.number')
+ %th{:colspan => '3'}
- - reset_cycle
+
- for phone_number in phone_numbers.order(:position)
- %tr{:class => cycle('odd', 'even')}
+ %tr
- if phone_number.phone_numberable_type == 'PhoneBookEntry'
%td= phone_number.name
%td= phone_number
diff --git a/app/views/phone_numbers/edit.html.haml b/app/views/phone_numbers/edit.html.haml
index d238d3d..14683d2 100644
--- a/app/views/phone_numbers/edit.html.haml
+++ b/app/views/phone_numbers/edit.html.haml
@@ -1,3 +1,3 @@
-- title t("phone_numbers.edit.page_title", :resource => "" )
+- content_for :title, t("phone_numbers.edit.page_title", :resource => "" )
= render "form" \ No newline at end of file
diff --git a/app/views/phone_numbers/index.html.haml b/app/views/phone_numbers/index.html.haml
index 2161739..08a2aa3 100644
--- a/app/views/phone_numbers/index.html.haml
+++ b/app/views/phone_numbers/index.html.haml
@@ -1,4 +1,4 @@
-- title @parent
+- content_for :title, @parent
- if @phone_numbers.count > 0
= render "index_core", :phone_numbers => @phone_numbers
diff --git a/app/views/phone_numbers/new.html.haml b/app/views/phone_numbers/new.html.haml
index e91f4f4..364a4bd 100644
--- a/app/views/phone_numbers/new.html.haml
+++ b/app/views/phone_numbers/new.html.haml
@@ -1,3 +1,3 @@
-- title t("phone_numbers.new.page_title")
+- content_for :title, t("phone_numbers.new.page_title")
= render "form"
diff --git a/app/views/phone_numbers/show.html.haml b/app/views/phone_numbers/show.html.haml
index 30c48bc..de6cb1b 100644
--- a/app/views/phone_numbers/show.html.haml
+++ b/app/views/phone_numbers/show.html.haml
@@ -1,4 +1,4 @@
-- title t("phone_numbers.show.page_title")
+- content_for :title, t("phone_numbers.show.page_title")
- if @phone_number.phone_numberable.class == PhoneBookEntry
%p