diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-06-20 19:06:19 +0200 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-06-20 19:06:19 +0200 |
commit | eb0e1cc5c26275ff3e5c341404e8bc558f8312b8 (patch) | |
tree | 71f449ccd6f15422717de3ac24f87d5e888ddd79 /app/views/tenants | |
parent | df6e17e48995f25e72509986f30700d778b179b6 (diff) | |
parent | 3b27a5d45b12f6bac65da2a8e17387bfda42a2f1 (diff) |
Merge branch 'develop'
Diffstat (limited to 'app/views/tenants')
-rw-r--r-- | app/views/tenants/_admin_area.de.html.haml | 6 | ||||
-rw-r--r-- | app/views/tenants/_admin_area.en.html.haml | 9 | ||||
-rw-r--r-- | app/views/tenants/_generic_files.html.haml | 5 | ||||
-rw-r--r-- | app/views/tenants/_table_of_groups.html.haml | 8 | ||||
-rw-r--r-- | app/views/tenants/_table_of_phones.html.haml | 12 | ||||
-rw-r--r-- | app/views/tenants/_table_of_sip_accounts.html.haml | 12 | ||||
-rw-r--r-- | app/views/tenants/_table_of_voicemail_accounts.html.haml | 8 | ||||
-rw-r--r-- | app/views/tenants/_users_table.html.haml | 2 |
8 files changed, 52 insertions, 10 deletions
diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml index 8acc95d..db21c80 100644 --- a/app/views/tenants/_admin_area.de.html.haml +++ b/app/views/tenants/_admin_area.de.html.haml @@ -16,10 +16,16 @@ = 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 %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 c40e3ca..4b687af 100644 --- a/app/views/tenants/_admin_area.en.html.haml +++ b/app/views/tenants/_admin_area.en.html.haml @@ -12,14 +12,21 @@ = 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} + = render :partial => 'tenants/table_of_voicemail_accounts', :locals => {:tenant => tenant} + + = render :partial => 'generic_files', :locals => {:tenant => tenant} + .well %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 @@ -42,4 +49,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 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 diff --git a/app/views/tenants/_table_of_phones.html.haml b/app/views/tenants/_table_of_phones.html.haml index e87191d..9736ece 100644 --- a/app/views/tenants/_table_of_phones.html.haml +++ b/app/views/tenants/_table_of_phones.html.haml @@ -1,7 +1,11 @@ -- 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.any? - = render "phones/index_core", :phones => tenant.phones - = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone} + - 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 + = link_to t('phones.index.page_title'), tenant_phones_path(tenant) diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml index b2f2612..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,7 +18,11 @@ .span12 -# SIP accounts -# + - sip_accounts = @tenant.tenant_user_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} + - 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 + = link_to t('sip_accounts.index.page_title'), tenant_sip_accounts_path(tenant) 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} 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) |