From a81b51c2696e403bcd7ee59f0402f5b55527ab2c Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 21:21:43 +0100 Subject: Wording --- config/locales/views/phone_books/de.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/views/phone_books/de.yml b/config/locales/views/phone_books/de.yml index 8aa6acf..a42c8e3 100644 --- a/config/locales/views/phone_books/de.yml +++ b/config/locales/views/phone_books/de.yml @@ -15,7 +15,7 @@ de: page_title: 'Telefonbücher' name: 'Name des Telefonbuches' description: 'Beschreibung' - count: 'Anzahl der Telefonbucheinträge' + count: 'Telefonbucheinträge' actions: confirm: 'Sind Sie sicher, dass Sie dieses Telefonbuch löschen möchten?' destroy: 'Löschen' -- cgit v1.2.3 From 8fdc1332bbff9c23400459dc7018cba147279cc5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 21:21:49 +0100 Subject: Added %thead and %tbody to the tables. --- .../access_authorizations/_index_core.html.haml | 39 +++---- app/views/acd_agents/_index_core.html.haml | 31 +++--- app/views/acd_callers/_index_core.html.haml | 39 +++---- app/views/addresses/_index_core.html.haml | 43 ++++---- .../_index_core.html.haml | 69 ++++++------ app/views/call_forwards/_index_core.html.haml | 55 +++++----- app/views/call_histories/_index_core.html.haml | 107 +++++++++--------- app/views/call_routes/_index_core.html.haml | 39 +++---- app/views/calls/_index_core.html.haml | 15 +-- app/views/callthroughs/_index_core.html.haml | 29 ++--- .../conference_invitees/_index_core.html.haml | 31 +++--- app/views/conferences/_index_core.html.haml | 93 ++++++++-------- app/views/fax_accounts/_index_core.html.haml | 61 ++++++----- app/views/fax_documents/_index_core.html.haml | 61 ++++++----- .../_index_core.html.haml | 21 ++-- app/views/gateway_parameters/_index_core.html.haml | 23 ++-- app/views/gateway_settings/_index_core.html.haml | 23 ++-- app/views/gateways/_index_core.html.haml | 33 +++--- .../_index_core.html.haml | 31 +++--- app/views/gs_nodes/_index_core.html.haml | 35 +++--- app/views/gs_parameters/_index_core.html.haml | 29 ++--- app/views/gui_functions/_index_core.html.haml | 47 ++++---- app/views/hunt_group_members/_index_core.html.haml | 35 +++--- app/views/hunt_groups/_index_core.html.haml | 55 +++++----- app/views/manufacturers/_index_core.html.haml | 33 +++--- app/views/phone_books/_index_core.html.haml | 29 ++--- app/views/phone_models/_index_core.html.haml | 35 +++--- .../phone_number_ranges/_index_core.html.haml | 37 ++++--- app/views/phone_numbers/_index_core.html.haml | 24 ++-- app/views/phone_sip_accounts/_index_core.html.haml | 23 ++-- app/views/phones/_index_core.html.haml | 27 ++--- app/views/phones/show.html.haml | 122 ++++++++++++--------- app/views/ringtones/_index_core.html.haml | 19 ++-- app/views/route_elements/_index_core.html.haml | 35 +++--- app/views/shared/_show_edit_destroy_part.html.haml | 8 +- app/views/sip_accounts/_index_core.html.haml | 47 ++++---- app/views/sip_domains/_index_core.html.haml | 19 ++-- app/views/softkeys/_index_core.html.haml | 25 +++-- app/views/system_messages/_index_core.html.haml | 19 ++-- app/views/tenants/_gs_parameter_table.html.haml | 38 +++---- app/views/tenants/_index_core.html.haml | 31 +++--- app/views/tenants/_table_of_functions.html.haml | 103 ++++++++--------- .../user_group_memberships/_index_core.html.haml | 23 ++-- app/views/user_groups/_index_core.html.haml | 43 ++++---- app/views/users/_index_core.html.haml | 51 ++++----- app/views/whitelists/_index_core.html.haml | 25 +++-- 46 files changed, 961 insertions(+), 899 deletions(-) diff --git a/app/views/access_authorizations/_index_core.html.haml b/app/views/access_authorizations/_index_core.html.haml index 7469a1d..a36317a 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" ) + %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..e3d6f0a 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 + %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..0a2e505 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 + %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..8b9e0c2 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 + %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..4878b56 100644 --- a/app/views/automatic_call_distributors/_index_core.html.haml +++ b/app/views/automatic_call_distributors/_index_core.html.haml @@ -1,39 +1,40 @@ %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 + %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}") + %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') + + %tbody + - for automatic_call_distributor in automatic_call_distributors + %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} + %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} - %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} + %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} - =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/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml index 27ad86f..7a1672f 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 + %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..411c8c0 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -1,58 +1,59 @@ = 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') + %tbody + - 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") + - 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")) - - 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") + - 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 - = 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 + .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 diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index 5dc7c21..a665b5d 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -1,21 +1,22 @@ - 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 + %thead + %tr + %th= t('call_routes.index.name') + %th= t('route_elements.index.pattern') + %th= t('call_routes.index.endpoint_type') + + %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= call_route.endpoint_type + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} \ No newline at end of file diff --git a/app/views/calls/_index_core.html.haml b/app/views/calls/_index_core.html.haml index 09b7da6..c152470 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 + %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..1767f5b 100644 --- a/app/views/callthroughs/_index_core.html.haml +++ b/app/views/callthroughs/_index_core.html.haml @@ -1,17 +1,18 @@ %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 + %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= 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= 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=render 'phone_numbers/listing', :phone_numbers => callthrough.access_authorization_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 diff --git a/app/views/conference_invitees/_index_core.html.haml b/app/views/conference_invitees/_index_core.html.haml index 1d6ab2e..5e9c283 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 + %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..bd305df 100644 --- a/app/views/conferences/_index_core.html.haml +++ b/app/views/conferences/_index_core.html.haml @@ -1,53 +1,54 @@ %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 + %thead %tr - %td= conference.name + %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') + + %tbody + - for conference in conferences + - parent = conference.conferenceable + %tr + %td= conference.name + - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count + %td + - if conference.start + = l conference.start, :format => :long + - else + = '-' + %td + - if conference.end + = l conference.end, :format => :long + - else + = '-' %td - - if conference.start - = l conference.start, :format => :long - - else - = '-' - %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.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 !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count + - 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 - - 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') + %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') - =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/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml index 5a04bf0..f3e391e 100644 --- a/app/views/fax_accounts/_index_core.html.haml +++ b/app/views/fax_accounts/_index_core.html.haml @@ -1,35 +1,36 @@ %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 + %thead %tr - %td= truncate(fax_account.name, :length => 15) - %td - =render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number) + %th= 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)}") + = t('fax_accounts.index.station_id') + %th + = t('fax_accounts.index.received') = '/' - = 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.sent') + %br + %small + = t('fax_accounts.index.last_update') + + %tbody + - for fax_account in fax_accounts + %tr + %td= truncate(fax_account.name, :length => 15) + %td + =render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number) %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 + = 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 + %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 diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml index 1265716..d3abafa 100644 --- a/app/views/fax_documents/_index_core.html.haml +++ b/app/views/fax_documents/_index_core.html.haml @@ -1,33 +1,34 @@ %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') + %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 ? '⇨' : '⇦'} #{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 ? '⇨' : '⇦'} #{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 - = 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..d7b3b21 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 + %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..355169e 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 + %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/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml index ded7eb8..f5faf33 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 + %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/_index_core.html.haml b/app/views/gateways/_index_core.html.haml index 0eec67f..faa381d 100644 --- a/app/views/gateways/_index_core.html.haml +++ b/app/views/gateways/_index_core.html.haml @@ -1,19 +1,20 @@ - 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 + %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= t('gateways.index.technology') + %th= t('gateways.index.inbound') + %th= t('gateways.index.outbound') + %th= 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= 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 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..d491f51 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 + %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..863ab25 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 + %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..9628feb 100644 --- a/app/views/gs_parameters/_index_core.html.haml +++ b/app/views/gs_parameters/_index_core.html.haml @@ -1,16 +1,17 @@ - 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= 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 diff --git a/app/views/gui_functions/_index_core.html.haml b/app/views/gui_functions/_index_core.html.haml index 0d9454e..7224bbc 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 + %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..611e74c 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 + %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..5f6e797 100644 --- a/app/views/hunt_groups/_index_core.html.haml +++ b/app/views/hunt_groups/_index_core.html.haml @@ -1,34 +1,35 @@ - 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 + %thead %tr - %td= hunt_group.name - %td= t("hunt_groups.strategies.#{hunt_group.strategy}") + %th= t('hunt_groups.index.name') + %th= 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= t('hunt_groups.index.hunt_group_members') + + %tbody + - for hunt_group in hunt_groups + %tr + %td= hunt_group.name + %td= t("hunt_groups.strategies.#{hunt_group.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} - %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 + - 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} - =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/manufacturers/_index_core.html.haml b/app/views/manufacturers/_index_core.html.haml index 5efa5d9..6b0acd2 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 + %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/phone_books/_index_core.html.haml b/app/views/phone_books/_index_core.html.haml index accded6..df7a2ef 100644 --- a/app/views/phone_books/_index_core.html.haml +++ b/app/views/phone_books/_index_core.html.haml @@ -1,18 +1,19 @@ %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 + %thead %tr - %td - - if phone_book.description.blank? - = phone_book.name - - else - %a.brand{:rel => 'tooltip', :title => phone_book.description} + %th= t('phone_books.index.name') + %th= t('phone_books.index.count') + + %tbody + - for phone_book in phone_books + %tr + %td + - if phone_book.description.blank? = phone_book.name - %td - = number_with_delimiter( phone_book.phone_book_entries.count ) + - else + %a.brand{:rel => 'tooltip', :title => phone_book.description} + = phone_book.name + %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_models/_index_core.html.haml b/app/views/phone_models/_index_core.html.haml index b899a5c..0155f25 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 + %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..2751bdd 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 + %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..e1a8602 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) + %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..8178e6d 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 + %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 + %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 diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index fc1ad19..b8efbe3 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -1,15 +1,16 @@ %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 + %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= t('phones.index.phone_model_id') + %th= t('phones.index.hot_deskable') + %th= t('phones.index.ip_address') + + %tbody + - for phone in phones + %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 diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index faf4061..18e990c 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -1,52 +1,74 @@ - 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 + .span6 + %table + %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 + + - 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 + + %tr + %td + %strong= t('phones.show.ip_address') + ":" + %td + = @phone.ip_address + + = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } + + + .span6 + - 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. + +.row + .span12 + %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} diff --git a/app/views/ringtones/_index_core.html.haml b/app/views/ringtones/_index_core.html.haml index e3b9a32..6996fde 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 + %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..9b7e8d7 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 + %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/_show_edit_destroy_part.html.haml b/app/views/shared/_show_edit_destroy_part.html.haml index e82c667..a306bc3 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-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}.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-mini.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"} %i.icon-trash.icon-white =t("#{child.class.name.underscore.pluralize}.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-mini.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) } %i.icon-edit.icon-white =t("#{child.class.name.underscore.pluralize}.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-mini.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"} %i.icon-trash.icon-white =t("#{child.class.name.underscore.pluralize}.actions.destroy") \ No newline at end of file diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index 8d9791d..ff09c37 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -1,26 +1,27 @@ %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 + %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= t('sip_accounts.index.online') + %th= t('sip_accounts.index.caller_name') + %th= t('sip_accounts.index.phone_numbers') + %th= 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 + %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) + + %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 diff --git a/app/views/sip_domains/_index_core.html.haml b/app/views/sip_domains/_index_core.html.haml index d26fd1b..44c03c7 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 + %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..6c30803 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) + %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..b40cd0c 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 + %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/_gs_parameter_table.html.haml b/app/views/tenants/_gs_parameter_table.html.haml index 8afdb0e..1bcb914 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 + %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..fd7fabc 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 + %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/_table_of_functions.html.haml b/app/views/tenants/_table_of_functions.html.haml index d7af224..3587eb8 100644 --- a/app/views/tenants/_table_of_functions.html.haml +++ b/app/views/tenants/_table_of_functions.html.haml @@ -1,53 +1,56 @@ - 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 + %thead %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 + %th + Funktion + %th + Anzahl + %th + + %tbody + - 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/user_group_memberships/_index_core.html.haml b/app/views/user_group_memberships/_index_core.html.haml index 5e6536b..c9674ba 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 + %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..6c830e9 100644 --- a/app/views/user_groups/_index_core.html.haml +++ b/app/views/user_groups/_index_core.html.haml @@ -1,28 +1,29 @@ - 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 + %thead %tr - %td= user_group.name + %th= t('user_groups.index.name') - if user_groups.pluck(:description).uniq != [nil] - %td= user_group.description + %th= t('user_groups.index.description') - if @user - %td= user_group.tenant + %th= 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= user_group.description + - if @user + %td= user_group.tenant + - 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} + + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user_group.tenant, :child => user_group} diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index 7f2251a..87d3c4c 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,28 +1,29 @@ - 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' + %thead + %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') + + %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? + = 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 diff --git a/app/views/whitelists/_index_core.html.haml b/app/views/whitelists/_index_core.html.haml index 3333169..b5af08d 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 + %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 -- cgit v1.2.3 From d7532f77f151643ae4cb6eb349edd5c0fbb2f813 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 21:57:47 +0100 Subject: Misc --- app/views/call_histories/_index_core.html.haml | 34 +++++++++++++++++--------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 411c8c0..07e0ee4 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -1,18 +1,23 @@ = render :partial => "call_histories/navigation" %table{:class => 'table table-striped'} + %thead + %tr + %th + Uhrzeit + %th + Teilnehmer + %th + Status + %tbody - 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 + %tr + %td - if voicemail_message .voicemail-message %a{:href => sip_account_voicemail_messages_path(@sip_account, :anchor => "message_#{voicemail_message.id}")} @@ -37,7 +42,11 @@ - if call_history.forwarding_service && call_history.entry_type != 'forwarded' = t("call_histories.index.forwarded_by") = call_history.display_auth_account_name - %td.user + %td + - image = call_history.display_image(:small, phone_book_entry) + - if image + = image_tag(image, :itemprop => 'image') + - display_name = call_history.display_name - if display_name.blank? - display_name = phone_book_entry.to_s @@ -46,14 +55,17 @@ - else .name= display_name .phone= phone_number - %td.status + %td - if call_history.display_duration .duration= call_history.display_duration - else .disposition= t("call_histories.call_results.#{call_history.result}") - %td.actions + %td - 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 + %td - if can? :destroy, call_history - = link_to t('call_histories.index.actions.destroy'), sip_account_call_history_path(@sip_account, call_history), :method => :delete + / = link_to t('call_histories.index.actions.destroy'), sip_account_call_history_path(@sip_account, call_history), :method => :delete + %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{call_history.class.name.underscore.pluralize}.actions.confirm_detroy"), "data-method" => "delete", :href => sip_account_call_history_path(@sip_account, call_history), :rel => "nofollow"} + %i.icon-trash.icon-white + =t('call_histories.index.actions.destroy') -- cgit v1.2.3 From cda8e27d0b09c5371fca3946ad476a205ded0412 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 22:33:24 +0100 Subject: Show icons only but no text in the buttons on small devises. --- .../shared/_index_view_edit_destroy_part.html.haml | 33 ++++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-) 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..526e11d 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,43 @@ -- style = 'width:90px' -- style = '' - - if !(defined? parent).nil? && !(defined? child).nil? - if can? :show, child - %td{ :style => style } + %td %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") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - if can? :edit, child - %td{ :style => style } + %td %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") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") - if can? :destroy, child - %td{ :style => style } + %td %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") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") - elsif !(defined? child).nil? - if can? :show, child - %td{ :style => style } + %td %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") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - if can? :edit, child - %td{ :style => style } + %td %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") + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") - if can? :destroy, child - %td{ :style => style } + %td %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 + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file -- cgit v1.2.3 From b432515cf81097d58754cea898dd2a7733622660 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 22:35:59 +0100 Subject: Wording --- config/locales/views/phone_book_entries/de.yml | 2 +- config/locales/views/phone_books/de.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/views/phone_book_entries/de.yml b/config/locales/views/phone_book_entries/de.yml index ba9983e..79d2a9b 100644 --- a/config/locales/views/phone_book_entries/de.yml +++ b/config/locales/views/phone_book_entries/de.yml @@ -6,7 +6,7 @@ de: successfuly_updated: 'Der Telefonbucheintrag "%{resource}" wurde aktualisiert.' successfuly_destroyed: 'Der Telefonbucheintrag wurde gelöscht.' index: - page_title: 'Telefonbucheinträge' + page_title: 'Anzahl Telefonbucheinträge' phone_book_id: 'Telefonbuch' first_name: 'Vorname' middle_name: 'Zweiter Vorname' diff --git a/config/locales/views/phone_books/de.yml b/config/locales/views/phone_books/de.yml index a42c8e3..fdab0de 100644 --- a/config/locales/views/phone_books/de.yml +++ b/config/locales/views/phone_books/de.yml @@ -15,7 +15,7 @@ de: page_title: 'Telefonbücher' name: 'Name des Telefonbuches' description: 'Beschreibung' - count: 'Telefonbucheinträge' + count: 'Anzahl Einträge' actions: confirm: 'Sind Sie sicher, dass Sie dieses Telefonbuch löschen möchten?' destroy: 'Löschen' -- cgit v1.2.3 From f64e0935ea0b31230d1a18a27dfb5993a6e9ff02 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 22:38:40 +0100 Subject: Wording --- config/locales/views/phone_books/de.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/views/phone_books/de.yml b/config/locales/views/phone_books/de.yml index fdab0de..8812f55 100644 --- a/config/locales/views/phone_books/de.yml +++ b/config/locales/views/phone_books/de.yml @@ -13,7 +13,7 @@ de: successfuly_destroyed: 'Ein Telefonbuch wurde gelöscht.' index: page_title: 'Telefonbücher' - name: 'Name des Telefonbuches' + name: 'Name' description: 'Beschreibung' count: 'Anzahl Einträge' actions: -- cgit v1.2.3 From 7c842dd79b3ac4a8bd462ef80ee1e27f5e74e4d3 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 23:46:57 +0100 Subject: Optimized views for phones. --- .../phone_book_entries/_index_core.de.html.haml | 42 ----------- app/views/phone_book_entries/_index_core.html.haml | 86 +++++++++++----------- app/views/phone_book_entries/_navigation.html.haml | 13 ++-- app/views/phone_books/_index_core.html.haml | 12 +-- app/views/phone_books/show.html.haml | 4 +- app/views/phones/_index_core.html.haml | 18 ++++- app/views/sip_accounts/_index_core.html.haml | 17 +++-- app/views/user_groups/_index_core.html.haml | 16 +++- app/views/users/_index_core.html.haml | 15 +++- 9 files changed, 107 insertions(+), 116 deletions(-) delete mode 100644 app/views/phone_book_entries/_index_core.de.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..c7245a2 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{:class => '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 df7a2ef..a95ce7c 100644 --- a/app/views/phone_books/_index_core.html.haml +++ b/app/views/phone_books/_index_core.html.haml @@ -2,17 +2,19 @@ %thead %tr %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 - - if phone_book.description.blank? - = phone_book.name - - else - %a.brand{:rel => 'tooltip', :title => phone_book.description} - = phone_book.name + = phone_book.name + %td + %span.visible-desktop + = phone_book.description %td = number_with_delimiter( phone_book.phone_book_entries.count ) 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/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index b8efbe3..fa1c679 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -2,15 +2,25 @@ %thead %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') + %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 %td= phone.pretty_mac_address %td= phone.phone_model - %td= phone.hot_deskable + %td + %span.hidden-phone + = 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 diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index ff09c37..e94db83 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -1,10 +1,16 @@ %table{:class => 'table table-striped'} %thead %tr - %th= t('sip_accounts.index.online') + %th + %span.hidden-phone + = t('sip_accounts.index.online') %th= t('sip_accounts.index.caller_name') - %th= t('sip_accounts.index.phone_numbers') - %th= t('phones.name') + %th + %span.hidden-phone + = t('sip_accounts.index.phone_numbers') + %th + %span.hidden-phone + = t('phones.name') %tbody - for sip_account in sip_accounts @@ -22,6 +28,7 @@ = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number) %td - - sip_account.phones.each do |phone| - = link_to phone.to_s, method( :"#{phone.phoneable_type.underscore}_phone_path" ).( phone.phoneable_id, phone ) + %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} \ 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 6c830e9..c481a18 100644 --- a/app/views/user_groups/_index_core.html.haml +++ b/app/views/user_groups/_index_core.html.haml @@ -4,9 +4,13 @@ %tr %th= t('user_groups.index.name') - if user_groups.pluck(:description).uniq != [nil] - %th= t('user_groups.index.description') + %th + %span.hidden-phone + = t('user_groups.index.description') - if @user - %th= t('user_groups.index.tenant_id') + %th + %span.hidden-phone + = t('user_groups.index.tenant_id') - else %th= t('user_groups.index.members') @@ -15,9 +19,13 @@ %tr %td= user_group.name - if user_groups.pluck(:description).uniq != [nil] - %td= user_group.description + %td + %span.hidden-phone + = user_group.description - if @user - %td= user_group.tenant + %td + %span.hidden-phone + = user_group.tenant - else %td =render 'users/listing', :users => user_group.users diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index 87d3c4c..77b8c95 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -4,8 +4,12 @@ %tr %th %th= t('users.index.user_name') - %th= t('users.index.email') - %th= t('users.index.first_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 @@ -23,7 +27,10 @@ %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 + %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 -- cgit v1.2.3 From 8de0e8215c9a2f5f8ce2dce71bf9cdca367ee94e Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 23:59:11 +0100 Subject: Use the same sip_account and phone structure for tenant as for user. --- app/views/tenants/_admin_area.html.haml | 14 ++++- .../tenants/_sip_accounts_and_phones.html.haml | 68 ---------------------- 2 files changed, 13 insertions(+), 69 deletions(-) delete mode 100644 app/views/tenants/_sip_accounts_and_phones.html.haml diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index 627f221..d634f73 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,4 +1,16 @@ -= render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => tenant} +-# 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} + +-# 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} = render :partial => 'users_table', :locals => {:tenant => tenant} 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 - = '-' -- cgit v1.2.3 From 2bdfc8b1905d5069ded392c5ca377c59289278d9 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 00:14:56 +0100 Subject: Optimized UI. --- app/views/fax_accounts/_index_core.html.haml | 30 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/app/views/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml index f3e391e..2296d21 100644 --- a/app/views/fax_accounts/_index_core.html.haml +++ b/app/views/fax_accounts/_index_core.html.haml @@ -1,23 +1,28 @@ %table{:class => 'table table-striped'} %thead %tr - %th= t('fax_accounts.index.name') + %th + %span.hidden-phone + = 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') + %span.hidden-phone + = t('fax_accounts.index.received') + = '/' + = t('fax_accounts.index.sent') + %br + %small + = t('fax_accounts.index.last_update') %tbody - for fax_account in fax_accounts %tr - %td= truncate(fax_account.name, :length => 15) + %td + %span.hidden-phone + =fax_account.name %td =render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number) %br @@ -26,11 +31,16 @@ = 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 + - 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) - = link_to t('fax_accounts.index.send_a_fax'), new_fax_account_fax_document_path(fax_account) + %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 -- cgit v1.2.3 From de2369863c8cb0d2ea61a236f869d91dd0cce3af Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 00:20:38 +0100 Subject: Optimized UI (for the use on mobile phones). --- app/views/conferences/_index_core.html.haml | 43 ++++++++++++++++++----------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/app/views/conferences/_index_core.html.haml b/app/views/conferences/_index_core.html.haml index bd305df..8670418 100644 --- a/app/views/conferences/_index_core.html.haml +++ b/app/views/conferences/_index_core.html.haml @@ -5,12 +5,20 @@ - 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') + %th + %span.hidden-phone + = 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') + %th + %span.hidden-phone + = t('conferences.index.max_members') + %th + %span.hidden-phone + = t('conferences.index.number_of_invitees') + %th + %span.hidden-phone + = t('conferences.index.flags') %tbody - for conference in conferences @@ -29,10 +37,8 @@ - else = '-' %td - - if conference.phone_numbers.count > 0 + - if conference.phone_numbers.any? = 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 !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count %td @@ -40,15 +46,20 @@ = 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') + %span.hidden-phone + = conference.max_members + %td + %span.hidden-phone + = conference.conference_invitees.count + %td + %span.hidden-phone + %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') =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => parent, :child => conference} \ No newline at end of file -- cgit v1.2.3 From 6794ba5553a4a3f7206718276052c5c20c0ea5b0 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 00:39:00 +0100 Subject: Added nav items. --- app/views/layouts/_navbar.html.haml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index d6f08cb..d9dd990 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -9,13 +9,17 @@ %span.icon-bar %span.icon-bar - - if current_user + - if current_user && current_user.sip_accounts.any? .nav-collapse.collapse %ul.nav %li - %a{:href => "#about"} About - %li.pull_right - %a{:href => "#contact"} Contact + %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 => 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 -- cgit v1.2.3 From d97896546095722ccd3a2051cdb2c2ab1b364328 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 00:49:51 +0100 Subject: UI optimizations. --- app/views/shared/_create_link.html.haml | 6 +- .../shared/_index_view_edit_destroy_part.html.haml | 72 +++++++++++----------- app/views/shared/_show_edit_destroy_part.html.haml | 8 +-- 3 files changed, 42 insertions(+), 44 deletions(-) diff --git a/app/views/shared/_create_link.html.haml b/app/views/shared/_create_link.html.haml index 0711ddf..25e851b 100644 --- a/app/views/shared/_create_link.html.haml +++ b/app/views/shared/_create_link.html.haml @@ -2,11 +2,11 @@ - 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) } + %a.btn.btn-small.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") - else - %a.btn.btn-mini.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) } + %a.btn.btn-small.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") @@ -14,6 +14,6 @@ - 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" ).() } + %a.btn.btn-small.btn-primary{:href => method( :"new_#{child_class.name.underscore}_path" ).() } %i.icon-plus.icon-white =t("#{child_class.name.underscore.pluralize}.index.actions.create") \ No newline at end of file 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 526e11d..3618d63 100644 --- a/app/views/shared/_index_view_edit_destroy_part.html.haml +++ b/app/views/shared/_index_view_edit_destroy_part.html.haml @@ -1,43 +1,41 @@ - if !(defined? parent).nil? && !(defined? child).nil? - - if can? :show, child - %td - %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 - %span.hidden-phone - =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 + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - - if can? :edit, child - %td - %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 - %span.hidden-phone - =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 + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") - - if can? :destroy, child - %td - %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 - %span.hidden-phone - =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_detroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"} + %i.icon-remove.icon-white + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") - elsif !(defined? child).nil? - - if can? :show, child - %td - %a.btn.btn-mini.btn-success{:href => method( :"#{child.class.name.underscore}_path" ).(child) } - %i.icon-info-sign.icon-white - %span.hidden-phone - =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 + %span.hidden-phone + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - - if can? :edit, child - %td - %a.btn.btn-mini.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) } - %i.icon-edit.icon-white - %span.hidden-phone - =t("#{child.class.name.underscore.pluralize}.index.actions.edit") - - - if can? :destroy, child - %td - %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 - %span.hidden-phone - =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 + %span.hidden-phone + =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_detroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"} + %i.icon-trash.icon-white + %span.hidden-phone + =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 a306bc3..a4eba23 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-mini.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") - if can? :destroy, child - %a.btn.btn-mini.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}.actions.confirm_detroy"), "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") - elsif !(defined? child).nil? - if can? :edit, child - %a.btn.btn-mini.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") - if can? :destroy, child - %a.btn.btn-mini.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}.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}.actions.destroy") \ No newline at end of file -- cgit v1.2.3 From 387f0949d62121f145f80b017329c83aeffc8355 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 10:01:48 +0100 Subject: Improved UI. --- app/views/conferences/_index_core.html.haml | 55 +++++++++-------------------- 1 file changed, 16 insertions(+), 39 deletions(-) diff --git a/app/views/conferences/_index_core.html.haml b/app/views/conferences/_index_core.html.haml index 8670418..6e82316 100644 --- a/app/views/conferences/_index_core.html.haml +++ b/app/views/conferences/_index_core.html.haml @@ -2,20 +2,9 @@ %thead %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 %span.hidden-phone = t('conferences.index.phone_numbers') - - if !conferences.respond_to?('where') || conferences.where(:pin => '').count != conferences.count - %th= t('conferences.index.pin') - %th - %span.hidden-phone - = t('conferences.index.max_members') - %th - %span.hidden-phone - = t('conferences.index.number_of_invitees') %th %span.hidden-phone = t('conferences.index.flags') @@ -24,42 +13,30 @@ - for conference in conferences - parent = conference.conferenceable %tr - %td= conference.name - - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count - %td - - if conference.start - = l conference.start, :format => :long - - else - = '-' - %td - - if conference.end - = l conference.end, :format => :long - - else - = '-' + %td + %span.hidden-phone + = conference.name + %span.visible-phone + = truncate(conference.name, :length => 8) %td - 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 - %span.hidden-phone - = conference.max_members - %td - %span.hidden-phone - = conference.conference_invitees.count %td + - 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 - %ul - if conference.open_for_anybody - %li= t('conferences.index.open_for_anybody') + %span.label + = t('conferences.index.open_for_anybody') - if conference.announce_new_member_by_name - %li= t('conferences.index.announce_new_member_by_name') + %span.label + = t('conferences.index.announce_new_member_by_name') - if conference.announce_left_member_by_name - %li= t('conferences.index.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 -- cgit v1.2.3 From 7b745a37f1729052e2278cbb10ac6d43484b94a3 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 10:01:58 +0100 Subject: Fixed language keys for I18n.t --- app/views/shared/_create_link.html.haml | 12 ++++++------ app/views/shared/_show_edit_destroy_part.html.haml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/views/shared/_create_link.html.haml b/app/views/shared/_create_link.html.haml index 25e851b..b1eef1f 100644 --- a/app/views/shared/_create_link.html.haml +++ b/app/views/shared/_create_link.html.haml @@ -2,18 +2,18 @@ - 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-small.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-small.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_for", :resource => parent.to_s) =t("#{child_class.name.underscore.pluralize}.index.actions.create") - elsif !(defined? child_class).nil? - if can? :create, child_class %p - %a.btn.btn-small.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/_show_edit_destroy_part.html.haml b/app/views/shared/_show_edit_destroy_part.html.haml index a4eba23..f715075 100644 --- a/app/views/shared/_show_edit_destroy_part.html.haml +++ b/app/views/shared/_show_edit_destroy_part.html.haml @@ -3,18 +3,18 @@ - 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}.actions.edit") + =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}.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_detroy"), "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-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-small.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_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}.actions.destroy") \ No newline at end of file + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file -- cgit v1.2.3 From e4da52d673f12673614f7f9303ad384c77dbc37c Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 10:40:33 +0100 Subject: Improved UI for tenant#show --- .../_index_core.html.haml | 59 ++++++++++++---------- app/views/callthroughs/_index_core.html.haml | 16 ++++-- app/views/hunt_groups/_index_core.html.haml | 29 ++++++----- app/views/tenants/_admin_area.html.haml | 9 +++- ..._table_of_automatic_call_distributors.html.haml | 8 +++ app/views/tenants/_table_of_callthroughs.html.haml | 8 +++ app/views/tenants/_table_of_conferences.html.haml | 8 +++ app/views/tenants/_table_of_functions.html.haml | 56 -------------------- app/views/tenants/_table_of_hunt_groups.html.haml | 8 +++ 9 files changed, 100 insertions(+), 101 deletions(-) create mode 100644 app/views/tenants/_table_of_automatic_call_distributors.html.haml create mode 100644 app/views/tenants/_table_of_callthroughs.html.haml create mode 100644 app/views/tenants/_table_of_conferences.html.haml delete mode 100644 app/views/tenants/_table_of_functions.html.haml create mode 100644 app/views/tenants/_table_of_hunt_groups.html.haml diff --git a/app/views/automatic_call_distributors/_index_core.html.haml b/app/views/automatic_call_distributors/_index_core.html.haml index 4878b56..85790aa 100644 --- a/app/views/automatic_call_distributors/_index_core.html.haml +++ b/app/views/automatic_call_distributors/_index_core.html.haml @@ -2,39 +2,46 @@ %thead %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 + %span.hidden-phone + = t('automatic_call_distributors.index.strategy') %th= t('automatic_call_distributors.index.phone_numbers') - %th= t('automatic_call_distributors.index.acd_agents') + %th + %span.hidden-phone + = t('automatic_call_distributors.index.max_callers') + %th + %span.hidden-phone + = t('automatic_call_distributors.index.agent_timeout') + %th + %span.hidden-phone + = t('automatic_call_distributors.index.acd_agents') %tbody - for automatic_call_distributor in automatic_call_distributors %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 + %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 - %br - = render :partial => 'shared/create_link', :locals => {:parent => automatic_call_distributor, :child_class => PhoneNumber, :short_link => true} - %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} + %span.hidden-phone + = automatic_call_distributor.max_callers + %td + %span.hidden-phone + = automatic_call_distributor.agent_timeout + %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 diff --git a/app/views/callthroughs/_index_core.html.haml b/app/views/callthroughs/_index_core.html.haml index 1767f5b..acb152e 100644 --- a/app/views/callthroughs/_index_core.html.haml +++ b/app/views/callthroughs/_index_core.html.haml @@ -3,16 +3,24 @@ %tr %th= t('callthroughs.index.name') %th= t('callthroughs.index.phone_numbers') - %th= t('callthroughs.index.access_authorized_phone_numbers') + %th + %span.hidden-phone + = t('callthroughs.index.access_authorized_phone_numbers') - if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true - %th= t('callthroughs.index.whitelist_phone_numbers') + %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=render 'phone_numbers/listing', :phone_numbers => callthrough.access_authorization_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=render 'phone_numbers/listing', :phone_numbers => callthrough.whitelisted_phone_numbers + %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/hunt_groups/_index_core.html.haml b/app/views/hunt_groups/_index_core.html.haml index 5f6e797..9cc237b 100644 --- a/app/views/hunt_groups/_index_core.html.haml +++ b/app/views/hunt_groups/_index_core.html.haml @@ -4,32 +4,35 @@ %thead %tr %th= t('hunt_groups.index.name') - %th= t('hunt_groups.index.strategy') + %th + %span.hidden-phone + = 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') + %th + %span.hidden-phone + = t('hunt_groups.index.hunt_group_members') %tbody - for hunt_group in hunt_groups %tr %td= hunt_group.name - %td= t("hunt_groups.strategies.#{hunt_group.strategy}") + %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.count > 0 + - if hunt_group.phone_numbers.any? =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} %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} + %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 diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index d634f73..1a05264 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -16,8 +16,13 @@ = render :partial => 'user_groups_table', :locals => {:tenant => tenant} -%h2 Features -= render :partial => 'tenants/table_of_functions', :locals => {:tenant => tenant} += 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/table_of_phone_books', :locals => {:tenant => tenant} 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 3587eb8..0000000 --- a/app/views/tenants/_table_of_functions.html.haml +++ /dev/null @@ -1,56 +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'} - %thead - %tr - %th - Funktion - %th - Anzahl - %th - - %tbody - - 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 -- cgit v1.2.3 From d14b99c32f0c6a88298c9bed1d91b7fec0fb04b5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 11:27:21 +0100 Subject: UI improvements. --- .../_index_core.html.haml | 12 --- .../automatic_call_distributors/show.html.haml | 95 ++++++++++++---------- app/views/gateways/_index_core.html.haml | 16 +++- app/views/gateways/show.html.haml | 50 ++++++++---- app/views/phones/show.html.haml | 8 +- app/views/sip_accounts/show.html.haml | 86 ++++++++++++-------- app/views/tenants/_admin_area.html.haml | 85 +++++++++---------- app/views/tenants/_table_of_phones.html.haml | 7 ++ app/views/tenants/_table_of_sip_accounts.html.haml | 7 ++ app/views/tenants/show.html.haml | 15 +++- app/views/user_groups/show.html.haml | 28 ++++--- 11 files changed, 236 insertions(+), 173 deletions(-) create mode 100644 app/views/tenants/_table_of_phones.html.haml create mode 100644 app/views/tenants/_table_of_sip_accounts.html.haml diff --git a/app/views/automatic_call_distributors/_index_core.html.haml b/app/views/automatic_call_distributors/_index_core.html.haml index 85790aa..3634ec4 100644 --- a/app/views/automatic_call_distributors/_index_core.html.haml +++ b/app/views/automatic_call_distributors/_index_core.html.haml @@ -6,12 +6,6 @@ %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.max_callers') - %th - %span.hidden-phone - = t('automatic_call_distributors.index.agent_timeout') %th %span.hidden-phone = t('automatic_call_distributors.index.acd_agents') @@ -30,12 +24,6 @@ %td - if automatic_call_distributor.phone_numbers.any? = render 'phone_numbers/listing', :phone_numbers => automatic_call_distributor.phone_numbers - %td - %span.hidden-phone - = automatic_call_distributor.max_callers - %td - %span.hidden-phone - = automatic_call_distributor.agent_timeout %td %span.hidden-phone - if automatic_call_distributor.acd_agents.count > 3 diff --git a/app/views/automatic_call_distributors/show.html.haml b/app/views/automatic_call_distributors/show.html.haml index c29f2df..b3eae2c 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 + %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/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml index faa381d..bff25e0 100644 --- a/app/views/gateways/_index_core.html.haml +++ b/app/views/gateways/_index_core.html.haml @@ -3,18 +3,26 @@ %thead %tr %th= t('gateways.index.name') - %th= t('gateways.index.technology') + %th + %span.hidden-phone + = t('gateways.index.technology') %th= t('gateways.index.inbound') %th= t('gateways.index.outbound') - %th= t('gateways.index.description') + %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= gateway.technology + %td + %span.hidden-phone + = gateway.technology %td= gateway.inbound %td= gateway.outbound - %td= gateway.description + %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..25cca87 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{:class => '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/phones/show.html.haml b/app/views/phones/show.html.haml index 18e990c..e197f4a 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -1,8 +1,8 @@ - content_for :title, t("phones.show.page_title") .row - .span6 - %table + .span5 + %table{:class => 'table table-striped'} %tr %td %strong= t('phones.show.mac_address') + ":" @@ -50,10 +50,10 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } - .span6 + .span7 - 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. + 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 diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 4f6244f..c90bb81 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -1,37 +1,59 @@ - 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{:class => '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 + %tr + %td + %strong= t('sip_accounts.show.clir') + ":" + %td + = @sip_account.clir + %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 + %tr + %td + %strong= t('sip_accounts.show.callforward_rules_act_per_sip_account') + ":" + %td + = @sip_account.callforward_rules_act_per_sip_account + - 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" = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account } diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index 1a05264..369a8ce 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,49 +1,38 @@ --# 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} --# 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} - -= render :partial => 'users_table', :locals => {:tenant => tenant} - -= render :partial => 'user_groups_table', :locals => {:tenant => tenant} - -= 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/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/users_table', :locals => {:tenant => tenant} + = render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant} + + = render :partial => 'tenants/table_of_sip_accounts', :locals => {:tenant => tenant} + = render :partial => 'tenants/table_of_phones', :locals => {:tenant => tenant} + + = 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/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/_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..32230b5 --- /dev/null +++ b/app/views/tenants/_table_of_sip_accounts.html.haml @@ -0,0 +1,7 @@ +- cache(['tenant_show_table_of_sip_accounts', I18n.locale, tenant, tenant.sip_accounts.count, tenant.sip_accounts.reorder(:updated_at).last]) do + -# 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..532d5d5 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{:class => '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_groups/show.html.haml b/app/views/user_groups/show.html.haml index fe5b745..920f772 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{:class => '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 -- cgit v1.2.3 From 2e95e18594226283956a298999ad5b00bab13a34 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 23 Jan 2013 11:34:04 +0100 Subject: exit on unsupported types --- misc/freeswitch/scripts/common/str.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/freeswitch/scripts/common/str.lua b/misc/freeswitch/scripts/common/str.lua index 32f054e..793c191 100644 --- a/misc/freeswitch/scripts/common/str.lua +++ b/misc/freeswitch/scripts/common/str.lua @@ -5,6 +5,10 @@ module(...,package.seeall) function try(array, arguments) + if type(arguments) ~= 'string' or type(array) ~= 'table' then + return nil; + end + local result = array; arguments:gsub('([^%.]+)', function(entry) -- cgit v1.2.3 From 81e646de2740d4a378623d2351aefaabe43b4801 Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 23 Jan 2013 11:34:42 +0100 Subject: prefer route variables in variables expansion --- misc/freeswitch/scripts/dialplan/router.lua | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/misc/freeswitch/scripts/dialplan/router.lua b/misc/freeswitch/scripts/dialplan/router.lua index 7e64d7b..cdcb58b 100644 --- a/misc/freeswitch/scripts/dialplan/router.lua +++ b/misc/freeswitch/scripts/dialplan/router.lua @@ -52,27 +52,27 @@ function Router.read_table(self, table_name) end -function Router.expand_variables(self, line, variables) +function Router.expand_variables(self, line, variables, variables2) return (line:gsub('{([%a%d%._]+)}', function(captured) - return common.str.try(variables, captured) or ''; + return common.str.try(variables, captured) or common.str.try(variables2, captured) or ''; end)) end -function Router.element_match(self, pattern, search_string, replacement) +function Router.element_match(self, pattern, search_string, replacement, route_variables) local success, result = pcall(string.find, search_string, pattern); if not success then self.log:error('ELEMENT_MATCH - table error - pattern: ', pattern, ', search_string: ', search_string); elseif result then - return true, search_string:gsub(pattern, self:expand_variables(replacement, self.variables)); + return true, search_string:gsub(pattern, self:expand_variables(replacement, route_variables, self.variables)); end return false; end -function Router.element_match_group(self, pattern, groups, replacement, use_key) +function Router.element_match_group(self, pattern, groups, replacement, use_key, route_variables) if type(groups) ~= 'table' then return false; end @@ -81,7 +81,7 @@ function Router.element_match_group(self, pattern, groups, replacement, use_key) if use_key then value = key; end - result, replaced_value = self:element_match(pattern, tostring(value), replacement); + result, replaced_value = self:element_match(pattern, tostring(value), replacement, route_variables); if result then return true, replaced_value; end @@ -94,7 +94,8 @@ function Router.route_match(self, route) gateway = 'gateway' .. route.endpoint_id, ['type'] = route.endpoint_type, id = route.endpoint_id, - channel_variables = {} + destination_number = common.str.try(self, 'caller.destination_number'), + channel_variables = {}, }; local route_matches = false; @@ -108,13 +109,16 @@ function Router.route_match(self, route) if element.action ~= 'none' then if common.str.blank(element.var_in) or common.str.blank(element.pattern) and element.action == 'set' then result = true; - replacement = self:expand_variables(element.replacement, self.variables); + replacement = self:expand_variables(element.replacement, destination, self.variables); else local command, variable_name = common.str.partition(element.var_in, ':'); - if not command or not variable_name or command == 'var' then - local search_string = tostring(common.str.try(self.caller, element.var_in)) - result, replacement = self:element_match(tostring(element.pattern), tostring(search_string), tostring(element.replacement)); + if not command or not variable_name then + local search_string = tostring(common.str.try(destination, element.var_in) or common.str.try(self.caller, element.var_in)); + result, replacement = self:element_match(tostring(element.pattern), search_string, tostring(element.replacement), destination); + elseif command == 'var' then + local search_string = tostring(common.str.try(self.caller, element.var_in)); + result, replacement = self:element_match(tostring(element.pattern), search_string, tostring(element.replacement)); elseif command == 'key' or command == 'val' then local groups = common.str.try(self.caller, variable_name); result, replacement = self:element_match_group(tostring(element.pattern), groups, tostring(element.replacement), command == 'key'); -- cgit v1.2.3 From bec4553238a69ac710ea28b90480dc3a2bde5539 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 11:47:49 +0100 Subject: Added screenshot example of how to configure the snom provisioning URL. --- .../images/screenshots/set_provisioning_url_snom.png | Bin 0 -> 183927 bytes app/views/phones/show.html.haml | 5 +++++ 2 files changed, 5 insertions(+) create mode 100644 app/assets/images/screenshots/set_provisioning_url_snom.png 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 Binary files /dev/null and b/app/assets/images/screenshots/set_provisioning_url_snom.png differ diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index e197f4a..97cb1a8 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -52,6 +52,11 @@ .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 -- cgit v1.2.3 From ca8989616c7f2edb5b8b4fb04c7a58feef24ad49 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 12:52:23 +0100 Subject: Add tooltips. --- app/assets/images/rails.png | Bin 6646 -> 0 bytes app/assets/javascripts/gemeinschaft.js.coffee | 4 ++++ app/assets/stylesheets/gemeinschaft-generic.css.scss | 1 + app/views/layouts/application.html.haml | 1 + app/views/phones/_index_core.html.haml | 3 ++- config/locales/views/phones/de.yml | 4 +++- config/locales/views/phones/en.yml | 4 +++- 7 files changed, 14 insertions(+), 3 deletions(-) delete mode 100644 app/assets/images/rails.png create mode 100644 app/assets/javascripts/gemeinschaft.js.coffee diff --git a/app/assets/images/rails.png b/app/assets/images/rails.png deleted file mode 100644 index d5edc04..0000000 Binary files a/app/assets/images/rails.png and /dev/null 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/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 74331af..9fdcb8a 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -14,6 +14,7 @@ / HTML5 shim, for IE6-8 support of HTML5 elements /[if lt IE 9] + %body .container .row diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index fa1c679..af57792 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -21,6 +21,7 @@ %td= phone.phone_model %td %span.hidden-phone - = phone.hot_deskable + %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.hot_desk'), :'data-trigger' => 'hover'} + = 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 diff --git a/config/locales/views/phones/de.yml b/config/locales/views/phones/de.yml index 814267c..4aa0ae6 100644 --- a/config/locales/views/phones/de.yml +++ b/config/locales/views/phones/de.yml @@ -80,4 +80,6 @@ de: button: 'Absenden' sip_accounts: title: 'Auf dem Telefon eingetragene SIP-Konten' - connect_to_sip_account: 'Neues SIP-Konto auf das Telefon eintragen' \ No newline at end of file + connect_to_sip_account: 'Neues SIP-Konto auf das Telefon eintragen' + tool_tips: + hot_desk: 'Mit aktivierter Hot Desk Fähigkeit können sich User der Anlage an einem Telefon ein- und ausloggen.' diff --git a/config/locales/views/phones/en.yml b/config/locales/views/phones/en.yml index 15e212e..46b0bcb 100644 --- a/config/locales/views/phones/en.yml +++ b/config/locales/views/phones/en.yml @@ -80,4 +80,6 @@ en: button: 'Submit' sip_accounts: title: 'Listing of connected SIP accounts' - connect_to_sip_account: 'Connect to an existing SIP account' \ No newline at end of file + connect_to_sip_account: 'Connect to an existing SIP account' + tool_tips: + hot_desk: 'Hot desk triggers the ability for a user to login and out of a given phone.' -- cgit v1.2.3 From 49fbe38357104162c8658688e07bae00bbf1c4e0 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 13:06:16 +0100 Subject: Housekeeping --- app/views/layouts/_navbar.html.haml | 2 +- app/views/layouts/application.html.haml | 4 +-- app/views/layouts/old-application.html.haml | 48 ----------------------------- app/views/layouts/old_navbar.html.haml | 10 ------ app/views/layouts/test.haml | 0 5 files changed, 3 insertions(+), 61 deletions(-) delete mode 100644 app/views/layouts/old-application.html.haml delete mode 100644 app/views/layouts/old_navbar.html.haml delete mode 100644 app/views/layouts/test.haml diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index d9dd990..7ef6523 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -7,7 +7,7 @@ %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 && current_user.sip_accounts.any? .nav-collapse.collapse diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 9fdcb8a..33a730f 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -19,6 +19,8 @@ .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"} @@ -28,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 - - - - -%html.no-js{ :lang => I18n.locale.to_s } - - %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 -- cgit v1.2.3 From f67005b1bcbf4b0049b8d60dfcc669bd98745a49 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 13:11:03 +0100 Subject: UI --- app/views/users/show.html.haml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 4c39fd1..f38a4a1 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -4,12 +4,18 @@ .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 + %table{:class => 'table table-striped'} + %tbody + %tr + %td + %strong= t('users.show.user_name') + ":" + %td + = @user.user_name + %tr + %td + %strong= t('users.show.email') + ":" + %td + = @user.email %p.controls = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @user } -- cgit v1.2.3 From e84e82032813b7acd71f8073d00f57e1cd65eb7c Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 17:36:33 +0100 Subject: Fixed I18n bug. --- app/views/call_histories/_index_core.html.haml | 2 +- app/views/phones/show.html.haml | 2 +- .../shared/_index_view_edit_destroy_part.html.haml | 4 ++-- app/views/shared/_show_edit_destroy_part.html.haml | 4 ++-- app/views/sip_accounts/_index_core.html.haml | 19 ++++++++++--------- app/views/tenants/_admin_area.html.haml | 18 ++++++++++-------- config/locales/views/access_authorizations/de.yml | 4 ++-- config/locales/views/access_authorizations/en.yml | 4 ++-- config/locales/views/acd_agents/de.yml | 4 ++-- config/locales/views/acd_agents/en.yml | 4 ++-- config/locales/views/acd_callers/de.yml | 4 ++-- config/locales/views/acd_callers/en.yml | 4 ++-- config/locales/views/addresses/de.yml | 4 ++-- config/locales/views/addresses/en.yml | 4 ++-- .../locales/views/automatic_call_distributors/de.yml | 4 ++-- .../locales/views/automatic_call_distributors/en.yml | 4 ++-- config/locales/views/call_forwards/de.yml | 4 ++-- config/locales/views/call_forwards/en.yml | 4 ++-- config/locales/views/call_histories/de.yml | 4 ++-- config/locales/views/call_histories/en.yml | 4 ++-- config/locales/views/call_routes/de.yml | 4 ++-- config/locales/views/call_routes/en.yml | 4 ++-- config/locales/views/callthroughs/de.yml | 4 ++-- config/locales/views/callthroughs/en.yml | 4 ++-- config/locales/views/conference_invitees/de.yml | 4 ++-- config/locales/views/conference_invitees/en.yml | 4 ++-- config/locales/views/conferences/de.yml | 4 ++-- config/locales/views/conferences/en.yml | 4 ++-- config/locales/views/fax_accounts/de.yml | 4 ++-- config/locales/views/fax_accounts/en.yml | 4 ++-- config/locales/views/fax_documents/de.yml | 4 ++-- config/locales/views/fax_documents/en.yml | 4 ++-- config/locales/views/gateway_parameters/de.yml | 4 ++-- config/locales/views/gateway_parameters/en.yml | 4 ++-- config/locales/views/gateway_settings/de.yml | 4 ++-- config/locales/views/gateway_settings/en.yml | 4 ++-- config/locales/views/gateways/de.yml | 4 ++-- config/locales/views/gateways/en.yml | 4 ++-- .../locales/views/gs_cluster_sync_log_entries/de.yml | 4 ++-- .../locales/views/gs_cluster_sync_log_entries/en.yml | 4 ++-- config/locales/views/gs_nodes/de.yml | 4 ++-- config/locales/views/gs_nodes/en.yml | 4 ++-- config/locales/views/gs_parameters/de.yml | 4 ++-- config/locales/views/gs_parameters/en.yml | 4 ++-- config/locales/views/gui_functions/de.yml | 4 ++-- config/locales/views/gui_functions/en.yml | 4 ++-- config/locales/views/hunt_group_members/de.yml | 4 ++-- config/locales/views/hunt_group_members/en.yml | 4 ++-- config/locales/views/hunt_groups/de.yml | 4 ++-- config/locales/views/hunt_groups/en.yml | 4 ++-- config/locales/views/manufacturers/de.yml | 4 ++-- config/locales/views/manufacturers/en.yml | 4 ++-- config/locales/views/phone_book_entries/de.yml | 4 ++-- config/locales/views/phone_book_entries/en.yml | 4 ++-- config/locales/views/phone_books/de.yml | 4 ++-- config/locales/views/phone_books/en.yml | 4 ++-- config/locales/views/phone_models/de.yml | 4 ++-- config/locales/views/phone_models/en.yml | 4 ++-- config/locales/views/phone_number_ranges/de.yml | 4 ++-- config/locales/views/phone_number_ranges/en.yml | 4 ++-- config/locales/views/phone_numbers/de.yml | 4 ++-- config/locales/views/phone_numbers/en.yml | 4 ++-- config/locales/views/phone_sip_accounts/de.yml | 4 ++-- config/locales/views/phone_sip_accounts/en.yml | 4 ++-- config/locales/views/phones/de.yml | 8 ++++---- config/locales/views/phones/en.yml | 4 ++-- config/locales/views/ringtones/de.yml | 4 ++-- config/locales/views/ringtones/en.yml | 4 ++-- config/locales/views/route_elements/de.yml | 4 ++-- config/locales/views/route_elements/en.yml | 4 ++-- config/locales/views/sip_accounts/de.yml | 4 ++-- config/locales/views/sip_accounts/en.yml | 4 ++-- config/locales/views/sip_domains/de.yml | 4 ++-- config/locales/views/sip_domains/en.yml | 4 ++-- config/locales/views/softkeys/de.yml | 4 ++-- config/locales/views/softkeys/en.yml | 4 ++-- config/locales/views/system_messages/de.yml | 4 ++-- config/locales/views/system_messages/en.yml | 4 ++-- config/locales/views/tenants/de.yml | 4 ++-- config/locales/views/tenants/en.yml | 4 ++-- config/locales/views/user_group_memberships/de.yml | 4 ++-- config/locales/views/user_group_memberships/en.yml | 4 ++-- config/locales/views/user_groups/de.yml | 4 ++-- config/locales/views/user_groups/en.yml | 4 ++-- config/locales/views/users/de.yml | 4 ++-- config/locales/views/users/en.yml | 4 ++-- config/locales/views/voicemail_messages/de.yml | 2 +- config/locales/views/voicemail_messages/en.yml | 2 +- config/locales/views/voicemail_settings/de.yml | 4 ++-- config/locales/views/voicemail_settings/en.yml | 4 ++-- config/locales/views/whitelists/de.yml | 4 ++-- config/locales/views/whitelists/en.yml | 4 ++-- lib/generators/nifty/scaffold/templates/locale.yml | 4 ++-- lib/generators/nifty/scaffold/templates/locale_de.yml | 4 ++-- 94 files changed, 202 insertions(+), 199 deletions(-) diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 07e0ee4..4ebcad0 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -66,6 +66,6 @@ %td - if can? :destroy, call_history / = link_to t('call_histories.index.actions.destroy'), sip_account_call_history_path(@sip_account, call_history), :method => :delete - %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{call_history.class.name.underscore.pluralize}.actions.confirm_detroy"), "data-method" => "delete", :href => sip_account_call_history_path(@sip_account, call_history), :rel => "nofollow"} + %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{call_history.class.name.underscore.pluralize}.actions.confirm_destroy"), "data-method" => "delete", :href => sip_account_call_history_path(@sip_account, call_history), :rel => "nofollow"} %i.icon-trash.icon-white =t('call_histories.index.actions.destroy') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 97cb1a8..b34bdcd 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -73,7 +73,7 @@ .row .span12 %h2= t("phones.sip_accounts.title") - - if @phone.phone_sip_accounts.count > 0 + - 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/shared/_index_view_edit_destroy_part.html.haml b/app/views/shared/_index_view_edit_destroy_part.html.haml index 3618d63..8e119fe 100644 --- a/app/views/shared/_index_view_edit_destroy_part.html.haml +++ b/app/views/shared/_index_view_edit_destroy_part.html.haml @@ -14,7 +14,7 @@ =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_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-remove.icon-white %span.hidden-phone =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") @@ -35,7 +35,7 @@ =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_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 %span.hidden-phone =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 f715075..a1e8490 100644 --- a/app/views/shared/_show_edit_destroy_part.html.haml +++ b/app/views/shared/_show_edit_destroy_part.html.haml @@ -5,7 +5,7 @@ %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_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}.index.actions.destroy") @@ -15,6 +15,6 @@ %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_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}.index.actions.destroy") \ No newline at end of file diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index e94db83..bc1555f 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -8,9 +8,10 @@ %th %span.hidden-phone = t('sip_accounts.index.phone_numbers') - %th - %span.hidden-phone - = t('phones.name') + - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true) + %th + %span.hidden-phone + = t('phones.name') %tbody - for sip_account in sip_accounts @@ -26,9 +27,9 @@ %td - if sip_account.phone_numbers.count > 0 = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:number) - - %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} \ No newline at end of file + - 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/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index 369a8ce..92614c8 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,19 +1,21 @@ .row .span12 - = render :partial => 'tenants/users_table', :locals => {:tenant => tenant} - = render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant} - = render :partial => 'tenants/table_of_sip_accounts', :locals => {:tenant => tenant} - = render :partial => 'tenants/table_of_phones', :locals => {:tenant => tenant} + - if SipAccount.any? + = render :partial => 'tenants/table_of_phones', :locals => {:tenant => tenant} - = 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} + - 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/table_of_phone_books', :locals => {:tenant => tenant} + = render :partial => 'tenants/users_table', :locals => {:tenant => tenant} + = render :partial => 'tenants/user_groups_table', :locals => {:tenant => tenant} + .well %h2 Gemeinschaft Konfiguration = render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} diff --git a/config/locales/views/access_authorizations/de.yml b/config/locales/views/access_authorizations/de.yml index 1d38cc1..3df5774 100644 --- a/config/locales/views/access_authorizations/de.yml +++ b/config/locales/views/access_authorizations/de.yml @@ -11,7 +11,7 @@ de: login: 'Login' pin: 'PIN' actions: - confirm: 'Sind Sie sicher, dass Sie diese Zugangsberechtigung löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Zugangsberechtigung löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -24,7 +24,7 @@ de: pin: 'PIN' index_phone_numbers: 'Telefonnummern' actions: - confirm: 'Sind Sie sicher, dass Sie diese Zugangsberechtigung löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Zugangsberechtigung löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Zugangsberechtigungen anzeigen.' diff --git a/config/locales/views/access_authorizations/en.yml b/config/locales/views/access_authorizations/en.yml index 9832e4a..712bf01 100644 --- a/config/locales/views/access_authorizations/en.yml +++ b/config/locales/views/access_authorizations/en.yml @@ -11,7 +11,7 @@ en: login: 'Login' pin: 'PIN' actions: - confirm: 'Are you sure you want to delete this access authorization?' + confirm_destroy: 'Are you sure you want to delete this access authorization?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -24,7 +24,7 @@ en: pin: 'PIN' index_phone_numbers: 'Phone numbers' actions: - confirm: 'Are you sure you want to delete this access authorization?' + confirm_destroy: 'Are you sure you want to delete this access authorization?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/acd_agents/de.yml b/config/locales/views/acd_agents/de.yml index 8613313..b625d09 100644 --- a/config/locales/views/acd_agents/de.yml +++ b/config/locales/views/acd_agents/de.yml @@ -17,7 +17,7 @@ de: destination_id: 'Ziel ID' destination: 'Ziel' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Agenten löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Agenten löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -34,7 +34,7 @@ de: destination_type: 'Zieltyp' destination_id: 'Ziel ID' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Agenten löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Agenten löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/acd_agents/en.yml b/config/locales/views/acd_agents/en.yml index 8287dd7..a048214 100644 --- a/config/locales/views/acd_agents/en.yml +++ b/config/locales/views/acd_agents/en.yml @@ -17,7 +17,7 @@ en: destination_id: 'Destination ID' destination: 'Destination' actions: - confirm: 'Are you sure you want to delete this Agent?' + confirm_destroy: 'Are you sure you want to delete this Agent?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -34,7 +34,7 @@ en: destination_type: 'Destination type' destination_id: 'Destination' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/acd_callers/de.yml b/config/locales/views/acd_callers/de.yml index 5195217..2fa78f7 100644 --- a/config/locales/views/acd_callers/de.yml +++ b/config/locales/views/acd_callers/de.yml @@ -15,7 +15,7 @@ de: callback_number: 'Vermittelte Durchwahl' callback_attempts: 'Vermittlungsversuche' actions: - confirm: 'Sind Sie sicher, dass Sie diesen vermittelten Anrufer löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen vermittelten Anrufer löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -31,7 +31,7 @@ de: callback_number: 'Vermittelte Durchwahl' callback_attempts: 'Vermittlungsversuche' actions: - confirm: 'Sind Sie sicher, dass Sie diesen vermittelten Anrufer löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen vermittelten Anrufer löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/acd_callers/en.yml b/config/locales/views/acd_callers/en.yml index c435f3f..18a46e9 100644 --- a/config/locales/views/acd_callers/en.yml +++ b/config/locales/views/acd_callers/en.yml @@ -15,7 +15,7 @@ en: callback_number: 'Callback number' callback_attempts: 'Callback attempts' actions: - confirm: 'Are you sure you want to delete this negotiated caller?' + confirm_destroy: 'Are you sure you want to delete this negotiated caller?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -31,7 +31,7 @@ en: callback_number: 'Callback number' callback_attempts: 'Callback attempts' actions: - confirm: 'Are you sure you want to delete this negotiated caller?' + confirm_destroy: 'Are you sure you want to delete this negotiated caller?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/addresses/de.yml b/config/locales/views/addresses/de.yml index 96d280b..7a20557 100644 --- a/config/locales/views/addresses/de.yml +++ b/config/locales/views/addresses/de.yml @@ -16,7 +16,7 @@ de: country_id: 'Land' position: 'Position' actions: - confirm: 'Sind Sie sicher, dass Sie diese Adresse löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Adresse löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -32,7 +32,7 @@ de: country_id: 'Land' position: 'Position' actions: - confirm: 'Sind Sie sicher, dass Sie diese Adresse löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Adresse löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Adressen anzeigen' diff --git a/config/locales/views/addresses/en.yml b/config/locales/views/addresses/en.yml index 56550f1..66ffc23 100644 --- a/config/locales/views/addresses/en.yml +++ b/config/locales/views/addresses/en.yml @@ -16,7 +16,7 @@ en: country_id: 'Country' position: 'Position' actions: - confirm: 'Are you sure you want to delete this address?' + confirm_destroy: 'Are you sure you want to delete this address?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -32,7 +32,7 @@ en: country_id: 'Country' position: 'Position' actions: - confirm: 'Are you sure you want to delete this address?' + confirm_destroy: 'Are you sure you want to delete this address?' destroy: 'Delete address' edit: 'Edit address' view_all: 'View all addresses' diff --git a/config/locales/views/automatic_call_distributors/de.yml b/config/locales/views/automatic_call_distributors/de.yml index 8618325..52497f9 100644 --- a/config/locales/views/automatic_call_distributors/de.yml +++ b/config/locales/views/automatic_call_distributors/de.yml @@ -24,7 +24,7 @@ de: goodbye: 'Abschied' music: 'Musik' actions: - confirm: 'Sind Sie sicher, dass Sie diese Warteschleife löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Warteschleife löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -47,7 +47,7 @@ de: goodbye: 'Abschied' music: 'Musik' actions: - confirm: 'Sind Sie sicher, dass Sie diese Warteschleife löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Warteschleife löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/automatic_call_distributors/en.yml b/config/locales/views/automatic_call_distributors/en.yml index d481406..2c7fb9c 100644 --- a/config/locales/views/automatic_call_distributors/en.yml +++ b/config/locales/views/automatic_call_distributors/en.yml @@ -26,7 +26,7 @@ en: goodbye: 'Goodbye' music: 'Music' actions: - confirm: 'Are you sure you want to delete this ACD?' + confirm_destroy: 'Are you sure you want to delete this ACD?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -51,7 +51,7 @@ en: goodbye: 'Goodbye' music: 'Music' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/call_forwards/de.yml b/config/locales/views/call_forwards/de.yml index 1ec7af7..2d3940e 100644 --- a/config/locales/views/call_forwards/de.yml +++ b/config/locales/views/call_forwards/de.yml @@ -17,7 +17,7 @@ de: depth: 'Weiterleitungs-Sprünge' active: 'Aktiv' actions: - confirm: 'Sind Sie sicher, dass Sie diese Rufumleitung löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Rufumleitung löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -35,7 +35,7 @@ de: depth: 'Weiterleitungs-Sprünge' active: 'Aktiv' actions: - confirm: 'Sind Sie sicher, dass Sie diese Rufumleitung löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Rufumleitung löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Rufumleitung anzeigen' diff --git a/config/locales/views/call_forwards/en.yml b/config/locales/views/call_forwards/en.yml index 4b9af7d..4c2cf3c 100644 --- a/config/locales/views/call_forwards/en.yml +++ b/config/locales/views/call_forwards/en.yml @@ -17,7 +17,7 @@ en: active: 'Active' hunt_group: 'Hunt group connection' actions: - confirm: 'Are you sure you want to delete this call forward?' + confirm_destroy: 'Are you sure you want to delete this call forward?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -35,7 +35,7 @@ en: depth: 'Hops' active: 'Active' actions: - confirm: 'Are you sure you want to delete this call forward?' + confirm_destroy: 'Are you sure you want to delete this call forward?' destroy: 'Delete' edit: 'Edit' view_all: 'View all call forwards' diff --git a/config/locales/views/call_histories/de.yml b/config/locales/views/call_histories/de.yml index 6c99aee..3b05415 100644 --- a/config/locales/views/call_histories/de.yml +++ b/config/locales/views/call_histories/de.yml @@ -27,7 +27,7 @@ de: forwarded: 'Weitergeleitet: %{calls}' all: 'Alle: %{calls}' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Eintrag löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Eintrag löschen möchten?' confirm_selected: 'Sind Sie sicher, dass Sie die markierten Einträge löschen möchten?' destroy: 'Löschen' destroy_multiple: 'Markierte Einträge löschen' @@ -41,7 +41,7 @@ de: name: 'Name' description: 'Beschreibung' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Eintrag löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Eintrag löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Anrufliste anzeigen' diff --git a/config/locales/views/call_histories/en.yml b/config/locales/views/call_histories/en.yml index 839c912..2ae62e1 100644 --- a/config/locales/views/call_histories/en.yml +++ b/config/locales/views/call_histories/en.yml @@ -27,7 +27,7 @@ en: forwarded: 'Forwarded:%{calls}' all: 'All:%{calls}' actions: - confirm: 'Are you sure you want to delete this call log entry?' + confirm_destroy: 'Are you sure you want to delete this call log entry?' confirm_selected: 'Are you sure you want to delete all selected entries?' destroy: 'Delete' destroy_multiple: 'Delete selected entries' @@ -41,7 +41,7 @@ en: name: 'Name' description: 'Description' actions: - confirm: 'Are you sure you want to delete this call log entry?' + confirm_destroy: 'Are you sure you want to delete this call log entry?' destroy: 'Delete call log entry' edit: 'Edit call log entry' view_all: 'View all call log entries' diff --git a/config/locales/views/call_routes/de.yml b/config/locales/views/call_routes/de.yml index 71ad51a..47fdc54 100644 --- a/config/locales/views/call_routes/de.yml +++ b/config/locales/views/call_routes/de.yml @@ -13,7 +13,7 @@ de: endpoint_id: 'Endpoint' position: 'Position' actions: - confirm: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Call Route' + confirm_destroy: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Call Route' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -27,7 +27,7 @@ de: endpoint_id: 'Endpoint' position: 'Position' actions: - confirm: 'Sind Sie sicher, dass die dieses Element löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass die dieses Element löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/call_routes/en.yml b/config/locales/views/call_routes/en.yml index 251f76e..a637a08 100644 --- a/config/locales/views/call_routes/en.yml +++ b/config/locales/views/call_routes/en.yml @@ -13,7 +13,7 @@ en: endpoint_id: 'Endpoint' position: 'Position' actions: - confirm: 'Are you sure you want to delete this Call route?' + confirm_destroy: 'Are you sure you want to delete this Call route?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -27,7 +27,7 @@ en: endpoint_id: 'Endpoint' position: 'Position' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/callthroughs/de.yml b/config/locales/views/callthroughs/de.yml index c884ffa..634767a 100644 --- a/config/locales/views/callthroughs/de.yml +++ b/config/locales/views/callthroughs/de.yml @@ -14,7 +14,7 @@ de: access_authorized_phone_numbers: 'Zugelassene Telefonnummern' whitelist_phone_numbers: 'Positivliste für Zielrufnummern' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Callthrough löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Callthrough löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -25,7 +25,7 @@ de: name: 'Name' sip_account_id: 'SIP-Konto' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Callthrough löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Callthrough löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Callthrough anzeigen' diff --git a/config/locales/views/callthroughs/en.yml b/config/locales/views/callthroughs/en.yml index 648fb93..6720fdf 100644 --- a/config/locales/views/callthroughs/en.yml +++ b/config/locales/views/callthroughs/en.yml @@ -14,7 +14,7 @@ en: access_authorized_phone_numbers: 'Authorized phone numbers' whitelist_phone_numbers: 'Whitelisted destinations' actions: - confirm: 'Are you sure you want to delete this callthrough?' + confirm_destroy: 'Are you sure you want to delete this callthrough?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -25,7 +25,7 @@ en: name: 'Name' sip_account_id: 'SIP account' actions: - confirm: 'Are you sure you want to delete this callthrough?' + confirm_destroy: 'Are you sure you want to delete this callthrough?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/conference_invitees/de.yml b/config/locales/views/conference_invitees/de.yml index 915bc5c..c5c6460 100644 --- a/config/locales/views/conference_invitees/de.yml +++ b/config/locales/views/conference_invitees/de.yml @@ -13,7 +13,7 @@ de: speaker: 'Sprecher-Freischaltung' moderator: 'Moderator' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Teilnehmer aus der Telefonkonferenz entfernen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Teilnehmer aus der Telefonkonferenz entfernen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -27,7 +27,7 @@ de: speaker: 'Sprecher-Freischaltung' moderator: 'Moderator' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Teilnehmer aus der Telefonkonferenz entfernen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Teilnehmer aus der Telefonkonferenz entfernen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Telefonkonferenz Teilnehmer anzeigen' diff --git a/config/locales/views/conference_invitees/en.yml b/config/locales/views/conference_invitees/en.yml index 7e1a1ca..c321e02 100644 --- a/config/locales/views/conference_invitees/en.yml +++ b/config/locales/views/conference_invitees/en.yml @@ -13,7 +13,7 @@ en: speaker: 'Speaker' moderator: 'Moderator' actions: - confirm: 'Are you sure you want to delete this invitee?' + confirm_destroy: 'Are you sure you want to delete this invitee?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -27,7 +27,7 @@ en: speaker: 'Speaker' moderator: 'Moderator' actions: - confirm: 'Are you sure you want to delete this invitee?' + confirm_destroy: 'Are you sure you want to delete this invitee?' destroy: 'Delete' edit: 'Edit' view_all: 'View all conference invitees' diff --git a/config/locales/views/conferences/de.yml b/config/locales/views/conferences/de.yml index cf3c080..2e0aaf1 100644 --- a/config/locales/views/conferences/de.yml +++ b/config/locales/views/conferences/de.yml @@ -21,7 +21,7 @@ de: announce_new_member_by_name: 'Betreten ankündigen' announce_left_member_by_name: 'Verlassen ankündigen' actions: - confirm: 'Sind Sie sicher, dass Sie diese Telefonkonferenz löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Telefonkonferenz löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -39,7 +39,7 @@ de: announce_new_member_by_name: 'Neue Teilnehmer werden angekündigt' announce_left_member_by_name: 'Die Konferenz verlassende Teilnehmer werden angekündigt' actions: - confirm: 'Sind Sie sicher, dass Sie diese Telefonkonferenz löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Telefonkonferenz löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Telefonkonferenzen anzeigen' diff --git a/config/locales/views/conferences/en.yml b/config/locales/views/conferences/en.yml index 7967123..ac42fd6 100644 --- a/config/locales/views/conferences/en.yml +++ b/config/locales/views/conferences/en.yml @@ -21,7 +21,7 @@ en: announce_new_member_by_name: 'Announce entering' announce_left_member_by_name: 'Announce leaving' actions: - confirm: 'Are you sure you want to delete this conference?' + confirm_destroy: 'Are you sure you want to delete this conference?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -39,7 +39,7 @@ en: announce_new_member_by_name: 'Announce new member' announce_left_member_by_name: 'Announce left member' actions: - confirm: 'Are you sure you want to delete this conference?' + confirm_destroy: 'Are you sure you want to delete this conference?' destroy: 'Delete' edit: 'Edit' view_all: 'View all conferences' diff --git a/config/locales/views/fax_accounts/de.yml b/config/locales/views/fax_accounts/de.yml index 5977bb3..4e96501 100644 --- a/config/locales/views/fax_accounts/de.yml +++ b/config/locales/views/fax_accounts/de.yml @@ -19,7 +19,7 @@ de: last_update: 'Letzter Eintrag' send_a_fax: 'Fax versenden' actions: - confirm: 'Sind Sie sicher, dass Sie dieses Software-Fax-Konto löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie dieses Software-Fax-Konto löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -33,7 +33,7 @@ de: days_till_auto_delete: 'Anzahl der Tage bis Faxe gelöscht werden' retries: 'Max. Anzahl von Sendeversuchen' actions: - confirm: 'Sind Sie sicher, dass Sie dieses Software-Fax-Konto löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie dieses Software-Fax-Konto löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/fax_accounts/en.yml b/config/locales/views/fax_accounts/en.yml index 55e935a..a83aa3d 100644 --- a/config/locales/views/fax_accounts/en.yml +++ b/config/locales/views/fax_accounts/en.yml @@ -19,7 +19,7 @@ en: last_update: 'last update' send_a_fax: 'send a fax' actions: - confirm: 'Are you sure you want to delete this fax account?' + confirm_destroy: 'Are you sure you want to delete this fax account?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -33,7 +33,7 @@ en: days_till_auto_delete: 'Day till auto delete' retries: 'Retries' actions: - confirm: 'Are you sure you want to delete this fax account?' + confirm_destroy: 'Are you sure you want to delete this fax account?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/fax_documents/de.yml b/config/locales/views/fax_documents/de.yml index 066746d..df766bf 100644 --- a/config/locales/views/fax_documents/de.yml +++ b/config/locales/views/fax_documents/de.yml @@ -49,7 +49,7 @@ de: document: 'Dokument' destination_phone_number: 'Ziel Fax-Nummer' actions: - confirm: 'Sind Sie sicher, dass Sie dieses Fax-Dokument löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie dieses Fax-Dokument löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -77,7 +77,7 @@ de: fax_resolution: 'Fax Auflösung' destination_phone_number: 'Ziel Fax-Nummer' actions: - confirm: 'Sind Sie sicher, dass Sie dieses Fax-Dokument löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie dieses Fax-Dokument löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/fax_documents/en.yml b/config/locales/views/fax_documents/en.yml index bedb2e6..abc9178 100644 --- a/config/locales/views/fax_documents/en.yml +++ b/config/locales/views/fax_documents/en.yml @@ -49,7 +49,7 @@ en: document: 'Document' destination_phone_number: 'Destination phone number' actions: - confirm: 'Are you sure you want to delete this fax?' + confirm_destroy: 'Are you sure you want to delete this fax?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -77,7 +77,7 @@ en: fax_resolution: 'Resolution' destination_phone_number: 'Destination phone number' actions: - confirm: 'Are you sure you want to delete this fax?' + confirm_destroy: 'Are you sure you want to delete this fax?' destroy: 'Delete' edit: 'Edit' view_all: 'View all' diff --git a/config/locales/views/gateway_parameters/de.yml b/config/locales/views/gateway_parameters/de.yml index 9c1cc3b..8bbd923 100644 --- a/config/locales/views/gateway_parameters/de.yml +++ b/config/locales/views/gateway_parameters/de.yml @@ -13,7 +13,7 @@ de: class_type: 'Class type' description: 'Description' actions: - confirm: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Gatewayparameter' + confirm_destroy: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Gatewayparameter' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -27,7 +27,7 @@ de: class_type: 'Class type' description: 'Description' actions: - confirm: 'Sind Sie sicher, dass die dieses Element löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass die dieses Element löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/gateway_parameters/en.yml b/config/locales/views/gateway_parameters/en.yml index 8d84298..83c5d50 100644 --- a/config/locales/views/gateway_parameters/en.yml +++ b/config/locales/views/gateway_parameters/en.yml @@ -13,7 +13,7 @@ en: class_type: 'Class type' description: 'Description' actions: - confirm: 'Are you sure you want to delete this Gatewayparameter?' + confirm_destroy: 'Are you sure you want to delete this Gatewayparameter?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -27,7 +27,7 @@ en: class_type: 'Class type' description: 'Description' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/gateway_settings/de.yml b/config/locales/views/gateway_settings/de.yml index 698a81a..ab4c291 100644 --- a/config/locales/views/gateway_settings/de.yml +++ b/config/locales/views/gateway_settings/de.yml @@ -13,7 +13,7 @@ de: class_type: 'Class type' description: 'Beschreibung' actions: - confirm: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Gateway Einstellungen' + confirm_destroy: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Gateway Einstellungen' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -27,7 +27,7 @@ de: class_type: 'Class type' description: 'Beschreibung' actions: - confirm: 'Sind Sie sicher, dass die dieses Element löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass die dieses Element löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/gateway_settings/en.yml b/config/locales/views/gateway_settings/en.yml index 63c1609..fc69c76 100644 --- a/config/locales/views/gateway_settings/en.yml +++ b/config/locales/views/gateway_settings/en.yml @@ -13,7 +13,7 @@ en: class_type: 'Class type' description: 'Description' actions: - confirm: 'Are you sure you want to delete this entry?' + confirm_destroy: 'Are you sure you want to delete this entry?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -27,7 +27,7 @@ en: class_type: 'Class type' description: 'Description' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/gateways/de.yml b/config/locales/views/gateways/de.yml index befe6b6..6144dd4 100644 --- a/config/locales/views/gateways/de.yml +++ b/config/locales/views/gateways/de.yml @@ -13,7 +13,7 @@ de: outbound: 'Outbound' description: 'Description' actions: - confirm: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Gateway' + confirm_destroy: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Gateway' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -28,7 +28,7 @@ de: outbound: 'Outbound' description: 'Description' actions: - confirm: 'Sind Sie sicher, dass die dieses Element löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass die dieses Element löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/gateways/en.yml b/config/locales/views/gateways/en.yml index 7732da1..07272bc 100644 --- a/config/locales/views/gateways/en.yml +++ b/config/locales/views/gateways/en.yml @@ -13,7 +13,7 @@ en: outbound: 'Outbound' description: 'Description' actions: - confirm: 'Are you sure you want to delete this Gateway?' + confirm_destroy: 'Are you sure you want to delete this Gateway?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -28,7 +28,7 @@ en: outbound: 'Outbound' description: 'Description' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/gs_cluster_sync_log_entries/de.yml b/config/locales/views/gs_cluster_sync_log_entries/de.yml index 454c317..120e8dd 100644 --- a/config/locales/views/gs_cluster_sync_log_entries/de.yml +++ b/config/locales/views/gs_cluster_sync_log_entries/de.yml @@ -13,7 +13,7 @@ de: content: 'Inhalt' status: 'Status' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Eintrag aus dem GS Cluster Synclog löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Eintrag aus dem GS Cluster Synclog löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -27,7 +27,7 @@ de: content: 'Inhalt' status: 'Status' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Eintrag aus dem GS Cluster Synclog löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Eintrag aus dem GS Cluster Synclog löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/gs_cluster_sync_log_entries/en.yml b/config/locales/views/gs_cluster_sync_log_entries/en.yml index 63c0cbb..add0c98 100644 --- a/config/locales/views/gs_cluster_sync_log_entries/en.yml +++ b/config/locales/views/gs_cluster_sync_log_entries/en.yml @@ -13,7 +13,7 @@ en: content: 'Content' status: 'Status' actions: - confirm: 'Are you sure you want to delete this Gs cluster sync log entry?' + confirm_destroy: 'Are you sure you want to delete this Gs cluster sync log entry?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -27,7 +27,7 @@ en: content: 'Content' status: 'Status' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/gs_nodes/de.yml b/config/locales/views/gs_nodes/de.yml index 62b935e..07538dc 100644 --- a/config/locales/views/gs_nodes/de.yml +++ b/config/locales/views/gs_nodes/de.yml @@ -14,7 +14,7 @@ de: site: 'Standort' element_name: 'Elementenname' actions: - confirm: 'Sind Sie sicher, dass Sie diesen GS Knoten löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen GS Knoten löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -29,7 +29,7 @@ de: site: 'Standort' element_name: 'Elementenname' actions: - confirm: 'Sind Sie sicher, dass Sie diesen GS Knoten löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen GS Knoten löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/gs_nodes/en.yml b/config/locales/views/gs_nodes/en.yml index 8fd7c03..bfb47be 100644 --- a/config/locales/views/gs_nodes/en.yml +++ b/config/locales/views/gs_nodes/en.yml @@ -14,7 +14,7 @@ en: site: 'Site' element_name: 'Element name' actions: - confirm: 'Are you sure you want to delete this GS Node?' + confirm_destroy: 'Are you sure you want to delete this GS Node?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -29,7 +29,7 @@ en: element_name: 'Element name' accepts_updates_from: 'Accepts updates from this node?' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/gs_parameters/de.yml b/config/locales/views/gs_parameters/de.yml index 9e22eb0..92d1833 100644 --- a/config/locales/views/gs_parameters/de.yml +++ b/config/locales/views/gs_parameters/de.yml @@ -13,7 +13,7 @@ de: class_type: 'Class type' description: 'Beschreibung' actions: - confirm: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Gemeinschaft Parameter' + confirm_destroy: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Gemeinschaft Parameter' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -27,7 +27,7 @@ de: class_type: 'Class type' description: 'Beschreibung' actions: - confirm: 'Sind Sie sicher, dass die dieses Element löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass die dieses Element löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/gs_parameters/en.yml b/config/locales/views/gs_parameters/en.yml index 9dbdcb2..9745b11 100644 --- a/config/locales/views/gs_parameters/en.yml +++ b/config/locales/views/gs_parameters/en.yml @@ -13,7 +13,7 @@ en: class_type: 'Class type' description: 'Description' actions: - confirm: 'Are you sure you want to delete this Gemeinschaft parameter?' + confirm_destroy: 'Are you sure you want to delete this Gemeinschaft parameter?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -27,7 +27,7 @@ en: class_type: 'Class type' description: 'Description' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/gui_functions/de.yml b/config/locales/views/gui_functions/de.yml index 9f95f7d..2ada30f 100644 --- a/config/locales/views/gui_functions/de.yml +++ b/config/locales/views/gui_functions/de.yml @@ -11,7 +11,7 @@ de: name: 'Name' description: 'Beschreibung' actions: - confirm: 'Sind Sie sicher, dass Sie diese Oberflächen-Funktion löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Oberflächen-Funktion löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -23,7 +23,7 @@ de: name: 'Name' description: 'Beschreibung' actions: - confirm: 'Sind Sie sicher, dass Sie diese Oberflächen-Funktion löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Oberflächen-Funktion löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/gui_functions/en.yml b/config/locales/views/gui_functions/en.yml index 346f27a..66bdff3 100644 --- a/config/locales/views/gui_functions/en.yml +++ b/config/locales/views/gui_functions/en.yml @@ -11,7 +11,7 @@ de: name: 'Name' description: 'Description' actions: - confirm: 'Are you sure you want to delete this gui function?' + confirm_destroy: 'Are you sure you want to delete this gui function?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -23,7 +23,7 @@ de: name: 'Name' description: 'Description' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/hunt_group_members/de.yml b/config/locales/views/hunt_group_members/de.yml index f98ecfc..b399bde 100644 --- a/config/locales/views/hunt_group_members/de.yml +++ b/config/locales/views/hunt_group_members/de.yml @@ -12,7 +12,7 @@ de: phone_numbers: 'Telefonnummern' can_switch_status_itself: 'Darf seinen Status selbst ändern' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Rufgruppen-Teilnehmer entfernen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Rufgruppen-Teilnehmer entfernen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -24,7 +24,7 @@ de: active: 'Aktiv' can_switch_status_itself: 'Darf seinen Status selber ändern' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Rufgruppen-Teilnehmer entfernen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Rufgruppen-Teilnehmer entfernen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Rufgruppen-Teilnehmer anzeigen' diff --git a/config/locales/views/hunt_group_members/en.yml b/config/locales/views/hunt_group_members/en.yml index 0daa146..6c7f654 100644 --- a/config/locales/views/hunt_group_members/en.yml +++ b/config/locales/views/hunt_group_members/en.yml @@ -12,7 +12,7 @@ en: phone_numbers: 'Phone numbers' can_switch_status_itself: 'Can switch status itself' actions: - confirm: 'Are you sure you want to delete this hunt group member?' + confirm_destroy: 'Are you sure you want to delete this hunt group member?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -24,7 +24,7 @@ en: active: 'Active' can_switch_status_itself: 'Can switch status itself' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/hunt_groups/de.yml b/config/locales/views/hunt_groups/de.yml index 6865d18..cac1cbe 100644 --- a/config/locales/views/hunt_groups/de.yml +++ b/config/locales/views/hunt_groups/de.yml @@ -16,7 +16,7 @@ de: phone_numbers: 'Telefonnummern' hunt_group_members: 'Rufgruppen-Teilnehmer' actions: - confirm: 'Sind Sie sicher, dass Sie diese Rufgruppe löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Rufgruppe löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -30,7 +30,7 @@ de: phone_numbers: 'Telefonnummern' hunt_group_members: 'Rufgruppen-Teilnehmer' actions: - confirm: 'Sind Sie sicher, dass Sie diese Rufgruppe löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Rufgruppe löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Rufgruppen anzeigen' diff --git a/config/locales/views/hunt_groups/en.yml b/config/locales/views/hunt_groups/en.yml index 7039c97..d0cc4cd 100644 --- a/config/locales/views/hunt_groups/en.yml +++ b/config/locales/views/hunt_groups/en.yml @@ -16,7 +16,7 @@ en: phone_numbers: 'Phone numbers' hunt_group_members: 'Members' actions: - confirm: 'Are you sure you want to delete this hunt group?' + confirm_destroy: 'Are you sure you want to delete this hunt group?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -30,7 +30,7 @@ en: phone_numbers: 'Phone numbers' hunt_group_members: 'Members' actions: - confirm: 'Are you sure you want to delete this hunt group?' + confirm_destroy: 'Are you sure you want to delete this hunt group?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/manufacturers/de.yml b/config/locales/views/manufacturers/de.yml index 6620e22..9530fae 100644 --- a/config/locales/views/manufacturers/de.yml +++ b/config/locales/views/manufacturers/de.yml @@ -13,7 +13,7 @@ de: phone_models: 'Telefonmodelle' state: 'Status' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Hersteller löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Hersteller löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -25,7 +25,7 @@ de: homepage_url: 'Homepage URL' state: 'Status' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Hersteller löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Hersteller löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/manufacturers/en.yml b/config/locales/views/manufacturers/en.yml index f4804cf..a66f964 100644 --- a/config/locales/views/manufacturers/en.yml +++ b/config/locales/views/manufacturers/en.yml @@ -13,7 +13,7 @@ en: phone_models: 'Phone models' state: 'State' actions: - confirm: 'Are you sure you want to delete this manufacturer?' + confirm_destroy: 'Are you sure you want to delete this manufacturer?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -25,7 +25,7 @@ en: homepage_url: 'Homepage URL' state: 'State' actions: - confirm: 'Are you sure you want to delete this manufacturer?' + confirm_destroy: 'Are you sure you want to delete this manufacturer?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/phone_book_entries/de.yml b/config/locales/views/phone_book_entries/de.yml index 79d2a9b..21f635e 100644 --- a/config/locales/views/phone_book_entries/de.yml +++ b/config/locales/views/phone_book_entries/de.yml @@ -35,7 +35,7 @@ de: available_phone_books: 'Verfügbare Telefonbücher:' create_new_phone_book_entry: 'Einen neuen Eintrag anlegen' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Telefonbucheintrag löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Telefonbucheintrag löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -69,7 +69,7 @@ de: mobileme_account: 'iCloud Konto' manage_phone_number: 'Telefonnummern verwalten.' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Telefonbucheintrag löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Telefonbucheintrag löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Telefonbucheinträge anzeigen' diff --git a/config/locales/views/phone_book_entries/en.yml b/config/locales/views/phone_book_entries/en.yml index 3c861a0..b41694e 100644 --- a/config/locales/views/phone_book_entries/en.yml +++ b/config/locales/views/phone_book_entries/en.yml @@ -35,7 +35,7 @@ en: available_phone_books: 'Available phone books:' create_new_phone_book_entry: 'create a new entry' actions: - confirm: 'Are you sure you want to delete this phone book entry?' + confirm_destroy: 'Are you sure you want to delete this phone book entry?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -69,7 +69,7 @@ en: mobileme_account: 'iCloud account' manage_phone_number: 'Manage phone number.' actions: - confirm: 'Are you sure you want to delete this phone book entry?' + confirm_destroy: 'Are you sure you want to delete this phone book entry?' destroy: 'Delete phone book entry' edit: 'Edit phone book entry' view_all: 'View all phone book entries' diff --git a/config/locales/views/phone_books/de.yml b/config/locales/views/phone_books/de.yml index 8812f55..6cc17f3 100644 --- a/config/locales/views/phone_books/de.yml +++ b/config/locales/views/phone_books/de.yml @@ -17,7 +17,7 @@ de: description: 'Beschreibung' count: 'Anzahl Einträge' actions: - confirm: 'Sind Sie sicher, dass Sie dieses Telefonbuch löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie dieses Telefonbuch löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -28,7 +28,7 @@ de: name: 'Name' description: 'Beschreibung' actions: - confirm: 'Sind Sie sicher, dass Sie dieses Telefonbuch löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie dieses Telefonbuch löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Telefonbücher anzeigen' diff --git a/config/locales/views/phone_books/en.yml b/config/locales/views/phone_books/en.yml index fcab06d..39052d5 100644 --- a/config/locales/views/phone_books/en.yml +++ b/config/locales/views/phone_books/en.yml @@ -17,7 +17,7 @@ en: description: 'Description' count: 'Number of entries' actions: - confirm: 'Are you sure you want to delete this phone book?' + confirm_destroy: 'Are you sure you want to delete this phone book?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -28,7 +28,7 @@ en: name: 'Name' description: 'Description' actions: - confirm: 'Are you sure you want to delete this phone book?' + confirm_destroy: 'Are you sure you want to delete this phone book?' destroy: 'Delete phone book' edit: 'Edit phone book' view_all: 'View all phone books' diff --git a/config/locales/views/phone_models/de.yml b/config/locales/views/phone_models/de.yml index 36d1663..3c82402 100644 --- a/config/locales/views/phone_models/de.yml +++ b/config/locales/views/phone_models/de.yml @@ -13,7 +13,7 @@ de: product_homepage_url: 'Produkt-Homepage URL' number_of_phones: 'Anzahl von Telefonen' actions: - confirm: 'Sind Sie sicher, dass Sie dieses Telefonmodell löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie dieses Telefonmodell löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -26,7 +26,7 @@ de: product_manual_homepage_url: 'Betriebsanleitung URL' product_homepage_url: 'Produkt-Homepage URL' actions: - confirm: 'Sind Sie sicher, dass Sie dieses Telefonmodell löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie dieses Telefonmodell löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Telefonmodelle anzeigen' diff --git a/config/locales/views/phone_models/en.yml b/config/locales/views/phone_models/en.yml index c500920..adbc9fd 100644 --- a/config/locales/views/phone_models/en.yml +++ b/config/locales/views/phone_models/en.yml @@ -13,7 +13,7 @@ en: product_homepage_url: 'Product homepage URL' number_of_phones: 'System count' actions: - confirm: 'Are you sure you want to delete this phone model?' + confirm_destroy: 'Are you sure you want to delete this phone model?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -25,7 +25,7 @@ en: product_manual_homepage_url: 'Product manual homepage URL' product_homepage_url: 'Product homepage URL' actions: - confirm: 'Are you sure you want to delete this phone model?' + confirm_destroy: 'Are you sure you want to delete this phone model?' destroy: 'Delete phone model' edit: 'Edit phone model' view_all: 'View all phone models' diff --git a/config/locales/views/phone_number_ranges/de.yml b/config/locales/views/phone_number_ranges/de.yml index af97171..a589b32 100644 --- a/config/locales/views/phone_number_ranges/de.yml +++ b/config/locales/views/phone_number_ranges/de.yml @@ -22,7 +22,7 @@ de: amount: 'Anzahl von Rufnummern' phone_numbers: 'Telefonnummern' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Rufnummernbereich löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Rufnummernbereich löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -33,7 +33,7 @@ de: name: 'Name' description: 'Beschreibung' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Rufnummernbereich löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Rufnummernbereich löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Rufnummernbereiche anzeigen' diff --git a/config/locales/views/phone_number_ranges/en.yml b/config/locales/views/phone_number_ranges/en.yml index a22a2c0..2474527 100644 --- a/config/locales/views/phone_number_ranges/en.yml +++ b/config/locales/views/phone_number_ranges/en.yml @@ -22,7 +22,7 @@ en: amount: 'Amount of numbers' phone_numbers: 'Phone numbers' actions: - confirm: 'Are you sure you want to delete this phone number range?' + confirm_destroy: 'Are you sure you want to delete this phone number range?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -33,7 +33,7 @@ en: name: 'Name' description: 'Description' actions: - confirm: 'Are you sure you want to delete this phone number range?' + confirm_destroy: 'Are you sure you want to delete this phone number range?' destroy: 'Delete' edit: 'Edit' view_all: 'View' diff --git a/config/locales/views/phone_numbers/de.yml b/config/locales/views/phone_numbers/de.yml index e801ab4..e6fc703 100644 --- a/config/locales/views/phone_numbers/de.yml +++ b/config/locales/views/phone_numbers/de.yml @@ -15,7 +15,7 @@ de: subscriber_number: 'Telefonnummer' extension: 'Durchwahl' actions: - confirm: 'Sind Sie sicher, dass Sie diese Telefonnummer löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Telefonnummer löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -31,7 +31,7 @@ de: subscriber_number: 'Telefonnummer' extension: 'Durchwahl' actions: - confirm: 'Sind Sie sicher, dass Sie diese Telefonnummer löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Telefonnummer löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/phone_numbers/en.yml b/config/locales/views/phone_numbers/en.yml index be3b4f5..07fb2fb 100644 --- a/config/locales/views/phone_numbers/en.yml +++ b/config/locales/views/phone_numbers/en.yml @@ -15,7 +15,7 @@ en: subscriber_number: 'Subscriber number' extension: 'Extension' actions: - confirm: 'Are you sure you want to delete this phone number?' + confirm_destroy: 'Are you sure you want to delete this phone number?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -31,7 +31,7 @@ en: subscriber_number: 'Subscriber number' extension: 'Extension' actions: - confirm: 'Are you sure you want to delete this phone number?' + confirm_destroy: 'Are you sure you want to delete this phone number?' destroy: 'Delete' edit: 'Edit' view_all: 'View all phone numbers' diff --git a/config/locales/views/phone_sip_accounts/de.yml b/config/locales/views/phone_sip_accounts/de.yml index 98c7bc5..7a6736a 100644 --- a/config/locales/views/phone_sip_accounts/de.yml +++ b/config/locales/views/phone_sip_accounts/de.yml @@ -11,7 +11,7 @@ de: sip_account_id: 'SIP-Konto' position: 'Position' actions: - confirm: 'Sind Sie sicher, dass Sie dieses SIP-Konto von dem Telefon entfernen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie dieses SIP-Konto von dem Telefon entfernen möchten?' destroy: 'Entfernen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -23,7 +23,7 @@ de: sip_account_id: 'SIP-Konto' position: 'Position' actions: - confirm: 'Sind Sie sicher, dass Sie dieses SIP-Konto von dem Telefon entfernen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie dieses SIP-Konto von dem Telefon entfernen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/phone_sip_accounts/en.yml b/config/locales/views/phone_sip_accounts/en.yml index 9577241..3604758 100644 --- a/config/locales/views/phone_sip_accounts/en.yml +++ b/config/locales/views/phone_sip_accounts/en.yml @@ -11,7 +11,7 @@ en: sip_account_id: 'SIP account' position: 'Position' actions: - confirm: 'Are you sure you want to delete this SIP account on this phone?' + confirm_destroy: 'Are you sure you want to delete this SIP account on this phone?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -23,7 +23,7 @@ en: sip_account_id: 'SIP account' position: 'Position' actions: - confirm: 'Are you sure you want to delete this SIP account on this phone?' + confirm_destroy: 'Are you sure you want to delete this SIP account on this phone?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/phones/de.yml b/config/locales/views/phones/de.yml index 4aa0ae6..59313b1 100644 --- a/config/locales/views/phones/de.yml +++ b/config/locales/views/phones/de.yml @@ -17,7 +17,7 @@ de: nightly_reboot: 'Nachts automatischer Reboot' provisioning_key_active: 'Provisioning Schlüssel aktiv' actions: - confirm: 'Sind Sie sicher, dass Sie diese Telefon aus Gemeinschaft entfernen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Telefon aus Gemeinschaft entfernen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -36,7 +36,7 @@ de: fallback_sip_account_id: 'Fallback SIP Account' manual: 'Handbuch' actions: - confirm: 'Sind Sie sicher, dass Sie diese Telefon aus Gemeinschaft entfernen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Telefon aus Gemeinschaft entfernen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Telefone anzeigen' @@ -79,7 +79,7 @@ de: hint: '' button: 'Absenden' sip_accounts: - title: 'Auf dem Telefon eingetragene SIP-Konten' - connect_to_sip_account: 'Neues SIP-Konto auf das Telefon eintragen' + title: 'Verknüpfte SIP-Accounts' + connect_to_sip_account: 'SIP-Account mit dem Telefon verknüpfen' tool_tips: hot_desk: 'Mit aktivierter Hot Desk Fähigkeit können sich User der Anlage an einem Telefon ein- und ausloggen.' diff --git a/config/locales/views/phones/en.yml b/config/locales/views/phones/en.yml index 46b0bcb..9574443 100644 --- a/config/locales/views/phones/en.yml +++ b/config/locales/views/phones/en.yml @@ -16,7 +16,7 @@ en: http_password: 'http password' nightly_reboot: 'Nightly reboot' actions: - confirm: 'Are you sure you want to delete this phone?' + confirm_destroy: 'Are you sure you want to delete this phone?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -36,7 +36,7 @@ en: fallback_sip_account_id: 'Fallback SIP Account' manual: 'Manual' actions: - confirm: 'Are you sure you want to delete this phone?' + confirm_destroy: 'Are you sure you want to delete this phone?' destroy: 'Delete phone' edit: 'Edit phone' view_all: 'View all phones' diff --git a/config/locales/views/ringtones/de.yml b/config/locales/views/ringtones/de.yml index 6bb3683..d2429a9 100644 --- a/config/locales/views/ringtones/de.yml +++ b/config/locales/views/ringtones/de.yml @@ -10,7 +10,7 @@ de: audio: 'Audio' bellcore_id: 'Bellcore-ID' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Klingelton löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Klingelton löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -20,7 +20,7 @@ de: audio: 'Audio' bellcore_id: 'Bellcore-ID' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Klingelton löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Klingelton löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/ringtones/en.yml b/config/locales/views/ringtones/en.yml index e681d96..c9ee727 100644 --- a/config/locales/views/ringtones/en.yml +++ b/config/locales/views/ringtones/en.yml @@ -10,7 +10,7 @@ en: audio: 'Audio' bellcore_id: 'Bellcore ID' actions: - confirm: 'Are you sure you want to delete this ringtone?' + confirm_destroy: 'Are you sure you want to delete this ringtone?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -20,7 +20,7 @@ en: audio: 'Audio' bellcore_id: 'Bellcore ID' actions: - confirm: 'Are you sure you want to delete this ringtone?' + confirm_destroy: 'Are you sure you want to delete this ringtone?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/route_elements/de.yml b/config/locales/views/route_elements/de.yml index d2c6c39..683bee8 100644 --- a/config/locales/views/route_elements/de.yml +++ b/config/locales/views/route_elements/de.yml @@ -16,7 +16,7 @@ de: mandatory: 'Mandatory' position: 'Position' actions: - confirm: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Route element' + confirm_destroy: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Route element' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -33,7 +33,7 @@ de: mandatory: 'Mandatory' position: 'Position' actions: - confirm: 'Sind Sie sicher, dass die dieses Element löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass die dieses Element löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/route_elements/en.yml b/config/locales/views/route_elements/en.yml index 1340309..35179cc 100644 --- a/config/locales/views/route_elements/en.yml +++ b/config/locales/views/route_elements/en.yml @@ -16,7 +16,7 @@ en: mandatory: 'Mandatory' position: 'Position' actions: - confirm: 'Are you sure you want to delete this Route element?' + confirm_destroy: 'Are you sure you want to delete this Route element?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -33,7 +33,7 @@ en: mandatory: 'Mandatory' position: 'Position' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/sip_accounts/de.yml b/config/locales/views/sip_accounts/de.yml index ad78a93..162a072 100644 --- a/config/locales/views/sip_accounts/de.yml +++ b/config/locales/views/sip_accounts/de.yml @@ -20,7 +20,7 @@ de: callforward_rules_act_per_sip_account: 'Rufweiterleitungen gelten für das gesamte SIP-Konto' online: 'Online' actions: - confirm: 'Sind Sie sicher, dass Sie diesen SIP-Konto löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen SIP-Konto löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -41,7 +41,7 @@ de: registration: 'Registrierung' expires: 'Läuft ab' actions: - confirm: 'Sind Sie sicher, dass Sie diesen SIP-Konto löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen SIP-Konto löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle SIP-Konten anzeigen' diff --git a/config/locales/views/sip_accounts/en.yml b/config/locales/views/sip_accounts/en.yml index c1d8613..b02c60a 100644 --- a/config/locales/views/sip_accounts/en.yml +++ b/config/locales/views/sip_accounts/en.yml @@ -20,7 +20,7 @@ en: callforward_rules_act_per_sip_account: 'Callforwards work for the whole sip account' online: 'Online' actions: - confirm: 'Are you sure you want to delete this SIP account?' + confirm_destroy: 'Are you sure you want to delete this SIP account?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -41,7 +41,7 @@ en: registration: 'Registration' expires: 'Expires' actions: - confirm: 'Are you sure you want to delete this SIP account?' + confirm_destroy: 'Are you sure you want to delete this SIP account?' destroy: 'Delete' edit: 'Edit' view_all: 'View all SIP accounts' diff --git a/config/locales/views/sip_domains/de.yml b/config/locales/views/sip_domains/de.yml index 447caa9..7c3bfb6 100644 --- a/config/locales/views/sip_domains/de.yml +++ b/config/locales/views/sip_domains/de.yml @@ -10,7 +10,7 @@ de: host: 'Host' realm: 'Realm' actions: - confirm: 'Sind Sie sicher, dass Sie diese SIP-Domain löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese SIP-Domain löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -20,7 +20,7 @@ de: host: 'Host' realm: 'Realm' actions: - confirm: 'Sind Sie sicher, dass Sie diese SIP-Domain löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese SIP-Domain löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle SIP-Domains anzeigen' diff --git a/config/locales/views/sip_domains/en.yml b/config/locales/views/sip_domains/en.yml index bf62a60..30432e4 100644 --- a/config/locales/views/sip_domains/en.yml +++ b/config/locales/views/sip_domains/en.yml @@ -10,7 +10,7 @@ en: host: 'Host' realm: 'Realm' actions: - confirm: 'Are you sure you want to delete this SIP domain?' + confirm_destroy: 'Are you sure you want to delete this SIP domain?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -20,7 +20,7 @@ en: host: 'Host' realm: 'Realm' actions: - confirm: 'Are you sure you want to delete this SIP domain?' + confirm_destroy: 'Are you sure you want to delete this SIP domain?' destroy: 'Delete SIP domain' edit: 'Edit SIP domain' view_all: 'View all SIP domains' diff --git a/config/locales/views/softkeys/de.yml b/config/locales/views/softkeys/de.yml index f5f8f26..654da80 100644 --- a/config/locales/views/softkeys/de.yml +++ b/config/locales/views/softkeys/de.yml @@ -25,7 +25,7 @@ de: label: 'Beschriftung' position: 'Position' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Softkey löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Softkey löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -40,7 +40,7 @@ de: position: 'Position' call_forward: 'Rufumleitung' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Softkey löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Softkey löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/softkeys/en.yml b/config/locales/views/softkeys/en.yml index e29e4c6..d78c685 100644 --- a/config/locales/views/softkeys/en.yml +++ b/config/locales/views/softkeys/en.yml @@ -25,7 +25,7 @@ en: label: 'Label' position: 'Position' actions: - confirm: 'Are you sure you want to delete this softkey?' + confirm_destroy: 'Are you sure you want to delete this softkey?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -40,7 +40,7 @@ en: position: 'Position' call_forward: 'Call forward' actions: - confirm: 'Are you sure you want to delete this softkey?' + confirm_destroy: 'Are you sure you want to delete this softkey?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/system_messages/de.yml b/config/locales/views/system_messages/de.yml index 9bdce48..571c326 100644 --- a/config/locales/views/system_messages/de.yml +++ b/config/locales/views/system_messages/de.yml @@ -10,7 +10,7 @@ de: user_id: 'Benutzer' content: 'Nachricht' actions: - confirm: 'Sind Sie sicher, dass Sie diese Systemnachricht löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Systemnachricht löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -20,7 +20,7 @@ de: user_id: 'Benutzer' content: 'Nachricht' actions: - confirm: 'Sind Sie sicher, dass Sie diese Systemnachricht löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Systemnachricht löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/system_messages/en.yml b/config/locales/views/system_messages/en.yml index 05e0836..4ce8317 100644 --- a/config/locales/views/system_messages/en.yml +++ b/config/locales/views/system_messages/en.yml @@ -10,7 +10,7 @@ en: user_id: 'User' content: 'Content' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -20,7 +20,7 @@ en: user_id: 'User' content: 'Content' actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/config/locales/views/tenants/de.yml b/config/locales/views/tenants/de.yml index 66d9d0a..817899a 100644 --- a/config/locales/views/tenants/de.yml +++ b/config/locales/views/tenants/de.yml @@ -16,7 +16,7 @@ de: from_field_voicemail_email: 'Anrufbeantworter Absender' from_field_pin_change_email: 'Neue PIN Absender' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Mandant löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Mandant löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -30,7 +30,7 @@ de: from_field_voicemail_email: 'Anrufbeantworter Absender' from_field_pin_change_email: 'Neue PIN Absender' actions: - confirm: 'Sind Sie sicher, dass Sie diesen Mandant löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen Mandant löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Mandanten anzeigen' diff --git a/config/locales/views/tenants/en.yml b/config/locales/views/tenants/en.yml index adbf45f..b61b5e1 100644 --- a/config/locales/views/tenants/en.yml +++ b/config/locales/views/tenants/en.yml @@ -16,7 +16,7 @@ en: from_field_voicemail_email: 'Voicemail sender' from_field_pin_change_email: 'PIN change sender' actions: - confirm: 'Are you sure you want to delete this tenant?' + confirm_destroy: 'Are you sure you want to delete this tenant?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -30,7 +30,7 @@ en: from_field_voicemail_email: 'Voicemail sender' from_field_pin_change_email: 'PIN change sender' actions: - confirm: 'Are you sure you want to delete this tenant?' + confirm_destroy: 'Are you sure you want to delete this tenant?' destroy: 'Delete' edit: 'Edit' view_all: 'View all tenants' diff --git a/config/locales/views/user_group_memberships/de.yml b/config/locales/views/user_group_memberships/de.yml index 35dbac8..9df4cad 100644 --- a/config/locales/views/user_group_memberships/de.yml +++ b/config/locales/views/user_group_memberships/de.yml @@ -10,7 +10,7 @@ de: page_title: 'Gruppenzugehörigkeiten' user: 'Benutzer' actions: - confirm: 'Sind Sie sicher, dass Sie diese Gruppenzugehörigkeit löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Gruppenzugehörigkeit löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -20,7 +20,7 @@ de: page_title: 'Gruppenzugehörigkeiten anzeigen' user: 'Benutzer' actions: - confirm: 'Sind Sie sicher, dass Sie diese Gruppenzugehörigkeit löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Gruppenzugehörigkeit löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Gruppenzugehörigkeitenen anzeigen' diff --git a/config/locales/views/user_group_memberships/en.yml b/config/locales/views/user_group_memberships/en.yml index d31a87a..28049e0 100644 --- a/config/locales/views/user_group_memberships/en.yml +++ b/config/locales/views/user_group_memberships/en.yml @@ -10,7 +10,7 @@ en: page_title: 'User group memberships' user: 'User' actions: - confirm: 'Are you sure you want to delete this user group membership?' + confirm_destroy: 'Are you sure you want to delete this user group membership?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -20,7 +20,7 @@ en: page_title: 'Show user group membership' user: 'User' actions: - confirm: 'Are you sure you want to delete this user group membership?' + confirm_destroy: 'Are you sure you want to delete this user group membership?' destroy: 'Delete' edit: 'Edit' view_all: 'View all user group memberships' diff --git a/config/locales/views/user_groups/de.yml b/config/locales/views/user_groups/de.yml index 40b3da8..303fca0 100644 --- a/config/locales/views/user_groups/de.yml +++ b/config/locales/views/user_groups/de.yml @@ -12,7 +12,7 @@ de: tenant_id: 'Mandant' number_of_members: 'Benutzerzahl' actions: - confirm: 'Sind Sie sicher, dass Sie diese Gruppe löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Gruppe löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -24,7 +24,7 @@ de: description: 'Beschreibung' tenant_id: 'Mandant' actions: - confirm: 'Sind Sie sicher, dass Sie diese Gruppe löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Gruppe löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle Gruppen anzeigen' diff --git a/config/locales/views/user_groups/en.yml b/config/locales/views/user_groups/en.yml index a2db293..1403a19 100644 --- a/config/locales/views/user_groups/en.yml +++ b/config/locales/views/user_groups/en.yml @@ -12,7 +12,7 @@ en: tenant_id: 'Tenant' number_of_members: 'Number of members' actions: - confirm: 'Are you sure you want to delete this user group?' + confirm_destroy: 'Are you sure you want to delete this user group?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -24,7 +24,7 @@ en: description: 'Description' tenant_id: 'Tenant' actions: - confirm: 'Are you sure you want to delete this user group?' + confirm_destroy: 'Are you sure you want to delete this user group?' destroy: 'Delete' edit: 'Edit' view_all: 'View all user groups' diff --git a/config/locales/views/users/de.yml b/config/locales/views/users/de.yml index e4a0ae2..0426e57 100644 --- a/config/locales/views/users/de.yml +++ b/config/locales/views/users/de.yml @@ -20,7 +20,7 @@ de: language_id: 'Sprache' send_voicemail_as_email_attachment: 'Sprachnachrichten per E-Mail' actions: - confirm: 'Sind Sie sicher, dass Sie diesen User löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen User löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -39,7 +39,7 @@ de: language_id: 'Sprache' send_voicemail_as_email_attachment: 'Sprachnachrichten per E-Mail' actions: - confirm: 'Sind Sie sicher, dass Sie diesen User löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen User löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle User anzeigen' diff --git a/config/locales/views/users/en.yml b/config/locales/views/users/en.yml index 317e616..26cb30c 100644 --- a/config/locales/views/users/en.yml +++ b/config/locales/views/users/en.yml @@ -20,7 +20,7 @@ en: language_id: 'Language' send_voicemail_as_email_attachment: 'Send voicemails by e-mail' actions: - confirm: 'Are you sure you want to delete this user?' + confirm_destroy: 'Are you sure you want to delete this user?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -39,7 +39,7 @@ en: language_id: 'Language' send_voicemail_as_email_attachment: 'Send voicemails by e-mail' actions: - confirm: 'Are you sure you want to delete this user?' + confirm_destroy: 'Are you sure you want to delete this user?' destroy: 'Delete' edit: 'Edit' view_all: 'View all users' diff --git a/config/locales/views/voicemail_messages/de.yml b/config/locales/views/voicemail_messages/de.yml index 61ee837..addf8b1 100644 --- a/config/locales/views/voicemail_messages/de.yml +++ b/config/locales/views/voicemail_messages/de.yml @@ -14,7 +14,7 @@ de: unread: 'Ungelesen: %{count}' all: 'Alle: %{count}' actions: - confirm: 'Sind Sie sicher, dass Sie diese Nachricht löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Nachricht löschen möchten?' confirm_selected: 'Sind Sie sicher, dass Sie die markierten Nachrichten löschen möchten?' destroy: 'Löschen' destroy_multiple: 'Markierte Nachrichten löschen' diff --git a/config/locales/views/voicemail_messages/en.yml b/config/locales/views/voicemail_messages/en.yml index 3c02b6d..5f0a610 100644 --- a/config/locales/views/voicemail_messages/en.yml +++ b/config/locales/views/voicemail_messages/en.yml @@ -14,7 +14,7 @@ en: unread: 'Unread: %{count}' all: 'All: %{count}' actions: - confirm: 'Are you sure you want to delete this message?' + confirm_destroy: 'Are you sure you want to delete this message?' confirm_selected: 'Are you sure you want to delete all selected messages?' destroy: 'Delete' destroy_multiple: 'Delete selected messages' diff --git a/config/locales/views/voicemail_settings/de.yml b/config/locales/views/voicemail_settings/de.yml index 184fcac..2271cae 100644 --- a/config/locales/views/voicemail_settings/de.yml +++ b/config/locales/views/voicemail_settings/de.yml @@ -8,7 +8,7 @@ de: index: page_title: 'Anrufbeantworter Einstellungen' actions: - confirm: 'Sind Sie sicher, dass Sie die Einstellungen löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie die Einstellungen löschen möchten?' destroy: 'Löschen' show: page_title: 'Anrufbeantworter Einstellungen' @@ -20,7 +20,7 @@ de: mark_read: 'Als gelesen markieren' purge: 'Löschen' actions: - confirm: 'Sind Sie sicher, dass Sie die Einstellungen löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie die Einstellungen löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' new: diff --git a/config/locales/views/voicemail_settings/en.yml b/config/locales/views/voicemail_settings/en.yml index ddade59..22be392 100644 --- a/config/locales/views/voicemail_settings/en.yml +++ b/config/locales/views/voicemail_settings/en.yml @@ -8,7 +8,7 @@ en: index: page_title: 'Voicemail Settings' actions: - confirm: 'Are you sure you want to delete voicemail settings?' + confirm_destroy: 'Are you sure you want to delete voicemail settings?' destroy: 'Delete' show: page_title: 'Voicemail Settings' @@ -20,7 +20,7 @@ en: mark_read: 'Mark read' purge: 'Delete' actions: - confirm: 'Are you sure you want to delete voicemail settings?' + confirm_destroy: 'Are you sure you want to delete voicemail settings?' destroy: 'Delete' edit: 'Edit' new: diff --git a/config/locales/views/whitelists/de.yml b/config/locales/views/whitelists/de.yml index 7710de6..8b1b67f 100644 --- a/config/locales/views/whitelists/de.yml +++ b/config/locales/views/whitelists/de.yml @@ -10,7 +10,7 @@ de: name: 'Name' phone_numbers: 'Telefonnummern' actions: - confirm: 'Sind Sie sicher, dass Sie diese Positivliste löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Positivliste löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -20,7 +20,7 @@ de: page_title: 'Positivliste anzeigen' name: 'Name' actions: - confirm: 'Sind Sie sicher, dass Sie diese Positivliste löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diese Positivliste löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' diff --git a/config/locales/views/whitelists/en.yml b/config/locales/views/whitelists/en.yml index d681153..2a91e54 100644 --- a/config/locales/views/whitelists/en.yml +++ b/config/locales/views/whitelists/en.yml @@ -10,7 +10,7 @@ en: name: 'Name' phone_numbers: 'Phone numbers' actions: - confirm: 'Are you sure you want to delete this whitelist?' + confirm_destroy: 'Are you sure you want to delete this whitelist?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -20,7 +20,7 @@ en: page_title: 'Show whitelist' name: 'Name' actions: - confirm: 'Are you sure you want to delete this whitelist?' + confirm_destroy: 'Are you sure you want to delete this whitelist?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/lib/generators/nifty/scaffold/templates/locale.yml b/lib/generators/nifty/scaffold/templates/locale.yml index 46e4ce3..0286f1f 100644 --- a/lib/generators/nifty/scaffold/templates/locale.yml +++ b/lib/generators/nifty/scaffold/templates/locale.yml @@ -11,7 +11,7 @@ en: <%= attribute.name %>: '<%= attribute.human_name %>' <%- end -%> actions: - confirm: 'Are you sure you want to delete this <%= human_name %>?' + confirm_destroy: 'Are you sure you want to delete this <%= human_name %>?' destroy: 'Delete' edit: 'Edit' show: 'View' @@ -23,7 +23,7 @@ en: <%= attribute.name %>: '<%= attribute.human_name %>' <%- end -%> actions: - confirm: 'Are you sure you want to delete this element?' + confirm_destroy: 'Are you sure you want to delete this element?' destroy: 'Delete' edit: 'Edit' view_all: 'View All' diff --git a/lib/generators/nifty/scaffold/templates/locale_de.yml b/lib/generators/nifty/scaffold/templates/locale_de.yml index 027d36d..2936eca 100644 --- a/lib/generators/nifty/scaffold/templates/locale_de.yml +++ b/lib/generators/nifty/scaffold/templates/locale_de.yml @@ -11,7 +11,7 @@ de: <%= attribute.name %>: '<%= attribute.human_name %>' <%- end -%> actions: - confirm: 'Sind Sie sicher, dass Sie folgendes löschen möchten: <%= human_name %>' + confirm_destroy: 'Sind Sie sicher, dass Sie folgendes löschen möchten: <%= human_name %>' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' @@ -23,7 +23,7 @@ de: <%= attribute.name %>: '<%= attribute.human_name %>' <%- end -%> actions: - confirm: 'Sind Sie sicher, dass die dieses Element löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass die dieses Element löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' view_all: 'Alle anzeigen' -- cgit v1.2.3 From 4e075be70a747fe18afd9e914bad899c2d202d90 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 17:47:48 +0100 Subject: I18n fix. --- config/locales/views/users/de.yml | 2 +- config/locales/views/users/en.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/views/users/de.yml b/config/locales/views/users/de.yml index 0426e57..20fa4e0 100644 --- a/config/locales/views/users/de.yml +++ b/config/locales/views/users/de.yml @@ -24,7 +24,7 @@ de: destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' - create: 'Neuen User anlegen' + create: 'Neue anlegen' create_for: 'Neuen User für %{resource} anlegen' show: page_title: 'User anzeigen' diff --git a/config/locales/views/users/en.yml b/config/locales/views/users/en.yml index 26cb30c..121c925 100644 --- a/config/locales/views/users/en.yml +++ b/config/locales/views/users/en.yml @@ -24,7 +24,7 @@ en: destroy: 'Delete' edit: 'Edit' show: 'View' - create: 'Create a new user' + create: 'New' create_for: 'Create a new user for %{resource}' show: page_title: 'Show User' -- cgit v1.2.3 From 4cad2a069fcead88579373a285a0516a3d500c43 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 23 Jan 2013 17:55:50 +0100 Subject: UI improvement. --- app/views/tenants/_form_core.html.haml | 3 ++- config/locales/views/tenants/de.yml | 2 +- config/locales/views/tenants/en.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) 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/config/locales/views/tenants/de.yml b/config/locales/views/tenants/de.yml index 817899a..6036879 100644 --- a/config/locales/views/tenants/de.yml +++ b/config/locales/views/tenants/de.yml @@ -1,7 +1,7 @@ de: tenants: name: "Mandant" - new_name_scaffold: 'Beispiel Firma Nr. %{counter} GmbH' + new_name_scaffold: 'Beispiel Firma' controller: successfuly_created: 'Der Mandant "%{resource}" wurde angelegt.' successfuly_created_plus_delayed_jobs: 'Der Mandant "%{resource}" wurde angelegt. %{amount_of_numbers} Durchwahlen und Telefonnummern werden jetzt im Hintergrund ins System gespielt. Dies kann je nach benutzter Hardware ein paar Minuten dauern. ' diff --git a/config/locales/views/tenants/en.yml b/config/locales/views/tenants/en.yml index b61b5e1..edccda0 100644 --- a/config/locales/views/tenants/en.yml +++ b/config/locales/views/tenants/en.yml @@ -1,7 +1,7 @@ en: tenants: name: "Tenant" - new_name_scaffold: 'Snake Oil #%{counter}, Ltd.' + new_name_scaffold: 'Snake Oil Ltd.' controller: successfuly_created: 'Successfully created the tenant "%{resource}".' successfuly_created_plus_delayed_jobs: 'Successfully created the tenant "%{resource}". A total of %{amount_of_numbers} extensions and external numbers is being proccessed in the background. Depending on your hardware that can take a couple of minutes.' -- cgit v1.2.3 From e5db9179c75b6b6176e4f5b67ff94a10122ecfbd Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Wed, 23 Jan 2013 18:02:47 +0100 Subject: minor corrections to show correct version --- app/views/gemeinschaft_setups/new.de.html.haml | 2 +- app/views/gemeinschaft_setups/new.html.haml | 2 +- misc/freeswitch/scripts/event_manager.lua | 2 +- misc/freeswitch/scripts/fax_daemon.lua | 2 +- misc/freeswitch/scripts/send_fax.lua | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/gemeinschaft_setups/new.de.html.haml b/app/views/gemeinschaft_setups/new.de.html.haml index b78e278..3d9b173 100644 --- a/app/views/gemeinschaft_setups/new.de.html.haml +++ b/app/views/gemeinschaft_setups/new.de.html.haml @@ -1,4 +1,4 @@ -- 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| diff --git a/app/views/gemeinschaft_setups/new.html.haml b/app/views/gemeinschaft_setups/new.html.haml index 1b97cc0..ff9c812 100644 --- a/app/views/gemeinschaft_setups/new.html.haml +++ b/app/views/gemeinschaft_setups/new.html.haml @@ -1,4 +1,4 @@ -- 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| diff --git a/misc/freeswitch/scripts/event_manager.lua b/misc/freeswitch/scripts/event_manager.lua index 4e78ccf..1e61baf 100644 --- a/misc/freeswitch/scripts/event_manager.lua +++ b/misc/freeswitch/scripts/event_manager.lua @@ -1,4 +1,4 @@ --- Gemeinschaft 5.0 event handler +-- Gemeinschaft 5 event handler -- (c) AMOOMA GmbH 2012-2013 -- diff --git a/misc/freeswitch/scripts/fax_daemon.lua b/misc/freeswitch/scripts/fax_daemon.lua index 6609fe6..94d343a 100644 --- a/misc/freeswitch/scripts/fax_daemon.lua +++ b/misc/freeswitch/scripts/fax_daemon.lua @@ -1,4 +1,4 @@ --- Gemeinschaft 5.0 fax daemon +-- Gemeinschaft 5 fax daemon -- (c) AMOOMA GmbH 2012-2013 -- diff --git a/misc/freeswitch/scripts/send_fax.lua b/misc/freeswitch/scripts/send_fax.lua index 11cd1d7..e3dc4cc 100644 --- a/misc/freeswitch/scripts/send_fax.lua +++ b/misc/freeswitch/scripts/send_fax.lua @@ -1,4 +1,4 @@ --- Gemeinschaft 5.0 +-- Gemeinschaft 5 -- (c) AMOOMA GmbH 2012-2013 -- -- cgit v1.2.3 From f4d1151238fbf01b436884ae89367a53b4360014 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Wed, 23 Jan 2013 23:12:19 +0100 Subject: add mod_snmp --- misc/freeswitch/conf/freeswitch.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/freeswitch/conf/freeswitch.xml b/misc/freeswitch/conf/freeswitch.xml index 3c098fc..09f36d1 100644 --- a/misc/freeswitch/conf/freeswitch.xml +++ b/misc/freeswitch/conf/freeswitch.xml @@ -633,6 +633,7 @@ + -- cgit v1.2.3 From b432f1930851c3b583b223d773341f5e208046a7 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 12:47:00 +0100 Subject: Better user experience. One step setup. --- app/controllers/gemeinschaft_setups_controller.rb | 28 +++++++++++++++++++++- app/models/gemeinschaft_setup.rb | 8 +++++++ app/views/gemeinschaft_setups/new.de.html.haml | 20 +++++++++------- app/views/gemeinschaft_setups/new.html.haml | 22 +++++++++-------- app/views/users/_form_core.html.haml | 3 ++- config/locales/views/gemeinschaft_setups/de.yml | 12 +++++++--- config/locales/views/gemeinschaft_setups/en.yml | 10 ++++++-- ...d_default_company_name_to_gemeinschaft_setup.rb | 6 +++++ db/schema.rb | 8 ++++--- 9 files changed, 88 insertions(+), 29 deletions(-) create mode 100644 db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb diff --git a/app/controllers/gemeinschaft_setups_controller.rb b/app/controllers/gemeinschaft_setups_controller.rb index 347e043..a860653 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_beginners_intro_path, :notice => t('gemeinschaft_setups.initial_setup.successful_setup') else render :new end 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/views/gemeinschaft_setups/new.de.html.haml b/app/views/gemeinschaft_setups/new.de.html.haml index 3d9b173..cf1f207 100644 --- a/app/views/gemeinschaft_setups/new.de.html.haml +++ b/app/views/gemeinschaft_setups/new.de.html.haml @@ -5,23 +5,25 @@ = 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 ff9c812..5e2434e 100644 --- a/app/views/gemeinschaft_setups/new.html.haml +++ b/app/views/gemeinschaft_setups/new.html.haml @@ -4,24 +4,26 @@ = 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/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/config/locales/views/gemeinschaft_setups/de.yml b/config/locales/views/gemeinschaft_setups/de.yml index d087583..57bc7e6 100644 --- a/config/locales/views/gemeinschaft_setups/de.yml +++ b/config/locales/views/gemeinschaft_setups/de.yml @@ -4,7 +4,7 @@ de: initial_setup: tenant_name_default: 'Beispiel-Firma GmbH' access_denied_only_available_on_a_new_system: 'Zugriff verweigert! Der Installations-Assistent ist nur auf einem frisch installierten System verfügbar.' - successful_setup: 'Ihr Admin-Konto wurde erstellt. Als nächsten Schritt müssen Sie einen Mandant anlegen.' + successful_setup: 'Ihre neue Telefonanlage ist jetzt eingerichtet. Bitte erstellen Sie jetzt ein paar SIP-Accounts und richten Sie danach Telefone dafür ein.' admin_name: 'admin' super_tenant_description: 'Die Benutzer dieses Mandanten haben besondere Rechte. Sie können andere Mandanten anlegen und löschen.' admin_group_name: 'Admins' @@ -27,5 +27,11 @@ de: hint: '' default_area_code: label: 'Standard Ortsvorwahl' - hint: '030 für Berlin, 0261 für Koblenz, 02631 für Neuwied, usw.' - button: 'Absenden' \ No newline at end of file + hint: '030 für Berlin, 0261 für Koblenz, 02631 für Neuwied, usw.' + default_company_name: + label: 'Name der Organisation' + hint: 'z.B. Firmenname' + default_system_email: + label: 'System E-Mail Adresse' + hint: 'Für den E-Mail Versand von Faxen und Voicemails.' + submit: 'Anlage einrichten' \ No newline at end of file diff --git a/config/locales/views/gemeinschaft_setups/en.yml b/config/locales/views/gemeinschaft_setups/en.yml index 5e22e58..7af160c 100644 --- a/config/locales/views/gemeinschaft_setups/en.yml +++ b/config/locales/views/gemeinschaft_setups/en.yml @@ -4,7 +4,7 @@ en: initial_setup: tenant_name_default: 'Snake Oil, Ltd.' access_denied_only_available_on_a_new_system: 'Access denied! The setup wizard is only available on a new system.' - successful_setup: 'Your admin account has been created. The next step is to create a tenant.' + successful_setup: 'Your new PBX is up and running. Have a look around and setup some SIP accounts and phones.' admin_name: 'admin' super_tenant_description: 'The members of this tenant have the power to create and delete other tenants.' admin_group_name: 'Admins' @@ -28,4 +28,10 @@ en: default_area_code: label: 'Default area code' hint: '' - button: 'Submit' \ No newline at end of file + default_company_name: + label: 'Name of the organisation' + hint: 'e.g. name of the company' + default_system_email: + label: 'System e-mail address' + hint: 'From field for voicemail or fax e-mails.' + button: 'Create this PBX' \ No newline at end of file diff --git a/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb b/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb new file mode 100644 index 0000000..46b4884 --- /dev/null +++ b/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb @@ -0,0 +1,6 @@ +class AddDefaultCompanyNameToGemeinschaftSetup < ActiveRecord::Migration + def change + add_column :gemeinschaft_setups, :default_company_name, :string + add_column :gemeinschaft_setups, :default_system_email, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 649e022..17563b1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130122121100) do +ActiveRecord::Schema.define(:version => 20130124105613) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -535,9 +535,11 @@ ActiveRecord::Schema.define(:version => 20130122121100) do t.integer "sip_domain_id" t.integer "country_id" t.integer "language_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "default_area_code" + t.string "default_company_name" + t.string "default_system_email" end create_table "gs_cluster_sync_log_entries", :force => true do |t| -- cgit v1.2.3 From be3a2af680449d6124afbc7eeccce9d4f0daad82 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 12:49:37 +0100 Subject: Wording. s/SIP-Konto/SIP-Account/g --- config/locales/views/sip_accounts/de.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/config/locales/views/sip_accounts/de.yml b/config/locales/views/sip_accounts/de.yml index 162a072..e967c7d 100644 --- a/config/locales/views/sip_accounts/de.yml +++ b/config/locales/views/sip_accounts/de.yml @@ -1,12 +1,12 @@ de: sip_accounts: - name: 'SIP-Konto' + name: 'SIP-Account' controller: - successfuly_created: 'Ein SIP-Konto für %{resource} wurde erstellt.' - successfuly_updated: 'Das SIP-Konto wurde aktualisiert.' - successfuly_destroyed: 'Das SIP-Konto wurde gelöscht.' + successfuly_created: 'Ein SIP-Account für %{resource} wurde erstellt.' + successfuly_updated: 'Das SIP-Account wurde aktualisiert.' + successfuly_destroyed: 'Das SIP-Account wurde gelöscht.' index: - page_title: 'SIP-Konten' + page_title: 'SIP-Accounts' auth_name: 'Auth Name' caller_name: 'Caller Name' password: 'Passwort' @@ -17,17 +17,17 @@ de: clip: 'Rufnummernanzeige (CLIP)' hotdeskable: 'Hot-Desk fähig' clip_no_screening: 'Spezifische Rufnummernanzeige (CLIP -no screening-)' - callforward_rules_act_per_sip_account: 'Rufweiterleitungen gelten für das gesamte SIP-Konto' + callforward_rules_act_per_sip_account: 'Rufweiterleitungen gelten für das gesamte SIP-Account' online: 'Online' actions: - confirm_destroy: 'Sind Sie sicher, dass Sie diesen SIP-Konto löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen SIP-Account löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' create: 'Neu anlegen' - create_for: 'Neues SIP-Konto für %{resource} anlegen' + create_for: 'Neues SIP-Account für %{resource} anlegen' show: - page_title: 'SIP-Konto anzeigen' + page_title: 'SIP-Account anzeigen' auth_name: 'Auth Name' caller_name: 'Caller Name' password: 'Passwort' @@ -37,18 +37,18 @@ de: clip: 'Rufnummernanzeige (CLIP)' hotdeskable: 'Hot-Desk fähig' clip_no_screening: 'Spezifische Rufnummernanzeige (CLIP -no screening-)' - callforward_rules_act_per_sip_account: 'Rufweiterleitungen gelten für das gesamte SIP-Konto' + callforward_rules_act_per_sip_account: 'Rufweiterleitungen gelten für das gesamte SIP-Account' registration: 'Registrierung' expires: 'Läuft ab' actions: - confirm_destroy: 'Sind Sie sicher, dass Sie diesen SIP-Konto löschen möchten?' + confirm_destroy: 'Sind Sie sicher, dass Sie diesen SIP-Account löschen möchten?' destroy: 'Löschen' edit: 'Bearbeiten' - view_all: 'Alle SIP-Konten anzeigen' + view_all: 'Alle SIP-Accounts anzeigen' new: - page_title: 'Neues SIP-Konto' + page_title: 'Neues SIP-Account' edit: - page_title: 'SIP-Konto bearbeiten' + page_title: 'SIP-Account bearbeiten' form: auth_name: label: 'Auth Name' @@ -78,6 +78,6 @@ de: label: 'Hot-Desk fähig' hint: '' callforward_rules_act_per_sip_account: - label: 'Rufweiterleitungen gelten für das gesamte SIP-Konto' + label: 'Rufweiterleitungen gelten für das gesamte SIP-Account' hint: '' button: 'Absenden' \ No newline at end of file -- cgit v1.2.3 From d22a57f659fdb0f2c9ecf751d1e41a81430b289e Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 12:52:37 +0100 Subject: Bugfixed a wrong key in I18n files. --- config/locales/views/access_authorizations/de.yml | 2 +- config/locales/views/access_authorizations/en.yml | 2 +- config/locales/views/acd_agents/de.yml | 2 +- config/locales/views/acd_agents/en.yml | 2 +- config/locales/views/acd_callers/de.yml | 2 +- config/locales/views/acd_callers/en.yml | 2 +- config/locales/views/addresses/de.yml | 2 +- config/locales/views/addresses/en.yml | 2 +- config/locales/views/automatic_call_distributors/de.yml | 2 +- config/locales/views/automatic_call_distributors/en.yml | 2 +- config/locales/views/call_forwards/de.yml | 2 +- config/locales/views/call_forwards/en.yml | 2 +- config/locales/views/call_histories/de.yml | 2 +- config/locales/views/call_histories/en.yml | 2 +- config/locales/views/call_routes/de.yml | 2 +- config/locales/views/call_routes/en.yml | 2 +- config/locales/views/callthroughs/de.yml | 2 +- config/locales/views/callthroughs/en.yml | 2 +- config/locales/views/conference_invitees/de.yml | 2 +- config/locales/views/conference_invitees/en.yml | 2 +- config/locales/views/conferences/de.yml | 2 +- config/locales/views/conferences/en.yml | 2 +- config/locales/views/fax_accounts/de.yml | 2 +- config/locales/views/fax_accounts/en.yml | 2 +- config/locales/views/fax_documents/de.yml | 2 +- config/locales/views/fax_documents/en.yml | 2 +- config/locales/views/gateway_parameters/de.yml | 2 +- config/locales/views/gateway_parameters/en.yml | 2 +- config/locales/views/gateway_settings/de.yml | 2 +- config/locales/views/gateway_settings/en.yml | 2 +- config/locales/views/gateways/de.yml | 2 +- config/locales/views/gateways/en.yml | 2 +- config/locales/views/gemeinschaft_setups/en.yml | 2 +- config/locales/views/gs_cluster_sync_log_entries/de.yml | 2 +- config/locales/views/gs_cluster_sync_log_entries/en.yml | 2 +- config/locales/views/gs_nodes/de.yml | 2 +- config/locales/views/gs_nodes/en.yml | 2 +- config/locales/views/gs_parameters/de.yml | 2 +- config/locales/views/gs_parameters/en.yml | 2 +- config/locales/views/gui_functions/de.yml | 2 +- config/locales/views/gui_functions/en.yml | 2 +- config/locales/views/hunt_group_members/de.yml | 2 +- config/locales/views/hunt_group_members/en.yml | 2 +- config/locales/views/hunt_groups/de.yml | 2 +- config/locales/views/hunt_groups/en.yml | 2 +- config/locales/views/manufacturers/de.yml | 2 +- config/locales/views/manufacturers/en.yml | 2 +- config/locales/views/phone_book_entries/de.yml | 2 +- config/locales/views/phone_book_entries/en.yml | 2 +- config/locales/views/phone_books/de.yml | 2 +- config/locales/views/phone_books/en.yml | 2 +- config/locales/views/phone_models/de.yml | 2 +- config/locales/views/phone_models/en.yml | 2 +- config/locales/views/phone_number_ranges/de.yml | 2 +- config/locales/views/phone_number_ranges/en.yml | 2 +- config/locales/views/phone_numbers/de.yml | 2 +- config/locales/views/phone_numbers/en.yml | 2 +- config/locales/views/phone_sip_accounts/de.yml | 2 +- config/locales/views/phone_sip_accounts/en.yml | 2 +- config/locales/views/phones/de.yml | 2 +- config/locales/views/phones/en.yml | 2 +- config/locales/views/ringtones/de.yml | 2 +- config/locales/views/ringtones/en.yml | 2 +- config/locales/views/route_elements/de.yml | 2 +- config/locales/views/route_elements/en.yml | 2 +- config/locales/views/sip_accounts/de.yml | 2 +- config/locales/views/sip_accounts/en.yml | 2 +- config/locales/views/sip_domains/de.yml | 2 +- config/locales/views/sip_domains/en.yml | 2 +- config/locales/views/softkeys/de.yml | 2 +- config/locales/views/softkeys/en.yml | 2 +- config/locales/views/system_messages/de.yml | 2 +- config/locales/views/system_messages/en.yml | 2 +- config/locales/views/tenants/de.yml | 2 +- config/locales/views/tenants/en.yml | 2 +- config/locales/views/user_group_memberships/de.yml | 2 +- config/locales/views/user_group_memberships/en.yml | 2 +- config/locales/views/user_groups/de.yml | 2 +- config/locales/views/user_groups/en.yml | 2 +- config/locales/views/users/de.yml | 2 +- config/locales/views/users/en.yml | 2 +- config/locales/views/voicemail_settings/de.yml | 2 +- config/locales/views/voicemail_settings/en.yml | 2 +- config/locales/views/whitelists/de.yml | 2 +- config/locales/views/whitelists/en.yml | 2 +- lib/generators/nifty/scaffold/templates/locale.yml | 2 +- lib/generators/nifty/scaffold/templates/locale_de.yml | 2 +- 87 files changed, 87 insertions(+), 87 deletions(-) diff --git a/config/locales/views/access_authorizations/de.yml b/config/locales/views/access_authorizations/de.yml index 3df5774..06be591 100644 --- a/config/locales/views/access_authorizations/de.yml +++ b/config/locales/views/access_authorizations/de.yml @@ -42,4 +42,4 @@ de: pin: label: 'PIN' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/access_authorizations/en.yml b/config/locales/views/access_authorizations/en.yml index 712bf01..562ab05 100644 --- a/config/locales/views/access_authorizations/en.yml +++ b/config/locales/views/access_authorizations/en.yml @@ -45,4 +45,4 @@ en: pin: label: 'PIN' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/acd_agents/de.yml b/config/locales/views/acd_agents/de.yml index b625d09..e79c81b 100644 --- a/config/locales/views/acd_agents/de.yml +++ b/config/locales/views/acd_agents/de.yml @@ -73,4 +73,4 @@ de: destination_id: label: 'Ziel ID' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/acd_agents/en.yml b/config/locales/views/acd_agents/en.yml index a048214..546e5c5 100644 --- a/config/locales/views/acd_agents/en.yml +++ b/config/locales/views/acd_agents/en.yml @@ -73,4 +73,4 @@ en: destination_id: label: 'Destination' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/acd_callers/de.yml b/config/locales/views/acd_callers/de.yml index 2fa78f7..1ef5040 100644 --- a/config/locales/views/acd_callers/de.yml +++ b/config/locales/views/acd_callers/de.yml @@ -67,4 +67,4 @@ de: callback_attempts: label: 'Vermittllungsversuche' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/acd_callers/en.yml b/config/locales/views/acd_callers/en.yml index 18a46e9..241fed0 100644 --- a/config/locales/views/acd_callers/en.yml +++ b/config/locales/views/acd_callers/en.yml @@ -67,4 +67,4 @@ en: callback_attempts: label: 'Callback attempts' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/addresses/de.yml b/config/locales/views/addresses/de.yml index 7a20557..29dac3c 100644 --- a/config/locales/views/addresses/de.yml +++ b/config/locales/views/addresses/de.yml @@ -69,4 +69,4 @@ de: position: label: 'Position' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/addresses/en.yml b/config/locales/views/addresses/en.yml index 66ffc23..21286b3 100644 --- a/config/locales/views/addresses/en.yml +++ b/config/locales/views/addresses/en.yml @@ -69,4 +69,4 @@ en: position: label: 'Position' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/automatic_call_distributors/de.yml b/config/locales/views/automatic_call_distributors/de.yml index 52497f9..fa4c549 100644 --- a/config/locales/views/automatic_call_distributors/de.yml +++ b/config/locales/views/automatic_call_distributors/de.yml @@ -110,7 +110,7 @@ de: music: label: 'Musik' hint: '' - button: 'Absenden' + submit: 'Absenden' strategies: round_robin: 'Ringverteilung' ring_all: 'Alle' diff --git a/config/locales/views/automatic_call_distributors/en.yml b/config/locales/views/automatic_call_distributors/en.yml index 2c7fb9c..5006a77 100644 --- a/config/locales/views/automatic_call_distributors/en.yml +++ b/config/locales/views/automatic_call_distributors/en.yml @@ -114,7 +114,7 @@ en: music: label: 'Music' hint: '' - button: 'Submit' + submit: 'Submit' strategies: round_robin: 'Round robin' ring_all: 'Ring all' diff --git a/config/locales/views/call_forwards/de.yml b/config/locales/views/call_forwards/de.yml index 2d3940e..3930938 100644 --- a/config/locales/views/call_forwards/de.yml +++ b/config/locales/views/call_forwards/de.yml @@ -74,4 +74,4 @@ de: active: label: 'Aktiv' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/call_forwards/en.yml b/config/locales/views/call_forwards/en.yml index 4c2cf3c..20fb834 100644 --- a/config/locales/views/call_forwards/en.yml +++ b/config/locales/views/call_forwards/en.yml @@ -74,4 +74,4 @@ en: active: label: 'Active' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/call_histories/de.yml b/config/locales/views/call_histories/de.yml index 3b05415..807fa3e 100644 --- a/config/locales/views/call_histories/de.yml +++ b/config/locales/views/call_histories/de.yml @@ -56,7 +56,7 @@ de: description: label: 'Beschreibung' hint: '' - button: 'Absenden' + submit: 'Absenden' call_results: UNSPECIFIED: '' ORIGINATOR_CANCEL: 'Abgebrochen' diff --git a/config/locales/views/call_histories/en.yml b/config/locales/views/call_histories/en.yml index 2ae62e1..aec50ec 100644 --- a/config/locales/views/call_histories/en.yml +++ b/config/locales/views/call_histories/en.yml @@ -56,7 +56,7 @@ en: description: label: 'Description' hint: '' - button: 'Submit' + submit: 'Submit' call_results: UNSPECIFIED: '' ORIGINATOR_CANCEL: 'Cancelled' diff --git a/config/locales/views/call_routes/de.yml b/config/locales/views/call_routes/de.yml index 47fdc54..260b869 100644 --- a/config/locales/views/call_routes/de.yml +++ b/config/locales/views/call_routes/de.yml @@ -57,4 +57,4 @@ de: position: label: 'Position' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/call_routes/en.yml b/config/locales/views/call_routes/en.yml index a637a08..25e4c51 100644 --- a/config/locales/views/call_routes/en.yml +++ b/config/locales/views/call_routes/en.yml @@ -57,4 +57,4 @@ en: position: label: 'Position' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/callthroughs/de.yml b/config/locales/views/callthroughs/de.yml index 634767a..dea612e 100644 --- a/config/locales/views/callthroughs/de.yml +++ b/config/locales/views/callthroughs/de.yml @@ -55,4 +55,4 @@ de: sip_account_id: label: 'SIP-Konto ID' hint: 'Die SIP-Konto ID finden Sie in der URL des entsprechenden SIP-Kontos.' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/callthroughs/en.yml b/config/locales/views/callthroughs/en.yml index 6720fdf..a9b4147 100644 --- a/config/locales/views/callthroughs/en.yml +++ b/config/locales/views/callthroughs/en.yml @@ -55,4 +55,4 @@ en: sip_account_id: label: 'SIP account ID' hint: 'Please look up the SIP account ID in the URL of the SIP account.' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/conference_invitees/de.yml b/config/locales/views/conference_invitees/de.yml index c5c6460..6a26c24 100644 --- a/config/locales/views/conference_invitees/de.yml +++ b/config/locales/views/conference_invitees/de.yml @@ -52,4 +52,4 @@ de: moderator: label: 'Moderator' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/conference_invitees/en.yml b/config/locales/views/conference_invitees/en.yml index c321e02..80077c5 100644 --- a/config/locales/views/conference_invitees/en.yml +++ b/config/locales/views/conference_invitees/en.yml @@ -51,4 +51,4 @@ en: moderator: label: 'Moderator' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/conferences/de.yml b/config/locales/views/conferences/de.yml index 2e0aaf1..ba0869c 100644 --- a/config/locales/views/conferences/de.yml +++ b/config/locales/views/conferences/de.yml @@ -78,4 +78,4 @@ de: announce_left_member_by_name: label: 'Die Konferenz verlassende Teilnehmer werden angekündigt' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/conferences/en.yml b/config/locales/views/conferences/en.yml index ac42fd6..e11e9cb 100644 --- a/config/locales/views/conferences/en.yml +++ b/config/locales/views/conferences/en.yml @@ -78,4 +78,4 @@ en: announce_left_member_by_name: label: 'Announce the leaving of a member' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/fax_accounts/de.yml b/config/locales/views/fax_accounts/de.yml index 4e96501..cc93a24 100644 --- a/config/locales/views/fax_accounts/de.yml +++ b/config/locales/views/fax_accounts/de.yml @@ -57,4 +57,4 @@ de: retries: label: 'Max. Anzahl von Sendeversuchen' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/fax_accounts/en.yml b/config/locales/views/fax_accounts/en.yml index a83aa3d..7350c63 100644 --- a/config/locales/views/fax_accounts/en.yml +++ b/config/locales/views/fax_accounts/en.yml @@ -57,4 +57,4 @@ en: retries: label: 'Retries' hint: 'Number of times the system retries to send the fax in case the destination is busy.' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/fax_documents/de.yml b/config/locales/views/fax_documents/de.yml index df766bf..6bfa86b 100644 --- a/config/locales/views/fax_documents/de.yml +++ b/config/locales/views/fax_documents/de.yml @@ -144,5 +144,5 @@ de: destination_phone_number: label: 'Ziel Fax-Nummer' hint: '' - button: 'Absenden' + submit: 'Absenden' diff --git a/config/locales/views/fax_documents/en.yml b/config/locales/views/fax_documents/en.yml index abc9178..ff5f8f8 100644 --- a/config/locales/views/fax_documents/en.yml +++ b/config/locales/views/fax_documents/en.yml @@ -144,5 +144,5 @@ en: destination_phone_number: label: 'Destination phone number' hint: '' - button: 'Submit' + submit: 'Submit' diff --git a/config/locales/views/gateway_parameters/de.yml b/config/locales/views/gateway_parameters/de.yml index 8bbd923..944c1fb 100644 --- a/config/locales/views/gateway_parameters/de.yml +++ b/config/locales/views/gateway_parameters/de.yml @@ -57,4 +57,4 @@ de: description: label: 'Description' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/gateway_parameters/en.yml b/config/locales/views/gateway_parameters/en.yml index 83c5d50..d784c12 100644 --- a/config/locales/views/gateway_parameters/en.yml +++ b/config/locales/views/gateway_parameters/en.yml @@ -57,4 +57,4 @@ en: description: label: 'Description' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/gateway_settings/de.yml b/config/locales/views/gateway_settings/de.yml index ab4c291..b159bf2 100644 --- a/config/locales/views/gateway_settings/de.yml +++ b/config/locales/views/gateway_settings/de.yml @@ -57,4 +57,4 @@ de: description: label: 'Beschreibung' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/gateway_settings/en.yml b/config/locales/views/gateway_settings/en.yml index fc69c76..e506133 100644 --- a/config/locales/views/gateway_settings/en.yml +++ b/config/locales/views/gateway_settings/en.yml @@ -57,4 +57,4 @@ en: description: label: 'Description' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/gateways/de.yml b/config/locales/views/gateways/de.yml index 6144dd4..5365685 100644 --- a/config/locales/views/gateways/de.yml +++ b/config/locales/views/gateways/de.yml @@ -58,4 +58,4 @@ de: description: label: 'Description' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/gateways/en.yml b/config/locales/views/gateways/en.yml index 07272bc..db2357f 100644 --- a/config/locales/views/gateways/en.yml +++ b/config/locales/views/gateways/en.yml @@ -58,4 +58,4 @@ en: description: label: 'Description' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/gemeinschaft_setups/en.yml b/config/locales/views/gemeinschaft_setups/en.yml index 7af160c..9d5f965 100644 --- a/config/locales/views/gemeinschaft_setups/en.yml +++ b/config/locales/views/gemeinschaft_setups/en.yml @@ -34,4 +34,4 @@ en: default_system_email: label: 'System e-mail address' hint: 'From field for voicemail or fax e-mails.' - button: 'Create this PBX' \ No newline at end of file + submit: 'Create this PBX' \ No newline at end of file diff --git a/config/locales/views/gs_cluster_sync_log_entries/de.yml b/config/locales/views/gs_cluster_sync_log_entries/de.yml index 120e8dd..ed5f370 100644 --- a/config/locales/views/gs_cluster_sync_log_entries/de.yml +++ b/config/locales/views/gs_cluster_sync_log_entries/de.yml @@ -57,4 +57,4 @@ de: status: label: 'Status' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/gs_cluster_sync_log_entries/en.yml b/config/locales/views/gs_cluster_sync_log_entries/en.yml index add0c98..6a07984 100644 --- a/config/locales/views/gs_cluster_sync_log_entries/en.yml +++ b/config/locales/views/gs_cluster_sync_log_entries/en.yml @@ -57,4 +57,4 @@ en: status: label: 'Status' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/gs_nodes/de.yml b/config/locales/views/gs_nodes/de.yml index 07538dc..5525119 100644 --- a/config/locales/views/gs_nodes/de.yml +++ b/config/locales/views/gs_nodes/de.yml @@ -62,4 +62,4 @@ de: accepts_updates_from: label: 'Änderungen empfangen' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/gs_nodes/en.yml b/config/locales/views/gs_nodes/en.yml index bfb47be..75c06eb 100644 --- a/config/locales/views/gs_nodes/en.yml +++ b/config/locales/views/gs_nodes/en.yml @@ -62,4 +62,4 @@ en: accepts_updates_from: label: 'Accepts updates from this node?' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/gs_parameters/de.yml b/config/locales/views/gs_parameters/de.yml index 92d1833..16a8c77 100644 --- a/config/locales/views/gs_parameters/de.yml +++ b/config/locales/views/gs_parameters/de.yml @@ -60,4 +60,4 @@ de: description: label: 'Beschreibung' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/gs_parameters/en.yml b/config/locales/views/gs_parameters/en.yml index 9745b11..5539766 100644 --- a/config/locales/views/gs_parameters/en.yml +++ b/config/locales/views/gs_parameters/en.yml @@ -61,4 +61,4 @@ en: description: label: 'Description' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/gui_functions/de.yml b/config/locales/views/gui_functions/de.yml index 2ada30f..daba3e9 100644 --- a/config/locales/views/gui_functions/de.yml +++ b/config/locales/views/gui_functions/de.yml @@ -47,4 +47,4 @@ de: description: label: 'Beschreibung' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/gui_functions/en.yml b/config/locales/views/gui_functions/en.yml index 66bdff3..b303e81 100644 --- a/config/locales/views/gui_functions/en.yml +++ b/config/locales/views/gui_functions/en.yml @@ -47,4 +47,4 @@ de: description: label: 'Description' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/hunt_group_members/de.yml b/config/locales/views/hunt_group_members/de.yml index b399bde..2667e99 100644 --- a/config/locales/views/hunt_group_members/de.yml +++ b/config/locales/views/hunt_group_members/de.yml @@ -45,4 +45,4 @@ de: phone_numbers: label: 'Telefonnummern' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/hunt_group_members/en.yml b/config/locales/views/hunt_group_members/en.yml index 6c7f654..b9b2faf 100644 --- a/config/locales/views/hunt_group_members/en.yml +++ b/config/locales/views/hunt_group_members/en.yml @@ -45,4 +45,4 @@ en: phone_numbers: label: 'Phone numbers' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/hunt_groups/de.yml b/config/locales/views/hunt_groups/de.yml index cac1cbe..2263f91 100644 --- a/config/locales/views/hunt_groups/de.yml +++ b/config/locales/views/hunt_groups/de.yml @@ -54,4 +54,4 @@ de: hunt_group_members: label: 'Rufgruppen-Teilnehmer' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/hunt_groups/en.yml b/config/locales/views/hunt_groups/en.yml index d0cc4cd..cf88374 100644 --- a/config/locales/views/hunt_groups/en.yml +++ b/config/locales/views/hunt_groups/en.yml @@ -54,4 +54,4 @@ en: hunt_group_members: label: 'Members of this hunt group' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/manufacturers/de.yml b/config/locales/views/manufacturers/de.yml index 9530fae..2608743 100644 --- a/config/locales/views/manufacturers/de.yml +++ b/config/locales/views/manufacturers/de.yml @@ -46,4 +46,4 @@ de: state: label: 'Status' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/manufacturers/en.yml b/config/locales/views/manufacturers/en.yml index a66f964..dccdf1b 100644 --- a/config/locales/views/manufacturers/en.yml +++ b/config/locales/views/manufacturers/en.yml @@ -46,4 +46,4 @@ en: state: label: 'State' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/phone_book_entries/de.yml b/config/locales/views/phone_book_entries/de.yml index 21f635e..2c77aa5 100644 --- a/config/locales/views/phone_book_entries/de.yml +++ b/config/locales/views/phone_book_entries/de.yml @@ -158,4 +158,4 @@ de: image: label: 'Avatar Foto' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/phone_book_entries/en.yml b/config/locales/views/phone_book_entries/en.yml index b41694e..abfbbb2 100644 --- a/config/locales/views/phone_book_entries/en.yml +++ b/config/locales/views/phone_book_entries/en.yml @@ -158,4 +158,4 @@ en: image: label: 'Photo' hint: 'Avatar photo' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/phone_books/de.yml b/config/locales/views/phone_books/de.yml index 6cc17f3..fa93945 100644 --- a/config/locales/views/phone_books/de.yml +++ b/config/locales/views/phone_books/de.yml @@ -43,4 +43,4 @@ de: description: label: 'Beschreibung' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/phone_books/en.yml b/config/locales/views/phone_books/en.yml index 39052d5..1c89feb 100644 --- a/config/locales/views/phone_books/en.yml +++ b/config/locales/views/phone_books/en.yml @@ -43,4 +43,4 @@ en: description: label: 'Description' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/phone_models/de.yml b/config/locales/views/phone_models/de.yml index 3c82402..ec45c4c 100644 --- a/config/locales/views/phone_models/de.yml +++ b/config/locales/views/phone_models/de.yml @@ -47,4 +47,4 @@ de: product_homepage_url: label: 'Produkt-Homepage URL' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/phone_models/en.yml b/config/locales/views/phone_models/en.yml index adbc9fd..2efe037 100644 --- a/config/locales/views/phone_models/en.yml +++ b/config/locales/views/phone_models/en.yml @@ -46,4 +46,4 @@ en: product_homepage_url: label: 'Product homepage URL' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/phone_number_ranges/de.yml b/config/locales/views/phone_number_ranges/de.yml index a589b32..75c4f49 100644 --- a/config/locales/views/phone_number_ranges/de.yml +++ b/config/locales/views/phone_number_ranges/de.yml @@ -48,4 +48,4 @@ de: description: label: 'Beschreibung' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/phone_number_ranges/en.yml b/config/locales/views/phone_number_ranges/en.yml index 2474527..c422a2e 100644 --- a/config/locales/views/phone_number_ranges/en.yml +++ b/config/locales/views/phone_number_ranges/en.yml @@ -48,4 +48,4 @@ en: description: label: 'Description' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/phone_numbers/de.yml b/config/locales/views/phone_numbers/de.yml index e6fc703..19fae04 100644 --- a/config/locales/views/phone_numbers/de.yml +++ b/config/locales/views/phone_numbers/de.yml @@ -62,4 +62,4 @@ de: extension: label: 'Durchwahl' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/phone_numbers/en.yml b/config/locales/views/phone_numbers/en.yml index 07fb2fb..1e70c1f 100644 --- a/config/locales/views/phone_numbers/en.yml +++ b/config/locales/views/phone_numbers/en.yml @@ -62,4 +62,4 @@ en: extension: label: 'Extension' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/phone_sip_accounts/de.yml b/config/locales/views/phone_sip_accounts/de.yml index 7a6736a..052e1b9 100644 --- a/config/locales/views/phone_sip_accounts/de.yml +++ b/config/locales/views/phone_sip_accounts/de.yml @@ -34,4 +34,4 @@ de: sip_account_id: label: 'SIP-Konto' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/phone_sip_accounts/en.yml b/config/locales/views/phone_sip_accounts/en.yml index 3604758..d6e6bea 100644 --- a/config/locales/views/phone_sip_accounts/en.yml +++ b/config/locales/views/phone_sip_accounts/en.yml @@ -34,4 +34,4 @@ en: sip_account_id: label: 'SIP account' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/phones/de.yml b/config/locales/views/phones/de.yml index 59313b1..af2804a 100644 --- a/config/locales/views/phones/de.yml +++ b/config/locales/views/phones/de.yml @@ -77,7 +77,7 @@ de: fallback_sip_account_id: label: 'Fallback SIP Account' hint: '' - button: 'Absenden' + submit: 'Absenden' sip_accounts: title: 'Verknüpfte SIP-Accounts' connect_to_sip_account: 'SIP-Account mit dem Telefon verknüpfen' diff --git a/config/locales/views/phones/en.yml b/config/locales/views/phones/en.yml index 9574443..306537f 100644 --- a/config/locales/views/phones/en.yml +++ b/config/locales/views/phones/en.yml @@ -77,7 +77,7 @@ en: fallback_sip_account_id: label: 'Fallback SIP Account' hint: '' - button: 'Submit' + submit: 'Submit' sip_accounts: title: 'Listing of connected SIP accounts' connect_to_sip_account: 'Connect to an existing SIP account' diff --git a/config/locales/views/ringtones/de.yml b/config/locales/views/ringtones/de.yml index d2429a9..470994f 100644 --- a/config/locales/views/ringtones/de.yml +++ b/config/locales/views/ringtones/de.yml @@ -35,5 +35,5 @@ de: bellcore_id: label: 'Bellcore-ID' hint: 'Im Telefon eingebaute Klingeltöne. "0" bedeutet lautlos.' - button: 'Absenden' + submit: 'Absenden' set_a_ringtone: 'Klingelton einstellen' \ No newline at end of file diff --git a/config/locales/views/ringtones/en.yml b/config/locales/views/ringtones/en.yml index c9ee727..1b0b36a 100644 --- a/config/locales/views/ringtones/en.yml +++ b/config/locales/views/ringtones/en.yml @@ -35,5 +35,5 @@ en: bellcore_id: label: 'Bellcore ID' hint: 'Build in ringtone ID. A "0" means silence.' - button: 'Submit' + submit: 'Submit' set_a_ringtone: 'Set a ringtone' \ No newline at end of file diff --git a/config/locales/views/route_elements/de.yml b/config/locales/views/route_elements/de.yml index 683bee8..fe14671 100644 --- a/config/locales/views/route_elements/de.yml +++ b/config/locales/views/route_elements/de.yml @@ -72,4 +72,4 @@ de: position: label: 'Position' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/route_elements/en.yml b/config/locales/views/route_elements/en.yml index 35179cc..c24e03a 100644 --- a/config/locales/views/route_elements/en.yml +++ b/config/locales/views/route_elements/en.yml @@ -72,4 +72,4 @@ en: position: label: 'Position' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/sip_accounts/de.yml b/config/locales/views/sip_accounts/de.yml index e967c7d..7a99440 100644 --- a/config/locales/views/sip_accounts/de.yml +++ b/config/locales/views/sip_accounts/de.yml @@ -80,4 +80,4 @@ de: callforward_rules_act_per_sip_account: label: 'Rufweiterleitungen gelten für das gesamte SIP-Account' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/sip_accounts/en.yml b/config/locales/views/sip_accounts/en.yml index b02c60a..99d14b5 100644 --- a/config/locales/views/sip_accounts/en.yml +++ b/config/locales/views/sip_accounts/en.yml @@ -80,4 +80,4 @@ en: hotdeskable: label: 'Hotdeskable' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/sip_domains/de.yml b/config/locales/views/sip_domains/de.yml index 7c3bfb6..a93529d 100644 --- a/config/locales/views/sip_domains/de.yml +++ b/config/locales/views/sip_domains/de.yml @@ -35,4 +35,4 @@ de: realm: label: 'Realm' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/sip_domains/en.yml b/config/locales/views/sip_domains/en.yml index 30432e4..a053864 100644 --- a/config/locales/views/sip_domains/en.yml +++ b/config/locales/views/sip_domains/en.yml @@ -35,4 +35,4 @@ en: realm: label: 'Realm' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/softkeys/de.yml b/config/locales/views/softkeys/de.yml index 654da80..e8bbc9a 100644 --- a/config/locales/views/softkeys/de.yml +++ b/config/locales/views/softkeys/de.yml @@ -65,4 +65,4 @@ de: label: label: 'Beschriftung' hint: 'Je nach Telefonmodell gibt es die Möglichkeit eine Beschriftung bzw. eine Beschreibung auf dem Telefon anzuzeigen.' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/softkeys/en.yml b/config/locales/views/softkeys/en.yml index d78c685..8d8a3f3 100644 --- a/config/locales/views/softkeys/en.yml +++ b/config/locales/views/softkeys/en.yml @@ -61,4 +61,4 @@ en: label: label: 'Label' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/system_messages/de.yml b/config/locales/views/system_messages/de.yml index 571c326..d841d0b 100644 --- a/config/locales/views/system_messages/de.yml +++ b/config/locales/views/system_messages/de.yml @@ -35,4 +35,4 @@ de: content: label: 'Nachricht' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/system_messages/en.yml b/config/locales/views/system_messages/en.yml index 4ce8317..a039b10 100644 --- a/config/locales/views/system_messages/en.yml +++ b/config/locales/views/system_messages/en.yml @@ -35,4 +35,4 @@ en: content: label: 'Content' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/tenants/de.yml b/config/locales/views/tenants/de.yml index 6036879..fa57c6a 100644 --- a/config/locales/views/tenants/de.yml +++ b/config/locales/views/tenants/de.yml @@ -68,6 +68,6 @@ de: did_list: label: 'Externe Rufnummern' hint: 'Hier können Sie die Rufnummern eintragen, mit denen Sie vom Festnetz aus erreichbar sind. Sollten Sie nur eine Nummer haben, dann bitte diese eintragen. Sie können das x als Wildcard für die oben angegebenen Durchwahlen benutzen. Beispiele: "0228-12345x, 0228-123450" (ein typisches Beispiel für einen Anlagenanschluss mit 2-stelligen Durchwahlen), "0228-123456", "0228-123456,0228-123999"' - button: 'Absenden' + submit: 'Absenden' switch_to_tenant: "Mandant wechseln" diff --git a/config/locales/views/tenants/en.yml b/config/locales/views/tenants/en.yml index edccda0..9975fce 100644 --- a/config/locales/views/tenants/en.yml +++ b/config/locales/views/tenants/en.yml @@ -68,6 +68,6 @@ en: did_list: label: 'External numbers' hint: 'These are the phone numbers which can be called from the outside (seperated by commas). The x represents all internal extensions (can be added to a trunk number). You can mix MSNs and DIDs. Examples: "0228-12345x, 0228-123450" (this would be the solution for most companies), "0228-123456", "0228-123456,0228-123999"' - button: 'Submit' + submit: 'Submit' switch_to_tenant: "Switch to tenant" diff --git a/config/locales/views/user_group_memberships/de.yml b/config/locales/views/user_group_memberships/de.yml index 9df4cad..a044e18 100644 --- a/config/locales/views/user_group_memberships/de.yml +++ b/config/locales/views/user_group_memberships/de.yml @@ -32,4 +32,4 @@ de: name: user: 'Benutzer' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/user_group_memberships/en.yml b/config/locales/views/user_group_memberships/en.yml index 28049e0..4cce98d 100644 --- a/config/locales/views/user_group_memberships/en.yml +++ b/config/locales/views/user_group_memberships/en.yml @@ -32,4 +32,4 @@ en: name: user: 'User' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/user_groups/de.yml b/config/locales/views/user_groups/de.yml index 303fca0..ac0e1b6 100644 --- a/config/locales/views/user_groups/de.yml +++ b/config/locales/views/user_groups/de.yml @@ -39,4 +39,4 @@ de: description: label: 'Beschreibung' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/user_groups/en.yml b/config/locales/views/user_groups/en.yml index 1403a19..782b5eb 100644 --- a/config/locales/views/user_groups/en.yml +++ b/config/locales/views/user_groups/en.yml @@ -39,4 +39,4 @@ en: description: label: 'Description' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/users/de.yml b/config/locales/views/users/de.yml index 20fa4e0..40b64c1 100644 --- a/config/locales/views/users/de.yml +++ b/config/locales/views/users/de.yml @@ -92,4 +92,4 @@ de: send_voicemail_as_email_attachment: label: 'Sprachnachrichten per E-Mail verschicken' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/users/en.yml b/config/locales/views/users/en.yml index 121c925..29bae82 100644 --- a/config/locales/views/users/en.yml +++ b/config/locales/views/users/en.yml @@ -92,4 +92,4 @@ en: send_voicemail_as_email_attachment: label: 'Send voicemails as e-mail attachments' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/config/locales/views/voicemail_settings/de.yml b/config/locales/views/voicemail_settings/de.yml index 2271cae..52edd4b 100644 --- a/config/locales/views/voicemail_settings/de.yml +++ b/config/locales/views/voicemail_settings/de.yml @@ -49,4 +49,4 @@ de: purge: label: 'Löschen' hint: 'Nachricht löschen' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/voicemail_settings/en.yml b/config/locales/views/voicemail_settings/en.yml index 22be392..5995544 100644 --- a/config/locales/views/voicemail_settings/en.yml +++ b/config/locales/views/voicemail_settings/en.yml @@ -49,4 +49,4 @@ en: purge: label: 'Delete' hint: 'Delete message after notification is sent' - button: 'Submit' + submit: 'Submit' diff --git a/config/locales/views/whitelists/de.yml b/config/locales/views/whitelists/de.yml index 8b1b67f..8060f63 100644 --- a/config/locales/views/whitelists/de.yml +++ b/config/locales/views/whitelists/de.yml @@ -35,4 +35,4 @@ de: phone_numbers: label: 'Telefonnummern' hint: '' - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file diff --git a/config/locales/views/whitelists/en.yml b/config/locales/views/whitelists/en.yml index 2a91e54..475d560 100644 --- a/config/locales/views/whitelists/en.yml +++ b/config/locales/views/whitelists/en.yml @@ -35,4 +35,4 @@ en: phone_numbers: label: 'Phone numbers' hint: '' - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/lib/generators/nifty/scaffold/templates/locale.yml b/lib/generators/nifty/scaffold/templates/locale.yml index 0286f1f..4cae1c4 100644 --- a/lib/generators/nifty/scaffold/templates/locale.yml +++ b/lib/generators/nifty/scaffold/templates/locale.yml @@ -43,4 +43,4 @@ en: label: '<%= attribute.human_name %>' hint: '' <%- end -%> - button: 'Submit' \ No newline at end of file + submit: 'Submit' \ No newline at end of file diff --git a/lib/generators/nifty/scaffold/templates/locale_de.yml b/lib/generators/nifty/scaffold/templates/locale_de.yml index 2936eca..e170812 100644 --- a/lib/generators/nifty/scaffold/templates/locale_de.yml +++ b/lib/generators/nifty/scaffold/templates/locale_de.yml @@ -43,4 +43,4 @@ de: label: '<%= attribute.human_name %>' hint: '' <%- end -%> - button: 'Absenden' \ No newline at end of file + submit: 'Absenden' \ No newline at end of file -- cgit v1.2.3 From 5c9968de4770ef2383ce62a3f9e21054aa9e1db7 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:02:08 +0100 Subject: Better user experience for SipAccount#new. --- app/views/sip_accounts/_form_core.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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') -- cgit v1.2.3 From 62f88bf6281852255b91c9f4a9c4749c5ddd08ae Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:05:09 +0100 Subject: Wording --- config/locales/views/sip_accounts/de.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/views/sip_accounts/de.yml b/config/locales/views/sip_accounts/de.yml index 7a99440..e711137 100644 --- a/config/locales/views/sip_accounts/de.yml +++ b/config/locales/views/sip_accounts/de.yml @@ -3,8 +3,8 @@ de: name: 'SIP-Account' controller: successfuly_created: 'Ein SIP-Account für %{resource} wurde erstellt.' - successfuly_updated: 'Das SIP-Account wurde aktualisiert.' - successfuly_destroyed: 'Das SIP-Account wurde gelöscht.' + successfuly_updated: 'Der SIP-Account wurde aktualisiert.' + successfuly_destroyed: 'Der SIP-Account wurde gelöscht.' index: page_title: 'SIP-Accounts' auth_name: 'Auth Name' -- cgit v1.2.3 From 85c53f62d974906431f9a039ddb437ccd0dd1c5b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:15:53 +0100 Subject: Changed the default for buttons. --- config/initializers/simple_form.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb index ab84483..572d58f 100644 --- a/config/initializers/simple_form.rb +++ b/config/initializers/simple_form.rb @@ -95,7 +95,7 @@ SimpleForm.setup do |config| config.boolean_style = :nested # Default class for buttons - config.button_class = 'btn' + config.button_class = 'btn btn-primary' # Method used to tidy up errors. # config.error_method = :first -- cgit v1.2.3 From 517dbc54c595adca221249545d0e7c0815df3195 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:19:29 +0100 Subject: UI --- app/views/tenants/_admin_area.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index 92614c8..28a8273 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -11,11 +11,11 @@ = render :partial => 'tenants/table_of_hunt_groups', :locals => {:tenant => tenant} = render :partial => 'tenants/table_of_automatic_call_distributors', :locals => {:tenant => tenant} - = render :partial => 'tenants/table_of_phone_books', :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} -- cgit v1.2.3 From bcc26106d74a301df09e02d07572ffe90dfb429b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:23:24 +0100 Subject: Don't let the admin pull out the rug for his/her own account. --- app/models/ability.rb | 4 ++++ 1 file changed, 4 insertions(+) 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. # -- cgit v1.2.3 From b792c8eb19fba97a7dab5cd2be8e6bd74617e7d2 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:38:24 +0100 Subject: Housekeeping. --- app/views/shared/_header.de.html.haml | 41 ----------------------------------- app/views/shared/_header.html.haml | 41 ----------------------------------- 2 files changed, 82 deletions(-) delete mode 100644 app/views/shared/_header.de.html.haml delete mode 100644 app/views/shared/_header.html.haml 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 -- cgit v1.2.3 From ea3df5a7eb079982a8fcda3df572a0d1433b7f52 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 13:49:44 +0100 Subject: Better UI on mobile phones. --- app/views/gs_parameters/_index_core.html.haml | 12 +++++- app/views/gs_parameters/show.html.haml | 46 ++++++++++++++-------- ...23128_add_mobile_max_string_length_parameter.rb | 11 ++++++ db/schema.rb | 2 +- 4 files changed, 51 insertions(+), 20 deletions(-) create mode 100644 db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml index 9628feb..11d60db 100644 --- a/app/views/gs_parameters/_index_core.html.haml +++ b/app/views/gs_parameters/_index_core.html.haml @@ -10,8 +10,16 @@ - for gs_parameter in gs_parameters - cache(['gs_parameters_table_single_row', gs_parameter]) do %tr - %td= gs_parameter.name + %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= truncate(gs_parameter.value, :length => 50) + %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/show.html.haml b/app/views/gs_parameters/show.html.haml index 795d09c..d04949b 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{:class => '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/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb b/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb new file mode 100644 index 0000000..6bbac04 --- /dev/null +++ b/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb @@ -0,0 +1,11 @@ +class AddMobileMaxStringLengthParameter < ActiveRecord::Migration + def up + GsParameter.create(:name => 'MOBILE_MAX_STRING_LENGTH', :section => 'HTML', :value => '8', :class_type => 'Integer', :description => 'Max length of a string on a mobile devise.') + GsParameter.create(:name => 'DESKTOP_MAX_STRING_LENGTH', :section => 'HTML', :value => '30', :class_type => 'Integer', :description => 'Max length of a string on a desktop devise.') + end + + def down + GsParameter.where(:name => 'MOBILE_MAX_STRING_LENGTH').destroy_all + GsParameter.where(:name => 'DESKTOP_MAX_STRING_LENGTH').destroy_all + end +end diff --git a/db/schema.rb b/db/schema.rb index 17563b1..6365e6d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130124105613) do +ActiveRecord::Schema.define(:version => 20130124123128) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From e024c99b6ffeb725cf73ebf8b7b55957f36772f5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 14:09:31 +0100 Subject: A new user becomes a member of default UserGroups. --- app/models/user.rb | 10 ++++++++++ app/views/user_groups/_index_core.html.haml | 4 ---- config/locales/views/users/de.yml | 2 +- .../20130124125238_add_default_user_groups_for_new_users.rb | 9 +++++++++ db/schema.rb | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 db/migrate/20130124125238_add_default_user_groups_for_new_users.rb diff --git a/app/models/user.rb b/app/models/user.rb index b902b99..9e8cbc0 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 @@ -207,4 +209,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/user_groups/_index_core.html.haml b/app/views/user_groups/_index_core.html.haml index c481a18..aa1497e 100644 --- a/app/views/user_groups/_index_core.html.haml +++ b/app/views/user_groups/_index_core.html.haml @@ -29,9 +29,5 @@ - 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} =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user_group.tenant, :child => user_group} diff --git a/config/locales/views/users/de.yml b/config/locales/views/users/de.yml index 40b64c1..7cdaf68 100644 --- a/config/locales/views/users/de.yml +++ b/config/locales/views/users/de.yml @@ -24,7 +24,7 @@ de: destroy: 'Löschen' edit: 'Bearbeiten' show: 'Anzeigen' - create: 'Neue anlegen' + create: 'Neu anlegen' create_for: 'Neuen User für %{resource} anlegen' show: page_title: 'User anzeigen' diff --git a/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb b/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb new file mode 100644 index 0000000..d2700d6 --- /dev/null +++ b/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb @@ -0,0 +1,9 @@ +class AddDefaultUserGroupsForNewUsers < ActiveRecord::Migration + def up + GsParameter.create(:name => 'DEFAULT_USER_GROUPS_IDS', :section => 'New user defaults', :value => "---\n- 3\n", :class_type => 'YAML', :description => 'Default user group ids for a new user.') + end + + def down + GsParameter.where(:name => 'DEFAULT_USER_GROUPS_IDS').destroy_all + end +end diff --git a/db/schema.rb b/db/schema.rb index 6365e6d..8258394 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130124123128) do +ActiveRecord::Schema.define(:version => 20130124125238) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From 2d6ebf19e5cea45dd714f92a64b1b81e1200a811 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 14:45:43 +0100 Subject: Create a central docu page which gets a link in the navbar. --- app/controllers/gemeinschaft_setups_controller.rb | 2 +- app/controllers/page_controller.rb | 5 ++-- app/controllers/tenants_controller.rb | 4 +-- app/models/user.rb | 3 +++ app/views/layouts/_navbar.html.haml | 13 ++++++--- app/views/page/beginners_intro.de.html.haml | 33 ----------------------- app/views/page/beginners_intro.html.haml | 33 ----------------------- app/views/page/help.de.html.haml | 33 +++++++++++++++++++++++ app/views/page/help.html.haml | 33 +++++++++++++++++++++++ config/routes.rb | 3 +-- 10 files changed, 86 insertions(+), 76 deletions(-) delete mode 100644 app/views/page/beginners_intro.de.html.haml delete mode 100644 app/views/page/beginners_intro.html.haml create mode 100644 app/views/page/help.de.html.haml create mode 100644 app/views/page/help.html.haml diff --git a/app/controllers/gemeinschaft_setups_controller.rb b/app/controllers/gemeinschaft_setups_controller.rb index a860653..4f4a72a 100644 --- a/app/controllers/gemeinschaft_setups_controller.rb +++ b/app/controllers/gemeinschaft_setups_controller.rb @@ -94,7 +94,7 @@ class GemeinschaftSetupsController < ApplicationController session[:user_id] = user.id # Redirect to the user - redirect_to page_beginners_intro_path, :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/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/models/user.rb b/app/models/user.rb index 9e8cbc0..afb3f04 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -144,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 diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 7ef6523..c2d9946 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -9,9 +9,16 @@ %span.icon-bar %span.icon-bar - - if current_user && current_user.sip_accounts.any? - .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 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/beginners_intro.html.haml b/app/views/page/beginners_intro.html.haml deleted file mode 100644 index dadd99f..0000000 --- a/app/views/page/beginners_intro.html.haml +++ /dev/null @@ -1,33 +0,0 @@ -- content_for :title, "First steps with Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}!" - -%p - You have to create at least two new SIP accounts. You have the choice of two different versions: - -%ul - %li - %strong - Personalized SIP accounts - %br - They are linked to a user. In a normal Gemeinschaft installation the majority of accounts are personlized. - %br - =link_to "Create a SIP account for #{current_user}.", new_user_sip_account_path(current_user) - %li - %strong - Company SIP accounts - %br - These are for phones which are not linked to a specific person (e.g. phones in conference rooms). - %br - =link_to "Create a SIP account for #{current_user.current_tenant}.", new_tenant_sip_account_path(current_user.current_tenant) - -%h2 Phone numbers - -%p - You can use your SIP accounts to make internal calls. But before that you have to add phone numbers to each SIP account (e.g. 20 and 21). After you did that you can configure any SIP phone with the SIP account configuration and start using your new PBX. - -%h2 Phones - -%p - More comfortable is the use of auto provisioned phones. They can be linked to SIP accounts. After creating them in the WebGUI you have to set the Provisioning URL in the phone or setup your DHCP server to give them this data. You'll find help in our #{link_to 'Wiki', 'https://github.com/amooma/GS5/wiki'} or in our #{link_to 'mailinglist', 'https://groups.google.com/group/gs5-users/'}. -%p - In version #{GsParameter.get('GEMEINSCHAFT_VERSION')} the following phones can be used for provisioning: - = 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/help.de.html.haml b/app/views/page/help.de.html.haml new file mode 100644 index 0000000..5eef135 --- /dev/null +++ b/app/views/page/help.de.html.haml @@ -0,0 +1,33 @@ +- 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/help.html.haml b/app/views/page/help.html.haml new file mode 100644 index 0000000..dadd99f --- /dev/null +++ b/app/views/page/help.html.haml @@ -0,0 +1,33 @@ +- content_for :title, "First steps with Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}!" + +%p + You have to create at least two new SIP accounts. You have the choice of two different versions: + +%ul + %li + %strong + Personalized SIP accounts + %br + They are linked to a user. In a normal Gemeinschaft installation the majority of accounts are personlized. + %br + =link_to "Create a SIP account for #{current_user}.", new_user_sip_account_path(current_user) + %li + %strong + Company SIP accounts + %br + These are for phones which are not linked to a specific person (e.g. phones in conference rooms). + %br + =link_to "Create a SIP account for #{current_user.current_tenant}.", new_tenant_sip_account_path(current_user.current_tenant) + +%h2 Phone numbers + +%p + You can use your SIP accounts to make internal calls. But before that you have to add phone numbers to each SIP account (e.g. 20 and 21). After you did that you can configure any SIP phone with the SIP account configuration and start using your new PBX. + +%h2 Phones + +%p + More comfortable is the use of auto provisioned phones. They can be linked to SIP accounts. After creating them in the WebGUI you have to set the Provisioning URL in the phone or setup your DHCP server to give them this data. You'll find help in our #{link_to 'Wiki', 'https://github.com/amooma/GS5/wiki'} or in our #{link_to 'mailinglist', 'https://groups.google.com/group/gs5-users/'}. +%p + In version #{GsParameter.get('GEMEINSCHAFT_VERSION')} the following phones can be used for provisioning: + = nicely_joined_with_commata(PhoneModel.order(:name).map{|phone_model| "#{phone_model.to_s}"}) \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 22a36e5..9d47efc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -224,8 +224,7 @@ Gemeinschaft42c::Application.routes.draw do resources :sessions get "page/index" - get "page/conference" - get "page/beginners_intro" + get "page/help" root :to => "page#index" -- cgit v1.2.3 From 5f5ea1d06686ec5cd31cf8b9db177191fa7e66fd Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 24 Jan 2013 15:37:11 +0100 Subject: http_request added --- misc/freeswitch/scripts/http_request.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 misc/freeswitch/scripts/http_request.lua diff --git a/misc/freeswitch/scripts/http_request.lua b/misc/freeswitch/scripts/http_request.lua new file mode 100644 index 0000000..8acdcb6 --- /dev/null +++ b/misc/freeswitch/scripts/http_request.lua @@ -0,0 +1,31 @@ +-- Gemeinschaft 5 fire and forget http request script +-- (c) AMOOMA GmbH 2013 +-- + +http = require('socket.http'); +http.TIMEOUT = 10; +http.USERAGENT = 'Gemeinschaft 5'; + +local log_identifier = argv[1]; +local url = argv[2]; +local user = argv[3]; +local password = argv[4]; + +if not log_identifier or not url then + return; +end + +-- Set logger +require 'common.log'; +local log = common.log.Log:new(); +log.prefix = '#R# [' .. log_identifier .. '] '; + +local headers = {}; + +if user and password then + mime = require('mime'); + headers.Authorization = 'Basic ' .. (mime.b64(user .. ':' .. password)); +end + +local success, result, response_headers = http.request{url = url, headers = headers }; +log:debug('HTTP_REQUEST - url: ', url, ', auth: ', tostring(headers.Authorization ~= nil), ', result: ', result); -- cgit v1.2.3 From acb016e9262e950e610d485eecc0605440533e2a Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 24 Jan 2013 15:38:21 +0100 Subject: use http_request for phone resync --- misc/freeswitch/scripts/phones/snom.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/misc/freeswitch/scripts/phones/snom.lua b/misc/freeswitch/scripts/phones/snom.lua index 096ccb7..ef3ab93 100644 --- a/misc/freeswitch/scripts/phones/snom.lua +++ b/misc/freeswitch/scripts/phones/snom.lua @@ -53,11 +53,10 @@ function Snom.resync_http(self, ip_address, http_user, http_password, http_port) port_str = ':' .. http_port; end - get_command = 'wget --no-proxy -q -O /dev/null -o /dev/null -b --tries=2 --timeout=10 --user="' .. (http_user or '') .. '" --password="' .. (http_password or '') .. '"' .. - ' wget http://' .. tostring(ip_address):gsub('[^0-9%.]', '') .. port_str .. '/advanced.htm?reboot=Reboot' .. - ' 1>>/dev/null 2>>/dev/null &'; + local command = 'http_request.lua snom_resync http://' .. tostring(ip_address):gsub('[^0-9%.]', '') .. port_str .. '/advanced.htm?reboot=Reboot ' .. (http_user or '') .. ' ' .. (http_password or ''); - result = os.execute(get_command); + require 'common.fapi' + common.fapi.FApi:new():execute('luarun', command); if result and tonumber(result) == 0 then return true; -- cgit v1.2.3 From d8ad6ffe483156ea5474e7c1874ea618d44ba306 Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 24 Jan 2013 15:39:17 +0100 Subject: pass user/password to resync method --- misc/freeswitch/scripts/phones/phone.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/misc/freeswitch/scripts/phones/phone.lua b/misc/freeswitch/scripts/phones/phone.lua index 856398b..6da20f0 100644 --- a/misc/freeswitch/scripts/phones/phone.lua +++ b/misc/freeswitch/scripts/phones/phone.lua @@ -28,10 +28,10 @@ function Phone.list_by_sql(self, sql_query) if phone.record.ieee_name == 'snom technology ag' then require 'phones.snom' - phone.model = phones.snom.Snom:new(); + phone.model = phones.snom.Snom:new{ log = self.log }; elseif account_entry.ieee_name == 'siemens enterprise communicationsgmbh & co. kg' then require 'phones.siemens' - phone.model = phones.siemens.Siemens:new(); + phone.model = phones.siemens.Siemens:new{ log = self.log }; end table.insert(account_phones, phone); end) @@ -120,5 +120,8 @@ function Phone.resync(self, arg) end arg.ip_address = arg.ip_address or self.record.ip_address; + arg.http_user = arg.http_user or self.record.http_user; + arg.http_password = arg.http_password or self.record.http_password; + return self.model:resync(arg); -end \ No newline at end of file +end -- cgit v1.2.3 From 04eea0955c4a7b6d183fa7545b61c0732b8b41b8 Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 24 Jan 2013 15:59:49 +0100 Subject: unused variables --- misc/freeswitch/scripts/phones/snom.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/misc/freeswitch/scripts/phones/snom.lua b/misc/freeswitch/scripts/phones/snom.lua index ef3ab93..bb17796 100644 --- a/misc/freeswitch/scripts/phones/snom.lua +++ b/misc/freeswitch/scripts/phones/snom.lua @@ -56,9 +56,5 @@ function Snom.resync_http(self, ip_address, http_user, http_password, http_port) local command = 'http_request.lua snom_resync http://' .. tostring(ip_address):gsub('[^0-9%.]', '') .. port_str .. '/advanced.htm?reboot=Reboot ' .. (http_user or '') .. ' ' .. (http_password or ''); require 'common.fapi' - common.fapi.FApi:new():execute('luarun', command); - - if result and tonumber(result) == 0 then - return true; - end + return common.fapi.FApi:new():execute('luarun', command); end -- cgit v1.2.3 From 0f26298b241fc92f05972a9e47a0cec01245dd10 Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 24 Jan 2013 16:00:25 +0100 Subject: trigger voicemail notification --- misc/freeswitch/scripts/dialplan/voicemail.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/misc/freeswitch/scripts/dialplan/voicemail.lua b/misc/freeswitch/scripts/dialplan/voicemail.lua index 5d79ba3..4c96fbe 100644 --- a/misc/freeswitch/scripts/dialplan/voicemail.lua +++ b/misc/freeswitch/scripts/dialplan/voicemail.lua @@ -117,6 +117,7 @@ function Voicemail.leave(self, caller, phone_number) caller.uuid .. "'" ); caller:set_variable('voicemail_message_len', duration); + self:trigger_notification(caller); else caller:set_variable('voicemail_message_len'); end @@ -125,14 +126,11 @@ function Voicemail.leave(self, caller, phone_number) end -function Voicemail.send_notify(self, caller) - self.log:debug('VOICEMAIL_NOTIFY - account: ' .. self.record.auth_name .. ", id: " .. tostring(caller.uuid)); +function Voicemail.trigger_notification(self, caller) + local command = 'http_request.lua ' .. caller.uuid .. ' http://127.0.0.1/trigger/voicemail?sip_account_id=' .. tostring(self.id); - local file = io.popen("/opt/GS5/script/voicemail_new '" .. tostring(self.record.auth_name) .. "' '" .. tostring(caller.uuid) .. "' 2>&1"); - self.log:debug('VOICEMAIL_NOTIFY - result: ' .. tostring(file:read("*a"))); - file:close(); - - return true; + require 'common.fapi' + return common.fapi.FApi:new():execute('luarun', command); end -- cgit v1.2.3 From 1e0d9c3344b1726b2b95e67b59a7cde820374617 Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 24 Jan 2013 16:07:51 +0100 Subject: trigger_notification method added --- misc/freeswitch/scripts/dialplan/fax.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/freeswitch/scripts/dialplan/fax.lua b/misc/freeswitch/scripts/dialplan/fax.lua index aa29ff6..49a45d9 100644 --- a/misc/freeswitch/scripts/dialplan/fax.lua +++ b/misc/freeswitch/scripts/dialplan/fax.lua @@ -230,3 +230,10 @@ function Fax.insert_document(self, record) return self.database:query(sql_query); end + +function Fax.trigger_notification(self, fax_document_id, uuid) + local command = 'http_request.lua ' .. uuid .. ' http://127.0.0.1/trigger/fax?fax_account_id=' .. tostring(fax_document_id); + + require 'common.fapi' + return common.fapi.FApi:new():execute('luarun', command); +end -- cgit v1.2.3 From 108bab40025a41a03f42bdb6db12ca843a329d4a Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 24 Jan 2013 16:08:14 +0100 Subject: trigger_notification on fax receive --- misc/freeswitch/scripts/dialplan/dialplan.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/freeswitch/scripts/dialplan/dialplan.lua b/misc/freeswitch/scripts/dialplan/dialplan.lua index b92dc70..49d698b 100644 --- a/misc/freeswitch/scripts/dialplan/dialplan.lua +++ b/misc/freeswitch/scripts/dialplan/dialplan.lua @@ -565,6 +565,7 @@ function Dialplan.faxaccount(self, destination) if not fax_account:insert_document(fax_document) then self.log:error('FAX_RECEIVE - error inserting fax document to database - fax_account=', fax_account.id, '/', fax_account.uuid, ', file: ', fax_document.filename); end + fax_account:trigger_notification(fax_account.id, self.caller.uuid); end return { continue = false, code = 200, phrase = 'OK' } -- cgit v1.2.3 From fed98f1002ab5c874f55e7a3730f9b5ca2555ec3 Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 24 Jan 2013 16:38:42 +0100 Subject: fax and voicemail notification --- app/controllers/trigger_controller.rb | 123 ++++++++++++++++++++++++++++++++-- 1 file changed, 119 insertions(+), 4 deletions(-) diff --git a/app/controllers/trigger_controller.rb b/app/controllers/trigger_controller.rb index e9821f6..c49e0b9 100644 --- a/app/controllers/trigger_controller.rb +++ b/app/controllers/trigger_controller.rb @@ -1,11 +1,126 @@ 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 => "", + ) + else + render( + :status => 404, + :layout => false, + :content_type => 'text/plain', + :text => "", + ) + 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 + else + fax_document.state = 'unsuccessful' + fax_document.save + end + end + + render( + :status => 200, + :layout => false, + :content_type => 'text/plain', + :text => "", + ) + else + render( + :status => 404, + :layout => false, + :content_type => 'text/plain', + :text => "", + ) + end + end end end -- cgit v1.2.3 From 2efc5f3853d5120c4ed4c7801e320464ca36e9b9 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 16:10:54 +0100 Subject: Started a docu "How to create a SIP account?" --- .../docu/sip_accounts/breadcrumbs_sip_account.png | Bin 0 -> 109575 bytes .../click_on_new_phone_number_button.png | Bin 0 -> 137454 bytes .../docu/sip_accounts/click_on_new_sip_account.png | Bin 0 -> 126481 bytes .../docu/sip_accounts/create_a_new_sip_account.png | Bin 0 -> 117503 bytes .../docu/sip_accounts/enter_new_phone_number.png | Bin 0 -> 105519 bytes .../docu/sip_accounts/get_to_the_tenant_view.png | Bin 0 -> 131412 bytes .../images/docu/sip_accounts/help_screenshot.png | Bin 0 -> 136912 bytes .../images/docu/sip_accounts/sip_account_view.png | Bin 0 -> 152426 bytes app/views/page/conference.html.haml | 80 --------------------- .../page/docu/_tenant_sip_accounts_new.html.haml | 47 ++++++++++++ app/views/page/help.de.html.haml | 5 +- app/views/tenants/_table_of_sip_accounts.html.haml | 38 ++++++++-- 12 files changed, 81 insertions(+), 89 deletions(-) create mode 100644 app/assets/images/docu/sip_accounts/breadcrumbs_sip_account.png create mode 100644 app/assets/images/docu/sip_accounts/click_on_new_phone_number_button.png create mode 100644 app/assets/images/docu/sip_accounts/click_on_new_sip_account.png create mode 100644 app/assets/images/docu/sip_accounts/create_a_new_sip_account.png create mode 100644 app/assets/images/docu/sip_accounts/enter_new_phone_number.png create mode 100644 app/assets/images/docu/sip_accounts/get_to_the_tenant_view.png create mode 100644 app/assets/images/docu/sip_accounts/help_screenshot.png create mode 100644 app/assets/images/docu/sip_accounts/sip_account_view.png delete mode 100644 app/views/page/conference.html.haml create mode 100644 app/views/page/docu/_tenant_sip_accounts_new.html.haml diff --git a/app/assets/images/docu/sip_accounts/breadcrumbs_sip_account.png b/app/assets/images/docu/sip_accounts/breadcrumbs_sip_account.png new file mode 100644 index 0000000..66034d7 Binary files /dev/null and b/app/assets/images/docu/sip_accounts/breadcrumbs_sip_account.png differ diff --git a/app/assets/images/docu/sip_accounts/click_on_new_phone_number_button.png b/app/assets/images/docu/sip_accounts/click_on_new_phone_number_button.png new file mode 100644 index 0000000..e915cd4 Binary files /dev/null and b/app/assets/images/docu/sip_accounts/click_on_new_phone_number_button.png differ diff --git a/app/assets/images/docu/sip_accounts/click_on_new_sip_account.png b/app/assets/images/docu/sip_accounts/click_on_new_sip_account.png new file mode 100644 index 0000000..7a9b0fe Binary files /dev/null and b/app/assets/images/docu/sip_accounts/click_on_new_sip_account.png differ diff --git a/app/assets/images/docu/sip_accounts/create_a_new_sip_account.png b/app/assets/images/docu/sip_accounts/create_a_new_sip_account.png new file mode 100644 index 0000000..ee52184 Binary files /dev/null and b/app/assets/images/docu/sip_accounts/create_a_new_sip_account.png differ diff --git a/app/assets/images/docu/sip_accounts/enter_new_phone_number.png b/app/assets/images/docu/sip_accounts/enter_new_phone_number.png new file mode 100644 index 0000000..d469f16 Binary files /dev/null and b/app/assets/images/docu/sip_accounts/enter_new_phone_number.png differ diff --git a/app/assets/images/docu/sip_accounts/get_to_the_tenant_view.png b/app/assets/images/docu/sip_accounts/get_to_the_tenant_view.png new file mode 100644 index 0000000..7e1edc6 Binary files /dev/null and b/app/assets/images/docu/sip_accounts/get_to_the_tenant_view.png differ diff --git a/app/assets/images/docu/sip_accounts/help_screenshot.png b/app/assets/images/docu/sip_accounts/help_screenshot.png new file mode 100644 index 0000000..e38ed4a Binary files /dev/null and b/app/assets/images/docu/sip_accounts/help_screenshot.png differ diff --git a/app/assets/images/docu/sip_accounts/sip_account_view.png b/app/assets/images/docu/sip_accounts/sip_account_view.png new file mode 100644 index 0000000..b917e59 Binary files /dev/null and b/app/assets/images/docu/sip_accounts/sip_account_view.png differ 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/_tenant_sip_accounts_new.html.haml b/app/views/page/docu/_tenant_sip_accounts_new.html.haml new file mode 100644 index 0000000..fc94425 --- /dev/null +++ b/app/views/page/docu/_tenant_sip_accounts_new.html.haml @@ -0,0 +1,47 @@ +%h2 Wie wird ein Firmen SIP-Account angelegt? + +%p + 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) + +%ul.thumbnails + %li.span4 + %div.thumbnail + %a.thumbnail{:href => "#{image_path('docu/sip_accounts/click_on_new_sip_account.png')}"} + =image_tag('docu/sip_accounts/click_on_new_sip_account.png', :alt => "2. Zur zentralen Firmenansicht gehen.") + %div.caption + %p + Auf der zentralen Firmenansicht #{link_to tenant_url(current_user.current_tenant), current_user.current_tenant} sehen Sie eine Tabelle mit den existierenden SIP-Accounts. + %br + Bitte klicken Sie auf den "Neu anlegen"-Button. + %li.span4 + %div.thumbnail + %a.thumbnail{:href => "#{image_path('docu/sip_accounts/create_a_new_sip_account.png')}"} + =image_tag('docu/sip_accounts/create_a_new_sip_account.png', :alt => "3. SIP-Account anlegen.") + %div.caption + %p + In dem #{link_to new_tenant_sip_account_path(current_user.current_tenant), new_tenant_sip_account_path(current_user.current_tenant)} Formular können Sie u.a. den Caller-Name für den neuen SIP-Account einrichten. + %br + Die Daten können später alle geändert werden. + %li.span4 + %div.thumbnail + %a.thumbnail{:href => "#{image_path('docu/sip_accounts/click_on_new_phone_number_button.png')}"} + =image_tag('docu/sip_accounts/click_on_new_phone_number_button.png', :alt => "4. Neue Telefonnummer.") + %div.caption + %p + Auf der Ansicht des neuen SIP-Accounts bekommen Sie alle wichtigen Daten angezeigt. Unter den Daten des SIP-Accounts wird eine Tabelle der zugeordneten Telefonnummern angezeigt. Bitte klicken Sie hier auf den "Neu anlegen"-Button. + %li.span4 + %div.thumbnail + %a.thumbnail{:href => "#{image_path('docu/sip_accounts/enter_new_phone_number.png')}"} + =image_tag('docu/sip_accounts/enter_new_phone_number.png', :alt => "3. SIP-Account anlegen.") + %div.caption + %p + In diesem Formular müssen Sie die gewünschte Telefonnummer des SIP-Accounts abspeichern. + %li.span4 + %div.thumbnail + %a.thumbnail{:href => "#{image_path('docu/sip_accounts/sip_account_view.png')}"} + =image_tag('docu/sip_accounts/sip_account_view.png', :alt => "3. SIP-Account anlegen.") + %div.caption + %p + Auf der jetzt erscheinenden Ansicht zum SIP-Account erscheint die eben eingetragene Telefonnummer. Ein SIP-Account kann unter mehreren Telefonnummern erreicht werden. Bitte tragen Sie hier alle ein. diff --git a/app/views/page/help.de.html.haml b/app/views/page/help.de.html.haml index 5eef135..4b75935 100644 --- a/app/views/page/help.de.html.haml +++ b/app/views/page/help.de.html.haml @@ -1,8 +1,5 @@ - 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 @@ -19,6 +16,8 @@ %br =link_to "SIP-Account für #{current_user.current_tenant} anlegen.", new_tenant_sip_account_path(current_user.current_tenant) += render :partial => 'page/docu/tenant_sip_accounts_new' + %h2 Rufnummern %p diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml index 32230b5..b5f618b 100644 --- a/app/views/tenants/_table_of_sip_accounts.html.haml +++ b/app/views/tenants/_table_of_sip_accounts.html.haml @@ -1,7 +1,33 @@ - cache(['tenant_show_table_of_sip_accounts', I18n.locale, tenant, tenant.sip_accounts.count, tenant.sip_accounts.reorder(:updated_at).last]) do - -# 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} + .row + - if !tenant.sip_accounts.any? + .span6 + -# 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} + + .span6 + %ul.thumbnails + %li.span6 + %div.thumbnail + %a.thumbnail{:href => page_help_path} + =image_tag('docu/sip_accounts/help_screenshot.png', :alt => "2. Zur zentralen Firmenansicht gehen.") + %div.caption + %p + In der #{link_to 'Admin-Doku', page_help_path} finden Sie ein Beschreibung, wie Sie einen neuen SIP-Account anlegen können. + + - 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} + + + .row + .span12 \ No newline at end of file -- cgit v1.2.3 From c09553494684447245238cbc2874ce65d4aaecee Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 24 Jan 2013 23:02:40 +0100 Subject: Autohelp config. --- app/views/page/help.de.html.haml | 4 ++-- app/views/tenants/_table_of_sip_accounts.html.haml | 2 +- db/migrate/20130124175109_show_admin_auto_online_help.rb | 9 +++++++++ db/schema.rb | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20130124175109_show_admin_auto_online_help.rb diff --git a/app/views/page/help.de.html.haml b/app/views/page/help.de.html.haml index 4b75935..80c4d72 100644 --- a/app/views/page/help.de.html.haml +++ b/app/views/page/help.de.html.haml @@ -5,14 +5,14 @@ %strong Personalisierter SIP-Accounts %br - Dieser wird einer bestimmten Person zugeordnet. In einer normalen Gemeinschaft-Installation sind die meisten SIP-Accounts personalisiert. + Dieser wird einer bestimmten Person zugeordnet und deshalb für diesen Account z.B. Telefontastenbelegungen definieren kann. In einer normalen Gemeinschaft-Installation sind die meisten SIP-Accounts personalisiert. %br =link_to "SIP-Account für #{current_user} anlegen.", new_user_sip_account_path(current_user) %li %strong Firmen SIP-Accounts %br - Es gibt bestimmte SIP-Account, die keiner bestimmten Person zugeordnet werden können (z.B. für Telefone in einem Konferenzraum). Dafür gibt es Firmen SIP-Accounts. + Es gibt bestimmte SIP-Account, die keiner bestimmten Person zugeordnet werden können (z.B. für Telefone in einem Konferenzraum oder einem Aufzug). Dafür gibt es Firmen SIP-Accounts. %br =link_to "SIP-Account für #{current_user.current_tenant} anlegen.", new_tenant_sip_account_path(current_user.current_tenant) diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml index b5f618b..ef8e458 100644 --- a/app/views/tenants/_table_of_sip_accounts.html.haml +++ b/app/views/tenants/_table_of_sip_accounts.html.haml @@ -1,6 +1,6 @@ - cache(['tenant_show_table_of_sip_accounts', I18n.locale, tenant, tenant.sip_accounts.count, tenant.sip_accounts.reorder(:updated_at).last]) do .row - - if !tenant.sip_accounts.any? + - if GsParameter.get('AUTO_ADMIN_ONLINE_HELP') == true && !tenant.sip_accounts.any? .span6 -# SIP accounts -# diff --git a/db/migrate/20130124175109_show_admin_auto_online_help.rb b/db/migrate/20130124175109_show_admin_auto_online_help.rb new file mode 100644 index 0000000..9c3f733 --- /dev/null +++ b/db/migrate/20130124175109_show_admin_auto_online_help.rb @@ -0,0 +1,9 @@ +class ShowAdminAutoOnlineHelp < ActiveRecord::Migration + def up + GsParameter.create(:name => 'AUTO_ADMIN_ONLINE_HELP', :section => 'Documentation', :value => 'true', :class_type => 'Boolean', :description => 'Gemeinschaft will include tips and help whenever it seems fit.') + end + + def down + GsParameter.where(:name => 'AUTO_ADMIN_ONLINE_HELP').destroy_all + end +end diff --git a/db/schema.rb b/db/schema.rb index 8258394..73a1454 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130124125238) do +ActiveRecord::Schema.define(:version => 20130124175109) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" -- cgit v1.2.3 From 57e1f57912ed16873dd6a4f550d01cc050d573ce Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 25 Jan 2013 10:50:39 +0100 Subject: check fallback sip account --- app/controllers/config_snom_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb index 149e601..b697488 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.where({ :id => params[:sip_account].to_i }).first + end if ! @sip_account render( :status => 404, :layout => false, :content_type => 'text/plain', - :text => "", + :text => "", ) end end -- cgit v1.2.3 From 7cf109b32f3447454a084e31d2086667a896afb8 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 25 Jan 2013 10:54:48 +0100 Subject: fixed undo/redo errors --- app/controllers/config_snom_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb index b697488..e797a43 100644 --- a/app/controllers/config_snom_controller.rb +++ b/app/controllers/config_snom_controller.rb @@ -159,7 +159,7 @@ 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.where({ :id => params[:sip_account].to_i }).first + @sip_account = @phone.fallback_sip_account end if ! @sip_account render( -- cgit v1.2.3 From 1f990f88faa2d203036e3cc57a167bbb9742c58e Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 25 Jan 2013 11:34:29 +0100 Subject: script directory set --- misc/freeswitch/conf/freeswitch.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/freeswitch/conf/freeswitch.xml b/misc/freeswitch/conf/freeswitch.xml index 09f36d1..33a743e 100644 --- a/misc/freeswitch/conf/freeswitch.xml +++ b/misc/freeswitch/conf/freeswitch.xml @@ -638,7 +638,7 @@ - + -- cgit v1.2.3 From 8fdb195855ebb27491b48de5b4e0a567a784be50 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 25 Jan 2013 11:56:26 +0100 Subject: added voicemail storage parameter --- db/migrate/20130125103500_add_voicemail_storage_parameter.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20130125103500_add_voicemail_storage_parameter.rb diff --git a/db/migrate/20130125103500_add_voicemail_storage_parameter.rb b/db/migrate/20130125103500_add_voicemail_storage_parameter.rb new file mode 100644 index 0000000..35e56af --- /dev/null +++ b/db/migrate/20130125103500_add_voicemail_storage_parameter.rb @@ -0,0 +1,9 @@ +class AddVoicemailStorageParameter < ActiveRecord::Migration + def up + GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'storage-dir', :value => '/var/lib/freeswitch/voicemail', :class_type => 'String', :description => 'Directory where voicemail messages are stored.') + end + + def down + GsParameter.where(:entity => 'voicemail', :section => 'parameters', :name => 'storage-dir').destroy_all + end +end -- cgit v1.2.3 From 076e5b8cc14097efe96932e02fa7ccd7df538495 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 25 Jan 2013 11:56:59 +0100 Subject: added dump_variables parameter --- db/migrate/20130125104000_add_dump_variables_parameter.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20130125104000_add_dump_variables_parameter.rb diff --git a/db/migrate/20130125104000_add_dump_variables_parameter.rb b/db/migrate/20130125104000_add_dump_variables_parameter.rb new file mode 100644 index 0000000..cbd85ef --- /dev/null +++ b/db/migrate/20130125104000_add_dump_variables_parameter.rb @@ -0,0 +1,9 @@ +class AddDumpVariablesParameter < ActiveRecord::Migration + def up + GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'dump_variables', :value => 'false', :class_type => 'Boolean', :description => 'Log dialplan variables.') + end + + def down + GsParameter.where(:entity => 'dialplan', :section => 'parameters', :name => 'dump_variables').destroy_all + end +end -- cgit v1.2.3 From 25c8fd5f00df857c24ce61b0290f67fb5006ffb2 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 25 Jan 2013 11:57:45 +0100 Subject: use voicemail storage directory from parameters --- app/controllers/voicemail_settings_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) ] } -- cgit v1.2.3 From 969e7614b52469f7b826a9f865ad7852380a4f8b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 25 Jan 2013 13:02:44 +0100 Subject: Added screencast files. --- app/assets/images/docu/user_interface.png | Bin 0 -> 137824 bytes .../de/firmen_sip_account_und_telefon_anlegen.png | Bin 0 -> 239283 bytes .../firmen_sip_account_und_telefon_anlegen.gif | Bin 0 -> 1672591 bytes .../firmen_sip_account_und_telefon_anlegen.mov | Bin 0 -> 1357712 bytes .../firmen_sip_account_und_telefon_anlegen.mp4 | Bin 0 -> 2091614 bytes app/views/page/docu/_screencast_list.html.haml | 21 +++++++ .../page/docu/_tenant_sip_accounts_new.html.haml | 69 +++++++-------------- app/views/page/help.de.html.haml | 28 +-------- 8 files changed, 46 insertions(+), 72 deletions(-) create mode 100644 app/assets/images/docu/user_interface.png create mode 100644 app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen.png create mode 100644 app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif create mode 100644 app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov create mode 100644 app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 create mode 100644 app/views/page/docu/_screencast_list.html.haml 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 Binary files /dev/null and b/app/assets/images/docu/user_interface.png 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 Binary files /dev/null and b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen.png differ diff --git a/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif b/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif new file mode 100644 index 0000000..1422110 Binary files /dev/null and b/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif differ diff --git a/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov b/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov new file mode 100644 index 0000000..51366d1 Binary files /dev/null and b/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov differ diff --git a/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 b/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 new file mode 100644 index 0000000..1e39b97 Binary files /dev/null and b/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 differ 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..cbfb826 --- /dev/null +++ b/app/views/page/docu/_screencast_list.html.haml @@ -0,0 +1,21 @@ +%p + Zu diesem Thema stehen Screencast-Videos in folgenden Formaten zum Download bereit: +%table.table.table-striped + %thead + %tr + %th + Format + %th + Dateigrösse + + %tbody + - ['mp4', 'mov', 'gif'].each do |file_extension| + - filename = "screencasts/de/#{screencast_name}/#{screencast_name}.#{file_extension}" + - if File.exists?("#{Rails.root}/app#{asset_path(filename)}") + %tr + %td + %a{:href => asset_path(filename)} + %i{:class => 'icon-download'} + =file_extension.upcase + %td + = number_to_human_size(File.size("#{Rails.root}/app#{asset_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 index fc94425..5741526 100644 --- a/app/views/page/docu/_tenant_sip_accounts_new.html.haml +++ b/app/views/page/docu/_tenant_sip_accounts_new.html.haml @@ -1,47 +1,26 @@ -%h2 Wie wird ein Firmen SIP-Account angelegt? +.row + .span12 + %h2 Firmen Telefon mit SIP-Account und einer Telefonnummer -%p - 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) + %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}"}) -%ul.thumbnails - %li.span4 - %div.thumbnail - %a.thumbnail{:href => "#{image_path('docu/sip_accounts/click_on_new_sip_account.png')}"} - =image_tag('docu/sip_accounts/click_on_new_sip_account.png', :alt => "2. Zur zentralen Firmenansicht gehen.") - %div.caption - %p - Auf der zentralen Firmenansicht #{link_to tenant_url(current_user.current_tenant), current_user.current_tenant} sehen Sie eine Tabelle mit den existierenden SIP-Accounts. - %br - Bitte klicken Sie auf den "Neu anlegen"-Button. - %li.span4 - %div.thumbnail - %a.thumbnail{:href => "#{image_path('docu/sip_accounts/create_a_new_sip_account.png')}"} - =image_tag('docu/sip_accounts/create_a_new_sip_account.png', :alt => "3. SIP-Account anlegen.") - %div.caption - %p - In dem #{link_to new_tenant_sip_account_path(current_user.current_tenant), new_tenant_sip_account_path(current_user.current_tenant)} Formular können Sie u.a. den Caller-Name für den neuen SIP-Account einrichten. - %br - Die Daten können später alle geändert werden. - %li.span4 - %div.thumbnail - %a.thumbnail{:href => "#{image_path('docu/sip_accounts/click_on_new_phone_number_button.png')}"} - =image_tag('docu/sip_accounts/click_on_new_phone_number_button.png', :alt => "4. Neue Telefonnummer.") - %div.caption - %p - Auf der Ansicht des neuen SIP-Accounts bekommen Sie alle wichtigen Daten angezeigt. Unter den Daten des SIP-Accounts wird eine Tabelle der zugeordneten Telefonnummern angezeigt. Bitte klicken Sie hier auf den "Neu anlegen"-Button. - %li.span4 - %div.thumbnail - %a.thumbnail{:href => "#{image_path('docu/sip_accounts/enter_new_phone_number.png')}"} - =image_tag('docu/sip_accounts/enter_new_phone_number.png', :alt => "3. SIP-Account anlegen.") - %div.caption - %p - In diesem Formular müssen Sie die gewünschte Telefonnummer des SIP-Accounts abspeichern. - %li.span4 - %div.thumbnail - %a.thumbnail{:href => "#{image_path('docu/sip_accounts/sip_account_view.png')}"} - =image_tag('docu/sip_accounts/sip_account_view.png', :alt => "3. SIP-Account anlegen.") - %div.caption - %p - Auf der jetzt erscheinenden Ansicht zum SIP-Account erscheint die eben eingetragene Telefonnummer. Ein SIP-Account kann unter mehreren Telefonnummern erreicht werden. Bitte tragen Sie hier alle ein. +.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 index 80c4d72..d2eba69 100644 --- a/app/views/page/help.de.html.haml +++ b/app/views/page/help.de.html.haml @@ -1,32 +1,6 @@ - content_for :title, "Erste Schritte mit Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}!" -%ul - %li - %strong - Personalisierter SIP-Accounts - %br - Dieser wird einer bestimmten Person zugeordnet und deshalb für diesen Account z.B. Telefontastenbelegungen definieren kann. In einer normalen Gemeinschaft-Installation sind die meisten SIP-Accounts personalisiert. - %br - =link_to "SIP-Account für #{current_user} anlegen.", new_user_sip_account_path(current_user) - %li - %strong - Firmen SIP-Accounts - %br - Es gibt bestimmte SIP-Account, die keiner bestimmten Person zugeordnet werden können (z.B. für Telefone in einem Konferenzraum oder einem Aufzug). Dafür gibt es Firmen SIP-Accounts. - %br - =link_to "SIP-Account für #{current_user.current_tenant} anlegen.", new_tenant_sip_account_path(current_user.current_tenant) -= render :partial => 'page/docu/tenant_sip_accounts_new' - -%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 += render :partial => 'page/docu/tenant_sip_accounts_new' -%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 -- cgit v1.2.3 From 03bda4ca389990d2158639e365bbac063614aa95 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 25 Jan 2013 13:50:46 +0100 Subject: page#help --- .../docu/sip_accounts/breadcrumbs_sip_account.png | Bin 109575 -> 0 bytes .../click_on_new_phone_number_button.png | Bin 137454 -> 0 bytes .../docu/sip_accounts/click_on_new_sip_account.png | Bin 126481 -> 0 bytes .../docu/sip_accounts/create_a_new_sip_account.png | Bin 117503 -> 0 bytes .../docu/sip_accounts/enter_new_phone_number.png | Bin 105519 -> 0 bytes .../docu/sip_accounts/get_to_the_tenant_view.png | Bin 131412 -> 0 bytes .../images/docu/sip_accounts/help_screenshot.png | Bin 136912 -> 0 bytes .../images/docu/sip_accounts/sip_account_view.png | Bin 152426 -> 0 bytes app/views/page/docu/_screencast_list.html.haml | 4 +--- app/views/page/help.de.html.haml | 20 ++++++++++++++++++++ app/views/tenants/_table_of_sip_accounts.html.haml | 20 ++++++-------------- 11 files changed, 27 insertions(+), 17 deletions(-) delete mode 100644 app/assets/images/docu/sip_accounts/breadcrumbs_sip_account.png delete mode 100644 app/assets/images/docu/sip_accounts/click_on_new_phone_number_button.png delete mode 100644 app/assets/images/docu/sip_accounts/click_on_new_sip_account.png delete mode 100644 app/assets/images/docu/sip_accounts/create_a_new_sip_account.png delete mode 100644 app/assets/images/docu/sip_accounts/enter_new_phone_number.png delete mode 100644 app/assets/images/docu/sip_accounts/get_to_the_tenant_view.png delete mode 100644 app/assets/images/docu/sip_accounts/help_screenshot.png delete mode 100644 app/assets/images/docu/sip_accounts/sip_account_view.png diff --git a/app/assets/images/docu/sip_accounts/breadcrumbs_sip_account.png b/app/assets/images/docu/sip_accounts/breadcrumbs_sip_account.png deleted file mode 100644 index 66034d7..0000000 Binary files a/app/assets/images/docu/sip_accounts/breadcrumbs_sip_account.png and /dev/null differ diff --git a/app/assets/images/docu/sip_accounts/click_on_new_phone_number_button.png b/app/assets/images/docu/sip_accounts/click_on_new_phone_number_button.png deleted file mode 100644 index e915cd4..0000000 Binary files a/app/assets/images/docu/sip_accounts/click_on_new_phone_number_button.png and /dev/null differ diff --git a/app/assets/images/docu/sip_accounts/click_on_new_sip_account.png b/app/assets/images/docu/sip_accounts/click_on_new_sip_account.png deleted file mode 100644 index 7a9b0fe..0000000 Binary files a/app/assets/images/docu/sip_accounts/click_on_new_sip_account.png and /dev/null differ diff --git a/app/assets/images/docu/sip_accounts/create_a_new_sip_account.png b/app/assets/images/docu/sip_accounts/create_a_new_sip_account.png deleted file mode 100644 index ee52184..0000000 Binary files a/app/assets/images/docu/sip_accounts/create_a_new_sip_account.png and /dev/null differ diff --git a/app/assets/images/docu/sip_accounts/enter_new_phone_number.png b/app/assets/images/docu/sip_accounts/enter_new_phone_number.png deleted file mode 100644 index d469f16..0000000 Binary files a/app/assets/images/docu/sip_accounts/enter_new_phone_number.png and /dev/null differ diff --git a/app/assets/images/docu/sip_accounts/get_to_the_tenant_view.png b/app/assets/images/docu/sip_accounts/get_to_the_tenant_view.png deleted file mode 100644 index 7e1edc6..0000000 Binary files a/app/assets/images/docu/sip_accounts/get_to_the_tenant_view.png and /dev/null differ diff --git a/app/assets/images/docu/sip_accounts/help_screenshot.png b/app/assets/images/docu/sip_accounts/help_screenshot.png deleted file mode 100644 index e38ed4a..0000000 Binary files a/app/assets/images/docu/sip_accounts/help_screenshot.png and /dev/null differ diff --git a/app/assets/images/docu/sip_accounts/sip_account_view.png b/app/assets/images/docu/sip_accounts/sip_account_view.png deleted file mode 100644 index b917e59..0000000 Binary files a/app/assets/images/docu/sip_accounts/sip_account_view.png and /dev/null differ diff --git a/app/views/page/docu/_screencast_list.html.haml b/app/views/page/docu/_screencast_list.html.haml index cbfb826..23d4708 100644 --- a/app/views/page/docu/_screencast_list.html.haml +++ b/app/views/page/docu/_screencast_list.html.haml @@ -1,12 +1,10 @@ -%p - Zu diesem Thema stehen Screencast-Videos in folgenden Formaten zum Download bereit: %table.table.table-striped %thead %tr %th Format %th - Dateigrösse + Dateigröße %tbody - ['mp4', 'mov', 'gif'].each do |file_extension| diff --git a/app/views/page/help.de.html.haml b/app/views/page/help.de.html.haml index d2eba69..05184be 100644 --- a/app/views/page/help.de.html.haml +++ b/app/views/page/help.de.html.haml @@ -1,5 +1,25 @@ - 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/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml index ef8e458..ff36531 100644 --- a/app/views/tenants/_table_of_sip_accounts.html.haml +++ b/app/views/tenants/_table_of_sip_accounts.html.haml @@ -1,7 +1,7 @@ - cache(['tenant_show_table_of_sip_accounts', I18n.locale, tenant, tenant.sip_accounts.count, tenant.sip_accounts.reorder(:updated_at).last]) do .row - if GsParameter.get('AUTO_ADMIN_ONLINE_HELP') == true && !tenant.sip_accounts.any? - .span6 + .span4 -# SIP accounts -# %h2= t('sip_accounts.index.page_title') @@ -9,15 +9,11 @@ = render "sip_accounts/index_core", :sip_accounts => tenant.sip_accounts = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount} - .span6 - %ul.thumbnails - %li.span6 - %div.thumbnail - %a.thumbnail{:href => page_help_path} - =image_tag('docu/sip_accounts/help_screenshot.png', :alt => "2. Zur zentralen Firmenansicht gehen.") - %div.caption - %p - In der #{link_to 'Admin-Doku', page_help_path} finden Sie ein Beschreibung, wie Sie einen neuen SIP-Account anlegen können. + .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 @@ -27,7 +23,3 @@ - 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} - - - .row - .span12 \ No newline at end of file -- cgit v1.2.3 From 0236ddcd35479936b3bb24f74826f0001eee2828 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 25 Jan 2013 17:22:08 +0100 Subject: call_url method added --- misc/freeswitch/scripts/common/gateway.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/misc/freeswitch/scripts/common/gateway.lua b/misc/freeswitch/scripts/common/gateway.lua index e50c763..1b3b832 100644 --- a/misc/freeswitch/scripts/common/gateway.lua +++ b/misc/freeswitch/scripts/common/gateway.lua @@ -38,10 +38,14 @@ function Gateway.find_by_id(self, id) local gateway = nil; self.database:query(sql_query, function(entry) + require 'common.str'; gateway = Gateway:new(self); gateway.record = entry; gateway.id = tonumber(entry.id); gateway.name = entry.name; + gateway.technology = entry.technology; + gateway.outbound = common.str.to_b(entry.outbound); + gateway.inbound = common.str.to_b(entry.inbound); end) if gateway then @@ -59,10 +63,14 @@ function Gateway.find_by_name(self, name) local gateway = nil; self.database:query(sql_query, function(entry) + require 'common.str'; gateway = Gateway:new(self); gateway.record = entry; gateway.id = tonumber(entry.id); gateway.name = entry.name; + gateway.technology = entry.technology; + gateway.outbound = common.str.to_b(entry.outbound); + gateway.inbound = common.str.to_b(entry.inbound); end) if gateway then @@ -73,6 +81,15 @@ function Gateway.find_by_name(self, name) end +function Gateway.call_url(self, destination_number) + if self.technology == 'sip' then + return 'sofia/gateway/' .. self.GATEWAY_PREFIX .. self.id .. '/' .. tostring(destination_number); + end + + return ''; +end + + function Gateway.authenticate(self, technology, caller) local sql_query = 'SELECT `c`.`name`, `c`.`id`, `a`.`value` `auth_source`, `b`.`value` `auth_pattern` \ FROM `gateway_settings` `a` \ -- cgit v1.2.3 From a83fbe961572c3f2f0358e6a28d540c5fc3b4d89 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 25 Jan 2013 17:24:03 +0100 Subject: gateway technology independent --- misc/freeswitch/scripts/dialplan/sip_call.lua | 47 +++++++++++++++++---------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/misc/freeswitch/scripts/dialplan/sip_call.lua b/misc/freeswitch/scripts/dialplan/sip_call.lua index 3f56753..d1557e9 100644 --- a/misc/freeswitch/scripts/dialplan/sip_call.lua +++ b/misc/freeswitch/scripts/dialplan/sip_call.lua @@ -89,20 +89,21 @@ function SipCall.fork(self, destinations, arg ) for index, destination in ipairs(destinations) do local origination_variables = { 'gs_fork_index=' .. index } - self.log:info('FORK ', index, '/', #destinations, ' - ', destination.type, '=', destination.id, '/', destination.gateway or destination.uuid, '@', destination.node_id, ', number: ', destination.number, ', caller_id: "', destination.caller_id_name, '" <', destination.caller_id_number, '>'); + self.log:info('FORK ', index, '/', #destinations, ' - ', destination.type, '=', destination.id, '/', destination.uuid, '@', destination.node_id, ', number: ', destination.number, ', caller_id: "', destination.caller_id_name, '" <', destination.caller_id_number, '>'); if not common.str.to_b(arg.update_callee_display) then table.insert(origination_variables, 'ignore_display_updates=true'); end - if not destination.node_local or destination.type == 'node' then + if not destination.node_local then require 'common.node' - local node = nil; - if tonumber(destination.gateway) then - node = common.node.Node:new{ log = self.log, database = self.database }:find_by_id(tonumber(destination.gateway)); - else - node = common.node.Node:new{ log = self.log, database = self.database }:find_by_id(destination.node_id); + local node = common.node.Node:new{ log = self.log, database = self.database }:find_by_id(destination.node_id); + if node then + table.insert(origination_variables, 'sip_h_X-GS_node_id=' .. self.caller.local_node_id); + table.insert(dial_strings, '[' .. table.concat(origination_variables , ',') .. ']sofia/gateway/' .. node.record.name .. '/' .. destination.number); end + elseif destination.type == 'node' then + local node = common.node.Node:new{ log = self.log, database = self.database }:find_by_id(destination.id); if node then table.insert(origination_variables, 'sip_h_X-GS_node_id=' .. self.caller.local_node_id); table.insert(dial_strings, '[' .. table.concat(origination_variables , ',') .. ']sofia/gateway/' .. node.record.name .. '/' .. destination.number); @@ -129,18 +130,26 @@ function SipCall.fork(self, destinations, arg ) call_result = { code = 486, phrase = 'User busy', disposition = 'USER_BUSY' }; end elseif destination.type == 'gateway' then - if destination.caller_id_number then - table.insert(origination_variables, "origination_caller_id_number='" .. destination.caller_id_number .. "'"); - end - if destination.caller_id_name then - table.insert(origination_variables, "origination_caller_id_name='" .. destination.caller_id_name .. "'"); - end - if destination.channel_variables then - for key, value in pairs(destination.channel_variables) do - table.insert(origination_variables, tostring(key) .. "='" .. tostring(value) .. "'"); + require 'common.gateway' + local gateway = common.gateway.Gateway:new{ log = self.log, database = self.database}:find_by_id(destination.id); + + if gateway and gateway.outbound then + if destination.caller_id_number then + table.insert(origination_variables, "origination_caller_id_number='" .. destination.caller_id_number .. "'"); + end + if destination.caller_id_name then + table.insert(origination_variables, "origination_caller_id_name='" .. destination.caller_id_name .. "'"); end + if destination.channel_variables then + for key, value in pairs(destination.channel_variables) do + table.insert(origination_variables, tostring(key) .. "='" .. tostring(value) .. "'"); + end + end + + table.insert(dial_strings, '[' .. table.concat(origination_variables , ',') .. ']' .. gateway:call_url(destination.number)); + else + self.log:notice('FORK - gateway not found - gateway=', destination.id); end - table.insert(dial_strings, '[' .. table.concat(origination_variables , ',') .. ']sofia/gateway/' .. tostring(destination.gateway) .. '/' .. tostring(destination.number)); elseif destination.type == 'dial' then if destination.caller_id_number then table.insert(origination_variables, "origination_caller_id_number='" .. destination.caller_id_number .. "'"); @@ -173,8 +182,10 @@ function SipCall.fork(self, destinations, arg ) self.caller:execute('ring_ready'); end + local session_dialstring = '{local_var_clobber=true}' .. table.concat(dial_strings, ','); + self.log:debug('FORK SESSION_START - call_url: ', session_dialstring); local start_time = os.time(); - local session_callee = freeswitch.Session('{local_var_clobber=true}' .. table.concat(dial_strings, ','), self.caller.session); + local session_callee = freeswitch.Session(session_dialstring, self.caller.session); self.log:debug('FORK SESSION_INIT - dial_time: ', os.time() - start_time); local answer_result = self:wait_answer(self.caller.session, session_callee, arg.timeout, start_time); local fork_index = nil; -- cgit v1.2.3 From 8b2604a4483105c185269d3c38b98e7c51ee7cb2 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 12:41:34 +0100 Subject: Better Errors => http://railscasts.com/episodes/402-better-errors-railspanel --- Gemfile | 4 ++++ Gemfile.lock | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/Gemfile b/Gemfile index 2738418..f0fd360 100644 --- a/Gemfile +++ b/Gemfile @@ -38,6 +38,10 @@ group :development do gem 'factory_girl' gem 'sextant' # Rails 4 stuff gem 'quiet_assets' # turns off assets logging + + # Debugging http://railscasts.com/episodes/402-better-errors-railspanel + gem 'better_errors' + gem 'binding_of_caller' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 79c6339..a1ee949 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -32,6 +32,10 @@ GEM addressable (2.3.2) arel (3.0.2) bcrypt-ruby (3.0.1) + better_errors (0.3.2) + coderay (>= 1.0.0) + erubis (>= 2.7.0) + binding_of_caller (0.6.8) breadcrumbs_on_rails (2.3.0) builder (3.0.4) cache_digests (0.2.0) @@ -41,6 +45,7 @@ GEM activemodel (>= 3.2.0) activesupport (>= 3.2.0) chunky_png (1.2.7) + coderay (1.0.8) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) @@ -197,6 +202,8 @@ PLATFORMS DEPENDENCIES acts_as_list bcrypt-ruby + better_errors + binding_of_caller breadcrumbs_on_rails cache_digests cancan (= 1.6.7) -- cgit v1.2.3 From 5282a24effdd94bdac07956138809a4304124639 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 14:07:39 +0100 Subject: Moved screencasts into the image directory. --- .../firmen_sip_account_und_telefon_anlegen.gif | Bin 0 -> 1672591 bytes .../firmen_sip_account_und_telefon_anlegen.mov | Bin 0 -> 1357712 bytes .../firmen_sip_account_und_telefon_anlegen.mp4 | Bin 0 -> 2091614 bytes .../firmen_sip_account_und_telefon_anlegen.gif | Bin 1672591 -> 0 bytes .../firmen_sip_account_und_telefon_anlegen.mov | Bin 1357712 -> 0 bytes .../firmen_sip_account_und_telefon_anlegen.mp4 | Bin 2091614 -> 0 bytes app/views/page/docu/_screencast_list.html.haml | 6 +++--- 7 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif create mode 100644 app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov create mode 100644 app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 delete mode 100644 app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif delete mode 100644 app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov delete mode 100644 app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 diff --git a/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif new file mode 100644 index 0000000..1422110 Binary files /dev/null and b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif 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 Binary files /dev/null and b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov 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 Binary files /dev/null and b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 differ diff --git a/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif b/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif deleted file mode 100644 index 1422110..0000000 Binary files a/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif and /dev/null differ diff --git a/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov b/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov deleted file mode 100644 index 51366d1..0000000 Binary files a/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mov and /dev/null differ diff --git a/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 b/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 deleted file mode 100644 index 1e39b97..0000000 Binary files a/app/assets/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.mp4 and /dev/null differ diff --git a/app/views/page/docu/_screencast_list.html.haml b/app/views/page/docu/_screencast_list.html.haml index 23d4708..aa22c68 100644 --- a/app/views/page/docu/_screencast_list.html.haml +++ b/app/views/page/docu/_screencast_list.html.haml @@ -9,11 +9,11 @@ %tbody - ['mp4', 'mov', 'gif'].each do |file_extension| - filename = "screencasts/de/#{screencast_name}/#{screencast_name}.#{file_extension}" - - if File.exists?("#{Rails.root}/app#{asset_path(filename)}") + - if File.exists?("#{Rails.root}/public/#{image_path(filename)}") %tr %td - %a{:href => asset_path(filename)} + %a{:href => image_path(filename)} %i{:class => 'icon-download'} =file_extension.upcase %td - = number_to_human_size(File.size("#{Rails.root}/app#{asset_path(filename)}"), :precision => 3) + = number_to_human_size(File.size("#{Rails.root}/public/#{image_path(filename)}"), :precision => 3) -- cgit v1.2.3 From 98f6e90de574f9567e7454e2b776db6152f1cf5d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 14:21:19 +0100 Subject: Show the build version as a tooltip. #140 --- app/views/layouts/_footer.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 61ea546..c3ab12e 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -3,7 +3,8 @@ %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')} -- cgit v1.2.3 From 39b9d92b4330bef1aac715bb64228ed7aff8eb9a Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Sat, 26 Jan 2013 15:05:59 +0100 Subject: minor correction --- app/views/layouts/_footer.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index c3ab12e..c498943 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -3,11 +3,11 @@ %ul{:class => 'nav nav-pills'} - if !GsParameter.get('GEMEINSCHAFT_BUILDNAME').nil? %li - %a{:href => '#', :rel => "tooltip", :title => "Build #{GsParameter.get('GEMEINSCHAFT_BUILDNAME')}", :'data-trigger' => 'hover'} + %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 -- cgit v1.2.3 From af4a02e15a02481e23f9458ae0a430ec52c57417 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 15:13:35 +0100 Subject: UI --- app/views/sip_accounts/_index_core.html.haml | 2 +- app/views/users/show.html.haml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index bc1555f..c01d06e 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -15,7 +15,7 @@ %tbody - for sip_account in sip_accounts - %tr + %tr{:class => (sip_account.registration ? '' : 'warning')} %td - if sip_account.registration %i.icon-ok diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index f38a4a1..7d32cca 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -10,12 +10,12 @@ %td %strong= t('users.show.user_name') + ":" %td - = @user.user_name + = truncate(@user.user_name, :length => 14) %tr %td %strong= t('users.show.email') + ":" %td - = @user.email + = truncate(@user.email, :length => 14) %p.controls = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @user } -- cgit v1.2.3 From e2e2fbbdc6b26e00101f5d4d1b05c0d076c817c2 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 16:22:52 +0100 Subject: Add a bit of AJAX to remove the just deleted row in call_history#index --- app/controllers/call_histories_controller.rb | 5 ++- app/models/call_history.rb | 16 ++++++- app/views/call_histories/_index_core.html.haml | 61 ++++++++++++++------------ app/views/call_histories/destroy.js.erb | 1 + 4 files changed, 51 insertions(+), 32 deletions(-) create mode 100644 app/views/call_histories/destroy.js.erb 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/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/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 4ebcad0..27c6d36 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -12,33 +12,35 @@ %tbody - 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 + - 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}"} %td - - if voicemail_message + - if call_history.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') + %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")) - - 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") - - 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")) + + - 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 @@ -54,7 +56,7 @@ %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 + .phone= call_history.display_number %td - if call_history.display_duration .duration= call_history.display_duration @@ -65,7 +67,8 @@ = link_to t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put %td - if can? :destroy, call_history - / = link_to t('call_histories.index.actions.destroy'), sip_account_call_history_path(@sip_account, call_history), :method => :delete - %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{call_history.class.name.underscore.pluralize}.actions.confirm_destroy"), "data-method" => "delete", :href => sip_account_call_history_path(@sip_account, call_history), :rel => "nofollow"} - %i.icon-trash.icon-white - =t('call_histories.index.actions.destroy') + = link_to "remove", [@sip_account, call_history], :method => :delete, :remote => true + / %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{call_history.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => sip_account_call_history_path(@sip_account, call_history), :rel => "nofollow", remote: true} + / %i.icon-trash.icon-white + / =t('call_histories.index.actions.destroy') + diff --git a/app/views/call_histories/destroy.js.erb b/app/views/call_histories/destroy.js.erb new file mode 100644 index 0000000..2d14ddb --- /dev/null +++ b/app/views/call_histories/destroy.js.erb @@ -0,0 +1 @@ +$('#call_history_id_<%= @call_history.id %>').remove(); \ No newline at end of file -- cgit v1.2.3 From c7b119d19bb866630ce9b152b28308ae3487a77f Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 16:38:56 +0100 Subject: Added the trash icon. --- app/views/call_histories/_index_core.html.haml | 9 +++------ app/views/call_histories/destroy.js.erb | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 27c6d36..550f055 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -14,7 +14,7 @@ - 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{:id => "call_history_id_#{call_history.id}_tr"} %td - if call_history.voicemail_message? .voicemail-message @@ -67,8 +67,5 @@ = link_to t('call_histories.index.actions.call'), call_sip_account_call_history_path(@sip_account, call_history), :method => :put %td - if can? :destroy, call_history - = link_to "remove", [@sip_account, call_history], :method => :delete, :remote => true - / %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{call_history.class.name.underscore.pluralize}.index.actions.confirm_destroy"), "data-method" => "delete", :href => sip_account_call_history_path(@sip_account, call_history), :rel => "nofollow", remote: true} - / %i.icon-trash.icon-white - / =t('call_histories.index.actions.destroy') - + = link_to raw(" ") + 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 index 2d14ddb..d952c58 100644 --- a/app/views/call_histories/destroy.js.erb +++ b/app/views/call_histories/destroy.js.erb @@ -1 +1 @@ -$('#call_history_id_<%= @call_history.id %>').remove(); \ No newline at end of file +$('#call_history_id_<%= @call_history.id %>_tr').remove(); \ No newline at end of file -- cgit v1.2.3 From f03fadb2bffe54c01a5bba5dbac5f9c2e9d099c1 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 19:42:33 +0100 Subject: Logic bugfix. --- app/views/tenants/_table_of_sip_accounts.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/tenants/_table_of_sip_accounts.html.haml b/app/views/tenants/_table_of_sip_accounts.html.haml index ff36531..34eeb14 100644 --- a/app/views/tenants/_table_of_sip_accounts.html.haml +++ b/app/views/tenants/_table_of_sip_accounts.html.haml @@ -1,6 +1,6 @@ -- cache(['tenant_show_table_of_sip_accounts', I18n.locale, tenant, tenant.sip_accounts.count, tenant.sip_accounts.reorder(:updated_at).last]) do +- 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 && !tenant.sip_accounts.any? + - if GsParameter.get('AUTO_ADMIN_ONLINE_HELP') == true && !SipAccount.any? .span4 -# SIP accounts -# -- cgit v1.2.3 From bb3d50c173a4dc0f88f102582eb107782c50858d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 19:50:38 +0100 Subject: HTML bugfix --- app/views/sip_accounts/show.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index c90bb81..65c0df4 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -46,14 +46,14 @@ %tr %td %strong= t('sip_accounts.show.registration') + ":" - %td - = "#{@sip_account.registration.network_ip}:#{@sip_account.registration.network_port}" + %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" + %td + = "#{@sip_account.registration.try(:expires) - Time.now.to_i} s" = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account } -- cgit v1.2.3 From 6d5cc233d0db71f826a27c9151d0af121d0fe616 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 20:02:35 +0100 Subject: Changed the way the avatar is rendered and replaced e-mail address with e-mail. --- app/views/users/show.html.haml | 10 +++++++++- config/locales/views/users/de.yml | 6 +++--- config/locales/views/users/en.yml | 6 +++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 7d32cca..68fdc9d 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -3,7 +3,15 @@ .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) + + - if @user.image? && @user.image_url(:profile) + %span.hidden-phone + %ul.thumbnails + %li.span3 + %div.thumbnail + %a.thumbnail{:href => @user.image_url(:profile).to_s} + =image_tag(@user.image_url(:profile), :alt => "Avatar #{@user}") + %table{:class => 'table table-striped'} %tbody %tr diff --git a/config/locales/views/users/de.yml b/config/locales/views/users/de.yml index 7cdaf68..28f0591 100644 --- a/config/locales/views/users/de.yml +++ b/config/locales/views/users/de.yml @@ -10,7 +10,7 @@ de: index: page_title: 'User' user_name: 'User-Name' - email: 'E-Mail Adresse' + email: 'E-Mail' first_name: 'Vorname' middle_name: 'Zweiter Vorname' last_name: 'Nachname' @@ -29,7 +29,7 @@ de: show: page_title: 'User anzeigen' user_name: 'User-Name' - email: 'E-Mail Adresse' + email: 'E-Mail' first_name: 'Vorname' middle_name: 'Zweiter Vorname' last_name: 'Nachname' @@ -52,7 +52,7 @@ de: label: 'User-Name' hint: '' email: - label: 'E-Mail Adresse' + label: 'E-Mail' hint: '' password: label: 'Passwort' diff --git a/config/locales/views/users/en.yml b/config/locales/views/users/en.yml index 29bae82..7dfa596 100644 --- a/config/locales/views/users/en.yml +++ b/config/locales/views/users/en.yml @@ -10,7 +10,7 @@ en: index: page_title: 'Users' user_name: 'Username' - email: 'E-mail address' + email: 'E-mail' first_name: 'First name' middle_name: 'Middle name' last_name: 'Last name' @@ -29,7 +29,7 @@ en: show: page_title: 'Show User' user_name: 'Username' - email: 'E-mail address' + email: 'E-mail' first_name: 'First name' middle_name: 'Middle name' last_name: 'Last name' @@ -52,7 +52,7 @@ en: label: 'Username' hint: '' email: - label: 'E-mail address' + label: 'E-mail' hint: '' password: label: 'Password' -- cgit v1.2.3 From 680073d4cf7619bddfb7f79ea9e538a33d9dcdee Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 20:11:45 +0100 Subject: Refactoring --- app/views/access_authorizations/_index_core.html.haml | 2 +- app/views/acd_agents/_index_core.html.haml | 2 +- app/views/acd_callers/_index_core.html.haml | 2 +- app/views/addresses/_index_core.html.haml | 2 +- app/views/automatic_call_distributors/_index_core.html.haml | 2 +- app/views/automatic_call_distributors/show.html.haml | 2 +- app/views/call_forwards/_index_core.html.haml | 2 +- app/views/call_histories/_index_core.html.haml | 2 +- app/views/call_routes/_index_core.html.haml | 2 +- app/views/call_routes/index.html.haml | 2 +- app/views/calls/_index_core.html.haml | 2 +- app/views/callthroughs/_index_core.html.haml | 2 +- app/views/conference_invitees/_index_core.html.haml | 2 +- app/views/conferences/_index_core.html.haml | 2 +- app/views/config_polycom/_call_history.xml.haml | 2 +- app/views/config_polycom/_phone_book.xml.haml | 2 +- app/views/fax_accounts/_index_core.html.haml | 2 +- app/views/fax_documents/_index_core.html.haml | 2 +- app/views/freeswitch_voicemail_msgs/_index_core.html.haml | 2 +- app/views/gateway_parameters/_index_core.html.haml | 2 +- app/views/gateway_settings/_index_core.html.haml | 2 +- app/views/gateways/_index_core.html.haml | 2 +- app/views/gateways/show.html.haml | 2 +- app/views/gs_cluster_sync_log_entries/_index_core.html.haml | 2 +- app/views/gs_nodes/_index_core.html.haml | 2 +- app/views/gs_parameters/index.html.haml | 4 ++-- app/views/gs_parameters/show.html.haml | 2 +- app/views/gui_functions/_index_core.html.haml | 2 +- app/views/hunt_group_members/_index_core.html.haml | 2 +- app/views/hunt_groups/_index_core.html.haml | 2 +- app/views/manufacturers/_index_core.html.haml | 2 +- app/views/phone_book_entries/_index_core.html.haml | 2 +- app/views/phone_books/_index_core.html.haml | 2 +- app/views/phone_models/_index_core.html.haml | 2 +- app/views/phone_number_ranges/_index_core.html.haml | 2 +- app/views/phone_numbers/_index_core.html.haml | 2 +- app/views/phone_sip_accounts/_index_core.html.haml | 2 +- app/views/phones/_index_core.html.haml | 2 +- app/views/phones/show.html.haml | 2 +- app/views/ringtones/_index_core.html.haml | 2 +- app/views/route_elements/_index_core.html.haml | 2 +- app/views/sip_accounts/_index_core.html.haml | 2 +- app/views/sip_accounts/show.html.haml | 2 +- app/views/sip_domains/_index_core.html.haml | 2 +- app/views/softkeys/_index_core.html.haml | 2 +- app/views/system_messages/_index_core.html.haml | 2 +- app/views/tenants/_gs_parameter_table.html.haml | 2 +- app/views/tenants/_index_core.html.haml | 2 +- app/views/tenants/show.html.haml | 2 +- app/views/user_group_memberships/_index_core.html.haml | 2 +- app/views/user_groups/_index_core.html.haml | 2 +- app/views/user_groups/show.html.haml | 2 +- app/views/users/_index_core.html.haml | 2 +- app/views/users/show.html.haml | 2 +- app/views/voicemail_messages/_index_core.html.haml | 2 +- app/views/whitelists/_index_core.html.haml | 2 +- .../nifty/scaffold/templates/views/haml/_index_core.html.haml | 2 +- 57 files changed, 58 insertions(+), 58 deletions(-) diff --git a/app/views/access_authorizations/_index_core.html.haml b/app/views/access_authorizations/_index_core.html.haml index a36317a..69c3023 100644 --- a/app/views/access_authorizations/_index_core.html.haml +++ b/app/views/access_authorizations/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('access_authorizations.index.name') diff --git a/app/views/acd_agents/_index_core.html.haml b/app/views/acd_agents/_index_core.html.haml index e3d6f0a..c8967cd 100644 --- a/app/views/acd_agents/_index_core.html.haml +++ b/app/views/acd_agents/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('acd_agents.index.name') diff --git a/app/views/acd_callers/_index_core.html.haml b/app/views/acd_callers/_index_core.html.haml index 0a2e505..3b3327a 100644 --- a/app/views/acd_callers/_index_core.html.haml +++ b/app/views/acd_callers/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('acd_callers.index.channel_uuid') diff --git a/app/views/addresses/_index_core.html.haml b/app/views/addresses/_index_core.html.haml index 8b9e0c2..975fcee 100644 --- a/app/views/addresses/_index_core.html.haml +++ b/app/views/addresses/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('addresses.index.phone_book_entry_id') diff --git a/app/views/automatic_call_distributors/_index_core.html.haml b/app/views/automatic_call_distributors/_index_core.html.haml index 3634ec4..e264c29 100644 --- a/app/views/automatic_call_distributors/_index_core.html.haml +++ b/app/views/automatic_call_distributors/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('automatic_call_distributors.index.name') diff --git a/app/views/automatic_call_distributors/show.html.haml b/app/views/automatic_call_distributors/show.html.haml index b3eae2c..a461652 100644 --- a/app/views/automatic_call_distributors/show.html.haml +++ b/app/views/automatic_call_distributors/show.html.haml @@ -1,6 +1,6 @@ - content_for :title, t("automatic_call_distributors.show.page_title") -%table{:class => 'table table-striped'} +%table.table.table-striped %tbody %tr %td diff --git a/app/views/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml index 7a1672f..878e0e2 100644 --- a/app/views/call_forwards/_index_core.html.haml +++ b/app/views/call_forwards/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr - if !@phone_number diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 550f055..f4e1565 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -1,6 +1,6 @@ = render :partial => "call_histories/navigation" -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index a665b5d..2e9238e 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -1,5 +1,5 @@ - cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do - %table{:class => 'table table-striped'} + %table.table.table-striped %thead %tr %th= t('call_routes.index.name') 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/calls/_index_core.html.haml b/app/views/calls/_index_core.html.haml index c152470..10f79f1 100644 --- a/app/views/calls/_index_core.html.haml +++ b/app/views/calls/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('calls.index.uuid') diff --git a/app/views/callthroughs/_index_core.html.haml b/app/views/callthroughs/_index_core.html.haml index acb152e..d0d6ab6 100644 --- a/app/views/callthroughs/_index_core.html.haml +++ b/app/views/callthroughs/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('callthroughs.index.name') diff --git a/app/views/conference_invitees/_index_core.html.haml b/app/views/conference_invitees/_index_core.html.haml index 5e9c283..25eb4ec 100644 --- a/app/views/conference_invitees/_index_core.html.haml +++ b/app/views/conference_invitees/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('conference_invitees.index.phone_book_entry_id') diff --git a/app/views/conferences/_index_core.html.haml b/app/views/conferences/_index_core.html.haml index 6e82316..18ef6b0 100644 --- a/app/views/conferences/_index_core.html.haml +++ b/app/views/conferences/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('conferences.index.name') 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 2296d21..f86a4ac 100644 --- a/app/views/fax_accounts/_index_core.html.haml +++ b/app/views/fax_accounts/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml index d3abafa..1408eba 100644 --- a/app/views/fax_documents/_index_core.html.haml +++ b/app/views/fax_documents/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('fax_documents.index.sent_at') diff --git a/app/views/freeswitch_voicemail_msgs/_index_core.html.haml b/app/views/freeswitch_voicemail_msgs/_index_core.html.haml index d7b3b21..db0f7d7 100644 --- a/app/views/freeswitch_voicemail_msgs/_index_core.html.haml +++ b/app/views/freeswitch_voicemail_msgs/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('freeswitch_voicemail_msgs.index.created_epoch') diff --git a/app/views/gateway_parameters/_index_core.html.haml b/app/views/gateway_parameters/_index_core.html.haml index 355169e..5babd32 100644 --- a/app/views/gateway_parameters/_index_core.html.haml +++ b/app/views/gateway_parameters/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('gateway_parameters.index.name') diff --git a/app/views/gateway_settings/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml index f5faf33..8098488 100644 --- a/app/views/gateway_settings/_index_core.html.haml +++ b/app/views/gateway_settings/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('gateway_settings.index.name') diff --git a/app/views/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml index bff25e0..1750212 100644 --- a/app/views/gateways/_index_core.html.haml +++ b/app/views/gateways/_index_core.html.haml @@ -1,5 +1,5 @@ - cache(['gateways_table', gateways.count, gateways.first, gateways.last]) do - %table{:class => 'table table-striped'} + %table.table.table-striped %thead %tr %th= t('gateways.index.name') diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml index 25cca87..6cf09ec 100644 --- a/app/views/gateways/show.html.haml +++ b/app/views/gateways/show.html.haml @@ -1,6 +1,6 @@ - content_for :title, t("gateways.show.page_title") -%table{:class => 'table table-striped'} +%table.table.table-striped %tbody %tr %td 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 d491f51..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,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('gs_cluster_sync_log_entries.index.gs_node_id') diff --git a/app/views/gs_nodes/_index_core.html.haml b/app/views/gs_nodes/_index_core.html.haml index 863ab25..7da6881 100644 --- a/app/views/gs_nodes/_index_core.html.haml +++ b/app/views/gs_nodes/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('gs_nodes.index.name') 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 d04949b..706625f 100644 --- a/app/views/gs_parameters/show.html.haml +++ b/app/views/gs_parameters/show.html.haml @@ -1,7 +1,7 @@ - content_for :title, t("gs_parameters.show.page_title") - cache(@gs_parameter) do - %table{:class => 'table table-striped'} + %table.table.table-striped %tbody %tr %td diff --git a/app/views/gui_functions/_index_core.html.haml b/app/views/gui_functions/_index_core.html.haml index 7224bbc..00ae4d1 100644 --- a/app/views/gui_functions/_index_core.html.haml +++ b/app/views/gui_functions/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('gui_functions.index.category') diff --git a/app/views/hunt_group_members/_index_core.html.haml b/app/views/hunt_group_members/_index_core.html.haml index 611e74c..faef332 100644 --- a/app/views/hunt_group_members/_index_core.html.haml +++ b/app/views/hunt_group_members/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('hunt_group_members.index.name') diff --git a/app/views/hunt_groups/_index_core.html.haml b/app/views/hunt_groups/_index_core.html.haml index 9cc237b..6569829 100644 --- a/app/views/hunt_groups/_index_core.html.haml +++ b/app/views/hunt_groups/_index_core.html.haml @@ -1,6 +1,6 @@ - show_seconds = hunt_groups.map{|x| ! x.seconds_between_jumps.nil? }.include?(true) -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('hunt_groups.index.name') diff --git a/app/views/manufacturers/_index_core.html.haml b/app/views/manufacturers/_index_core.html.haml index 6b0acd2..16a168a 100644 --- a/app/views/manufacturers/_index_core.html.haml +++ b/app/views/manufacturers/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('manufacturers.index.name') diff --git a/app/views/phone_book_entries/_index_core.html.haml b/app/views/phone_book_entries/_index_core.html.haml index c7245a2..6669da6 100644 --- a/app/views/phone_book_entries/_index_core.html.haml +++ b/app/views/phone_book_entries/_index_core.html.haml @@ -1,7 +1,7 @@ = render :partial => "phone_book_entries/navigation" - cache(['phone_book_entries_table', I18n.locale, current_user, phone_book_entries]) do - %table{:class => 'table table-striped'} + %table.table.table-striped - for entry in phone_book_entries - cache(['phone_book_entries_table_tr', I18n.locale, current_user, entry]) do %tr diff --git a/app/views/phone_books/_index_core.html.haml b/app/views/phone_books/_index_core.html.haml index a95ce7c..09ce3a3 100644 --- a/app/views/phone_books/_index_core.html.haml +++ b/app/views/phone_books/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('phone_books.index.name') diff --git a/app/views/phone_models/_index_core.html.haml b/app/views/phone_models/_index_core.html.haml index 0155f25..2e409ac 100644 --- a/app/views/phone_models/_index_core.html.haml +++ b/app/views/phone_models/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('phone_models.index.name') diff --git a/app/views/phone_number_ranges/_index_core.html.haml b/app/views/phone_number_ranges/_index_core.html.haml index 2751bdd..956f244 100644 --- a/app/views/phone_number_ranges/_index_core.html.haml +++ b/app/views/phone_number_ranges/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('phone_number_ranges.index.name') diff --git a/app/views/phone_numbers/_index_core.html.haml b/app/views/phone_numbers/_index_core.html.haml index e1a8602..80a1608 100644 --- a/app/views/phone_numbers/_index_core.html.haml +++ b/app/views/phone_numbers/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr - if phone_numbers.count > 1 && phone_numbers.first.phone_numberable_type == 'PhoneBookEntry' diff --git a/app/views/phone_sip_accounts/_index_core.html.haml b/app/views/phone_sip_accounts/_index_core.html.haml index 8178e6d..3656ad6 100644 --- a/app/views/phone_sip_accounts/_index_core.html.haml +++ b/app/views/phone_sip_accounts/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('phone_sip_accounts.index.phone_id') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index af57792..90920dd 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('phones.index.mac_address') diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index b34bdcd..6bb8996 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -2,7 +2,7 @@ .row .span5 - %table{:class => 'table table-striped'} + %table.table.table-striped %tr %td %strong= t('phones.show.mac_address') + ":" diff --git a/app/views/ringtones/_index_core.html.haml b/app/views/ringtones/_index_core.html.haml index 6996fde..715db3c 100644 --- a/app/views/ringtones/_index_core.html.haml +++ b/app/views/ringtones/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('ringtones.index.audio') diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml index 9b7e8d7..37c0656 100644 --- a/app/views/route_elements/_index_core.html.haml +++ b/app/views/route_elements/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('route_elements.index.var_in') diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index c01d06e..34aac64 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 65c0df4..8c4aa7e 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -1,6 +1,6 @@ - content_for :title, t("sip_accounts.show.page_title") -%table{:class => 'table table-striped'} +%table.table.table-striped %tbody %tr %td diff --git a/app/views/sip_domains/_index_core.html.haml b/app/views/sip_domains/_index_core.html.haml index 44c03c7..e280e9c 100644 --- a/app/views/sip_domains/_index_core.html.haml +++ b/app/views/sip_domains/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('sip_domains.index.host') diff --git a/app/views/softkeys/_index_core.html.haml b/app/views/softkeys/_index_core.html.haml index 6c30803..398ee51 100644 --- a/app/views/softkeys/_index_core.html.haml +++ b/app/views/softkeys/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('softkeys.index.function') diff --git a/app/views/system_messages/_index_core.html.haml b/app/views/system_messages/_index_core.html.haml index b40cd0c..7c9dab5 100644 --- a/app/views/system_messages/_index_core.html.haml +++ b/app/views/system_messages/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('system_messages.index.created_at') diff --git a/app/views/tenants/_gs_parameter_table.html.haml b/app/views/tenants/_gs_parameter_table.html.haml index 1bcb914..8b0d62c 100644 --- a/app/views/tenants/_gs_parameter_table.html.haml +++ b/app/views/tenants/_gs_parameter_table.html.haml @@ -1,5 +1,5 @@ - 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'} + %table.table.table-striped %thead %tr %th diff --git a/app/views/tenants/_index_core.html.haml b/app/views/tenants/_index_core.html.haml index fd7fabc..a220b1b 100644 --- a/app/views/tenants/_index_core.html.haml +++ b/app/views/tenants/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('tenants.index.name') diff --git a/app/views/tenants/show.html.haml b/app/views/tenants/show.html.haml index 532d5d5..818e584 100644 --- a/app/views/tenants/show.html.haml +++ b/app/views/tenants/show.html.haml @@ -1,6 +1,6 @@ - content_for :title, @tenant.name -%table{:class => 'table table-striped'} +%table.table.table-striped %tbody %tr %td diff --git a/app/views/user_group_memberships/_index_core.html.haml b/app/views/user_group_memberships/_index_core.html.haml index c9674ba..fd59faa 100644 --- a/app/views/user_group_memberships/_index_core.html.haml +++ b/app/views/user_group_memberships/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('user_group_memberships.index.tenant') diff --git a/app/views/user_groups/_index_core.html.haml b/app/views/user_groups/_index_core.html.haml index aa1497e..a85e8c4 100644 --- a/app/views/user_groups/_index_core.html.haml +++ b/app/views/user_groups/_index_core.html.haml @@ -1,5 +1,5 @@ - 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'} + %table.table.table-striped %thead %tr %th= t('user_groups.index.name') diff --git a/app/views/user_groups/show.html.haml b/app/views/user_groups/show.html.haml index 920f772..fd5414e 100644 --- a/app/views/user_groups/show.html.haml +++ b/app/views/user_groups/show.html.haml @@ -1,6 +1,6 @@ - content_for :title, t("user_groups.show.page_title") -%table{:class => 'table table-striped'} +%table.table.table-striped %tbody %tr %td diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index 77b8c95..9d63afc 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,5 +1,5 @@ - 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'} + %table.table.table-striped %thead %tr %th diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 68fdc9d..0b9c06e 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -12,7 +12,7 @@ %a.thumbnail{:href => @user.image_url(:profile).to_s} =image_tag(@user.image_url(:profile), :alt => "Avatar #{@user}") - %table{:class => 'table table-striped'} + %table.table.table-striped %tbody %tr %td 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 b5af08d..fb7246f 100644 --- a/app/views/whitelists/_index_core.html.haml +++ b/app/views/whitelists/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %thead %tr %th= t('whitelists.index.name') diff --git a/lib/generators/nifty/scaffold/templates/views/haml/_index_core.html.haml b/lib/generators/nifty/scaffold/templates/views/haml/_index_core.html.haml index a523d32..f142d15 100644 --- a/lib/generators/nifty/scaffold/templates/views/haml/_index_core.html.haml +++ b/lib/generators/nifty/scaffold/templates/views/haml/_index_core.html.haml @@ -1,4 +1,4 @@ -%table{:class => 'table table-striped'} +%table.table.table-striped %tr <%- for attribute in model_attributes -%> %th= t('<%= plural_name %>.index.<%= attribute.name %>') -- cgit v1.2.3 From c23704427182d8b63600dd404f1295763e88addd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 20:15:28 +0100 Subject: Show a rounded avatar photo and link to the original version of that photo. --- app/views/users/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 0b9c06e..639a52a 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -9,8 +9,8 @@ %ul.thumbnails %li.span3 %div.thumbnail - %a.thumbnail{:href => @user.image_url(:profile).to_s} - =image_tag(@user.image_url(:profile), :alt => "Avatar #{@user}") + %a.thumbnail{:href => @user.image_url} + =image_tag(@user.image_url(:profile), :alt => "Avatar #{@user}", :class => 'img-rounded') %table.table.table-striped %tbody -- cgit v1.2.3 From bf0ab8ce84a7562b6724513d1a84c44de647e4ac Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 20:28:50 +0100 Subject: Show thumbnail. --- app/views/call_histories/_index_core.html.haml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index f4e1565..d80071c 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -47,7 +47,11 @@ %td - image = call_history.display_image(:small, phone_book_entry) - if image - = image_tag(image, :itemprop => 'image') + %ul.thumbnails + %li.span1 + %div.thumbnail + %a.thumbnail{:href => image} + =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded') - display_name = call_history.display_name - if display_name.blank? -- cgit v1.2.3 From 63d392f39b44e143501ca06178c2e9b59f5053f5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 20:31:43 +0100 Subject: Colorcoded a not yet active phone. --- app/views/phones/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index 90920dd..347b260 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -16,7 +16,7 @@ %tbody - for phone in phones - %tr + %tr{:class => (phone.ip_address.blank? ? 'warning' : '')} %td= phone.pretty_mac_address %td= phone.phone_model %td -- cgit v1.2.3 From d7777f71e78ae173e26af39c7c65243b4604d6e8 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 21:01:23 +0100 Subject: Added a tooltip. --- app/views/phones/_index_core.html.haml | 10 ++++++++-- config/locales/views/phones/de.yml | 1 + config/locales/views/phones/en.yml | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index 347b260..9a865f0 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -22,6 +22,12 @@ %td %span.hidden-phone %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.hot_desk'), :'data-trigger' => 'hover'} - = phone.hot_deskable - %td= phone.ip_address + = 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/config/locales/views/phones/de.yml b/config/locales/views/phones/de.yml index af2804a..b45bb59 100644 --- a/config/locales/views/phones/de.yml +++ b/config/locales/views/phones/de.yml @@ -83,3 +83,4 @@ de: connect_to_sip_account: 'SIP-Account mit dem Telefon verknüpfen' tool_tips: hot_desk: 'Mit aktivierter Hot Desk Fähigkeit können sich User der Anlage an einem Telefon ein- und ausloggen.' + missing_ip_address: 'Das Telefon hat sich bis jetzt noch nicht bei Gemeinschaft gemeldet. Vielleicht müssen Sie das Telefon manuell rebooten.' diff --git a/config/locales/views/phones/en.yml b/config/locales/views/phones/en.yml index 306537f..bac3e68 100644 --- a/config/locales/views/phones/en.yml +++ b/config/locales/views/phones/en.yml @@ -83,3 +83,4 @@ en: connect_to_sip_account: 'Connect to an existing SIP account' tool_tips: hot_desk: 'Hot desk triggers the ability for a user to login and out of a given phone.' + missing_ip_address: "The phone hasn't contacted this system yet. Maybe you need to reboot the phone." -- cgit v1.2.3 From 3793a53509007054f5f5f2eb00abaa404074f252 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 22:30:19 +0100 Subject: UI improvement. --- app/views/phone_sip_accounts/_index_core.html.haml | 2 +- app/views/phones/show.html.haml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/phone_sip_accounts/_index_core.html.haml b/app/views/phone_sip_accounts/_index_core.html.haml index 3656ad6..7ec04be 100644 --- a/app/views/phone_sip_accounts/_index_core.html.haml +++ b/app/views/phone_sip_accounts/_index_core.html.haml @@ -7,7 +7,7 @@ %tbody - for phone_sip_account in phone_sip_accounts - %tr + %tr{:class => (phone_sip_account.sip_account.registration ? '' : 'warning')} %td= phone_sip_account.phone %td= phone_sip_account.sip_account %td= phone_sip_account.position diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 6bb8996..2cf6f3c 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -41,11 +41,15 @@ %td = @phone.provisioning_key_active - %tr + %tr{:class => (@phone.ip_address.blank? ? 'warning' : '')} %td %strong= t('phones.show.ip_address') + ":" %td - = @phone.ip_address + - 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/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } -- cgit v1.2.3 From f227929c14cc4edb1c646094f793894d47e2bdb3 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 22:32:34 +0100 Subject: Wording --- config/locales/views/phones/de.yml | 6 +++--- config/locales/views/phones/en.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/locales/views/phones/de.yml b/config/locales/views/phones/de.yml index b45bb59..19fab87 100644 --- a/config/locales/views/phones/de.yml +++ b/config/locales/views/phones/de.yml @@ -8,7 +8,7 @@ de: index: page_title: 'Telefone' mac_address: 'MAC-Adresse' - phone_model_id: 'Telefonmodell' + phone_model_id: 'Modell' hot_deskable: 'Hot-Desk fähig' ip_address: 'IP-Adresse' last_ip_address: 'Letzte IP-Adresse' @@ -26,7 +26,7 @@ de: show: page_title: 'Telefon anzeigen' mac_address: 'MAC-Adresse' - phone_model_id: 'Telefonmodell' + phone_model_id: 'Modell' hot_deskable: 'Hot-Desk fähig' ip_address: 'IP-Adresse' last_ip_address: 'Letzte IP-Adresse' @@ -51,7 +51,7 @@ de: label: 'MAC-Adresse' hint: '' phone_model_id: - label: 'Telefonmodell' + label: 'Modell' hint: '' hot_deskable: label: 'Hot-Desk fähig' diff --git a/config/locales/views/phones/en.yml b/config/locales/views/phones/en.yml index bac3e68..eb05229 100644 --- a/config/locales/views/phones/en.yml +++ b/config/locales/views/phones/en.yml @@ -8,7 +8,7 @@ en: index: page_title: 'Phones' mac_address: 'Mac address' - phone_model_id: 'Phone model' + phone_model_id: 'Model' hot_deskable: 'Hot-deskable' ip_address: 'IP address' last_ip_address: 'Last IP address' @@ -25,7 +25,7 @@ en: show: page_title: 'Show phone' mac_address: 'Mac address' - phone_model_id: 'Phone model' + phone_model_id: 'Model' hot_deskable: 'Hot-deskable' ip_address: 'IP address' last_ip_address: 'Last IP address' @@ -51,7 +51,7 @@ en: label: 'Mac address' hint: '' phone_model_id: - label: 'Phone model' + label: 'Model' hint: '' hot_deskable: label: 'Hot-deskable' -- cgit v1.2.3 From 5e83f10c186d403a7dfe1d35afd1b64a5935a8ec Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 22:44:11 +0100 Subject: Display the user and password for the phone's WebGUI. --- app/views/phones/show.html.haml | 18 ++++++++++++++++-- config/locales/views/phones/de.yml | 4 ++-- config/locales/views/phones/en.yml | 4 ++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index 2cf6f3c..f56ae65 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -32,14 +32,14 @@ %td %strong= t('phones.show.nightly_reboot') + ":" %td - = @phone.nightly_reboot + = @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 + = @phone.provisioning_key_active == true ? t('simple_form.yes') : t('simple_form.no') %tr{:class => (@phone.ip_address.blank? ? 'warning' : '')} %td @@ -51,6 +51,20 @@ - 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 } diff --git a/config/locales/views/phones/de.yml b/config/locales/views/phones/de.yml index 19fab87..8fe6ba8 100644 --- a/config/locales/views/phones/de.yml +++ b/config/locales/views/phones/de.yml @@ -12,8 +12,8 @@ de: hot_deskable: 'Hot-Desk fähig' ip_address: 'IP-Adresse' last_ip_address: 'Letzte IP-Adresse' - http_user: 'http user' - http_password: 'http password' + http_user: 'Phone WebGUI Username' + http_password: 'Phone WebGUI Passwort' nightly_reboot: 'Nachts automatischer Reboot' provisioning_key_active: 'Provisioning Schlüssel aktiv' actions: diff --git a/config/locales/views/phones/en.yml b/config/locales/views/phones/en.yml index eb05229..1f39f04 100644 --- a/config/locales/views/phones/en.yml +++ b/config/locales/views/phones/en.yml @@ -12,8 +12,8 @@ en: hot_deskable: 'Hot-deskable' ip_address: 'IP address' last_ip_address: 'Last IP address' - http_user: 'http user' - http_password: 'http password' + http_user: 'Phone WebGUI username' + http_password: 'Phone WebGUI password' nightly_reboot: 'Nightly reboot' actions: confirm_destroy: 'Are you sure you want to delete this phone?' -- cgit v1.2.3 From e905a61d1aa42629fa20837365dc879925d5204e Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 22:52:41 +0100 Subject: UI improvements. --- app/views/phone_sip_accounts/_index_core.html.haml | 2 +- app/views/sip_accounts/show.html.haml | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/phone_sip_accounts/_index_core.html.haml b/app/views/phone_sip_accounts/_index_core.html.haml index 7ec04be..a2d9d98 100644 --- a/app/views/phone_sip_accounts/_index_core.html.haml +++ b/app/views/phone_sip_accounts/_index_core.html.haml @@ -9,6 +9,6 @@ - for phone_sip_account in phone_sip_accounts %tr{:class => (phone_sip_account.sip_account.registration ? '' : 'warning')} %td= phone_sip_account.phone - %td= phone_sip_account.sip_account + %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/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 8c4aa7e..c21b3f4 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -21,12 +21,12 @@ %td %strong= t('sip_accounts.show.call_waiting') + ":" %td - = @sip_account.call_waiting + = @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 + = @sip_account.clir == true ? t('simple_form.yes') : t('simple_form.no') %tr %td %strong= t('sip_accounts.show.clip_no_screening') + ":" @@ -36,12 +36,13 @@ %td %strong= t('sip_accounts.show.hotdeskable') + ":" %td - = @sip_account.hotdeskable + = @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 + = @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 -- cgit v1.2.3 From 2e21387f7b494ec2121b01219737700f3f59012c Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 23:07:08 +0100 Subject: UI improvements. --- app/views/call_histories/_index_core.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index d80071c..489892c 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -14,7 +14,7 @@ - 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"} + %tr{:id => "call_history_id_#{call_history.id}_tr", :class => (call_history.duration.blank? ? 'warning' : '')} %td - if call_history.voicemail_message? .voicemail-message @@ -50,7 +50,7 @@ %ul.thumbnails %li.span1 %div.thumbnail - %a.thumbnail{:href => image} + %a.thumbnail{:href => call_history.display_image(:profile, phone_book_entry)} =image_tag(image, :alt => phone_book_entry.to_s, :class => 'img-rounded') - display_name = call_history.display_name @@ -63,9 +63,9 @@ .phone= call_history.display_number %td - if call_history.display_duration - .duration= call_history.display_duration + = call_history.display_duration - else - .disposition= t("call_histories.call_results.#{call_history.result}") + = t("call_histories.call_results.#{call_history.result}") %td - 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 -- cgit v1.2.3 From e5fa1fc32609426693b43a4e8b6208867371d30e Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 23:19:09 +0100 Subject: UI improvements. --- app/views/call_histories/_index_core.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 489892c..7409203 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -5,6 +5,7 @@ %tr %th Uhrzeit + %th %th Teilnehmer %th @@ -52,7 +53,7 @@ %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 @@ -68,7 +69,7 @@ = t("call_histories.call_results.#{call_history.result}") %td - 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 + = link_to raw(" ") + 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(" ") + t('call_histories.index.actions.destroy'), [@sip_account, call_history], :method => :delete, :remote => true, :class => 'btn btn-mini btn-danger' -- cgit v1.2.3 From 45af07cb093eb0202967cf0d0fc058ca58f0b782 Mon Sep 17 00:00:00 2001 From: spag Date: Sun, 27 Jan 2013 10:17:21 +0100 Subject: added gateway technology --- app/controllers/gateways_controller.rb | 2 + app/models/gateway.rb | 2 +- app/models/gateway_setting.rb | 10 +++ app/views/gateway_settings/_form_core.html.haml | 2 +- app/views/gateways/_form_core.html.haml | 2 +- .../20130127073800_add_dingaling_parameter.rb | 10 +++ misc/freeswitch/conf/freeswitch.xml | 1 + misc/freeswitch/scripts/common/gateway.lua | 85 +++++++++++++++------- misc/freeswitch/scripts/configuration.lua | 69 +++++++++++++++++- misc/freeswitch/scripts/dialplan/dialplan.lua | 2 +- 10 files changed, 149 insertions(+), 36 deletions(-) create mode 100644 db/migrate/20130127073800_add_dingaling_parameter.rb 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/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/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/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/db/migrate/20130127073800_add_dingaling_parameter.rb b/db/migrate/20130127073800_add_dingaling_parameter.rb new file mode 100644 index 0000000..ff5bd7c --- /dev/null +++ b/db/migrate/20130127073800_add_dingaling_parameter.rb @@ -0,0 +1,10 @@ +class AddDingalingParameter < ActiveRecord::Migration + def up + GsParameter.create(:entity => 'dingaling', :section => 'parameters', :name => 'debug', :value => '0', :class_type => 'Integer', :description => 'Debug level.') + GsParameter.create(:entity => 'dingaling', :section => 'parameters', :name => 'codec-prefs', :value => 'PCMA,PCMU', :class_type => 'String', :description => 'Codec preferences.') + end + + def down + GsParameter.where(:entity => 'dingaling', :section => 'parameters').destroy_all + end +end diff --git a/misc/freeswitch/conf/freeswitch.xml b/misc/freeswitch/conf/freeswitch.xml index 33a743e..fd6ab67 100644 --- a/misc/freeswitch/conf/freeswitch.xml +++ b/misc/freeswitch/conf/freeswitch.xml @@ -634,6 +634,7 @@ + diff --git a/misc/freeswitch/scripts/common/gateway.lua b/misc/freeswitch/scripts/common/gateway.lua index 1b3b832..c1b50a7 100644 --- a/misc/freeswitch/scripts/common/gateway.lua +++ b/misc/freeswitch/scripts/common/gateway.lua @@ -84,20 +84,30 @@ end function Gateway.call_url(self, destination_number) if self.technology == 'sip' then return 'sofia/gateway/' .. self.GATEWAY_PREFIX .. self.id .. '/' .. tostring(destination_number); + elseif self.technology == 'xmpp' then + local destination_str = tostring(destination_number); + if self.settings.destination_domain then + destination_str = destination_str .. '@' .. self.settings.destination_domain; + end + return 'dingaling/' .. self.GATEWAY_PREFIX .. self.id .. '/' .. destination_str; end return ''; end -function Gateway.authenticate(self, technology, caller) +function Gateway.authenticate(self, caller, technology) local sql_query = 'SELECT `c`.`name`, `c`.`id`, `a`.`value` `auth_source`, `b`.`value` `auth_pattern` \ FROM `gateway_settings` `a` \ INNER JOIN `gateway_settings` `b` \ ON (`a`.`gateway_id` = `b`.`gateway_id` AND `a`.`name` = "auth_source" AND `b`.`name` = "auth_pattern" ) \ LEFT JOIN `gateways` `c` \ ON (`a`.`gateway_id` = `c`.`id`) \ - WHERE `c`.`inbound` IS TRUE AND `c`.`technology` = "' .. tostring(technology) .. '"'; + WHERE `c`.`inbound` IS TRUE'; + + if technology then + sql_query = sql_query .. ' AND `c`.`technology` = "' .. tostring(technology) .. '"'; + end local gateway = false; @@ -142,39 +152,58 @@ function Gateway.config_table_get(self, config_table, gateway_id) end -function Gateway.parameters_build(self, gateway_id) +function Gateway.parameters_build(self, gateway_id, technology) local settings = self:config_table_get('gateway_settings', gateway_id); - local parameters = { - realm = settings.domain, - extension = 'auto_to_user', - }; require 'common.str' + local parameters = {}; + + if technology == 'sip' then + parameters.realm = settings.domain; + parameters.extension = 'auto_to_user'; + + if common.str.blank(settings.username) then + parameters.username = 'gateway' .. gateway_id; + parameters.register = false; + else + parameters.username = settings.username; + parameters.register = true; + end - if common.str.blank(settings.username) then - parameters.username = 'gateway' .. gateway_id; - parameters.register = false; - else - parameters.username = settings.username; - parameters.register = true; - end - - if not common.str.blank(settings.register) then - parameters.register = common.str.to_b(settings.register); - end + if not common.str.blank(settings.register) then + parameters.register = common.str.to_b(settings.register); + end - if common.str.blank(settings.password) then - parameters.password = 'gateway' .. gateway_id; - else - parameters.password = settings.password; - end + if common.str.blank(settings.password) then + parameters.password = 'gateway' .. gateway_id; + else + parameters.password = settings.password; + end - parameters['extension-in-contact'] = true; + parameters['extension-in-contact'] = true; - if common.str.blank(settings.contact) then - parameters['extension'] = 'gateway' .. gateway_id; - else - parameters['extension'] = settings.contact; + if common.str.blank(settings.contact) then + parameters['extension'] = 'gateway' .. gateway_id; + else + parameters['extension'] = settings.contact; + end + elseif technology == 'xmpp' then + parameters.message = 'Gemeinschaft 5 by AMOOMA'; + parameters.dialplan = 'XML'; + parameters.context = 'default'; + parameters['rtp-ip'] = 'auto'; + parameters['auto-login'] = 'true'; + parameters.sasl = 'plain'; + parameters.tls = 'true'; + parameters['use-rtp-timer'] = 'true'; + parameters.vad = 'both'; + parameters.use_jingle = 'true'; + parameters['candidate-acl'] = 'wan.auto'; + parameters.name = self.GATEWAY_PREFIX .. gateway_id; + parameters.server = settings.server; + parameters.login = settings.login; + parameters.password = settings.password; + parameters.exten = settings.inbound_number or parameters.name; end for key, value in pairs(self:config_table_get('gateway_parameters', gateway_id)) do diff --git a/misc/freeswitch/scripts/configuration.lua b/misc/freeswitch/scripts/configuration.lua index 9e62bb6..062cf5d 100644 --- a/misc/freeswitch/scripts/configuration.lua +++ b/misc/freeswitch/scripts/configuration.lua @@ -29,7 +29,7 @@ function nodes(database, local_node_id) end -function gateways(database, profile_name) +function sofia_gateways(database, profile_name) require 'configuration.simple_xml' local xml = configuration.simple_xml.SimpleXml:new(); @@ -44,8 +44,8 @@ function gateways(database, profile_name) local gateway = gateways[index]; local gateway_profile = gateway_class:profile_get(gateway.id); if tostring(gateway_profile) == profile_name or (profile_name == 'gemeinschaft' and common.str.blank(gateway_profile)) then - log:debug('GATEWAY - name: ', gateway.name); - local parameters = gateway_class:parameters_build(gateway.id); + log:debug('SIP_GATEWAY - name: ', gateway.name); + local parameters = gateway_class:parameters_build(gateway.id, 'sip'); gateways_xml = gateways_xml .. xml:element{ 'gateway', @@ -86,7 +86,7 @@ function profile(database, sofia_ini, profile_name, index, domains, node_id) log:debug('SOFIA_PROFILE ', index,' - name: ', profile_name, ' - no domains'); end - local gateways_xml = gateways(database, profile_name); + local gateways_xml = sofia_gateways(database, profile_name); if index == 1 then gateways_xml = gateways_xml .. nodes(database, node_id); @@ -296,6 +296,65 @@ function conf_post_switch(database) end +function dingaling_profiles(database) + local TECHNOLOGY = 'xmpp'; + require 'common.str' + require 'configuration.simple_xml' + local xml = configuration.simple_xml.SimpleXml:new(); + + require 'common.gateway' + local gateway_class = common.gateway.Gateway:new{ log = log, database = database}; + local gateways = gateway_class:list(TECHNOLOGY); + + local gateways_xml = ''; + for index=1, #gateways do + local gateway = gateways[index]; + local gateway_profile = gateway_class:profile_get(gateway.id); + log:debug('XMPP_GATEWAY - name: ', gateway.name); + local parameters = gateway_class:parameters_build(gateway.id, TECHNOLOGY); + + gateways_xml = gateways_xml .. xml:element{ + 'profile', + ['type'] = 'client', + xml:from_hash('param', parameters, 'name', 'value'), + }; + end + + return gateways_xml; +end + + +function conf_dingaling(database) + require 'configuration.simple_xml' + local xml = configuration.simple_xml.SimpleXml:new(); + + require 'common.configuration_table'; + local parameters = common.configuration_table.get(database, 'dingaling', 'parameters') or {}; + + local profiles_xml = dingaling_profiles(database) or ''; + + XML_STRING = xml:element{ + 'document', + ['type'] = 'freeswitch/xml', + xml:element{ + 'section', + name = 'configuration', + description = 'Gemeinschaft 5 FreeSWITCH configuration', + xml:element{ + 'configuration', + name = 'dingaling.conf', + description = 'Jingle endpoint configuration', + xml:element{ + 'settings', + xml:from_hash('param', parameters, 'name', 'value'), + }, + profiles_xml, + }, + }, + }; +end + + function directory_sip_account(database) require 'configuration.simple_xml' local xml = configuration.simple_xml.SimpleXml:new(); @@ -480,6 +539,8 @@ if XML_REQUEST.section == 'configuration' and XML_REQUEST.tag_name == 'configura if XML_REQUEST.key_value == 'sofia.conf' then conf_sofia(database); + elseif XML_REQUEST.key_value == "dingaling.conf" then + conf_dingaling(database); elseif XML_REQUEST.key_value == "conference.conf" then conf_conference(database); elseif XML_REQUEST.key_value == "voicemail.conf" then diff --git a/misc/freeswitch/scripts/dialplan/dialplan.lua b/misc/freeswitch/scripts/dialplan/dialplan.lua index 49d698b..ff4adc6 100644 --- a/misc/freeswitch/scripts/dialplan/dialplan.lua +++ b/misc/freeswitch/scripts/dialplan/dialplan.lua @@ -135,7 +135,7 @@ end function Dialplan.auth_gateway(self) require 'common.gateway' local gateway_class = common.gateway.Gateway:new{ log = self.log, database = self.database}; - local gateway = gateway_class:authenticate('sip', self.caller); + local gateway = gateway_class:authenticate(self.caller); if gateway then log:info('AUTH_GATEWAY - ', gateway.auth_source, ' ~ ', gateway.auth_pattern, ', gateway=', gateway.id, ', name: ', gateway.name, ', ip: ', self.caller.sip_contact_host); -- cgit v1.2.3 From f5a09733ae0b6f77211eea03ab161e0c9122465b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 27 Jan 2013 11:12:46 +0100 Subject: Wording --- config/locales/views/phones/de.yml | 8 ++++---- config/locales/views/phones/en.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/locales/views/phones/de.yml b/config/locales/views/phones/de.yml index 8fe6ba8..373db13 100644 --- a/config/locales/views/phones/de.yml +++ b/config/locales/views/phones/de.yml @@ -30,8 +30,8 @@ de: hot_deskable: 'Hot-Desk fähig' ip_address: 'IP-Adresse' last_ip_address: 'Letzte IP-Adresse' - http_user: 'http user' - http_password: 'http password' + http_user: 'Phone WebGUI Username' + http_password: 'Phone WebGUI Passwort' nightly_reboot: 'Nachts automatischer Reboot' fallback_sip_account_id: 'Fallback SIP Account' manual: 'Handbuch' @@ -66,10 +66,10 @@ de: label: 'Letzte IP-Adresse' hint: '' http_user: - label: 'http user' + label: 'Phone WebGUI Username' hint: '' http_password: - label: 'http password' + label: 'Phone WebGUI Passwort' hint: '' provisioning_key_active: label: 'Provisioning Schlüssel aktiv' diff --git a/config/locales/views/phones/en.yml b/config/locales/views/phones/en.yml index 1f39f04..87a6160 100644 --- a/config/locales/views/phones/en.yml +++ b/config/locales/views/phones/en.yml @@ -29,8 +29,8 @@ en: hot_deskable: 'Hot-deskable' ip_address: 'IP address' last_ip_address: 'Last IP address' - http_user: 'http user' - http_password: 'http password' + http_user: 'Phone WebGUI username' + http_password: 'Phone WebGUI password' nightly_reboot: 'Nightly reboot' provisioning_key_active: 'Provisioning key active' fallback_sip_account_id: 'Fallback SIP Account' -- cgit v1.2.3 From e758cec9a842e75abe0a26312c4d7d3e8530b84a Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 27 Jan 2013 11:18:53 +0100 Subject: Provide a link to the phone's WebGUI which includes the http user and password. --- app/views/phones/show.html.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index f56ae65..86ac380 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -49,7 +49,10 @@ %a{:href => '#', :rel => "tooltip", :title => t('phones.tool_tips.missing_ip_address'), :'data-trigger' => 'hover'} = '-' - else - = @phone.ip_address + - 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 @@ -64,7 +67,6 @@ %td = @phone.http_password - = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone.phoneable, :child => @phone } -- cgit v1.2.3 From d96593f72f45d8fa1c84205cd73ffd3e4e51d8e5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 27 Jan 2013 11:42:46 +0100 Subject: i18n display of the time. --- app/views/call_histories/_index_core.html.haml | 9 +++++++++ config/locales/de.yml | 3 ++- config/locales/en.yml | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 7409203..4ca340d 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -3,9 +3,14 @@ %table.table.table-striped %thead %tr + %th + Datum %th Uhrzeit %th + Misc + %th + Avatar %th Teilnehmer %th @@ -16,6 +21,10 @@ - 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 diff --git a/config/locales/de.yml b/config/locales/de.yml index 087a2d3..e82f513 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -193,4 +193,5 @@ de: default: ! '%A, %d. %B %Y, %H:%M Uhr' long: ! '%A, %d. %B %Y, %H:%M Uhr' short: ! '%d. %B, %H:%M Uhr' - pm: nachmittags \ No newline at end of file + pm: nachmittags + date_only: '%d.%m.%Y' \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index dabe98d..4f29799 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3,4 +3,6 @@ en: dont_use_me: "NO ME USES!" # Temporal, just till we create the Voice Mail stuff. voice_mail: "Voice Mail" - fax: "Fax" \ No newline at end of file + fax: "Fax" + time: + date_only: '%m.%d.%Y' \ No newline at end of file -- cgit v1.2.3 From e500814c387818938bfe76299a25a04de7e1cbfb Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 28 Jan 2013 08:43:01 +0100 Subject: Removed the gif screencast. --- .../firmen_sip_account_und_telefon_anlegen.gif | Bin 1672591 -> 0 bytes app/views/page/docu/_screencast_list.html.haml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif diff --git a/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif b/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif deleted file mode 100644 index 1422110..0000000 Binary files a/app/assets/images/screencasts/de/firmen_sip_account_und_telefon_anlegen/firmen_sip_account_und_telefon_anlegen.gif and /dev/null differ diff --git a/app/views/page/docu/_screencast_list.html.haml b/app/views/page/docu/_screencast_list.html.haml index aa22c68..6669a42 100644 --- a/app/views/page/docu/_screencast_list.html.haml +++ b/app/views/page/docu/_screencast_list.html.haml @@ -7,7 +7,7 @@ Dateigröße %tbody - - ['mp4', 'mov', 'gif'].each do |file_extension| + - ['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 -- cgit v1.2.3 From 29ac1a26b5d78c3d8570928df73610de0a361297 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 09:26:47 +0100 Subject: render route endpoint --- app/models/call_route.rb | 11 +++++++++++ app/views/call_routes/_index_core.html.haml | 11 ++++++++--- app/views/call_routes/show.html.haml | 11 ++++++----- config/locales/views/call_routes/de.yml | 6 ++---- config/locales/views/call_routes/en.yml | 6 ++---- 5 files changed, 29 insertions(+), 16 deletions(-) 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/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index 2e9238e..f0acebb 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -4,7 +4,7 @@ %tr %th= t('call_routes.index.name') %th= t('route_elements.index.pattern') - %th= t('call_routes.index.endpoint_type') + %th= t('call_routes.index.endpoint') %tbody - for call_route in call_routes @@ -18,5 +18,10 @@ = ', ...' - else = '-' - %td= call_route.endpoint_type - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} \ No newline at end of file + %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/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/config/locales/views/call_routes/de.yml b/config/locales/views/call_routes/de.yml index 260b869..a8d6f4b 100644 --- a/config/locales/views/call_routes/de.yml +++ b/config/locales/views/call_routes/de.yml @@ -9,8 +9,7 @@ de: page_title: 'Liste aller Call Routen' routing_table: 'Routing Table' name: 'Name' - endpoint_type: 'Endpoint type' - endpoint_id: 'Endpoint' + endpoint: 'Endpoint' position: 'Position' actions: confirm_destroy: 'Sind Sie sicher, dass Sie folgendes löschen möchten: Call Route' @@ -23,8 +22,7 @@ de: page_title: 'Call Route bearbeiten' routing_table: 'Routing Table' name: 'Name' - endpoint_type: 'Endpoint type' - endpoint_id: 'Endpoint' + endpoint: 'Endpoint' position: 'Position' actions: confirm_destroy: 'Sind Sie sicher, dass die dieses Element löschen möchten?' diff --git a/config/locales/views/call_routes/en.yml b/config/locales/views/call_routes/en.yml index 25e4c51..8596474 100644 --- a/config/locales/views/call_routes/en.yml +++ b/config/locales/views/call_routes/en.yml @@ -9,8 +9,7 @@ en: page_title: 'Listing Call route' table: 'Table' name: 'Name' - endpoint_type: 'Endpoint type' - endpoint_id: 'Endpoint' + endpoint: 'Endpoint' position: 'Position' actions: confirm_destroy: 'Are you sure you want to delete this Call route?' @@ -23,8 +22,7 @@ en: page_title: 'Show Call route' table: 'Table' name: 'Name' - endpoint_type: 'Endpoint type' - endpoint_id: 'Endpoint' + endpoint: 'Endpoint' position: 'Position' actions: confirm_destroy: 'Are you sure you want to delete this element?' -- cgit v1.2.3 From 7f751576ae36f387bafa63e900fa21353a2ce3fb Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 10:11:39 +0100 Subject: sip_registration model added --- app/models/sip_registration.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 app/models/sip_registration.rb 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 -- cgit v1.2.3 From 3e66e066c2f19a8b27233dff1abdf3908debae36 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 10:12:40 +0100 Subject: use sip_registration in sip_views --- app/models/sip_account.rb | 2 +- app/views/sip_accounts/show.html.haml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index c21b3f4..72e10df 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -55,6 +55,13 @@ %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 } -- cgit v1.2.3 From 5908ea469819cfcd7e05ce2f22ffe1412d474b7e Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 10:17:42 +0100 Subject: translations --- config/locales/views/sip_accounts/de.yml | 1 + config/locales/views/sip_accounts/en.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/config/locales/views/sip_accounts/de.yml b/config/locales/views/sip_accounts/de.yml index e711137..2820336 100644 --- a/config/locales/views/sip_accounts/de.yml +++ b/config/locales/views/sip_accounts/de.yml @@ -40,6 +40,7 @@ de: callforward_rules_act_per_sip_account: 'Rufweiterleitungen gelten für das gesamte SIP-Account' registration: 'Registrierung' expires: 'Läuft ab' + user_agent: 'User Agent' actions: confirm_destroy: 'Sind Sie sicher, dass Sie diesen SIP-Account löschen möchten?' destroy: 'Löschen' diff --git a/config/locales/views/sip_accounts/en.yml b/config/locales/views/sip_accounts/en.yml index 99d14b5..aa934e9 100644 --- a/config/locales/views/sip_accounts/en.yml +++ b/config/locales/views/sip_accounts/en.yml @@ -40,6 +40,7 @@ en: callforward_rules_act_per_sip_account: 'Callforwards work for the whole sip account' registration: 'Registration' expires: 'Expires' + user_agent: 'User Agent' actions: confirm_destroy: 'Are you sure you want to delete this SIP account?' destroy: 'Delete' -- cgit v1.2.3 From 553115fd50ef3c35d961fa98abfd593386da5c94 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 11:07:14 +0100 Subject: fax document count fixed --- app/views/fax_accounts/_index_core.html.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml index f86a4ac..d694f8f 100644 --- a/app/views/fax_accounts/_index_core.html.haml +++ b/app/views/fax_accounts/_index_core.html.haml @@ -28,9 +28,11 @@ %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)}") + - 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 fax_account.fax_documents.outbound.count, fax_account_fax_documents_path(fax_account, :anchor => "fax_document_#{fax_account.fax_documents.outbound.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 -- cgit v1.2.3 From cdde455a50df5de70ee3d84ce66733e8769db05f Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 28 Jan 2013 11:09:16 +0100 Subject: Fixed HTML bug. --- app/views/shared/_create_link.html.haml | 3 +-- .../shared/_index_view_edit_destroy_part.html.haml | 19 +++++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/app/views/shared/_create_link.html.haml b/app/views/shared/_create_link.html.haml index b1eef1f..53e9dbc 100644 --- a/app/views/shared/_create_link.html.haml +++ b/app/views/shared/_create_link.html.haml @@ -8,8 +8,7 @@ - else %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_for", :resource => parent.to_s) - =t("#{child_class.name.underscore.pluralize}.index.actions.create") + =t("#{child_class.name.underscore.pluralize}.index.actions.create") - elsif !(defined? child_class).nil? - if can? :create, child_class 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 8e119fe..6bb1e7b 100644 --- a/app/views/shared/_index_view_edit_destroy_part.html.haml +++ b/app/views/shared/_index_view_edit_destroy_part.html.haml @@ -4,20 +4,17 @@ - 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 - %span.hidden-phone - =t("#{child.class.name.underscore.pluralize}.index.actions.show") + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - 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 - %span.hidden-phone - =t("#{child.class.name.underscore.pluralize}.index.actions.edit") + =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( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"} %i.icon-remove.icon-white - %span.hidden-phone - =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") - elsif !(defined? child).nil? %td @@ -25,17 +22,15 @@ - if can? :show, child %a.btn.btn-small.btn-success{:href => method( :"#{child.class.name.underscore}_path" ).(child) } %i.icon-info-sign.icon-white - %span.hidden-phone - =t("#{child.class.name.underscore.pluralize}.index.actions.show") + =t("#{child.class.name.underscore.pluralize}.index.actions.show") - if can? :edit, child %a.btn.btn-small.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) } %i.icon-edit.icon-white - %span.hidden-phone - =t("#{child.class.name.underscore.pluralize}.index.actions.edit") + =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 - %span.hidden-phone - =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") \ No newline at end of file + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") + \ No newline at end of file -- cgit v1.2.3 From 5d17b4b7e41a62d2c7f1dabae8ad7376211e921a Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 11:55:45 +0100 Subject: thumbnails fixed --- app/controllers/trigger_controller.rb | 1 + app/models/fax_document.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/trigger_controller.rb b/app/controllers/trigger_controller.rb index c49e0b9..ac43832 100644 --- a/app/controllers/trigger_controller.rb +++ b/app/controllers/trigger_controller.rb @@ -101,6 +101,7 @@ class TriggerController < ApplicationController File.delete(pdf_file); fax_document.tiff = nil fax_document.save + fax_document.render_thumbnails else fax_document.state = 'unsuccessful' fax_document.save 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" -- cgit v1.2.3 From b9dd594578d0c4545c7bfed38b5f8d3366f5e82d Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 12:03:45 +0100 Subject: translations fixed --- config/locales/en.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 4f29799..a295492 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,8 +1,4 @@ -# Don't add anything here! en: - dont_use_me: "NO ME USES!" - # Temporal, just till we create the Voice Mail stuff. - voice_mail: "Voice Mail" - fax: "Fax" time: - date_only: '%m.%d.%Y' \ No newline at end of file + formats: + date_only: '%m/%d/%Y' -- cgit v1.2.3 From aa7b3fa2abf942bab5e7c6aaf34472b10641075b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 28 Jan 2013 12:27:31 +0100 Subject: s/:back/:root/ --- app/controllers/sip_accounts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3 From 1f2d63d8261184d61854a84c2fb5d16b98e78959 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 12:41:06 +0100 Subject: translations --- config/locales/en.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index a295492..dab4595 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2,3 +2,5 @@ en: time: formats: date_only: '%m/%d/%Y' + short: ! '%m/%d/%y %H:%M' + date_only: '%m/%d/%Y' -- cgit v1.2.3 From bf1b92197212d3bd44ac8101814a7ffb08bb14bc Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 12:41:36 +0100 Subject: date in fax index --- app/views/fax_documents/_index_core.html.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml index 1408eba..8559f1c 100644 --- a/app/views/fax_documents/_index_core.html.haml +++ b/app/views/fax_documents/_index_core.html.haml @@ -14,7 +14,9 @@ - for fax_document in fax_documents %tr{:id => "fax_document_#{fax_document.id}"} - if fax_document.sent_at - %td= "#{fax_document.inbound ? '⇨' : '⇦'} #{fax_document.sent_at}".html_safe + %td + = "#{fax_document.inbound ? '⇨' : '⇦'}".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 -- cgit v1.2.3 From fd95d2c2fcc50418cdb23f34b21bcfe04d9cc1de Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 13:36:27 +0100 Subject: create_sip_registrations migration --- .../20130128121800_create_sip_registrations.rb | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 db/migrate/20130128121800_create_sip_registrations.rb diff --git a/db/migrate/20130128121800_create_sip_registrations.rb b/db/migrate/20130128121800_create_sip_registrations.rb new file mode 100644 index 0000000..4157b84 --- /dev/null +++ b/db/migrate/20130128121800_create_sip_registrations.rb @@ -0,0 +1,51 @@ +class CreateSipRegistrations < ActiveRecord::Migration + def self.up + create_table :sip_registrations, :id => false do |t| + t.string :call_id, :limit => '255' + t.string :sip_user, :limit => '255' + t.string :sip_host, :limit => '255' + t.string :presence_hosts, :limit => '255' + t.string :contact, :limit => '1024' + t.string :status, :limit => '255' + t.string :rpid, :limit => '255' + t.integer :expires + t.string :user_agent, :limit => '255' + t.string :server_user, :limit => '255' + t.string :server_host, :limit => '255' + t.string :profile_name, :limit => '255' + t.string :hostname, :limit => '255' + t.string :network_ip, :limit => '255' + t.string :network_port, :limit => '6' + t.string :sip_username, :limit => '255' + t.string :sip_realm, :limit => '255' + t.string :mwi_user, :limit => '255' + t.string :mwi_host, :limit => '255' + t.string :orig_server_host, :limit => '255' + t.string :orig_hostname, :limit => '255' + t.string :sub_host, :limit => '255' + end + + add_index :sip_registrations, [ :call_id ], :name => 'sr_call_id' + add_index :sip_registrations, [ :sip_user ], :name => 'sr_sip_user' + add_index :sip_registrations, [ :sip_host ], :name => 'sr_sip_host' + add_index :sip_registrations, [ :sub_host ], :name => 'sr_sub_host' + add_index :sip_registrations, [ :mwi_user ], :name => 'sr_mwi_user' + add_index :sip_registrations, [ :mwi_host ], :name => 'sr_mwi_host' + add_index :sip_registrations, [ :profile_name ], :name => 'sr_profile_name' + add_index :sip_registrations, [ :presence_hosts ], :name => 'sr_presence_hosts' + add_index :sip_registrations, [ :contact ], :name => 'sr_contact' + add_index :sip_registrations, [ :expires ], :name => 'sr_expires' + add_index :sip_registrations, [ :hostname ], :name => 'sr_hostname' + add_index :sip_registrations, [ :status ], :name => 'sr_status' + add_index :sip_registrations, [ :network_ip ], :name => 'sr_network_ip' + add_index :sip_registrations, [ :network_port ], :name => 'sr_network_port' + add_index :sip_registrations, [ :sip_username ], :name => 'sr_sip_username' + add_index :sip_registrations, [ :sip_realm ], :name => 'sr_sip_realm' + add_index :sip_registrations, [ :orig_server_host ], :name => 'sr_orig_server_host' + add_index :sip_registrations, [ :orig_hostname ], :name => 'sr_orig_hostname' + end + + def self.down + drop_table :sip_registrations + end +end -- cgit v1.2.3 From 600574759573e48da9f5f82d4ff8a863b6830c95 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 28 Jan 2013 13:44:21 +0100 Subject: Checks if the table already exists (could be generated by FreeSWITCH). #144 --- .../20130128121800_create_sip_registrations.rb | 86 +++++++++++----------- db/schema.rb | 46 +++++++++++- 2 files changed, 89 insertions(+), 43 deletions(-) diff --git a/db/migrate/20130128121800_create_sip_registrations.rb b/db/migrate/20130128121800_create_sip_registrations.rb index 4157b84..473418e 100644 --- a/db/migrate/20130128121800_create_sip_registrations.rb +++ b/db/migrate/20130128121800_create_sip_registrations.rb @@ -1,48 +1,50 @@ class CreateSipRegistrations < ActiveRecord::Migration def self.up - create_table :sip_registrations, :id => false do |t| - t.string :call_id, :limit => '255' - t.string :sip_user, :limit => '255' - t.string :sip_host, :limit => '255' - t.string :presence_hosts, :limit => '255' - t.string :contact, :limit => '1024' - t.string :status, :limit => '255' - t.string :rpid, :limit => '255' - t.integer :expires - t.string :user_agent, :limit => '255' - t.string :server_user, :limit => '255' - t.string :server_host, :limit => '255' - t.string :profile_name, :limit => '255' - t.string :hostname, :limit => '255' - t.string :network_ip, :limit => '255' - t.string :network_port, :limit => '6' - t.string :sip_username, :limit => '255' - t.string :sip_realm, :limit => '255' - t.string :mwi_user, :limit => '255' - t.string :mwi_host, :limit => '255' - t.string :orig_server_host, :limit => '255' - t.string :orig_hostname, :limit => '255' - t.string :sub_host, :limit => '255' - end + if !(ActiveRecord::Base.connection.table_exists? 'sip_registrations') + create_table :sip_registrations, :id => false do |t| + t.string :call_id, :limit => '255' + t.string :sip_user, :limit => '255' + t.string :sip_host, :limit => '255' + t.string :presence_hosts, :limit => '255' + t.string :contact, :limit => '1024' + t.string :status, :limit => '255' + t.string :rpid, :limit => '255' + t.integer :expires + t.string :user_agent, :limit => '255' + t.string :server_user, :limit => '255' + t.string :server_host, :limit => '255' + t.string :profile_name, :limit => '255' + t.string :hostname, :limit => '255' + t.string :network_ip, :limit => '255' + t.string :network_port, :limit => '6' + t.string :sip_username, :limit => '255' + t.string :sip_realm, :limit => '255' + t.string :mwi_user, :limit => '255' + t.string :mwi_host, :limit => '255' + t.string :orig_server_host, :limit => '255' + t.string :orig_hostname, :limit => '255' + t.string :sub_host, :limit => '255' + end - add_index :sip_registrations, [ :call_id ], :name => 'sr_call_id' - add_index :sip_registrations, [ :sip_user ], :name => 'sr_sip_user' - add_index :sip_registrations, [ :sip_host ], :name => 'sr_sip_host' - add_index :sip_registrations, [ :sub_host ], :name => 'sr_sub_host' - add_index :sip_registrations, [ :mwi_user ], :name => 'sr_mwi_user' - add_index :sip_registrations, [ :mwi_host ], :name => 'sr_mwi_host' - add_index :sip_registrations, [ :profile_name ], :name => 'sr_profile_name' - add_index :sip_registrations, [ :presence_hosts ], :name => 'sr_presence_hosts' - add_index :sip_registrations, [ :contact ], :name => 'sr_contact' - add_index :sip_registrations, [ :expires ], :name => 'sr_expires' - add_index :sip_registrations, [ :hostname ], :name => 'sr_hostname' - add_index :sip_registrations, [ :status ], :name => 'sr_status' - add_index :sip_registrations, [ :network_ip ], :name => 'sr_network_ip' - add_index :sip_registrations, [ :network_port ], :name => 'sr_network_port' - add_index :sip_registrations, [ :sip_username ], :name => 'sr_sip_username' - add_index :sip_registrations, [ :sip_realm ], :name => 'sr_sip_realm' - add_index :sip_registrations, [ :orig_server_host ], :name => 'sr_orig_server_host' - add_index :sip_registrations, [ :orig_hostname ], :name => 'sr_orig_hostname' + add_index :sip_registrations, [ :call_id ], :name => 'sr_call_id' + add_index :sip_registrations, [ :sip_user ], :name => 'sr_sip_user' + add_index :sip_registrations, [ :sip_host ], :name => 'sr_sip_host' + add_index :sip_registrations, [ :sub_host ], :name => 'sr_sub_host' + add_index :sip_registrations, [ :mwi_user ], :name => 'sr_mwi_user' + add_index :sip_registrations, [ :mwi_host ], :name => 'sr_mwi_host' + add_index :sip_registrations, [ :profile_name ], :name => 'sr_profile_name' + add_index :sip_registrations, [ :presence_hosts ], :name => 'sr_presence_hosts' + add_index :sip_registrations, [ :contact ], :name => 'sr_contact' + add_index :sip_registrations, [ :expires ], :name => 'sr_expires' + add_index :sip_registrations, [ :hostname ], :name => 'sr_hostname' + add_index :sip_registrations, [ :status ], :name => 'sr_status' + add_index :sip_registrations, [ :network_ip ], :name => 'sr_network_ip' + add_index :sip_registrations, [ :network_port ], :name => 'sr_network_port' + add_index :sip_registrations, [ :sip_username ], :name => 'sr_sip_username' + add_index :sip_registrations, [ :sip_realm ], :name => 'sr_sip_realm' + add_index :sip_registrations, [ :orig_server_host ], :name => 'sr_orig_server_host' + add_index :sip_registrations, [ :orig_hostname ], :name => 'sr_orig_hostname' + end end def self.down diff --git a/db/schema.rb b/db/schema.rb index 73a1454..7bae5fd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130124175109) do +ActiveRecord::Schema.define(:version => 20130128121800) do create_table "access_authorizations", :force => true do |t| t.string "access_authorizationable_type" @@ -876,6 +876,50 @@ ActiveRecord::Schema.define(:version => 20130124175109) do t.datetime "updated_at", :null => false end + create_table "sip_registrations", :id => false, :force => true do |t| + t.string "call_id" + t.string "sip_user" + t.string "sip_host" + t.string "presence_hosts" + t.string "contact", :limit => 1024 + t.string "status" + t.string "rpid" + t.integer "expires" + t.string "user_agent" + t.string "server_user" + t.string "server_host" + t.string "profile_name" + t.string "hostname" + t.string "network_ip" + t.string "network_port", :limit => 6 + t.string "sip_username" + t.string "sip_realm" + t.string "mwi_user" + t.string "mwi_host" + t.string "orig_server_host" + t.string "orig_hostname" + t.string "sub_host" + end + + add_index "sip_registrations", ["call_id"], :name => "sr_call_id" + add_index "sip_registrations", ["contact"], :name => "sr_contact" + add_index "sip_registrations", ["expires"], :name => "sr_expires" + add_index "sip_registrations", ["hostname"], :name => "sr_hostname" + add_index "sip_registrations", ["mwi_host"], :name => "sr_mwi_host" + add_index "sip_registrations", ["mwi_user"], :name => "sr_mwi_user" + add_index "sip_registrations", ["network_ip"], :name => "sr_network_ip" + add_index "sip_registrations", ["network_port"], :name => "sr_network_port" + add_index "sip_registrations", ["orig_hostname"], :name => "sr_orig_hostname" + add_index "sip_registrations", ["orig_server_host"], :name => "sr_orig_server_host" + add_index "sip_registrations", ["presence_hosts"], :name => "sr_presence_hosts" + add_index "sip_registrations", ["profile_name"], :name => "sr_profile_name" + add_index "sip_registrations", ["sip_host"], :name => "sr_sip_host" + add_index "sip_registrations", ["sip_realm"], :name => "sr_sip_realm" + add_index "sip_registrations", ["sip_user"], :name => "sr_sip_user" + add_index "sip_registrations", ["sip_username"], :name => "sr_sip_username" + add_index "sip_registrations", ["status"], :name => "sr_status" + add_index "sip_registrations", ["sub_host"], :name => "sr_sub_host" + create_table "softkey_functions", :force => true do |t| t.string "name" t.datetime "created_at", :null => false -- cgit v1.2.3