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/phones/_index_core.html.haml | 27 ++++---- app/views/phones/show.html.haml | 122 +++++++++++++++++++-------------- 2 files changed, 86 insertions(+), 63 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index fc1ad19..b8efbe3 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -1,15 +1,16 @@ %table{:class => 'table table-striped'} - %tr - %th= t('phones.index.mac_address') - %th= t('phones.index.phone_model_id') - %th= t('phones.index.hot_deskable') - %th= t('phones.index.ip_address') - - - - for phone in phones + %thead %tr - %td= phone.pretty_mac_address - %td= phone.phone_model - %td= phone.hot_deskable - %td= phone.ip_address - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone} \ No newline at end of file + %th= t('phones.index.mac_address') + %th= t('phones.index.phone_model_id') + %th= t('phones.index.hot_deskable') + %th= t('phones.index.ip_address') + + %tbody + - for phone in phones + %tr + %td= phone.pretty_mac_address + %td= phone.phone_model + %td= phone.hot_deskable + %td= phone.ip_address + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone} \ No newline at end of file diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index faf4061..18e990c 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -1,52 +1,74 @@ - content_for :title, t("phones.show.page_title") -%p - %strong= t('phones.show.mac_address') + ":" - = @phone.pretty_mac_address -%p - %strong= t('phones.show.phone_model_id') + ":" - = @phone.phone_model - - if !@phone.phone_model.product_manual_homepage_url.blank? - (#{link_to t('phones.show.manual'), @phone.phone_model.product_manual_homepage_url}) -- if @phone.hot_deskable == true - %p - %strong= t('phones.show.hot_deskable') + ":" - = @phone.hot_deskable - %p - %strong= t('phones.show.fallback_sip_account_id') + ":" - = @phone.fallback_sip_account - -- if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') == true - %p - %strong= t('phones.show.nightly_reboot') + ":" - = @phone.nightly_reboot - -- if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0 - %p - %strong= t('phones.show.provisioning_key_active') + ":" - = @phone.provisioning_key_active -%p - %strong= t('phones.show.ip_address') + ":" - = @phone.ip_address - -- if @phone.ip_address.blank? && @phone.phone_model.manufacturer.ieee_name == 'SNOM Technology AG' - %p - Sollten Sie Ihren DHCP-Server noch nicht für das automatische Konfigurieren der GS5 Provisionierungs-URL konfiguriert haben, können Sie manuell in Ihrem Telefon die folgende Provisionierungs-URL eingeben. - %p - Das entsprechende Eingabefeld finden Sie unter - %br - Advanced -> Update -> Setting URL - %p - Das "{mac}" bitte genau so eingeben, es wird vom Telefon automatisch mit der eigenen MAC-Adresse befüllt: - %pre - = "http://#{GemeinschaftSetup.first.sip_domain.host}/settings-{mac}" - %p - Danach müssen Sie die Konfiguration abspeichern und das Telefon booten. - -= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } - -%h2= t("phones.sip_accounts.title") -- if @phone.phone_sip_accounts.count > 0 - = render "phone_sip_accounts/index_core", :phone_sip_accounts => @phone.phone_sip_accounts - -= render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => PhoneSipAccount} +.row + .span6 + %table + %tr + %td + %strong= t('phones.show.mac_address') + ":" + %td + = @phone.pretty_mac_address + %tr + %td + %strong= t('phones.show.phone_model_id') + ":" + %td + = @phone.phone_model + - if !@phone.phone_model.product_manual_homepage_url.blank? + (#{link_to t('phones.show.manual'), @phone.phone_model.product_manual_homepage_url}) + - if @phone.hot_deskable == true + %tr + %td + %strong= t('phones.show.hot_deskable') + ":" + %td + = @phone.hot_deskable + %tr + %td + %strong= t('phones.show.fallback_sip_account_id') + ":" + %td + = @phone.fallback_sip_account + + - if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') == true + %tr + %td + %strong= t('phones.show.nightly_reboot') + ":" + %td + = @phone.nightly_reboot + + - if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0 + %tr + %td + %strong= t('phones.show.provisioning_key_active') + ":" + %td + = @phone.provisioning_key_active + + %tr + %td + %strong= t('phones.show.ip_address') + ":" + %td + = @phone.ip_address + + = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } + + + .span6 + - if @phone.ip_address.blank? && @phone.phone_model.manufacturer.ieee_name == 'SNOM Technology AG' + %p + Sollten Sie Ihren DHCP-Server noch nicht für das automatische Konfigurieren der GS5 Provisionierungs-URL konfiguriert haben, können Sie manuell in Ihrem Telefon die folgende Provisionierungs-URL eingeben. + %p + Das entsprechende Eingabefeld finden Sie unter + %br + Advanced -> Update -> Setting URL + %p + Das "{mac}" bitte genau so eingeben, es wird vom Telefon automatisch mit der eigenen MAC-Adresse befüllt: + %pre + = "http://#{GemeinschaftSetup.first.sip_domain.host}/settings-{mac}" + %p + Danach müssen Sie die Konfiguration abspeichern und das Telefon booten. + +.row + .span12 + %h2= t("phones.sip_accounts.title") + - if @phone.phone_sip_accounts.count > 0 + = render "phone_sip_accounts/index_core", :phone_sip_accounts => @phone.phone_sip_accounts + + = render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => PhoneSipAccount} -- 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/phones/_index_core.html.haml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index b8efbe3..fa1c679 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -2,15 +2,25 @@ %thead %tr %th= t('phones.index.mac_address') - %th= t('phones.index.phone_model_id') - %th= t('phones.index.hot_deskable') - %th= t('phones.index.ip_address') + %th + %span.hidden-phone + = t('phones.index.phone_model_id') + %span.visible-phone + = truncate(t('phones.index.phone_model_id'), :length => 9) + %th + %span.hidden-phone + = t('phones.index.hot_deskable') + %th + %span.hidden-phone + = t('phones.index.ip_address') %tbody - for phone in phones %tr %td= phone.pretty_mac_address %td= phone.phone_model - %td= phone.hot_deskable + %td + %span.hidden-phone + = phone.hot_deskable %td= phone.ip_address =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone} \ 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/phones/show.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 18e990c..e197f4a 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -1,8 +1,8 @@ - content_for :title, t("phones.show.page_title") .row - .span6 - %table + .span5 + %table{:class => 'table table-striped'} %tr %td %strong= t('phones.show.mac_address') + ":" @@ -50,10 +50,10 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } - .span6 + .span7 - if @phone.ip_address.blank? && @phone.phone_model.manufacturer.ieee_name == 'SNOM Technology AG' %p - Sollten Sie Ihren DHCP-Server noch nicht für das automatische Konfigurieren der GS5 Provisionierungs-URL konfiguriert haben, können Sie manuell in Ihrem Telefon die folgende Provisionierungs-URL eingeben. + Sollten Sie Ihren DHCP-Server noch nicht für das automatische Konfigurieren der SIP-Telefone konfiguriert haben, können Sie manuell in Ihrem Telefon eine Provisionierungs-URL eingeben. %p Das entsprechende Eingabefeld finden Sie unter %br -- cgit v1.2.3 From bec4553238a69ac710ea28b90480dc3a2bde5539 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 11:47:49 +0100 Subject: Added screenshot example of how to configure the snom provisioning URL. --- app/views/phones/show.html.haml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/views/phones') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index e197f4a..97cb1a8 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -52,6 +52,11 @@ .span7 - if @phone.ip_address.blank? && @phone.phone_model.manufacturer.ieee_name == 'SNOM Technology AG' + %ul.thumbnails.pull-right + %li.span4 + %a.thumbnail{:href => "#{image_path('screenshots/set_provisioning_url_snom.png')}"} + =image_tag('screenshots/set_provisioning_url_snom.png', :alt => "Screenshot Set Provisionierungs-URL Snom WebGUI") + %p Sollten Sie Ihren DHCP-Server noch nicht für das automatische Konfigurieren der SIP-Telefone konfiguriert haben, können Sie manuell in Ihrem Telefon eine Provisionierungs-URL eingeben. %p -- cgit v1.2.3 From ca8989616c7f2edb5b8b4fb04c7a58feef24ad49 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 12:52:23 +0100 Subject: Add tooltips. --- app/views/phones/_index_core.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views/phones') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index fa1c679..af57792 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -21,6 +21,7 @@ %td= phone.phone_model %td %span.hidden-phone - = phone.hot_deskable + %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.hot_desk'), :'data-trigger' => 'hover'} + = phone.hot_deskable %td= phone.ip_address =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone} \ No newline at end of file -- 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/phones/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/phones') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 97cb1a8..b34bdcd 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -73,7 +73,7 @@ .row .span12 %h2= t("phones.sip_accounts.title") - - if @phone.phone_sip_accounts.count > 0 + - if @phone.phone_sip_accounts.any? = render "phone_sip_accounts/index_core", :phone_sip_accounts => @phone.phone_sip_accounts = render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => PhoneSipAccount} -- 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/phones/_index_core.html.haml | 2 +- app/views/phones/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index af57792..90920dd 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('phones.index.mac_address') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index b34bdcd..6bb8996 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -2,7 +2,7 @@ .row .span5 - %table{:class => 'table table-striped'} + %table.table.table-striped %tr %td %strong= t('phones.show.mac_address') + ":" -- cgit v1.2.3 From 63d392f39b44e143501ca06178c2e9b59f5053f5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 20:31:43 +0100 Subject: Colorcoded a not yet active phone. --- app/views/phones/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/phones') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index 90920dd..347b260 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -16,7 +16,7 @@ %tbody - for phone in phones - %tr + %tr{:class => (phone.ip_address.blank? ? 'warning' : '')} %td= phone.pretty_mac_address %td= phone.phone_model %td -- cgit v1.2.3 From d7777f71e78ae173e26af39c7c65243b4604d6e8 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 21:01:23 +0100 Subject: Added a tooltip. --- app/views/phones/_index_core.html.haml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index 347b260..9a865f0 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -22,6 +22,12 @@ %td %span.hidden-phone %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.hot_desk'), :'data-trigger' => 'hover'} - = phone.hot_deskable - %td= phone.ip_address + = phone.hot_deskable == true ? t('simple_form.yes') : t('simple_form.no') + + %td + - if phone.ip_address.blank? + %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.missing_ip_address'), :'data-trigger' => 'hover'} + = '-' + - else + = phone.ip_address =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone} \ No newline at end of file -- cgit v1.2.3 From 3793a53509007054f5f5f2eb00abaa404074f252 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 22:30:19 +0100 Subject: UI improvement. --- app/views/phones/show.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 6bb8996..2cf6f3c 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -41,11 +41,15 @@ %td = @phone.provisioning_key_active - %tr + %tr{:class => (@phone.ip_address.blank? ? 'warning' : '')} %td %strong= t('phones.show.ip_address') + ":" %td - = @phone.ip_address + - if @phone.ip_address.blank? + %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.missing_ip_address'), :'data-trigger' => 'hover'} + = '-' + - else + = @phone.ip_address = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } -- cgit v1.2.3 From 5e83f10c186d403a7dfe1d35afd1b64a5935a8ec Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 22:44:11 +0100 Subject: Display the user and password for the phone's WebGUI. --- app/views/phones/show.html.haml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 2cf6f3c..f56ae65 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -32,14 +32,14 @@ %td %strong= t('phones.show.nightly_reboot') + ":" %td - = @phone.nightly_reboot + = @phone.nightly_reboot == true ? t('simple_form.yes') : t('simple_form.no') - if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0 %tr %td %strong= t('phones.show.provisioning_key_active') + ":" %td - = @phone.provisioning_key_active + = @phone.provisioning_key_active == true ? t('simple_form.yes') : t('simple_form.no') %tr{:class => (@phone.ip_address.blank? ? 'warning' : '')} %td @@ -51,6 +51,20 @@ - else = @phone.ip_address + - if current_user.admin? && (!@phone.http_user.blank? || !@phone.http_password.blank?) + %tr + %td + %strong= t('phones.show.http_user') + ":" + %td + = @phone.http_user + + %tr + %td + %strong= t('phones.show.http_password') + ":" + %td + = @phone.http_password + + = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } -- cgit v1.2.3 From e758cec9a842e75abe0a26312c4d7d3e8530b84a Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 27 Jan 2013 11:18:53 +0100 Subject: Provide a link to the phone's WebGUI which includes the http user and password. --- app/views/phones/show.html.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/views/phones') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index f56ae65..86ac380 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -49,7 +49,10 @@ %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.missing_ip_address'), :'data-trigger' => 'hover'} = '-' - else - = @phone.ip_address + - if current_user.admin? + = link_to @phone.ip_address, "http://#{@phone.http_user}:#{@phone.http_password}@#{@phone.ip_address}" + - else + = @phone.ip_address - if current_user.admin? && (!@phone.http_user.blank? || !@phone.http_password.blank?) %tr @@ -64,7 +67,6 @@ %td = @phone.http_password - = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } -- cgit v1.2.3