diff options
Diffstat (limited to 'app/views/tenants')
-rw-r--r-- | app/views/tenants/_admin_area.de.html.haml | 118 | ||||
-rw-r--r-- | app/views/tenants/_admin_area.html.haml | 126 | ||||
-rw-r--r-- | app/views/tenants/_call_routes.html.haml | 8 | ||||
-rw-r--r-- | app/views/tenants/_form.html.haml | 6 | ||||
-rw-r--r-- | app/views/tenants/_gateways.html.haml | 8 | ||||
-rw-r--r-- | app/views/tenants/_gs_parameter_table.html.haml | 24 | ||||
-rw-r--r-- | app/views/tenants/_index_core.html.haml | 6 | ||||
-rw-r--r-- | app/views/tenants/_sip_accounts_and_phones.html.haml | 68 | ||||
-rw-r--r-- | app/views/tenants/_table_of_functions.html.haml | 53 | ||||
-rw-r--r-- | app/views/tenants/_table_of_phone_books.html.haml | 8 | ||||
-rw-r--r-- | app/views/tenants/_user_groups_table.html.haml | 4 | ||||
-rw-r--r-- | app/views/tenants/_users_table.html.haml | 7 | ||||
-rw-r--r-- | app/views/tenants/edit.html.haml | 2 | ||||
-rw-r--r-- | app/views/tenants/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/tenants/new.html.haml | 2 | ||||
-rw-r--r-- | app/views/tenants/show.html.haml | 9 |
16 files changed, 213 insertions, 238 deletions
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 b9b47d5..0000000 --- a/app/views/tenants/_admin_area.de.html.haml +++ /dev/null @@ -1,118 +0,0 @@ -%p - Sie sind Mitglied der - = link_to 'Admin Gruppe', tenant_user_group_path(@tenant, @tenant.user_groups.find_by_name('Admins')) - und haben deshalb besondere Rechte. Aber wie Peter Parker schon sagte: "With great power comes great responsibility." - -%p - Dieser Mandant hat - = link_to pluralize(@tenant.user_groups.count, 'user group'), tenant_user_groups_path(@tenant) - - if @tenant.user_groups.count < 5 - = "(#{@tenant.user_groups.order(:name).map{|group| group.to_s }.join(', ')})" - die in Summe - = link_to pluralize(@tenant.users.count, 'user'), tenant_users_path(@tenant) - verwalten. - 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) - -%h3 SIP-Konten und Telefone - -%table - %tr{:class => 'even'} - %th - %th - = @tenant - %th - Alle Benutzer von - = "\"#{@tenant}\"" - %tr{:class => 'odd'} - %td - SIP-Konten - %td - = link_to @tenant.sip_accounts.count.to_s, tenant_sip_accounts_path(@tenant) - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => SipAccount} - %td= @tenant.users_sip_accounts.count.to_s - %tr{:class => 'even'} - %td - Telefone - %td - = link_to @tenant.phones.count.to_s, tenant_phones_path(@tenant) - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Phone} - %td= @tenant.users_phones.count.to_s - -%h3 Allgemein - -%table - %tr{:class => 'even'} - %th - Funktion - %th - Anzahl - %th - %tr{:class => 'odd'} - %td - Callthrough - %td - = link_to @tenant.callthroughs.count.to_s, tenant_callthroughs_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Callthrough} - %tr{:class => 'even'} - %td - Konferenzen - %td - = link_to @tenant.conferences.count.to_s, tenant_conferences_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Conference} - %tr{:class => 'odd'} - %td - Rufgruppen - %td - = link_to @tenant.hunt_groups.count.to_s, tenant_hunt_groups_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => HuntGroup} - %tr{:class => 'even'} - %td - Warteschleifen - %td - = link_to @tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => AutomaticCallDistributor} - %tr{:class => 'odd'} - %td - Oberflächen-Funktionen - %td - = link_to GuiFunction.count.to_s, gui_functions_path - %td - --# Phone books --# -- if GuiFunction.display?('show_phone_books_in_user_show_view', current_user) - - if can?( :index, PhoneBook ) - %h2=t("phone_books.index.page_title") - = render "phone_books/index_core", :phone_books => @tenant.phone_books - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneBook} - -- if STRICT_INTERNAL_EXTENSION_HANDLING == true - %h3= t('phone_number_ranges.index.page_title') - - - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(INTERNAL_EXTENSIONS).try(:phone_numbers).try(:count).to_i == 0 - Der Mandant - = "\"#{@tenant}\"" - wurde erst vor - = distance_of_time_in_words_to_now(@tenant.created_at) - erstellt. Es gibt immer noch nicht abgeschlossene - = pluralize(Delayed::Job.count, 'Hintergrundprozesse') - \. Bitte warten Sie noch ein paar Minuten und laden anschließend diese Seite erneut. - - else - =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => SERVICE_NUMBERS)) - =render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange} diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index d648143..627f221 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,116 +1,32 @@ -%p - You belong to the - = link_to 'admin group', tenant_user_group_path(@tenant, @tenant.user_groups.find_by_name('Admins')) - and therefore have super powers. But always remember Peter Parker's: "With great power comes great responsibility." += 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 - = succeed '.' do - This tenant has - = link_to pluralize(@tenant.user_groups.count, 'user group'), tenant_user_groups_path(@tenant) - - if @tenant.user_groups.count < 5 - = "(#{@tenant.user_groups.order(:name).map{|group| group.to_s }.join(', ')})" - which handle a total of - = link_to pluralize(@tenant.users.count, 'user'), tenant_users_path(@tenant) - 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) + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last - = succeed ' and ' do - =link_to manufacturer, manufacturer_path(manufacturer) + = succeed ' und ' do + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) - else = succeed '.' do - =link_to manufacturer, manufacturer_path(manufacturer) - -%h3 SIP-Accounts and Phones - -%table - %tr{:class => 'even'} - %th - %th - = @tenant - %th - All users of - = "\"#{@tenant}\"" - %tr{:class => 'odd'} - %td - SIP accounts - %td - = link_to @tenant.sip_accounts.count.to_s, tenant_sip_accounts_path(@tenant) - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => SipAccount} - %td= @tenant.users_sip_accounts.count.to_s - %tr{:class => 'even'} - %td - Phones - %td - = link_to @tenant.phones.count.to_s, tenant_phones_path(@tenant) - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Phone} - %td= @tenant.users_phones.count.to_s - -%h3 Misc - -%table - %tr{:class => 'even'} - %th - Feature - %th - Counter - %th - %tr{:class => 'odd'} - %td - Callthroughs - %td - = link_to @tenant.callthroughs.count.to_s, tenant_callthroughs_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Callthrough} - %tr{:class => 'even'} - %td - Conferences - %td - = link_to @tenant.conferences.count.to_s, tenant_conferences_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Conference} - %tr{:class => 'odd'} - %td - Hunt groups - %td - = link_to @tenant.hunt_groups.count.to_s, tenant_hunt_groups_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => HuntGroup} - %tr{:class => 'even'} - %td - ACDs - %td - = link_to @tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => AutomaticCallDistributor} - %tr{:class => 'odd'} - %td - GUI functions - %td - = link_to GuiFunction.count.to_s, gui_functions_path - %td - --# Phone books --# -- if GuiFunction.display?('show_phone_books_in_user_show_view', current_user) - - if can?( :index, PhoneBook ) - %h2=t("phone_books.index.page_title") - = render "phone_books/index_core", :phone_books => @tenant.phone_books - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneBook} + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) -- if STRICT_INTERNAL_EXTENSION_HANDLING == true - %h3= t('phone_number_ranges.index.page_title') += render :partial => 'call_routes', :locals => {:tenant => tenant} - - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(INTERNAL_EXTENSIONS).try(:phone_numbers).try(:count).to_i == 0 - This tenant was created - = distance_of_time_in_words_to_now(@tenant.created_at) - ago. There are still - = pluralize(Delayed::Job.count, 'background job') - not finished. This can take a couple of minutes. Please reload this page later. - - else - =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => SERVICE_NUMBERS)) - =render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange} += render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways}
\ No newline at end of file diff --git a/app/views/tenants/_call_routes.html.haml b/app/views/tenants/_call_routes.html.haml new file mode 100644 index 0000000..28f84bf --- /dev/null +++ b/app/views/tenants/_call_routes.html.haml @@ -0,0 +1,8 @@ +%h2= t("call_routes.index.page_title") + +- if CallRoute.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = render "call_routes/index_core", :call_routes => CallRoute.all + = render :partial => 'shared/create_link', :locals => {:child_class => CallRoute} +- else + %p + = 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/_form.html.haml b/app/views/tenants/_form.html.haml index 2ca8a69..1641e78 100644 --- a/app/views/tenants/_form.html.haml +++ b/app/views/tenants/_form.html.haml @@ -11,13 +11,13 @@ = f.input :from_field_voicemail_email, :label => t('tenants.form.from_field_voicemail_email.label'), :hint => conditional_hint('tenants.form.from_field_voicemail_email.hint') = f.input :from_field_pin_change_email, :label => t('tenants.form.from_field_pin_change_email.label'), :hint => conditional_hint('tenants.form.from_field_pin_change_email.hint') - - if STRICT_INTERNAL_EXTENSION_HANDLING == true || STRICT_DID_HANDLING == true + - if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == true || GsParameter.get('STRICT_DID_HANDLING') == true %h2= t('tenants.form.phone_numbers') %p= t('tenants.form.intro') - - if STRICT_INTERNAL_EXTENSION_HANDLING == true + - if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == true = f.input :internal_extension_ranges, :label => t('tenants.form.internal_extension_ranges.label'), :hint => conditional_hint('tenants.form.internal_extension_ranges.hint') - - if STRICT_DID_HANDLING == true + - if GsParameter.get('STRICT_DID_HANDLING') == true = f.input :did_list, :label => t('tenants.form.did_list.label'), :hint => conditional_hint('tenants.form.did_list.hint') .actions diff --git a/app/views/tenants/_gateways.html.haml b/app/views/tenants/_gateways.html.haml new file mode 100644 index 0000000..c861ad3 --- /dev/null +++ b/app/views/tenants/_gateways.html.haml @@ -0,0 +1,8 @@ +%h2= t("gateways.index.page_title") + +- if Gateway.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = render "gateways/index_core", :gateways => Gateway.all + = render :partial => 'shared/create_link', :locals => {:child_class => Gateway} +- else + %p + = link_to t("gateways.index.page_title"), gateways_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 new file mode 100644 index 0000000..8afdb0e --- /dev/null +++ b/app/views/tenants/_gs_parameter_table.html.haml @@ -0,0 +1,24 @@ +- 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{:class => 'table table-striped'} + %tr + %th + Funktion + %th + Anzahl + %th + Letztes Update + + %tr + %td + = t("gui_functions.name") + %td + = 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 + %td + = t("gs_parameters.name") + %td + = 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 new file mode 100644 index 0000000..bcc2dd6 --- /dev/null +++ b/app/views/tenants/_sip_accounts_and_phones.html.haml @@ -0,0 +1,68 @@ +%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 + %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 + - if tenant.sip_accounts.any? + - if tenant.sip_accounts.count > GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = link_to tenant.sip_accounts.count.to_s, tenant_sip_accounts_path(tenant) + - else + - tenant.sip_accounts.each do |sip_account| + = succeed ', ' do + =link_to "#{sip_account.caller_name}", tenant_sip_account_path(tenant,sip_account) + - if sip_account.phone_numbers.any? + = '[' + truncate(sip_account.phone_numbers.map{|phone_number| phone_number.to_s}.join(', '), :length => 25) + ']' + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount} + + - cache(['tenant_show_admin_area_phones_table_cell', I18n.locale, @tenant, @tenant.phones.count, @tenant.phones.reorder(:updated_at).last]) do + %td + - if tenant.phones.any? + - if tenant.phones.count > GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = link_to tenant.phones.count.to_s, tenant_phones_path(tenant) + - else + - cache(['tenant_show_tenant_phones', I18n.locale, tenant, tenant.phones]) do + - tenant.phones.each do |phone| + = succeed ', ' do + = 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 + %td= t("users.index.page_title") + %td + - if tenant.users_sip_accounts.any? + - if tenant.users_sip_accounts.count > GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = tenant.users_sip_accounts.count + - else + - tenant.users_sip_accounts.each do |sip_account| + - if sip_account != tenant.users_sip_accounts.last + = succeed ', ' do + =link_to "#{sip_account.caller_name}", user_sip_account_path(sip_account.sip_accountable,sip_account) + - if sip_account.phone_numbers.any? + = '[' + truncate(sip_account.phone_numbers.map{|phone_number| phone_number.to_s}.join(', '), :length => 25) + ']' + - else + =link_to "#{sip_account.caller_name}", user_sip_account_path(sip_account.sip_accountable,sip_account) + - if sip_account.phone_numbers.any? + = '[' + truncate(sip_account.phone_numbers.map{|phone_number| phone_number.to_s}.join(', '), :length => 25) + ']' + - else + = "-" + + %td + - if tenant.users_phones.any? + - if tenant.users_phones.count > GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = tenant.users_phones.count + - else + - tenant.users_phones.each do |phone| + - if phone != tenant.users_phones.last + = succeed ', ' do + = link_to "#{phone.phone_model.to_s} (#{phone.pretty_mac_address})#{(phone.ip_address.blank? ? '' : " - #{phone.ip_address}")}", user_phone_path(phone.phoneable, phone) + - else + = link_to "#{phone.phone_model.to_s} (#{phone.pretty_mac_address})#{(phone.ip_address.blank? ? '' : " - #{phone.ip_address}")}", user_phone_path(phone.phoneable, phone) + - else + = '-' diff --git a/app/views/tenants/_table_of_functions.html.haml b/app/views/tenants/_table_of_functions.html.haml new file mode 100644 index 0000000..d7af224 --- /dev/null +++ b/app/views/tenants/_table_of_functions.html.haml @@ -0,0 +1,53 @@ +- 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{: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 + %td + = t("callthroughs.name") + %td + - if tenant.callthroughs.any? + = 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 + %td + = t("conferences.name") + %td + - if tenant.conferences.any? + + = 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 + %td + = t("hunt_groups.name") + %td + - if tenant.hunt_groups.any? + = 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 + %td + = t("automatic_call_distributors.name") + %td + - if tenant.automatic_call_distributors.any? + = link_to Haml::Engine.new("%i.icon-list").render + ' ' + tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(tenant) + - else + = '-' + %td + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => AutomaticCallDistributor}
\ No newline at end of file diff --git a/app/views/tenants/_table_of_phone_books.html.haml b/app/views/tenants/_table_of_phone_books.html.haml new file mode 100644 index 0000000..9d9b97c --- /dev/null +++ b/app/views/tenants/_table_of_phone_books.html.haml @@ -0,0 +1,8 @@ +- cache(['user_show_phone_books', I18n.locale, tenant, tenant.phone_books]) do + %h2=t("phone_books.index.page_title") + -# Phone books + -# + - if GuiFunction.display?('show_phone_books_in_user_show_view', current_user) + - if can?( :index, PhoneBook ) + = render "phone_books/index_core", :phone_books => tenant.phone_books + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => PhoneBook}
\ No newline at end of file diff --git a/app/views/tenants/_user_groups_table.html.haml b/app/views/tenants/_user_groups_table.html.haml new file mode 100644 index 0000000..61b3e3d --- /dev/null +++ b/app/views/tenants/_user_groups_table.html.haml @@ -0,0 +1,4 @@ +- if @tenant.user_groups.any? + %h2= t("user_groups.index.page_title") + = render "user_groups/index_core", :user_groups => tenant.user_groups + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => UserGroup} diff --git a/app/views/tenants/_users_table.html.haml b/app/views/tenants/_users_table.html.haml new file mode 100644 index 0000000..850ea5e --- /dev/null +++ b/app/views/tenants/_users_table.html.haml @@ -0,0 +1,7 @@ +%h2= t("users.index.page_title") +- if @tenant.users.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = render "users/index_core", :users => tenant.users + = 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 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 cb2b895..53d3307 100644 --- a/app/views/tenants/show.html.haml +++ b/app/views/tenants/show.html.haml @@ -1,8 +1,5 @@ -- title t("tenants.show.page_title") +- content_for :title, @tenant.name -%p - %strong= t('tenants.show.name') + ":" - = @tenant.name - if !@tenant.description.blank? %p %strong= t('tenants.show.description') + ":" @@ -10,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 |