From 8fdc1332bbff9c23400459dc7018cba147279cc5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 21:21:49 +0100 Subject: Added %thead and %tbody to the tables. --- app/views/sip_accounts/_index_core.html.haml | 47 ++++++++++++++-------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index 8d9791d..ff09c37 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -1,26 +1,27 @@ %table{:class => 'table table-striped'} - %tr - %th= t('sip_accounts.index.online') - %th= t('sip_accounts.index.caller_name') - %th= t('sip_accounts.index.phone_numbers') - %th= t('phones.name') - %th{:colspan => '3'} - - - for sip_account in sip_accounts + %thead %tr - %td - - if sip_account.registration - %i.icon-ok - - else - %i.icon-thumbs-down - %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) + %th= t('sip_accounts.index.online') + %th= t('sip_accounts.index.caller_name') + %th= t('sip_accounts.index.phone_numbers') + %th= t('phones.name') - %td - - sip_account.phones.each do |phone| - = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone ) - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account} \ No newline at end of file + %tbody + - for sip_account in sip_accounts + %tr + %td + - if sip_account.registration + %i.icon-ok + - else + %i.icon-thumbs-down + %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) + + %td + - sip_account.phones.each do |phone| + = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone ) + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account} \ No newline at end of file -- cgit v1.2.3 From 7c842dd79b3ac4a8bd462ef80ee1e27f5e74e4d3 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 23:46:57 +0100 Subject: Optimized views for phones. --- app/views/sip_accounts/_index_core.html.haml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index ff09c37..e94db83 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -1,10 +1,16 @@ %table{:class => 'table table-striped'} %thead %tr - %th= t('sip_accounts.index.online') + %th + %span.hidden-phone + = t('sip_accounts.index.online') %th= t('sip_accounts.index.caller_name') - %th= t('sip_accounts.index.phone_numbers') - %th= t('phones.name') + %th + %span.hidden-phone + = t('sip_accounts.index.phone_numbers') + %th + %span.hidden-phone + = t('phones.name') %tbody - for sip_account in sip_accounts @@ -22,6 +28,7 @@ = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number) %td - - sip_account.phones.each do |phone| - = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone ) + %span.hidden-phone + - sip_account.phones.each do |phone| + = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone ) =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account} \ No newline at end of file -- cgit v1.2.3 From d14b99c32f0c6a88298c9bed1d91b7fec0fb04b5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 11:27:21 +0100 Subject: UI improvements. --- app/views/sip_accounts/show.html.haml | 86 ++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 32 deletions(-) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 4f6244f..c90bb81 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -1,37 +1,59 @@ - content_for :title, t("sip_accounts.show.page_title") -%p - %strong= t('sip_accounts.show.auth_name') + ":" - = @sip_account.auth_name -%p - %strong= t('sip_accounts.show.caller_name') + ":" - = @sip_account.caller_name -%p - %strong= t('sip_accounts.show.password') + ":" - = @sip_account.password -%p - %strong= t('sip_accounts.show.call_waiting') + ":" - = @sip_account.call_waiting -%p - %strong= t('sip_accounts.show.clir') + ":" - = @sip_account.clir -%p - %strong= t('sip_accounts.show.clip_no_screening') + ":" - = @sip_account.clip_no_screening -%p - %strong= t('sip_accounts.show.hotdeskable') + ":" - = @sip_account.hotdeskable -%p - %strong= t('sip_accounts.show.callforward_rules_act_per_sip_account') + ":" - = @sip_account.callforward_rules_act_per_sip_account -- if @sip_account.registration.try(:network_ip) && @sip_account.registration.try(:network_port) - %p - %strong= t('sip_accounts.show.registration') + ":" - = "#{@sip_account.registration.network_ip}:#{@sip_account.registration.network_port}" -- if @sip_account.registration.try(:expires) - %p - %strong= t('sip_accounts.show.expires') + ":" - = "#{@sip_account.registration.try(:expires) - Time.now.to_i} s" +%table{:class => 'table table-striped'} + %tbody + %tr + %td + %strong= t('sip_accounts.show.caller_name') + ":" + %td + = @sip_account.caller_name + %tr + %td + %strong= t('sip_accounts.show.auth_name') + ":" + %td + = @sip_account.auth_name + %tr + %td + %strong= t('sip_accounts.show.password') + ":" + %td + = @sip_account.password + %tr + %td + %strong= t('sip_accounts.show.call_waiting') + ":" + %td + = @sip_account.call_waiting + %tr + %td + %strong= t('sip_accounts.show.clir') + ":" + %td + = @sip_account.clir + %tr + %td + %strong= t('sip_accounts.show.clip_no_screening') + ":" + %td + = @sip_account.clip_no_screening + %tr + %td + %strong= t('sip_accounts.show.hotdeskable') + ":" + %td + = @sip_account.hotdeskable + %tr + %td + %strong= t('sip_accounts.show.callforward_rules_act_per_sip_account') + ":" + %td + = @sip_account.callforward_rules_act_per_sip_account + - if @sip_account.registration.try(:network_ip) && @sip_account.registration.try(:network_port) + %tr + %td + %strong= t('sip_accounts.show.registration') + ":" + %td + = "#{@sip_account.registration.network_ip}:#{@sip_account.registration.network_port}" + - if @sip_account.registration.try(:expires) + %tr + %td + %strong= t('sip_accounts.show.expires') + ":" + %td + = "#{@sip_account.registration.try(:expires) - Time.now.to_i} s" = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account } -- cgit v1.2.3 From e84e82032813b7acd71f8073d00f57e1cd65eb7c Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 17:36:33 +0100 Subject: Fixed I18n bug. --- app/views/sip_accounts/_index_core.html.haml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index e94db83..bc1555f 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -8,9 +8,10 @@ %th %span.hidden-phone = t('sip_accounts.index.phone_numbers') - %th - %span.hidden-phone - = t('phones.name') + - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true) + %th + %span.hidden-phone + = t('phones.name') %tbody - for sip_account in sip_accounts @@ -26,9 +27,9 @@ %td - if sip_account.phone_numbers.count > 0 = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number) - - %td - %span.hidden-phone - - sip_account.phones.each do |phone| - = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone ) - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account} \ No newline at end of file + - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true) + %td + %span.hidden-phone + - sip_account.phones.each do |phone| + = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone ) + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account} -- cgit v1.2.3 From 5c9968de4770ef2383ce62a3f9e21054aa9e1db7 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:02:08 +0100 Subject: Better user experience for SipAccount#new. --- app/views/sip_accounts/_form_core.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml index 495ae84..1b96d27 100644 --- a/app/views/sip_accounts/_form_core.html.haml +++ b/app/views/sip_accounts/_form_core.html.haml @@ -1,7 +1,11 @@ .inputs - = f.input :auth_name, :as => :string, :label => t('sip_accounts.form.auth_name.label'), :hint => conditional_hint('sip_accounts.form.auth_name.hint') - = f.input :password, :as => :string, :label => t('sip_accounts.form.password.label'), :hint => conditional_hint('sip_accounts.form.password.hint') = f.input :caller_name, :as => :string, :label => t('sip_accounts.form.caller_name.label'), :hint => conditional_hint('sip_accounts.form.caller_name.hint'), :autofocus => true + - if @sip_account && @sip_account.new_record? + = f.hidden_field :auth_name + = f.hidden_field :password + - else + = f.input :auth_name, :as => :string, :label => t('sip_accounts.form.auth_name.label'), :hint => conditional_hint('sip_accounts.form.auth_name.hint') + = f.input :password, :as => :string, :label => t('sip_accounts.form.password.label'), :hint => conditional_hint('sip_accounts.form.password.hint') = f.input :voicemail_pin, :as => :string, :label => t('sip_accounts.form.voicemail_pin.label'), :hint => conditional_hint('sip_accounts.form.voicemail_pin.hint') = f.input :call_waiting, :label => t('sip_accounts.form.call_waiting.label'), :hint => conditional_hint('sip_accounts.form.call_waiting.hint') = f.input :clir, :label => t('sip_accounts.form.clir.label'), :hint => conditional_hint('sip_accounts.form.clir.hint') -- cgit v1.2.3 From af4a02e15a02481e23f9458ae0a430ec52c57417 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 15:13:35 +0100 Subject: UI --- app/views/sip_accounts/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index bc1555f..c01d06e 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -15,7 +15,7 @@ %tbody - for sip_account in sip_accounts - %tr + %tr{:class => (sip_account.registration ? '' : 'warning')} %td - if sip_account.registration %i.icon-ok -- cgit v1.2.3 From bb3d50c173a4dc0f88f102582eb107782c50858d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 19:50:38 +0100 Subject: HTML bugfix --- app/views/sip_accounts/show.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index c90bb81..65c0df4 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -46,14 +46,14 @@ %tr %td %strong= t('sip_accounts.show.registration') + ":" - %td - = "#{@sip_account.registration.network_ip}:#{@sip_account.registration.network_port}" + %td + = "#{@sip_account.registration.network_ip}:#{@sip_account.registration.network_port}" - if @sip_account.registration.try(:expires) %tr %td %strong= t('sip_accounts.show.expires') + ":" - %td - = "#{@sip_account.registration.try(:expires) - Time.now.to_i} s" + %td + = "#{@sip_account.registration.try(:expires) - Time.now.to_i} s" = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account } -- cgit v1.2.3 From 680073d4cf7619bddfb7f79ea9e538a33d9dcdee Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 20:11:45 +0100 Subject: Refactoring --- app/views/sip_accounts/_index_core.html.haml | 2 +- app/views/sip_accounts/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index c01d06e..34aac64 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 65c0df4..8c4aa7e 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -1,6 +1,6 @@ - content_for :title, t("sip_accounts.show.page_title") -%table{:class => 'table table-striped'} +%table.table.table-striped %tbody %tr %td -- cgit v1.2.3 From e905a61d1aa42629fa20837365dc879925d5204e Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 22:52:41 +0100 Subject: UI improvements. --- app/views/sip_accounts/show.html.haml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 8c4aa7e..c21b3f4 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -21,12 +21,12 @@ %td %strong= t('sip_accounts.show.call_waiting') + ":" %td - = @sip_account.call_waiting + = @sip_account.call_waiting == true ? t('simple_form.yes') : t('simple_form.no') %tr %td %strong= t('sip_accounts.show.clir') + ":" %td - = @sip_account.clir + = @sip_account.clir == true ? t('simple_form.yes') : t('simple_form.no') %tr %td %strong= t('sip_accounts.show.clip_no_screening') + ":" @@ -36,12 +36,13 @@ %td %strong= t('sip_accounts.show.hotdeskable') + ":" %td - = @sip_account.hotdeskable + = @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 + = @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 %td -- cgit v1.2.3 From 3e66e066c2f19a8b27233dff1abdf3908debae36 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 10:12:40 +0100 Subject: use sip_registration in sip_views --- app/views/sip_accounts/show.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/views/sip_accounts') diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index c21b3f4..72e10df 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -55,6 +55,13 @@ %strong= t('sip_accounts.show.expires') + ":" %td = "#{@sip_account.registration.try(:expires) - Time.now.to_i} s" + - if @sip_account.registration.try(:user_agent) + %tr + %td + %strong= t('sip_accounts.show.user_agent') + ":" + %td + = @sip_account.registration.try(:user_agent) + = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account } -- cgit v1.2.3