summaryrefslogtreecommitdiff
path: root/app/views/phone_numbers
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-27 12:22:29 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-27 12:22:29 +0100
commit67c1a0a951403a546250ea860a3e3d199cae2fce (patch)
treef86ec6cedf081a1a57005eca1661e9bead34e4de /app/views/phone_numbers
parent5d8ce5f4775ac8bc5f523964e6e36f63ff3c4683 (diff)
parent211f558a86ae30cdd5b392ab1376e1393f97e22c (diff)
Merge branch 'develop'5.1-beta6
Diffstat (limited to 'app/views/phone_numbers')
-rw-r--r--app/views/phone_numbers/_form_core.html.haml2
-rw-r--r--app/views/phone_numbers/show.html.haml15
2 files changed, 9 insertions, 8 deletions
diff --git a/app/views/phone_numbers/_form_core.html.haml b/app/views/phone_numbers/_form_core.html.haml
index a0a69db..1589e7e 100644
--- a/app/views/phone_numbers/_form_core.html.haml
+++ b/app/views/phone_numbers/_form_core.html.haml
@@ -1,7 +1,7 @@
.inputs
- 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 :name, :collection => PhoneBookEntry::PHONE_NUMBER_NAMES, :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'), :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
diff --git a/app/views/phone_numbers/show.html.haml b/app/views/phone_numbers/show.html.haml
index de6cb1b..9fe6ea4 100644
--- a/app/views/phone_numbers/show.html.haml
+++ b/app/views/phone_numbers/show.html.haml
@@ -9,15 +9,16 @@
%strong= t('phone_numbers.show.number') + ":"
= @phone_number.to_s
+= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number.phone_numberable, :child => @phone_number }
+
- if @ringtoneable_classes.has_key?(@phone_number.phone_numberable.class.to_s)
%p
- %strong= t('ringtones.name') + ':'
- - if @phone_number.ringtones.count > 0
- = link_to @phone_number.ringtones.first, phone_number_ringtone_path(@phone_number, @phone_number.ringtones.first)
- - else
- = link_to t('ringtones.set_a_ringtone'), new_phone_number_ringtone_path(@phone_number)
-
-= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number.phone_numberable, :child => @phone_number }
+ %strong= t('ringtones.name') + ':'
+ - if @phone_number.ringtones.count > 0
+ = @phone_number.ringtones.first
+ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number, :child => @phone_number.ringtones.first }
+ - else
+ = render :partial => 'shared/create_link', :locals => { :parent => @phone_number, :child_class => Ringtone }
- if @forwardable_classes.has_key?(@phone_number.phone_numberable.class.to_s)
%h3= t("call_forwards.index.page_title")