From c09553494684447245238cbc2874ce65d4aaecee Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 23:02:40 +0100 Subject: Autohelp config. --- app/views/page/help.de.html.haml | 4 ++-- app/views/tenants/_table_of_sip_accounts.html.haml | 2 +- db/migrate/20130124175109_show_admin_auto_online_help.rb | 9 +++++++++ db/schema.rb | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20130124175109_show_admin_auto_online_help.rb diff --git a/app/views/page/help.de.html.haml b/app/views/page/help.de.html.haml index 4b75935..80c4d72 100644 --- a/app/views/page/help.de.html.haml +++ b/app/views/page/help.de.html.haml @@ -5,14 +5,14 @@ %strong Personalisierter SIP-Accounts %br - Dieser wird einer bestimmten Person zugeordnet. In einer normalen Gemeinschaft-Installation sind die meisten SIP-Accounts personalisiert. + Dieser wird einer bestimmten Person zugeordnet und deshalb für diesen Account z.B. Telefontastenbelegungen definieren kann. In einer normalen Gemeinschaft-Installation sind die meisten SIP-Accounts personalisiert. %br =link_to "SIP-Account für #{current_user} anlegen.", new_user_sip_account_path(current_user) %li %strong Firmen SIP-Accounts %br - Es gibt bestimmte SIP-Account, die keiner bestimmten Person zugeordnet werden können (z.B. für Telefone in einem Konferenzraum). Dafür gibt es Firmen SIP-Accounts. + Es gibt bestimmte SIP-Account, die keiner bestimmten Person zugeordnet werden können (z.B. für Telefone in einem Konferenzraum oder einem Aufzug). Dafür gibt es Firmen SIP-Accounts. %br =link_to "SIP-Account für #{current_user.current_tenant} anlegen.", new_tenant_sip_account_path(current_user.current_tenant) diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml index b5f618b..ef8e458 100644 --- a/app/views/tenants/_table_of_sip_accounts.html.haml +++ b/app/views/tenants/_table_of_sip_accounts.html.haml @@ -1,6 +1,6 @@ - cache(['tenant_show_table_of_sip_accounts', I18n.locale, tenant, tenant.sip_accounts.count, tenant.sip_accounts.reorder(:updated_at).last]) do .row - - if !tenant.sip_accounts.any? + - if GsParameter.get('AUTO_ADMIN_ONLINE_HELP') == true && !tenant.sip_accounts.any? .span6 -# SIP accounts -# diff --git a/db/migrate/20130124175109_show_admin_auto_online_help.rb b/db/migrate/20130124175109_show_admin_auto_online_help.rb new file mode 100644 index 0000000..9c3f733 --- /dev/null +++ b/db/migrate/20130124175109_show_admin_auto_online_help.rb @@ -0,0 +1,9 @@ +class ShowAdminAutoOnlineHelp < ActiveRecord::Migration + def up + GsParameter.create(:name => 'AUTO_ADMIN_ONLINE_HELP', :section => 'Documentation', :value => 'true', :class_type => 'Boolean', :description => 'Gemeinschaft will include tips and help whenever it seems fit.') + end + + def down + GsParameter.where(:name => 'AUTO_ADMIN_ONLINE_HELP').destroy_all + end +end diff --git a/db/schema.rb b/db/schema.rb index 8258394..73a1454 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130124125238) do +ActiveRecord::Schema.define(:version => 20130124175109) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3