diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-06-20 19:06:19 +0200 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-06-20 19:06:19 +0200 |
commit | eb0e1cc5c26275ff3e5c341404e8bc558f8312b8 (patch) | |
tree | 71f449ccd6f15422717de3ac24f87d5e888ddd79 /app/views/call_forwards | |
parent | df6e17e48995f25e72509986f30700d778b179b6 (diff) | |
parent | 3b27a5d45b12f6bac65da2a8e17387bfda42a2f1 (diff) |
Merge branch 'develop'
Diffstat (limited to 'app/views/call_forwards')
-rw-r--r-- | app/views/call_forwards/_form_core.html.haml | 13 | ||||
-rw-r--r-- | app/views/call_forwards/_index_core.html.haml | 2 | ||||
-rw-r--r-- | app/views/call_forwards/show.html.haml | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/app/views/call_forwards/_form_core.html.haml b/app/views/call_forwards/_form_core.html.haml index 83de044..b730941 100644 --- a/app/views/call_forwards/_form_core.html.haml +++ b/app/views/call_forwards/_form_core.html.haml @@ -1,11 +1,18 @@ .inputs = f.input :call_forward_case_id, :as => :select, :collection => @available_call_forward_cases.map {|x| [I18n.t("call_forward_cases.#{x.value}"), x.id] }, :label => t('call_forwards.form.call_forward_case.label'), :hint => conditional_hint('call_forwards.form.call_forward_case_id.hint'), :include_blank => false, :autofocus => true - = f.input :timeout, :label => t('call_forwards.form.timeout.label'), :hint => conditional_hint('call_forwards.form.timeout.hint') + + %div{:id => 'timeout_div'} + = f.input :timeout, :label => t('call_forwards.form.timeout.label'), :hint => conditional_hint('call_forwards.form.timeout.hint') = f.input :call_forwarding_destination , :as => :select, :collection => @call_forwarding_destinations, :label => t('call_forwards.form.call_forwarding_destination.label'), :hint => conditional_hint('call_forwards.form.call_forwarding_destination.hint'), :include_blank => false - = f.input :destination, :label => t('call_forwards.form.destination.label'), :hint => conditional_hint('call_forwards.form.destination.hint') + %div{:id => 'destination_phone_number_div'} + = f.input :destination, :label => t('call_forwards.form.destination_phone_number.label'), :hint => conditional_hint('call_forwards.form.destination_phone_number.hint'), :input_html => { :id => 'destination_phone_number', :value => @destination_phone_number } + - if @available_greetings.any? + %div{:id => 'destination_greeting_div'} + = f.input :destination, :as => :select, :collection => @available_greetings, :label => t('call_forwards.form.destination_greeting.label'), :hint => conditional_hint('call_forwards.form.destination_greeting.hint'), :input_html => { :id => 'destination_greeting' } - = f.input :source, :label => t('call_forwards.form.source.label'), :hint => conditional_hint('call_forwards.form.source.hint') = f.input :active, :label => t('call_forwards.form.active.label'), :hint => conditional_hint('call_forwards.form.active.hint') + + = f.input :source, :label => t('call_forwards.form.source.label'), :hint => conditional_hint('call_forwards.form.source.hint') diff --git a/app/views/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml index 3c57405..ab8873b 100644 --- a/app/views/call_forwards/_index_core.html.haml +++ b/app/views/call_forwards/_index_core.html.haml @@ -22,7 +22,7 @@ - if call_forward.destinationable_type %br = call_forward.destinationable_type - - if call_forward.destinationable_id + - if Module.constants.include?(call_forward.destinationable_type.to_sym) = ": #{call_forward.destinationable}" %td= call_forward.source =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.call_forwardable, :child => call_forward} diff --git a/app/views/call_forwards/show.html.haml b/app/views/call_forwards/show.html.haml index ad9ab16..fdd5197 100644 --- a/app/views/call_forwards/show.html.haml +++ b/app/views/call_forwards/show.html.haml @@ -10,6 +10,8 @@ %strong= t('call_forwards.show.destination') + ":" - if @call_forward.destinationable_id && @call_forward.destinationable = "#{@call_forward.destinationable_type}: #{@call_forward.destinationable}" + - if !@call_forward.destination.blank? + = "(#{@call_forward.destination})" - elsif !@call_forward.destinationable_type.blank? = "#{@call_forward.destinationable_type}: #{@call_forward.destination}" - else |