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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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 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 (limited to 'app/views') 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 (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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 (limited to 'app/views') 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 (limited to 'app/views') 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 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. --- app/views/phones/show.html.haml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/views') 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/views/layouts/application.html.haml | 1 + app/views/phones/_index_core.html.haml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'app/views') 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 -- 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 (limited to 'app/views') 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(-) (limited to 'app/views') 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 ++++++++++-------- 6 files changed, 26 insertions(+), 23 deletions(-) (limited to 'app/views') 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} -- 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 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views') 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') -- 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 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') 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| -- 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/views/gemeinschaft_setups/new.de.html.haml | 20 +++++++++++--------- app/views/gemeinschaft_setups/new.html.haml | 22 ++++++++++++---------- app/views/users/_form_core.html.haml | 3 ++- 3 files changed, 25 insertions(+), 20 deletions(-) (limited to 'app/views') 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') -- 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(-) (limited to 'app/views') 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 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(-) (limited to 'app/views') 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 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 (limited to 'app/views') 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 +++++++++++++++++---------- 2 files changed, 39 insertions(+), 19 deletions(-) (limited to 'app/views') 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 -- 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/views/user_groups/_index_core.html.haml | 4 ---- 1 file changed, 4 deletions(-) (limited to 'app/views') 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} -- 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/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 +++++++++++++++++++++++++++++ 5 files changed, 76 insertions(+), 69 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 (limited to 'app/views') 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 -- 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?" --- 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 ++++++++-- 4 files changed, 81 insertions(+), 89 deletions(-) delete mode 100644 app/views/page/conference.html.haml create mode 100644 app/views/page/docu/_tenant_sip_accounts_new.html.haml (limited to 'app/views') 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 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') 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 -# -- 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/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 +-------- 3 files changed, 46 insertions(+), 72 deletions(-) create mode 100644 app/views/page/docu/_screencast_list.html.haml (limited to 'app/views') 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 --- 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 ++++++-------------- 3 files changed, 27 insertions(+), 17 deletions(-) (limited to 'app/views') 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 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. --- app/views/page/docu/_screencast_list.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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/views/call_histories/_index_core.html.haml | 61 ++++++++++++++------------ app/views/call_histories/destroy.js.erb | 1 + 2 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 app/views/call_histories/destroy.js.erb (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'app/views') 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 -- 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 +- 56 files changed, 57 insertions(+), 57 deletions(-) (limited to 'app/views') 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') -- 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app/views') 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 -- 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(-) (limited to 'app/views') 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 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 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'app/views') 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 } -- 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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/views/gateway_settings/_form_core.html.haml | 2 +- app/views/gateways/_form_core.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') 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') -- 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(-) (limited to 'app/views') 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 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/views') 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 -- 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. --- app/views/page/docu/_screencast_list.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') 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/views/call_routes/_index_core.html.haml | 11 ++++++++--- app/views/call_routes/show.html.haml | 11 ++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'app/views') 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 } -- 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/views/sip_accounts/show.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/views') 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 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(-) (limited to 'app/views') 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(-) (limited to 'app/views') 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 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(-) (limited to 'app/views') 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