summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-23 11:27:21 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-23 11:27:21 +0100
commitd14b99c32f0c6a88298c9bed1d91b7fec0fb04b5 (patch)
tree81c1d4a346a38303e26c5bc59546933273a0570b /app/views
parente4da52d673f12673614f7f9303ad384c77dbc37c (diff)
UI improvements.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/automatic_call_distributors/_index_core.html.haml12
-rw-r--r--app/views/automatic_call_distributors/show.html.haml95
-rw-r--r--app/views/gateways/_index_core.html.haml16
-rw-r--r--app/views/gateways/show.html.haml50
-rw-r--r--app/views/phones/show.html.haml8
-rw-r--r--app/views/sip_accounts/show.html.haml86
-rw-r--r--app/views/tenants/_admin_area.html.haml85
-rw-r--r--app/views/tenants/_table_of_phones.html.haml7
-rw-r--r--app/views/tenants/_table_of_sip_accounts.html.haml7
-rw-r--r--app/views/tenants/show.html.haml15
-rw-r--r--app/views/user_groups/show.html.haml28
11 files changed, 236 insertions, 173 deletions
diff --git a/app/views/automatic_call_distributors/_index_core.html.haml b/app/views/automatic_call_distributors/_index_core.html.haml
index 85790aa..3634ec4 100644
--- a/app/views/automatic_call_distributors/_index_core.html.haml
+++ b/app/views/automatic_call_distributors/_index_core.html.haml
@@ -8,12 +8,6 @@
%th= t('automatic_call_distributors.index.phone_numbers')
%th
%span.hidden-phone
- = t('automatic_call_distributors.index.max_callers')
- %th
- %span.hidden-phone
- = t('automatic_call_distributors.index.agent_timeout')
- %th
- %span.hidden-phone
= t('automatic_call_distributors.index.acd_agents')
%tbody
@@ -32,12 +26,6 @@
= render 'phone_numbers/listing', :phone_numbers => automatic_call_distributor.phone_numbers
%td
%span.hidden-phone
- = automatic_call_distributor.max_callers
- %td
- %span.hidden-phone
- = automatic_call_distributor.agent_timeout
- %td
- %span.hidden-phone
- if automatic_call_distributor.acd_agents.count > 3
= link_to automatic_call_distributor.acd_agents.count, automatic_call_distributor_acd_agents_path(automatic_call_distributor)
%br
diff --git a/app/views/automatic_call_distributors/show.html.haml b/app/views/automatic_call_distributors/show.html.haml
index c29f2df..b3eae2c 100644
--- a/app/views/automatic_call_distributors/show.html.haml
+++ b/app/views/automatic_call_distributors/show.html.haml
@@ -1,47 +1,60 @@
- content_for :title, t("automatic_call_distributors.show.page_title")
%table{:class => 'table table-striped'}
- %tr
- %th= t('automatic_call_distributors.show.name') + ":"
- %td= @automatic_call_distributor.name
- %tr
- %th= t('automatic_call_distributors.show.strategy') + ":"
- %td= t("automatic_call_distributors.strategies.#{@automatic_call_distributor.strategy}")
- %tr
- %th= t('automatic_call_distributors.show.max_callers') + ":"
- %td= @automatic_call_distributor.max_callers
- %tr
- %th= t('automatic_call_distributors.show.agent_timeout') + ":"
- %td= @automatic_call_distributor.agent_timeout
- %tr
- %th= t('automatic_call_distributors.show.retry_timeout') + ":"
- %td= @automatic_call_distributor.retry_timeout
- %tr
- %th= t('automatic_call_distributors.show.join') + ":"
- %td= t("automatic_call_distributors.join_on.#{@automatic_call_distributor.join}")
- %tr
- %th= t('automatic_call_distributors.show.leave') + ":"
- %td= t("automatic_call_distributors.leave_on.#{@automatic_call_distributor.leave}")
-
- %tr
- %th= t('automatic_call_distributors.show.announce_position') + ":"
- %td= @automatic_call_distributor.announce_position
-
- %tr
- %th= t('automatic_call_distributors.show.announce_call_agents') + ":"
- %td= @automatic_call_distributor.announce_call_agents
-
- %tr
- %th= t('automatic_call_distributors.show.greeting') + ":"
- %td= @automatic_call_distributor.greeting
-
- %tr
- %th= t('automatic_call_distributors.show.goodbye') + ":"
- %td= @automatic_call_distributor.goodbye
-
- %tr
- %th= t('automatic_call_distributors.show.music') + ":"
- %td= @automatic_call_distributor.music
+ %tbody
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.name') + ":"
+ %td= @automatic_call_distributor.name
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.strategy') + ":"
+ %td= t("automatic_call_distributors.strategies.#{@automatic_call_distributor.strategy}")
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.max_callers') + ":"
+ %td= @automatic_call_distributor.max_callers
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.agent_timeout') + ":"
+ %td= @automatic_call_distributor.agent_timeout
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.retry_timeout') + ":"
+ %td= @automatic_call_distributor.retry_timeout
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.join') + ":"
+ %td= t("automatic_call_distributors.join_on.#{@automatic_call_distributor.join}")
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.leave') + ":"
+ %td= t("automatic_call_distributors.leave_on.#{@automatic_call_distributor.leave}")
+
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.announce_position') + ":"
+ %td= @automatic_call_distributor.announce_position
+
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.announce_call_agents') + ":"
+ %td= @automatic_call_distributor.announce_call_agents
+
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.greeting') + ":"
+ %td= @automatic_call_distributor.greeting
+
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.goodbye') + ":"
+ %td= @automatic_call_distributor.goodbye
+
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.music') + ":"
+ %td= @automatic_call_distributor.music
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @automatic_call_distributor.automatic_call_distributorable, :child => @automatic_call_distributor }
diff --git a/app/views/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml
index faa381d..bff25e0 100644
--- a/app/views/gateways/_index_core.html.haml
+++ b/app/views/gateways/_index_core.html.haml
@@ -3,18 +3,26 @@
%thead
%tr
%th= t('gateways.index.name')
- %th= t('gateways.index.technology')
+ %th
+ %span.hidden-phone
+ = t('gateways.index.technology')
%th= t('gateways.index.inbound')
%th= t('gateways.index.outbound')
- %th= t('gateways.index.description')
+ %th
+ %span.hidden-phone
+ = t('gateways.index.description')
%tbody
- for gateway in gateways
%tr
- cache(['gateway_single_table_row_within_tr', gateway, gateways.count]) do
%td= gateway.name
- %td= gateway.technology
+ %td
+ %span.hidden-phone
+ = gateway.technology
%td= gateway.inbound
%td= gateway.outbound
- %td= gateway.description
+ %td
+ %span.hidden-phone
+ = gateway.description
=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gateway} \ No newline at end of file
diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml
index 9a3e1c4..25cca87 100644
--- a/app/views/gateways/show.html.haml
+++ b/app/views/gateways/show.html.haml
@@ -1,23 +1,37 @@
- content_for :title, t("gateways.show.page_title")
-%p
- %strong= t('gateways.show.id') + ":"
- = @gateway.id
-%p
- %strong= t('gateways.show.name') + ":"
- = @gateway.name
-%p
- %strong= t('gateways.show.technology') + ":"
- = @gateway.technology
-%p
- %strong= t('gateways.show.inbound') + ":"
- = @gateway.inbound
-%p
- %strong= t('gateways.show.outbound') + ":"
- = @gateway.outbound
-%p
- %strong= t('gateways.show.description') + ":"
- = @gateway.description
+%table{:class => 'table table-striped'}
+ %tbody
+ %tr
+ %td
+ %strong= t('gateways.show.name') + ":"
+ %td
+ = @gateway.name
+ %tr
+ %td
+ %strong= t('gateways.show.id') + ":"
+ %td
+ = @gateway.id
+ %tr
+ %td
+ %strong= t('gateways.show.technology') + ":"
+ %td
+ = @gateway.technology
+ %tr
+ %td
+ %strong= t('gateways.show.inbound') + ":"
+ %td
+ = @gateway.inbound
+ %tr
+ %td
+ %strong= t('gateways.show.outbound') + ":"
+ %td
+ = @gateway.outbound
+ %tr
+ %td
+ %strong= t('gateways.show.description') + ":"
+ %td
+ = @gateway.description
= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gateway }
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
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 }
diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml
index 1a05264..369a8ce 100644
--- a/app/views/tenants/_admin_area.html.haml
+++ b/app/views/tenants/_admin_area.html.haml
@@ -1,49 +1,38 @@
--# SIP accounts
--#
-%h2= t('sip_accounts.index.page_title')
-- if tenant.sip_accounts.any?
- = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts
-= render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount}
--# Phones
--#
-%h2= t('phones.index.page_title')
-- if tenant.phones.any?
- = render "phones/index_core", :phones => tenant.phones
-= render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone}
-
-= render :partial => 'users_table', :locals => {:tenant => tenant}
-
-= render :partial => 'user_groups_table', :locals => {:tenant => tenant}
-
-= render :partial => 'tenants/table_of_conferences', :locals => {:tenant => tenant}
-
-= render :partial => 'tenants/table_of_callthroughs', :locals => {:tenant => tenant}
-
-= render :partial => 'tenants/table_of_hunt_groups', :locals => {:tenant => tenant}
-
-= render :partial => 'tenants/table_of_automatic_call_distributors', :locals => {:tenant => tenant}
-
-= render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant}
-
-%h2 Gemeinschaft Konfiguration
-= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant}
-
-%p
- Das System kann
- = PhoneModel.count
- verschiedene Telefonmodelle von den folgenden Herstellern verwalten:
- - Manufacturer.all.each do |manufacturer|
- - if manufacturer != Manufacturer.last && manufacturer != Manufacturer.limit(Manufacturer.count - 1).last
- = succeed ', ' do
- =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
- - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last
- = succeed ' und ' do
- =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
- - else
- = succeed '.' do
- =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
-
-= render :partial => 'call_routes', :locals => {:tenant => tenant}
-
-= render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} \ No newline at end of file
+.row
+ .span12
+ = render :partial => 'tenants/users_table', :locals => {:tenant => tenant}
+ = render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant}
+
+ = render :partial => 'tenants/table_of_sip_accounts', :locals => {:tenant => tenant}
+ = render :partial => 'tenants/table_of_phones', :locals => {:tenant => tenant}
+
+ = render :partial => 'tenants/table_of_conferences', :locals => {:tenant => tenant}
+ = render :partial => 'tenants/table_of_callthroughs', :locals => {:tenant => tenant}
+ = render :partial => 'tenants/table_of_hunt_groups', :locals => {:tenant => tenant}
+ = render :partial => 'tenants/table_of_automatic_call_distributors', :locals => {:tenant => tenant}
+
+ = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant}
+
+ .well
+ %h2 Gemeinschaft Konfiguration
+ = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant}
+
+ %p
+ Das System kann
+ = PhoneModel.count
+ verschiedene Telefonmodelle von den folgenden Herstellern verwalten:
+ - Manufacturer.all.each do |manufacturer|
+ - if manufacturer != Manufacturer.last && manufacturer != Manufacturer.limit(Manufacturer.count - 1).last
+ = succeed ', ' do
+ =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
+ - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last
+ = succeed ' und ' do
+ =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
+ - else
+ = succeed '.' do
+ =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
+
+ = render :partial => 'call_routes', :locals => {:tenant => tenant}
+
+ = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} \ No newline at end of file
diff --git a/app/views/tenants/_table_of_phones.html.haml b/app/views/tenants/_table_of_phones.html.haml
new file mode 100644
index 0000000..e87191d
--- /dev/null
+++ b/app/views/tenants/_table_of_phones.html.haml
@@ -0,0 +1,7 @@
+- cache(['tenant_show_table_of_phones', I18n.locale, tenant, tenant.phones.count, tenant.phones.reorder(:updated_at).last]) do
+ -# Phones
+ -#
+ %h2= t('phones.index.page_title')
+ - if tenant.phones.any?
+ = render "phones/index_core", :phones => tenant.phones
+ = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone}
diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml
new file mode 100644
index 0000000..32230b5
--- /dev/null
+++ b/app/views/tenants/_table_of_sip_accounts.html.haml
@@ -0,0 +1,7 @@
+- cache(['tenant_show_table_of_sip_accounts', I18n.locale, tenant, tenant.sip_accounts.count, tenant.sip_accounts.reorder(:updated_at).last]) do
+ -# SIP accounts
+ -#
+ %h2= t('sip_accounts.index.page_title')
+ - if tenant.sip_accounts.any?
+ = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts
+ = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount}
diff --git a/app/views/tenants/show.html.haml b/app/views/tenants/show.html.haml
index 53d3307..532d5d5 100644
--- a/app/views/tenants/show.html.haml
+++ b/app/views/tenants/show.html.haml
@@ -1,9 +1,16 @@
- content_for :title, @tenant.name
-- if !@tenant.description.blank?
- %p
- %strong= t('tenants.show.description') + ":"
- = @tenant.description
+%table{:class => 'table table-striped'}
+ %tbody
+ %tr
+ %td
+ %strong= t('tenants.show.name') + ":"
+ %td= @tenant.name
+ - if !@tenant.description.blank?
+ %tr
+ %td
+ %strong= t('tenants.show.description') + ":"
+ %td= @tenant.description
= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @tenant }
diff --git a/app/views/user_groups/show.html.haml b/app/views/user_groups/show.html.haml
index fe5b745..920f772 100644
--- a/app/views/user_groups/show.html.haml
+++ b/app/views/user_groups/show.html.haml
@@ -1,20 +1,28 @@
- content_for :title, t("user_groups.show.page_title")
-%p
- %strong= t('user_groups.show.name') + ":"
- = @user_group.name
-%p
- %strong= t('user_groups.show.description') + ":"
- = @user_group.description
-%p
- %strong= t('user_groups.show.tenant_id') + ":"
- = @user_group.tenant
+%table{:class => 'table table-striped'}
+ %tbody
+ %tr
+ %td
+ %strong= t('user_groups.show.name') + ":"
+ %td
+ = @user_group.name
+ %tr
+ %td
+ %strong= t('user_groups.show.description') + ":"
+ %td
+ = @user_group.description
+ %tr
+ %td
+ %strong= t('user_groups.show.tenant_id') + ":"
+ %td
+ = @user_group.tenant
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @user_group.tenant, :child => @user_group }
%h2=t("user_group_memberships.index.page_title")
-- if @user_group.user_group_memberships.count > 0
+- if @user_group.user_group_memberships.any?
= render "user_group_memberships/index_core", :user_group_memberships => @user_group.user_group_memberships
= render :partial => 'shared/create_link', :locals => {:parent => @user_group, :child_class => UserGroupMembership} \ No newline at end of file