summaryrefslogtreecommitdiff
path: root/app/views/tenants
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-22 00:04:03 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-22 00:04:03 +0100
commitab63774d954fe1f967a97ffe5a0a66016eca2257 (patch)
treeb3974a58deabe6a989ad7352f10e75d7495cb0c5 /app/views/tenants
parent495bbfdf78206c8adaec057e83900dda6754092c (diff)
parentf8bc860750f06ab95f9ced8e919e846d3e589819 (diff)
Merge branch 'tb-css' into develop
Diffstat (limited to 'app/views/tenants')
-rw-r--r--app/views/tenants/_admin_area.html.haml6
-rw-r--r--app/views/tenants/_call_routes.html.haml2
-rw-r--r--app/views/tenants/_gs_parameter_table.html.haml12
-rw-r--r--app/views/tenants/_index_core.html.haml6
-rw-r--r--app/views/tenants/_sip_accounts_and_phones.html.haml8
-rw-r--r--app/views/tenants/_table_of_functions.html.haml21
-rw-r--r--app/views/tenants/edit.html.haml2
-rw-r--r--app/views/tenants/index.html.haml2
-rw-r--r--app/views/tenants/new.html.haml2
-rw-r--r--app/views/tenants/show.html.haml2
10 files changed, 32 insertions, 31 deletions
diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml
index 7e7e46b..627f221 100644
--- a/app/views/tenants/_admin_area.html.haml
+++ b/app/views/tenants/_admin_area.html.haml
@@ -19,13 +19,13 @@
- Manufacturer.all.each do |manufacturer|
- if manufacturer != Manufacturer.last && manufacturer != Manufacturer.limit(Manufacturer.count - 1).last
= succeed ', ' do
- =link_to manufacturer, manufacturer_path(manufacturer)
+ =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 manufacturer, manufacturer_path(manufacturer)
+ =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
- else
= succeed '.' do
- =link_to manufacturer, manufacturer_path(manufacturer)
+ =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
= render :partial => 'call_routes', :locals => {:tenant => tenant}
diff --git a/app/views/tenants/_call_routes.html.haml b/app/views/tenants/_call_routes.html.haml
index 41066ae..28f84bf 100644
--- a/app/views/tenants/_call_routes.html.haml
+++ b/app/views/tenants/_call_routes.html.haml
@@ -5,4 +5,4 @@
= render :partial => 'shared/create_link', :locals => {:child_class => CallRoute}
- else
%p
- = link_to t("call_routes.index.page_title"), call_routes_path \ No newline at end of file
+ = link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + t("call_routes.index.page_title"), call_routes_path \ No newline at end of file
diff --git a/app/views/tenants/_gs_parameter_table.html.haml b/app/views/tenants/_gs_parameter_table.html.haml
index 94c44e5..8afdb0e 100644
--- a/app/views/tenants/_gs_parameter_table.html.haml
+++ b/app/views/tenants/_gs_parameter_table.html.haml
@@ -1,6 +1,6 @@
- cache(['gs_parameters_tenant_overview_table', I18n.locale, tenant, GuiFunction.count, GuiFunction.reorder(:updated_at).last, GsParameter.count, GsParameter.reorder(:updated_at).last]) do
- %table
- %tr{:class => 'even'}
+ %table{:class => 'table table-striped'}
+ %tr
%th
Funktion
%th
@@ -8,17 +8,17 @@
%th
Letztes Update
- %tr{:class => 'odd'}
+ %tr
%td
= t("gui_functions.name")
%td
- = link_to GuiFunction.count.to_s, gui_functions_path
+ = link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + GuiFunction.count.to_s, gui_functions_path
%td
= l GuiFunction.reorder(:updated_at).last.updated_at, :format => :short
- %tr{:class => 'even'}
+ %tr
%td
= t("gs_parameters.name")
%td
- = link_to GsParameter.count.to_s, gs_parameters_path
+ = link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + GsParameter.count.to_s, gs_parameters_path
%td
= l GsParameter.reorder(:updated_at).last.updated_at, :format => :short
diff --git a/app/views/tenants/_index_core.html.haml b/app/views/tenants/_index_core.html.haml
index 60afeee..721d624 100644
--- a/app/views/tenants/_index_core.html.haml
+++ b/app/views/tenants/_index_core.html.haml
@@ -1,11 +1,11 @@
-%table
+%table{:class => 'table table-striped'}
%tr
%th= t('tenants.index.name')
%th= t('tenants.index.description')
- - reset_cycle
+
- for tenant in tenants
- %tr{:class => cycle('odd', 'even')}
+ %tr
%td= tenant.name
%td= tenant.description
%td
diff --git a/app/views/tenants/_sip_accounts_and_phones.html.haml b/app/views/tenants/_sip_accounts_and_phones.html.haml
index 4b84b1c..bcc2dd6 100644
--- a/app/views/tenants/_sip_accounts_and_phones.html.haml
+++ b/app/views/tenants/_sip_accounts_and_phones.html.haml
@@ -1,12 +1,12 @@
-%table
- %tr{:class => 'even'}
+%table{:class => 'table table-striped'}
+ %tr
%th
%th= t("sip_accounts.index.page_title")
%th= t("phones.index.page_title")
- cache(['tenant_show_admin_area_sip_accounts_and_phones_row', I18n.locale, @tenant, @tenant.sip_accounts.count, @tenant.sip_accounts.reorder(:updated_at).last, @tenant.phones.count, @tenant.phones.reorder(:updated_at).last]) do
- %tr{:class => 'odd'}
+ %tr
%td= tenant
- cache(['tenant_show_admin_area_sip_accounts_table_cell', I18n.locale, @tenant, @tenant.sip_accounts.count, @tenant.sip_accounts.reorder(:updated_at).last]) do
%td
@@ -33,7 +33,7 @@
= link_to "#{phone.phone_model.to_s} (#{phone.pretty_mac_address})#{(phone.ip_address.blank? ? '' : " - #{phone.ip_address}")}", tenant_phone_path(tenant, phone)
= render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone}
- %tr{:class => 'even'}
+ %tr
%td= t("users.index.page_title")
%td
- if tenant.users_sip_accounts.any?
diff --git a/app/views/tenants/_table_of_functions.html.haml b/app/views/tenants/_table_of_functions.html.haml
index 957687b..d7af224 100644
--- a/app/views/tenants/_table_of_functions.html.haml
+++ b/app/views/tenants/_table_of_functions.html.haml
@@ -1,51 +1,52 @@
- cache(['table_of_pbx_features', I18n.locale, tenant, tenant.callthroughs.count, tenant.callthroughs.reorder(:updated_at).last, tenant.conferences.count, tenant.conferences.reorder(:updated_at).last, tenant.hunt_groups.count, tenant.hunt_groups.reorder(:updated_at).last, tenant.automatic_call_distributors.count, tenant.automatic_call_distributors.reorder(:updated_at).last]) do
- %table
- %tr{:class => 'even'}
+ %table{:class => 'table table-striped'}
+ %tr
%th
Funktion
%th
Anzahl
%th
- cache(['table_of_pbx_features_callthroughs_row', I18n.locale, tenant, tenant.callthroughs.count, tenant.callthroughs.reorder(:updated_at).last]) do
- %tr{:class => 'odd'}
+ %tr
%td
= t("callthroughs.name")
%td
- if tenant.callthroughs.any?
- = link_to tenant.callthroughs.count.to_s, tenant_callthroughs_path(tenant)
+ = link_to Haml::Engine.new("%i.icon-list").render + ' ' + tenant.callthroughs.count.to_s, tenant_callthroughs_path(tenant)
- else
= '-'
%td
= render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Callthrough}
- cache(['table_of_pbx_features_conferences_row', I18n.locale, tenant, tenant.conferences.count, tenant.conferences.reorder(:updated_at).last]) do
- %tr{:class => 'even'}
+ %tr
%td
= t("conferences.name")
%td
- if tenant.conferences.any?
- = link_to tenant.conferences.count.to_s, tenant_conferences_path(tenant)
+
+ = link_to Haml::Engine.new("%i.icon-list").render + ' ' + tenant.conferences.count.to_s, tenant_conferences_path(tenant)
- else
= '-'
%td
= render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Conference}
- cache(['table_of_pbx_features_hunt_groups_row', I18n.locale, tenant, tenant.hunt_groups.count, tenant.hunt_groups.reorder(:updated_at).last]) do
- %tr{:class => 'odd'}
+ %tr
%td
= t("hunt_groups.name")
%td
- if tenant.hunt_groups.any?
- = link_to tenant.hunt_groups.count.to_s, tenant_hunt_groups_path(tenant)
+ = link_to Haml::Engine.new("%i.icon-list").render + ' ' + tenant.hunt_groups.count.to_s, tenant_hunt_groups_path(tenant)
- else
= '-'
%td
= render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => HuntGroup}
- cache(['table_of_pbx_features_automatic_call_distributors_row', I18n.locale, tenant, tenant.automatic_call_distributors.count, tenant.automatic_call_distributors.reorder(:updated_at).last]) do
- %tr{:class => 'even'}
+ %tr
%td
= t("automatic_call_distributors.name")
%td
- if tenant.automatic_call_distributors.any?
- = link_to tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(tenant)
+ = link_to Haml::Engine.new("%i.icon-list").render + ' ' + tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(tenant)
- else
= '-'
%td
diff --git a/app/views/tenants/edit.html.haml b/app/views/tenants/edit.html.haml
index 159f4fd..d2e837d 100644
--- a/app/views/tenants/edit.html.haml
+++ b/app/views/tenants/edit.html.haml
@@ -1,3 +1,3 @@
-- title t("tenants.edit.page_title", :resource => @tenant )
+- content_for :title, t("tenants.edit.page_title", :resource => @tenant )
= render "form"
diff --git a/app/views/tenants/index.html.haml b/app/views/tenants/index.html.haml
index 1783825..9404f17 100644
--- a/app/views/tenants/index.html.haml
+++ b/app/views/tenants/index.html.haml
@@ -1,4 +1,4 @@
-- title t("tenants.index.page_title")
+- content_for :title, t("tenants.index.page_title")
- if @tenants.count > 0
= render "index_core", :tenants => @tenants
diff --git a/app/views/tenants/new.html.haml b/app/views/tenants/new.html.haml
index dca3809..d57ae36 100644
--- a/app/views/tenants/new.html.haml
+++ b/app/views/tenants/new.html.haml
@@ -1,3 +1,3 @@
-- title t("tenants.new.page_title")
+- content_for :title, t("tenants.new.page_title")
= render "form"
diff --git a/app/views/tenants/show.html.haml b/app/views/tenants/show.html.haml
index 9b9d4ec..53d3307 100644
--- a/app/views/tenants/show.html.haml
+++ b/app/views/tenants/show.html.haml
@@ -1,4 +1,4 @@
-- title @tenant.name
+- content_for :title, @tenant.name
- if !@tenant.description.blank?
%p