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/tenants/_admin_area.html.haml | 85 ++++++++++------------ app/views/tenants/_table_of_phones.html.haml | 7 ++ app/views/tenants/_table_of_sip_accounts.html.haml | 7 ++ app/views/tenants/show.html.haml | 15 +++- 4 files changed, 62 insertions(+), 52 deletions(-) create mode 100644 app/views/tenants/_table_of_phones.html.haml create mode 100644 app/views/tenants/_table_of_sip_accounts.html.haml (limited to 'app/views/tenants') 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 } -- cgit v1.2.3