summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/gateways/_index_core.html.haml34
-rw-r--r--app/views/tenants/_admin_area.de.html.haml32
-rw-r--r--app/views/tenants/_admin_area.html.haml24
-rw-r--r--app/views/tenants/show.html.haml4
4 files changed, 33 insertions, 61 deletions
diff --git a/app/views/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml
index 21414c3..dd2d1f5 100644
--- a/app/views/gateways/_index_core.html.haml
+++ b/app/views/gateways/_index_core.html.haml
@@ -1,17 +1,19 @@
-%table
- %tr
- %th= t('gateways.index.name')
- %th= t('gateways.index.technology')
- %th= t('gateways.index.inbound')
- %th= t('gateways.index.outbound')
- %th= t('gateways.index.description')
+- cache(['gateways_table', gateways.count, gateways.first, gateways.last]) do
+ %table
+ %tr
+ %th= t('gateways.index.name')
+ %th= t('gateways.index.technology')
+ %th= t('gateways.index.inbound')
+ %th= t('gateways.index.outbound')
+ %th= t('gateways.index.description')
- - reset_cycle
- - for gateway in gateways
- %tr{:class => cycle('odd', 'even')}
- %td= gateway.name
- %td= gateway.technology
- %td= gateway.inbound
- %td= gateway.outbound
- %td= gateway.description
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gateway} \ No newline at end of file
+ - reset_cycle
+ - for gateway in gateways
+ %tr{:class => cycle('odd', 'even')}
+ - cache(['gateway_single_table_row_within_tr', gateway, gateways.count]) do
+ %td= gateway.name
+ %td= gateway.technology
+ %td= gateway.inbound
+ %td= gateway.outbound
+ %td= gateway.description
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gateway} \ No newline at end of file
diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml
deleted file mode 100644
index 6a4bef9..0000000
--- a/app/views/tenants/_admin_area.de.html.haml
+++ /dev/null
@@ -1,32 +0,0 @@
-= render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => @tenant}
-
-= render :partial => 'users_table', :locals => {:tenant => @tenant}
-
-= render :partial => 'user_groups_table', :locals => {:tenant => @tenant}
-
-%h2 Features
-= render :partial => 'tenants/table_of_functions', :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 manufacturer, manufacturer_path(manufacturer)
- - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last
- = succeed ' und ' do
- =link_to manufacturer, manufacturer_path(manufacturer)
- - else
- = succeed '.' do
- =link_to manufacturer, manufacturer_path(manufacturer)
-
-= render :partial => 'call_routes', :locals => {:tenant => @tenant}
-
-= render :partial => 'gateways', :locals => {:tenant => @tenant} \ No newline at end of file
diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml
index b974c02..7e7e46b 100644
--- a/app/views/tenants/_admin_area.html.haml
+++ b/app/views/tenants/_admin_area.html.haml
@@ -1,30 +1,32 @@
-= render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => @tenant}
+= render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => tenant}
-= render :partial => 'users_table', :locals => {:tenant => @tenant}
+= render :partial => 'users_table', :locals => {:tenant => tenant}
-= render :partial => 'user_groups_table', :locals => {:tenant => @tenant}
+= render :partial => 'user_groups_table', :locals => {:tenant => tenant}
%h2 Features
-= render :partial => 'tenants/table_of_functions', :locals => {:tenant => @tenant}
+= render :partial => 'tenants/table_of_functions', :locals => {:tenant => tenant}
-= render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => @tenant}
+= render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant}
-%h2 Gemeinschaft Configuration
-= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => @tenant}
+%h2 Gemeinschaft Konfiguration
+= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant}
%p
- This system can setup
+ Das System kann
= PhoneModel.count
- different phone models from the manufacturers
+ 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 manufacturer, manufacturer_path(manufacturer)
- elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last
- = succeed ' and ' do
+ = succeed ' und ' do
=link_to manufacturer, manufacturer_path(manufacturer)
- else
= succeed '.' do
=link_to manufacturer, manufacturer_path(manufacturer)
-= render :partial => 'call_routes', :locals => {:tenant => @tenant} \ No newline at end of file
+= 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/show.html.haml b/app/views/tenants/show.html.haml
index f5cff5f..9b9d4ec 100644
--- a/app/views/tenants/show.html.haml
+++ b/app/views/tenants/show.html.haml
@@ -7,5 +7,5 @@
= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @tenant }
-- if @tenant.user_groups.where(:name => 'Admins').count > 0 && @tenant.user_groups.where(:name => 'Admins').first.users.include?(current_user)
- = render 'admin_area' \ No newline at end of file
+- if @tenant.user_groups.where(:name => 'Admins').any? && @tenant.user_groups.where(:name => 'Admins').first.users.include?(current_user)
+ = render :partial => 'admin_area', :locals => { :tenant => @tenant, :gateways => @gateways} \ No newline at end of file