summaryrefslogtreecommitdiff
path: root/app/views/phones
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/phones')
-rw-r--r--app/views/phones/_index_core.html.haml46
-rw-r--r--app/views/phones/show.html.haml147
2 files changed, 129 insertions, 64 deletions
diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml
index fc1ad19..9a865f0 100644
--- a/app/views/phones/_index_core.html.haml
+++ b/app/views/phones/_index_core.html.haml
@@ -1,15 +1,33 @@
-%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
+%table.table.table-striped
+ %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
+ %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{:class => (phone.ip_address.blank? ? 'warning' : '')}
+ %td= phone.pretty_mac_address
+ %td= phone.phone_model
+ %td
+ %span.hidden-phone
+ %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.hot_desk'), :'data-trigger' => 'hover'}
+ = 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
diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml
index faf4061..86ac380 100644
--- a/app/views/phones/show.html.haml
+++ b/app/views/phones/show.html.haml
@@ -1,52 +1,99 @@
- 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
+ .span5
+ %table.table.table-striped
+ %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 == 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 == true ? t('simple_form.yes') : t('simple_form.no')
+
+ %tr{:class => (@phone.ip_address.blank? ? 'warning' : '')}
+ %td
+ %strong= t('phones.show.ip_address') + ":"
+ %td
+ - if @phone.ip_address.blank?
+ %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.missing_ip_address'), :'data-trigger' => 'hover'}
+ = '-'
+ - else
+ - 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
+ %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 }
+
+
+ .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
+ 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.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}