summaryrefslogtreecommitdiff
path: root/app/views/sip_accounts
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/sip_accounts')
-rw-r--r--app/views/sip_accounts/_form_core.html.haml2
-rw-r--r--app/views/sip_accounts/_index_core.html.haml4
-rw-r--r--app/views/sip_accounts/show.html.haml19
3 files changed, 16 insertions, 9 deletions
diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml
index 1a09912..d7c65d0 100644
--- a/app/views/sip_accounts/_form_core.html.haml
+++ b/app/views/sip_accounts/_form_core.html.haml
@@ -13,6 +13,4 @@
- if @sip_account.sip_accountable_type == 'User'
= f.input :hotdeskable, :label => t('sip_accounts.form.hotdeskable.label'), :hint => conditional_hint('sip_accounts.form.hotdeskable.hint')
= f.input :clip_no_screening, :label => t('sip_accounts.form.clip_no_screening.label'), :hint => conditional_hint('sip_accounts.form.clip_no_screening.hint')
- - if CallForward.where(:call_forwardable_id => @sip_account.phone_number_ids, :call_forwardable_type => 'PhoneNumber').count == 0 || @sip_account.callforward_rules_act_per_sip_account == true
- = f.input :callforward_rules_act_per_sip_account, :label => t('sip_accounts.form.callforward_rules_act_per_sip_account.label'), :hint => conditional_hint('sip_accounts.form.callforward_rules_act_per_sip_account.hint')
= f.input :language_code, :collection => Language.all.collect{|l| [l.to_s, l.code]}, :label => t('sip_accounts.form.language_code.label'), :hint => conditional_hint('sip_accounts.form.language_id.hint'), :include_blank => false
diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml
index 34aac64..d98ea0a 100644
--- a/app/views/sip_accounts/_index_core.html.haml
+++ b/app/views/sip_accounts/_index_core.html.haml
@@ -20,13 +20,13 @@
- if sip_account.registration
%i.icon-ok
- else
- %i.icon-thumbs-down
+ %i.icon-ban-circle
%td
= sip_account.caller_name
- phone_numbers = sip_account.phone_numbers
%td
- if sip_account.phone_numbers.count > 0
- = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number)
+ = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:position)
- if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true)
%td
%span.hidden-phone
diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml
index 72e10df..ede5150 100644
--- a/app/views/sip_accounts/show.html.haml
+++ b/app/views/sip_accounts/show.html.haml
@@ -37,11 +37,6 @@
%strong= t('sip_accounts.show.hotdeskable') + ":"
%td
= @sip_account.hotdeskable == true ? t('simple_form.yes') : t('simple_form.no')
- %tr
- %td
- %strong= t('sip_accounts.show.callforward_rules_act_per_sip_account') + ":"
- %td
- = @sip_account.callforward_rules_act_per_sip_account == true ? t('simple_form.yes') : t('simple_form.no')
- if @sip_account.registration.try(:network_ip) && @sip_account.registration.try(:network_port)
%tr
@@ -65,6 +60,13 @@
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account }
+%p
+ %strong= t('ringtones.name') + ':'
+ - if @sip_account.ringtones.count > 0
+ = link_to @sip_account.ringtones.first, sip_account_ringtone_path(@sip_account, @sip_account.ringtones.first)
+ - else
+ = link_to t('ringtones.set_a_ringtone'), new_sip_account_ringtone_path(@sip_account)
+
- if @sip_account.phone_numbers.count > 0 || can?(:create, @sip_account.phone_numbers.build)
%h2= t('phone_numbers.index.page_title')
- if @sip_account.phone_numbers.count > 0
@@ -72,6 +74,13 @@
%br
= render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => PhoneNumber }
+- if @sip_account.call_forwards.count > 0 || can?(:create, @sip_account.call_forwards.build)
+ %h2= t('call_forwards.index.page_title')
+ - if @sip_account.call_forwards.count > 0
+ = render "call_forwards/index_core", :call_forwards => @sip_account.call_forwards
+ %br
+ = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => CallForward }
+
- if @sip_account.softkeys.count > 0 || can?(:create, @sip_account.softkeys.build)
%h2= t("softkeys.index.page_title")
- if @sip_account.softkeys.count > 0