summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/images/docu/user_interface.pngbin0 -> 137824 bytes
-rw-r--r--app/assets/images/rails.pngbin6646 -> 0 bytes
-rw-r--r--app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen.pngbin0 -> 239283 bytes
-rw-r--r--app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.movbin0 -> 1357712 bytes
-rw-r--r--app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4bin0 -> 2091614 bytes
-rw-r--r--app/assets/images/screenshots/set_provisioning_url_snom.pngbin0 -> 183927 bytes
-rw-r--r--app/assets/javascripts/gemeinschaft.js.coffee4
-rw-r--r--app/assets/stylesheets/gemeinschaft-generic.css.scss1
-rw-r--r--app/controllers/call_histories_controller.rb5
-rw-r--r--app/controllers/config_snom_controller.rb5
-rw-r--r--app/controllers/gateways_controller.rb2
-rw-r--r--app/controllers/gemeinschaft_setups_controller.rb28
-rw-r--r--app/controllers/page_controller.rb5
-rw-r--r--app/controllers/sip_accounts_controller.rb2
-rw-r--r--app/controllers/tenants_controller.rb4
-rw-r--r--app/controllers/trigger_controller.rb124
-rw-r--r--app/controllers/voicemail_settings_controller.rb3
-rw-r--r--app/models/ability.rb4
-rw-r--r--app/models/call_history.rb16
-rw-r--r--app/models/call_route.rb11
-rw-r--r--app/models/fax_document.rb4
-rw-r--r--app/models/gateway.rb2
-rw-r--r--app/models/gateway_setting.rb10
-rw-r--r--app/models/gemeinschaft_setup.rb8
-rw-r--r--app/models/sip_account.rb2
-rw-r--r--app/models/sip_registration.rb21
-rw-r--r--app/models/user.rb13
-rw-r--r--app/views/access_authorizations/_index_core.html.haml41
-rw-r--r--app/views/acd_agents/_index_core.html.haml33
-rw-r--r--app/views/acd_callers/_index_core.html.haml41
-rw-r--r--app/views/addresses/_index_core.html.haml45
-rw-r--r--app/views/automatic_call_distributors/_index_core.html.haml68
-rw-r--r--app/views/automatic_call_distributors/show.html.haml97
-rw-r--r--app/views/call_forwards/_index_core.html.haml57
-rw-r--r--app/views/call_histories/_index_core.html.haml137
-rw-r--r--app/views/call_histories/destroy.js.erb1
-rw-r--r--app/views/call_routes/_index_core.html.haml46
-rw-r--r--app/views/call_routes/index.html.haml2
-rw-r--r--app/views/call_routes/show.html.haml11
-rw-r--r--app/views/calls/_index_core.html.haml17
-rw-r--r--app/views/callthroughs/_index_core.html.haml39
-rw-r--r--app/views/conference_invitees/_index_core.html.haml33
-rw-r--r--app/views/conferences/_index_core.html.haml83
-rw-r--r--app/views/config_polycom/_call_history.xml.haml2
-rw-r--r--app/views/config_polycom/_phone_book.xml.haml2
-rw-r--r--app/views/fax_accounts/_index_core.html.haml75
-rw-r--r--app/views/fax_documents/_index_core.html.haml65
-rw-r--r--app/views/freeswitch_voicemail_msgs/_index_core.html.haml23
-rw-r--r--app/views/gateway_parameters/_index_core.html.haml25
-rw-r--r--app/views/gateway_settings/_form_core.html.haml2
-rw-r--r--app/views/gateway_settings/_index_core.html.haml25
-rw-r--r--app/views/gateways/_form_core.html.haml2
-rw-r--r--app/views/gateways/_index_core.html.haml43
-rw-r--r--app/views/gateways/show.html.haml50
-rw-r--r--app/views/gemeinschaft_setups/new.de.html.haml22
-rw-r--r--app/views/gemeinschaft_setups/new.html.haml24
-rw-r--r--app/views/gs_cluster_sync_log_entries/_index_core.html.haml33
-rw-r--r--app/views/gs_nodes/_index_core.html.haml37
-rw-r--r--app/views/gs_parameters/_index_core.html.haml37
-rw-r--r--app/views/gs_parameters/index.html.haml4
-rw-r--r--app/views/gs_parameters/show.html.haml46
-rw-r--r--app/views/gui_functions/_index_core.html.haml49
-rw-r--r--app/views/hunt_group_members/_index_core.html.haml37
-rw-r--r--app/views/hunt_groups/_index_core.html.haml60
-rw-r--r--app/views/layouts/_footer.html.haml5
-rw-r--r--app/views/layouts/_navbar.html.haml25
-rw-r--r--app/views/layouts/application.html.haml5
-rw-r--r--app/views/layouts/old-application.html.haml48
-rw-r--r--app/views/layouts/old_navbar.html.haml10
-rw-r--r--app/views/layouts/test.haml0
-rw-r--r--app/views/manufacturers/_index_core.html.haml35
-rw-r--r--app/views/page/beginners_intro.de.html.haml33
-rw-r--r--app/views/page/conference.html.haml80
-rw-r--r--app/views/page/docu/_screencast_list.html.haml19
-rw-r--r--app/views/page/docu/_tenant_sip_accounts_new.html.haml26
-rw-r--r--app/views/page/help.de.html.haml26
-rw-r--r--app/views/page/help.html.haml (renamed from app/views/page/beginners_intro.html.haml)0
-rw-r--r--app/views/phone_book_entries/_index_core.de.html.haml42
-rw-r--r--app/views/phone_book_entries/_index_core.html.haml86
-rw-r--r--app/views/phone_book_entries/_navigation.html.haml13
-rw-r--r--app/views/phone_books/_index_core.html.haml33
-rw-r--r--app/views/phone_books/show.html.haml4
-rw-r--r--app/views/phone_models/_index_core.html.haml37
-rw-r--r--app/views/phone_number_ranges/_index_core.html.haml39
-rw-r--r--app/views/phone_numbers/_index_core.html.haml26
-rw-r--r--app/views/phone_sip_accounts/_index_core.html.haml25
-rw-r--r--app/views/phones/_index_core.html.haml46
-rw-r--r--app/views/phones/show.html.haml147
-rw-r--r--app/views/ringtones/_index_core.html.haml21
-rw-r--r--app/views/route_elements/_index_core.html.haml37
-rw-r--r--app/views/shared/_create_link.html.haml15
-rw-r--r--app/views/shared/_header.de.html.haml41
-rw-r--r--app/views/shared/_header.html.haml41
-rw-r--r--app/views/shared/_index_view_edit_destroy_part.html.haml64
-rw-r--r--app/views/shared/_show_edit_destroy_part.html.haml16
-rw-r--r--app/views/sip_accounts/_form_core.html.haml8
-rw-r--r--app/views/sip_accounts/_index_core.html.haml57
-rw-r--r--app/views/sip_accounts/show.html.haml94
-rw-r--r--app/views/sip_domains/_index_core.html.haml21
-rw-r--r--app/views/softkeys/_index_core.html.haml27
-rw-r--r--app/views/system_messages/_index_core.html.haml21
-rw-r--r--app/views/tenants/_admin_area.html.haml70
-rw-r--r--app/views/tenants/_form_core.html.haml3
-rw-r--r--app/views/tenants/_gs_parameter_table.html.haml40
-rw-r--r--app/views/tenants/_index_core.html.haml33
-rw-r--r--app/views/tenants/_sip_accounts_and_phones.html.haml68
-rw-r--r--app/views/tenants/_table_of_automatic_call_distributors.html.haml8
-rw-r--r--app/views/tenants/_table_of_callthroughs.html.haml8
-rw-r--r--app/views/tenants/_table_of_conferences.html.haml8
-rw-r--r--app/views/tenants/_table_of_functions.html.haml53
-rw-r--r--app/views/tenants/_table_of_hunt_groups.html.haml8
-rw-r--r--app/views/tenants/_table_of_phones.html.haml7
-rw-r--r--app/views/tenants/_table_of_sip_accounts.html.haml25
-rw-r--r--app/views/tenants/show.html.haml15
-rw-r--r--app/views/user_group_memberships/_index_core.html.haml25
-rw-r--r--app/views/user_groups/_index_core.html.haml49
-rw-r--r--app/views/user_groups/show.html.haml28
-rw-r--r--app/views/users/_form_core.html.haml3
-rw-r--r--app/views/users/_index_core.html.haml60
-rw-r--r--app/views/users/show.html.haml28
-rw-r--r--app/views/voicemail_messages/_index_core.html.haml2
-rw-r--r--app/views/whitelists/_index_core.html.haml27
122 files changed, 1893 insertions, 1636 deletions
diff --git a/app/assets/images/docu/user_interface.png b/app/assets/images/docu/user_interface.png
new file mode 100644
index 0000000..92fc6a9
--- /dev/null
+++ b/app/assets/images/docu/user_interface.png
Binary files differ
diff --git a/app/assets/images/rails.png b/app/assets/images/rails.png
deleted file mode 100644
index d5edc04..0000000
--- a/app/assets/images/rails.png
+++ /dev/null
Binary files differ
diff --git a/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen.png b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen.png
new file mode 100644
index 0000000..cb5ce79
--- /dev/null
+++ b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen.png
Binary files differ
diff --git a/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov
new file mode 100644
index 0000000..51366d1
--- /dev/null
+++ b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov
Binary files differ
diff --git a/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4
new file mode 100644
index 0000000..1e39b97
--- /dev/null
+++ b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4
Binary files differ
diff --git a/app/assets/images/screenshots/set_provisioning_url_snom.png b/app/assets/images/screenshots/set_provisioning_url_snom.png
new file mode 100644
index 0000000..66495af
--- /dev/null
+++ b/app/assets/images/screenshots/set_provisioning_url_snom.png
Binary files differ
diff --git a/app/assets/javascripts/gemeinschaft.js.coffee b/app/assets/javascripts/gemeinschaft.js.coffee
new file mode 100644
index 0000000..c9404a8
--- /dev/null
+++ b/app/assets/javascripts/gemeinschaft.js.coffee
@@ -0,0 +1,4 @@
+jQuery ->
+ $("a[rel=popover]").popover()
+ $(".tooltip").tooltip()
+ $("a[rel=tooltip]").tooltip() \ No newline at end of file
diff --git a/app/assets/stylesheets/gemeinschaft-generic.css.scss b/app/assets/stylesheets/gemeinschaft-generic.css.scss
index 296b242..e594d67 100644
--- a/app/assets/stylesheets/gemeinschaft-generic.css.scss
+++ b/app/assets/stylesheets/gemeinschaft-generic.css.scss
@@ -11,3 +11,4 @@ body {
padding-top: 0px;
}
}
+
diff --git a/app/controllers/call_histories_controller.rb b/app/controllers/call_histories_controller.rb
index 5335ed3..2bfd4e3 100644
--- a/app/controllers/call_histories_controller.rb
+++ b/app/controllers/call_histories_controller.rb
@@ -44,7 +44,10 @@ class CallHistoriesController < ApplicationController
if can?(:destroy, @call_history)
@call_history.destroy
m = method( :"#{@parent.class.name.underscore}_call_histories_url" )
- redirect_to m.(), :notice => t('call_histories.controller.successfuly_destroyed')
+ respond_to do |format|
+ format.html { redirect_to m.(), :notice => t('call_histories.controller.successfuly_destroyed')}
+ format.js
+ end
end
end
diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb
index 149e601..e797a43 100644
--- a/app/controllers/config_snom_controller.rb
+++ b/app/controllers/config_snom_controller.rb
@@ -158,12 +158,15 @@ class ConfigSnomController < ApplicationController
if ! params[:sip_account].blank?
@sip_account = @phone.sip_accounts.where({ :id => params[:sip_account].to_i }).first
+ if ! @sip_account && @phone.fallback_sip_account && @phone.fallback_sip_account.id == params[:sip_account].to_i
+ @sip_account = @phone.fallback_sip_account
+ end
if ! @sip_account
render(
:status => 404,
:layout => false,
:content_type => 'text/plain',
- :text => "<!-- SipAccount not found -->",
+ :text => "<!-- SipAccount ID:#{params[:sip_account].to_i} not found -->",
)
end
end
diff --git a/app/controllers/gateways_controller.rb b/app/controllers/gateways_controller.rb
index 5741195..d3362e0 100644
--- a/app/controllers/gateways_controller.rb
+++ b/app/controllers/gateways_controller.rb
@@ -13,6 +13,7 @@ class GatewaysController < ApplicationController
def new
@gateway = Gateway.new
+ @technologies = Gateway::TECHNOLOGIES
spread_breadcrumbs
end
@@ -28,6 +29,7 @@ class GatewaysController < ApplicationController
def edit
@gateway = Gateway.find(params[:id])
+ @technologies = Gateway::TECHNOLOGIES
spread_breadcrumbs
end
diff --git a/app/controllers/gemeinschaft_setups_controller.rb b/app/controllers/gemeinschaft_setups_controller.rb
index 347e043..4f4a72a 100644
--- a/app/controllers/gemeinschaft_setups_controller.rb
+++ b/app/controllers/gemeinschaft_setups_controller.rb
@@ -20,6 +20,9 @@ class GemeinschaftSetupsController < ApplicationController
)
@gemeinschaft_setup.country = Country.find_by_name('Germany')
@gemeinschaft_setup.language = Language.find_by_name('Deutsch')
+
+ @gemeinschaft_setup.default_company_name = generate_a_new_name(Tenant.new)
+ @gemeinschaft_setup.default_system_email = 'admin@localhost'
end
def create
@@ -64,11 +67,34 @@ class GemeinschaftSetupsController < ApplicationController
FreeswitchAPI.execute('fsctl', 'shutdown restart')
end
+ # Create the tenant
+ tenant = Tenant.create({:name => @gemeinschaft_setup.default_company_name,
+ :sip_domain_id => SipDomain.last.id,
+ :country_id => @gemeinschaft_setup.country.id,
+ :language_id => @gemeinschaft_setup.language_id,
+ :from_field_voicemail_email => @gemeinschaft_setup.default_system_email,
+ :from_field_pin_change_email => @gemeinschaft_setup.default_system_email,
+ })
+
+ # Become a member of this tenant.
+ #
+ tenant.tenant_memberships.create(:user_id => user.id)
+
+ # Groups
+ #
+ admin_group = tenant.user_groups.create(:name => t('gemeinschaft_setups.initial_setup.admin_group_name'))
+ admin_group.users << user
+
+ user_group = tenant.user_groups.create(:name => t('gemeinschaft_setups.initial_setup.user_group_name'))
+ user_group.users << user
+
+ user.update_attributes!(:current_tenant_id => tenant.id)
+
# Auto-Login:
session[:user_id] = user.id
# Redirect to the user
- redirect_to new_tenant_url, :notice => t('gemeinschaft_setups.initial_setup.successful_setup')
+ redirect_to page_help_path, :notice => t('gemeinschaft_setups.initial_setup.successful_setup')
else
render :new
end
diff --git a/app/controllers/page_controller.rb b/app/controllers/page_controller.rb
index dc5f57b..8f4fa88 100644
--- a/app/controllers/page_controller.rb
+++ b/app/controllers/page_controller.rb
@@ -11,8 +11,9 @@ class PageController < ApplicationController
end
end
- def conference;end
- def beginners_intro;end
+ def help
+
+ end
private
def if_fresh_system_then_go_to_wizard
diff --git a/app/controllers/sip_accounts_controller.rb b/app/controllers/sip_accounts_controller.rb
index a83208b..b5c3ae4 100644
--- a/app/controllers/sip_accounts_controller.rb
+++ b/app/controllers/sip_accounts_controller.rb
@@ -71,7 +71,7 @@ class SipAccountsController < ApplicationController
def destroy
@sip_account.destroy
m = method( :"#{@parent.class.name.underscore}_sip_accounts_url" )
- redirect_to :back, :notice => t('sip_accounts.controller.successfuly_destroyed')
+ redirect_to :root, :notice => t('sip_accounts.controller.successfuly_destroyed')
end
private
diff --git a/app/controllers/tenants_controller.rb b/app/controllers/tenants_controller.rb
index cb67e5f..37874b2 100644
--- a/app/controllers/tenants_controller.rb
+++ b/app/controllers/tenants_controller.rb
@@ -70,7 +70,7 @@ class TenantsController < ApplicationController
:amount_of_numbers => @tenant.array_of_internal_extension_numbers.count + @tenant.array_of_dids.count
)
else
- redirect_to page_beginners_intro_path, :notice => t('tenants.controller.successfuly_created_plus_delayed_jobs',
+ redirect_to page_help_path, :notice => t('tenants.controller.successfuly_created_plus_delayed_jobs',
:resource => @tenant,
:amount_of_numbers => @tenant.array_of_internal_extension_numbers.count + @tenant.array_of_dids.count
)
@@ -81,7 +81,7 @@ class TenantsController < ApplicationController
:resource => @tenant
)
else
- redirect_to page_beginners_intro_path, :notice => t('tenants.controller.successfuly_created',
+ redirect_to page_help_path, :notice => t('tenants.controller.successfuly_created',
:resource => @tenant
)
end
diff --git a/app/controllers/trigger_controller.rb b/app/controllers/trigger_controller.rb
index e9821f6..ac43832 100644
--- a/app/controllers/trigger_controller.rb
+++ b/app/controllers/trigger_controller.rb
@@ -1,11 +1,127 @@
class TriggerController < ApplicationController
+ TIFF_FUFFIX = ".tiff"
+ PDF_SUFFIX = ".pdf"
+ TMP_DIR = "/tmp/"
+
def voicemail
- # Something is triggered when ever a local script fetches this action.
- #
+ if !params[:sip_account_id].blank?
+ sip_account = SipAccount.where(:id => params[:sip_account_id].to_i).first
+ if sip_account
+ sip_account.voicemail_messages.where(:notification => nil).each do |message|
+ message.notification = false
+ message.save
+ if !File.exists?( message.file_path )
+ next
+ end
+
+ user = sip_account.sip_accountable
+ if user.class != User
+ next
+ end
+
+ if user.email.blank?
+ next
+ end
+
+ voicemail_settings = sip_account.voicemail_setting
+ if !voicemail_settings
+ voicemail_settings = VoicemailSetting.new(:notify => user.send_voicemail_as_email_attachment, :attachment => user.send_voicemail_as_email_attachment, :mark_read => user.send_voicemail_as_email_attachment)
+ end
+
+ message.notification = voicemail_settings.notify
+ if voicemail_settings.notify
+ if Notifications.new_voicemail(message, voicemail_settings.attachment).deliver
+ if voicemail_settings.purge
+ message.delete
+ next
+ end
+ message.save
+ if voicemail_settings.mark_read
+ message.mark_read
+ end
+ end
+ else
+ message.save
+ end
+ end
+
+ render(
+ :status => 200,
+ :layout => false,
+ :content_type => 'text/plain',
+ :text => "<!-- OK -->",
+ )
+ else
+ render(
+ :status => 404,
+ :layout => false,
+ :content_type => 'text/plain',
+ :text => "<!-- Account not found -->",
+ )
+ end
+ end
end
def fax
- # Something is triggered when ever a local script fetches this action.
- #
+ if !params[:fax_account_id].blank?
+ fax_account = FaxAccount.where(:id => params[:fax_account_id].to_i).first
+ if fax_account
+ fax_account.fax_documents.where(:state => 'received').each do |fax_document|
+
+ tiff_file = File.basename(fax_document.tiff.to_s)
+
+ if !File.exists?( "#{TMP_DIR}#{tiff_file}" )
+ fax_document.state = 'unsuccessful'
+ fax_document.save
+ next
+ end
+
+ paper_size = "letter"
+ pdf_file = "#{TMP_DIR}#{File.basename(tiff_file, TIFF_FUFFIX)}#{PDF_SUFFIX}"
+
+ system "tiff2pdf \\
+ -o \"#{pdf_file}\" \\
+ -p #{paper_size} \\
+ -a \"#{fax_document.remote_station_id}\" \\
+ -c \"AMOOMA Gemeinschaft version #{GsParameter.get('GEMEINSCHAFT_VERSION')}\" \\
+ -t \"#{fax_document.remote_station_id}\" \"#{TMP_DIR}#{tiff_file}\""
+
+ if !File.exists?( pdf_file )
+ fax_document.state = 'unsuccessful'
+ fax_document.save
+ next
+ end
+
+ fax_document.document = File.open(pdf_file)
+ fax_document.state = 'successful'
+
+ if fax_document.save
+ Notifications.new_fax(fax_document).deliver
+ File.delete("#{TMP_DIR}#{tiff_file}");
+ File.delete(pdf_file);
+ fax_document.tiff = nil
+ fax_document.save
+ fax_document.render_thumbnails
+ else
+ fax_document.state = 'unsuccessful'
+ fax_document.save
+ end
+ end
+
+ render(
+ :status => 200,
+ :layout => false,
+ :content_type => 'text/plain',
+ :text => "<!-- OK -->",
+ )
+ else
+ render(
+ :status => 404,
+ :layout => false,
+ :content_type => 'text/plain',
+ :text => "<!-- Account not found -->",
+ )
+ end
+ end
end
end
diff --git a/app/controllers/voicemail_settings_controller.rb b/app/controllers/voicemail_settings_controller.rb
index d31de8f..5de0c35 100644
--- a/app/controllers/voicemail_settings_controller.rb
+++ b/app/controllers/voicemail_settings_controller.rb
@@ -71,7 +71,8 @@ class VoicemailSettingsController < ApplicationController
end
def voicemail_defaults
- path = "/opt/freeswitch/storage/voicemail/default/#{@sip_account.sip_domain.host}/#{@sip_account.auth_name}/"
+ storage_dir = GsParameter.where(:entity => 'voicemail', :section => 'parameters', :name => 'storage-dir').first.try(:value)
+ path = "#{storage_dir}/#{@sip_account.sip_domain.host}/#{@sip_account.auth_name}/"
@greeting_files = Dir.glob("#{path}*greeting*.wav").collect {|r| [ File.basename(r), File.expand_path(r) ] }
@name_files = Dir.glob("#{path}*name*.wav").collect {|r| [ File.basename(r), File.expand_path(r) ] }
diff --git a/app/models/ability.rb b/app/models/ability.rb
index b846af0..0d13dab 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -82,6 +82,10 @@ class Ability
#
cannot [:create, :destroy], GsParameter
cannot [:create, :destroy], GuiFunction
+
+ # An admin can not destroy his/her account
+ #
+ cannot [:destroy], User, :id => user.id
else
# Any user can do the following stuff.
#
diff --git a/app/models/call_history.rb b/app/models/call_history.rb
index 4db056a..81342bd 100644
--- a/app/models/call_history.rb
+++ b/app/models/call_history.rb
@@ -3,6 +3,9 @@ class CallHistory < ActiveRecord::Base
belongs_to :caller_account, :polymorphic => true
belongs_to :callee_account, :polymorphic => true
belongs_to :auth_account, :polymorphic => true
+
+ validates :start_stamp,
+ :presence => true
def display_number
if self.entry_type == 'dialed'
@@ -78,10 +81,11 @@ class CallHistory < ActiveRecord::Base
end
def display_call_date(date_format, date_today_format)
- if self.start_stamp.strftime('%Y%m%d') == DateTime::now.strftime('%Y%m%d')
+ if self.start_stamp.to_date == Date.today
return self.start_stamp.strftime(date_today_format)
+ else
+ return self.start_stamp.strftime(date_format)
end
- return self.start_stamp.strftime(date_format)
end
def display_duration
@@ -129,6 +133,14 @@ class CallHistory < ActiveRecord::Base
end
+ def voicemail_message?
+ begin
+ return self.call_historyable.voicemail_messages.where(:forwarded_by => self.caller_channel_uuid).any?
+ rescue
+ return nil
+ end
+ end
+
def voicemail_message
begin
return self.call_historyable.voicemail_messages.where(:forwarded_by => self.caller_channel_uuid).first
diff --git a/app/models/call_route.rb b/app/models/call_route.rb
index 28120c1..b4496ab 100644
--- a/app/models/call_route.rb
+++ b/app/models/call_route.rb
@@ -238,4 +238,15 @@ class CallRoute < ActiveRecord::Base
end
end
end
+
+ def endpoint
+ if self.endpoint_id.to_i > 0
+ begin
+ return self.endpoint_type.camelize.constantize.where(:id => self.endpoint_id.to_i).first
+ rescue
+ return nil
+ end
+ end
+ end
+
end
diff --git a/app/models/fax_document.rb b/app/models/fax_document.rb
index 080bdaa..be689e2 100644
--- a/app/models/fax_document.rb
+++ b/app/models/fax_document.rb
@@ -52,7 +52,6 @@ class FaxDocument < ActiveRecord::Base
name
end
- private
def render_thumbnails
directory = "/tmp/GS-#{GsParameter.get('GEMEINSCHAFT_VERSION')}/fax_thumbnails/#{self.id}"
system('mkdir -p ' + directory)
@@ -66,7 +65,8 @@ class FaxDocument < ActiveRecord::Base
system("rm -rf #{directory}")
self.update_attributes(:document_total_pages => number_of_thumbnails) if self.document_total_pages.nil?
end
-
+
+ private
def convert_pdf_to_tiff
page_size_a4 = '595 842'
page_size_command = "<< /Policies << /PageSize 3 >> /InputAttributes currentpagedevice /InputAttributes get dup { pop 1 index exch undef } forall dup 0 << /PageSize [ #{page_size_a4} ] >> put >> setpagedevice"
diff --git a/app/models/gateway.rb b/app/models/gateway.rb
index 3e791a6..a8df41f 100644
--- a/app/models/gateway.rb
+++ b/app/models/gateway.rb
@@ -1,5 +1,5 @@
class Gateway < ActiveRecord::Base
- TECHNOLOGIES = ['sip']
+ TECHNOLOGIES = ['sip', 'xmpp']
attr_accessible :name, :technology, :inbound, :outbound, :description
diff --git a/app/models/gateway_setting.rb b/app/models/gateway_setting.rb
index c01f0a8..e3eaadb 100644
--- a/app/models/gateway_setting.rb
+++ b/app/models/gateway_setting.rb
@@ -11,6 +11,16 @@ class GatewaySetting < ActiveRecord::Base
'auth_pattern' => 'String',
'number_source' => 'String',
},
+ 'xmpp' => {
+ 'server' => 'String',
+ 'login' => 'String',
+ 'password' => 'String',
+ 'inbound_number' => 'String',
+ 'auth_source' => 'String',
+ 'auth_pattern' => 'String',
+ 'number_source' => 'String',
+ 'destination_domain' => 'String',
+ },
}
attr_accessible :gateway_id, :name, :value, :class_type, :description
diff --git a/app/models/gemeinschaft_setup.rb b/app/models/gemeinschaft_setup.rb
index 6056236..4b4dd37 100644
--- a/app/models/gemeinschaft_setup.rb
+++ b/app/models/gemeinschaft_setup.rb
@@ -6,6 +6,14 @@ class GemeinschaftSetup < ActiveRecord::Base
belongs_to :country
belongs_to :language
+ validates :default_company_name,
+ :presence => true,
+ :uniqueness => true
+
+ validates :default_system_email,
+ :presence => true,
+ :uniqueness => true
+
# Remove the cache which was created by the heater rake task.
#
after_create :expire_cache
diff --git a/app/models/sip_account.rb b/app/models/sip_account.rb
index d35f9b4..444eb12 100644
--- a/app/models/sip_account.rb
+++ b/app/models/sip_account.rb
@@ -133,7 +133,7 @@ class SipAccount < ActiveRecord::Base
end
def registration
- return FreeswitchRegistration.where(:reg_user => self.auth_name).first
+ return SipRegistration.where(:sip_user => self.auth_name).first
end
def call( phone_number )
diff --git a/app/models/sip_registration.rb b/app/models/sip_registration.rb
new file mode 100644
index 0000000..b668301
--- /dev/null
+++ b/app/models/sip_registration.rb
@@ -0,0 +1,21 @@
+class SipRegistration < ActiveRecord::Base
+ # Makes sure that this is a readonly model.
+ def readonly?
+ return true
+ end
+
+ # Prevent objects from being destroyed
+ def before_destroy
+ raise ActiveRecord::ReadOnlyRecord
+ end
+
+ # Prevent objects from being deleted
+ def self.delete_all
+ raise ActiveRecord::ReadOnlyRecord
+ end
+
+ # Prevent objects from being deleted
+ def delete
+ raise ActiveRecord::ReadOnlyRecord
+ end
+end
diff --git a/app/models/user.rb b/app/models/user.rb
index b902b99..afb3f04 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -95,6 +95,8 @@ class User < ActiveRecord::Base
before_destroy :destroy_or_logout_phones
+ after_save :become_a_member_of_default_user_groups
+
def destroy
clean_whitelist_entries
super
@@ -142,6 +144,9 @@ class User < ActiveRecord::Base
self.pin_hash == Digest::SHA2.hexdigest( "#{self.pin_salt}#{entered_pin}" )
end
+ def admin?
+ self.user_groups.include?(UserGroup.find(2))
+ end
private
@@ -207,4 +212,12 @@ class User < ActiveRecord::Base
end
end
+ # Normaly a new user should become a member of default user groups.
+ #
+ def become_a_member_of_default_user_groups
+ UserGroup.where(:id => GsParameter.get('DEFAULT_USER_GROUPS_IDS')).each do |user_group|
+ user_group.user_group_memberships.create(:user_id => self.id)
+ end
+ end
+
end
diff --git a/app/views/access_authorizations/_index_core.html.haml b/app/views/access_authorizations/_index_core.html.haml
index 7469a1d..69c3023 100644
--- a/app/views/access_authorizations/_index_core.html.haml
+++ b/app/views/access_authorizations/_index_core.html.haml
@@ -1,21 +1,22 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('access_authorizations.index.name')
- %th= t('access_authorizations.index.login')
- %th= t('access_authorizations.index.pin')
- %th= t('callthroughs.index.phone_numbers')
-
-
- - for access_authorization in access_authorizations
- - show_path_method = method( :"#{access_authorization.access_authorizationable.class.name.underscore}_access_authorization_path" )
- - edit_path_method = method( :"edit_#{access_authorization.access_authorizationable.class.name.underscore}_access_authorization_path" )
+%table.table.table-striped
+ %thead
%tr
- %td= access_authorization.name
- %td= access_authorization.login
- %td= access_authorization.pin
- %td
- =render 'phone_numbers/listing', :phone_numbers => access_authorization.phone_numbers
- - if access_authorization.phone_numbers.count > 0
- %br
- = link_to t('phone_numbers.index.actions.create'), new_access_authorization_phone_number_path(access_authorization)
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => access_authorization.access_authorizationable, :child => access_authorization} \ No newline at end of file
+ %th= t('access_authorizations.index.name')
+ %th= t('access_authorizations.index.login')
+ %th= t('access_authorizations.index.pin')
+ %th= t('callthroughs.index.phone_numbers')
+
+ %tbody
+ - for access_authorization in access_authorizations
+ - show_path_method = method( :"#{access_authorization.access_authorizationable.class.name.underscore}_access_authorization_path" )
+ - edit_path_method = method( :"edit_#{access_authorization.access_authorizationable.class.name.underscore}_access_authorization_path" )
+ %tr
+ %td= access_authorization.name
+ %td= access_authorization.login
+ %td= access_authorization.pin
+ %td
+ =render 'phone_numbers/listing', :phone_numbers => access_authorization.phone_numbers
+ - if access_authorization.phone_numbers.count > 0
+ %br
+ = link_to t('phone_numbers.index.actions.create'), new_access_authorization_phone_number_path(access_authorization)
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => access_authorization.access_authorizationable, :child => access_authorization} \ No newline at end of file
diff --git a/app/views/acd_agents/_index_core.html.haml b/app/views/acd_agents/_index_core.html.haml
index c082fd1..c8967cd 100644
--- a/app/views/acd_agents/_index_core.html.haml
+++ b/app/views/acd_agents/_index_core.html.haml
@@ -1,18 +1,19 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('acd_agents.index.name')
- %th= t('acd_agents.index.status')
- %th= t('acd_agents.index.last_call')
- %th= t('acd_agents.index.calls_answered')
- %th= t('acd_agents.index.destination')
-
-
- - for acd_agent in acd_agents
+%table.table.table-striped
+ %thead
%tr
- %td= acd_agent.name
- %td= acd_agent.status
- %td= acd_agent.last_call
- %td= acd_agent.calls_answered
- %td= acd_agent.destination
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => acd_agent.automatic_call_distributor, :child => acd_agent}
+ %th= t('acd_agents.index.name')
+ %th= t('acd_agents.index.status')
+ %th= t('acd_agents.index.last_call')
+ %th= t('acd_agents.index.calls_answered')
+ %th= t('acd_agents.index.destination')
+
+ %tbody
+ - for acd_agent in acd_agents
+ %tr
+ %td= acd_agent.name
+ %td= acd_agent.status
+ %td= acd_agent.last_call
+ %td= acd_agent.calls_answered
+ %td= acd_agent.destination
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => acd_agent.automatic_call_distributor, :child => acd_agent}
\ No newline at end of file
diff --git a/app/views/acd_callers/_index_core.html.haml b/app/views/acd_callers/_index_core.html.haml
index 79aa974..3b3327a 100644
--- a/app/views/acd_callers/_index_core.html.haml
+++ b/app/views/acd_callers/_index_core.html.haml
@@ -1,21 +1,22 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('acd_callers.index.channel_uuid')
- %th= t('acd_callers.index.automatic_call_distributor_id')
- %th= t('acd_callers.index.status')
- %th= t('acd_callers.index.enter_time')
- %th= t('acd_callers.index.agent_answer_time')
- %th= t('acd_callers.index.callback_number')
- %th= t('acd_callers.index.callback_attempts')
-
-
- - for acd_caller in acd_callers
+%table.table.table-striped
+ %thead
%tr
- %td= acd_caller.channel_uuid
- %td= acd_caller.automatic_call_distributor_id
- %td= acd_caller.status
- %td= acd_caller.enter_time
- %td= acd_caller.agent_answer_time
- %td= acd_caller.callback_number
- %td= acd_caller.callback_attempts
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => acd_caller} \ No newline at end of file
+ %th= t('acd_callers.index.channel_uuid')
+ %th= t('acd_callers.index.automatic_call_distributor_id')
+ %th= t('acd_callers.index.status')
+ %th= t('acd_callers.index.enter_time')
+ %th= t('acd_callers.index.agent_answer_time')
+ %th= t('acd_callers.index.callback_number')
+ %th= t('acd_callers.index.callback_attempts')
+
+ %tbody
+ - for acd_caller in acd_callers
+ %tr
+ %td= acd_caller.channel_uuid
+ %td= acd_caller.automatic_call_distributor_id
+ %td= acd_caller.status
+ %td= acd_caller.enter_time
+ %td= acd_caller.agent_answer_time
+ %td= acd_caller.callback_number
+ %td= acd_caller.callback_attempts
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => acd_caller} \ No newline at end of file
diff --git a/app/views/addresses/_index_core.html.haml b/app/views/addresses/_index_core.html.haml
index 3645009..975fcee 100644
--- a/app/views/addresses/_index_core.html.haml
+++ b/app/views/addresses/_index_core.html.haml
@@ -1,23 +1,24 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('addresses.index.phone_book_entry_id')
- %th= t('addresses.index.line1')
- %th= t('addresses.index.line2')
- %th= t('addresses.index.street')
- %th= t('addresses.index.zip_code')
- %th= t('addresses.index.city')
- %th= t('addresses.index.country_id')
- %th= t('addresses.index.position')
-
-
- - for address in addresses
+%table.table.table-striped
+ %thead
%tr
- %td= address.phone_book_entry_id
- %td= address.line1
- %td= address.line2
- %td= address.street
- %td= address.zip_code
- %td= address.city
- %td= address.country_id
- %td= address.position
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => address.phone_book_entry, :child => address} \ No newline at end of file
+ %th= t('addresses.index.phone_book_entry_id')
+ %th= t('addresses.index.line1')
+ %th= t('addresses.index.line2')
+ %th= t('addresses.index.street')
+ %th= t('addresses.index.zip_code')
+ %th= t('addresses.index.city')
+ %th= t('addresses.index.country_id')
+ %th= t('addresses.index.position')
+
+ %tbody
+ - for address in addresses
+ %tr
+ %td= address.phone_book_entry_id
+ %td= address.line1
+ %td= address.line2
+ %td= address.street
+ %td= address.zip_code
+ %td= address.city
+ %td= address.country_id
+ %td= address.position
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => address.phone_book_entry, :child => address} \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/_index_core.html.haml b/app/views/automatic_call_distributors/_index_core.html.haml
index 50908f4..e264c29 100644
--- a/app/views/automatic_call_distributors/_index_core.html.haml
+++ b/app/views/automatic_call_distributors/_index_core.html.haml
@@ -1,39 +1,35 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('automatic_call_distributors.index.name')
- %th= t('automatic_call_distributors.index.strategy')
- %th= t('automatic_call_distributors.index.max_callers')
- %th= t('automatic_call_distributors.index.agent_timeout')
- %th= t('automatic_call_distributors.index.retry_timeout')
- %th= t('automatic_call_distributors.index.join')
- %th= t('automatic_call_distributors.index.leave')
- %th= t('automatic_call_distributors.index.phone_numbers')
- %th= t('automatic_call_distributors.index.acd_agents')
-
-
- - for automatic_call_distributor in automatic_call_distributors
+%table.table.table-striped
+ %thead
%tr
- %td= automatic_call_distributor.name
- %td= t("automatic_call_distributors.strategies.#{automatic_call_distributor.strategy}")
- %td= automatic_call_distributor.max_callers
- %td= automatic_call_distributor.agent_timeout
- %td= automatic_call_distributor.retry_timeout
- %td= t("automatic_call_distributors.join_on.#{automatic_call_distributor.join}")
- %td= t("automatic_call_distributors.leave_on.#{automatic_call_distributor.leave}")
-
- %td
- - if automatic_call_distributor.phone_numbers.count > 0
- = render 'phone_numbers/listing', :phone_numbers => automatic_call_distributor.phone_numbers
- %br
- = render :partial => 'shared/create_link', :locals => {:parent => automatic_call_distributor, :child_class => PhoneNumber, :short_link => true}
+ %th= t('automatic_call_distributors.index.name')
+ %th
+ %span.hidden-phone
+ = t('automatic_call_distributors.index.strategy')
+ %th= t('automatic_call_distributors.index.phone_numbers')
+ %th
+ %span.hidden-phone
+ = t('automatic_call_distributors.index.acd_agents')
- %td
- - if automatic_call_distributor.acd_agents.count > 3
- = link_to automatic_call_distributor.acd_agents.count, automatic_call_distributor_acd_agents_path(automatic_call_distributor)
- %br
- - elsif automatic_call_distributor.acd_agents.count > 0
- = render 'acd_agents/listing', :acd_agents => automatic_call_distributor.acd_agents
- %br
- = render :partial => 'shared/create_link', :locals => {:parent => automatic_call_distributor, :child_class => AcdAgent, :short_link => true}
+ %tbody
+ - for automatic_call_distributor in automatic_call_distributors
+ %tr
+ %td
+ %span.hidden-phone
+ = automatic_call_distributor.name
+ %span.visible-phone
+ = truncate(automatic_call_distributor.name, :length => 8)
+ %td
+ %span.hidden-phone
+ = t("automatic_call_distributors.strategies.#{automatic_call_distributor.strategy}")
+ %td
+ - if automatic_call_distributor.phone_numbers.any?
+ = render 'phone_numbers/listing', :phone_numbers => automatic_call_distributor.phone_numbers
+ %td
+ %span.hidden-phone
+ - if automatic_call_distributor.acd_agents.count > 3
+ = link_to automatic_call_distributor.acd_agents.count, automatic_call_distributor_acd_agents_path(automatic_call_distributor)
+ %br
+ - elsif automatic_call_distributor.acd_agents.any?
+ = render 'acd_agents/listing', :acd_agents => automatic_call_distributor.acd_agents
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => automatic_call_distributor.automatic_call_distributorable, :child => automatic_call_distributor} \ No newline at end of file
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => automatic_call_distributor.automatic_call_distributorable, :child => automatic_call_distributor} \ No newline at end of file
diff --git a/app/views/automatic_call_distributors/show.html.haml b/app/views/automatic_call_distributors/show.html.haml
index c29f2df..a461652 100644
--- a/app/views/automatic_call_distributors/show.html.haml
+++ b/app/views/automatic_call_distributors/show.html.haml
@@ -1,47 +1,60 @@
- content_for :title, t("automatic_call_distributors.show.page_title")
-%table{:class => 'table table-striped'}
- %tr
- %th= t('automatic_call_distributors.show.name') + ":"
- %td= @automatic_call_distributor.name
- %tr
- %th= t('automatic_call_distributors.show.strategy') + ":"
- %td= t("automatic_call_distributors.strategies.#{@automatic_call_distributor.strategy}")
- %tr
- %th= t('automatic_call_distributors.show.max_callers') + ":"
- %td= @automatic_call_distributor.max_callers
- %tr
- %th= t('automatic_call_distributors.show.agent_timeout') + ":"
- %td= @automatic_call_distributor.agent_timeout
- %tr
- %th= t('automatic_call_distributors.show.retry_timeout') + ":"
- %td= @automatic_call_distributor.retry_timeout
- %tr
- %th= t('automatic_call_distributors.show.join') + ":"
- %td= t("automatic_call_distributors.join_on.#{@automatic_call_distributor.join}")
- %tr
- %th= t('automatic_call_distributors.show.leave') + ":"
- %td= t("automatic_call_distributors.leave_on.#{@automatic_call_distributor.leave}")
-
- %tr
- %th= t('automatic_call_distributors.show.announce_position') + ":"
- %td= @automatic_call_distributor.announce_position
-
- %tr
- %th= t('automatic_call_distributors.show.announce_call_agents') + ":"
- %td= @automatic_call_distributor.announce_call_agents
-
- %tr
- %th= t('automatic_call_distributors.show.greeting') + ":"
- %td= @automatic_call_distributor.greeting
-
- %tr
- %th= t('automatic_call_distributors.show.goodbye') + ":"
- %td= @automatic_call_distributor.goodbye
-
- %tr
- %th= t('automatic_call_distributors.show.music') + ":"
- %td= @automatic_call_distributor.music
+%table.table.table-striped
+ %tbody
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.name') + ":"
+ %td= @automatic_call_distributor.name
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.strategy') + ":"
+ %td= t("automatic_call_distributors.strategies.#{@automatic_call_distributor.strategy}")
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.max_callers') + ":"
+ %td= @automatic_call_distributor.max_callers
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.agent_timeout') + ":"
+ %td= @automatic_call_distributor.agent_timeout
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.retry_timeout') + ":"
+ %td= @automatic_call_distributor.retry_timeout
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.join') + ":"
+ %td= t("automatic_call_distributors.join_on.#{@automatic_call_distributor.join}")
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.leave') + ":"
+ %td= t("automatic_call_distributors.leave_on.#{@automatic_call_distributor.leave}")
+
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.announce_position') + ":"
+ %td= @automatic_call_distributor.announce_position
+
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.announce_call_agents') + ":"
+ %td= @automatic_call_distributor.announce_call_agents
+
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.greeting') + ":"
+ %td= @automatic_call_distributor.greeting
+
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.goodbye') + ":"
+ %td= @automatic_call_distributor.goodbye
+
+ %tr
+ %td
+ %strong= t('automatic_call_distributors.show.music') + ":"
+ %td= @automatic_call_distributor.music
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @automatic_call_distributor.automatic_call_distributorable, :child => @automatic_call_distributor }
diff --git a/app/views/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml
index 27ad86f..878e0e2 100644
--- a/app/views/call_forwards/_index_core.html.haml
+++ b/app/views/call_forwards/_index_core.html.haml
@@ -1,31 +1,32 @@
-%table{:class => 'table table-striped'}
- %tr
- - if !@phone_number
- %th= t('call_forwards.index.phone_number_id')
- %th= t('call_forwards.index.call_forward_case_id')
- %th= t('call_forwards.index.timeout')
- %th= t('call_forwards.index.destination')
- %th= t('call_forwards.index.source')
- - if GuiFunction.display?('depth_field_value_in_index_table', current_user)
- %th= t('call_forwards.index.depth')
- %th= t('call_forwards.index.active')
-
-
- - for call_forward in call_forwards
+%table.table.table-striped
+ %thead
%tr
- if !@phone_number
- %td= call_forward.phone_number
- %td= t("call_forward_cases.#{call_forward.call_forward_case.value}")
- %td= call_forward.timeout
- %td
- = call_forward.destination
- - if call_forward.call_forwardable_type
- %br
- = call_forward.call_forwardable_type
- - if call_forward.call_forwardable
- = ": #{call_forward.call_forwardable}"
- %td= call_forward.source
+ %th= t('call_forwards.index.phone_number_id')
+ %th= t('call_forwards.index.call_forward_case_id')
+ %th= t('call_forwards.index.timeout')
+ %th= t('call_forwards.index.destination')
+ %th= t('call_forwards.index.source')
- if GuiFunction.display?('depth_field_value_in_index_table', current_user)
- %td= call_forward.depth
- %td= call_forward.active
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.phone_number, :child => call_forward} \ No newline at end of file
+ %th= t('call_forwards.index.depth')
+ %th= t('call_forwards.index.active')
+
+ %tbody
+ - for call_forward in call_forwards
+ %tr
+ - if !@phone_number
+ %td= call_forward.phone_number
+ %td= t("call_forward_cases.#{call_forward.call_forward_case.value}")
+ %td= call_forward.timeout
+ %td
+ = call_forward.destination
+ - if call_forward.call_forwardable_type
+ %br
+ = call_forward.call_forwardable_type
+ - if call_forward.call_forwardable
+ = ": #{call_forward.call_forwardable}"
+ %td= call_forward.source
+ - if GuiFunction.display?('depth_field_value_in_index_table', current_user)
+ %td= call_forward.depth
+ %td= call_forward.active
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.phone_number, :child => call_forward} \ No newline at end of file
diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml
index f9d2150..4ca340d 100644
--- a/app/views/call_histories/_index_core.html.haml
+++ b/app/views/call_histories/_index_core.html.haml
@@ -1,58 +1,85 @@
= render :partial => "call_histories/navigation"
-%table{:class => 'table table-striped'}
- - for call_history in call_histories
- - phone_number = call_history.display_number
- - voicemail_message = call_history.voicemail_message
- - if phone_number
- - phone_book_entry = call_history.phone_book_entry_by_number(phone_number)
- %tr.call-history-entry
- %td.thumbnail
- - image = call_history.display_image(:small, phone_book_entry)
- - if image
- = image_tag(image, :itemprop => 'image')
- %td.time
- - if voicemail_message
- .voicemail-message
- %a{:href => sip_account_voicemail_messages_path(@sip_account, :anchor => "message_#{voicemail_message.id}")}
- = image_tag('icons/gs_envelope_16x.png', :class => 'display')
- = call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
- - elsif call_history.entry_type == 'forwarded'
- .call-forwarded= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
- - if call_history.callee_account_type.to_s.downcase == 'voicemail'
- = t("call_histories.index.voicemail")
+%table.table.table-striped
+ %thead
+ %tr
+ %th
+ Datum
+ %th
+ Uhrzeit
+ %th
+ Misc
+ %th
+ Avatar
+ %th
+ Teilnehmer
+ %th
+ Status
+
+ %tbody
+ - for call_history in call_histories
+ - if !call_history.display_number.blank?
+ - phone_book_entry = call_history.phone_book_entry_by_number(call_history.display_number)
+ %tr{:id => "call_history_id_#{call_history.id}_tr", :class => (call_history.duration.blank? ? 'warning' : '')}
+ %td
+ = l call_history.start_stamp, :format => :date_only
+ %td
+ = l call_history.start_stamp, :format => :short
+ %td
+ - if call_history.voicemail_message?
+ .voicemail-message
+ %a{:href => sip_account_voicemail_messages_path(@sip_account, :anchor => "message_#{call_history.voicemail_message.id}")}
+ = image_tag('icons/gs_envelope_16x.png')
+ = call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
+
+ - else
+ - case call_history.entry_type
+ - when 'forwarded'
+ .call-forwarded= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
+ - if call_history.callee_account_type.to_s.downcase == 'voicemail'
+ = t("call_histories.index.voicemail")
+ - else
+ = call_history.destination_number
+ - when 'dialed'
+ .call-placed= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
+ - when 'received'
+ .call-received= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
+ - when 'missed'
+ .call-missed= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
+ - else
+ .call-unknown
+ = t("call_histories.index.#{call_history.entry_type}")
+ = call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
+
+ - if call_history.forwarding_service && call_history.entry_type != 'forwarded'
+ = t("call_histories.index.forwarded_by")
+ = call_history.display_auth_account_name
+ %td
+ - image = call_history.display_image(:small, phone_book_entry)
+ - if image
+ %ul.thumbnails
+ %li.span1
+ %div.thumbnail
+ %a.thumbnail{:href => call_history.display_image(:profile, phone_book_entry)}
+ =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded')
+ %td
+ - display_name = call_history.display_name
+ - if display_name.blank?
+ - display_name = phone_book_entry.to_s
+ - if phone_book_entry
+ %a.name{:href => phone_book_phone_book_entry_path(phone_book_entry.phone_book, phone_book_entry), :itemprop => "name"}= display_name
+ - else
+ .name= display_name
+ .phone= call_history.display_number
+ %td
+ - if call_history.display_duration
+ = call_history.display_duration
- else
- = call_history.destination_number
- - elsif call_history.entry_type == 'dialed'
- .call-placed= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
- - elsif call_history.entry_type == 'received'
- .call-received= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
- - elsif call_history.entry_type == 'missed'
- .call-missed= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
- - else
- .call-unknown
- = t("call_histories.index.#{call_history.entry_type}")
- = call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format"))
- - if call_history.forwarding_service && call_history.entry_type != 'forwarded'
- = t("call_histories.index.forwarded_by")
- = call_history.display_auth_account_name
- %td.user
- - display_name = call_history.display_name
- - if display_name.blank?
- - display_name = phone_book_entry.to_s
- - if phone_book_entry
- %a.name{:href => phone_book_phone_book_entry_path(phone_book_entry.phone_book, phone_book_entry), :itemprop => "name"}= display_name
- - else
- .name= display_name
- .phone= phone_number
- %td.status
- - if call_history.display_duration
- .duration= call_history.display_duration
- - else
- .disposition= t("call_histories.call_results.#{call_history.result}")
- %td.actions
- - if @sip_account.registration && can?(:call, call_history)
- = link_to t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put
- %td.actions
- - if can? :destroy, call_history
- = link_to t('call_histories.index.actions.destroy'), sip_account_call_history_path(@sip_account, call_history), :method => :delete
+ = t("call_histories.call_results.#{call_history.result}")
+ %td
+ - if @sip_account.registration && can?(:call, call_history)
+ = link_to raw("<i class = 'icon-bell'></i> ") + t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put, :class => 'btn btn-mini'
+ %td
+ - if can? :destroy, call_history
+ = link_to raw("<i class = 'icon-trash icon-white'></i> ") + t('call_histories.index.actions.destroy'), [@sip_account, call_history], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger'
+ \ No newline at end of file
diff --git a/app/views/call_histories/destroy.js.erb b/app/views/call_histories/destroy.js.erb
new file mode 100644
index 0000000..d952c58
--- /dev/null
+++ b/app/views/call_histories/destroy.js.erb
@@ -0,0 +1 @@
+$('#call_history_id_<%= @call_history.id %>_tr').remove(); \ No newline at end of file
diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml
index 5dc7c21..f0acebb 100644
--- a/app/views/call_routes/_index_core.html.haml
+++ b/app/views/call_routes/_index_core.html.haml
@@ -1,21 +1,27 @@
- cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do
- %table{:class => 'table table-striped'}
- %tr
- %th= t('call_routes.index.name')
- %th= t('route_elements.index.pattern')
- %th= t('call_routes.index.endpoint_type')
- %th{:colspan => '3'}
-
- - for call_route in call_routes
- - cache(['call_route_single_table_row', call_route, call_routes.count]) do
- %tr
- %td= call_route.name
- %td
- - if call_route.route_elements.any?
- = call_route.route_elements.first.pattern
- - if call_route.route_elements.count > 1
- = ', ...'
- - else
- = '-'
- %td= call_route.endpoint_type
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} \ No newline at end of file
+ %table.table.table-striped
+ %thead
+ %tr
+ %th= t('call_routes.index.name')
+ %th= t('route_elements.index.pattern')
+ %th= t('call_routes.index.endpoint')
+
+ %tbody
+ - for call_route in call_routes
+ - cache(['call_route_single_table_row', call_route, call_routes.count]) do
+ %tr
+ %td= call_route.name
+ %td
+ - if call_route.route_elements.any?
+ = call_route.route_elements.first.pattern
+ - if call_route.route_elements.count > 1
+ = ', ...'
+ - else
+ = '-'
+ %td
+ - endpoint = call_route.endpoint
+ - if endpoint
+ = endpoint
+ - else
+ = call_route.endpoint_type
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route}
diff --git a/app/views/call_routes/index.html.haml b/app/views/call_routes/index.html.haml
index bd4468c..488e1c7 100644
--- a/app/views/call_routes/index.html.haml
+++ b/app/views/call_routes/index.html.haml
@@ -1,7 +1,7 @@
- content_for :title, t("call_routes.index.page_title")
- if @call_routes && @call_routes.count > 0
- %table{:class => 'table table-striped'}
+ %table.table.table-striped
- @routing_tables.each do |routing_table|
%tr
%td{:colspan => 3}
diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml
index 70fe13e..09daf53 100644
--- a/app/views/call_routes/show.html.haml
+++ b/app/views/call_routes/show.html.haml
@@ -7,11 +7,12 @@
%strong= t('call_routes.show.name') + ":"
= @call_route.name
%p
- %strong= t('call_routes.show.endpoint_type') + ":"
- = @call_route.endpoint_type
-%p
- %strong= t('call_routes.show.endpoint_id') + ":"
- = @call_route.endpoint_id
+ %strong= t('call_routes.show.endpoint') + ":"
+ - endpoint = @call_route.endpoint
+ - if endpoint
+ = endpoint
+ - else
+ = @call_route.endpoint_type
= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route }
diff --git a/app/views/calls/_index_core.html.haml b/app/views/calls/_index_core.html.haml
index 09b7da6..10f79f1 100644
--- a/app/views/calls/_index_core.html.haml
+++ b/app/views/calls/_index_core.html.haml
@@ -1,9 +1,10 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('calls.index.uuid')
-
-
- - for call in @calls
+%table.table.table-striped
+ %thead
%tr
- %td
- = call.uuid
+ %th= t('calls.index.uuid')
+
+ %tbody
+ - for call in @calls
+ %tr
+ %td
+ = call.uuid
diff --git a/app/views/callthroughs/_index_core.html.haml b/app/views/callthroughs/_index_core.html.haml
index d1c171b..d0d6ab6 100644
--- a/app/views/callthroughs/_index_core.html.haml
+++ b/app/views/callthroughs/_index_core.html.haml
@@ -1,17 +1,26 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('callthroughs.index.name')
- %th= t('callthroughs.index.phone_numbers')
- %th= t('callthroughs.index.access_authorized_phone_numbers')
- - if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true
- %th= t('callthroughs.index.whitelist_phone_numbers')
-
-
- - for callthrough in callthroughs
+%table.table.table-striped
+ %thead
%tr
- %td= callthrough.name
- %td=render 'phone_numbers/listing', :phone_numbers => callthrough.phone_numbers
- %td=render 'phone_numbers/listing', :phone_numbers => callthrough.access_authorization_phone_numbers
+ %th= t('callthroughs.index.name')
+ %th= t('callthroughs.index.phone_numbers')
+ %th
+ %span.hidden-phone
+ = t('callthroughs.index.access_authorized_phone_numbers')
- if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true
- %td=render 'phone_numbers/listing', :phone_numbers => callthrough.whitelisted_phone_numbers
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => callthrough.tenant, :child => callthrough} \ No newline at end of file
+ %th
+ %span.hidden-phone
+ = t('callthroughs.index.whitelist_phone_numbers')
+
+ %tbody
+ - for callthrough in callthroughs
+ %tr
+ %td= callthrough.name
+ %td=render 'phone_numbers/listing', :phone_numbers => callthrough.phone_numbers
+ %td
+ %span.hidden-phone
+ =render 'phone_numbers/listing', :phone_numbers => callthrough.access_authorization_phone_numbers
+ - if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true
+ %td
+ %span.hidden-phone
+ =render 'phone_numbers/listing', :phone_numbers => callthrough.whitelisted_phone_numbers
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => callthrough.tenant, :child => callthrough} \ No newline at end of file
diff --git a/app/views/conference_invitees/_index_core.html.haml b/app/views/conference_invitees/_index_core.html.haml
index 1d6ab2e..25eb4ec 100644
--- a/app/views/conference_invitees/_index_core.html.haml
+++ b/app/views/conference_invitees/_index_core.html.haml
@@ -1,17 +1,18 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('conference_invitees.index.phone_book_entry_id')
- %th= t('conference_invitees.index.phone_number')
- %th= t('conference_invitees.index.pin')
- %th= t('conference_invitees.index.speaker')
- %th= t('conference_invitees.index.moderator')
-
-
- - for conference_invitee in conference_invitees
+%table.table.table-striped
+ %thead
%tr
- %td= conference_invitee.phone_book_entry || '-'
- %td= conference_invitee.phone_number
- %td= conference_invitee.pin
- %td= conference_invitee.speaker
- %td= conference_invitee.moderator
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => conference_invitee.conference, :child => conference_invitee} \ No newline at end of file
+ %th= t('conference_invitees.index.phone_book_entry_id')
+ %th= t('conference_invitees.index.phone_number')
+ %th= t('conference_invitees.index.pin')
+ %th= t('conference_invitees.index.speaker')
+ %th= t('conference_invitees.index.moderator')
+
+ %tbody
+ - for conference_invitee in conference_invitees
+ %tr
+ %td= conference_invitee.phone_book_entry || '-'
+ %td= conference_invitee.phone_number
+ %td= conference_invitee.pin
+ %td= conference_invitee.speaker
+ %td= conference_invitee.moderator
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => conference_invitee.conference, :child => conference_invitee} \ No newline at end of file
diff --git a/app/views/conferences/_index_core.html.haml b/app/views/conferences/_index_core.html.haml
index 50ea1c8..18ef6b0 100644
--- a/app/views/conferences/_index_core.html.haml
+++ b/app/views/conferences/_index_core.html.haml
@@ -1,53 +1,42 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('conferences.index.name')
- - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count
- %th= t('conferences.index.start')
- %th= t('conferences.index.end')
- %th= t('conferences.index.phone_numbers')
- - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count
- %th= t('conferences.index.pin')
- %th= t('conferences.index.max_members')
- %th= t('conferences.index.number_of_invitees')
- %th= t('conferences.index.flags')
-
-
- - for conference in conferences
- - parent = conference.conferenceable
+%table.table.table-striped
+ %thead
%tr
- %td= conference.name
- - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count
+ %th= t('conferences.index.name')
+ %th
+ %span.hidden-phone
+ = t('conferences.index.phone_numbers')
+ %th
+ %span.hidden-phone
+ = t('conferences.index.flags')
+
+ %tbody
+ - for conference in conferences
+ - parent = conference.conferenceable
+ %tr
%td
- - if conference.start
- = l conference.start, :format => :long
- - else
- = '-'
+ %span.hidden-phone
+ = conference.name
+ %span.visible-phone
+ = truncate(conference.name, :length => 8)
%td
- - if conference.end
- = l conference.end, :format => :long
- - else
- = '-'
- %td
- - if conference.phone_numbers.count > 0
- = render 'phone_numbers/listing', :phone_numbers => conference.phone_numbers.order(:number)
- %br
- = render :partial => 'shared/create_link', :locals => {:parent => conference, :child_class => PhoneNumber, :short_link => true}
+ - if conference.phone_numbers.any?
+ = render 'phone_numbers/listing', :phone_numbers => conference.phone_numbers.order(:number)
- - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count
%td
- - if !conference.pin.blank?
- = conference.pin
- - else
- = '-'
- %td= conference.max_members
- %td= conference.conference_invitees.count
- %td
- %ul
- - if conference.open_for_anybody
- %li= t('conferences.index.open_for_anybody')
- - if conference.announce_new_member_by_name
- %li= t('conferences.index.announce_new_member_by_name')
- - if conference.announce_left_member_by_name
- %li= t('conferences.index.announce_left_member_by_name')
+ - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count
+ - if !conference.pin.blank?
+ %span.label.label-info
+ = "PIN: #{conference.pin}"
+
+ %span.hidden-phone
+ - if conference.open_for_anybody
+ %span.label
+ = t('conferences.index.open_for_anybody')
+ - if conference.announce_new_member_by_name
+ %span.label
+ = t('conferences.index.announce_new_member_by_name')
+ - if conference.announce_left_member_by_name
+ %span.label
+ = t('conferences.index.announce_left_member_by_name')
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => parent, :child => conference} \ No newline at end of file
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => parent, :child => conference} \ No newline at end of file
diff --git a/app/views/config_polycom/_call_history.xml.haml b/app/views/config_polycom/_call_history.xml.haml
index 4ecb8fe..38ad844 100644
--- a/app/views/config_polycom/_call_history.xml.haml
+++ b/app/views/config_polycom/_call_history.xml.haml
@@ -3,7 +3,7 @@
%head
%title= @phone_xml_object[:title]
%body
- %table{:class => 'table table-striped'}{ :border => 0 }
+ %table.table.table-striped{ :border => 0 }
%tbody
- @phone_xml_object[:entries].each do |entry|
%tr
diff --git a/app/views/config_polycom/_phone_book.xml.haml b/app/views/config_polycom/_phone_book.xml.haml
index 3867f41..27110f5 100644
--- a/app/views/config_polycom/_phone_book.xml.haml
+++ b/app/views/config_polycom/_phone_book.xml.haml
@@ -3,7 +3,7 @@
%head
%title= @phone_xml_object[:title]
%body
- %table{:class => 'table table-striped'}{ :border => 0 }
+ %table.table.table-striped{ :border => 0 }
%tbody
- @phone_xml_object[:entries].each do |entry|
%tr
diff --git a/app/views/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml
index 5a04bf0..d694f8f 100644
--- a/app/views/fax_accounts/_index_core.html.haml
+++ b/app/views/fax_accounts/_index_core.html.haml
@@ -1,35 +1,48 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('fax_accounts.index.name')
- %th
- = t('fax_accounts.index.phone_numbers')
- %br
- = t('fax_accounts.index.station_id')
- %th
- = t('fax_accounts.index.received')
- = '/'
- = t('fax_accounts.index.sent')
- %br
- %small
- = t('fax_accounts.index.last_update')
-
-
- - for fax_account in fax_accounts
+%table.table.table-striped
+ %thead
%tr
- %td= truncate(fax_account.name, :length => 15)
- %td
- =render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number)
+ %th
+ %span.hidden-phone
+ = t('fax_accounts.index.name')
+ %th
+ = t('fax_accounts.index.phone_numbers')
%br
- = truncate(fax_account.station_id, :length => 20)
- %td
- = link_to fax_account.fax_documents.inbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.inbound.first.try(:id)}")
- = '/'
- = link_to fax_account.fax_documents.outbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.outbound.first.try(:id)}")
- - if fax_account.fax_documents.count > 0
+ = t('fax_accounts.index.station_id')
+ %th
+ %span.hidden-phone
+ = t('fax_accounts.index.received')
+ = '/'
+ = t('fax_accounts.index.sent')
%br
%small
- = time_ago_in_words(fax_account.fax_documents.order(:updated_at).last.updated_at)
- %td
- - if can?(:new, FaxDocument, :fax_account_id => fax_account.id)
- = link_to t('fax_accounts.index.send_a_fax'), new_fax_account_fax_document_path(fax_account)
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_account.fax_accountable, :child => fax_account} \ No newline at end of file
+ = t('fax_accounts.index.last_update')
+
+ %tbody
+ - for fax_account in fax_accounts
+ %tr
+ %td
+ %span.hidden-phone
+ =fax_account.name
+ %td
+ =render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number)
+ %br
+ = truncate(fax_account.station_id, :length => 20)
+ %td
+ - inbound_documents = fax_account.fax_documents.where(:inbound => true)
+ - outbound_documents = fax_account.fax_documents.where(:inbound => [false, nil])
+ = link_to inbound_documents.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{inbound_documents.first.try(:id)}")
+ = '/'
+ = link_to outbound_documents.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{outbound_documents.first.try(:id)}")
+ - if fax_account.fax_documents.any?
+ %br
+ %small
+ = time_ago_in_words(fax_account.fax_documents.order(:updated_at).last.updated_at)
+ %td
+ - if can?(:new, FaxDocument, :fax_account_id => fax_account.id)
+ %a.btn.btn-mini.btn-primary{:href => new_fax_account_fax_document_path(fax_account) }
+ %i.icon-print.icon-white
+ %span.hidden-phone
+ =t('fax_accounts.index.send_a_fax')
+
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_account.fax_accountable, :child => fax_account} \ No newline at end of file
diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml
index 1265716..8559f1c 100644
--- a/app/views/fax_documents/_index_core.html.haml
+++ b/app/views/fax_documents/_index_core.html.haml
@@ -1,33 +1,36 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('fax_documents.index.sent_at')
- %th= t('fax_documents.index.state')
- %th= t('fax_documents.index.result')
- %th
- = t('fax_documents.index.phone_number')
- %br
- = t('fax_documents.index.remote_station_id')
- %th= t('fax_documents.index.thumbnails')
+%table.table.table-striped
+ %thead
+ %tr
+ %th= t('fax_documents.index.sent_at')
+ %th= t('fax_documents.index.state')
+ %th= t('fax_documents.index.result')
+ %th
+ = t('fax_documents.index.phone_number')
+ %br
+ = t('fax_documents.index.remote_station_id')
+ %th= t('fax_documents.index.thumbnails')
-
- - for fax_document in fax_documents
- %tr{:id => "fax_document_#{fax_document.id}"}
- - if fax_document.sent_at
- %td= "#{fax_document.inbound ? '&#8680;' : '&#8678;'} #{fax_document.sent_at}".html_safe
- %td= t("fax_documents.states.#{fax_document.state}")
- %td= t("fax_documents.result_codes.code_#{fax_document.result_code}") + " (#{fax_document.result_code})"
- - else
- %td{ :colspan => 3 }= t("fax_documents.states.#{fax_document.state}")
- %td
- - if fax_document.inbound
- = "#{fax_document.caller_id_number} #{fax_document.caller_id_name}"
+ %tbody
+ - for fax_document in fax_documents
+ %tr{:id => "fax_document_#{fax_document.id}"}
+ - if fax_document.sent_at
+ %td
+ = "#{fax_document.inbound ? '&#8680;' : '&#8678;'}".html_safe
+ = l fax_document.sent_at, :format => :short
+ %td= t("fax_documents.states.#{fax_document.state}")
+ %td= t("fax_documents.result_codes.code_#{fax_document.result_code}") + " (#{fax_document.result_code})"
- else
- = fax_document.destination_phone_number
- %br
- = fax_document.remote_station_id
- %td
- - fax_document.fax_thumbnails.limit(5).each do |fax_thumbnail|
- =image_tag fax_thumbnail.thumbnail_url(:mini), :class => 'FaxThumbnail', :alt => "Thumbnail of page \##{fax_thumbnail.position}"
- - if can?(:show, fax_document) && !fax_document.document.blank? && File.readable?(fax_document.document.path)
- = link_to t('fax_documents.index.actions.download'), fax_account_fax_document_path(@fax_account, fax_document, :format => :pdf), :method => :get
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_document.fax_account, :child => fax_document}
+ %td{ :colspan => 3 }= t("fax_documents.states.#{fax_document.state}")
+ %td
+ - if fax_document.inbound
+ = "#{fax_document.caller_id_number} #{fax_document.caller_id_name}"
+ - else
+ = fax_document.destination_phone_number
+ %br
+ = fax_document.remote_station_id
+ %td
+ - fax_document.fax_thumbnails.limit(5).each do |fax_thumbnail|
+ =image_tag fax_thumbnail.thumbnail_url(:mini), :class => 'FaxThumbnail', :alt => "Thumbnail of page \##{fax_thumbnail.position}"
+ - if can?(:show, fax_document) && !fax_document.document.blank? && File.readable?(fax_document.document.path)
+ = link_to t('fax_documents.index.actions.download'), fax_account_fax_document_path(@fax_account, fax_document, :format => :pdf), :method => :get
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_document.fax_account, :child => fax_document}
diff --git a/app/views/freeswitch_voicemail_msgs/_index_core.html.haml b/app/views/freeswitch_voicemail_msgs/_index_core.html.haml
index 2ada034..db0f7d7 100644
--- a/app/views/freeswitch_voicemail_msgs/_index_core.html.haml
+++ b/app/views/freeswitch_voicemail_msgs/_index_core.html.haml
@@ -1,12 +1,13 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('freeswitch_voicemail_msgs.index.created_epoch')
- %th= t('freeswitch_voicemail_msgs.index.message_len')
- %th= t('freeswitch_voicemail_msgs.index.file_path')
-
-
- - for freeswitch_voicemail_msg in freeswitch_voicemail_msgs
+%table.table.table-striped
+ %thead
%tr
- %td= freeswitch_voicemail_msg.created_epoch
- %td= freeswitch_voicemail_msg.message_len
- %td= freeswitch_voicemail_msg.file_path \ No newline at end of file
+ %th= t('freeswitch_voicemail_msgs.index.created_epoch')
+ %th= t('freeswitch_voicemail_msgs.index.message_len')
+ %th= t('freeswitch_voicemail_msgs.index.file_path')
+
+ %tbody
+ - for freeswitch_voicemail_msg in freeswitch_voicemail_msgs
+ %tr
+ %td= freeswitch_voicemail_msg.created_epoch
+ %td= freeswitch_voicemail_msg.message_len
+ %td= freeswitch_voicemail_msg.file_path \ No newline at end of file
diff --git a/app/views/gateway_parameters/_index_core.html.haml b/app/views/gateway_parameters/_index_core.html.haml
index 0d00aaf..5babd32 100644
--- a/app/views/gateway_parameters/_index_core.html.haml
+++ b/app/views/gateway_parameters/_index_core.html.haml
@@ -1,13 +1,14 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('gateway_parameters.index.name')
- %th= t('gateway_parameters.index.value')
- %th= t('gateway_parameters.index.description')
-
-
- - for gateway_parameter in gateway_parameters
+%table.table.table-striped
+ %thead
%tr
- %td= gateway_parameter.name
- %td= gateway_parameter.value
- %td= gateway_parameter.description
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_parameter.gateway, :child => gateway_parameter}
+ %th= t('gateway_parameters.index.name')
+ %th= t('gateway_parameters.index.value')
+ %th= t('gateway_parameters.index.description')
+
+ %tbody
+ - for gateway_parameter in gateway_parameters
+ %tr
+ %td= gateway_parameter.name
+ %td= gateway_parameter.value
+ %td= gateway_parameter.description
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_parameter.gateway, :child => gateway_parameter}
diff --git a/app/views/gateway_settings/_form_core.html.haml b/app/views/gateway_settings/_form_core.html.haml
index 3e7dc49..229009b 100644
--- a/app/views/gateway_settings/_form_core.html.haml
+++ b/app/views/gateway_settings/_form_core.html.haml
@@ -1,4 +1,4 @@
.inputs
- = f.input :name, :collection => GatewaySetting::GATEWAY_SETTINGS['sip'].keys, :label => t('gateway_settings.form.name.label'), :hint => conditional_hint('gateway_settings.form.name.hint'), :autofocus => true, :include_blank => false
+ = f.input :name, :collection => GatewaySetting::GATEWAY_SETTINGS[@gateway.technology].keys, :label => t('gateway_settings.form.name.label'), :hint => conditional_hint('gateway_settings.form.name.hint'), :autofocus => true, :include_blank => false
= f.input :value, :label => t('gateway_settings.form.value.label'), :hint => conditional_hint('gateway_settings.form.value.hint')
= f.input :description, :label => t('gateway_settings.form.description.label'), :hint => conditional_hint('gateway_settings.form.description.hint')
diff --git a/app/views/gateway_settings/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml
index ded7eb8..8098488 100644
--- a/app/views/gateway_settings/_index_core.html.haml
+++ b/app/views/gateway_settings/_index_core.html.haml
@@ -1,13 +1,14 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('gateway_settings.index.name')
- %th= t('gateway_settings.index.value')
- %th= t('gateway_settings.index.description')
-
-
- - for gateway_setting in gateway_settings
+%table.table.table-striped
+ %thead
%tr
- %td= gateway_setting.name
- %td= gateway_setting.value
- %td= gateway_setting.description
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_setting.gateway, :child => gateway_setting}
+ %th= t('gateway_settings.index.name')
+ %th= t('gateway_settings.index.value')
+ %th= t('gateway_settings.index.description')
+
+ %tbody
+ - for gateway_setting in gateway_settings
+ %tr
+ %td= gateway_setting.name
+ %td= gateway_setting.value
+ %td= gateway_setting.description
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => gateway_setting.gateway, :child => gateway_setting}
diff --git a/app/views/gateways/_form_core.html.haml b/app/views/gateways/_form_core.html.haml
index 13ed8b1..604c223 100644
--- a/app/views/gateways/_form_core.html.haml
+++ b/app/views/gateways/_form_core.html.haml
@@ -1,6 +1,6 @@
.inputs
= f.input :name, :label => t('gateways.form.name.label'), :hint => conditional_hint('gateways.form.name.hint'), :autofocus => true
- = f.input :technology, :label => t('gateways.form.technology.label'), :hint => conditional_hint('gateways.form.technology.hint')
+ = f.input :technology, :collection => @technologies, :label => t('gateways.form.technology.label'), :hint => conditional_hint('gateways.form.technology.hint'), :include_blank => false
= f.input :inbound, :label => t('gateways.form.inbound.label'), :hint => conditional_hint('gateways.form.inbound.hint')
= f.input :outbound, :label => t('gateways.form.outbound.label'), :hint => conditional_hint('gateways.form.outbound.hint')
= f.input :description, :label => t('gateways.form.description.label'), :hint => conditional_hint('gateways.form.description.hint')
diff --git a/app/views/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml
index 0eec67f..1750212 100644
--- a/app/views/gateways/_index_core.html.haml
+++ b/app/views/gateways/_index_core.html.haml
@@ -1,19 +1,28 @@
- cache(['gateways_table', gateways.count, gateways.first, gateways.last]) do
- %table{:class => 'table table-striped'}
- %tr
- %th= t('gateways.index.name')
- %th= t('gateways.index.technology')
- %th= t('gateways.index.inbound')
- %th= t('gateways.index.outbound')
- %th= t('gateways.index.description')
- %th{:colspan => '3'}
-
- - for gateway in gateways
+ %table.table.table-striped
+ %thead
%tr
- - cache(['gateway_single_table_row_within_tr', gateway, gateways.count]) do
- %td= gateway.name
- %td= gateway.technology
- %td= gateway.inbound
- %td= gateway.outbound
- %td= gateway.description
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gateway} \ No newline at end of file
+ %th= t('gateways.index.name')
+ %th
+ %span.hidden-phone
+ = t('gateways.index.technology')
+ %th= t('gateways.index.inbound')
+ %th= t('gateways.index.outbound')
+ %th
+ %span.hidden-phone
+ = t('gateways.index.description')
+
+ %tbody
+ - for gateway in gateways
+ %tr
+ - cache(['gateway_single_table_row_within_tr', gateway, gateways.count]) do
+ %td= gateway.name
+ %td
+ %span.hidden-phone
+ = gateway.technology
+ %td= gateway.inbound
+ %td= gateway.outbound
+ %td
+ %span.hidden-phone
+ = gateway.description
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gateway} \ No newline at end of file
diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml
index 9a3e1c4..6cf09ec 100644
--- a/app/views/gateways/show.html.haml
+++ b/app/views/gateways/show.html.haml
@@ -1,23 +1,37 @@
- content_for :title, t("gateways.show.page_title")
-%p
- %strong= t('gateways.show.id') + ":"
- = @gateway.id
-%p
- %strong= t('gateways.show.name') + ":"
- = @gateway.name
-%p
- %strong= t('gateways.show.technology') + ":"
- = @gateway.technology
-%p
- %strong= t('gateways.show.inbound') + ":"
- = @gateway.inbound
-%p
- %strong= t('gateways.show.outbound') + ":"
- = @gateway.outbound
-%p
- %strong= t('gateways.show.description') + ":"
- = @gateway.description
+%table.table.table-striped
+ %tbody
+ %tr
+ %td
+ %strong= t('gateways.show.name') + ":"
+ %td
+ = @gateway.name
+ %tr
+ %td
+ %strong= t('gateways.show.id') + ":"
+ %td
+ = @gateway.id
+ %tr
+ %td
+ %strong= t('gateways.show.technology') + ":"
+ %td
+ = @gateway.technology
+ %tr
+ %td
+ %strong= t('gateways.show.inbound') + ":"
+ %td
+ = @gateway.inbound
+ %tr
+ %td
+ %strong= t('gateways.show.outbound') + ":"
+ %td
+ = @gateway.outbound
+ %tr
+ %td
+ %strong= t('gateways.show.description') + ":"
+ %td
+ = @gateway.description
= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gateway }
diff --git a/app/views/gemeinschaft_setups/new.de.html.haml b/app/views/gemeinschaft_setups/new.de.html.haml
index b78e278..cf1f207 100644
--- a/app/views/gemeinschaft_setups/new.de.html.haml
+++ b/app/views/gemeinschaft_setups/new.de.html.haml
@@ -1,27 +1,29 @@
-- content_for :title, 'Gemeinschaft 5.0'
+- content_for :title, "Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}"
- content_for :meta_description, "Konfiguration einer Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} Installation"
= simple_form_for(@gemeinschaft_setup) do |f|
= f.error_notification
%h2 Admin-Konto
- %p
- Dieser erste Benutzer des Systems hat automatisch Admin-Rechte.
= f.simple_fields_for :user, @user do |u|
= render "users/form_core", :f => u
- %h2 SIP-Domain
- %p In den meisten Fällen sollten Sie den gleichen Wert für SIP-Realm und SIP-Domain benutzen. Wenn Sie mit diesen Begriffen nichts anfangen können, dann geben Sie hier bitte die IP-Adresse dieses Servers ein.
-
- = f.simple_fields_for :sip_domain, @sip_domain do |s|
- = render "sip_domains/form_core", :f => s
-
- %h2 Allgemeine Informationen
+ %h2 Konfiguration der Telefonanlage
= f.association :country, :label => t('gemeinschaft_setups.form.country_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.country_id.hint'), :include_blank => false
= f.association :language, :label => t('gemeinschaft_setups.form.language_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.language_id.hint'), :include_blank => false
= f.input :default_area_code, :label => t('gemeinschaft_setups.form.default_area_code.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_area_code.hint')
+ = f.input :default_company_name, :label => t('gemeinschaft_setups.form.default_company_name.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_company_name.hint')
+
+ = f.input :default_system_email, :label => t('gemeinschaft_setups.form.default_system_email.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_system_email.hint')
+
+ %h3 SIP-Domain
+ %p In den meisten Fällen sollten Sie den gleichen Wert für SIP-Realm und SIP-Domain benutzen. Wenn Sie mit diesen Begriffen nichts anfangen können, dann geben Sie hier bitte die IP-Adresse dieses Servers ein.
+
+ = f.simple_fields_for :sip_domain, @sip_domain do |s|
+ = render "sip_domains/form_core", :f => s
+
.actions
= f.button :submit, conditional_t('gemeinschaft_setups.form.submit') \ No newline at end of file
diff --git a/app/views/gemeinschaft_setups/new.html.haml b/app/views/gemeinschaft_setups/new.html.haml
index 1b97cc0..5e2434e 100644
--- a/app/views/gemeinschaft_setups/new.html.haml
+++ b/app/views/gemeinschaft_setups/new.html.haml
@@ -1,27 +1,29 @@
-- content_for :title, 'Gemeinschaft 5.0'
+- content_for :title, "Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}"
- content_for :meta_description, "Configure a new Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} server"
= simple_form_for(@gemeinschaft_setup) do |f|
= f.error_notification
- %h3 Admin user account
- %p
- This is the first user of this system who has admin rights by default.
+ %h2 Admin user account
= f.simple_fields_for :user, @user do |u|
= render "users/form_core", :f => u
- %h3 SIP domain
- %p You should use the same value for the SIP realm as for the SIP domain to ensure compatibility with different phone models. In case you have no clue what we are talking about: Just enter the IP address of this server.
-
- = f.simple_fields_for :sip_domain, @sip_domain do |s|
- = render "sip_domains/form_core", :f => s
-
- %h3 General information
+ %h2 Configuration of this PBX
= f.association :country, :label => t('gemeinschaft_setups.form.country_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.country_id.hint'), :include_blank => false
= f.association :language, :label => t('gemeinschaft_setups.form.language_id.label'), :hint => conditional_hint('gemeinschaft_setups.form.language_id.hint'), :include_blank => false
= f.input :default_area_code, :label => t('gemeinschaft_setups.form.default_area_code.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_area_code.hint')
+ = f.input :default_company_name, :label => t('gemeinschaft_setups.form.default_company_name.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_company_name.hint')
+
+ = f.input :default_system_email, :label => t('gemeinschaft_setups.form.default_system_email.label'), :hint => conditional_hint('gemeinschaft_setups.form.default_system_email.hint')
+
+ %h3 SIP-Domain
+ %p You should use the same value for the SIP realm as for the SIP domain to ensure compatibility with different phone models. In case you have no clue what we are talking about: Just enter the IP address of this server.
+
+ = f.simple_fields_for :sip_domain, @sip_domain do |s|
+ = render "sip_domains/form_core", :f => s
+
.actions
= f.button :submit, conditional_t('gemeinschaft_setups.form.submit') \ No newline at end of file
diff --git a/app/views/gs_cluster_sync_log_entries/_index_core.html.haml b/app/views/gs_cluster_sync_log_entries/_index_core.html.haml
index c9a3e50..4c088ff 100644
--- a/app/views/gs_cluster_sync_log_entries/_index_core.html.haml
+++ b/app/views/gs_cluster_sync_log_entries/_index_core.html.haml
@@ -1,17 +1,18 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('gs_cluster_sync_log_entries.index.gs_node_id')
- %th= t('gs_cluster_sync_log_entries.index.class_name')
- %th= t('gs_cluster_sync_log_entries.index.action')
- %th= t('gs_cluster_sync_log_entries.index.content')
- %th= t('gs_cluster_sync_log_entries.index.status')
-
-
- - for gs_cluster_sync_log_entry in gs_cluster_sync_log_entries
+%table.table.table-striped
+ %thead
%tr
- %td= gs_cluster_sync_log_entry.gs_node_id
- %td= gs_cluster_sync_log_entry.class_name
- %td= gs_cluster_sync_log_entry.action
- %td= gs_cluster_sync_log_entry.content
- %td= gs_cluster_sync_log_entry.status
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_cluster_sync_log_entry} \ No newline at end of file
+ %th= t('gs_cluster_sync_log_entries.index.gs_node_id')
+ %th= t('gs_cluster_sync_log_entries.index.class_name')
+ %th= t('gs_cluster_sync_log_entries.index.action')
+ %th= t('gs_cluster_sync_log_entries.index.content')
+ %th= t('gs_cluster_sync_log_entries.index.status')
+
+ %tbody
+ - for gs_cluster_sync_log_entry in gs_cluster_sync_log_entries
+ %tr
+ %td= gs_cluster_sync_log_entry.gs_node_id
+ %td= gs_cluster_sync_log_entry.class_name
+ %td= gs_cluster_sync_log_entry.action
+ %td= gs_cluster_sync_log_entry.content
+ %td= gs_cluster_sync_log_entry.status
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_cluster_sync_log_entry} \ No newline at end of file
diff --git a/app/views/gs_nodes/_index_core.html.haml b/app/views/gs_nodes/_index_core.html.haml
index 0f1a51c..7da6881 100644
--- a/app/views/gs_nodes/_index_core.html.haml
+++ b/app/views/gs_nodes/_index_core.html.haml
@@ -1,19 +1,20 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('gs_nodes.index.name')
- %th= t('gs_nodes.index.ip_address')
- %th= t('gs_nodes.index.site')
- %th= t('gs_nodes.index.element_name')
- %th= t('gs_nodes.index.push_updates_to')
- %th= t('gs_nodes.index.accepts_updates_from')
-
-
- - for gs_node in gs_nodes
+%table.table.table-striped
+ %thead
%tr
- %td= gs_node.name
- %td= gs_node.ip_address
- %td= gs_node.site
- %td= gs_node.element_name
- %td= gs_node.push_updates_to
- %td= gs_node.accepts_updates_from
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_node} \ No newline at end of file
+ %th= t('gs_nodes.index.name')
+ %th= t('gs_nodes.index.ip_address')
+ %th= t('gs_nodes.index.site')
+ %th= t('gs_nodes.index.element_name')
+ %th= t('gs_nodes.index.push_updates_to')
+ %th= t('gs_nodes.index.accepts_updates_from')
+
+ %tbody
+ - for gs_node in gs_nodes
+ %tr
+ %td= gs_node.name
+ %td= gs_node.ip_address
+ %td= gs_node.site
+ %td= gs_node.element_name
+ %td= gs_node.push_updates_to
+ %td= gs_node.accepts_updates_from
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_node} \ No newline at end of file
diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml
index 3d5f3cf..11d60db 100644
--- a/app/views/gs_parameters/_index_core.html.haml
+++ b/app/views/gs_parameters/_index_core.html.haml
@@ -1,16 +1,25 @@
- cache(['gs_parameters_table_section', gs_parameters.first.section, gs_parameters.reorder(:updated_at).last, gs_parameters.pluck(:id)]) do
- %tr
- %th= t('gs_parameters.index.name')
- - if !@sections
- %th= t('gs_parameters.index.section')
- %th= t('gs_parameters.index.value')
+ %thead
+ %tr
+ %th= t('gs_parameters.index.name')
+ - if !@sections
+ %th= t('gs_parameters.index.section')
+ %th= t('gs_parameters.index.value')
-
- - for gs_parameter in gs_parameters
- - cache(['gs_parameters_table_single_row', gs_parameter]) do
- %tr
- %td= gs_parameter.name
- - if !@sections
- %td= gs_parameter.section
- %td= truncate(gs_parameter.value, :length => 50)
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} \ No newline at end of file
+ %tbody
+ - for gs_parameter in gs_parameters
+ - cache(['gs_parameters_table_single_row', gs_parameter]) do
+ %tr
+ %td
+ %span.hidden-phone
+ = truncate(gs_parameter.name, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH'))
+ %span.visible-phone
+ = truncate(gs_parameter.name, :length => GsParameter.get('MOBILE_MAX_STRING_LENGTH'))
+ - if !@sections
+ %td= gs_parameter.section
+ %td
+ %span.hidden-phone
+ = truncate(gs_parameter.value, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH'))
+ %span.visible-phone
+ = truncate(gs_parameter.value, :length => GsParameter.get('MOBILE_MAX_STRING_LENGTH'))
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} \ No newline at end of file
diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml
index 9132cdd..1189a45 100644
--- a/app/views/gs_parameters/index.html.haml
+++ b/app/views/gs_parameters/index.html.haml
@@ -3,7 +3,7 @@
- if @gs_parameters && @gs_parameters.count > 0
- cache(['gs_parameters_table', I18n.locale, @gs_parameters_unordered.reorder(:updated_at).last, @gs_parameters_unordered.count]) do
- if @sections
- %table{:class => 'table table-striped'}
+ %table.table.table-striped
- @sections.each do |section|
%tr
%td{:colspan => 3}
@@ -11,5 +11,5 @@
-# Template Dependency: gs_parameters/_index_core
= render "index_core", :gs_parameters => @gs_parameters.where(:section => section)
- else
- %table{:class => 'table table-striped'}
+ %table.table.table-striped
= render "index_core", :gs_parameters => @gs_parameters
diff --git a/app/views/gs_parameters/show.html.haml b/app/views/gs_parameters/show.html.haml
index 795d09c..706625f 100644
--- a/app/views/gs_parameters/show.html.haml
+++ b/app/views/gs_parameters/show.html.haml
@@ -1,20 +1,32 @@
-- cache(@gs_parameter) do
- - content_for :title, t("gs_parameters.show.page_title")
+- content_for :title, t("gs_parameters.show.page_title")
- %p
- %strong= t('gs_parameters.show.name') + ":"
- = @gs_parameter.name
- %p
- %strong= t('gs_parameters.show.section') + ":"
- = @gs_parameter.section
- %p
- %strong= t('gs_parameters.show.value') + ":"
- = @gs_parameter.value
- %p
- %strong= t('gs_parameters.show.class_type') + ":"
- = @gs_parameter.class_type
- %p
- %strong= t('gs_parameters.show.description') + ":"
- = @gs_parameter.description
+- cache(@gs_parameter) do
+ %table.table.table-striped
+ %tbody
+ %tr
+ %td
+ %strong= t('gs_parameters.show.name') + ":"
+ %td
+ = @gs_parameter.name
+ %tr
+ %td
+ %strong= t('gs_parameters.show.section') + ":"
+ %td
+ = @gs_parameter.section
+ %tr
+ %td
+ %strong= t('gs_parameters.show.value') + ":"
+ %td
+ = @gs_parameter.value
+ %tr
+ %td
+ %strong= t('gs_parameters.show.class_type') + ":"
+ %td
+ = @gs_parameter.class_type
+ %tr
+ %td
+ %strong= t('gs_parameters.show.description') + ":"
+ %td
+ = @gs_parameter.description
= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gs_parameter } \ No newline at end of file
diff --git a/app/views/gui_functions/_index_core.html.haml b/app/views/gui_functions/_index_core.html.haml
index 0d9454e..00ae4d1 100644
--- a/app/views/gui_functions/_index_core.html.haml
+++ b/app/views/gui_functions/_index_core.html.haml
@@ -1,27 +1,28 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('gui_functions.index.category')
- %th= t('gui_functions.index.name')
- - @user_groups.each do |user_group|
- %th= user_group
-
-
- - for gui_function in gui_functions
+%table.table.table-striped
+ %thead
%tr
- - cache(['gui_functions_table_row', I18n.locale, gui_function]) do
- %td= gui_function.category
- %td
- = gui_function.name
- - if !gui_function.description.blank?
- %br
- %i= gui_function.description
- - @user_groups.each do |user_group|
- - if gui_function.gui_function_memberships.find_by_user_group_id(user_group.id)
- - if gui_function.gui_function_memberships.find_by_user_group_id(user_group.id).activated == true
- %td= 'x'
+ %th= t('gui_functions.index.category')
+ %th= t('gui_functions.index.name')
+ - @user_groups.each do |user_group|
+ %th= user_group
+
+ %tbody
+ - for gui_function in gui_functions
+ %tr
+ - cache(['gui_functions_table_row', I18n.locale, gui_function]) do
+ %td= gui_function.category
+ %td
+ = gui_function.name
+ - if !gui_function.description.blank?
+ %br
+ %i= gui_function.description
+ - @user_groups.each do |user_group|
+ - if gui_function.gui_function_memberships.find_by_user_group_id(user_group.id)
+ - if gui_function.gui_function_memberships.find_by_user_group_id(user_group.id).activated == true
+ %td= 'x'
+ - else
+ %td= ''
- else
- %td= ''
- - else
- %td= 'x'
+ %td= 'x'
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gui_function} \ No newline at end of file
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gui_function} \ No newline at end of file
diff --git a/app/views/hunt_group_members/_index_core.html.haml b/app/views/hunt_group_members/_index_core.html.haml
index c6b7e4a..faef332 100644
--- a/app/views/hunt_group_members/_index_core.html.haml
+++ b/app/views/hunt_group_members/_index_core.html.haml
@@ -1,20 +1,21 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('hunt_group_members.index.name')
- %th= t('hunt_group_members.index.active')
- %th= t('hunt_group_members.index.can_switch_status_itself')
- %th= t('hunt_group_members.index.phone_numbers')
-
-
- - for hunt_group_member in hunt_group_members
+%table.table.table-striped
+ %thead
%tr
- %td= hunt_group_member.name
- %td= hunt_group_member.active
- %td= hunt_group_member.can_switch_status_itself
- %td
- - if hunt_group_member.phone_numbers.count > 0
- =render 'phone_numbers/listing', :phone_numbers => hunt_group_member.phone_numbers
- %br
- = render :partial => 'shared/create_link', :locals => {:parent => hunt_group_member, :child_class => PhoneNumber, :short_link => true}
+ %th= t('hunt_group_members.index.name')
+ %th= t('hunt_group_members.index.active')
+ %th= t('hunt_group_members.index.can_switch_status_itself')
+ %th= t('hunt_group_members.index.phone_numbers')
+
+ %tbody
+ - for hunt_group_member in hunt_group_members
+ %tr
+ %td= hunt_group_member.name
+ %td= hunt_group_member.active
+ %td= hunt_group_member.can_switch_status_itself
+ %td
+ - if hunt_group_member.phone_numbers.count > 0
+ =render 'phone_numbers/listing', :phone_numbers => hunt_group_member.phone_numbers
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => hunt_group_member, :child_class => PhoneNumber, :short_link => true}
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => hunt_group_member.hunt_group, :child => hunt_group_member} \ No newline at end of file
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => hunt_group_member.hunt_group, :child => hunt_group_member} \ No newline at end of file
diff --git a/app/views/hunt_groups/_index_core.html.haml b/app/views/hunt_groups/_index_core.html.haml
index 16b1b5d..6569829 100644
--- a/app/views/hunt_groups/_index_core.html.haml
+++ b/app/views/hunt_groups/_index_core.html.haml
@@ -1,34 +1,38 @@
- show_seconds = hunt_groups.map{|x| ! x.seconds_between_jumps.nil? }.include?(true)
-%table{:class => 'table table-striped'}
- %tr
- %th= t('hunt_groups.index.name')
- %th= t('hunt_groups.index.strategy')
- - if show_seconds
- %th= t('hunt_groups.index.seconds_between_jumps')
- %th= t('hunt_groups.index.phone_numbers')
- %th= t('hunt_groups.index.hunt_group_members')
-
-
- - for hunt_group in hunt_groups
+%table.table.table-striped
+ %thead
%tr
- %td= hunt_group.name
- %td= t("hunt_groups.strategies.#{hunt_group.strategy}")
+ %th= t('hunt_groups.index.name')
+ %th
+ %span.hidden-phone
+ = t('hunt_groups.index.strategy')
- if show_seconds
- %td= hunt_group.seconds_between_jumps
- %td
- - if hunt_group.phone_numbers.count > 0
- =render 'phone_numbers/listing', :phone_numbers => hunt_group.phone_numbers
- %br
- = render :partial => 'shared/create_link', :locals => {:parent => hunt_group, :child_class => PhoneNumber, :short_link => true}
+ %th= t('hunt_groups.index.seconds_between_jumps')
+ %th= t('hunt_groups.index.phone_numbers')
+ %th
+ %span.hidden-phone
+ = t('hunt_groups.index.hunt_group_members')
+
+ %tbody
+ - for hunt_group in hunt_groups
+ %tr
+ %td= hunt_group.name
+ %td
+ %span.hidden-phone
+ = t("hunt_groups.strategies.#{hunt_group.strategy}")
+ - if show_seconds
+ %td= hunt_group.seconds_between_jumps
+ %td
+ - if hunt_group.phone_numbers.any?
+ =render 'phone_numbers/listing', :phone_numbers => hunt_group.phone_numbers
- %td
- - if hunt_group.hunt_group_members.count > 3
- = link_to hunt_group.hunt_group_members.count, hunt_group_hunt_group_members_path(hunt_group)
- %br
- - elsif hunt_group.hunt_group_members.count > 0
- =render 'hunt_group_members/listing', :hunt_group_members => hunt_group.hunt_group_members
- %br
- = render :partial => 'shared/create_link', :locals => {:parent => hunt_group, :child_class => HuntGroupMember, :short_link => true}
+ %td
+ %span.hidden-phone
+ - if hunt_group.hunt_group_members.count > 3
+ = link_to hunt_group.hunt_group_members.count, hunt_group_hunt_group_members_path(hunt_group)
+ %br
+ - elsif hunt_group.hunt_group_members.any?
+ =render 'hunt_group_members/listing', :hunt_group_members => hunt_group.hunt_group_members
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => hunt_group.tenant, :child => hunt_group} \ No newline at end of file
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => hunt_group.tenant, :child => hunt_group} \ No newline at end of file
diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml
index 61ea546..c498943 100644
--- a/app/views/layouts/_footer.html.haml
+++ b/app/views/layouts/_footer.html.haml
@@ -3,10 +3,11 @@
%ul{:class => 'nav nav-pills'}
- if !GsParameter.get('GEMEINSCHAFT_BUILDNAME').nil?
%li
- %a{:href => "http://amooma.de/gemeinschaft/gs5", :ref => 'tooltip', :title => "Gemeinschaft Version " + GsParameter.get('GEMEINSCHAFT_VERSION') + "\nBuild #" + GsParameter.get('GEMEINSCHAFT_BUILDNAME')} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}
+ %a{:href => '#', :rel => "tooltip", :title => "Build ##{GsParameter.get('GEMEINSCHAFT_BUILDNAME')}", :'data-trigger' => 'hover'}
+ = "Gemeinschaft Version #{GsParameter.get('GEMEINSCHAFT_VERSION')}"
- else
%li
- %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}
+ %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft Version #{GsParameter.get('GEMEINSCHAFT_VERSION')}
- if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user)
%li
%a{:href => "http://amooma.de"} Support und Consulting
diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml
index d6f08cb..c2d9946 100644
--- a/app/views/layouts/_navbar.html.haml
+++ b/app/views/layouts/_navbar.html.haml
@@ -7,15 +7,26 @@
%a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
%span.icon-bar
%span.icon-bar
- %span.icon-bar
+ %span.icon-bar
- - if current_user
- .nav-collapse.collapse
- %ul.nav
+ .nav-collapse.collapse
+ %ul.nav
+ - if current_user && GemeinschaftSetup.any? && current_user.admin?
+ - if current_page?(page_help_path)
+ %li.active
+ =link_to 'Admin-Doku', page_help_path
+ - else
+ %li
+ =link_to 'Admin-Doku', page_help_path
+ - if current_user && current_user.sip_accounts.any?
+ %li
+ %a{:href => sip_account_call_histories_path(current_user.sip_accounts.first)}
+ %i.icon-list-alt.icon-white
+ =t("call_histories.index.page_title")
%li
- %a{:href => "#about"} About
- %li.pull_right
- %a{:href => "#contact"} Contact
+ %a{:href => sip_account_voicemail_messages_path(current_user.sip_accounts.first)}
+ %i.icon-volume-up.icon-white
+ =t("voicemail_messages.index.page_title")
- if current_user
%ul.nav.pull-right
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 74331af..33a730f 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -14,10 +14,13 @@
/ HTML5 shim, for IE6-8 support of HTML5 elements
/[if lt IE 9]
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+
%body
.container
.row
.span12
+ = render 'layouts/navbar'
+
- unless response.cache_control[:public]
- flash.each do |name, msg|
%div{:class => "alert alert-#{name == :notice ? "success" : "error"} fade in"}
@@ -27,8 +30,6 @@
- if current_user
= render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder, :separator => "/"
- = render 'layouts/navbar'
-
= yield
.row
diff --git a/app/views/layouts/old-application.html.haml b/app/views/layouts/old-application.html.haml
deleted file mode 100644
index a2afbf8..0000000
--- a/app/views/layouts/old-application.html.haml
+++ /dev/null
@@ -1,48 +0,0 @@
-!!! 5
-<!--[if lt IE 7]> <html lang="en" class="no-js ie6"> <![endif]-->
-<!--[if IE 7]> <html lang="en" class="no-js ie7"> <![endif]-->
-<!--[if IE 8]> <html lang="en" class="no-js ie8"> <![endif]-->
-<!--[if gt IE 8]><!-->
-%html.no-js{ :lang => I18n.locale.to_s }
- <!--<![endif]-->
- %header
- %meta{ :charset => "utf-8" }/
- ~#OPTIMIZE "/" seems to be supposed to make an empty element tag, but it doesn't work. HAML bug?
- %title
- = content_for?(:title) ? yield(:title) : "Untitled"
- %meta{ :name => "viewport", :content => "width=device-width, initial-scale=1.0" }/
- = stylesheet_link_tag "application"
- = javascript_include_tag "application"
- = csrf_meta_tag
- = yield(:head)
-
- %body
- #container
- - cache(['application_header', I18n.locale, current_user]) do
- = render :partial => "shared/header"
- = render :partial => "shared/flash", :locals => { :flash => flash}
-
- #content{:role => 'main'}
- .light
- %header.main
- .breadcrumbs= render_breadcrumbs :separator => ' » '
- - if show_title?
- %h1= yield(:title)
- = yield
-
- - cache(['application_footer', I18n.locale]) do
- %footer#main
- %ul
- %li
- %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}
- - if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user)
- %li
- %a{:href => "http://amooma.de"} Kommerzieller Support und Consulting
- - if GuiFunction.display?('gemeinschaft_mailinglist_link_in_footer', current_user)
- %li
- %a{:href => "https://groups.google.com/group/gs5-users/"} Kostenlose Mailingliste
-
- .amooma-logo
- %span brought to you by
- %a{ :target => '_blank', :href => "http://amooma.de/" } Amooma
-
diff --git a/app/views/layouts/old_navbar.html.haml b/app/views/layouts/old_navbar.html.haml
deleted file mode 100644
index 4d795e4..0000000
--- a/app/views/layouts/old_navbar.html.haml
+++ /dev/null
@@ -1,10 +0,0 @@
-.navbar.navbar-inverse.navbar-fixed-top
- .navbar-inner
- .container
- %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
- %span.icon-bar
- %span.icon-bar
- %span.icon-bar
- %a.brand{:href => "/"} Gemeinschaft 5
-
- / /.nav-collapse
diff --git a/app/views/layouts/test.haml b/app/views/layouts/test.haml
deleted file mode 100644
index e69de29..0000000
--- a/app/views/layouts/test.haml
+++ /dev/null
diff --git a/app/views/manufacturers/_index_core.html.haml b/app/views/manufacturers/_index_core.html.haml
index 5efa5d9..16a168a 100644
--- a/app/views/manufacturers/_index_core.html.haml
+++ b/app/views/manufacturers/_index_core.html.haml
@@ -1,18 +1,19 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('manufacturers.index.name')
- %th= t('manufacturers.index.ieee_name')
- %th= t('manufacturers.index.homepage_url')
- %th= t('manufacturers.index.phone_models')
-
-
- - for manufacturer in manufacturers
+%table.table.table-striped
+ %thead
%tr
- %td= manufacturer.name
- %td= manufacturer.ieee_name
- %td
- - if manufacturer.homepage_url
- =link_to manufacturer.homepage_url, manufacturer.homepage_url
- %td
- = manufacturer.phone_models.map{|x| x.to_s }.join(', ')
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => manufacturer} \ No newline at end of file
+ %th= t('manufacturers.index.name')
+ %th= t('manufacturers.index.ieee_name')
+ %th= t('manufacturers.index.homepage_url')
+ %th= t('manufacturers.index.phone_models')
+
+ %tbody
+ - for manufacturer in manufacturers
+ %tr
+ %td= manufacturer.name
+ %td= manufacturer.ieee_name
+ %td
+ - if manufacturer.homepage_url
+ =link_to manufacturer.homepage_url, manufacturer.homepage_url
+ %td
+ = manufacturer.phone_models.map{|x| x.to_s }.join(', ')
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => manufacturer} \ No newline at end of file
diff --git a/app/views/page/beginners_intro.de.html.haml b/app/views/page/beginners_intro.de.html.haml
deleted file mode 100644
index 5eef135..0000000
--- a/app/views/page/beginners_intro.de.html.haml
+++ /dev/null
@@ -1,33 +0,0 @@
-- content_for :title, "Erste Schritte mit Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}!"
-
-%p
- Sie müssen als erstes mindestens zwei neue SIP-Accounts anlegen. Dabei haben Sie die Wahl zwischen folgenden Varianten:
-
-%ul
- %li
- %strong
- Personalisierter SIP-Accounts
- %br
- Dieser wird einer bestimmten Person zugeordnet. 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.
- %br
- =link_to "SIP-Account für #{current_user.current_tenant} anlegen.", new_tenant_sip_account_path(current_user.current_tenant)
-
-%h2 Rufnummern
-
-%p
- Mit denen von Ihnen angelegten SIP-Accounts können Sie schon intern telefonieren. Dazu müssen Sie den SIP-Accounts jeweils eine interne Telefonnummer zuweisen (z.B. 20 und 21) und ein SIP Soft- oder Hardphone mit den Account-Daten konfigurieren.
-
-%h2 Telefone
-
-%p
- Komfortabler ist der Betrieb von im Provisioning unterstützen Telefone. Diese können Sie beim Anlegen direkt mit einem bestimmten SIP-Account verknüpfen. Danach müssen Sie nur noch die Provisioningdaten per Hand ins Telefon eintragen oder ein paar Einstellungen in Ihrem DHCP-Server vornehmen. Hilfe dazu finden Sie im #{link_to 'Wiki', 'https://github.com/amooma/GS5/wiki'} und der #{link_to 'Mailingliste', 'https://groups.google.com/group/gs5-users/'}.
-%p
- Folgende Telefone werden in der Version #{GsParameter.get('GEMEINSCHAFT_VERSION')} vom automatischen Provisioning unterstützt:
- = nicely_joined_with_commata(PhoneModel.order(:name).map{|phone_model| "#{phone_model.to_s}"}) \ No newline at end of file
diff --git a/app/views/page/conference.html.haml b/app/views/page/conference.html.haml
deleted file mode 100644
index 2fdc043..0000000
--- a/app/views/page/conference.html.haml
+++ /dev/null
@@ -1,80 +0,0 @@
-- conf_call_topic = "The next big thing"
-- content_for :title, "Conference Call \u2013 Topic: #{conf_call_topic}"
-
-
-%section.conference
-
- %section.panel.speakers.first
- %header
- %h3 Speakers
- ~# Naming this class message, since when you add or chat you're sending
- ~# a message to the server.
- %form.message
- %input{:placeholder => '# '}
- .actors
- - 2.times do
- .actor
- .info
- - user = current_user #FIXME
- - avatar_url = user.image_url(:mini) || 'stubs/user-36x.jpg'
- = image_tag avatar_url.to_s, :class => 'display', :alt => "[ ]"
- %span.name Fake Stefan
- %span.status Joined at 03:00
- .voice-actions
- %a.make.listener{ :href => '#', :title => "Make listener" } Make listener
- %a.voice.unmuted{ :href => '#', :title => "Mute" } Mute
- %a.remove{ :href => '#', :title => "Remove from conference" } Remove
-
-
- %section.panel.listeners
- %header
- %h3 Listeners
- ~# Naming this class message, since when you add or chat you're sending
- ~# a message to the server.
- %form.message
- %input{:placeholder => '# '}
- .actors
- - 5.times do
- .actor
- .info
- - user = current_user #FIXME
- - avatar_url = user.image_url(:mini) || 'stubs/user-36x.jpg'
- = image_tag avatar_url.to_s, :class => 'display', :alt => "[ ]"
- %span.name Fake Stefan
- %span.status Joined at 03:00
- .voice-actions
- %a.make.speaker{ :href => '#', :title => "Make speaker" } Make speaker
- %a.voice.unmuted{ :href => '#', :title => "Mute" } Mute
- %a.remove{ :href => '#', :title => "Remove from conference" } Remove
-
-
- %section.panel.log.last
- %header
- %h3 Log
- ~# Naming this class message, since when you add or chat you're sending
- ~# a message to the server.
- %form.message
- %input{:placeholder => 'Write a Message...'}
- .messages
- %div
- %span.name Mario:
- %span.content Sorry for the Delay!
- %div.status
- %span.name 03:11:
- %span.content Fake Stefan is now a Speaker.
- %div.status
- %span.name 03:10:
- %span.content Stefan Wintermeyer Left.
- %div
- %span.name Stefan:
- %span.content Hello World.
- %div.status
- %span.name 03:00:
- %span.content Stefan Wintermeyer Joined.
- %div
- %span.name Herpiti Derp:
- %span.content Cool Conference Room!
- %div
- %span.name Pamela:
- %span.content I'm here to sing along.
-
diff --git a/app/views/page/docu/_screencast_list.html.haml b/app/views/page/docu/_screencast_list.html.haml
new file mode 100644
index 0000000..6669a42
--- /dev/null
+++ b/app/views/page/docu/_screencast_list.html.haml
@@ -0,0 +1,19 @@
+%table.table.table-striped
+ %thead
+ %tr
+ %th
+ Format
+ %th
+ Dateigröße
+
+ %tbody
+ - ['mp4', 'mov'].each do |file_extension|
+ - filename = "screencasts/de/#{screencast_name}/#{screencast_name}.#{file_extension}"
+ - if File.exists?("#{Rails.root}/public/#{image_path(filename)}")
+ %tr
+ %td
+ %a{:href => image_path(filename)}
+ %i{:class => 'icon-download'}
+ =file_extension.upcase
+ %td
+ = number_to_human_size(File.size("#{Rails.root}/public/#{image_path(filename)}"), :precision => 3)
diff --git a/app/views/page/docu/_tenant_sip_accounts_new.html.haml b/app/views/page/docu/_tenant_sip_accounts_new.html.haml
new file mode 100644
index 0000000..5741526
--- /dev/null
+++ b/app/views/page/docu/_tenant_sip_accounts_new.html.haml
@@ -0,0 +1,26 @@
+.row
+ .span12
+ %h2 Firmen Telefon mit SIP-Account und einer Telefonnummer
+
+ %p
+ Es gibt Telefone die keiner bestimmten Person zugeordnet werden können (z.B. in einem Konferenzraum). Folgende Telefone werden in der von Ihnen eingesetzten Gemeinschaft Version #{GsParameter.get('GEMEINSCHAFT_VERSION')} vom automatischen Provisioning unterstützt:
+ = nicely_joined_with_commata(PhoneModel.order(:name).map{|phone_model| "#{phone_model.to_s}"})
+
+.row
+ .span6
+ %h3 Kurzbeschreibung
+ %ol
+ %li
+ Unter #{link_to new_tenant_sip_account_url(current_user.current_tenant), new_tenant_sip_account_path(current_user.current_tenant)} einen neuen SIP-Account anlegen.
+ %li
+ Diesem Account eine Rufnummer zuweisen.
+ %li
+ Unter #{link_to new_tenant_sip_account_url(current_user.current_tenant), new_tenant_phone_path(current_user.current_tenant)} ein neues Telefon anlegen.
+ %li
+ Dieses Telefon mit dem SIP-Account verknüpfen.
+ %li
+ Die Provisioning URL im Telefon eintragen und das Telefon danach neu booten.
+
+ .span6
+ %h3 Screencast
+ = render :partial => 'page/docu/screencast_list', :locals => {:screencast_name => 'firmen_sip_account_und_telefon_anlegen'}
diff --git a/app/views/page/help.de.html.haml b/app/views/page/help.de.html.haml
new file mode 100644
index 0000000..05184be
--- /dev/null
+++ b/app/views/page/help.de.html.haml
@@ -0,0 +1,26 @@
+- content_for :title, "Erste Schritte mit Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}!"
+
+.row
+ .span6
+ %h2 User-Interface
+ %p
+ Die WebGUI zu Gemeinschaft ist komplex. Es gibt sehr viele Konfigurationsmöglichkeiten und Features, die bedienbar sein müssen. Wir haben uns bemüht die GUI so sauber und strukturiert wie möglich zu halten. Im Screenshot mit den wichtigsten drei Seiten-Elementen:
+ %ol
+ %li
+ Breadcrumb-Navigation. Ganz wichtig! Hiermit finden Sie immer wieder den Weg zurück.
+ %li
+ Link zum User-Account. Er führt Sie zu Ihrem persönlichen Bereich, in dem Sie z.B. Ihre Voicemails oder Faxe abrufen können. Dort können Sie ebenfalls Ihre persönlichen Telefone konfigurieren.
+ %li
+ Rechts oben können Sie sich immer ausloggen.
+ %p
+ Sie können bei der Arbeit mit Gemeinschaft selbstverständlich die Vor- und Zurück-Funktion Ihres Webbrowsers benutzen. Ebenfalls können Sie die einzelnen Seiten als Bookmarks abspeichern.
+ .span6
+ %ul.thumbnails
+ %li.span6
+ %div.thumbnail
+ %a.thumbnail{:href => "#{image_path('docu/user_interface.png')}"}
+ =image_tag('docu/user_interface.png', :alt => "Gemeinschaft User-Interface")
+
+
+= render :partial => 'page/docu/tenant_sip_accounts_new'
+
diff --git a/app/views/page/beginners_intro.html.haml b/app/views/page/help.html.haml
index dadd99f..dadd99f 100644
--- a/app/views/page/beginners_intro.html.haml
+++ b/app/views/page/help.html.haml
diff --git a/app/views/phone_book_entries/_index_core.de.html.haml b/app/views/phone_book_entries/_index_core.de.html.haml
deleted file mode 100644
index fe72d26..0000000
--- a/app/views/phone_book_entries/_index_core.de.html.haml
+++ /dev/null
@@ -1,42 +0,0 @@
-~# To Look for the other fields, please look into Git History.
-%section.phone-book-entries
- %header.entries-nav= render :partial => "phone_book_entries/navigation"
- .content
- - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do
-
- %table{:class => 'table table-striped'}
- - for entry in phone_book_entries
- - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do
- ~# Dear IE7,
- ~# Because of you we have to do this with a table.
- ~# With Love,
- ~# Mario.
- %tr.phone-book-entry{:"itemscope itemtype" => "http://schema.org/Person"}
- %td.thumbnail
- = image_tag(entry.image_url(:small).to_s, :itemprop => 'image')
- %td.user
- - if entry.is_organization == true
- %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
- - else
- %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
- %a.company{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'memberOf'}= entry.organization
- %td.contact
- - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id)
- %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= @found_phone_numbers.where(:phone_numberable_id => entry.id).first
- - elsif entry.phone_numbers.first
- %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= entry.phone_numbers.first
- - if entry.phone_numbers.count > 1
- %a.more{:href => phone_book_phone_book_entry_path(entry.phone_book, entry)}= t('phone_book_entries.index.more_numbers', :numbers => (entry.phone_numbers.count-1))
- %td.extra
- - if !entry.description.blank?
- %strong Beschreibung:
- %div
- = entry.description
- - if !entry.homepage_organization.blank?
- %br
- =link_to entry.homepage_organization, entry.homepage_organization
- - if can? :edit, entry
- %td= link_to t('phone_book_entries.index.actions.edit'), edit_phone_book_phone_book_entry_path( entry.phone_book, entry )
- - if can? :destroy, entry
- %td= link_to t('phone_book_entries.index.actions.destroy'), [entry.phone_book, entry], :confirm => t('phone_book_entries.index.actions.confirm'), :method => :delete
- %footer.entries-nav= render :partial => "phone_book_entries/navigation"
diff --git a/app/views/phone_book_entries/_index_core.html.haml b/app/views/phone_book_entries/_index_core.html.haml
index 6e35221..6669da6 100644
--- a/app/views/phone_book_entries/_index_core.html.haml
+++ b/app/views/phone_book_entries/_index_core.html.haml
@@ -1,43 +1,43 @@
-~# To Look for the other fields, please look into Git History.
-%section.phone-book-entries
- %header.entries-nav= render :partial => "phone_book_entries/navigation"
- .content
- - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do
-
-
- %table{:class => 'table table-striped'}
- - for entry in phone_book_entries
- - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do
- ~# Dear IE7,
- ~# Because of you we have to do this with a table.
- ~# With Love,
- ~# Mario.
- %tr.phone-book-entry{:"itemscope itemtype" => "http://schema.org/Person"}
- %td.thumbnail
- = image_tag(entry.image_url(:small).to_s, :itemprop => 'image')
- %td.user
- - if entry.is_organization == true
- %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
- - else
- %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
- %a.company{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'memberOf'}= entry.organization
- %td.contact
- - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id)
- %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= @found_phone_numbers.where(:phone_numberable_id => entry.id).first
- - elsif entry.phone_numbers.first
- %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= entry.phone_numbers.first
- - if entry.phone_numbers.count > 1
- %a.more{:href => phone_book_phone_book_entry_path(entry.phone_book, entry)}= t('phone_book_entries.index.more_numbers', :numbers => (entry.phone_numbers.count-1))
- %td.extra
- - if !entry.description.blank?
- %strong Description:
- %div
- = entry.description
- - if !entry.homepage_organization.blank?
- %br
- =link_to entry.homepage_organization, entry.homepage_organization
- - if can? :edit, entry
- %td= link_to t('phone_book_entries.index.actions.edit'), edit_phone_book_phone_book_entry_path( entry.phone_book, entry )
- - if can? :destroy, entry
- %td= link_to t('phone_book_entries.index.actions.destroy'), [entry.phone_book, entry], :confirm => t('phone_book_entries.index.actions.confirm'), :method => :delete
- %footer.entries-nav= render :partial => "phone_book_entries/navigation"
+= render :partial => "phone_book_entries/navigation"
+
+- cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do
+ %table.table.table-striped
+ - for entry in phone_book_entries
+ - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do
+ %tr
+ %td
+ = image_tag(entry.image_url(:small).to_s, :itemprop => 'image', :class => 'img-rounded')
+ %td
+ - if entry.is_organization == true
+ %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
+ - else
+ %a.name{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => "name"}= entry
+ %a.company{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'memberOf'}= entry.organization
+ %td
+ - if @found_phone_numbers and @found_phone_numbers.where(:phone_numberable_id => entry.id)
+ %span{:style => 'white-space: nowrap'}
+ %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= @found_phone_numbers.where(:phone_numberable_id => entry.id).first
+ - elsif entry.phone_numbers.first
+ %span{:style => 'white-space: nowrap'}
+ %a.phone{:href=> phone_book_phone_book_entry_path(entry.phone_book, entry), :itemprop => 'telephone'}= entry.phone_numbers.first
+ - if entry.phone_numbers.count > 1
+ %a.more{:href => phone_book_phone_book_entry_path(entry.phone_book, entry)}= t('phone_book_entries.index.more_numbers', :numbers => (entry.phone_numbers.count-1))
+ %td
+ %span.hidden-phone
+ - if !entry.description.blank?
+ = entry.description
+ - if !entry.homepage_organization.blank?
+ %br
+ =link_to entry.homepage_organization, entry.homepage_organization
+ - if can? :edit, entry
+ %td
+ %a.btn.btn-mini.btn-warning{:href => edit_phone_book_phone_book_entry_path( entry.phone_book, entry ) }
+ %i.icon-edit.icon-white
+ %span.hidden-phone
+ =t('phone_book_entries.index.actions.edit')
+ - if can? :destroy, entry
+ %td
+ %a.btn.btn-mini.btn-danger{"data-confirm" => t('phone_book_entries.index.actions.confirm'), "data-method" => "delete", :href => phone_book_phone_book_entry_path(entry.phone_book, entry), :rel => "nofollow"}
+ %i.icon-trash.icon-white
+ %span.hidden-phone
+ =t('phone_book_entries.index.actions.destroy')
diff --git a/app/views/phone_book_entries/_navigation.html.haml b/app/views/phone_book_entries/_navigation.html.haml
index dd1e8a7..a9a3d58 100644
--- a/app/views/phone_book_entries/_navigation.html.haml
+++ b/app/views/phone_book_entries/_navigation.html.haml
@@ -1,8 +1,7 @@
-%nav
- %ol.abc
- - %w{# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}.each do |char|
- %li
- %a{ :href => "?name=#{char}" }= char
+%ul{:class => 'nav nav-pills'}
+ - %w{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}.each do |char|
+ %li
+ %a{ :href => "?name=#{char}" }= char
-.pagination
- = will_paginate @phone_book_entries
+/ .pagination
+/ = will_paginate @phone_book_entries
diff --git a/app/views/phone_books/_index_core.html.haml b/app/views/phone_books/_index_core.html.haml
index accded6..09ce3a3 100644
--- a/app/views/phone_books/_index_core.html.haml
+++ b/app/views/phone_books/_index_core.html.haml
@@ -1,18 +1,21 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('phone_books.index.name')
- %th= t('phone_books.index.count')
- %th{:colspan => '3'}
-
- - for phone_book in phone_books
+%table.table.table-striped
+ %thead
%tr
- %td
- - if phone_book.description.blank?
+ %th= t('phone_books.index.name')
+ %th
+ %span.visible-desktop
+ = t('phone_books.index.description')
+ %th= t('phone_books.index.count')
+
+ %tbody
+ - for phone_book in phone_books
+ %tr
+ %td
= phone_book.name
- - else
- %a.brand{:rel => 'tooltip', :title => phone_book.description}
- = phone_book.name
- %td
- = number_with_delimiter( phone_book.phone_book_entries.count )
+ %td
+ %span.visible-desktop
+ = phone_book.description
+ %td
+ = number_with_delimiter( phone_book.phone_book_entries.count )
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_book.phone_bookable, :child => phone_book} \ No newline at end of file
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_book.phone_bookable, :child => phone_book} \ No newline at end of file
diff --git a/app/views/phone_books/show.html.haml b/app/views/phone_books/show.html.haml
index 5140b91..b8030aa 100644
--- a/app/views/phone_books/show.html.haml
+++ b/app/views/phone_books/show.html.haml
@@ -1,5 +1,5 @@
- content_for :title, @phone_book
-- if ! @phone_book.description.blank?
+- if !@phone_book.description.blank?
%p
%strong= t('phone_books.show.description') + ":"
= @phone_book.description
@@ -7,7 +7,7 @@
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_book.phone_bookable, :child => @phone_book }
%h2= t("phone_book_entries.index.page_title")
-- if @phone_book_entries.count > 0
+- if @phone_book_entries.any?
= render "phone_book_entries/index_core", :phone_book_entries => @phone_book_entries
= render :partial => 'shared/create_link', :locals => {:parent => @phone_book, :child_class => PhoneBookEntry} \ No newline at end of file
diff --git a/app/views/phone_models/_index_core.html.haml b/app/views/phone_models/_index_core.html.haml
index b899a5c..2e409ac 100644
--- a/app/views/phone_models/_index_core.html.haml
+++ b/app/views/phone_models/_index_core.html.haml
@@ -1,19 +1,20 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('phone_models.index.name')
- %th= t('phone_models.index.product_manual_homepage_url')
- %th= t('phone_models.index.product_homepage_url')
- %th= t('phone_models.index.number_of_phones')
-
-
- - for phone_model in phone_models
+%table.table.table-striped
+ %thead
%tr
- %td= phone_model.name
- %td
- - if phone_model.product_manual_homepage_url
- =link_to truncate(phone_model.product_manual_homepage_url, :length => 40), phone_model.product_manual_homepage_url
- %td
- - if phone_model.product_homepage_url
- =link_to truncate(phone_model.product_homepage_url, :length => 40), phone_model.product_homepage_url
- %td= phone_model.phones.count
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => phone_model, :parent => phone_model.manufacturer} \ No newline at end of file
+ %th= t('phone_models.index.name')
+ %th= t('phone_models.index.product_manual_homepage_url')
+ %th= t('phone_models.index.product_homepage_url')
+ %th= t('phone_models.index.number_of_phones')
+
+ %tbody
+ - for phone_model in phone_models
+ %tr
+ %td= phone_model.name
+ %td
+ - if phone_model.product_manual_homepage_url
+ =link_to truncate(phone_model.product_manual_homepage_url, :length => 40), phone_model.product_manual_homepage_url
+ %td
+ - if phone_model.product_homepage_url
+ =link_to truncate(phone_model.product_homepage_url, :length => 40), phone_model.product_homepage_url
+ %td= phone_model.phones.count
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => phone_model, :parent => phone_model.manufacturer} \ No newline at end of file
diff --git a/app/views/phone_number_ranges/_index_core.html.haml b/app/views/phone_number_ranges/_index_core.html.haml
index b378be8..956f244 100644
--- a/app/views/phone_number_ranges/_index_core.html.haml
+++ b/app/views/phone_number_ranges/_index_core.html.haml
@@ -1,21 +1,22 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('phone_number_ranges.index.name')
- %th= t('phone_number_ranges.index.description')
- %th= t('phone_number_ranges.index.numbers')
- %th= t('phone_number_ranges.index.amount')
-
-
- - for phone_number_range in phone_number_ranges
+%table.table.table-striped
+ %thead
%tr
- %td= t("phone_number_ranges.ranges.#{phone_number_range}.label")
- %td= t("phone_number_ranges.ranges.#{phone_number_range}.description")
- %td
- - if phone_number_range.phone_numbers.count > 0
- = render 'phone_numbers/listing', :phone_numbers => phone_number_range.phone_numbers.order(:number)
- %br
- = render :partial => 'shared/create_link', :locals => {:parent => phone_number_range, :child_class => PhoneNumber, :short_link => true}
+ %th= t('phone_number_ranges.index.name')
+ %th= t('phone_number_ranges.index.description')
+ %th= t('phone_number_ranges.index.numbers')
+ %th= t('phone_number_ranges.index.amount')
+
+ %tbody
+ - for phone_number_range in phone_number_ranges
+ %tr
+ %td= t("phone_number_ranges.ranges.#{phone_number_range}.label")
+ %td= t("phone_number_ranges.ranges.#{phone_number_range}.description")
+ %td
+ - if phone_number_range.phone_numbers.count > 0
+ = render 'phone_numbers/listing', :phone_numbers => phone_number_range.phone_numbers.order(:number)
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => phone_number_range, :child_class => PhoneNumber, :short_link => true}
- %td= phone_number_range.phone_numbers.count
- - if phone_number_range.phone_number_rangeable.class != Country
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_number_range.phone_number_rangeable, :child => phone_number_range} \ No newline at end of file
+ %td= phone_number_range.phone_numbers.count
+ - if phone_number_range.phone_number_rangeable.class != Country
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_number_range.phone_number_rangeable, :child => phone_number_range} \ No newline at end of file
diff --git a/app/views/phone_numbers/_index_core.html.haml b/app/views/phone_numbers/_index_core.html.haml
index f41c949..80a1608 100644
--- a/app/views/phone_numbers/_index_core.html.haml
+++ b/app/views/phone_numbers/_index_core.html.haml
@@ -1,14 +1,14 @@
-%table{:class => 'table table-striped'}
- %tr
- - if phone_numbers.count > 1 && phone_numbers.first.phone_numberable_type == 'PhoneBookEntry'
- %th= t('phone_numbers.index.name')
- %th= t('phone_numbers.index.number')
- %th{:colspan => '3'}
-
-
- - for phone_number in phone_numbers.order(:position)
+%table.table.table-striped
+ %thead
%tr
- - if phone_number.phone_numberable_type == 'PhoneBookEntry'
- %td= phone_number.name
- %td= phone_number
- = render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_number.phone_numberable, :child => phone_number}
+ - if phone_numbers.count > 1 && phone_numbers.first.phone_numberable_type == 'PhoneBookEntry'
+ %th= t('phone_numbers.index.name')
+ %th= t('phone_numbers.index.number')
+
+ %tbody
+ - for phone_number in phone_numbers.order(:position)
+ %tr
+ - if phone_number.phone_numberable_type == 'PhoneBookEntry'
+ %td= phone_number.name
+ %td= phone_number
+ = render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_number.phone_numberable, :child => phone_number}
diff --git a/app/views/phone_sip_accounts/_index_core.html.haml b/app/views/phone_sip_accounts/_index_core.html.haml
index 1e6d3ca..a2d9d98 100644
--- a/app/views/phone_sip_accounts/_index_core.html.haml
+++ b/app/views/phone_sip_accounts/_index_core.html.haml
@@ -1,13 +1,14 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('phone_sip_accounts.index.phone_id')
- %th= t('phone_sip_accounts.index.sip_account_id')
- %th= t('phone_sip_accounts.index.position')
- %th{:colspan => '3'}
-
- - for phone_sip_account in phone_sip_accounts
+%table.table.table-striped
+ %thead
%tr
- %td= phone_sip_account.phone
- %td= phone_sip_account.sip_account
- %td= phone_sip_account.position
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_sip_account.phone, :child => phone_sip_account} \ No newline at end of file
+ %th= t('phone_sip_accounts.index.phone_id')
+ %th= t('phone_sip_accounts.index.sip_account_id')
+ %th= t('phone_sip_accounts.index.position')
+
+ %tbody
+ - for phone_sip_account in phone_sip_accounts
+ %tr{:class => (phone_sip_account.sip_account.registration ? '' : 'warning')}
+ %td= phone_sip_account.phone
+ %td= link_to phone_sip_account.sip_account, method( :"#{phone_sip_account.sip_account.sip_accountable.class.name.underscore}_#{phone_sip_account.sip_account.class.name.underscore}_path" ).(phone_sip_account.sip_account.sip_accountable, phone_sip_account.sip_account)
+ %td= phone_sip_account.position
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_sip_account.phone, :child => phone_sip_account} \ No newline at end of file
diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml
index fc1ad19..9a865f0 100644
--- a/app/views/phones/_index_core.html.haml
+++ b/app/views/phones/_index_core.html.haml
@@ -1,15 +1,33 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('phones.index.mac_address')
- %th= t('phones.index.phone_model_id')
- %th= t('phones.index.hot_deskable')
- %th= t('phones.index.ip_address')
-
-
- - for phone in phones
+%table.table.table-striped
+ %thead
%tr
- %td= phone.pretty_mac_address
- %td= phone.phone_model
- %td= phone.hot_deskable
- %td= phone.ip_address
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone} \ No newline at end of file
+ %th= t('phones.index.mac_address')
+ %th
+ %span.hidden-phone
+ = t('phones.index.phone_model_id')
+ %span.visible-phone
+ = truncate(t('phones.index.phone_model_id'), :length => 9)
+ %th
+ %span.hidden-phone
+ = t('phones.index.hot_deskable')
+ %th
+ %span.hidden-phone
+ = t('phones.index.ip_address')
+
+ %tbody
+ - for phone in phones
+ %tr{:class => (phone.ip_address.blank? ? 'warning' : '')}
+ %td= phone.pretty_mac_address
+ %td= phone.phone_model
+ %td
+ %span.hidden-phone
+ %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.hot_desk'), :'data-trigger' => 'hover'}
+ = phone.hot_deskable == true ? t('simple_form.yes') : t('simple_form.no')
+
+ %td
+ - if phone.ip_address.blank?
+ %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.missing_ip_address'), :'data-trigger' => 'hover'}
+ = '-'
+ - else
+ = phone.ip_address
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone.phoneable, :child => phone} \ No newline at end of file
diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml
index faf4061..86ac380 100644
--- a/app/views/phones/show.html.haml
+++ b/app/views/phones/show.html.haml
@@ -1,52 +1,99 @@
- content_for :title, t("phones.show.page_title")
-%p
- %strong= t('phones.show.mac_address') + ":"
- = @phone.pretty_mac_address
-%p
- %strong= t('phones.show.phone_model_id') + ":"
- = @phone.phone_model
- - if !@phone.phone_model.product_manual_homepage_url.blank?
- (#{link_to t('phones.show.manual'), @phone.phone_model.product_manual_homepage_url})
-- if @phone.hot_deskable == true
- %p
- %strong= t('phones.show.hot_deskable') + ":"
- = @phone.hot_deskable
- %p
- %strong= t('phones.show.fallback_sip_account_id') + ":"
- = @phone.fallback_sip_account
-
-- if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') == true
- %p
- %strong= t('phones.show.nightly_reboot') + ":"
- = @phone.nightly_reboot
-
-- if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0
- %p
- %strong= t('phones.show.provisioning_key_active') + ":"
- = @phone.provisioning_key_active
-%p
- %strong= t('phones.show.ip_address') + ":"
- = @phone.ip_address
-
-- if @phone.ip_address.blank? && @phone.phone_model.manufacturer.ieee_name == 'SNOM Technology AG'
- %p
- Sollten Sie Ihren DHCP-Server noch nicht für das automatische Konfigurieren der GS5 Provisionierungs-URL konfiguriert haben, können Sie manuell in Ihrem Telefon die folgende Provisionierungs-URL eingeben.
- %p
- Das entsprechende Eingabefeld finden Sie unter
- %br
- Advanced -> Update -> Setting URL
- %p
- Das "{mac}" bitte genau so eingeben, es wird vom Telefon automatisch mit der eigenen MAC-Adresse befüllt:
- %pre
- = "http://#{GemeinschaftSetup.first.sip_domain.host}/settings-{mac}"
- %p
- Danach müssen Sie die Konfiguration abspeichern und das Telefon booten.
-
-= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone }
-
-%h2= t("phones.sip_accounts.title")
-- if @phone.phone_sip_accounts.count > 0
- = render "phone_sip_accounts/index_core", :phone_sip_accounts => @phone.phone_sip_accounts
-
-= render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => PhoneSipAccount}
+.row
+ .span5
+ %table.table.table-striped
+ %tr
+ %td
+ %strong= t('phones.show.mac_address') + ":"
+ %td
+ = @phone.pretty_mac_address
+ %tr
+ %td
+ %strong= t('phones.show.phone_model_id') + ":"
+ %td
+ = @phone.phone_model
+ - if !@phone.phone_model.product_manual_homepage_url.blank?
+ (#{link_to t('phones.show.manual'), @phone.phone_model.product_manual_homepage_url})
+ - if @phone.hot_deskable == true
+ %tr
+ %td
+ %strong= t('phones.show.hot_deskable') + ":"
+ %td
+ = @phone.hot_deskable
+ %tr
+ %td
+ %strong= t('phones.show.fallback_sip_account_id') + ":"
+ %td
+ = @phone.fallback_sip_account
+
+ - if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') == true
+ %tr
+ %td
+ %strong= t('phones.show.nightly_reboot') + ":"
+ %td
+ = @phone.nightly_reboot == true ? t('simple_form.yes') : t('simple_form.no')
+
+ - if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0
+ %tr
+ %td
+ %strong= t('phones.show.provisioning_key_active') + ":"
+ %td
+ = @phone.provisioning_key_active == true ? t('simple_form.yes') : t('simple_form.no')
+
+ %tr{:class => (@phone.ip_address.blank? ? 'warning' : '')}
+ %td
+ %strong= t('phones.show.ip_address') + ":"
+ %td
+ - if @phone.ip_address.blank?
+ %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.missing_ip_address'), :'data-trigger' => 'hover'}
+ = '-'
+ - else
+ - if current_user.admin?
+ = link_to @phone.ip_address, "http://#{@phone.http_user}:#{@phone.http_password}@#{@phone.ip_address}"
+ - else
+ = @phone.ip_address
+
+ - if current_user.admin? && (!@phone.http_user.blank? || !@phone.http_password.blank?)
+ %tr
+ %td
+ %strong= t('phones.show.http_user') + ":"
+ %td
+ = @phone.http_user
+
+ %tr
+ %td
+ %strong= t('phones.show.http_password') + ":"
+ %td
+ = @phone.http_password
+
+ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone }
+
+
+ .span7
+ - if @phone.ip_address.blank? && @phone.phone_model.manufacturer.ieee_name == 'SNOM Technology AG'
+ %ul.thumbnails.pull-right
+ %li.span4
+ %a.thumbnail{:href => "#{image_path('screenshots/set_provisioning_url_snom.png')}"}
+ =image_tag('screenshots/set_provisioning_url_snom.png', :alt => "Screenshot Set Provisionierungs-URL Snom WebGUI")
+
+ %p
+ Sollten Sie Ihren DHCP-Server noch nicht für das automatische Konfigurieren der SIP-Telefone konfiguriert haben, können Sie manuell in Ihrem Telefon eine Provisionierungs-URL eingeben.
+ %p
+ Das entsprechende Eingabefeld finden Sie unter
+ %br
+ Advanced -> Update -> Setting URL
+ %p
+ Das "{mac}" bitte genau so eingeben, es wird vom Telefon automatisch mit der eigenen MAC-Adresse befüllt:
+ %pre
+ = "http://#{GemeinschaftSetup.first.sip_domain.host}/settings-{mac}"
+ %p
+ Danach müssen Sie die Konfiguration abspeichern und das Telefon booten.
+
+.row
+ .span12
+ %h2= t("phones.sip_accounts.title")
+ - if @phone.phone_sip_accounts.any?
+ = render "phone_sip_accounts/index_core", :phone_sip_accounts => @phone.phone_sip_accounts
+
+ = render :partial => 'shared/create_link', :locals => {:parent => @phone, :child_class => PhoneSipAccount}
diff --git a/app/views/ringtones/_index_core.html.haml b/app/views/ringtones/_index_core.html.haml
index e3b9a32..715db3c 100644
--- a/app/views/ringtones/_index_core.html.haml
+++ b/app/views/ringtones/_index_core.html.haml
@@ -1,11 +1,12 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('ringtones.index.audio')
- %th= t('ringtones.index.bellcore_id')
-
-
- - for ringtone in ringtones
+%table.table.table-striped
+ %thead
%tr
- %td= ringtone.audio
- %td= ringtone.bellcore_id
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => ringtone.ringtoneable, :child => ringtone} \ No newline at end of file
+ %th= t('ringtones.index.audio')
+ %th= t('ringtones.index.bellcore_id')
+
+ %tbody
+ - for ringtone in ringtones
+ %tr
+ %td= ringtone.audio
+ %td= ringtone.bellcore_id
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => ringtone.ringtoneable, :child => ringtone} \ No newline at end of file
diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml
index 5336057..37c0656 100644
--- a/app/views/route_elements/_index_core.html.haml
+++ b/app/views/route_elements/_index_core.html.haml
@@ -1,19 +1,20 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('route_elements.index.var_in')
- %th= t('route_elements.index.var_out')
- %th= t('route_elements.index.pattern')
- %th= t('route_elements.index.replacement')
- %th= t('route_elements.index.action')
- %th= t('route_elements.index.mandatory')
-
-
- - for route_element in route_elements
+%table.table.table-striped
+ %thead
%tr
- %td= route_element.var_in
- %td= route_element.var_out
- %td= route_element.pattern
- %td= route_element.replacement
- %td= route_element.action
- %td= route_element.mandatory
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @call_route, :child => route_element} \ No newline at end of file
+ %th= t('route_elements.index.var_in')
+ %th= t('route_elements.index.var_out')
+ %th= t('route_elements.index.pattern')
+ %th= t('route_elements.index.replacement')
+ %th= t('route_elements.index.action')
+ %th= t('route_elements.index.mandatory')
+
+ %tbody
+ - for route_element in route_elements
+ %tr
+ %td= route_element.var_in
+ %td= route_element.var_out
+ %td= route_element.pattern
+ %td= route_element.replacement
+ %td= route_element.action
+ %td= route_element.mandatory
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @call_route, :child => route_element} \ No newline at end of file
diff --git a/app/views/shared/_create_link.html.haml b/app/views/shared/_create_link.html.haml
index 0711ddf..53e9dbc 100644
--- a/app/views/shared/_create_link.html.haml
+++ b/app/views/shared/_create_link.html.haml
@@ -2,18 +2,17 @@
- if can? :create, parent.send(child_class.name.underscore.pluralize).build
%p
- if t("#{child_class.name.underscore.pluralize}.index.actions.create_for").include?('translation missing') || (!(defined? short_link).nil? && short_link == true)
- %a.btn.btn-mini.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) }
- %i.icon-plus.icon-white
+ %a.btn.btn-small.btn-default{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) }
+ %i.icon-plus
=t("#{child_class.name.underscore.pluralize}.index.actions.create")
- else
- %a.btn.btn-mini.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) }
- %i.icon-plus.icon-white
- / =t("#{child_class.name.underscore.pluralize}.index.actions.create_for", :resource => parent.to_s)
- =t("#{child_class.name.underscore.pluralize}.index.actions.create")
+ %a.btn.btn-small.btn-default{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) }
+ %i.icon-plus
+ =t("#{child_class.name.underscore.pluralize}.index.actions.create")
- elsif !(defined? child_class).nil?
- if can? :create, child_class
%p
- %a.btn.btn-mini.btn-primary{:href => method( :"new_#{child_class.name.underscore}_path" ).() }
- %i.icon-plus.icon-white
+ %a.btn.btn-small.btn-default{:href => method( :"new_#{child_class.name.underscore}_path" ).() }
+ %i.icon-plus
=t("#{child_class.name.underscore.pluralize}.index.actions.create") \ No newline at end of file
diff --git a/app/views/shared/_header.de.html.haml b/app/views/shared/_header.de.html.haml
deleted file mode 100644
index 10ad2a0..0000000
--- a/app/views/shared/_header.de.html.haml
+++ /dev/null
@@ -1,41 +0,0 @@
-%header#main
- .light
- %h1.gemeinschaft-logo
- - if @current_user && @current_user.current_tenant
- = link_to "Gemeinschaft", tenant_path(@current_user.current_tenant)
- - else
- = link_to "Gemeinschaft", root_url
-
- - if current_user
- = form_tag '/search' do
- %div.search-box
- - if GuiFunction.display?('search_field_in_top_navigation_bar', current_user)
- %input.text{:value => 'Suchen ...', :name => 'q'}
- %input{:type => 'submit', :value => ''}
-
- / Adjustable Navigation.
- - if current_user
- - if navigation_items.size > 0
- - navigation_items.each do |item|
- - if GuiFunction.display?('navigation_items_in_top_navigation_bar', current_user)
- %span
- = link_to item[:title], item[:url]
-
- - if current_user
- .user-context
- %a.user{:href => tenant_user_path(current_user.current_tenant.id, current_user.id)}
- - if GuiFunction.display?('user_avatar_in_top_navigation_bar', current_user)
- - if current_user.image? && current_user.image_url(:mini)
- = image_tag current_user.image_url(:mini).to_s, :class => 'display'
- - else
- - if current_user.male?
- = image_tag 'icons/user-male-16x.png', :class => 'display logged-out'
- - else
- = image_tag 'icons/user-female-16x.png', :class => 'display logged-out'
- = current_user
- = link_to( "[x]", log_out_path, :class => 'logout', :title => "Abmelden" ) # Temporary way of logging out.
- - else
- .user-context
- = link_to "Registrieren", sign_up_path
- or
- = link_to "Anmelden", log_in_path
diff --git a/app/views/shared/_header.html.haml b/app/views/shared/_header.html.haml
deleted file mode 100644
index 377d8e0..0000000
--- a/app/views/shared/_header.html.haml
+++ /dev/null
@@ -1,41 +0,0 @@
-%header#main
- .light
- %h1.gemeinschaft-logo
- - if @current_user && @current_user.current_tenant
- = link_to "Gemeinschaft", tenant_path(@current_user.current_tenant)
- - else
- = link_to "Gemeinschaft", root_url
-
- - if current_user
- = form_tag '/search' do
- %div.search-box
- - if GuiFunction.display?('search_field_in_top_navigation_bar', current_user)
- %input.text{:value => 'Search ...', :name => 'q'}
- %input{:type => 'submit', :value => ''}
-
- / Adjustable Navigation.
- - if current_user
- - if navigation_items.size > 0
- - navigation_items.each do |item|
- - if GuiFunction.display?('navigation_items_in_top_navigation_bar', current_user)
- %span
- = link_to item[:title], item[:url]
-
- - if current_user
- .user-context
- %a.user{:href => tenant_user_path(current_user.current_tenant.id, current_user.id)}
- - if GuiFunction.display?('user_avatar_in_top_navigation_bar', current_user)
- - if current_user.image? && current_user.image_url(:mini)
- = image_tag current_user.image_url(:mini).to_s, :class => 'display'
- - else
- - if current_user.male?
- = image_tag 'icons/user-male-16x.png', :class => 'display logged-out'
- - else
- = image_tag 'icons/user-female-16x.png', :class => 'display logged-out'
- = current_user
- = link_to( "[x]", log_out_path, :class => 'logout', :title => "Log out" ) # Temporary way of logging out.
- - else
- .user-context
- = link_to "Sign up", sign_up_path
- or
- = link_to "Log in", log_in_path
diff --git a/app/views/shared/_index_view_edit_destroy_part.html.haml b/app/views/shared/_index_view_edit_destroy_part.html.haml
index 00b9e8a..6bb1e7b 100644
--- a/app/views/shared/_index_view_edit_destroy_part.html.haml
+++ b/app/views/shared/_index_view_edit_destroy_part.html.haml
@@ -1,40 +1,36 @@
-- style = 'width:90px'
-- style = ''
-
- if !(defined? parent).nil? && !(defined? child).nil?
- - if can? :show, child
- %td{ :style => style }
- %a.btn.btn-mini.btn-success{:href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) }
- %i.icon-info-sign.icon-white
- =t("#{child.class.name.underscore.pluralize}.index.actions.show")
+ %td
+ %span{:style => 'white-space: nowrap'}
+ - if can? :show, child
+ %a.btn.btn-small.btn-success{:href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) }
+ %i.icon-info-sign.icon-white
+ =t("#{child.class.name.underscore.pluralize}.index.actions.show")
- - if can? :edit, child
- %td{ :style => style }
- %a.btn.btn-mini.btn-warning{:href => method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) }
- %i.icon-edit.icon-white
- =t("#{child.class.name.underscore.pluralize}.index.actions.edit")
+ - if can? :edit, child
+ %a.btn.btn-small.btn-warning{:href => method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) }
+ %i.icon-edit.icon-white
+ =t("#{child.class.name.underscore.pluralize}.index.actions.edit")
- - if can? :destroy, child
- %td{ :style => style }
- %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"}
- %i.icon-remove.icon-white
- =t("#{child.class.name.underscore.pluralize}.index.actions.destroy")
+ - if can? :destroy, child
+ %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"}
+ %i.icon-remove.icon-white
+ =t("#{child.class.name.underscore.pluralize}.index.actions.destroy")
- elsif !(defined? child).nil?
- - if can? :show, child
- %td{ :style => style }
- %a.btn.btn-mini.btn-success{:href => method( :"#{child.class.name.underscore}_path" ).(child) }
- %i.icon-info-sign.icon-white
- =t("#{child.class.name.underscore.pluralize}.index.actions.show")
+ %td
+ %span{:style => 'white-space: nowrap'}
+ - if can? :show, child
+ %a.btn.btn-small.btn-success{:href => method( :"#{child.class.name.underscore}_path" ).(child) }
+ %i.icon-info-sign.icon-white
+ =t("#{child.class.name.underscore.pluralize}.index.actions.show")
- - if can? :edit, child
- %td{ :style => style }
- %a.btn.btn-mini.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) }
- %i.icon-edit.icon-white
- =t("#{child.class.name.underscore.pluralize}.index.actions.edit")
-
- - if can? :destroy, child
- %td{ :style => style }
- %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"}
- %i.icon-trash.icon-white
- =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file
+ - if can? :edit, child
+ %a.btn.btn-small.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) }
+ %i.icon-edit.icon-white
+ =t("#{child.class.name.underscore.pluralize}.index.actions.edit")
+
+ - if can? :destroy, child
+ %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"}
+ %i.icon-trash.icon-white
+ =t("#{child.class.name.underscore.pluralize}.index.actions.destroy")
+ \ No newline at end of file
diff --git a/app/views/shared/_show_edit_destroy_part.html.haml b/app/views/shared/_show_edit_destroy_part.html.haml
index e82c667..a1e8490 100644
--- a/app/views/shared/_show_edit_destroy_part.html.haml
+++ b/app/views/shared/_show_edit_destroy_part.html.haml
@@ -1,20 +1,20 @@
%p
- if !(defined? parent).nil? && !(defined? child).nil?
- if can? :edit, child
- %a.btn.btn-warning{:href => method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) }
+ %a.btn.btn-small.btn-warning{:href => method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) }
%i.icon-edit.icon-white
- =t("#{child.class.name.underscore.pluralize}.actions.edit")
+ =t("#{child.class.name.underscore.pluralize}.index.actions.edit")
- if can? :destroy, child
- %a.btn.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"}
+ %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"}
%i.icon-trash.icon-white
- =t("#{child.class.name.underscore.pluralize}.actions.destroy")
+ =t("#{child.class.name.underscore.pluralize}.index.actions.destroy")
- elsif !(defined? child).nil?
- if can? :edit, child
- %a.btn.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) }
+ %a.btn.btn-small.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) }
%i.icon-edit.icon-white
- =t("#{child.class.name.underscore.pluralize}.actions.edit")
+ =t("#{child.class.name.underscore.pluralize}.index.actions.edit")
- if can? :destroy, child
- %a.btn.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"}
+ %a.btn.btn-small.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"}
%i.icon-trash.icon-white
- =t("#{child.class.name.underscore.pluralize}.actions.destroy") \ No newline at end of file
+ =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file
diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml
index 495ae84..1b96d27 100644
--- a/app/views/sip_accounts/_form_core.html.haml
+++ b/app/views/sip_accounts/_form_core.html.haml
@@ -1,7 +1,11 @@
.inputs
- = f.input :auth_name, :as => :string, :label => t('sip_accounts.form.auth_name.label'), :hint => conditional_hint('sip_accounts.form.auth_name.hint')
- = f.input :password, :as => :string, :label => t('sip_accounts.form.password.label'), :hint => conditional_hint('sip_accounts.form.password.hint')
= f.input :caller_name, :as => :string, :label => t('sip_accounts.form.caller_name.label'), :hint => conditional_hint('sip_accounts.form.caller_name.hint'), :autofocus => true
+ - if @sip_account && @sip_account.new_record?
+ = f.hidden_field :auth_name
+ = f.hidden_field :password
+ - else
+ = f.input :auth_name, :as => :string, :label => t('sip_accounts.form.auth_name.label'), :hint => conditional_hint('sip_accounts.form.auth_name.hint')
+ = f.input :password, :as => :string, :label => t('sip_accounts.form.password.label'), :hint => conditional_hint('sip_accounts.form.password.hint')
= f.input :voicemail_pin, :as => :string, :label => t('sip_accounts.form.voicemail_pin.label'), :hint => conditional_hint('sip_accounts.form.voicemail_pin.hint')
= f.input :call_waiting, :label => t('sip_accounts.form.call_waiting.label'), :hint => conditional_hint('sip_accounts.form.call_waiting.hint')
= f.input :clir, :label => t('sip_accounts.form.clir.label'), :hint => conditional_hint('sip_accounts.form.clir.hint')
diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml
index 8d9791d..34aac64 100644
--- a/app/views/sip_accounts/_index_core.html.haml
+++ b/app/views/sip_accounts/_index_core.html.haml
@@ -1,26 +1,35 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('sip_accounts.index.online')
- %th= t('sip_accounts.index.caller_name')
- %th= t('sip_accounts.index.phone_numbers')
- %th= t('phones.name')
- %th{:colspan => '3'}
-
- - for sip_account in sip_accounts
+%table.table.table-striped
+ %thead
%tr
- %td
- - if sip_account.registration
- %i.icon-ok
- - else
- %i.icon-thumbs-down
- %td
- = sip_account.caller_name
- - phone_numbers = sip_account.phone_numbers
- %td
- - if sip_account.phone_numbers.count > 0
- = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number)
+ %th
+ %span.hidden-phone
+ = t('sip_accounts.index.online')
+ %th= t('sip_accounts.index.caller_name')
+ %th
+ %span.hidden-phone
+ = t('sip_accounts.index.phone_numbers')
+ - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true)
+ %th
+ %span.hidden-phone
+ = t('phones.name')
- %td
- - sip_account.phones.each do |phone|
- = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone )
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account} \ No newline at end of file
+ %tbody
+ - for sip_account in sip_accounts
+ %tr{:class => (sip_account.registration ? '' : 'warning')}
+ %td
+ - if sip_account.registration
+ %i.icon-ok
+ - else
+ %i.icon-thumbs-down
+ %td
+ = sip_account.caller_name
+ - phone_numbers = sip_account.phone_numbers
+ %td
+ - if sip_account.phone_numbers.count > 0
+ = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number)
+ - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true)
+ %td
+ %span.hidden-phone
+ - sip_account.phones.each do |phone|
+ = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone )
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => sip_account.sip_accountable, :child => sip_account}
diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml
index 4f6244f..72e10df 100644
--- a/app/views/sip_accounts/show.html.haml
+++ b/app/views/sip_accounts/show.html.haml
@@ -1,37 +1,67 @@
- content_for :title, t("sip_accounts.show.page_title")
-%p
- %strong= t('sip_accounts.show.auth_name') + ":"
- = @sip_account.auth_name
-%p
- %strong= t('sip_accounts.show.caller_name') + ":"
- = @sip_account.caller_name
-%p
- %strong= t('sip_accounts.show.password') + ":"
- = @sip_account.password
-%p
- %strong= t('sip_accounts.show.call_waiting') + ":"
- = @sip_account.call_waiting
-%p
- %strong= t('sip_accounts.show.clir') + ":"
- = @sip_account.clir
-%p
- %strong= t('sip_accounts.show.clip_no_screening') + ":"
- = @sip_account.clip_no_screening
-%p
- %strong= t('sip_accounts.show.hotdeskable') + ":"
- = @sip_account.hotdeskable
-%p
- %strong= t('sip_accounts.show.callforward_rules_act_per_sip_account') + ":"
- = @sip_account.callforward_rules_act_per_sip_account
-- if @sip_account.registration.try(:network_ip) && @sip_account.registration.try(:network_port)
- %p
- %strong= t('sip_accounts.show.registration') + ":"
- = "#{@sip_account.registration.network_ip}:#{@sip_account.registration.network_port}"
-- if @sip_account.registration.try(:expires)
- %p
- %strong= t('sip_accounts.show.expires') + ":"
- = "#{@sip_account.registration.try(:expires) - Time.now.to_i} s"
+%table.table.table-striped
+ %tbody
+ %tr
+ %td
+ %strong= t('sip_accounts.show.caller_name') + ":"
+ %td
+ = @sip_account.caller_name
+ %tr
+ %td
+ %strong= t('sip_accounts.show.auth_name') + ":"
+ %td
+ = @sip_account.auth_name
+ %tr
+ %td
+ %strong= t('sip_accounts.show.password') + ":"
+ %td
+ = @sip_account.password
+ %tr
+ %td
+ %strong= t('sip_accounts.show.call_waiting') + ":"
+ %td
+ = @sip_account.call_waiting == true ? t('simple_form.yes') : t('simple_form.no')
+ %tr
+ %td
+ %strong= t('sip_accounts.show.clir') + ":"
+ %td
+ = @sip_account.clir == true ? t('simple_form.yes') : t('simple_form.no')
+ %tr
+ %td
+ %strong= t('sip_accounts.show.clip_no_screening') + ":"
+ %td
+ = @sip_account.clip_no_screening
+ %tr
+ %td
+ %strong= t('sip_accounts.show.hotdeskable') + ":"
+ %td
+ = @sip_account.hotdeskable == true ? t('simple_form.yes') : t('simple_form.no')
+ %tr
+ %td
+ %strong= t('sip_accounts.show.callforward_rules_act_per_sip_account') + ":"
+ %td
+ = @sip_account.callforward_rules_act_per_sip_account == true ? t('simple_form.yes') : t('simple_form.no')
+
+ - if @sip_account.registration.try(:network_ip) && @sip_account.registration.try(:network_port)
+ %tr
+ %td
+ %strong= t('sip_accounts.show.registration') + ":"
+ %td
+ = "#{@sip_account.registration.network_ip}:#{@sip_account.registration.network_port}"
+ - if @sip_account.registration.try(:expires)
+ %tr
+ %td
+ %strong= t('sip_accounts.show.expires') + ":"
+ %td
+ = "#{@sip_account.registration.try(:expires) - Time.now.to_i} s"
+ - if @sip_account.registration.try(:user_agent)
+ %tr
+ %td
+ %strong= t('sip_accounts.show.user_agent') + ":"
+ %td
+ = @sip_account.registration.try(:user_agent)
+
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account }
diff --git a/app/views/sip_domains/_index_core.html.haml b/app/views/sip_domains/_index_core.html.haml
index d26fd1b..e280e9c 100644
--- a/app/views/sip_domains/_index_core.html.haml
+++ b/app/views/sip_domains/_index_core.html.haml
@@ -1,11 +1,12 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('sip_domains.index.host')
- %th= t('sip_domains.index.realm')
-
-
- - for sip_domain in sip_domains
+%table.table.table-striped
+ %thead
%tr
- %td= sip_domain.host
- %td= sip_domain.realm
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => sip_domain} \ No newline at end of file
+ %th= t('sip_domains.index.host')
+ %th= t('sip_domains.index.realm')
+
+ %tbody
+ - for sip_domain in sip_domains
+ %tr
+ %td= sip_domain.host
+ %td= sip_domain.realm
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => sip_domain} \ No newline at end of file
diff --git a/app/views/softkeys/_index_core.html.haml b/app/views/softkeys/_index_core.html.haml
index 7194379..398ee51 100644
--- a/app/views/softkeys/_index_core.html.haml
+++ b/app/views/softkeys/_index_core.html.haml
@@ -1,14 +1,15 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('softkeys.index.function')
- %th= t('softkeys.index.number')
- %th= t('softkeys.index.label')
-
-
- - for softkey in softkeys.order(:position)
+%table.table.table-striped
+ %thead
%tr
- %td
- =softkey.to_s
- %td= softkey.number
- %td= softkey.label
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => softkey.sip_account, :child => softkey} \ No newline at end of file
+ %th= t('softkeys.index.function')
+ %th= t('softkeys.index.number')
+ %th= t('softkeys.index.label')
+
+ %tbody
+ - for softkey in softkeys.order(:position)
+ %tr
+ %td
+ =softkey.to_s
+ %td= softkey.number
+ %td= softkey.label
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => softkey.sip_account, :child => softkey} \ No newline at end of file
diff --git a/app/views/system_messages/_index_core.html.haml b/app/views/system_messages/_index_core.html.haml
index 361eb5f..7c9dab5 100644
--- a/app/views/system_messages/_index_core.html.haml
+++ b/app/views/system_messages/_index_core.html.haml
@@ -1,11 +1,12 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('system_messages.index.created_at')
- %th= t('system_messages.index.content')
-
-
- - for system_message in system_messages
+%table.table.table-striped
+ %thead
%tr
- %td= system_message.created_at
- %td= system_message.content
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => system_message} \ No newline at end of file
+ %th= t('system_messages.index.created_at')
+ %th= t('system_messages.index.content')
+
+ %tbody
+ - for system_message in system_messages
+ %tr
+ %td= system_message.created_at
+ %td= system_message.content
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => system_message} \ No newline at end of file
diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml
index 627f221..28a8273 100644
--- a/app/views/tenants/_admin_area.html.haml
+++ b/app/views/tenants/_admin_area.html.haml
@@ -1,32 +1,40 @@
-= 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
- 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 link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
- - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last
- = succeed ' und ' do
- =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
- - else
- = succeed '.' do
- =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
-
-= render :partial => 'call_routes', :locals => {:tenant => tenant}
-
-= render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} \ No newline at end of file
+.row
+ .span12
+ = render :partial => 'tenants/table_of_sip_accounts', :locals => {:tenant => tenant}
+ - if SipAccount.any?
+ = render :partial => 'tenants/table_of_phones', :locals => {:tenant => tenant}
+
+ - if SipAccount.any? || Gateway.any?
+ = render :partial => 'tenants/table_of_conferences', :locals => {:tenant => tenant}
+ = render :partial => 'tenants/table_of_callthroughs', :locals => {:tenant => tenant}
+ = render :partial => 'tenants/table_of_hunt_groups', :locals => {:tenant => tenant}
+ = 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}
+
+ .well
+ %h2 Gemeinschaft Konfiguration
+ = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant}
+
+ %p
+ 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 link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
+ - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last
+ = succeed ' und ' do
+ =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
+ - else
+ = succeed '.' do
+ =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer)
+
+ = render :partial => 'call_routes', :locals => {:tenant => tenant}
+
+ = render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} \ No newline at end of file
diff --git a/app/views/tenants/_form_core.html.haml b/app/views/tenants/_form_core.html.haml
index e0b173d..8f6e08f 100644
--- a/app/views/tenants/_form_core.html.haml
+++ b/app/views/tenants/_form_core.html.haml
@@ -1,3 +1,4 @@
.inputs
= f.input :name, :label => t('tenants.form.name.label'), :hint => conditional_hint('tenants.form.name.hint'), :autofocus => true
- = f.input :description, :label => t('tenants.form.description.label'), :hint => conditional_hint('tenants.form.description.hint')
+ - if !@tenant.new_record?
+ = f.input :description, :label => t('tenants.form.description.label'), :hint => conditional_hint('tenants.form.description.hint')
diff --git a/app/views/tenants/_gs_parameter_table.html.haml b/app/views/tenants/_gs_parameter_table.html.haml
index 8afdb0e..8b0d62c 100644
--- a/app/views/tenants/_gs_parameter_table.html.haml
+++ b/app/views/tenants/_gs_parameter_table.html.haml
@@ -1,24 +1,20 @@
- 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
+ %table.table.table-striped
+ %thead
+ %tr
+ %th
+ Funktion
+ %th
+ Anzahl
- %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
+ %tbody
+ %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
+ %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
diff --git a/app/views/tenants/_index_core.html.haml b/app/views/tenants/_index_core.html.haml
index 721d624..a220b1b 100644
--- a/app/views/tenants/_index_core.html.haml
+++ b/app/views/tenants/_index_core.html.haml
@@ -1,17 +1,18 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('tenants.index.name')
- %th= t('tenants.index.description')
-
-
- - for tenant in tenants
+%table.table.table-striped
+ %thead
%tr
- %td= tenant.name
- %td= tenant.description
- %td
- - if current_user && current_user.current_tenant != tenant && current_user.tenants.include?(tenant)
- = simple_form_for([current_user.current_tenant, current_user]) do |f|
- = f.hidden_field :current_tenant_id, :value => tenant.id
- .actions
- = f.button :submit, conditional_t('tenants.switch_to_tenant')
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => tenant} \ No newline at end of file
+ %th= t('tenants.index.name')
+ %th= t('tenants.index.description')
+
+ %tbody
+ - for tenant in tenants
+ %tr
+ %td= tenant.name
+ %td= tenant.description
+ %td
+ - if current_user && current_user.current_tenant != tenant && current_user.tenants.include?(tenant)
+ = simple_form_for([current_user.current_tenant, current_user]) do |f|
+ = f.hidden_field :current_tenant_id, :value => tenant.id
+ .actions
+ = f.button :submit, conditional_t('tenants.switch_to_tenant')
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => tenant} \ No newline at end of file
diff --git a/app/views/tenants/_sip_accounts_and_phones.html.haml b/app/views/tenants/_sip_accounts_and_phones.html.haml
deleted file mode 100644
index bcc2dd6..0000000
--- a/app/views/tenants/_sip_accounts_and_phones.html.haml
+++ /dev/null
@@ -1,68 +0,0 @@
-%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_automatic_call_distributors.html.haml b/app/views/tenants/_table_of_automatic_call_distributors.html.haml
new file mode 100644
index 0000000..22796af
--- /dev/null
+++ b/app/views/tenants/_table_of_automatic_call_distributors.html.haml
@@ -0,0 +1,8 @@
+- cache(['tenant_show_table_of_automatic_call_distributors', I18n.locale, tenant, tenant.automatic_call_distributors.count, tenant.automatic_call_distributors.reorder(:updated_at).last]) do
+ -# AutomaticCallDistributors
+ -#
+ - if (can?( :index, AutomaticCallDistributor ) && tenant.automatic_call_distributors.count > 0 ) || can?( :create, AutomaticCallDistributor )
+ %h2= t('automatic_call_distributors.index.page_title')
+ - if can?( :index, AutomaticCallDistributor ) && tenant.automatic_call_distributors.count > 0
+ = render "automatic_call_distributors/index_core", :automatic_call_distributors => tenant.automatic_call_distributors
+ = 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_callthroughs.html.haml b/app/views/tenants/_table_of_callthroughs.html.haml
new file mode 100644
index 0000000..9cd6bf1
--- /dev/null
+++ b/app/views/tenants/_table_of_callthroughs.html.haml
@@ -0,0 +1,8 @@
+- cache(['tenant_show_table_of_callthroughs', I18n.locale, tenant, tenant.callthroughs.count, tenant.callthroughs.reorder(:updated_at).last]) do
+ -# Callthroughs
+ -#
+ - if (can?( :index, Callthrough ) && tenant.callthroughs.count > 0 ) || can?( :create, Callthrough )
+ %h2= t('callthroughs.index.page_title')
+ - if can?( :index, Callthrough ) && tenant.callthroughs.count > 0
+ = render "callthroughs/index_core", :callthroughs => tenant.callthroughs
+ = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Callthrough} \ No newline at end of file
diff --git a/app/views/tenants/_table_of_conferences.html.haml b/app/views/tenants/_table_of_conferences.html.haml
new file mode 100644
index 0000000..9775989
--- /dev/null
+++ b/app/views/tenants/_table_of_conferences.html.haml
@@ -0,0 +1,8 @@
+- cache(['table_of_pbx_features_conferences_row', I18n.locale, tenant, tenant.conferences.count, tenant.conferences.reorder(:updated_at).last]) do
+ -# Conferences
+ -#
+ - if (can?( :index, Conference ) && tenant.conferences.count > 0 ) || can?( :create, Conference )
+ %h2= t('conferences.index.page_title')
+ - if can?( :index, Conference ) && tenant.conferences.count > 0
+ = render "conferences/index_core", :conferences => tenant.conferences
+ = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Conference} \ No newline at end of file
diff --git a/app/views/tenants/_table_of_functions.html.haml b/app/views/tenants/_table_of_functions.html.haml
deleted file mode 100644
index d7af224..0000000
--- a/app/views/tenants/_table_of_functions.html.haml
+++ /dev/null
@@ -1,53 +0,0 @@
-- 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_hunt_groups.html.haml b/app/views/tenants/_table_of_hunt_groups.html.haml
new file mode 100644
index 0000000..aca570d
--- /dev/null
+++ b/app/views/tenants/_table_of_hunt_groups.html.haml
@@ -0,0 +1,8 @@
+- cache(['table_of_pbx_features_hunt_groups_row', I18n.locale, tenant, tenant.hunt_groups.count, tenant.hunt_groups.reorder(:updated_at).last]) do
+ -# HuntGroups
+ -#
+ - if (can?( :index, HuntGroup ) && tenant.hunt_groups.count > 0 ) || can?( :create, HuntGroup )
+ %h2= t('hunt_groups.index.page_title')
+ - if can?( :index, HuntGroup ) && tenant.hunt_groups.count > 0
+ = render "hunt_groups/index_core", :hunt_groups => tenant.hunt_groups
+ = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => HuntGroup} \ No newline at end of file
diff --git a/app/views/tenants/_table_of_phones.html.haml b/app/views/tenants/_table_of_phones.html.haml
new file mode 100644
index 0000000..e87191d
--- /dev/null
+++ b/app/views/tenants/_table_of_phones.html.haml
@@ -0,0 +1,7 @@
+- cache(['tenant_show_table_of_phones', I18n.locale, tenant, tenant.phones.count, tenant.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}
diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml
new file mode 100644
index 0000000..34eeb14
--- /dev/null
+++ b/app/views/tenants/_table_of_sip_accounts.html.haml
@@ -0,0 +1,25 @@
+- cache(['tenant_show_table_of_sip_accounts', I18n.locale, tenant, tenant.sip_accounts.count, SipAccount.count, tenant.sip_accounts.reorder(:updated_at).last]) do
+ .row
+ - if GsParameter.get('AUTO_ADMIN_ONLINE_HELP') == true && !SipAccount.any?
+ .span4
+ -# 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}
+
+ .span8
+ .well
+ %p
+ In der #{link_to 'Admin-Doku', page_help_path} finden Sie die Beschreibung wie ein neues Telefon mit einem SIP-Account eingerichtet werden kann. Dazu gibt es auch einen Screencast:
+ = render :partial => 'page/docu/screencast_list', :locals => {:screencast_name => 'firmen_sip_account_und_telefon_anlegen'}
+
+ - else
+ .span12
+ -# 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}
diff --git a/app/views/tenants/show.html.haml b/app/views/tenants/show.html.haml
index 53d3307..818e584 100644
--- a/app/views/tenants/show.html.haml
+++ b/app/views/tenants/show.html.haml
@@ -1,9 +1,16 @@
- content_for :title, @tenant.name
-- if !@tenant.description.blank?
- %p
- %strong= t('tenants.show.description') + ":"
- = @tenant.description
+%table.table.table-striped
+ %tbody
+ %tr
+ %td
+ %strong= t('tenants.show.name') + ":"
+ %td= @tenant.name
+ - if !@tenant.description.blank?
+ %tr
+ %td
+ %strong= t('tenants.show.description') + ":"
+ %td= @tenant.description
= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @tenant }
diff --git a/app/views/user_group_memberships/_index_core.html.haml b/app/views/user_group_memberships/_index_core.html.haml
index 5e6536b..fd59faa 100644
--- a/app/views/user_group_memberships/_index_core.html.haml
+++ b/app/views/user_group_memberships/_index_core.html.haml
@@ -1,13 +1,14 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('user_group_memberships.index.tenant')
- %th= t('user_group_memberships.index.user_group')
- %th= t('user_group_memberships.index.user')
-
-
- - for user_group_membership in user_group_memberships
+%table.table.table-striped
+ %thead
%tr
- %td= user_group_membership.user_group.tenant
- %td= user_group_membership.user_group
- %td= user_group_membership.user
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user_group_membership.user_group, :child => user_group_membership} \ No newline at end of file
+ %th= t('user_group_memberships.index.tenant')
+ %th= t('user_group_memberships.index.user_group')
+ %th= t('user_group_memberships.index.user')
+
+ %tbody
+ - for user_group_membership in user_group_memberships
+ %tr
+ %td= user_group_membership.user_group.tenant
+ %td= user_group_membership.user_group
+ %td= user_group_membership.user
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user_group_membership.user_group, :child => user_group_membership} \ No newline at end of file
diff --git a/app/views/user_groups/_index_core.html.haml b/app/views/user_groups/_index_core.html.haml
index 941f9fa..a85e8c4 100644
--- a/app/views/user_groups/_index_core.html.haml
+++ b/app/views/user_groups/_index_core.html.haml
@@ -1,28 +1,33 @@
- cache(['user_groups_table', I18n.locale, current_user, @user, user_groups, User.order(:updated_at).last, User.count, UserGroupMembership.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do
- %table{:class => 'table table-striped'}
- %tr
- %th= t('user_groups.index.name')
- - if user_groups.pluck(:description).uniq != [nil]
- %th= t('user_groups.index.description')
- - if @user
- %th= t('user_groups.index.tenant_id')
- - else
- %th= t('user_groups.index.members')
- %th{:colspan => '3'}
-
- - for user_group in user_groups
+ %table.table.table-striped
+ %thead
%tr
- %td= user_group.name
+ %th= t('user_groups.index.name')
- if user_groups.pluck(:description).uniq != [nil]
- %td= user_group.description
+ %th
+ %span.hidden-phone
+ = t('user_groups.index.description')
- if @user
- %td= user_group.tenant
+ %th
+ %span.hidden-phone
+ = t('user_groups.index.tenant_id')
- else
- %td
- =render 'users/listing', :users => user_group.users
- - if user_group.users.any?
- %br
- - if (user_group.tenant.user_ids - user_group.user_ids).any?
- = render :partial => 'shared/create_link', :locals => {:parent => user_group, :child_class => UserGroupMembership}
+ %th= t('user_groups.index.members')
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user_group.tenant, :child => user_group}
+ %tbody
+ - for user_group in user_groups
+ %tr
+ %td= user_group.name
+ - if user_groups.pluck(:description).uniq != [nil]
+ %td
+ %span.hidden-phone
+ = user_group.description
+ - if @user
+ %td
+ %span.hidden-phone
+ = user_group.tenant
+ - else
+ %td
+ =render 'users/listing', :users => user_group.users
+
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user_group.tenant, :child => user_group}
diff --git a/app/views/user_groups/show.html.haml b/app/views/user_groups/show.html.haml
index fe5b745..fd5414e 100644
--- a/app/views/user_groups/show.html.haml
+++ b/app/views/user_groups/show.html.haml
@@ -1,20 +1,28 @@
- content_for :title, t("user_groups.show.page_title")
-%p
- %strong= t('user_groups.show.name') + ":"
- = @user_group.name
-%p
- %strong= t('user_groups.show.description') + ":"
- = @user_group.description
-%p
- %strong= t('user_groups.show.tenant_id') + ":"
- = @user_group.tenant
+%table.table.table-striped
+ %tbody
+ %tr
+ %td
+ %strong= t('user_groups.show.name') + ":"
+ %td
+ = @user_group.name
+ %tr
+ %td
+ %strong= t('user_groups.show.description') + ":"
+ %td
+ = @user_group.description
+ %tr
+ %td
+ %strong= t('user_groups.show.tenant_id') + ":"
+ %td
+ = @user_group.tenant
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @user_group.tenant, :child => @user_group }
%h2=t("user_group_memberships.index.page_title")
-- if @user_group.user_group_memberships.count > 0
+- if @user_group.user_group_memberships.any?
= render "user_group_memberships/index_core", :user_group_memberships => @user_group.user_group_memberships
= render :partial => 'shared/create_link', :locals => {:parent => @user_group, :child_class => UserGroupMembership} \ No newline at end of file
diff --git a/app/views/users/_form_core.html.haml b/app/views/users/_form_core.html.haml
index 24b15f5..980976d 100644
--- a/app/views/users/_form_core.html.haml
+++ b/app/views/users/_form_core.html.haml
@@ -2,7 +2,8 @@
- if GuiFunction.display?('name_data_fields_in_user_edit_form', current_user)
= f.input :male, :collection => [[true, t('users.form.gender.male')], [false, t('users.form.gender.female')]], :label_method => :last, :value_method => :first, :label => t('users.form.male.label'), :hint => conditional_hint('users.form.gender.hint'), :label => t('users.form.gender.label'), :as => :radio_buttons
= f.input :first_name, :label => t('users.form.first_name.label'), :hint => conditional_hint('users.form.first_name.hint'), :autofocus => true
- = f.input :middle_name, :label => t('users.form.middle_name.label'), :hint => conditional_hint('users.form.middle_name.hint')
+ - if User.any?
+ = f.input :middle_name, :label => t('users.form.middle_name.label'), :hint => conditional_hint('users.form.middle_name.hint')
= f.input :last_name, :label => t('users.form.last_name.label'), :hint => conditional_hint('users.form.last_name.hint')
- if GuiFunction.display?('user_name_field_in_user_edit_form', current_user)
= f.input :user_name, :label => t('users.form.user_name.label'), :hint => conditional_hint('users.form.user_name.hint')
diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml
index 7f2251a..9d63afc 100644
--- a/app/views/users/_index_core.html.haml
+++ b/app/views/users/_index_core.html.haml
@@ -1,28 +1,36 @@
- cache(['user_table_row_inner_td', I18n.locale, current_user, users.reorder(:updated_at).last, users.count, GsParameter.get('NUMBER_OF_SHOWN_ITEMS')]) do
- %table{:class => 'table table-striped'}
- %tr
- %th
- %th= t('users.index.user_name')
- %th= t('users.index.email')
- %th= t('users.index.first_name')
- %th= t('users.index.last_name')
- %th{:colspan => '3'}
-
- - for user in users
- - cache(['user_table_row', I18n.locale, current_user, user]) do
- %tr
- %td
- - if user.image?
- =image_tag(user.image_url(:mini).to_s, :class => 'img-rounded')
- - else
- - if user.male?
- = image_tag 'icons/user-male-16x.png', :class => 'img-rounded'
+ %table.table.table-striped
+ %thead
+ %tr
+ %th
+ %th= t('users.index.user_name')
+ %th
+ %span.hidden-phone
+ = t('users.index.email')
+ %th
+ %span.hidden-phone
+ = t('users.index.first_name')
+ %th= t('users.index.last_name')
+
+ %tbody
+ - for user in users
+ - cache(['user_table_row', I18n.locale, current_user, user]) do
+ %tr
+ %td
+ - if user.image?
+ =image_tag(user.image_url(:mini).to_s, :class => 'img-rounded')
- else
- = image_tag 'icons/user-female-16x.png', :class => 'img-rounded'
- %td= user.user_name
- %td
- - if !user.email.blank?
- = mail_to user.email, (Haml::Engine.new("%i.icon-envelope").render + ' ' + user.email)
- %td= user.first_name
- %td= user.last_name
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @tenant, :child => user} \ No newline at end of file
+ - if user.male?
+ = image_tag 'icons/user-male-16x.png', :class => 'img-rounded'
+ - else
+ = image_tag 'icons/user-female-16x.png', :class => 'img-rounded'
+ %td= user.user_name
+ %td
+ - if !user.email.blank?
+ %span.hidden-phone
+ = mail_to user.email, (Haml::Engine.new("%i.icon-envelope").render + ' ' + user.email)
+ %td
+ %span.hidden-phone
+ = user.first_name
+ %td= user.last_name
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @tenant, :child => user} \ No newline at end of file
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 4c39fd1..639a52a 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -3,13 +3,27 @@
.row
.span3
- cache(['user_show_aside', I18n.locale, @user, @user.sip_accounts, @user.conferences]) do
- = image_tag @user.image_url(:small).to_s, :class => 'img-rounded' if @user.image? && @user.image_url(:small)
- %p
- %strong= t('users.show.user_name') + ":"
- = @user.user_name
- %p
- %strong= t('users.show.email') + ":"
- = @user.email
+
+ - if @user.image? && @user.image_url(:profile)
+ %span.hidden-phone
+ %ul.thumbnails
+ %li.span3
+ %div.thumbnail
+ %a.thumbnail{:href => @user.image_url}
+ =image_tag(@user.image_url(:profile), :alt => "Avatar #{@user}", :class => 'img-rounded')
+
+ %table.table.table-striped
+ %tbody
+ %tr
+ %td
+ %strong= t('users.show.user_name') + ":"
+ %td
+ = truncate(@user.user_name, :length => 14)
+ %tr
+ %td
+ %strong= t('users.show.email') + ":"
+ %td
+ = truncate(@user.email, :length => 14)
%p.controls
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @user }
diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml
index ded7ea0..f03002d 100644
--- a/app/views/voicemail_messages/_index_core.html.haml
+++ b/app/views/voicemail_messages/_index_core.html.haml
@@ -1,7 +1,7 @@
= form_tag(destroy_multiple_sip_account_voicemail_messages_path(@sip_account), :method => :delete, :id => 'voicemail_message_form') do
%header.entries-nav= render :partial => "voicemail_messages/navigation"
.content
- %table{:class => 'table table-striped'}
+ %table.table.table-striped
- for voicemail_message in voicemail_messages
%tr.voicemail-messages-entry{:id => "message_#{voicemail_message.uuid}"}
diff --git a/app/views/whitelists/_index_core.html.haml b/app/views/whitelists/_index_core.html.haml
index 3333169..fb7246f 100644
--- a/app/views/whitelists/_index_core.html.haml
+++ b/app/views/whitelists/_index_core.html.haml
@@ -1,15 +1,16 @@
-%table{:class => 'table table-striped'}
- %tr
- %th= t('whitelists.index.name')
- %th= t('whitelists.index.phone_numbers')
-
-
- - for whitelist in whitelists
+%table.table.table-striped
+ %thead
%tr
- %td= whitelist.name || '-'
- %td
- = render 'phone_numbers/listing', :phone_numbers => whitelist.phone_numbers
- %br
- = render :partial => 'shared/create_link', :locals => {:parent => whitelist, :child_class => PhoneNumber, :short_link => true}
+ %th= t('whitelists.index.name')
+ %th= t('whitelists.index.phone_numbers')
+
+ %tbody
+ - for whitelist in whitelists
+ %tr
+ %td= whitelist.name || '-'
+ %td
+ = render 'phone_numbers/listing', :phone_numbers => whitelist.phone_numbers
+ %br
+ = render :partial => 'shared/create_link', :locals => {:parent => whitelist, :child_class => PhoneNumber, :short_link => true}
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => whitelist.whitelistable, :child => whitelist} \ No newline at end of file
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => whitelist.whitelistable, :child => whitelist} \ No newline at end of file