diff options
-rw-r--r-- | app/models/tenant.rb | 2 | ||||
-rw-r--r-- | app/views/tenants/_admin_area.de.html.haml | 2 | ||||
-rw-r--r-- | app/views/tenants/_admin_area.en.html.haml | 4 | ||||
-rw-r--r-- | app/views/tenants/_generic_files.html.haml | 5 | ||||
-rw-r--r-- | config/routes.rb | 2 |
5 files changed, 14 insertions, 1 deletions
diff --git a/app/models/tenant.rb b/app/models/tenant.rb index b47faee..7ed14c7 100644 --- a/app/models/tenant.rb +++ b/app/models/tenant.rb @@ -65,6 +65,8 @@ class Tenant < ActiveRecord::Base has_many :voicemail_accounts, :as => :voicemail_accountable, :dependent => :destroy + has_many :generic_files, :as => :owner, :dependent => :destroy + # Validations: # validates_presence_of :name, :state, :country, :language 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 diff --git a/config/routes.rb b/config/routes.rb index 3d73b76..833eb20 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -271,6 +271,8 @@ Gemeinschaft42c::Application.routes.draw do resources :automatic_call_distributors resources :parking_stalls resources :voicemail_accounts + resources :fax_accounts + resources :generic_files end resources :callthroughs, :only => [] do |