summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/access_authorizations_helper.rb2
-rw-r--r--app/helpers/acd_agents_helper.rb2
-rw-r--r--app/helpers/acd_callers_helper.rb2
-rw-r--r--app/helpers/addresses_helper.rb2
-rw-r--r--app/helpers/api/rows_helper.rb2
-rw-r--r--app/helpers/application_helper.rb2
-rw-r--r--app/helpers/automatic_call_distributors_helper.rb2
-rw-r--r--app/helpers/call_forward_cases_helper.rb2
-rw-r--r--app/helpers/call_forwards_helper.rb2
-rw-r--r--app/helpers/callthroughs_helper.rb2
-rw-r--r--app/helpers/conference_invitees_helper.rb2
-rw-r--r--app/helpers/conferences_helper.rb2
-rw-r--r--app/helpers/config_siemens_helper.rb2
-rw-r--r--app/helpers/error_messages_helper.rb23
-rw-r--r--app/helpers/fax_accounts_helper.rb2
-rw-r--r--app/helpers/fax_documents_helper.rb2
-rw-r--r--app/helpers/gemeinschaft_setups_helper.rb2
-rw-r--r--app/helpers/gs_cluster_sync_log_entries_helper.rb2
-rw-r--r--app/helpers/gs_nodes_helper.rb2
-rw-r--r--app/helpers/gui_functions_helper.rb2
-rw-r--r--app/helpers/hunt_group_members_helper.rb2
-rw-r--r--app/helpers/hunt_groups_helper.rb2
-rw-r--r--app/helpers/layout_helper.rb70
-rw-r--r--app/helpers/manufacturers_helper.rb2
-rw-r--r--app/helpers/page_helper.rb2
-rw-r--r--app/helpers/phone_book_entries_helper.rb2
-rw-r--r--app/helpers/phone_books_helper.rb2
-rw-r--r--app/helpers/phone_models_helper.rb2
-rw-r--r--app/helpers/phone_number_ranges_helper.rb2
-rw-r--r--app/helpers/phone_numbers_helper.rb2
-rw-r--r--app/helpers/phone_sip_accounts_helper.rb2
-rw-r--r--app/helpers/phones_helper.rb2
-rw-r--r--app/helpers/phones_sip_accounts_helper.rb2
-rw-r--r--app/helpers/ringtones_helper.rb2
-rw-r--r--app/helpers/sessions_helper.rb2
-rw-r--r--app/helpers/sip_accounts_helper.rb2
-rw-r--r--app/helpers/sip_domains_helper.rb2
-rw-r--r--app/helpers/softkeys_helper.rb2
-rw-r--r--app/helpers/system_messages_helper.rb2
-rw-r--r--app/helpers/tenants_helper.rb2
-rw-r--r--app/helpers/user_groups_helper.rb2
-rw-r--r--app/helpers/users_helper.rb2
-rw-r--r--app/helpers/whitelists_helper.rb2
43 files changed, 175 insertions, 0 deletions
diff --git a/app/helpers/access_authorizations_helper.rb b/app/helpers/access_authorizations_helper.rb
new file mode 100644
index 0000000..d16f5c6
--- /dev/null
+++ b/app/helpers/access_authorizations_helper.rb
@@ -0,0 +1,2 @@
+module AccessAuthorizationsHelper
+end
diff --git a/app/helpers/acd_agents_helper.rb b/app/helpers/acd_agents_helper.rb
new file mode 100644
index 0000000..5be92a8
--- /dev/null
+++ b/app/helpers/acd_agents_helper.rb
@@ -0,0 +1,2 @@
+module AcdAgentsHelper
+end
diff --git a/app/helpers/acd_callers_helper.rb b/app/helpers/acd_callers_helper.rb
new file mode 100644
index 0000000..534b99c
--- /dev/null
+++ b/app/helpers/acd_callers_helper.rb
@@ -0,0 +1,2 @@
+module AcdCallersHelper
+end
diff --git a/app/helpers/addresses_helper.rb b/app/helpers/addresses_helper.rb
new file mode 100644
index 0000000..5f4dc13
--- /dev/null
+++ b/app/helpers/addresses_helper.rb
@@ -0,0 +1,2 @@
+module AddressesHelper
+end
diff --git a/app/helpers/api/rows_helper.rb b/app/helpers/api/rows_helper.rb
new file mode 100644
index 0000000..a18dab4
--- /dev/null
+++ b/app/helpers/api/rows_helper.rb
@@ -0,0 +1,2 @@
+module Api::RowsHelper
+end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
new file mode 100644
index 0000000..de6be79
--- /dev/null
+++ b/app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
diff --git a/app/helpers/automatic_call_distributors_helper.rb b/app/helpers/automatic_call_distributors_helper.rb
new file mode 100644
index 0000000..19a9828
--- /dev/null
+++ b/app/helpers/automatic_call_distributors_helper.rb
@@ -0,0 +1,2 @@
+module AutomaticCallDistributorsHelper
+end
diff --git a/app/helpers/call_forward_cases_helper.rb b/app/helpers/call_forward_cases_helper.rb
new file mode 100644
index 0000000..63a4939
--- /dev/null
+++ b/app/helpers/call_forward_cases_helper.rb
@@ -0,0 +1,2 @@
+module CallForwardCasesHelper
+end
diff --git a/app/helpers/call_forwards_helper.rb b/app/helpers/call_forwards_helper.rb
new file mode 100644
index 0000000..ffb6977
--- /dev/null
+++ b/app/helpers/call_forwards_helper.rb
@@ -0,0 +1,2 @@
+module CallForwardsHelper
+end
diff --git a/app/helpers/callthroughs_helper.rb b/app/helpers/callthroughs_helper.rb
new file mode 100644
index 0000000..2ee0b9b
--- /dev/null
+++ b/app/helpers/callthroughs_helper.rb
@@ -0,0 +1,2 @@
+module CallthroughsHelper
+end
diff --git a/app/helpers/conference_invitees_helper.rb b/app/helpers/conference_invitees_helper.rb
new file mode 100644
index 0000000..dab6843
--- /dev/null
+++ b/app/helpers/conference_invitees_helper.rb
@@ -0,0 +1,2 @@
+module ConferenceInviteesHelper
+end
diff --git a/app/helpers/conferences_helper.rb b/app/helpers/conferences_helper.rb
new file mode 100644
index 0000000..edfcfdd
--- /dev/null
+++ b/app/helpers/conferences_helper.rb
@@ -0,0 +1,2 @@
+module ConferencesHelper
+end
diff --git a/app/helpers/config_siemens_helper.rb b/app/helpers/config_siemens_helper.rb
new file mode 100644
index 0000000..7ff8c5b
--- /dev/null
+++ b/app/helpers/config_siemens_helper.rb
@@ -0,0 +1,2 @@
+module ConfigSiemensHelper
+end
diff --git a/app/helpers/error_messages_helper.rb b/app/helpers/error_messages_helper.rb
new file mode 100644
index 0000000..8e9c4d3
--- /dev/null
+++ b/app/helpers/error_messages_helper.rb
@@ -0,0 +1,23 @@
+module ErrorMessagesHelper
+ # Render error messages for the given objects. The :message and :header_message options are allowed.
+ def error_messages_for(*objects)
+ options = objects.extract_options!
+ options[:header_message] ||= I18n.t(:"activerecord.errors.header", :default => "Invalid Fields")
+ options[:message] ||= I18n.t(:"activerecord.errors.message", :default => "Correct the following errors and try again.")
+ messages = objects.compact.map { |o| o.errors.full_messages }.flatten
+ unless messages.empty?
+ content_tag(:div, :class => "error_messages") do
+ list_items = messages.map { |msg| content_tag(:li, msg.html_safe) }
+ content_tag(:h2, options[:header_message].html_safe) + content_tag(:p, options[:message].html_safe) + content_tag(:ul, list_items.join.html_safe)
+ end
+ end
+ end
+
+ module FormBuilderAdditions
+ def error_messages(options = {})
+ @template.error_messages_for(@object, options)
+ end
+ end
+end
+
+ActionView::Helpers::FormBuilder.send(:include, ErrorMessagesHelper::FormBuilderAdditions)
diff --git a/app/helpers/fax_accounts_helper.rb b/app/helpers/fax_accounts_helper.rb
new file mode 100644
index 0000000..529c4fb
--- /dev/null
+++ b/app/helpers/fax_accounts_helper.rb
@@ -0,0 +1,2 @@
+module FaxAccountsHelper
+end
diff --git a/app/helpers/fax_documents_helper.rb b/app/helpers/fax_documents_helper.rb
new file mode 100644
index 0000000..c168948
--- /dev/null
+++ b/app/helpers/fax_documents_helper.rb
@@ -0,0 +1,2 @@
+module FaxDocumentsHelper
+end
diff --git a/app/helpers/gemeinschaft_setups_helper.rb b/app/helpers/gemeinschaft_setups_helper.rb
new file mode 100644
index 0000000..f241900
--- /dev/null
+++ b/app/helpers/gemeinschaft_setups_helper.rb
@@ -0,0 +1,2 @@
+module GemeinschaftSetupsHelper
+end
diff --git a/app/helpers/gs_cluster_sync_log_entries_helper.rb b/app/helpers/gs_cluster_sync_log_entries_helper.rb
new file mode 100644
index 0000000..9eef5de
--- /dev/null
+++ b/app/helpers/gs_cluster_sync_log_entries_helper.rb
@@ -0,0 +1,2 @@
+module GsClusterSyncLogEntriesHelper
+end
diff --git a/app/helpers/gs_nodes_helper.rb b/app/helpers/gs_nodes_helper.rb
new file mode 100644
index 0000000..9ba2a39
--- /dev/null
+++ b/app/helpers/gs_nodes_helper.rb
@@ -0,0 +1,2 @@
+module GsNodesHelper
+end
diff --git a/app/helpers/gui_functions_helper.rb b/app/helpers/gui_functions_helper.rb
new file mode 100644
index 0000000..35324cd
--- /dev/null
+++ b/app/helpers/gui_functions_helper.rb
@@ -0,0 +1,2 @@
+module GuiFunctionsHelper
+end
diff --git a/app/helpers/hunt_group_members_helper.rb b/app/helpers/hunt_group_members_helper.rb
new file mode 100644
index 0000000..e198542
--- /dev/null
+++ b/app/helpers/hunt_group_members_helper.rb
@@ -0,0 +1,2 @@
+module HuntGroupMembersHelper
+end
diff --git a/app/helpers/hunt_groups_helper.rb b/app/helpers/hunt_groups_helper.rb
new file mode 100644
index 0000000..d1b3b05
--- /dev/null
+++ b/app/helpers/hunt_groups_helper.rb
@@ -0,0 +1,2 @@
+module HuntGroupsHelper
+end
diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb
new file mode 100644
index 0000000..1dad619
--- /dev/null
+++ b/app/helpers/layout_helper.rb
@@ -0,0 +1,70 @@
+# These helper methods can be called in your template to set
+# variables to be used in the layout.
+# This module should be included in all views globally,
+# to do so you may need to add this line to your
+# ApplicationController
+# helper :layout
+#
+module LayoutHelper
+
+ def title( page_title, show_title = true )
+ content_for(:title) { strip_tags(page_title.to_s) }
+ @show_title = show_title
+ end
+
+ def show_title?
+ @show_title
+ end
+
+ def stylesheet( *args )
+ content_for(:head) { stylesheet_link_tag( *args ) }
+ end
+
+ def javascript( *args )
+ content_for(:head) { javascript_include_tag( *args ) }
+ end
+
+ def translation_missing?( output )
+ (output =~ /span/ or output.empty?)
+ end
+
+ def conditional_hint( translation_key )
+ output = t( translation_key )
+ return output unless translation_missing?( output )
+ false
+ end
+
+ def conditional_t( translation_key )
+ output = t( translation_key )
+ strip_tags( output )
+ end
+
+ def resolve_flash_sign( type )
+ return case type.to_s
+ when 'alert' ; '!'
+ when 'warning' ; '!'
+ else ; 'i'
+ end
+ end
+
+ # Returns navigation as an array.
+ #
+ def navigation_items
+ unless @io
+ @io = []
+
+ if can?( :index, PhoneBookEntry )
+ @io << { :url => phone_book_entries_path , :title => t('phone_book_entries.index.page_title' ) }
+ end
+
+ # This could be a link to VoiceMails.
+ #
+ # if can?( :index, Object )
+ # @io << { :url => "#" , :title => t('voice_mail') }
+ # end
+
+ end
+ @io
+ end
+
+end
diff --git a/app/helpers/manufacturers_helper.rb b/app/helpers/manufacturers_helper.rb
new file mode 100644
index 0000000..3f9e083
--- /dev/null
+++ b/app/helpers/manufacturers_helper.rb
@@ -0,0 +1,2 @@
+module ManufacturersHelper
+end
diff --git a/app/helpers/page_helper.rb b/app/helpers/page_helper.rb
new file mode 100644
index 0000000..625cfe4
--- /dev/null
+++ b/app/helpers/page_helper.rb
@@ -0,0 +1,2 @@
+module PageHelper
+end
diff --git a/app/helpers/phone_book_entries_helper.rb b/app/helpers/phone_book_entries_helper.rb
new file mode 100644
index 0000000..db24cae
--- /dev/null
+++ b/app/helpers/phone_book_entries_helper.rb
@@ -0,0 +1,2 @@
+module PhoneBookEntriesHelper
+end
diff --git a/app/helpers/phone_books_helper.rb b/app/helpers/phone_books_helper.rb
new file mode 100644
index 0000000..55ebf19
--- /dev/null
+++ b/app/helpers/phone_books_helper.rb
@@ -0,0 +1,2 @@
+module PhoneBooksHelper
+end
diff --git a/app/helpers/phone_models_helper.rb b/app/helpers/phone_models_helper.rb
new file mode 100644
index 0000000..2cc6545
--- /dev/null
+++ b/app/helpers/phone_models_helper.rb
@@ -0,0 +1,2 @@
+module PhoneModelsHelper
+end
diff --git a/app/helpers/phone_number_ranges_helper.rb b/app/helpers/phone_number_ranges_helper.rb
new file mode 100644
index 0000000..f4d5897
--- /dev/null
+++ b/app/helpers/phone_number_ranges_helper.rb
@@ -0,0 +1,2 @@
+module PhoneNumberRangesHelper
+end
diff --git a/app/helpers/phone_numbers_helper.rb b/app/helpers/phone_numbers_helper.rb
new file mode 100644
index 0000000..cb4f200
--- /dev/null
+++ b/app/helpers/phone_numbers_helper.rb
@@ -0,0 +1,2 @@
+module PhoneNumbersHelper
+end
diff --git a/app/helpers/phone_sip_accounts_helper.rb b/app/helpers/phone_sip_accounts_helper.rb
new file mode 100644
index 0000000..f834d2c
--- /dev/null
+++ b/app/helpers/phone_sip_accounts_helper.rb
@@ -0,0 +1,2 @@
+module PhoneSipAccountsHelper
+end
diff --git a/app/helpers/phones_helper.rb b/app/helpers/phones_helper.rb
new file mode 100644
index 0000000..69ebd13
--- /dev/null
+++ b/app/helpers/phones_helper.rb
@@ -0,0 +1,2 @@
+module PhonesHelper
+end
diff --git a/app/helpers/phones_sip_accounts_helper.rb b/app/helpers/phones_sip_accounts_helper.rb
new file mode 100644
index 0000000..03e3fd2
--- /dev/null
+++ b/app/helpers/phones_sip_accounts_helper.rb
@@ -0,0 +1,2 @@
+module PhonesSipAccountsHelper
+end
diff --git a/app/helpers/ringtones_helper.rb b/app/helpers/ringtones_helper.rb
new file mode 100644
index 0000000..33deac9
--- /dev/null
+++ b/app/helpers/ringtones_helper.rb
@@ -0,0 +1,2 @@
+module RingtonesHelper
+end
diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb
new file mode 100644
index 0000000..309f8b2
--- /dev/null
+++ b/app/helpers/sessions_helper.rb
@@ -0,0 +1,2 @@
+module SessionsHelper
+end
diff --git a/app/helpers/sip_accounts_helper.rb b/app/helpers/sip_accounts_helper.rb
new file mode 100644
index 0000000..1e666fd
--- /dev/null
+++ b/app/helpers/sip_accounts_helper.rb
@@ -0,0 +1,2 @@
+module SipAccountsHelper
+end
diff --git a/app/helpers/sip_domains_helper.rb b/app/helpers/sip_domains_helper.rb
new file mode 100644
index 0000000..c1d85ee
--- /dev/null
+++ b/app/helpers/sip_domains_helper.rb
@@ -0,0 +1,2 @@
+module SipDomainsHelper
+end
diff --git a/app/helpers/softkeys_helper.rb b/app/helpers/softkeys_helper.rb
new file mode 100644
index 0000000..e551779
--- /dev/null
+++ b/app/helpers/softkeys_helper.rb
@@ -0,0 +1,2 @@
+module SoftkeysHelper
+end
diff --git a/app/helpers/system_messages_helper.rb b/app/helpers/system_messages_helper.rb
new file mode 100644
index 0000000..fef2386
--- /dev/null
+++ b/app/helpers/system_messages_helper.rb
@@ -0,0 +1,2 @@
+module SystemMessagesHelper
+end
diff --git a/app/helpers/tenants_helper.rb b/app/helpers/tenants_helper.rb
new file mode 100644
index 0000000..b7bb45d
--- /dev/null
+++ b/app/helpers/tenants_helper.rb
@@ -0,0 +1,2 @@
+module TenantsHelper
+end
diff --git a/app/helpers/user_groups_helper.rb b/app/helpers/user_groups_helper.rb
new file mode 100644
index 0000000..83cd8f3
--- /dev/null
+++ b/app/helpers/user_groups_helper.rb
@@ -0,0 +1,2 @@
+module UserGroupsHelper
+end
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
new file mode 100644
index 0000000..2310a24
--- /dev/null
+++ b/app/helpers/users_helper.rb
@@ -0,0 +1,2 @@
+module UsersHelper
+end
diff --git a/app/helpers/whitelists_helper.rb b/app/helpers/whitelists_helper.rb
new file mode 100644
index 0000000..083be60
--- /dev/null
+++ b/app/helpers/whitelists_helper.rb
@@ -0,0 +1,2 @@
+module WhitelistsHelper
+end