From f8e34e0e948352f18db9665b55c9848b1b71b512 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 17 Apr 2013 10:27:05 +0200 Subject: files view --- app/views/tenants/_admin_area.de.html.haml | 2 ++ app/views/tenants/_admin_area.en.html.haml | 4 +++- app/views/tenants/_generic_files.html.haml | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 app/views/tenants/_generic_files.html.haml (limited to 'app/views/tenants') diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml index 8acc95d..cfcbcf3 100644 --- a/app/views/tenants/_admin_area.de.html.haml +++ b/app/views/tenants/_admin_area.de.html.haml @@ -16,6 +16,8 @@ = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + = render :partial => 'generic_files', :locals => {:tenant => tenant} + .well %h2 Gemeinschaft Konfiguration = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} diff --git a/app/views/tenants/_admin_area.en.html.haml b/app/views/tenants/_admin_area.en.html.haml index c40e3ca..f0d1e56 100644 --- a/app/views/tenants/_admin_area.en.html.haml +++ b/app/views/tenants/_admin_area.en.html.haml @@ -16,6 +16,8 @@ = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + = render :partial => 'generic_files', :locals => {:tenant => tenant} + .well %h2 Gemeinschaft Configuration = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} @@ -42,4 +44,4 @@ = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} - = render :partial => 'table_of_backup_jobs', :locals => {:tenant => tenant, :backup_jobs => backup_jobs} \ No newline at end of file + = render :partial => 'table_of_backup_jobs', :locals => {:tenant => tenant, :backup_jobs => backup_jobs} diff --git a/app/views/tenants/_generic_files.html.haml b/app/views/tenants/_generic_files.html.haml new file mode 100644 index 0000000..1b6fee5 --- /dev/null +++ b/app/views/tenants/_generic_files.html.haml @@ -0,0 +1,5 @@ +-# Files +-# +%h2= t('generic_files.index.page_title') += render "generic_files/index_core", :generic_files => tenant.generic_files += render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => GenericFile} \ No newline at end of file -- cgit v1.2.3 From 9a78a0b46509751f912275f8290b009d4a2221fc Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 19 Apr 2013 10:34:34 +0200 Subject: voicemai_accounts added to tenant view --- app/views/tenants/_admin_area.de.html.haml | 2 ++ app/views/tenants/_admin_area.en.html.haml | 2 ++ app/views/tenants/_table_of_voicemail_accounts.html.haml | 8 ++++++++ 3 files changed, 12 insertions(+) create mode 100644 app/views/tenants/_table_of_voicemail_accounts.html.haml (limited to 'app/views/tenants') diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml index cfcbcf3..8ca1e79 100644 --- a/app/views/tenants/_admin_area.de.html.haml +++ b/app/views/tenants/_admin_area.de.html.haml @@ -16,6 +16,8 @@ = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_voicemail_accounts', :locals => {:tenant => tenant} + = render :partial => 'generic_files', :locals => {:tenant => tenant} .well diff --git a/app/views/tenants/_admin_area.en.html.haml b/app/views/tenants/_admin_area.en.html.haml index f0d1e56..a10f75a 100644 --- a/app/views/tenants/_admin_area.en.html.haml +++ b/app/views/tenants/_admin_area.en.html.haml @@ -16,6 +16,8 @@ = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_voicemail_accounts', :locals => {:tenant => tenant} + = render :partial => 'generic_files', :locals => {:tenant => tenant} .well diff --git a/app/views/tenants/_table_of_voicemail_accounts.html.haml b/app/views/tenants/_table_of_voicemail_accounts.html.haml new file mode 100644 index 0000000..1cf455a --- /dev/null +++ b/app/views/tenants/_table_of_voicemail_accounts.html.haml @@ -0,0 +1,8 @@ +- cache(['table_of_pbx_features_voicemail_accounts_row', I18n.locale, tenant, tenant.voicemail_accounts.count, tenant.voicemail_accounts.reorder(:updated_at).last]) do + -# VoicemailAccounts + -# + - if (can?( :index, VoicemailAccount ) && tenant.voicemail_accounts.count > 0 ) || can?( :create, VoicemailAccount ) + %h2= t('voicemail_accounts.index.page_title') + - if can?( :index, VoicemailAccount ) && tenant.voicemail_accounts.count > 0 + = render "voicemail_accounts/index_core", :voicemail_accounts => tenant.voicemail_accounts + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => VoicemailAccount} -- cgit v1.2.3 From 819978b3d4abffdd49bc5adec47746486d5153a2 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 19 Apr 2013 10:44:31 +0200 Subject: groups added to tenant view --- app/views/tenants/_admin_area.de.html.haml | 2 ++ app/views/tenants/_admin_area.en.html.haml | 3 +++ app/views/tenants/_table_of_groups.html.haml | 8 ++++++++ 3 files changed, 13 insertions(+) create mode 100644 app/views/tenants/_table_of_groups.html.haml (limited to 'app/views/tenants') diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml index 8ca1e79..db21c80 100644 --- a/app/views/tenants/_admin_area.de.html.haml +++ b/app/views/tenants/_admin_area.de.html.haml @@ -24,6 +24,8 @@ %h2 Gemeinschaft Konfiguration = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_groups', :locals => {:tenant => tenant} + %p Das System kann = PhoneModel.count diff --git a/app/views/tenants/_admin_area.en.html.haml b/app/views/tenants/_admin_area.en.html.haml index a10f75a..4b687af 100644 --- a/app/views/tenants/_admin_area.en.html.haml +++ b/app/views/tenants/_admin_area.en.html.haml @@ -12,6 +12,7 @@ = render :partial => 'tenants/table_of_automatic_call_distributors', :locals => {:tenant => tenant} = render :partial => 'tenants/users_table', :locals => {:tenant => tenant} + = render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant} = render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} @@ -24,6 +25,8 @@ %h2 Gemeinschaft Configuration = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_groups', :locals => {:tenant => tenant} + %p This system can provision a total of = PhoneModel.count diff --git a/app/views/tenants/_table_of_groups.html.haml b/app/views/tenants/_table_of_groups.html.haml new file mode 100644 index 0000000..60f93cc --- /dev/null +++ b/app/views/tenants/_table_of_groups.html.haml @@ -0,0 +1,8 @@ +%h2= t("groups.index.page_title") + +- if Group.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = render "groups/index_core", :groups => Group.all + = render :partial => 'shared/create_link', :locals => {:child_class => Group} +- else + %p + = link_to t("groups.index.page_title"), groups_path -- cgit v1.2.3 From 6dc4eab14aad402d350e31aef2806b88bf457f84 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 11 Jun 2013 11:18:43 +0200 Subject: limit displayed phones --- app/views/tenants/_table_of_phones.html.haml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/views/tenants') diff --git a/app/views/tenants/_table_of_phones.html.haml b/app/views/tenants/_table_of_phones.html.haml index e87191d..820afc7 100644 --- a/app/views/tenants/_table_of_phones.html.haml +++ b/app/views/tenants/_table_of_phones.html.haml @@ -2,6 +2,9 @@ -# Phones -# %h2= t('phones.index.page_title') - - if tenant.phones.any? + - if @tenant.phones.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') = render "phones/index_core", :phones => tenant.phones - = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone} + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone} + - else + %p + = link_to t('phones.index.page_title'), tenant_phones_path(tenant) -- cgit v1.2.3 From 53fcf258f5dd86c81d6b2d7d58857e45481605b9 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 11 Jun 2013 11:18:57 +0200 Subject: limit displayed sip_accounts --- app/views/tenants/_table_of_sip_accounts.html.haml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/views/tenants') diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml index b2f2612..e0acbc2 100644 --- a/app/views/tenants/_table_of_sip_accounts.html.haml +++ b/app/views/tenants/_table_of_sip_accounts.html.haml @@ -19,6 +19,9 @@ -# SIP accounts -# %h2= t('sip_accounts.index.page_title') - - if tenant.sip_accounts.any? + - if @tenant.sip_accounts.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts - = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount} + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount} + - else + %p + = link_to t('sip_accounts.index.page_title'), tenant_sip_accounts_path(tenant) -- cgit v1.2.3 From 0d795581c63dcbeccb5a10e1e4c2f5bacfe4723c Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 11 Jun 2013 11:19:40 +0200 Subject: i18n --- app/views/tenants/_users_table.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/tenants') diff --git a/app/views/tenants/_users_table.html.haml b/app/views/tenants/_users_table.html.haml index 850ea5e..099b27a 100644 --- a/app/views/tenants/_users_table.html.haml +++ b/app/views/tenants/_users_table.html.haml @@ -4,4 +4,4 @@ = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => User} - else %p - = link_to "Liste aller User.", tenant_users_path(tenant) \ No newline at end of file + = link_to t('users.index.page_title'), tenant_users_path(tenant) -- cgit v1.2.3 From 525aaf6dcb5bafe5a949a078dee6abb24d87e2a5 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 13 Jun 2013 11:21:07 +0200 Subject: display tenant and user sip_accounts combined --- app/views/tenants/_table_of_sip_accounts.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/views/tenants') diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml index e0acbc2..4a1d570 100644 --- a/app/views/tenants/_table_of_sip_accounts.html.haml +++ b/app/views/tenants/_table_of_sip_accounts.html.haml @@ -5,7 +5,7 @@ -# %h2= t('sip_accounts.index.page_title') - if tenant.sip_accounts.any? - = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts + = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts, :show_sip_accountable => true = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount} .span8 @@ -18,9 +18,10 @@ .span12 -# SIP accounts -# + - sip_accounts = @tenant.tenant_user_sip_accounts %h2= t('sip_accounts.index.page_title') - - if @tenant.sip_accounts.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') - = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts + - if sip_accounts.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = render "sip_accounts/index_core", :sip_accounts => sip_accounts, :show_sip_accountable => true = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount} - else %p -- cgit v1.2.3 From 23b112aee1979033c58735b1a028cd92210cec09 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 13 Jun 2013 11:21:32 +0200 Subject: display tenant and user phones combined --- app/views/tenants/_table_of_phones.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/views/tenants') diff --git a/app/views/tenants/_table_of_phones.html.haml b/app/views/tenants/_table_of_phones.html.haml index 820afc7..9736ece 100644 --- a/app/views/tenants/_table_of_phones.html.haml +++ b/app/views/tenants/_table_of_phones.html.haml @@ -1,9 +1,10 @@ -- cache(['tenant_show_table_of_phones', I18n.locale, tenant, tenant.phones.count, tenant.phones.reorder(:updated_at).last]) do +- phones = @tenant.tenant_user_phones +- cache(['tenant_show_table_of_phones', I18n.locale, tenant, phones.count, phones.reorder(:updated_at).last]) do -# Phones -# %h2= t('phones.index.page_title') - - if @tenant.phones.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') - = render "phones/index_core", :phones => tenant.phones + - if phones.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = render "phones/index_core", :phones => phones, :show_phoneable => true = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone} - else %p -- cgit v1.2.3