diff options
Diffstat (limited to 'app/views')
274 files changed, 1499 insertions, 935 deletions
diff --git a/app/views/access_authorizations/_index_core.html.haml b/app/views/access_authorizations/_index_core.html.haml index 083b16b..7469a1d 100644 --- a/app/views/access_authorizations/_index_core.html.haml +++ b/app/views/access_authorizations/_index_core.html.haml @@ -1,15 +1,15 @@ -%table +%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') - - reset_cycle + - 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{:class => cycle('odd', 'even')} + %tr %td= access_authorization.name %td= access_authorization.login %td= access_authorization.pin diff --git a/app/views/access_authorizations/edit.html.haml b/app/views/access_authorizations/edit.html.haml index 414f094..b05c23e 100644 --- a/app/views/access_authorizations/edit.html.haml +++ b/app/views/access_authorizations/edit.html.haml @@ -1,3 +1,3 @@ -- title t("access_authorizations.edit.page_title") +- content_for :title, t("access_authorizations.edit.page_title") = render "form" diff --git a/app/views/access_authorizations/index.html.haml b/app/views/access_authorizations/index.html.haml index 05b27db..7a0dfd3 100644 --- a/app/views/access_authorizations/index.html.haml +++ b/app/views/access_authorizations/index.html.haml @@ -1,4 +1,4 @@ -- title t("access_authorizations.index.page_title") +- content_for :title, t("access_authorizations.index.page_title") - if @access_authorizations.count > 0 = render "index_core", :access_authorizations => @access_authorizations diff --git a/app/views/access_authorizations/new.html.haml b/app/views/access_authorizations/new.html.haml index 0bbf16c..f1ba872 100644 --- a/app/views/access_authorizations/new.html.haml +++ b/app/views/access_authorizations/new.html.haml @@ -1,3 +1,3 @@ -- title t("access_authorizations.new.page_title") +- content_for :title, t("access_authorizations.new.page_title") = render "form" diff --git a/app/views/access_authorizations/show.html.haml b/app/views/access_authorizations/show.html.haml index 17d1d9b..f39a509 100644 --- a/app/views/access_authorizations/show.html.haml +++ b/app/views/access_authorizations/show.html.haml @@ -1,4 +1,4 @@ -- title t("access_authorizations.show.page_title") +- content_for :title, t("access_authorizations.show.page_title") %p %strong= t('access_authorizations.show.name') + ":" diff --git a/app/views/acd_agents/_index_core.html.haml b/app/views/acd_agents/_index_core.html.haml index 7cb1aae..c082fd1 100644 --- a/app/views/acd_agents/_index_core.html.haml +++ b/app/views/acd_agents/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('acd_agents.index.name') %th= t('acd_agents.index.status') @@ -6,9 +6,9 @@ %th= t('acd_agents.index.calls_answered') %th= t('acd_agents.index.destination') - - reset_cycle + - for acd_agent in acd_agents - %tr{:class => cycle('odd', 'even')} + %tr %td= acd_agent.name %td= acd_agent.status %td= acd_agent.last_call diff --git a/app/views/acd_agents/edit.html.haml b/app/views/acd_agents/edit.html.haml index 8ab14b8..41671b2 100644 --- a/app/views/acd_agents/edit.html.haml +++ b/app/views/acd_agents/edit.html.haml @@ -1,3 +1,3 @@ -- title t("acd_agents.edit.page_title") +- content_for :title, t("acd_agents.edit.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/acd_agents/index.html.haml b/app/views/acd_agents/index.html.haml index d586dcf..ddf5fde 100644 --- a/app/views/acd_agents/index.html.haml +++ b/app/views/acd_agents/index.html.haml @@ -1,4 +1,4 @@ -- title t("acd_agents.index.page_title") +- content_for :title, t("acd_agents.index.page_title") - if @acd_agents && @acd_agents.count > 0 = render "index_core", :acd_agents => @acd_agents diff --git a/app/views/acd_agents/new.html.haml b/app/views/acd_agents/new.html.haml index 546136b..fb4d256 100644 --- a/app/views/acd_agents/new.html.haml +++ b/app/views/acd_agents/new.html.haml @@ -1,3 +1,3 @@ -- title t("acd_agents.new.page_title") +- content_for :title, t("acd_agents.new.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/acd_agents/show.html.haml b/app/views/acd_agents/show.html.haml index 0c90f4b..39c0036 100644 --- a/app/views/acd_agents/show.html.haml +++ b/app/views/acd_agents/show.html.haml @@ -1,4 +1,4 @@ -- title t("acd_agents.show.page_title") +- content_for :title, t("acd_agents.show.page_title") %p %strong= t('acd_agents.show.name') + ":" diff --git a/app/views/acd_callers/_index_core.html.haml b/app/views/acd_callers/_index_core.html.haml index 958b3ff..79aa974 100644 --- a/app/views/acd_callers/_index_core.html.haml +++ b/app/views/acd_callers/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('acd_callers.index.channel_uuid') %th= t('acd_callers.index.automatic_call_distributor_id') @@ -8,9 +8,9 @@ %th= t('acd_callers.index.callback_number') %th= t('acd_callers.index.callback_attempts') - - reset_cycle + - for acd_caller in acd_callers - %tr{:class => cycle('odd', 'even')} + %tr %td= acd_caller.channel_uuid %td= acd_caller.automatic_call_distributor_id %td= acd_caller.status diff --git a/app/views/acd_callers/index.html.haml b/app/views/acd_callers/index.html.haml index 70439ed..7047600 100644 --- a/app/views/acd_callers/index.html.haml +++ b/app/views/acd_callers/index.html.haml @@ -1,4 +1,4 @@ -- title t("acd_callers.index.page_title") +- content_for :title, t("acd_callers.index.page_title") - if @acd_callers && @acd_callers.count > 0 = render "index_core", :acd_callers => @acd_callers diff --git a/app/views/acd_callers/show.html.haml b/app/views/acd_callers/show.html.haml index 0ce8345..060f829 100644 --- a/app/views/acd_callers/show.html.haml +++ b/app/views/acd_callers/show.html.haml @@ -1,4 +1,4 @@ -- title t("acd_callers.show.page_title") +- content_for :title, t("acd_callers.show.page_title") %p %strong= t('acd_callers.show.channel_uuid') + ":" diff --git a/app/views/addresses/_index_core.html.haml b/app/views/addresses/_index_core.html.haml index 2050ded..3645009 100644 --- a/app/views/addresses/_index_core.html.haml +++ b/app/views/addresses/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('addresses.index.phone_book_entry_id') %th= t('addresses.index.line1') @@ -9,9 +9,9 @@ %th= t('addresses.index.country_id') %th= t('addresses.index.position') - - reset_cycle + - for address in addresses - %tr{:class => cycle('odd', 'even')} + %tr %td= address.phone_book_entry_id %td= address.line1 %td= address.line2 diff --git a/app/views/addresses/edit.html.haml b/app/views/addresses/edit.html.haml index 3d85ae6..a9e482f 100644 --- a/app/views/addresses/edit.html.haml +++ b/app/views/addresses/edit.html.haml @@ -1,4 +1,4 @@ -- title t("addresses.edit.page_title") +- content_for :title, t("addresses.edit.page_title") = render "form" diff --git a/app/views/addresses/index.html.haml b/app/views/addresses/index.html.haml index ecebc65..615f267 100644 --- a/app/views/addresses/index.html.haml +++ b/app/views/addresses/index.html.haml @@ -1,4 +1,4 @@ -- title t("addresses.index.page_title") +- content_for :title, t("addresses.index.page_title") - if @addresses.count > 0 = render "index_core", :addresses => @addresses diff --git a/app/views/addresses/new.html.haml b/app/views/addresses/new.html.haml index 280de55..e75b55a 100644 --- a/app/views/addresses/new.html.haml +++ b/app/views/addresses/new.html.haml @@ -1,3 +1,3 @@ -- title t("addresses.new.page_title") +- content_for :title, t("addresses.new.page_title") = render "form" diff --git a/app/views/addresses/show.html.haml b/app/views/addresses/show.html.haml index 211d020..6c8c651 100644 --- a/app/views/addresses/show.html.haml +++ b/app/views/addresses/show.html.haml @@ -1,4 +1,4 @@ -- title t("addresses.show.page_title") +- content_for :title, t("addresses.show.page_title") %p %strong= t('addresses.show.phone_book_entry_id') + ":" diff --git a/app/views/automatic_call_distributors/_form_core.html.haml b/app/views/automatic_call_distributors/_form_core.html.haml index 77a38a6..d315ff3 100644 --- a/app/views/automatic_call_distributors/_form_core.html.haml +++ b/app/views/automatic_call_distributors/_form_core.html.haml @@ -1,5 +1,5 @@ .inputs - = f.input :name, :label => t('automatic_call_distributors.form.name.label'), :hint => conditional_hint('automatic_call_distributors.form.name.hint') + = f.input :name, :label => t('automatic_call_distributors.form.name.label'), :hint => conditional_hint('automatic_call_distributors.form.name.hint'), :autofocus => true = f.input :strategy, :label => t('automatic_call_distributors.form.strategy.label'), :hint => conditional_hint('automatic_call_distributors.form.strategy.hint'), :include_blank => false, :as => :select, :collection => strategies = f.input :max_callers, :label => t('automatic_call_distributors.form.max_callers.label'), :hint => conditional_hint('automatic_call_distributors.form.max_callers.hint') = f.input :agent_timeout, :label => t('automatic_call_distributors.form.agent_timeout.label'), :hint => conditional_hint('automatic_call_distributors.form.agent_timeout.hint') diff --git a/app/views/automatic_call_distributors/_index_core.html.haml b/app/views/automatic_call_distributors/_index_core.html.haml index c31a648..50908f4 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 +%table{:class => 'table table-striped'} %tr %th= t('automatic_call_distributors.index.name') %th= t('automatic_call_distributors.index.strategy') @@ -10,9 +10,9 @@ %th= t('automatic_call_distributors.index.phone_numbers') %th= t('automatic_call_distributors.index.acd_agents') - - reset_cycle + - for automatic_call_distributor in automatic_call_distributors - %tr{:class => cycle('odd', 'even')} + %tr %td= automatic_call_distributor.name %td= t("automatic_call_distributors.strategies.#{automatic_call_distributor.strategy}") %td= automatic_call_distributor.max_callers diff --git a/app/views/automatic_call_distributors/edit.html.haml b/app/views/automatic_call_distributors/edit.html.haml index 28cba74..c776945 100644 --- a/app/views/automatic_call_distributors/edit.html.haml +++ b/app/views/automatic_call_distributors/edit.html.haml @@ -1,3 +1,3 @@ -- title t("automatic_call_distributors.edit.page_title") +- content_for :title, t("automatic_call_distributors.edit.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/automatic_call_distributors/index.html.haml b/app/views/automatic_call_distributors/index.html.haml index f3f8b2b..4f2d040 100644 --- a/app/views/automatic_call_distributors/index.html.haml +++ b/app/views/automatic_call_distributors/index.html.haml @@ -1,4 +1,4 @@ -- title t("automatic_call_distributors.index.page_title") +- content_for :title, t("automatic_call_distributors.index.page_title") - if @automatic_call_distributors && @automatic_call_distributors.count > 0 = render "index_core", :automatic_call_distributors => @automatic_call_distributors diff --git a/app/views/automatic_call_distributors/new.html.haml b/app/views/automatic_call_distributors/new.html.haml index 96a2d93..72817a7 100644 --- a/app/views/automatic_call_distributors/new.html.haml +++ b/app/views/automatic_call_distributors/new.html.haml @@ -1,3 +1,3 @@ -- title t("automatic_call_distributors.new.page_title") +- content_for :title, t("automatic_call_distributors.new.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/automatic_call_distributors/show.html.haml b/app/views/automatic_call_distributors/show.html.haml index 53ce127..c29f2df 100644 --- a/app/views/automatic_call_distributors/show.html.haml +++ b/app/views/automatic_call_distributors/show.html.haml @@ -1,6 +1,6 @@ -- title t("automatic_call_distributors.show.page_title") +- content_for :title, t("automatic_call_distributors.show.page_title") -%table +%table{:class => 'table table-striped'} %tr %th= t('automatic_call_distributors.show.name') + ":" %td= @automatic_call_distributor.name diff --git a/app/views/call_forwards/_form_core.html.haml b/app/views/call_forwards/_form_core.html.haml index 3dadb68..b751fb3 100644 --- a/app/views/call_forwards/_form_core.html.haml +++ b/app/views/call_forwards/_form_core.html.haml @@ -1,5 +1,5 @@ .inputs - = f.input :call_forward_case_id, :as => :select, :collection => @available_call_forward_cases.map {|x| [I18n.t("call_forward_cases.#{x.value}"), x.id] }, :label => t('call_forwards.form.call_forward_case_id.label'), :hint => conditional_hint('call_forwards.form.call_forward_case_id.hint'), :include_blank => false + = f.input :call_forward_case_id, :as => :select, :collection => @available_call_forward_cases.map {|x| [I18n.t("call_forward_cases.#{x.value}"), x.id] }, :label => t('call_forwards.form.call_forward_case_id.label'), :hint => conditional_hint('call_forwards.form.call_forward_case_id.hint'), :include_blank => false, :autofocus => true = f.input :timeout, :label => t('call_forwards.form.timeout.label'), :hint => conditional_hint('call_forwards.form.timeout.hint') = f.input :call_forwarding_destination , :as => :select, :collection => @call_forwarding_destinations, :label => t('call_forwards.form.call_forwarding_destination.label'), :hint => conditional_hint('call_forwards.form.call_forwarding_destination.hint'), :include_blank => false @@ -9,7 +9,7 @@ = f.input :source, :label => t('call_forwards.form.source.label'), :hint => conditional_hint('call_forwards.form.source.hint') - if GuiFunction.display?('depth_field_in_call_forward_form', current_user) - = f.input :depth, :collection => 1..MAX_CALL_FORWARD_DEPTH, :label => t('call_forwards.form.depth.label'), :hint => conditional_hint('call_forwards.form.depth.hint') + = f.input :depth, :collection => 1..GsParameter.get('MAX_CALL_FORWARD_DEPTH'), :label => t('call_forwards.form.depth.label'), :hint => conditional_hint('call_forwards.form.depth.hint') - else = f.hidden_field :depth = f.input :active, :label => t('call_forwards.form.active.label'), :hint => conditional_hint('call_forwards.form.active.hint') diff --git a/app/views/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml index 7733855..27ad86f 100644 --- a/app/views/call_forwards/_index_core.html.haml +++ b/app/views/call_forwards/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr - if !@phone_number %th= t('call_forwards.index.phone_number_id') @@ -10,9 +10,9 @@ %th= t('call_forwards.index.depth') %th= t('call_forwards.index.active') - - reset_cycle + - for call_forward in call_forwards - %tr{:class => cycle('odd', 'even')} + %tr - if !@phone_number %td= call_forward.phone_number %td= t("call_forward_cases.#{call_forward.call_forward_case.value}") diff --git a/app/views/call_forwards/edit.html.haml b/app/views/call_forwards/edit.html.haml index 5fa9dcd..f55052b 100644 --- a/app/views/call_forwards/edit.html.haml +++ b/app/views/call_forwards/edit.html.haml @@ -1,3 +1,3 @@ -- title t("call_forwards.edit.page_title", :resource => " for phone number #{@phone_number}" ) +- content_for :title, t("call_forwards.edit.page_title", :resource => " for phone number #{@phone_number}" ) = render "form"
\ No newline at end of file diff --git a/app/views/call_forwards/index.html.haml b/app/views/call_forwards/index.html.haml index 93d64f2..91b923a 100644 --- a/app/views/call_forwards/index.html.haml +++ b/app/views/call_forwards/index.html.haml @@ -1,4 +1,4 @@ -- title t("call_forwards.index.page_title") +- content_for :title, t("call_forwards.index.page_title") - if @call_forwards.count > 0 = render "index_core", :call_forwards => @call_forwards diff --git a/app/views/call_forwards/new.html.haml b/app/views/call_forwards/new.html.haml index 960a9e6..bb0c983 100644 --- a/app/views/call_forwards/new.html.haml +++ b/app/views/call_forwards/new.html.haml @@ -1,3 +1,3 @@ -- title t("call_forwards.new.page_title") +- content_for :title, t("call_forwards.new.page_title") = render "form" diff --git a/app/views/call_forwards/show.html.haml b/app/views/call_forwards/show.html.haml index 6d1a0c6..c2187b1 100644 --- a/app/views/call_forwards/show.html.haml +++ b/app/views/call_forwards/show.html.haml @@ -1,4 +1,4 @@ -- title t("call_forwards.show.page_title") +- content_for :title, t("call_forwards.show.page_title") %p %strong= t('call_forwards.show.phone_number_id') + ":" diff --git a/app/views/call_histories/_index_core.html.haml b/app/views/call_histories/_index_core.html.haml index 2d7658a..f9d2150 100644 --- a/app/views/call_histories/_index_core.html.haml +++ b/app/views/call_histories/_index_core.html.haml @@ -1,65 +1,58 @@ -= form_tag(destroy_multiple_sip_account_call_histories_path(@sip_account), :method => :delete, :id => 'call_history_form') do - %header.entries-nav= render :partial => "call_histories/navigation" - .content - %table - - reset_cycle - - 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{:class => cycle('odd', 'even')} - %td.select_box= check_box_tag("selected_ids[]", call_history.id, false, :id => "select_item_#{call_history.id}", :class => 'select_item') - %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")) - - 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 += render :partial => "call_histories/navigation" - %footer.entries-nav= render :partial => "call_histories/navigation" - = image_submit_tag('icons/cross-16x.png', :confirm => t("call_histories.index.actions.confirm_selected")) - = t("call_histories.index.actions.destroy_multiple") +%table{:class => 'table table-striped'} + - for call_history in call_histories + - phone_number = call_history.display_number + - voicemail_message = call_history.voicemail_message + - if phone_number + - phone_book_entry = call_history.phone_book_entry_by_number(phone_number) + %tr.call-history-entry + %td.thumbnail + - image = call_history.display_image(:small, phone_book_entry) + - if image + = image_tag(image, :itemprop => 'image') + %td.time + - if voicemail_message + .voicemail-message + %a{:href => sip_account_voicemail_messages_path(@sip_account, :anchor => "message_#{voicemail_message.id}")} + = image_tag('icons/gs_envelope_16x.png', :class => 'display') + = call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format")) + - elsif call_history.entry_type == 'forwarded' + .call-forwarded= call_history.display_call_date(t("call_histories.index.date_format"), t("call_histories.index.date_today_format")) + - if call_history.callee_account_type.to_s.downcase == 'voicemail' + = t("call_histories.index.voicemail") + - 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 diff --git a/app/views/call_histories/_navigation.html.haml b/app/views/call_histories/_navigation.html.haml index a1999d9..d72ad64 100644 --- a/app/views/call_histories/_navigation.html.haml +++ b/app/views/call_histories/_navigation.html.haml @@ -1,11 +1,14 @@ -%nav - %ol.abc - %li - %a{ :href => "?type=" }= t("call_histories.index.navigation.all", :calls => @calls_count) - %a{ :href => "?type=missed" }= t("call_histories.index.navigation.missed", :calls => @calls_missed_count) - %a{ :href => "?type=received" }= t("call_histories.index.navigation.received", :calls => @calls_received_count) - %a{ :href => "?type=dialed" }= t("call_histories.index.navigation.dialed", :calls => @calls_dialed_count) - %a{ :href => "?type=forwarded" }= t("call_histories.index.navigation.forwarded", :calls => @calls_forwarded_count) +%ul{:class => 'nav nav-pills'} + %li + %a{ :href => "?type=" }= t("call_histories.index.navigation.all", :calls => @calls_count) + %li + %a{ :href => "?type=missed" }= t("call_histories.index.navigation.missed", :calls => @calls_missed_count) + %li + %a{ :href => "?type=received" }= t("call_histories.index.navigation.received", :calls => @calls_received_count) + %li + %a{ :href => "?type=dialed" }= t("call_histories.index.navigation.dialed", :calls => @calls_dialed_count) + %li + %a{ :href => "?type=forwarded" }= t("call_histories.index.navigation.forwarded", :calls => @calls_forwarded_count) -.pagination - = will_paginate @call_histories +/ .pagination +/ = will_paginate @call_histories diff --git a/app/views/call_histories/index.html.haml b/app/views/call_histories/index.html.haml index adf6838..a939387 100644 --- a/app/views/call_histories/index.html.haml +++ b/app/views/call_histories/index.html.haml @@ -1,6 +1,6 @@ - if @type - - title t("call_histories.index.page_title_#{@type}") + - content_for :title, t("call_histories.index.page_title_#{@type}") - else - - title t("call_histories.index.page_title") + - content_for :title, t("call_histories.index.page_title") = render "index_core", :call_histories => @call_histories diff --git a/app/views/call_routes/_form.html.haml b/app/views/call_routes/_form.html.haml new file mode 100644 index 0000000..1415852 --- /dev/null +++ b/app/views/call_routes/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@call_route) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('call_routes.form.submit')
\ No newline at end of file diff --git a/app/views/call_routes/_form_core.html.haml b/app/views/call_routes/_form_core.html.haml new file mode 100644 index 0000000..b64d660 --- /dev/null +++ b/app/views/call_routes/_form_core.html.haml @@ -0,0 +1,5 @@ +.inputs + = f.input :routing_table, :collection => CallRoute::ROUTING_TABLES, :label => t('call_routes.form.table.label'), :hint => conditional_hint('call_routes.form.table.hint'), :include_blank => false, :autofocus => true + = f.input :name, :label => t('call_routes.form.name.label'), :hint => conditional_hint('call_routes.form.name.hint') + = f.input :endpoint_type, :label => t('call_routes.form.endpoint_type.label'), :hint => conditional_hint('call_routes.form.endpoint_type.hint') + = f.input :endpoint_id, :label => t('call_routes.form.endpoint_id.label'), :hint => conditional_hint('call_routes.form.endpoint_id.hint') diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml new file mode 100644 index 0000000..5dc7c21 --- /dev/null +++ b/app/views/call_routes/_index_core.html.haml @@ -0,0 +1,21 @@ +- 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 diff --git a/app/views/call_routes/edit.html.haml b/app/views/call_routes/edit.html.haml new file mode 100644 index 0000000..6048200 --- /dev/null +++ b/app/views/call_routes/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("call_routes.edit.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/call_routes/index.html.haml b/app/views/call_routes/index.html.haml new file mode 100644 index 0000000..bd4468c --- /dev/null +++ b/app/views/call_routes/index.html.haml @@ -0,0 +1,11 @@ +- content_for :title, t("call_routes.index.page_title") + +- if @call_routes && @call_routes.count > 0 + %table{:class => 'table table-striped'} + - @routing_tables.each do |routing_table| + %tr + %td{:colspan => 3} + %h3= routing_table + = render "index_core", :call_routes => @call_routes.where(:routing_table => routing_table) + += render :partial => 'shared/create_link', :locals => {:child_class => CallRoute} diff --git a/app/views/call_routes/new.html.haml b/app/views/call_routes/new.html.haml new file mode 100644 index 0000000..28aead9 --- /dev/null +++ b/app/views/call_routes/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("call_routes.new.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml new file mode 100644 index 0000000..70fe13e --- /dev/null +++ b/app/views/call_routes/show.html.haml @@ -0,0 +1,22 @@ +- content_for :title, t("call_routes.show.page_title") + +%p + %strong= t('call_routes.show.table') + ":" + = @call_route.routing_table +%p + %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 + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route } + +%h3= t('route_elements.index.page_title') +- if @call_route.route_elements && @call_route.route_elements.count > 0 + = render "route_elements/index_core", :route_elements => @call_route.route_elements + += render :partial => 'shared/create_link', :locals => { :parent => @call_route, :child_class => RouteElement } diff --git a/app/views/calls/_index_core.html.haml b/app/views/calls/_index_core.html.haml index ddd0650..09b7da6 100644 --- a/app/views/calls/_index_core.html.haml +++ b/app/views/calls/_index_core.html.haml @@ -1,9 +1,9 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('calls.index.uuid') - - reset_cycle + - for call in @calls - %tr{:class => cycle('odd', 'even')} + %tr %td = call.uuid diff --git a/app/views/calls/index.html.haml b/app/views/calls/index.html.haml index 4ea60a6..be678cd 100644 --- a/app/views/calls/index.html.haml +++ b/app/views/calls/index.html.haml @@ -1,4 +1,4 @@ -- title t("calls.index.page_title") +- content_for :title, t("calls.index.page_title") - if @calls.count > 0 = render "index_core", :calls => @calls diff --git a/app/views/callthroughs/_form_core.html.haml b/app/views/callthroughs/_form_core.html.haml index 1f137d9..cf05e06 100644 --- a/app/views/callthroughs/_form_core.html.haml +++ b/app/views/callthroughs/_form_core.html.haml @@ -15,7 +15,7 @@ = f.simple_fields_for :access_authorizations do |access_authorization| = render "access_authorizations/form_core", :f => access_authorization - - if CALLTHROUGH_HAS_WHITELISTS == true + - if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true - if @callthrough && @callthrough.whitelists.size > 0 %h2= t('callthroughs.form.whitelists.label') - if !t('callthroughs.form.whitelists.hint').blank? diff --git a/app/views/callthroughs/_index_core.html.haml b/app/views/callthroughs/_index_core.html.haml index f1802d4..d1c171b 100644 --- a/app/views/callthroughs/_index_core.html.haml +++ b/app/views/callthroughs/_index_core.html.haml @@ -1,17 +1,17 @@ -%table +%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 CALLTHROUGH_HAS_WHITELISTS == true + - if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true %th= t('callthroughs.index.whitelist_phone_numbers') - - reset_cycle + - for callthrough in callthroughs - %tr{:class => cycle('odd', 'even')} + %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 CALLTHROUGH_HAS_WHITELISTS == true + - 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/callthroughs/edit.html.haml b/app/views/callthroughs/edit.html.haml index 44fe17e..26fd026 100644 --- a/app/views/callthroughs/edit.html.haml +++ b/app/views/callthroughs/edit.html.haml @@ -1,3 +1,3 @@ -- title t("callthroughs.edit.page_title") +- content_for :title, t("callthroughs.edit.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/callthroughs/index.html.haml b/app/views/callthroughs/index.html.haml index c595351..bb3ab63 100644 --- a/app/views/callthroughs/index.html.haml +++ b/app/views/callthroughs/index.html.haml @@ -1,4 +1,4 @@ -- title t("callthroughs.index.page_title") +- content_for :title, t("callthroughs.index.page_title") - if @callthroughs.count > 0 = render "index_core", :callthroughs => @callthroughs diff --git a/app/views/callthroughs/new.html.haml b/app/views/callthroughs/new.html.haml index ff47c1c..deabb71 100644 --- a/app/views/callthroughs/new.html.haml +++ b/app/views/callthroughs/new.html.haml @@ -1,3 +1,3 @@ -- title t("callthroughs.new.page_title") +- content_for :title, t("callthroughs.new.page_title") = render "form" diff --git a/app/views/callthroughs/show.html.haml b/app/views/callthroughs/show.html.haml index 55bd6eb..da1a676 100644 --- a/app/views/callthroughs/show.html.haml +++ b/app/views/callthroughs/show.html.haml @@ -1,4 +1,4 @@ -- title t("callthroughs.show.page_title") +- content_for :title, t("callthroughs.show.page_title") %p %strong= t('callthroughs.show.name') + ":" @@ -19,7 +19,7 @@ %br = render :partial => 'shared/create_link', :locals => {:parent => @callthrough, :child_class => AccessAuthorization} -- if CALLTHROUGH_HAS_WHITELISTS == true +- if GsParameter.get('CALLTHROUGH_HAS_WHITELISTS') == true %h2= t('callthroughs.form.whitelists.label') - if @callthrough.whitelisted_phone_numbers.count > 0 = render 'whitelists/index_core', :whitelists => @callthrough.whitelists diff --git a/app/views/conference_invitees/_index_core.html.haml b/app/views/conference_invitees/_index_core.html.haml index f84af7d..1d6ab2e 100644 --- a/app/views/conference_invitees/_index_core.html.haml +++ b/app/views/conference_invitees/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('conference_invitees.index.phone_book_entry_id') %th= t('conference_invitees.index.phone_number') @@ -6,9 +6,9 @@ %th= t('conference_invitees.index.speaker') %th= t('conference_invitees.index.moderator') - - reset_cycle + - for conference_invitee in conference_invitees - %tr{:class => cycle('odd', 'even')} + %tr %td= conference_invitee.phone_book_entry || '-' %td= conference_invitee.phone_number %td= conference_invitee.pin diff --git a/app/views/conference_invitees/edit.html.haml b/app/views/conference_invitees/edit.html.haml index ce90bbe..24c843f 100644 --- a/app/views/conference_invitees/edit.html.haml +++ b/app/views/conference_invitees/edit.html.haml @@ -1,3 +1,3 @@ -- title t("conference_invitees.edit.page_title") +- content_for :title, t("conference_invitees.edit.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/conference_invitees/index.html.haml b/app/views/conference_invitees/index.html.haml index 2a0c26c..846be44 100644 --- a/app/views/conference_invitees/index.html.haml +++ b/app/views/conference_invitees/index.html.haml @@ -1,4 +1,4 @@ -- title t("conference_invitees.index.page_title") +- content_for :title, t("conference_invitees.index.page_title") - if @conference_invitees.count > 0 = render "index_core", :conference_invitees => @conference_invitees diff --git a/app/views/conference_invitees/new.html.haml b/app/views/conference_invitees/new.html.haml index 780494e..1957d5d 100644 --- a/app/views/conference_invitees/new.html.haml +++ b/app/views/conference_invitees/new.html.haml @@ -1,3 +1,3 @@ -- title t("conference_invitees.new.page_title") +- content_for :title, t("conference_invitees.new.page_title") = render "form" diff --git a/app/views/conference_invitees/show.html.haml b/app/views/conference_invitees/show.html.haml index 57c5627..12fcbd1 100644 --- a/app/views/conference_invitees/show.html.haml +++ b/app/views/conference_invitees/show.html.haml @@ -1,4 +1,4 @@ -- title t("conference_invitees.show.page_title") +- content_for :title, t("conference_invitees.show.page_title") %p %strong= t('conference_invitees.show.conference_id') + ":" diff --git a/app/views/conferences/_form_core.html.haml b/app/views/conferences/_form_core.html.haml index 04754de..f8d6c8e 100644 --- a/app/views/conferences/_form_core.html.haml +++ b/app/views/conferences/_form_core.html.haml @@ -5,7 +5,7 @@ = f.input :end, :label => t('conferences.form.end.label'), :hint => conditional_hint('conferences.form.end.hint'), :include_blank => true, :start_year => Time.now.year, :end_year => Time.now.year + 2 = f.input :description, :label => t('conferences.form.description.label'), :hint => conditional_hint('conferences.form.description.hint') = f.input :pin, :label => t('conferences.form.pin.label'), :hint => conditional_hint('conferences.form.pin.hint') - = f.input :max_members, :collection => 1..MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE, :include_blank => false, :label => t('conferences.form.max_members.label'), :hint => conditional_hint('conferences.form.max_members.hint') + = f.input :max_members, :collection => 1..GsParameter.get('MAXIMUM_NUMBER_OF_PEOPLE_IN_A_CONFERENCE'), :include_blank => false, :label => t('conferences.form.max_members.label'), :hint => conditional_hint('conferences.form.max_members.hint') = f.input :open_for_anybody, :label => t('conferences.form.open_for_anybody.label'), :hint => conditional_hint('conferences.form.open_for_anybody.hint') = f.input :announce_new_member_by_name, :label => t('conferences.form.announce_new_member_by_name.label'), :hint => conditional_hint('conferences.form.announce_new_member_by_name.hint') = f.input :announce_left_member_by_name, :label => t('conferences.form.announce_left_member_by_name.label'), :hint => conditional_hint('conferences.form.announce_left_member_by_name.hint')
\ 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 4073e83..50ea1c8 100644 --- a/app/views/conferences/_index_core.html.haml +++ b/app/views/conferences/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%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 @@ -11,10 +11,10 @@ %th= t('conferences.index.number_of_invitees') %th= t('conferences.index.flags') - - reset_cycle + - for conference in conferences - parent = conference.conferenceable - %tr{:class => cycle('odd', 'even')} + %tr %td= conference.name - if !conferences.respond_to?('where') || conferences.where(:start => nil).where(:end => nil).count != conferences.count %td diff --git a/app/views/conferences/edit.html.haml b/app/views/conferences/edit.html.haml index bc190e7..d5ec058 100644 --- a/app/views/conferences/edit.html.haml +++ b/app/views/conferences/edit.html.haml @@ -1,3 +1,3 @@ -- title t("conferences.edit.page_title") +- content_for :title, t("conferences.edit.page_title") = render "form" diff --git a/app/views/conferences/index.html.haml b/app/views/conferences/index.html.haml index 0324acd..08f5cc1 100644 --- a/app/views/conferences/index.html.haml +++ b/app/views/conferences/index.html.haml @@ -1,4 +1,4 @@ -- title t("conferences.index.page_title") +- content_for :title, t("conferences.index.page_title") - if @conferences.count > 0 = render "index_core", :conferences => @conferences diff --git a/app/views/conferences/new.html.haml b/app/views/conferences/new.html.haml index 102f6a9..2dcb125 100644 --- a/app/views/conferences/new.html.haml +++ b/app/views/conferences/new.html.haml @@ -1,3 +1,3 @@ -- title t("conferences.new.page_title") +- content_for :title, t("conferences.new.page_title") = render "form" diff --git a/app/views/conferences/show.html.haml b/app/views/conferences/show.html.haml index 10ebaed..0afa822 100644 --- a/app/views/conferences/show.html.haml +++ b/app/views/conferences/show.html.haml @@ -1,4 +1,4 @@ -- title t("conferences.show.page_title") +- content_for :title, t("conferences.show.page_title") %p %strong= t('conferences.show.name') + ":" diff --git a/app/views/config_polycom/_call_history.xml.haml b/app/views/config_polycom/_call_history.xml.haml index 7d23edd..4ecb8fe 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{ :border => 0 } + %table{:class => '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 1066695..3867f41 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{ :border => 0 } + %table{:class => 'table table-striped'}{ :border => 0 } %tbody - @phone_xml_object[:entries].each do |entry| %tr diff --git a/app/views/config_snom/show.xml.haml b/app/views/config_snom/show.xml.haml index d9953c5..5f53802 100644 --- a/app/views/config_snom/show.xml.haml +++ b/app/views/config_snom/show.xml.haml @@ -48,8 +48,8 @@ %use_proxy_number_guessing{:perm => 'RW'}= 'off' %guess_number{:perm => 'RW'}= 'off' %guess_start_length{:perm => 'RW'}= '3' - %ieee8021x_eap_md5_username{:perm => 'RW'}= PROVISIONING_IEEE8021X_EAP_USERNAME - %ieee8021x_eap_md5_password{:perm => 'RW'}= PROVISIONING_IEEE8021X_EAP_PASSWORD + %ieee8021x_eap_md5_username{:perm => 'RW'}= GsParameter.get('PROVISIONING_IEEE8021X_EAP_USERNAME') + %ieee8021x_eap_md5_password{:perm => 'RW'}= GsParameter.get('PROVISIONING_IEEE8021X_EAP_PASSWORD') - 0.upto(9) do |ringer_idx| %internal_ringer_text{:idx => ringer_idx, :perm => 'RW'}= "Ringer#{(ringer_idx+1)}" @@ -68,6 +68,11 @@ %dkey_conf{:perm => 'RW'}= @dkeys[:conf] %dkey_redial{:perm => 'RW'}= @dkeys[:redial] %dkey_directory{:perm => 'RW'}= @dkeys[:directory] + %dkey_touch_idle_adr_book{:perm => 'RW'}= @dkeys[:touch_idle_adr_book] + %dkey_touch_idle_list_missed{:perm => 'RW'}= @dkeys[:touch_idle_list_missed] + %dkey_touch_idle_list_taken{:perm => 'RW'}= @dkeys[:touch_idle_list_taken] + %dkey_touch_idle_redial{:perm => 'RW'}= @dkeys[:touch_idle_redial] + %dkey_touch_idle_dialog{:perm => 'RW'}= @dkeys[:touch_idle_dialog] %idle_ok_key_action{:perm => 'RW'}= @dkeys[:idle_ok] %idle_cancel_key_action{:perm => 'RW'}= @dkeys[:idle_cancel] @@ -76,6 +81,29 @@ %idle_left_key_action{:perm => 'RW'}= @dkeys[:idle_left] %idle_right_key_action{:perm => 'RW'}= @dkeys[:idle_right] + / Display + %backlight{:perm => 'RW'}= '15' + %backlight_idle{:perm => 'RW'}= '0' + %dim_timer{:perm => 'RW'}= '300' + + - if @phone.phone_model.name == 'Snom 870' + / Snom 870 idle icons + %idle_icon_01{:perm => 'RW'}= '9' + %idle_icon_02{:perm => 'RW'}= '20' + %idle_icon_03{:perm => 'RW'}= '4' + %idle_icon_04{:perm => 'RW'}= '-1' + %idle_icon_05{:perm => 'RW'}= '6' + %idle_icon_06{:perm => 'RW'}= '-1' + %idle_icon_07{:perm => 'RW'}= '-1' + %idle_icon_08{:perm => 'RW'}= '-1' + %idle_icon_09{:perm => 'RW'}= '-1' + %idle_icon_10{:perm => 'RW'}= '-1' + %idle_icon_11{:perm => 'RW'}= '15' + %idle_icon_12{:perm => 'RW'}= '-1' + %idle_icon_13{:perm => 'RW'}= '-1' + %idle_icon_14{:perm => 'RW'}= '13' + %idle_icon_15{:perm => 'RW'}= '12' + != "\<!-- sip accounts: #{@sip_accounts.count} --\>" - @sip_accounts.each_with_index do |sip_account, array_index| - index = array_index + 1 @@ -148,4 +176,5 @@ %uploads - if @state_settings_url + / Phone menu %file{:url => @state_settings_url, :type => "gui_xml_state_settings"} diff --git a/app/views/config_snom/state_settings.xml.haml b/app/views/config_snom/state_settings.xml.haml index ac0e872..6be1efc 100644 --- a/app/views/config_snom/state_settings.xml.haml +++ b/app/views/config_snom/state_settings.xml.haml @@ -1,5 +1,5 @@ !!! XML -%SnomIPPhoneMenu{:state => 'relevant', :title => "Gemeinschaft #{GEMEINSCHAFT_VERSION}"} +%SnomIPPhoneMenu{:state => 'relevant', :title => "Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}"} %MenuItem{:name => '$(lang:menu100_phone_book)'} %URL= "#{@base_url}/#{@sip_account_ids.first}/phone_book.xml" %Menu{:name => '$(lang:menu100_call_lists)'} diff --git a/app/views/fax_accounts/_index_core.html.haml b/app/views/fax_accounts/_index_core.html.haml index 50dc2eb..5a04bf0 100644 --- a/app/views/fax_accounts/_index_core.html.haml +++ b/app/views/fax_accounts/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('fax_accounts.index.name') %th @@ -13,9 +13,9 @@ %small = t('fax_accounts.index.last_update') - - reset_cycle + - for fax_account in fax_accounts - %tr{:class => cycle('odd', 'even')} + %tr %td= truncate(fax_account.name, :length => 15) %td =render 'phone_numbers/listing', :phone_numbers => fax_account.phone_numbers.order(:number) diff --git a/app/views/fax_accounts/edit.html.haml b/app/views/fax_accounts/edit.html.haml index 86f664d..3cdc655 100644 --- a/app/views/fax_accounts/edit.html.haml +++ b/app/views/fax_accounts/edit.html.haml @@ -1,3 +1,3 @@ -- title t("fax_accounts.edit.page_title") +- content_for :title, t("fax_accounts.edit.page_title") = render "form" diff --git a/app/views/fax_accounts/index.html.haml b/app/views/fax_accounts/index.html.haml index 309a10d..9710454 100644 --- a/app/views/fax_accounts/index.html.haml +++ b/app/views/fax_accounts/index.html.haml @@ -1,4 +1,4 @@ -- title t("fax_accounts.index.page_title") +- content_for :title, t("fax_accounts.index.page_title") - if @fax_accounts.count > 0 = render "index_core", {:fax_accounts => @fax_accounts, :fax_accountable => @parent} diff --git a/app/views/fax_accounts/new.html.haml b/app/views/fax_accounts/new.html.haml index 9a67100..eff9347 100644 --- a/app/views/fax_accounts/new.html.haml +++ b/app/views/fax_accounts/new.html.haml @@ -1,3 +1,3 @@ -- title t("fax_accounts.new.page_title") +- content_for :title, t("fax_accounts.new.page_title") = render "form" diff --git a/app/views/fax_accounts/show.html.haml b/app/views/fax_accounts/show.html.haml index 95fb7b2..1a32121 100644 --- a/app/views/fax_accounts/show.html.haml +++ b/app/views/fax_accounts/show.html.haml @@ -1,4 +1,4 @@ -- title t("fax_accounts.show.page_title") +- content_for :title, t("fax_accounts.show.page_title") %p %strong= t('fax_accounts.show.name') + ":" diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml index 4e15509..1265716 100644 --- a/app/views/fax_documents/_index_core.html.haml +++ b/app/views/fax_documents/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('fax_documents.index.sent_at') %th= t('fax_documents.index.state') @@ -9,9 +9,9 @@ = t('fax_documents.index.remote_station_id') %th= t('fax_documents.index.thumbnails') - - reset_cycle + - for fax_document in fax_documents - %tr{:class => cycle('odd', 'even'), :id => "fax_document_#{fax_document.id}"} + %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}") diff --git a/app/views/fax_documents/edit.html.haml b/app/views/fax_documents/edit.html.haml index 5da92c6..239bf8b 100644 --- a/app/views/fax_documents/edit.html.haml +++ b/app/views/fax_documents/edit.html.haml @@ -1,4 +1,4 @@ -- title t("fax_documents.edit.page_title") +- content_for :title, t("fax_documents.edit.page_title") = render "form" diff --git a/app/views/fax_documents/index.html.haml b/app/views/fax_documents/index.html.haml index 11199dd..33c697c 100644 --- a/app/views/fax_documents/index.html.haml +++ b/app/views/fax_documents/index.html.haml @@ -1,4 +1,4 @@ -- title t("fax_documents.index.page_title") +- content_for :title, t("fax_documents.index.page_title") = render "index_core", :fax_documents => @fax_documents diff --git a/app/views/fax_documents/new.html.haml b/app/views/fax_documents/new.html.haml index be02860..8884418 100644 --- a/app/views/fax_documents/new.html.haml +++ b/app/views/fax_documents/new.html.haml @@ -1,3 +1,3 @@ -- title t("fax_documents.new.page_title") +- content_for :title, t("fax_documents.new.page_title") = render "form" diff --git a/app/views/fax_documents/show.html.haml b/app/views/fax_documents/show.html.haml index 4703e1d..41d3bff 100644 --- a/app/views/fax_documents/show.html.haml +++ b/app/views/fax_documents/show.html.haml @@ -1,4 +1,4 @@ -- title t("fax_documents.show.page_title") +- content_for :title, t("fax_documents.show.page_title") - child = @fax_document - parent = @fax_document.fax_account diff --git a/app/views/freeswitch_voicemail_msgs/_index_core.html.haml b/app/views/freeswitch_voicemail_msgs/_index_core.html.haml index 58d9944..2ada034 100644 --- a/app/views/freeswitch_voicemail_msgs/_index_core.html.haml +++ b/app/views/freeswitch_voicemail_msgs/_index_core.html.haml @@ -1,12 +1,12 @@ -%table +%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') - - reset_cycle + - for freeswitch_voicemail_msg in freeswitch_voicemail_msgs - %tr{:class => cycle('odd', 'even')} + %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/freeswitch_voicemail_msgs/index.html.haml b/app/views/freeswitch_voicemail_msgs/index.html.haml index 5083c6f..77977c3 100644 --- a/app/views/freeswitch_voicemail_msgs/index.html.haml +++ b/app/views/freeswitch_voicemail_msgs/index.html.haml @@ -1,3 +1,3 @@ -- title t("freeswitch_voicemail_msgs.index.page_title") +- content_for :title, t("freeswitch_voicemail_msgs.index.page_title") = render "index_core", :freeswitch_voicemail_msgs => @freeswitch_voicemail_msgs
\ No newline at end of file diff --git a/app/views/gateway_parameters/_form.html.haml b/app/views/gateway_parameters/_form.html.haml new file mode 100644 index 0000000..79342d2 --- /dev/null +++ b/app/views/gateway_parameters/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([@gateway, @gateway_parameter]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('gateway_parameters.form.submit')
\ No newline at end of file diff --git a/app/views/gateway_parameters/_form_core.html.haml b/app/views/gateway_parameters/_form_core.html.haml new file mode 100644 index 0000000..206645d --- /dev/null +++ b/app/views/gateway_parameters/_form_core.html.haml @@ -0,0 +1,5 @@ +.inputs + = f.input :name, :label => t('gateway_parameters.form.name.label'), :hint => conditional_hint('gateway_parameters.form.name.hint'), :autofocus => true + = f.input :value, :label => t('gateway_parameters.form.value.label'), :hint => conditional_hint('gateway_parameters.form.value.hint') + = f.input :class_type, :collection => GatewayParameter::CLASS_TYPES, :label => t('gateway_parameters.form.class_type.label'), :hint => conditional_hint('gateway_parameters.form.class_type.hint'), :include_blank => false + = f.input :description, :label => t('gateway_parameters.form.description.label'), :hint => conditional_hint('gateway_parameters.form.description.hint') diff --git a/app/views/gateway_parameters/_index_core.html.haml b/app/views/gateway_parameters/_index_core.html.haml new file mode 100644 index 0000000..0d00aaf --- /dev/null +++ b/app/views/gateway_parameters/_index_core.html.haml @@ -0,0 +1,13 @@ +%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 + %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_parameters/edit.html.haml b/app/views/gateway_parameters/edit.html.haml new file mode 100644 index 0000000..67fb831 --- /dev/null +++ b/app/views/gateway_parameters/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("gateway_parameters.edit.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/gateway_parameters/index.html.haml b/app/views/gateway_parameters/index.html.haml new file mode 100644 index 0000000..9eee4a3 --- /dev/null +++ b/app/views/gateway_parameters/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("gateway_parameters.index.page_title") + +- if @gateway_parameters && @gateway_parameters.count > 0 + = render "index_core", :gateway_parameters => @gateway_parameters + += render :partial => 'shared/create_link', :locals => {:parent => @gateway, :child_class => GatewayParameter}
\ No newline at end of file diff --git a/app/views/gateway_parameters/new.html.haml b/app/views/gateway_parameters/new.html.haml new file mode 100644 index 0000000..5899602 --- /dev/null +++ b/app/views/gateway_parameters/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("gateway_parameters.new.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/gateway_parameters/show.html.haml b/app/views/gateway_parameters/show.html.haml new file mode 100644 index 0000000..9bdad76 --- /dev/null +++ b/app/views/gateway_parameters/show.html.haml @@ -0,0 +1,19 @@ +- content_for :title, t("gateway_parameters.show.page_title") + +%p + %strong= t('gateway_parameters.show.gateway_id') + ":" + = @gateway_parameter.gateway +%p + %strong= t('gateway_parameters.show.name') + ":" + = @gateway_parameter.name +%p + %strong= t('gateway_parameters.show.value') + ":" + = @gateway_parameter.value +%p + %strong= t('gateway_parameters.show.class_type') + ":" + = @gateway_parameter.class_type +%p + %strong= t('gateway_parameters.show.description') + ":" + = @gateway_parameter.description + += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @gateway, :child => @gateway_parameter }
\ No newline at end of file diff --git a/app/views/gateway_settings/_form.html.haml b/app/views/gateway_settings/_form.html.haml new file mode 100644 index 0000000..af26d2a --- /dev/null +++ b/app/views/gateway_settings/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([@gateway, @gateway_setting]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('gateway_settings.form.submit') diff --git a/app/views/gateway_settings/_form_core.html.haml b/app/views/gateway_settings/_form_core.html.haml new file mode 100644 index 0000000..3e7dc49 --- /dev/null +++ b/app/views/gateway_settings/_form_core.html.haml @@ -0,0 +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 :value, :label => t('gateway_settings.form.value.label'), :hint => conditional_hint('gateway_settings.form.value.hint') + = f.input :description, :label => t('gateway_settings.form.description.label'), :hint => conditional_hint('gateway_settings.form.description.hint') diff --git a/app/views/gateway_settings/_index_core.html.haml b/app/views/gateway_settings/_index_core.html.haml new file mode 100644 index 0000000..ded7eb8 --- /dev/null +++ b/app/views/gateway_settings/_index_core.html.haml @@ -0,0 +1,13 @@ +%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 + %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/gateway_settings/edit.html.haml b/app/views/gateway_settings/edit.html.haml new file mode 100644 index 0000000..464c36e --- /dev/null +++ b/app/views/gateway_settings/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("gateway_settings.edit.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/gateway_settings/index.html.haml b/app/views/gateway_settings/index.html.haml new file mode 100644 index 0000000..3f1400e --- /dev/null +++ b/app/views/gateway_settings/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("gateway_settings.index.page_title") + +- if @gateway_settings && @gateway_settings.count > 0 + = render "index_core", :gateway_settings => @gateway_settings + += render :partial => 'shared/create_link', :locals => {:parent => @gateway, :child_class => GatewaySetting} diff --git a/app/views/gateway_settings/new.html.haml b/app/views/gateway_settings/new.html.haml new file mode 100644 index 0000000..ec8c346 --- /dev/null +++ b/app/views/gateway_settings/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("gateway_settings.new.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/gateway_settings/show.html.haml b/app/views/gateway_settings/show.html.haml new file mode 100644 index 0000000..019aec4 --- /dev/null +++ b/app/views/gateway_settings/show.html.haml @@ -0,0 +1,19 @@ +- content_for :title, t("gateway_settings.show.page_title") + +%p + %strong= t('gateway_settings.show.gateway_id') + ":" + = @gateway_setting.gateway +%p + %strong= t('gateway_settings.show.name') + ":" + = @gateway_setting.name +%p + %strong= t('gateway_settings.show.value') + ":" + = @gateway_setting.value +%p + %strong= t('gateway_settings.show.class_type') + ":" + = @gateway_setting.class_type +%p + %strong= t('gateway_settings.show.description') + ":" + = @gateway_setting.description + += render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @gateway_setting.gateway, :child => @gateway_setting}
\ No newline at end of file diff --git a/app/views/gateways/_form.html.haml b/app/views/gateways/_form.html.haml new file mode 100644 index 0000000..5f6d5dd --- /dev/null +++ b/app/views/gateways/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@gateway) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('gateways.form.submit')
\ No newline at end of file diff --git a/app/views/gateways/_form_core.html.haml b/app/views/gateways/_form_core.html.haml new file mode 100644 index 0000000..13ed8b1 --- /dev/null +++ b/app/views/gateways/_form_core.html.haml @@ -0,0 +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 :inbound, :label => t('gateways.form.inbound.label'), :hint => conditional_hint('gateways.form.inbound.hint') + = f.input :outbound, :label => t('gateways.form.outbound.label'), :hint => conditional_hint('gateways.form.outbound.hint') + = f.input :description, :label => t('gateways.form.description.label'), :hint => conditional_hint('gateways.form.description.hint') diff --git a/app/views/gateways/_index_core.html.haml b/app/views/gateways/_index_core.html.haml new file mode 100644 index 0000000..0eec67f --- /dev/null +++ b/app/views/gateways/_index_core.html.haml @@ -0,0 +1,19 @@ +- 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 + %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/gateways/edit.html.haml b/app/views/gateways/edit.html.haml new file mode 100644 index 0000000..238dc3c --- /dev/null +++ b/app/views/gateways/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("gateways.edit.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/gateways/index.html.haml b/app/views/gateways/index.html.haml new file mode 100644 index 0000000..f5d3275 --- /dev/null +++ b/app/views/gateways/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("gateways.index.page_title") + +- if @gateways && @gateways.count > 0 + = render "index_core", :gateways => @gateways + += render :partial => 'shared/create_link', :locals => {:child_class => Gateway}
\ No newline at end of file diff --git a/app/views/gateways/new.html.haml b/app/views/gateways/new.html.haml new file mode 100644 index 0000000..d17ff6e --- /dev/null +++ b/app/views/gateways/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("gateways.new.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/gateways/show.html.haml b/app/views/gateways/show.html.haml new file mode 100644 index 0000000..9a3e1c4 --- /dev/null +++ b/app/views/gateways/show.html.haml @@ -0,0 +1,35 @@ +- 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 + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gateway } + + +%h3= t('gateway_settings.index.page_title') +- if @gateway.gateway_settings.any? + = render "gateway_settings/index_core", :gateway_settings => @gateway.gateway_settings + %br += render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewaySetting } + +%h3= t('gateway_parameters.index.page_title') +- if @gateway.gateway_parameters.any? + = render "gateway_parameters/index_core", :gateway_parameters => @gateway.gateway_parameters + %br += render :partial => 'shared/create_link', :locals => { :parent => @gateway, :child_class => GatewayParameter } diff --git a/app/views/gemeinschaft_setups/new.de.html.haml b/app/views/gemeinschaft_setups/new.de.html.haml index 5e79115..b78e278 100644 --- a/app/views/gemeinschaft_setups/new.de.html.haml +++ b/app/views/gemeinschaft_setups/new.de.html.haml @@ -1,4 +1,5 @@ -- title "Konfiguration einer Gemeinschaft #{GEMEINSCHAFT_VERSION} Installation" +- content_for :title, 'Gemeinschaft 5.0' +- content_for :meta_description, "Konfiguration einer Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} Installation" = simple_form_for(@gemeinschaft_setup) do |f| = f.error_notification @@ -20,6 +21,7 @@ = 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') .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 f5f0e81..1b97cc0 100644 --- a/app/views/gemeinschaft_setups/new.html.haml +++ b/app/views/gemeinschaft_setups/new.html.haml @@ -1,4 +1,5 @@ -- title "Configure a new Gemeinschaft #{GEMEINSCHAFT_VERSION} server" +- content_for :title, 'Gemeinschaft 5.0' +- content_for :meta_description, "Configure a new Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} server" = simple_form_for(@gemeinschaft_setup) do |f| = f.error_notification @@ -20,6 +21,7 @@ = 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') .actions = f.button :submit, conditional_t('gemeinschaft_setups.form.submit')
\ No newline at end of file diff --git a/app/views/gs_cluster_sync_log_entries/_index_core.html.haml b/app/views/gs_cluster_sync_log_entries/_index_core.html.haml index 05cbda8..c9a3e50 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 +%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') @@ -6,9 +6,9 @@ %th= t('gs_cluster_sync_log_entries.index.content') %th= t('gs_cluster_sync_log_entries.index.status') - - reset_cycle + - for gs_cluster_sync_log_entry in gs_cluster_sync_log_entries - %tr{:class => cycle('odd', 'even')} + %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 diff --git a/app/views/gs_cluster_sync_log_entries/edit.html.haml b/app/views/gs_cluster_sync_log_entries/edit.html.haml index b0c65f3..856b91f 100644 --- a/app/views/gs_cluster_sync_log_entries/edit.html.haml +++ b/app/views/gs_cluster_sync_log_entries/edit.html.haml @@ -1,3 +1,3 @@ -- title t("gs_cluster_sync_log_entries.edit.page_title") +- content_for :title, t("gs_cluster_sync_log_entries.edit.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/gs_cluster_sync_log_entries/index.html.haml b/app/views/gs_cluster_sync_log_entries/index.html.haml index 68be7e0..2e1b248 100644 --- a/app/views/gs_cluster_sync_log_entries/index.html.haml +++ b/app/views/gs_cluster_sync_log_entries/index.html.haml @@ -1,4 +1,4 @@ -- title t("gs_cluster_sync_log_entries.index.page_title") +- content_for :title, t("gs_cluster_sync_log_entries.index.page_title") - if @gs_cluster_sync_log_entries && @gs_cluster_sync_log_entries.count > 0 = render "index_core", :gs_cluster_sync_log_entries => @gs_cluster_sync_log_entries diff --git a/app/views/gs_cluster_sync_log_entries/new.html.haml b/app/views/gs_cluster_sync_log_entries/new.html.haml index 01b795c..ebe03bc 100644 --- a/app/views/gs_cluster_sync_log_entries/new.html.haml +++ b/app/views/gs_cluster_sync_log_entries/new.html.haml @@ -1,3 +1,3 @@ -- title t("gs_cluster_sync_log_entries.new.page_title") +- content_for :title, t("gs_cluster_sync_log_entries.new.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/gs_cluster_sync_log_entries/show.html.haml b/app/views/gs_cluster_sync_log_entries/show.html.haml index 733576d..24dd3d7 100644 --- a/app/views/gs_cluster_sync_log_entries/show.html.haml +++ b/app/views/gs_cluster_sync_log_entries/show.html.haml @@ -1,4 +1,4 @@ -- title t("gs_cluster_sync_log_entries.show.page_title") +- content_for :title, t("gs_cluster_sync_log_entries.show.page_title") %p %strong= t('gs_cluster_sync_log_entries.show.gs_node_id') + ":" diff --git a/app/views/gs_nodes/_index_core.html.haml b/app/views/gs_nodes/_index_core.html.haml index 72633e1..0f1a51c 100644 --- a/app/views/gs_nodes/_index_core.html.haml +++ b/app/views/gs_nodes/_index_core.html.haml @@ -1,4 +1,4 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('gs_nodes.index.name') %th= t('gs_nodes.index.ip_address') @@ -7,9 +7,9 @@ %th= t('gs_nodes.index.push_updates_to') %th= t('gs_nodes.index.accepts_updates_from') - - reset_cycle + - for gs_node in gs_nodes - %tr{:class => cycle('odd', 'even')} + %tr %td= gs_node.name %td= gs_node.ip_address %td= gs_node.site diff --git a/app/views/gs_nodes/edit.html.haml b/app/views/gs_nodes/edit.html.haml index c025b05..55180f3 100644 --- a/app/views/gs_nodes/edit.html.haml +++ b/app/views/gs_nodes/edit.html.haml @@ -1,3 +1,3 @@ -- title t("gs_nodes.edit.page_title") +- content_for :title, t("gs_nodes.edit.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/gs_nodes/index.html.haml b/app/views/gs_nodes/index.html.haml index 4670cef..2c4ba0b 100644 --- a/app/views/gs_nodes/index.html.haml +++ b/app/views/gs_nodes/index.html.haml @@ -1,4 +1,4 @@ -- title t("gs_nodes.index.page_title") +- content_for :title, t("gs_nodes.index.page_title") - if @gs_nodes && @gs_nodes.count > 0 = render "index_core", :gs_nodes => @gs_nodes diff --git a/app/views/gs_nodes/new.html.haml b/app/views/gs_nodes/new.html.haml index 230ce33..8425084 100644 --- a/app/views/gs_nodes/new.html.haml +++ b/app/views/gs_nodes/new.html.haml @@ -1,3 +1,3 @@ -- title t("gs_nodes.new.page_title") +- content_for :title, t("gs_nodes.new.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/gs_nodes/show.html.haml b/app/views/gs_nodes/show.html.haml index ca70a50..bccf785 100644 --- a/app/views/gs_nodes/show.html.haml +++ b/app/views/gs_nodes/show.html.haml @@ -1,4 +1,4 @@ -- title t("gs_nodes.show.page_title") +- content_for :title, t("gs_nodes.show.page_title") %p %strong= t('gs_nodes.show.name') + ":" diff --git a/app/views/gs_parameters/_form.html.haml b/app/views/gs_parameters/_form.html.haml new file mode 100644 index 0000000..ea69e95 --- /dev/null +++ b/app/views/gs_parameters/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@gs_parameter) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('gs_parameters.form.submit')
\ No newline at end of file diff --git a/app/views/gs_parameters/_form_core.html.haml b/app/views/gs_parameters/_form_core.html.haml new file mode 100644 index 0000000..70b3773 --- /dev/null +++ b/app/views/gs_parameters/_form_core.html.haml @@ -0,0 +1,4 @@ +.inputs + = f.input :value, :label => t('gs_parameters.form.value.label'), :hint => conditional_hint('gs_parameters.form.value.hint'), :autofocus => true + = f.input :class_type, :collection => ['String', 'Integer', 'Boolean', 'YAML', 'Nil'], :label => t('gs_parameters.form.class_type.label'), :hint => conditional_hint('gs_parameters.form.class_type.hint'), :include_blank => false + = f.input :description, :label => t('gs_parameters.form.description.label'), :hint => conditional_hint('gs_parameters.form.description.hint') diff --git a/app/views/gs_parameters/_index_core.html.haml b/app/views/gs_parameters/_index_core.html.haml new file mode 100644 index 0000000..3d5f3cf --- /dev/null +++ b/app/views/gs_parameters/_index_core.html.haml @@ -0,0 +1,16 @@ +- 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') + + + - 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/gs_parameters/edit.html.haml b/app/views/gs_parameters/edit.html.haml new file mode 100644 index 0000000..b456f43 --- /dev/null +++ b/app/views/gs_parameters/edit.html.haml @@ -0,0 +1,15 @@ +- content_for :title, t("gs_parameters.edit.page_title") + +%p + %strong= t('gs_parameters.show.name') + ":" + = @gs_parameter.name +- if !@gs_parameter.entity.blank? + %p + %strong= t('gs_parameters.show.entity') + ":" + = @gs_parameter.entity +- if !@gs_parameter.section.blank? + %p + %strong= t('gs_parameters.show.section') + ":" + = @gs_parameter.section + += render "form"
\ No newline at end of file diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml new file mode 100644 index 0000000..9132cdd --- /dev/null +++ b/app/views/gs_parameters/index.html.haml @@ -0,0 +1,15 @@ +- content_for :title, t("gs_parameters.index.page_title") + +- 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'} + - @sections.each do |section| + %tr + %td{:colspan => 3} + %h3= section + -# Template Dependency: gs_parameters/_index_core + = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) + - else + %table{:class => '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 new file mode 100644 index 0000000..795d09c --- /dev/null +++ b/app/views/gs_parameters/show.html.haml @@ -0,0 +1,20 @@ +- cache(@gs_parameter) do + - 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 + + = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gs_parameter }
\ No newline at end of file diff --git a/app/views/gui_functions/_index_core.html.haml b/app/views/gui_functions/_index_core.html.haml index 093a0d7..0d9454e 100644 --- a/app/views/gui_functions/_index_core.html.haml +++ b/app/views/gui_functions/_index_core.html.haml @@ -1,26 +1,27 @@ -%table +%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 - - reset_cycle + - for gui_function in gui_functions - %tr{:class => cycle('odd', 'even')} - %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' + %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/gui_functions/edit.html.haml b/app/views/gui_functions/edit.html.haml index f43b5bc..a041138 100644 --- a/app/views/gui_functions/edit.html.haml +++ b/app/views/gui_functions/edit.html.haml @@ -1,3 +1,3 @@ -- title t("gui_functions.edit.page_title") +- content_for :title, t("gui_functions.edit.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/gui_functions/index.html.haml b/app/views/gui_functions/index.html.haml index ef909f0..b0a7d18 100644 --- a/app/views/gui_functions/index.html.haml +++ b/app/views/gui_functions/index.html.haml @@ -1,6 +1,7 @@ -- title t("gui_functions.index.page_title") +- content_for :title, t("gui_functions.index.page_title") - if @gui_functions && @gui_functions.count > 0 - = render "index_core", :gui_functions => @gui_functions + - cache(['gui_functions_table', I18n.locale, @gui_functions.reorder(:updated_at).last, @gui_functions.count]) do + = render "index_core", :gui_functions => @gui_functions = render :partial => 'shared/create_link', :locals => {:child_class => GuiFunction}
\ No newline at end of file diff --git a/app/views/gui_functions/new.html.haml b/app/views/gui_functions/new.html.haml index 6c57e9c..0e3a809 100644 --- a/app/views/gui_functions/new.html.haml +++ b/app/views/gui_functions/new.html.haml @@ -1,3 +1,3 @@ -- title t("gui_functions.new.page_title") +- content_for :title, t("gui_functions.new.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/gui_functions/show.html.haml b/app/views/gui_functions/show.html.haml index 0fc2dd9..91b9d2e 100644 --- a/app/views/gui_functions/show.html.haml +++ b/app/views/gui_functions/show.html.haml @@ -1,18 +1,19 @@ -- title t("gui_functions.show.page_title") +- content_for :title, t("gui_functions.show.page_title") -%p - %strong= t('gui_functions.show.name') + ":" - = @gui_function.name -%p - %strong= t('gui_functions.show.description') + ":" - = @gui_function.description - -- @user_groups.each do |user_group| +- cache(['gui_function_show', I18n.locale, @gui_function]) do + %p + %strong= t('gui_functions.show.name') + ":" + = @gui_function.name %p - %strong= "#{user_group}:" - - if @gui_function.gui_function_memberships.where(:user_group_id => user_group.id, :activated => true).count > 0 - = 'x' - - else - = 'not activated' + %strong= t('gui_functions.show.description') + ":" + = @gui_function.description + + - @user_groups.each do |user_group| + %p + %strong= "#{user_group}:" + - if @gui_function.gui_function_memberships.where(:user_group_id => user_group.id, :activated => true).count > 0 + = 'x' + - else + = 'not activated' -= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @gui_function }
\ No newline at end of file + = render :partial => 'shared/show_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 46b64c8..c6b7e4a 100644 --- a/app/views/hunt_group_members/_index_core.html.haml +++ b/app/views/hunt_group_members/_index_core.html.haml @@ -1,13 +1,13 @@ -%table +%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') - - reset_cycle + - for hunt_group_member in hunt_group_members - %tr{:class => cycle('odd', 'even')} + %tr %td= hunt_group_member.name %td= hunt_group_member.active %td= hunt_group_member.can_switch_status_itself diff --git a/app/views/hunt_group_members/edit.html.haml b/app/views/hunt_group_members/edit.html.haml index 93d7b0a..97e9084 100644 --- a/app/views/hunt_group_members/edit.html.haml +++ b/app/views/hunt_group_members/edit.html.haml @@ -1,3 +1,3 @@ -- title t("hunt_group_members.edit.page_title") +- content_for :title, t("hunt_group_members.edit.page_title") = render "form" diff --git a/app/views/hunt_group_members/index.html.haml b/app/views/hunt_group_members/index.html.haml index 99dc929..4001000 100644 --- a/app/views/hunt_group_members/index.html.haml +++ b/app/views/hunt_group_members/index.html.haml @@ -1,4 +1,4 @@ -- title t("hunt_group_members.index.page_title") +- content_for :title, t("hunt_group_members.index.page_title") - if @hunt_group_members.count > 0 = render "index_core", :hunt_group_members => @hunt_group_members diff --git a/app/views/hunt_group_members/new.html.haml b/app/views/hunt_group_members/new.html.haml index 99f52ad..31dd185 100644 --- a/app/views/hunt_group_members/new.html.haml +++ b/app/views/hunt_group_members/new.html.haml @@ -1,3 +1,3 @@ -- title t("hunt_group_members.new.page_title") +- content_for :title, t("hunt_group_members.new.page_title") = render "form" diff --git a/app/views/hunt_group_members/show.html.haml b/app/views/hunt_group_members/show.html.haml index 80123b8..2056db0 100644 --- a/app/views/hunt_group_members/show.html.haml +++ b/app/views/hunt_group_members/show.html.haml @@ -1,4 +1,4 @@ -- title t("hunt_group_members.show.page_title") +- content_for :title, t("hunt_group_members.show.page_title") %p %strong= t('hunt_group_members.show.name') + ":" diff --git a/app/views/hunt_groups/_form_core.html.haml b/app/views/hunt_groups/_form_core.html.haml index 10a0111..53d44d1 100644 --- a/app/views/hunt_groups/_form_core.html.haml +++ b/app/views/hunt_groups/_form_core.html.haml @@ -1,4 +1,4 @@ .inputs = f.input :name, :label => t('hunt_groups.form.name.label'), :hint => conditional_hint('hunt_groups.form.name.hint') - = f.input :strategy, :as => :select, :label => t('hunt_groups.form.strategy.label'), :hint => conditional_hint('hunt_groups.form.strategy.hint'), :include_blank => false, :collection => HUNT_GROUP_STRATEGIES.map {|x| [I18n.t('hunt_groups.strategies.' + x), x] } - = f.input :seconds_between_jumps, :collection => VALID_SECONDS_BETWEEN_JUMPS_VALUES, :label => t('hunt_groups.form.seconds_between_jumps.label'), :hint => conditional_hint('hunt_groups.form.seconds_between_jumps.hint')
\ No newline at end of file + = f.input :strategy, :as => :select, :label => t('hunt_groups.form.strategy.label'), :hint => conditional_hint('hunt_groups.form.strategy.hint'), :include_blank => false, :collection => GsParameter.get('HUNT_GROUP_STRATEGIES').map {|x| [I18n.t('hunt_groups.strategies.' + x), x] } + = f.input :seconds_between_jumps, :collection => GsParameter.get('VALID_SECONDS_BETWEEN_JUMPS_VALUES'), :label => t('hunt_groups.form.seconds_between_jumps.label'), :hint => conditional_hint('hunt_groups.form.seconds_between_jumps.hint')
\ 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 3000e97..16b1b5d 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 +%table{:class => 'table table-striped'} %tr %th= t('hunt_groups.index.name') %th= t('hunt_groups.index.strategy') @@ -9,9 +9,9 @@ %th= t('hunt_groups.index.phone_numbers') %th= t('hunt_groups.index.hunt_group_members') - - reset_cycle + - for hunt_group in hunt_groups - %tr{:class => cycle('odd', 'even')} + %tr %td= hunt_group.name %td= t("hunt_groups.strategies.#{hunt_group.strategy}") - if show_seconds diff --git a/app/views/hunt_groups/edit.html.haml b/app/views/hunt_groups/edit.html.haml index f2ef998..5d5b146 100644 --- a/app/views/hunt_groups/edit.html.haml +++ b/app/views/hunt_groups/edit.html.haml @@ -1,3 +1,3 @@ -- title t("hunt_groups.edit.page_title") +- content_for :title, t("hunt_groups.edit.page_title") = render "form" diff --git a/app/views/hunt_groups/index.html.haml b/app/views/hunt_groups/index.html.haml index 62bc2aa..8c6fdf6 100644 --- a/app/views/hunt_groups/index.html.haml +++ b/app/views/hunt_groups/index.html.haml @@ -1,4 +1,4 @@ -- title t("hunt_groups.index.page_title") +- content_for :title, t("hunt_groups.index.page_title") - if @hunt_groups.count > 0 = render "index_core", :hunt_groups => @hunt_groups diff --git a/app/views/hunt_groups/new.html.haml b/app/views/hunt_groups/new.html.haml index a40e579..2c1350e 100644 --- a/app/views/hunt_groups/new.html.haml +++ b/app/views/hunt_groups/new.html.haml @@ -1,3 +1,3 @@ -- title t("hunt_groups.new.page_title") +- content_for :title, t("hunt_groups.new.page_title") = render "form" diff --git a/app/views/hunt_groups/show.html.haml b/app/views/hunt_groups/show.html.haml index 009af50..3ffe4f3 100644 --- a/app/views/hunt_groups/show.html.haml +++ b/app/views/hunt_groups/show.html.haml @@ -1,4 +1,4 @@ -- title t("hunt_groups.show.page_title") +- content_for :title, t("hunt_groups.show.page_title") %p %strong= t('hunt_groups.show.name') + ":" diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml new file mode 100644 index 0000000..61ea546 --- /dev/null +++ b/app/views/layouts/_footer.html.haml @@ -0,0 +1,17 @@ +- cache(['application_footer', I18n.locale]) do + %footer + %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')} + - else + %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"} Support und Consulting + - if GuiFunction.display?('gemeinschaft_mailinglist_link_in_footer', current_user) + %li + %a{:href => "https://groups.google.com/group/gs5-users/"} Mailingliste + %li{:class => 'pull-right'} + = link_to 'brought to you by AMOOMA GmbH', 'http://amooma.de'
\ No newline at end of file diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml new file mode 100644 index 0000000..d6f08cb --- /dev/null +++ b/app/views/layouts/_navbar.html.haml @@ -0,0 +1,43 @@ +.navbar.navbar-inverse.navbar-fixed-top + .navbar-inner + .container + %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))} + Gemeinschaft 5 + + %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"} + %span.icon-bar + %span.icon-bar + %span.icon-bar + + - if current_user + .nav-collapse.collapse + %ul.nav + %li + %a{:href => "#about"} About + %li.pull_right + %a{:href => "#contact"} Contact + + - if current_user + %ul.nav.pull-right + %li + - if current_user.image? + =image_tag(current_user.image_url(:mini).to_s, :class => 'img-rounded') + - else + - if current_user.male? + = image_tag 'icons/user-male-16x.png', :class => 'img-rounded' + - else + = image_tag 'icons/user-female-16x.png', :class => 'img-rounded' + + - if current_page?(tenant_user_path(current_user.current_tenant, current_user)) + %li.active + %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} + = current_user + - else + %li + %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)} + = current_user + + %li + %a.navbar-link{:href => log_out_path} + %i.icon-off.icon-white + diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 2c7faec..74331af 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,47 +1,38 @@ -!!! 5 -<!--[if lt IE 7]> <html lang="en" class="no-js ie6"> <![endif]--> -<!--[if IE 7]> <html lang="en" class="no-js ie7"> <![endif]--> -<!--[if IE 8]> <html lang="en" class="no-js ie8"> <![endif]--> -<!--[if gt IE 8]><!--> -%html.no-js{ :lang => "en" } - ~#OPTIMIZE Make html lang attribute reflect the actual language. - <!--<![endif]--> - %header - %meta{ :charset => "utf-8" }/ - ~#OPTIMIZE "/" seems to be supposed to make an empty element tag, but it doesn't work. HAML bug? - %title - = content_for?(:title) ? yield(:title) : "Untitled" - %meta{ :name => "viewport", :content => "width=device-width, initial-scale=1.0" }/ - = stylesheet_link_tag "application" +!!! +%html + %head + %meta{:charset => "utf-8"}/ + %title + = content_for?(:title) ? yield(:title) : "Gemeinschaft 5" + %meta{:name => 'viewport', :content => "width=device-width, initial-scale=1.0"} + - if content_for?(:meta_description) + %meta{:description => yield(:meta_description)}/ + %meta{:author => "AMOOMA GmbH"}/ + = stylesheet_link_tag "application", :media => "all" = javascript_include_tag "application" - = csrf_meta_tag - = yield(:head) - + = csrf_meta_tags + / HTML5 shim, for IE6-8 support of HTML5 elements + /[if lt IE 9] + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> %body - #container - = render :partial => "shared/header" - = render :partial => "shared/flash", :locals => { :flash => flash} + .container + .row + .span12 + - unless response.cache_control[:public] + - flash.each do |name, msg| + %div{:class => "alert alert-#{name == :notice ? "success" : "error"} fade in"} + %a.close{"data-dismiss" => "alert"} × + = msg - #content{:role => 'main'} - .light - %header.main - .breadcrumbs= render_breadcrumbs :separator => ' » ' - - if show_title? - %h1= yield(:title) - = yield + - if current_user + = render_breadcrumbs :builder => ::BootstrapBreadcrumbsBuilder, :separator => "/" - %footer#main - %ul - %li - %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{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 + = render 'layouts/navbar' - .amooma-logo - %span brought to you by - %a{ :target => '_blank', :href => "http://amooma.de/" } Amooma + = yield + .row + .span12 + %hr/ + = render 'layouts/footer' + / /container diff --git a/app/views/layouts/old-application.html.haml b/app/views/layouts/old-application.html.haml new file mode 100644 index 0000000..a2afbf8 --- /dev/null +++ b/app/views/layouts/old-application.html.haml @@ -0,0 +1,48 @@ +!!! 5 +<!--[if lt IE 7]> <html lang="en" class="no-js ie6"> <![endif]--> +<!--[if IE 7]> <html lang="en" class="no-js ie7"> <![endif]--> +<!--[if IE 8]> <html lang="en" class="no-js ie8"> <![endif]--> +<!--[if gt IE 8]><!--> +%html.no-js{ :lang => I18n.locale.to_s } + <!--<![endif]--> + %header + %meta{ :charset => "utf-8" }/ + ~#OPTIMIZE "/" seems to be supposed to make an empty element tag, but it doesn't work. HAML bug? + %title + = content_for?(:title) ? yield(:title) : "Untitled" + %meta{ :name => "viewport", :content => "width=device-width, initial-scale=1.0" }/ + = stylesheet_link_tag "application" + = javascript_include_tag "application" + = csrf_meta_tag + = yield(:head) + + %body + #container + - cache(['application_header', I18n.locale, current_user]) do + = render :partial => "shared/header" + = render :partial => "shared/flash", :locals => { :flash => flash} + + #content{:role => 'main'} + .light + %header.main + .breadcrumbs= render_breadcrumbs :separator => ' » ' + - if show_title? + %h1= yield(:title) + = yield + + - cache(['application_footer', I18n.locale]) do + %footer#main + %ul + %li + %a{:href => "http://amooma.de/gemeinschaft/gs5"} Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')} + - if GuiFunction.display?('amooma_commercial_support_link_in_footer', current_user) + %li + %a{:href => "http://amooma.de"} Kommerzieller Support und Consulting + - if GuiFunction.display?('gemeinschaft_mailinglist_link_in_footer', current_user) + %li + %a{:href => "https://groups.google.com/group/gs5-users/"} Kostenlose Mailingliste + + .amooma-logo + %span brought to you by + %a{ :target => '_blank', :href => "http://amooma.de/" } Amooma + diff --git a/app/views/layouts/old_navbar.html.haml b/app/views/layouts/old_navbar.html.haml new file mode 100644 index 0000000..4d795e4 --- /dev/null +++ b/app/views/layouts/old_navbar.html.haml @@ -0,0 +1,10 @@ +.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 new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/views/layouts/test.haml diff --git a/app/views/manufacturers/_index_core.html.haml b/app/views/manufacturers/_index_core.html.haml index 8937909..5efa5d9 100644 --- a/app/views/manufacturers/_index_core.html.haml +++ b/app/views/manufacturers/_index_core.html.haml @@ -1,13 +1,13 @@ -%table +%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') - - reset_cycle + - for manufacturer in manufacturers - %tr{:class => cycle('odd', 'even')} + %tr %td= manufacturer.name %td= manufacturer.ieee_name %td diff --git a/app/views/manufacturers/edit.html.haml b/app/views/manufacturers/edit.html.haml index 61bcba0..913287a 100644 --- a/app/views/manufacturers/edit.html.haml +++ b/app/views/manufacturers/edit.html.haml @@ -1,3 +1,3 @@ -- title t("manufacturers.edit.page_title") +- content_for :title, t("manufacturers.edit.page_title") = render "form" diff --git a/app/views/manufacturers/index.html.haml b/app/views/manufacturers/index.html.haml index 43fecc6..ccdd44b 100644 --- a/app/views/manufacturers/index.html.haml +++ b/app/views/manufacturers/index.html.haml @@ -1,4 +1,4 @@ -- title t("manufacturers.index.page_title") +- content_for :title, t("manufacturers.index.page_title") = render "index_core", :manufacturers => @manufacturers diff --git a/app/views/manufacturers/new.html.haml b/app/views/manufacturers/new.html.haml index 4fb9dbf..9931242 100644 --- a/app/views/manufacturers/new.html.haml +++ b/app/views/manufacturers/new.html.haml @@ -1,3 +1,3 @@ -- title t("manufacturers.new.page_title") +- content_for :title, t("manufacturers.new.page_title") = render "form" diff --git a/app/views/manufacturers/show.html.haml b/app/views/manufacturers/show.html.haml index 1b8383b..8888402 100644 --- a/app/views/manufacturers/show.html.haml +++ b/app/views/manufacturers/show.html.haml @@ -1,4 +1,4 @@ -- title t("manufacturers.show.page_title") +- content_for :title, t("manufacturers.show.page_title") %p %strong= t('manufacturers.show.name') + ":" diff --git a/app/views/page/beginners_intro.de.html.haml b/app/views/page/beginners_intro.de.html.haml index 8d129db..5eef135 100644 --- a/app/views/page/beginners_intro.de.html.haml +++ b/app/views/page/beginners_intro.de.html.haml @@ -1,4 +1,4 @@ -- title "Erste Schritte mit Gemeinschaft #{GEMEINSCHAFT_VERSION}!" +- 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: @@ -29,5 +29,5 @@ %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 #{GEMEINSCHAFT_VERSION} vom automatischen Provisioning unterstützt: + 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 index 6227142..dadd99f 100644 --- a/app/views/page/beginners_intro.html.haml +++ b/app/views/page/beginners_intro.html.haml @@ -1,4 +1,4 @@ -- title "First steps with Gemeinschaft #{GEMEINSCHAFT_VERSION}!" +- 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: @@ -29,5 +29,5 @@ %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 #{GEMEINSCHAFT_VERSION} the following phones can be used for provisioning: + 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/conference.html.haml b/app/views/page/conference.html.haml index 061dfd1..2fdc043 100644 --- a/app/views/page/conference.html.haml +++ b/app/views/page/conference.html.haml @@ -1,5 +1,5 @@ - conf_call_topic = "The next big thing" -- title "Conference Call \u2013 Topic: #{conf_call_topic}" +- content_for :title, "Conference Call \u2013 Topic: #{conf_call_topic}" %section.conference diff --git a/app/views/page/index.de.html.haml b/app/views/page/index.de.html.haml index 2928319..a3ca83b 100644 --- a/app/views/page/index.de.html.haml +++ b/app/views/page/index.de.html.haml @@ -1,4 +1,4 @@ -- title "Gemeinschaft #{GEMEINSCHAFT_VERSION}" +- content_for :title, "Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}" %div %h3 Aktueller Mandant diff --git a/app/views/page/index.html.haml b/app/views/page/index.html.haml index 9621395..178074d 100644 --- a/app/views/page/index.html.haml +++ b/app/views/page/index.html.haml @@ -1,4 +1,4 @@ -- title "Gemeinschaft #{GEMEINSCHAFT_VERSION}" +- content_for :title, "Gemeinschaft #{GsParameter.get('GEMEINSCHAFT_VERSION')}" %div %h3 Current tenant diff --git a/app/views/phone_book_entries/_form_core.html.haml b/app/views/phone_book_entries/_form_core.html.haml index c05139e..5159668 100644 --- a/app/views/phone_book_entries/_form_core.html.haml +++ b/app/views/phone_book_entries/_form_core.html.haml @@ -1,6 +1,6 @@ .inputs = f.input :is_male, :collection => [[true, t('phone_book_entries.form.gender.male')], [false, t('phone_book_entries.form.gender.female')]], :label_method => :last, :value_method => :first, :label => t('phone_book_entries.form.male.label'), :hint => conditional_hint('phone_book_entries.form.gender.hint'), :label => t('phone_book_entries.form.gender.label'), :as => :radio - = f.input :first_name, :label => t('phone_book_entries.form.first_name.label'), :hint => conditional_hint('phone_book_entries.form.first_name.hint') + = f.input :first_name, :label => t('phone_book_entries.form.first_name.label'), :hint => conditional_hint('phone_book_entries.form.first_name.hint'), :autofocus => true = f.input :middle_name, :label => t('phone_book_entries.form.middle_name.label'), :hint => conditional_hint('phone_book_entries.form.middle_name.hint') = f.input :last_name, :label => t('phone_book_entries.form.last_name.label'), :hint => conditional_hint('phone_book_entries.form.last_name.hint') = f.input :birth_name, :label => t('phone_book_entries.form.birth_name.label'), :hint => conditional_hint('phone_book_entries.form.birth_name.hint') diff --git a/app/views/phone_book_entries/_index_core.de.html.haml b/app/views/phone_book_entries/_index_core.de.html.haml index 0c6e74b..fe72d26 100644 --- a/app/views/phone_book_entries/_index_core.de.html.haml +++ b/app/views/phone_book_entries/_index_core.de.html.haml @@ -2,39 +2,41 @@ %section.phone-book-entries %header.entries-nav= render :partial => "phone_book_entries/navigation" .content - - reset_cycle - %table - - for entry in phone_book_entries - ~# Dear IE7, - ~# Because of you we have to do this with a table. - ~# With Love, - ~# Mario. - %tr.phone-book-entry{:class => cycle('odd', 'even'), :"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 + - 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 9054833..6e35221 100644 --- a/app/views/phone_book_entries/_index_core.html.haml +++ b/app/views/phone_book_entries/_index_core.html.haml @@ -2,39 +2,42 @@ %section.phone-book-entries %header.entries-nav= render :partial => "phone_book_entries/navigation" .content - - reset_cycle - %table - - for entry in phone_book_entries - ~# Dear IE7, - ~# Because of you we have to do this with a table. - ~# With Love, - ~# Mario. - %tr.phone-book-entry{:class => cycle('odd', 'even'), :"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 + - 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" diff --git a/app/views/phone_book_entries/edit.html.haml b/app/views/phone_book_entries/edit.html.haml index d4fad4d..2967366 100644 --- a/app/views/phone_book_entries/edit.html.haml +++ b/app/views/phone_book_entries/edit.html.haml @@ -1,4 +1,4 @@ -- title t("phone_book_entries.edit.page_title") +- content_for :title, t("phone_book_entries.edit.page_title") = render "form" diff --git a/app/views/phone_book_entries/index.html.haml b/app/views/phone_book_entries/index.html.haml index 6a17eb9..10d1ce2 100644 --- a/app/views/phone_book_entries/index.html.haml +++ b/app/views/phone_book_entries/index.html.haml @@ -1,4 +1,4 @@ -- title t("phone_book_entries.index.page_title") +- content_for :title, t("phone_book_entries.index.page_title") - if @phone_books %p diff --git a/app/views/phone_book_entries/new.html.haml b/app/views/phone_book_entries/new.html.haml index d72d1a4..2f3a8be 100644 --- a/app/views/phone_book_entries/new.html.haml +++ b/app/views/phone_book_entries/new.html.haml @@ -1,3 +1,3 @@ -- title t("phone_book_entries.new.page_title") +- content_for :title, t("phone_book_entries.new.page_title") = render "form" diff --git a/app/views/phone_book_entries/show.html.haml b/app/views/phone_book_entries/show.html.haml index a9e1e8f..7dd9bcb 100644 --- a/app/views/phone_book_entries/show.html.haml +++ b/app/views/phone_book_entries/show.html.haml @@ -1,4 +1,4 @@ -- title nil +- content_for :title, nil %section.phone-book-entry .content @@ -67,27 +67,28 @@ = @phone_book_entry.description .widget.phones - @phone_book_entry.phone_numbers.each do |phone_number| - - case phone_number.name + - case phone_number.name.to_s.downcase - when /fax/ .fax - %a= phone_number + = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name - when /home/ .home - %a= phone_number - %span= phone_number.name + = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') + %span - when /mobile/ .cellphone - %a= phone_number + = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name - when /office/ .office - %a= phone_number + = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name - else .phone - %a= phone_number + = link_to phone_number, call_phone_book_entry_phone_number_path(@phone_book_entry, phone_number), :method => :put, :title => t('phone_numbers.show.actions.call') %span= phone_number.name + = link_to t('phone_book_entries.show.manage_phone_numbers'), phone_book_entry_phone_numbers_path(@phone_book_entry) .widget.adresses diff --git a/app/views/phone_book_entries/show.html.haml.examlple b/app/views/phone_book_entries/show.html.haml.examlple index 176ad04..980f776 100644 --- a/app/views/phone_book_entries/show.html.haml.examlple +++ b/app/views/phone_book_entries/show.html.haml.examlple @@ -1,4 +1,4 @@ -- title nil +- content_for :title, nil %section.phone-book-entry .content diff --git a/app/views/phone_books/_index_core.html.haml b/app/views/phone_books/_index_core.html.haml index 5f50675..accded6 100644 --- a/app/views/phone_books/_index_core.html.haml +++ b/app/views/phone_books/_index_core.html.haml @@ -1,16 +1,18 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('phone_books.index.name') - %th= t('phone_books.index.description') %th= t('phone_books.index.count') - - - reset_cycle + %th{:colspan => '3'} + - for phone_book in phone_books - %tr{:class => cycle('odd', 'even')} - %td= phone_book.name - %td= phone_book.description + %tr + %td + - if phone_book.description.blank? + = phone_book.name + - else + %a.brand{:rel => 'tooltip', :title => phone_book.description} + = phone_book.name %td = number_with_delimiter( phone_book.phone_book_entries.count ) - = render :partial => 'shared/create_link', :locals => {:parent => phone_book, :child_class => PhoneBookEntry, :short_link => true} =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_book.phone_bookable, :child => phone_book}
\ No newline at end of file diff --git a/app/views/phone_books/edit.html.haml b/app/views/phone_books/edit.html.haml index 36c945b..e1d4553 100644 --- a/app/views/phone_books/edit.html.haml +++ b/app/views/phone_books/edit.html.haml @@ -1,3 +1,3 @@ -- title t("phone_books.edit.page_title", :resource => @phone_book) +- content_for :title, t("phone_books.edit.page_title", :resource => @phone_book) = render "form" diff --git a/app/views/phone_books/index.html.haml b/app/views/phone_books/index.html.haml index 52b4e9b..e681878 100644 --- a/app/views/phone_books/index.html.haml +++ b/app/views/phone_books/index.html.haml @@ -1,4 +1,4 @@ -- title t("phone_books.index.page_title") +- content_for :title, t("phone_books.index.page_title") - if @phone_books.count > 0 = render "index_core", :phone_books => @phone_books diff --git a/app/views/phone_books/new.html.haml b/app/views/phone_books/new.html.haml index e96ce1e..66d6e99 100644 --- a/app/views/phone_books/new.html.haml +++ b/app/views/phone_books/new.html.haml @@ -1,3 +1,3 @@ -- title t("phone_books.new.page_title") +- content_for :title, t("phone_books.new.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/phone_books/show.html.haml b/app/views/phone_books/show.html.haml index 047b15e..5140b91 100644 --- a/app/views/phone_books/show.html.haml +++ b/app/views/phone_books/show.html.haml @@ -1,4 +1,4 @@ -- title @phone_book +- content_for :title, @phone_book - if ! @phone_book.description.blank? %p %strong= t('phone_books.show.description') + ":" diff --git a/app/views/phone_models/_index_core.html.haml b/app/views/phone_models/_index_core.html.haml index b07eb68..b899a5c 100644 --- a/app/views/phone_models/_index_core.html.haml +++ b/app/views/phone_models/_index_core.html.haml @@ -1,13 +1,13 @@ -%table +%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') - - reset_cycle + - for phone_model in phone_models - %tr{:class => cycle('odd', 'even')} + %tr %td= phone_model.name %td - if phone_model.product_manual_homepage_url diff --git a/app/views/phone_models/edit.html.haml b/app/views/phone_models/edit.html.haml index bf31ffc..ee10d3e 100644 --- a/app/views/phone_models/edit.html.haml +++ b/app/views/phone_models/edit.html.haml @@ -1,3 +1,3 @@ -- title t("phone_models.edit.page_title") +- content_for :title, t("phone_models.edit.page_title") = render "form" diff --git a/app/views/phone_models/index.html.haml b/app/views/phone_models/index.html.haml index 90aa4ce..e37243a 100644 --- a/app/views/phone_models/index.html.haml +++ b/app/views/phone_models/index.html.haml @@ -1,4 +1,4 @@ -- title t("phone_models.index.page_title") +- content_for :title, t("phone_models.index.page_title") - if @phone_models.count > 0 = render "index_core", :phone_models => @phone_models diff --git a/app/views/phone_models/new.html.haml b/app/views/phone_models/new.html.haml index 9e900d4..a60bc68 100644 --- a/app/views/phone_models/new.html.haml +++ b/app/views/phone_models/new.html.haml @@ -1,3 +1,3 @@ -- title t("phone_models.new.page_title") +- content_for :title, t("phone_models.new.page_title") = render "form" diff --git a/app/views/phone_models/show.html.haml b/app/views/phone_models/show.html.haml index 06fae4b..5e16bda 100644 --- a/app/views/phone_models/show.html.haml +++ b/app/views/phone_models/show.html.haml @@ -1,4 +1,4 @@ -- title t("phone_models.show.page_title") +- content_for :title, t("phone_models.show.page_title") %p %strong= t('phone_models.show.name') + ":" diff --git a/app/views/phone_number_ranges/_index_core.html.haml b/app/views/phone_number_ranges/_index_core.html.haml index 24ea96d..b378be8 100644 --- a/app/views/phone_number_ranges/_index_core.html.haml +++ b/app/views/phone_number_ranges/_index_core.html.haml @@ -1,13 +1,13 @@ -%table +%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') - - reset_cycle + - for phone_number_range in phone_number_ranges - %tr{:class => cycle('odd', 'even')} + %tr %td= t("phone_number_ranges.ranges.#{phone_number_range}.label") %td= t("phone_number_ranges.ranges.#{phone_number_range}.description") %td diff --git a/app/views/phone_number_ranges/edit.html.haml b/app/views/phone_number_ranges/edit.html.haml index fbf6d12..791be71 100644 --- a/app/views/phone_number_ranges/edit.html.haml +++ b/app/views/phone_number_ranges/edit.html.haml @@ -1,3 +1,3 @@ -- title t("phone_number_ranges.edit.page_title", :resource => @phone_number_range) +- content_for :title, t("phone_number_ranges.edit.page_title", :resource => @phone_number_range) = render "form" diff --git a/app/views/phone_number_ranges/index.html.haml b/app/views/phone_number_ranges/index.html.haml index 56cf137..769dc68 100644 --- a/app/views/phone_number_ranges/index.html.haml +++ b/app/views/phone_number_ranges/index.html.haml @@ -1,4 +1,4 @@ -- title t("phone_number_ranges.index.page_title") +- content_for :title, t("phone_number_ranges.index.page_title") - if @phone_number_ranges.count > 0 = render "index_core", :phone_number_ranges => @phone_number_ranges diff --git a/app/views/phone_number_ranges/new.html.haml b/app/views/phone_number_ranges/new.html.haml index d26b34d..1e5eab0 100644 --- a/app/views/phone_number_ranges/new.html.haml +++ b/app/views/phone_number_ranges/new.html.haml @@ -1,3 +1,3 @@ -- title t("phone_number_ranges.new.page_title") +- content_for :title, t("phone_number_ranges.new.page_title") = render "form" diff --git a/app/views/phone_number_ranges/show.html.haml b/app/views/phone_number_ranges/show.html.haml index 64df556..fdb54a7 100644 --- a/app/views/phone_number_ranges/show.html.haml +++ b/app/views/phone_number_ranges/show.html.haml @@ -1,4 +1,4 @@ -- title t("phone_number_ranges.show.page_title") +- content_for :title, t("phone_number_ranges.show.page_title") %p %strong= t('phone_number_ranges.show.name') + ":" diff --git a/app/views/phone_numbers/_form_core.html.haml b/app/views/phone_numbers/_form_core.html.haml index add3039..a1ce1f3 100644 --- a/app/views/phone_numbers/_form_core.html.haml +++ b/app/views/phone_numbers/_form_core.html.haml @@ -2,9 +2,9 @@ - if @phone_book_entry = f.input :name, :collection => ['Office', 'Home', 'Mobile', 'Fax'], :include_blank => false, :label => t('phone_numbers.form.name.label'), :hint => conditional_hint('phone_numbers.form.name.hint') - = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint') + = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :autofocus => true - else - if @callthrough || @hunt_group_member || @access_authorization || @current_user.current_tenant.array_of_available_internal_extensions_and_dids.count == 0 || @current_user.current_tenant.array_of_available_internal_extensions_and_dids.count > 250 - = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint') + = f.input :number, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :autofocus => true - else - = f.input :number, :collection => @current_user.current_tenant.array_of_available_internal_extensions_and_dids, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :include_blank => false + = f.input :number, :collection => @current_user.current_tenant.array_of_available_internal_extensions_and_dids, :label => t('phone_numbers.form.number.label'), :hint => conditional_hint('phone_numbers.form.number.hint'), :include_blank => false, :autofocus => true diff --git a/app/views/phone_numbers/_index_core.html.haml b/app/views/phone_numbers/_index_core.html.haml index 06b27c8..f41c949 100644 --- a/app/views/phone_numbers/_index_core.html.haml +++ b/app/views/phone_numbers/_index_core.html.haml @@ -1,12 +1,13 @@ -%table +%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'} - - reset_cycle + - for phone_number in phone_numbers.order(:position) - %tr{:class => cycle('odd', 'even')} + %tr - if phone_number.phone_numberable_type == 'PhoneBookEntry' %td= phone_number.name %td= phone_number diff --git a/app/views/phone_numbers/edit.html.haml b/app/views/phone_numbers/edit.html.haml index d238d3d..14683d2 100644 --- a/app/views/phone_numbers/edit.html.haml +++ b/app/views/phone_numbers/edit.html.haml @@ -1,3 +1,3 @@ -- title t("phone_numbers.edit.page_title", :resource => "" ) +- content_for :title, t("phone_numbers.edit.page_title", :resource => "" ) = render "form"
\ No newline at end of file diff --git a/app/views/phone_numbers/index.html.haml b/app/views/phone_numbers/index.html.haml index 2161739..08a2aa3 100644 --- a/app/views/phone_numbers/index.html.haml +++ b/app/views/phone_numbers/index.html.haml @@ -1,4 +1,4 @@ -- title @parent +- content_for :title, @parent - if @phone_numbers.count > 0 = render "index_core", :phone_numbers => @phone_numbers diff --git a/app/views/phone_numbers/new.html.haml b/app/views/phone_numbers/new.html.haml index e91f4f4..364a4bd 100644 --- a/app/views/phone_numbers/new.html.haml +++ b/app/views/phone_numbers/new.html.haml @@ -1,3 +1,3 @@ -- title t("phone_numbers.new.page_title") +- content_for :title, t("phone_numbers.new.page_title") = render "form" diff --git a/app/views/phone_numbers/show.html.haml b/app/views/phone_numbers/show.html.haml index 30c48bc..de6cb1b 100644 --- a/app/views/phone_numbers/show.html.haml +++ b/app/views/phone_numbers/show.html.haml @@ -1,4 +1,4 @@ -- title t("phone_numbers.show.page_title") +- content_for :title, t("phone_numbers.show.page_title") - if @phone_number.phone_numberable.class == PhoneBookEntry %p diff --git a/app/views/phone_sip_accounts/_index_core.html.haml b/app/views/phone_sip_accounts/_index_core.html.haml index 89afb2b..1e6d3ca 100644 --- a/app/views/phone_sip_accounts/_index_core.html.haml +++ b/app/views/phone_sip_accounts/_index_core.html.haml @@ -1,12 +1,12 @@ -%table +%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') - - - reset_cycle + %th{:colspan => '3'} + - for phone_sip_account in phone_sip_accounts - %tr{:class => cycle('odd', 'even')} + %tr %td= phone_sip_account.phone %td= phone_sip_account.sip_account %td= phone_sip_account.position diff --git a/app/views/phone_sip_accounts/index.html.haml b/app/views/phone_sip_accounts/index.html.haml index a9e3f85..f9ff716 100644 --- a/app/views/phone_sip_accounts/index.html.haml +++ b/app/views/phone_sip_accounts/index.html.haml @@ -1,4 +1,4 @@ -- title t("phone_sip_accounts.index.page_title") +- content_for :title, t("phone_sip_accounts.index.page_title") - if @phone_sip_accounts.count > 0 =render "index_core", :phone_sip_accounts => @phone_sip_accounts diff --git a/app/views/phone_sip_accounts/new.html.haml b/app/views/phone_sip_accounts/new.html.haml index bfe40b8..3ad8895 100644 --- a/app/views/phone_sip_accounts/new.html.haml +++ b/app/views/phone_sip_accounts/new.html.haml @@ -1,3 +1,3 @@ -- title t("phone_sip_accounts.new.page_title") +- content_for :title, t("phone_sip_accounts.new.page_title") = render "form" diff --git a/app/views/phone_sip_accounts/show.html.haml b/app/views/phone_sip_accounts/show.html.haml index 0dd5a9b..54e1e5d 100644 --- a/app/views/phone_sip_accounts/show.html.haml +++ b/app/views/phone_sip_accounts/show.html.haml @@ -1,4 +1,4 @@ -- title t("phone_sip_accounts.show.page_title") +- content_for :title, t("phone_sip_accounts.show.page_title") %p %strong= t('phone_sip_accounts.show.phone_id') + ":" diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml index e0c664b..17b9ca8 100644 --- a/app/views/phones/_form_core.html.haml +++ b/app/views/phones/_form_core.html.haml @@ -9,7 +9,7 @@ :javascript $(".fallback_sip_account_dropdown").hide() - - if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true + - if defined? GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') && GsParameter.get('NIGHTLY_REBOOT_OF_PHONES') == true = f.input :nightly_reboot, :label => t('phones.form.nightly_reboot.label'), :hint => conditional_hint('phones.form.nightly_reboot.hint') - - if defined? PROVISIONING_KEY_LENGTH && PROVISIONING_KEY_LENGTH > 0 + - if !GsParameter.get('PROVISIONING_KEY_LENGTH').nil? && GsParameter.get('PROVISIONING_KEY_LENGTH') > 0 = f.input :provisioning_key_active, :label => t('phones.form.provisioning_key_active.label'), :hint => conditional_hint('phones.form.provisioning_key_active.hint') diff --git a/app/views/phones/_index_core.html.haml b/app/views/phones/_index_core.html.haml index c442d7f..fc1ad19 100644 --- a/app/views/phones/_index_core.html.haml +++ b/app/views/phones/_index_core.html.haml @@ -1,13 +1,13 @@ -%table +%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') - - reset_cycle + - for phone in phones - %tr{:class => cycle('odd', 'even')} + %tr %td= phone.pretty_mac_address %td= phone.phone_model %td= phone.hot_deskable diff --git a/app/views/phones/edit.html.haml b/app/views/phones/edit.html.haml index cdbacac..9452e2a 100644 --- a/app/views/phones/edit.html.haml +++ b/app/views/phones/edit.html.haml @@ -1,3 +1,3 @@ -- title t("phones.edit.page_title", :resource => @phone.mac_address) +- content_for :title, t("phones.edit.page_title", :resource => @phone.mac_address) = render "form" diff --git a/app/views/phones/index.html.haml b/app/views/phones/index.html.haml index 785adf9..4de7919 100644 --- a/app/views/phones/index.html.haml +++ b/app/views/phones/index.html.haml @@ -1,4 +1,4 @@ -- title t("phones.index.page_title") +- content_for :title, t("phones.index.page_title") - if @phones.count > 0 = render "index_core", :phones => @phones diff --git a/app/views/phones/new.html.haml b/app/views/phones/new.html.haml index ae0a539..95fbdf2 100644 --- a/app/views/phones/new.html.haml +++ b/app/views/phones/new.html.haml @@ -1,4 +1,4 @@ -- title t("phones.new.page_title") +- content_for :title, t("phones.new.page_title") - if !@fallback_sip_accounts.any? && can?(:create, current_user.current_tenant.sip_accounts.build) %p diff --git a/app/views/phones/show.html.haml b/app/views/phones/show.html.haml index a7ee952..faf4061 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -1,4 +1,4 @@ -- title t("phones.show.page_title") +- content_for :title, t("phones.show.page_title") %p %strong= t('phones.show.mac_address') + ":" @@ -16,12 +16,12 @@ %strong= t('phones.show.fallback_sip_account_id') + ":" = @phone.fallback_sip_account -- if defined? NIGHTLY_REBOOT_OF_PHONES && NIGHTLY_REBOOT_OF_PHONES == true +- 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 defined? PROVISIONING_KEY_LENGTH && PROVISIONING_KEY_LENGTH > 0 +- 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 @@ -31,9 +31,17 @@ - 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. Das "{mac}" bitte genau so eingeben, es wird vom Telefon automatisch mit der eigenen MAC-Adresse befüllt: + 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 } diff --git a/app/views/ringtones/_index_core.html.haml b/app/views/ringtones/_index_core.html.haml index c39357a..e3b9a32 100644 --- a/app/views/ringtones/_index_core.html.haml +++ b/app/views/ringtones/_index_core.html.haml @@ -1,11 +1,11 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('ringtones.index.audio') %th= t('ringtones.index.bellcore_id') - - reset_cycle + - for ringtone in ringtones - %tr{:class => cycle('odd', 'even')} + %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/ringtones/edit.html.haml b/app/views/ringtones/edit.html.haml index 6779190..341b97f 100644 --- a/app/views/ringtones/edit.html.haml +++ b/app/views/ringtones/edit.html.haml @@ -1,3 +1,3 @@ -- title t("ringtones.edit.page_title") +- content_for :title, t("ringtones.edit.page_title") = render "form" diff --git a/app/views/ringtones/index.html.haml b/app/views/ringtones/index.html.haml index 4da75fa..2eea5fe 100644 --- a/app/views/ringtones/index.html.haml +++ b/app/views/ringtones/index.html.haml @@ -1,4 +1,4 @@ -- title t("ringtones.index.page_title") +- content_for :title, t("ringtones.index.page_title") - if @ringtones.count > 0 = render "index_core", :ringtones => @ringtones diff --git a/app/views/ringtones/new.html.haml b/app/views/ringtones/new.html.haml index 025f440..de0070c 100644 --- a/app/views/ringtones/new.html.haml +++ b/app/views/ringtones/new.html.haml @@ -1,3 +1,3 @@ -- title t("ringtones.new.page_title") +- content_for :title, t("ringtones.new.page_title") = render "form" diff --git a/app/views/ringtones/show.html.haml b/app/views/ringtones/show.html.haml index 408b808..7e0a011 100644 --- a/app/views/ringtones/show.html.haml +++ b/app/views/ringtones/show.html.haml @@ -1,4 +1,4 @@ -- title t("ringtones.show.page_title") +- content_for :title, t("ringtones.show.page_title") - if 1 == 2 %p diff --git a/app/views/route_elements/_form.html.haml b/app/views/route_elements/_form.html.haml new file mode 100644 index 0000000..8feacaa --- /dev/null +++ b/app/views/route_elements/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([@call_route, @route_element]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .actions + = f.button :submit, conditional_t('route_elements.form.submit')
\ No newline at end of file diff --git a/app/views/route_elements/_form_core.html.haml b/app/views/route_elements/_form_core.html.haml new file mode 100644 index 0000000..a9a38a7 --- /dev/null +++ b/app/views/route_elements/_form_core.html.haml @@ -0,0 +1,7 @@ +.inputs + = f.input :var_in, :label => t('route_elements.form.var_in.label'), :hint => conditional_hint('route_elements.form.var_in.hint') + = f.input :var_out, :label => t('route_elements.form.var_out.label'), :hint => conditional_hint('route_elements.form.var_out.hint') + = f.input :pattern, :label => t('route_elements.form.pattern.label'), :hint => conditional_hint('route_elements.form.pattern.hint') + = f.input :replacement, :label => t('route_elements.form.replacement.label'), :hint => conditional_hint('route_elements.form.replacement.hint') + = f.input :action, :collection => RouteElement::ELEMENT_ACTIONS, :label => t('route_elements.form.action.label'), :hint => conditional_hint('route_elements.form.action.hint'), :include_blank => false + = f.input :mandatory, :label => t('route_elements.form.mandatory.label'), :hint => conditional_hint('route_elements.form.mandatory.hint') diff --git a/app/views/route_elements/_index_core.html.haml b/app/views/route_elements/_index_core.html.haml new file mode 100644 index 0000000..5336057 --- /dev/null +++ b/app/views/route_elements/_index_core.html.haml @@ -0,0 +1,19 @@ +%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 + %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/route_elements/edit.html.haml b/app/views/route_elements/edit.html.haml new file mode 100644 index 0000000..c2da3e6 --- /dev/null +++ b/app/views/route_elements/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("route_elements.edit.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/route_elements/index.html.haml b/app/views/route_elements/index.html.haml new file mode 100644 index 0000000..43d47f1 --- /dev/null +++ b/app/views/route_elements/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("route_elements.index.page_title") + +- if @route_elements && @route_elements.count > 0 + = render "index_core", :route_elements => @route_elements + += render :partial => 'shared/create_link', :locals => {:parent => @call_route, :child_class => RouteElement}
\ No newline at end of file diff --git a/app/views/route_elements/new.html.haml b/app/views/route_elements/new.html.haml new file mode 100644 index 0000000..2b9b9c1 --- /dev/null +++ b/app/views/route_elements/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("route_elements.new.page_title") + += render "form"
\ No newline at end of file diff --git a/app/views/route_elements/show.html.haml b/app/views/route_elements/show.html.haml new file mode 100644 index 0000000..808f2a0 --- /dev/null +++ b/app/views/route_elements/show.html.haml @@ -0,0 +1,22 @@ +- content_for :title, t("route_elements.show.page_title") + +%p + %strong= t('route_elements.show.var_in') + ":" + = @route_element.var_in +%p + %strong= t('route_elements.show.var_out') + ":" + = @route_element.var_out +%p + %strong= t('route_elements.show.pattern') + ":" + = @route_element.pattern +%p + %strong= t('route_elements.show.replacement') + ":" + = @route_element.replacement +%p + %strong= t('route_elements.show.action') + ":" + = @route_element.action +%p + %strong= t('route_elements.show.mandatory') + ":" + = @route_element.mandatory + += render :partial => 'shared/show_edit_destroy_part', :locals => {:parent => @call_route, :child => @route_element }
\ No newline at end of file diff --git a/app/views/sessions/new.html.haml b/app/views/sessions/new.html.haml index 8ad77b1..f386a5d 100644 --- a/app/views/sessions/new.html.haml +++ b/app/views/sessions/new.html.haml @@ -1,4 +1,4 @@ -- title t("sessions.new.page_title") +- content_for :title, t("sessions.new.page_title") = simple_form_for :sessions, :url => sessions_path do |t| = t.input :login_data, :label => t('sessions.form.email'), :autofocus => true diff --git a/app/views/shared/_create_link.html.haml b/app/views/shared/_create_link.html.haml index 103c82b..0711ddf 100644 --- a/app/views/shared/_create_link.html.haml +++ b/app/views/shared/_create_link.html.haml @@ -2,10 +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) - = link_to t("#{child_class.name.underscore.pluralize}.index.actions.create"), method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) + %a.btn.btn-mini.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) } + %i.icon-plus.icon-white + =t("#{child_class.name.underscore.pluralize}.index.actions.create") - else - = link_to t("#{child_class.name.underscore.pluralize}.index.actions.create_for", :resource => parent.to_s), method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) + %a.btn.btn-mini.btn-primary{:href => method( :"new_#{parent.class.name.underscore}_#{child_class.name.underscore}_path" ).(parent) } + %i.icon-plus.icon-white + / =t("#{child_class.name.underscore.pluralize}.index.actions.create_for", :resource => parent.to_s) + =t("#{child_class.name.underscore.pluralize}.index.actions.create") + - elsif !(defined? child_class).nil? - if can? :create, child_class %p - = link_to t("#{child_class.name.underscore.pluralize}.index.actions.create"), method( :"new_#{child_class.name.underscore}_path" ).()
\ No newline at end of file + %a.btn.btn-mini.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/_flash.html.haml b/app/views/shared/_flash.html.haml deleted file mode 100644 index 320fd15..0000000 --- a/app/views/shared/_flash.html.haml +++ /dev/null @@ -1,19 +0,0 @@ -- flash.each do |type, msg| - .flash{:class => type} - .light - .sign= resolve_flash_sign(type) - .message= msg - - --# These are the available types: --# --# .flash.notice --# .light --# .sign i --# .message Lorem ipsum dolor sit amet, consectetur adipisicing eli.w --# --# .flash.warning --# .light --# .sign ! --# .message Lorem ipsum dolor sit amet, consectetur adipisicing eli.w - 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 06ec904..00b9e8a 100644 --- a/app/views/shared/_index_view_edit_destroy_part.html.haml +++ b/app/views/shared/_index_view_edit_destroy_part.html.haml @@ -1,29 +1,40 @@ -- style = 'width:35px' +- style = 'width:90px' +- style = '' - if !(defined? parent).nil? && !(defined? child).nil? - %td{ :style => style } - - if can? :show, child - = link_to t("#{child.class.name.underscore.pluralize}.index.actions.show"), method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) - %td{ :style => style } - - if can? :edit, child - = link_to t("#{child.class.name.underscore.pluralize}.index.actions.edit"), method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) - %td{ :style => style } - - if can? :destroy, child - = link_to t("#{child.class.name.underscore.pluralize}.index.actions.destroy"), method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :method => :delete - - if child.respond_to?(:move_up?) or child and child.respond_to?(:move_down?) + - if can? :show, child %td{ :style => style } - - if can? :move_down, child and child.respond_to?(:move_down?) and child.move_down? - = link_to '⇩'.html_safe, method( :"move_lower_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :method => :put - - if can? :move_up, child and child.respond_to?(:move_up?) and child.move_up? - = link_to '⇧'.html_safe, method( :"move_higher_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :method => :put + %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") + + - if can? :edit, child + %td{ :style => style } + %a.btn.btn-mini.btn-warning{:href => method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) } + %i.icon-edit.icon-white + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") + + - if can? :destroy, child + %td{ :style => style } + %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :rel => "nofollow"} + %i.icon-remove.icon-white + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy") - elsif !(defined? child).nil? - %td{ :style => style } - - if can? :show, child - = link_to t("#{child.class.name.underscore.pluralize}.index.actions.show"), method( :"#{child.class.name.underscore}_path" ).(child) - %td{ :style => style } - - if can? :edit, child - = link_to t("#{child.class.name.underscore.pluralize}.index.actions.edit"), method( :"edit_#{child.class.name.underscore}_path" ).(child) - %td{ :style => style } - - if can? :destroy, child - = link_to t("#{child.class.name.underscore.pluralize}.index.actions.destroy"), method( :"#{child.class.name.underscore}_path" ).(child), :method => :delete
\ No newline at end of file + - if can? :show, child + %td{ :style => style } + %a.btn.btn-mini.btn-success{:href => method( :"#{child.class.name.underscore}_path" ).(child) } + %i.icon-info-sign.icon-white + =t("#{child.class.name.underscore.pluralize}.index.actions.show") + + - if can? :edit, child + %td{ :style => style } + %a.btn.btn-mini.btn-warning{:href => method( :"edit_#{child.class.name.underscore}_path" ).(child) } + %i.icon-edit.icon-white + =t("#{child.class.name.underscore.pluralize}.index.actions.edit") + + - if can? :destroy, child + %td{ :style => style } + %a.btn.btn-mini.btn-danger{"data-confirm" => t("#{child.class.name.underscore.pluralize}.index.actions.confirm_detroy"), "data-method" => "delete", :href => method( :"#{child.class.name.underscore}_path" ).(child), :rel => "nofollow"} + %i.icon-trash.icon-white + =t("#{child.class.name.underscore.pluralize}.index.actions.destroy")
\ No newline at end of file diff --git a/app/views/shared/_show_edit_destroy_part.html.haml b/app/views/shared/_show_edit_destroy_part.html.haml index aff18d1..e82c667 100644 --- a/app/views/shared/_show_edit_destroy_part.html.haml +++ b/app/views/shared/_show_edit_destroy_part.html.haml @@ -1,16 +1,20 @@ %p - if !(defined? parent).nil? && !(defined? child).nil? - if can? :edit, child - = link_to t("#{child.class.name.underscore.pluralize}.show.actions.edit"), method( :"edit_#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child) + %a.btn.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 - - if can? :edit, child - | - = link_to t("#{child.class.name.underscore.pluralize}.show.actions.destroy"), method( :"#{parent.class.name.underscore}_#{child.class.name.underscore}_path" ).(parent, child), :method => :delete + %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"} + %i.icon-trash.icon-white + =t("#{child.class.name.underscore.pluralize}.actions.destroy") - elsif !(defined? child).nil? - if can? :edit, child - = link_to t("#{child.class.name.underscore.pluralize}.show.actions.edit"), method( :"edit_#{child.class.name.underscore}_path" ).(child) + %a.btn.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 - - if can? :edit, child - | - = link_to t("#{child.class.name.underscore.pluralize}.show.actions.destroy"), method( :"#{child.class.name.underscore}_path" ).(child), :method => :delete
\ No newline at end of file + %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"} + %i.icon-trash.icon-white + =t("#{child.class.name.underscore.pluralize}.actions.destroy")
\ No newline at end of file diff --git a/app/views/shared/_system_message.html.haml b/app/views/shared/_system_message.html.haml deleted file mode 100644 index 4aabb9c..0000000 --- a/app/views/shared/_system_message.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -- if current_user - .flash.notice#system_message_display - .light - .sign i - .message#system_message This is the place to display incoming calls and other stuff. - - = subscribe_to "/users/#{current_user.id}/system_messages" - - :javascript - $('#system_message_display').hide()
\ No newline at end of file diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml index dbd27fe..495ae84 100644 --- a/app/views/sip_accounts/_form_core.html.haml +++ b/app/views/sip_accounts/_form_core.html.haml @@ -1,12 +1,13 @@ .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') + = 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 = 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') = f.input :clip, :label => t('sip_accounts.form.clip.label'), :hint => conditional_hint('sip_accounts.form.clip.hint') - = f.input :hotdeskable, :label => t('sip_accounts.form.hotdeskable.label'), :hint => conditional_hint('sip_accounts.form.hotdeskable.hint') + - if @sip_account.sip_accountable_type == 'User' + = f.input :hotdeskable, :label => t('sip_accounts.form.hotdeskable.label'), :hint => conditional_hint('sip_accounts.form.hotdeskable.hint') = f.input :clip_no_screening, :label => t('sip_accounts.form.clip_no_screening.label'), :hint => conditional_hint('sip_accounts.form.clip_no_screening.hint') - if CallForward.where(:phone_number_id => @sip_account.phone_number_ids).count == 0 || @sip_account.callforward_rules_act_per_sip_account == true = f.input :callforward_rules_act_per_sip_account, :label => t('sip_accounts.form.callforward_rules_act_per_sip_account.label'), :hint => conditional_hint('sip_accounts.form.callforward_rules_act_per_sip_account.hint') diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index 69c9302..8d9791d 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -1,26 +1,24 @@ -%table +%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') - - - reset_cycle + %th{:colspan => '3'} + - for sip_account in sip_accounts - %tr{:class => cycle('odd', 'even')} + %tr %td - if sip_account.registration - =image_tag 'icons/phone-down-green-32x.png' + %i.icon-ok - else - =image_tag 'icons/phone-down-grey-32x.png' + %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) - %br - = render :partial => 'shared/create_link', :locals => {:parent => sip_account, :child_class => PhoneNumber, :short_link => true} %td - sip_account.phones.each do |phone| diff --git a/app/views/sip_accounts/edit.html.haml b/app/views/sip_accounts/edit.html.haml index c070ff7..d26b245 100644 --- a/app/views/sip_accounts/edit.html.haml +++ b/app/views/sip_accounts/edit.html.haml @@ -1,3 +1,3 @@ -- title t("sip_accounts.edit.page_title") +- content_for :title, t("sip_accounts.edit.page_title") = render "form" diff --git a/app/views/sip_accounts/index.html.haml b/app/views/sip_accounts/index.html.haml index 1131770..fbdba48 100644 --- a/app/views/sip_accounts/index.html.haml +++ b/app/views/sip_accounts/index.html.haml @@ -1,4 +1,4 @@ -- title t("sip_accounts.index.page_title") +- content_for :title, t("sip_accounts.index.page_title") - if @sip_accounts.count > 0 = render "index_core", :sip_accounts => @sip_accounts diff --git a/app/views/sip_accounts/new.html.haml b/app/views/sip_accounts/new.html.haml index 9d44680..bc4e00b 100644 --- a/app/views/sip_accounts/new.html.haml +++ b/app/views/sip_accounts/new.html.haml @@ -1,3 +1,3 @@ -- title t("sip_accounts.new.page_title") +- content_for :title, t("sip_accounts.new.page_title") = render "form" diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index c6344cd..4f6244f 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -1,4 +1,4 @@ -- title t("sip_accounts.show.page_title") +- content_for :title, t("sip_accounts.show.page_title") %p %strong= t('sip_accounts.show.auth_name') + ":" diff --git a/app/views/sip_domains/_index_core.html.haml b/app/views/sip_domains/_index_core.html.haml index 37374f2..d26fd1b 100644 --- a/app/views/sip_domains/_index_core.html.haml +++ b/app/views/sip_domains/_index_core.html.haml @@ -1,11 +1,11 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('sip_domains.index.host') %th= t('sip_domains.index.realm') - - reset_cycle + - for sip_domain in sip_domains - %tr{:class => cycle('odd', 'even')} + %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/sip_domains/edit.html.haml b/app/views/sip_domains/edit.html.haml index dcf8d6b..adf77ef 100644 --- a/app/views/sip_domains/edit.html.haml +++ b/app/views/sip_domains/edit.html.haml @@ -1,3 +1,3 @@ -- title t("sip_domains.edit.page_title") +- content_for :title, t("sip_domains.edit.page_title") = render "form" diff --git a/app/views/sip_domains/index.html.haml b/app/views/sip_domains/index.html.haml index 6de7f42..3eb0c28 100644 --- a/app/views/sip_domains/index.html.haml +++ b/app/views/sip_domains/index.html.haml @@ -1,4 +1,4 @@ -- title t("sip_domains.index.page_title") +- content_for :title, t("sip_domains.index.page_title") - if @sip_domains.count > 0 = render "index_core", :sip_domains => @sip_domains diff --git a/app/views/sip_domains/new.html.haml b/app/views/sip_domains/new.html.haml index 12ff340..863e680 100644 --- a/app/views/sip_domains/new.html.haml +++ b/app/views/sip_domains/new.html.haml @@ -1,3 +1,3 @@ -- title t("sip_domains.new.page_title") +- content_for :title, t("sip_domains.new.page_title") = render "form" diff --git a/app/views/sip_domains/show.html.haml b/app/views/sip_domains/show.html.haml index e136eaf..b7b74cd 100644 --- a/app/views/sip_domains/show.html.haml +++ b/app/views/sip_domains/show.html.haml @@ -1,4 +1,4 @@ -- title t("sip_domains.show.page_title") +- content_for :title, t("sip_domains.show.page_title") %p %strong= t('sip_domains.show.host') + ":" diff --git a/app/views/softkeys/_index_core.html.haml b/app/views/softkeys/_index_core.html.haml index fd3dca8..7194379 100644 --- a/app/views/softkeys/_index_core.html.haml +++ b/app/views/softkeys/_index_core.html.haml @@ -1,12 +1,12 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('softkeys.index.function') %th= t('softkeys.index.number') %th= t('softkeys.index.label') - - reset_cycle + - for softkey in softkeys.order(:position) - %tr{:class => cycle('odd', 'even')} + %tr %td =softkey.to_s %td= softkey.number diff --git a/app/views/softkeys/edit.html.haml b/app/views/softkeys/edit.html.haml index 54d53fc..ce45176 100644 --- a/app/views/softkeys/edit.html.haml +++ b/app/views/softkeys/edit.html.haml @@ -1,3 +1,3 @@ -- title t("softkeys.edit.page_title") +- content_for :title, t("softkeys.edit.page_title") = render "form"
\ No newline at end of file diff --git a/app/views/softkeys/index.html.haml b/app/views/softkeys/index.html.haml index 8bdc00e..d0b68a9 100644 --- a/app/views/softkeys/index.html.haml +++ b/app/views/softkeys/index.html.haml @@ -1,4 +1,4 @@ -- title t("softkeys.index.page_title") +- content_for :title, t("softkeys.index.page_title") - if @softkeys.count > 0 = render "index_core", :softkeys => @softkeys diff --git a/app/views/softkeys/new.html.haml b/app/views/softkeys/new.html.haml index 593add6..9199a5c 100644 --- a/app/views/softkeys/new.html.haml +++ b/app/views/softkeys/new.html.haml @@ -1,3 +1,3 @@ -- title t("softkeys.new.page_title") +- content_for :title, t("softkeys.new.page_title") = render "form" diff --git a/app/views/softkeys/show.html.haml b/app/views/softkeys/show.html.haml index 9ab4333..d0db111 100644 --- a/app/views/softkeys/show.html.haml +++ b/app/views/softkeys/show.html.haml @@ -1,4 +1,4 @@ -- title t("softkeys.show.page_title") +- content_for :title, t("softkeys.show.page_title") %p %strong= t('softkeys.show.function') + ":" diff --git a/app/views/system_messages/_index_core.html.haml b/app/views/system_messages/_index_core.html.haml index 157d964..361eb5f 100644 --- a/app/views/system_messages/_index_core.html.haml +++ b/app/views/system_messages/_index_core.html.haml @@ -1,11 +1,11 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('system_messages.index.created_at') %th= t('system_messages.index.content') - - reset_cycle + - for system_message in system_messages - %tr{:class => cycle('odd', 'even')} + %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/system_messages/index.html.haml b/app/views/system_messages/index.html.haml index da77e18..ffd3fc3 100644 --- a/app/views/system_messages/index.html.haml +++ b/app/views/system_messages/index.html.haml @@ -1,3 +1,3 @@ -- title t("system_messages.index.page_title") +- content_for :title, t("system_messages.index.page_title") = render "index_core", :system_messages => @system_messages
\ No newline at end of file diff --git a/app/views/system_messages/new.html.haml b/app/views/system_messages/new.html.haml index 3afdb24..565f5c5 100644 --- a/app/views/system_messages/new.html.haml +++ b/app/views/system_messages/new.html.haml @@ -1,3 +1,3 @@ -- title t("system_messages.new.page_title") +- content_for :title, t("system_messages.new.page_title") = render "form" diff --git a/app/views/system_messages/show.html.haml b/app/views/system_messages/show.html.haml index 694e4c1..70be6f2 100644 --- a/app/views/system_messages/show.html.haml +++ b/app/views/system_messages/show.html.haml @@ -1,4 +1,4 @@ -- title t("system_messages.show.page_title") +- content_for :title, t("system_messages.show.page_title") %p %strong= t('system_messages.show.created_at') + ":" diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml deleted file mode 100644 index b9b47d5..0000000 --- a/app/views/tenants/_admin_area.de.html.haml +++ /dev/null @@ -1,118 +0,0 @@ -%p - Sie sind Mitglied der - = link_to 'Admin Gruppe', tenant_user_group_path(@tenant, @tenant.user_groups.find_by_name('Admins')) - und haben deshalb besondere Rechte. Aber wie Peter Parker schon sagte: "With great power comes great responsibility." - -%p - Dieser Mandant hat - = link_to pluralize(@tenant.user_groups.count, 'user group'), tenant_user_groups_path(@tenant) - - if @tenant.user_groups.count < 5 - = "(#{@tenant.user_groups.order(:name).map{|group| group.to_s }.join(', ')})" - die in Summe - = link_to pluralize(@tenant.users.count, 'user'), tenant_users_path(@tenant) - verwalten. - 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 manufacturer, manufacturer_path(manufacturer) - - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last - = succeed ' und ' do - =link_to manufacturer, manufacturer_path(manufacturer) - - else - = succeed '.' do - =link_to manufacturer, manufacturer_path(manufacturer) - -%h3 SIP-Konten und Telefone - -%table - %tr{:class => 'even'} - %th - %th - = @tenant - %th - Alle Benutzer von - = "\"#{@tenant}\"" - %tr{:class => 'odd'} - %td - SIP-Konten - %td - = link_to @tenant.sip_accounts.count.to_s, tenant_sip_accounts_path(@tenant) - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => SipAccount} - %td= @tenant.users_sip_accounts.count.to_s - %tr{:class => 'even'} - %td - Telefone - %td - = link_to @tenant.phones.count.to_s, tenant_phones_path(@tenant) - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Phone} - %td= @tenant.users_phones.count.to_s - -%h3 Allgemein - -%table - %tr{:class => 'even'} - %th - Funktion - %th - Anzahl - %th - %tr{:class => 'odd'} - %td - Callthrough - %td - = link_to @tenant.callthroughs.count.to_s, tenant_callthroughs_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Callthrough} - %tr{:class => 'even'} - %td - Konferenzen - %td - = link_to @tenant.conferences.count.to_s, tenant_conferences_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Conference} - %tr{:class => 'odd'} - %td - Rufgruppen - %td - = link_to @tenant.hunt_groups.count.to_s, tenant_hunt_groups_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => HuntGroup} - %tr{:class => 'even'} - %td - Warteschleifen - %td - = link_to @tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => AutomaticCallDistributor} - %tr{:class => 'odd'} - %td - Oberflächen-Funktionen - %td - = link_to GuiFunction.count.to_s, gui_functions_path - %td - --# Phone books --# -- if GuiFunction.display?('show_phone_books_in_user_show_view', current_user) - - if can?( :index, PhoneBook ) - %h2=t("phone_books.index.page_title") - = render "phone_books/index_core", :phone_books => @tenant.phone_books - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneBook} - -- if STRICT_INTERNAL_EXTENSION_HANDLING == true - %h3= t('phone_number_ranges.index.page_title') - - - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(INTERNAL_EXTENSIONS).try(:phone_numbers).try(:count).to_i == 0 - Der Mandant - = "\"#{@tenant}\"" - wurde erst vor - = distance_of_time_in_words_to_now(@tenant.created_at) - erstellt. Es gibt immer noch nicht abgeschlossene - = pluralize(Delayed::Job.count, 'Hintergrundprozesse') - \. Bitte warten Sie noch ein paar Minuten und laden anschließend diese Seite erneut. - - else - =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => SERVICE_NUMBERS)) - =render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange} diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index d648143..627f221 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,116 +1,32 @@ -%p - You belong to the - = link_to 'admin group', tenant_user_group_path(@tenant, @tenant.user_groups.find_by_name('Admins')) - and therefore have super powers. But always remember Peter Parker's: "With great power comes great responsibility." += render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => tenant} + += render :partial => 'users_table', :locals => {:tenant => tenant} + += render :partial => 'user_groups_table', :locals => {:tenant => tenant} + +%h2 Features += render :partial => 'tenants/table_of_functions', :locals => {:tenant => tenant} + += render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + +%h2 Gemeinschaft Konfiguration += render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} %p - = succeed '.' do - This tenant has - = link_to pluralize(@tenant.user_groups.count, 'user group'), tenant_user_groups_path(@tenant) - - if @tenant.user_groups.count < 5 - = "(#{@tenant.user_groups.order(:name).map{|group| group.to_s }.join(', ')})" - which handle a total of - = link_to pluralize(@tenant.users.count, 'user'), tenant_users_path(@tenant) - This system can setup + Das System kann = PhoneModel.count - different phone models from the manufacturers + 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 manufacturer, manufacturer_path(manufacturer) + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last - = succeed ' and ' do - =link_to manufacturer, manufacturer_path(manufacturer) + = succeed ' und ' do + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) - else = succeed '.' do - =link_to manufacturer, manufacturer_path(manufacturer) - -%h3 SIP-Accounts and Phones - -%table - %tr{:class => 'even'} - %th - %th - = @tenant - %th - All users of - = "\"#{@tenant}\"" - %tr{:class => 'odd'} - %td - SIP accounts - %td - = link_to @tenant.sip_accounts.count.to_s, tenant_sip_accounts_path(@tenant) - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => SipAccount} - %td= @tenant.users_sip_accounts.count.to_s - %tr{:class => 'even'} - %td - Phones - %td - = link_to @tenant.phones.count.to_s, tenant_phones_path(@tenant) - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Phone} - %td= @tenant.users_phones.count.to_s - -%h3 Misc - -%table - %tr{:class => 'even'} - %th - Feature - %th - Counter - %th - %tr{:class => 'odd'} - %td - Callthroughs - %td - = link_to @tenant.callthroughs.count.to_s, tenant_callthroughs_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Callthrough} - %tr{:class => 'even'} - %td - Conferences - %td - = link_to @tenant.conferences.count.to_s, tenant_conferences_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Conference} - %tr{:class => 'odd'} - %td - Hunt groups - %td - = link_to @tenant.hunt_groups.count.to_s, tenant_hunt_groups_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => HuntGroup} - %tr{:class => 'even'} - %td - ACDs - %td - = link_to @tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(@tenant) - %td - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => AutomaticCallDistributor} - %tr{:class => 'odd'} - %td - GUI functions - %td - = link_to GuiFunction.count.to_s, gui_functions_path - %td - --# Phone books --# -- if GuiFunction.display?('show_phone_books_in_user_show_view', current_user) - - if can?( :index, PhoneBook ) - %h2=t("phone_books.index.page_title") - = render "phone_books/index_core", :phone_books => @tenant.phone_books - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneBook} + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) -- if STRICT_INTERNAL_EXTENSION_HANDLING == true - %h3= t('phone_number_ranges.index.page_title') += render :partial => 'call_routes', :locals => {:tenant => tenant} - - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(INTERNAL_EXTENSIONS).try(:phone_numbers).try(:count).to_i == 0 - This tenant was created - = distance_of_time_in_words_to_now(@tenant.created_at) - ago. There are still - = pluralize(Delayed::Job.count, 'background job') - not finished. This can take a couple of minutes. Please reload this page later. - - else - =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => SERVICE_NUMBERS)) - =render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange} += render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways}
\ No newline at end of file diff --git a/app/views/tenants/_call_routes.html.haml b/app/views/tenants/_call_routes.html.haml new file mode 100644 index 0000000..28f84bf --- /dev/null +++ b/app/views/tenants/_call_routes.html.haml @@ -0,0 +1,8 @@ +%h2= t("call_routes.index.page_title") + +- if CallRoute.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = render "call_routes/index_core", :call_routes => CallRoute.all + = render :partial => 'shared/create_link', :locals => {:child_class => CallRoute} +- else + %p + = link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + t("call_routes.index.page_title"), call_routes_path
\ No newline at end of file diff --git a/app/views/tenants/_form.html.haml b/app/views/tenants/_form.html.haml index 2ca8a69..1641e78 100644 --- a/app/views/tenants/_form.html.haml +++ b/app/views/tenants/_form.html.haml @@ -11,13 +11,13 @@ = f.input :from_field_voicemail_email, :label => t('tenants.form.from_field_voicemail_email.label'), :hint => conditional_hint('tenants.form.from_field_voicemail_email.hint') = f.input :from_field_pin_change_email, :label => t('tenants.form.from_field_pin_change_email.label'), :hint => conditional_hint('tenants.form.from_field_pin_change_email.hint') - - if STRICT_INTERNAL_EXTENSION_HANDLING == true || STRICT_DID_HANDLING == true + - if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == true || GsParameter.get('STRICT_DID_HANDLING') == true %h2= t('tenants.form.phone_numbers') %p= t('tenants.form.intro') - - if STRICT_INTERNAL_EXTENSION_HANDLING == true + - if GsParameter.get('STRICT_INTERNAL_EXTENSION_HANDLING') == true = f.input :internal_extension_ranges, :label => t('tenants.form.internal_extension_ranges.label'), :hint => conditional_hint('tenants.form.internal_extension_ranges.hint') - - if STRICT_DID_HANDLING == true + - if GsParameter.get('STRICT_DID_HANDLING') == true = f.input :did_list, :label => t('tenants.form.did_list.label'), :hint => conditional_hint('tenants.form.did_list.hint') .actions diff --git a/app/views/tenants/_gateways.html.haml b/app/views/tenants/_gateways.html.haml new file mode 100644 index 0000000..c861ad3 --- /dev/null +++ b/app/views/tenants/_gateways.html.haml @@ -0,0 +1,8 @@ +%h2= t("gateways.index.page_title") + +- if Gateway.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = render "gateways/index_core", :gateways => Gateway.all + = render :partial => 'shared/create_link', :locals => {:child_class => Gateway} +- else + %p + = link_to t("gateways.index.page_title"), gateways_path
\ 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 new file mode 100644 index 0000000..8afdb0e --- /dev/null +++ b/app/views/tenants/_gs_parameter_table.html.haml @@ -0,0 +1,24 @@ +- 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 + + %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 diff --git a/app/views/tenants/_index_core.html.haml b/app/views/tenants/_index_core.html.haml index 60afeee..721d624 100644 --- a/app/views/tenants/_index_core.html.haml +++ b/app/views/tenants/_index_core.html.haml @@ -1,11 +1,11 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('tenants.index.name') %th= t('tenants.index.description') - - reset_cycle + - for tenant in tenants - %tr{:class => cycle('odd', 'even')} + %tr %td= tenant.name %td= tenant.description %td diff --git a/app/views/tenants/_sip_accounts_and_phones.html.haml b/app/views/tenants/_sip_accounts_and_phones.html.haml new file mode 100644 index 0000000..bcc2dd6 --- /dev/null +++ b/app/views/tenants/_sip_accounts_and_phones.html.haml @@ -0,0 +1,68 @@ +%table{:class => 'table table-striped'} + %tr + %th + %th= t("sip_accounts.index.page_title") + %th= t("phones.index.page_title") + + - cache(['tenant_show_admin_area_sip_accounts_and_phones_row', I18n.locale, @tenant, @tenant.sip_accounts.count, @tenant.sip_accounts.reorder(:updated_at).last, @tenant.phones.count, @tenant.phones.reorder(:updated_at).last]) do + + %tr + %td= tenant + - cache(['tenant_show_admin_area_sip_accounts_table_cell', I18n.locale, @tenant, @tenant.sip_accounts.count, @tenant.sip_accounts.reorder(:updated_at).last]) do + %td + - if tenant.sip_accounts.any? + - if tenant.sip_accounts.count > GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = link_to tenant.sip_accounts.count.to_s, tenant_sip_accounts_path(tenant) + - else + - tenant.sip_accounts.each do |sip_account| + = succeed ', ' do + =link_to "#{sip_account.caller_name}", tenant_sip_account_path(tenant,sip_account) + - if sip_account.phone_numbers.any? + = '[' + truncate(sip_account.phone_numbers.map{|phone_number| phone_number.to_s}.join(', '), :length => 25) + ']' + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => SipAccount} + + - cache(['tenant_show_admin_area_phones_table_cell', I18n.locale, @tenant, @tenant.phones.count, @tenant.phones.reorder(:updated_at).last]) do + %td + - if tenant.phones.any? + - if tenant.phones.count > GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = link_to tenant.phones.count.to_s, tenant_phones_path(tenant) + - else + - cache(['tenant_show_tenant_phones', I18n.locale, tenant, tenant.phones]) do + - tenant.phones.each do |phone| + = succeed ', ' do + = link_to "#{phone.phone_model.to_s} (#{phone.pretty_mac_address})#{(phone.ip_address.blank? ? '' : " - #{phone.ip_address}")}", tenant_phone_path(tenant, phone) + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Phone} + + %tr + %td= t("users.index.page_title") + %td + - if tenant.users_sip_accounts.any? + - if tenant.users_sip_accounts.count > GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = tenant.users_sip_accounts.count + - else + - tenant.users_sip_accounts.each do |sip_account| + - if sip_account != tenant.users_sip_accounts.last + = succeed ', ' do + =link_to "#{sip_account.caller_name}", user_sip_account_path(sip_account.sip_accountable,sip_account) + - if sip_account.phone_numbers.any? + = '[' + truncate(sip_account.phone_numbers.map{|phone_number| phone_number.to_s}.join(', '), :length => 25) + ']' + - else + =link_to "#{sip_account.caller_name}", user_sip_account_path(sip_account.sip_accountable,sip_account) + - if sip_account.phone_numbers.any? + = '[' + truncate(sip_account.phone_numbers.map{|phone_number| phone_number.to_s}.join(', '), :length => 25) + ']' + - else + = "-" + + %td + - if tenant.users_phones.any? + - if tenant.users_phones.count > GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = tenant.users_phones.count + - else + - tenant.users_phones.each do |phone| + - if phone != tenant.users_phones.last + = succeed ', ' do + = link_to "#{phone.phone_model.to_s} (#{phone.pretty_mac_address})#{(phone.ip_address.blank? ? '' : " - #{phone.ip_address}")}", user_phone_path(phone.phoneable, phone) + - else + = link_to "#{phone.phone_model.to_s} (#{phone.pretty_mac_address})#{(phone.ip_address.blank? ? '' : " - #{phone.ip_address}")}", user_phone_path(phone.phoneable, phone) + - else + = '-' diff --git a/app/views/tenants/_table_of_functions.html.haml b/app/views/tenants/_table_of_functions.html.haml new file mode 100644 index 0000000..d7af224 --- /dev/null +++ b/app/views/tenants/_table_of_functions.html.haml @@ -0,0 +1,53 @@ +- cache(['table_of_pbx_features', I18n.locale, tenant, tenant.callthroughs.count, tenant.callthroughs.reorder(:updated_at).last, tenant.conferences.count, tenant.conferences.reorder(:updated_at).last, tenant.hunt_groups.count, tenant.hunt_groups.reorder(:updated_at).last, tenant.automatic_call_distributors.count, tenant.automatic_call_distributors.reorder(:updated_at).last]) do + %table{:class => 'table table-striped'} + %tr + %th + Funktion + %th + Anzahl + %th + - cache(['table_of_pbx_features_callthroughs_row', I18n.locale, tenant, tenant.callthroughs.count, tenant.callthroughs.reorder(:updated_at).last]) do + %tr + %td + = t("callthroughs.name") + %td + - if tenant.callthroughs.any? + = link_to Haml::Engine.new("%i.icon-list").render + ' ' + tenant.callthroughs.count.to_s, tenant_callthroughs_path(tenant) + - else + = '-' + %td + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Callthrough} + - cache(['table_of_pbx_features_conferences_row', I18n.locale, tenant, tenant.conferences.count, tenant.conferences.reorder(:updated_at).last]) do + %tr + %td + = t("conferences.name") + %td + - if tenant.conferences.any? + + = link_to Haml::Engine.new("%i.icon-list").render + ' ' + tenant.conferences.count.to_s, tenant_conferences_path(tenant) + - else + = '-' + %td + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => Conference} + - cache(['table_of_pbx_features_hunt_groups_row', I18n.locale, tenant, tenant.hunt_groups.count, tenant.hunt_groups.reorder(:updated_at).last]) do + %tr + %td + = t("hunt_groups.name") + %td + - if tenant.hunt_groups.any? + = link_to Haml::Engine.new("%i.icon-list").render + ' ' + tenant.hunt_groups.count.to_s, tenant_hunt_groups_path(tenant) + - else + = '-' + %td + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => HuntGroup} + - cache(['table_of_pbx_features_automatic_call_distributors_row', I18n.locale, tenant, tenant.automatic_call_distributors.count, tenant.automatic_call_distributors.reorder(:updated_at).last]) do + %tr + %td + = t("automatic_call_distributors.name") + %td + - if tenant.automatic_call_distributors.any? + = link_to Haml::Engine.new("%i.icon-list").render + ' ' + tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(tenant) + - else + = '-' + %td + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => AutomaticCallDistributor}
\ No newline at end of file diff --git a/app/views/tenants/_table_of_phone_books.html.haml b/app/views/tenants/_table_of_phone_books.html.haml new file mode 100644 index 0000000..9d9b97c --- /dev/null +++ b/app/views/tenants/_table_of_phone_books.html.haml @@ -0,0 +1,8 @@ +- cache(['user_show_phone_books', I18n.locale, tenant, tenant.phone_books]) do + %h2=t("phone_books.index.page_title") + -# Phone books + -# + - if GuiFunction.display?('show_phone_books_in_user_show_view', current_user) + - if can?( :index, PhoneBook ) + = render "phone_books/index_core", :phone_books => tenant.phone_books + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => PhoneBook}
\ No newline at end of file diff --git a/app/views/tenants/_user_groups_table.html.haml b/app/views/tenants/_user_groups_table.html.haml new file mode 100644 index 0000000..61b3e3d --- /dev/null +++ b/app/views/tenants/_user_groups_table.html.haml @@ -0,0 +1,4 @@ +- if @tenant.user_groups.any? + %h2= t("user_groups.index.page_title") + = render "user_groups/index_core", :user_groups => tenant.user_groups + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => UserGroup} diff --git a/app/views/tenants/_users_table.html.haml b/app/views/tenants/_users_table.html.haml new file mode 100644 index 0000000..850ea5e --- /dev/null +++ b/app/views/tenants/_users_table.html.haml @@ -0,0 +1,7 @@ +%h2= t("users.index.page_title") +- if @tenant.users.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS') + = render "users/index_core", :users => tenant.users + = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => User} +- else + %p + = link_to "Liste aller User.", tenant_users_path(tenant)
\ No newline at end of file diff --git a/app/views/tenants/edit.html.haml b/app/views/tenants/edit.html.haml index 159f4fd..d2e837d 100644 --- a/app/views/tenants/edit.html.haml +++ b/app/views/tenants/edit.html.haml @@ -1,3 +1,3 @@ -- title t("tenants.edit.page_title", :resource => @tenant ) +- content_for :title, t("tenants.edit.page_title", :resource => @tenant ) = render "form" diff --git a/app/views/tenants/index.html.haml b/app/views/tenants/index.html.haml index 1783825..9404f17 100644 --- a/app/views/tenants/index.html.haml +++ b/app/views/tenants/index.html.haml @@ -1,4 +1,4 @@ -- title t("tenants.index.page_title") +- content_for :title, t("tenants.index.page_title") - if @tenants.count > 0 = render "index_core", :tenants => @tenants diff --git a/app/views/tenants/new.html.haml b/app/views/tenants/new.html.haml index dca3809..d57ae36 100644 --- a/app/views/tenants/new.html.haml +++ b/app/views/tenants/new.html.haml @@ -1,3 +1,3 @@ -- title t("tenants.new.page_title") +- content_for :title, t("tenants.new.page_title") = render "form" diff --git a/app/views/tenants/show.html.haml b/app/views/tenants/show.html.haml index cb2b895..53d3307 100644 --- a/app/views/tenants/show.html.haml +++ b/app/views/tenants/show.html.haml @@ -1,8 +1,5 @@ -- title t("tenants.show.page_title") +- content_for :title, @tenant.name -%p - %strong= t('tenants.show.name') + ":" - = @tenant.name - if !@tenant.description.blank? %p %strong= t('tenants.show.description') + ":" @@ -10,5 +7,5 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @tenant } -- if @tenant.user_groups.where(:name => 'Admins').count > 0 && @tenant.user_groups.where(:name => 'Admins').first.users.include?(current_user) - = render 'admin_area'
\ No newline at end of file +- if @tenant.user_groups.where(:name => 'Admins').any? && @tenant.user_groups.where(:name => 'Admins').first.users.include?(current_user) + = render :partial => 'admin_area', :locals => { :tenant => @tenant, :gateways => @gateways}
\ No newline at end of file diff --git a/app/views/trigger/fax.html.erb b/app/views/trigger/fax.html.erb new file mode 100644 index 0000000..822b2cb --- /dev/null +++ b/app/views/trigger/fax.html.erb @@ -0,0 +1,2 @@ +<h1>Trigger#fax</h1> +<p>Find me in app/views/trigger/fax.html.erb</p> diff --git a/app/views/trigger/voicemail.html.erb b/app/views/trigger/voicemail.html.erb new file mode 100644 index 0000000..9bafe17 --- /dev/null +++ b/app/views/trigger/voicemail.html.erb @@ -0,0 +1,4 @@ +<h1>Trigger#voicemail</h1> +<p>Find me in app/views/trigger/voicemail.html.erb</p> + +<%= debug(params) %> diff --git a/app/views/user_group_memberships/_index_core.html.haml b/app/views/user_group_memberships/_index_core.html.haml index 3c3cebe..5e6536b 100644 --- a/app/views/user_group_memberships/_index_core.html.haml +++ b/app/views/user_group_memberships/_index_core.html.haml @@ -1,12 +1,12 @@ -%table +%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') - - reset_cycle + - for user_group_membership in user_group_memberships - %tr{:class => cycle('odd', 'even')} + %tr %td= user_group_membership.user_group.tenant %td= user_group_membership.user_group %td= user_group_membership.user diff --git a/app/views/user_group_memberships/edit.html.haml b/app/views/user_group_memberships/edit.html.haml index 2080c87..118aacd 100644 --- a/app/views/user_group_memberships/edit.html.haml +++ b/app/views/user_group_memberships/edit.html.haml @@ -1,3 +1,3 @@ -- title t("user_group_memberships.edit.page_title", :resource => @user_group_membership) +- content_for :title, t("user_group_memberships.edit.page_title", :resource => @user_group_membership) = render "form" diff --git a/app/views/user_group_memberships/index.html.haml b/app/views/user_group_memberships/index.html.haml index 1d7927b..b12e682 100644 --- a/app/views/user_group_memberships/index.html.haml +++ b/app/views/user_group_memberships/index.html.haml @@ -1,4 +1,4 @@ -- title t("user_group_memberships.index.page_title") +- content_for :title, t("user_group_memberships.index.page_title") - if @user_group_memberships.count > 0 = render "index_core", :user_group_memberships => @user_group_memberships diff --git a/app/views/user_group_memberships/new.html.haml b/app/views/user_group_memberships/new.html.haml index 9d59fdd..8901058 100644 --- a/app/views/user_group_memberships/new.html.haml +++ b/app/views/user_group_memberships/new.html.haml @@ -1,3 +1,3 @@ -- title t("user_group_memberships.new.page_title") +- content_for :title, t("user_group_memberships.new.page_title") = render "form" diff --git a/app/views/user_group_memberships/show.html.haml b/app/views/user_group_memberships/show.html.haml index 0e5cfab..418a266 100644 --- a/app/views/user_group_memberships/show.html.haml +++ b/app/views/user_group_memberships/show.html.haml @@ -1,4 +1,4 @@ -- title t("user_group_memberships.show.page_title") +- content_for :title, t("user_group_memberships.show.page_title") %p %strong= t('user_group_memberships.show.user') + ":" diff --git a/app/views/user_groups/_index_core.html.haml b/app/views/user_groups/_index_core.html.haml index d2b6e88..941f9fa 100644 --- a/app/views/user_groups/_index_core.html.haml +++ b/app/views/user_groups/_index_core.html.haml @@ -1,24 +1,28 @@ -%table - %tr - %th= t('user_groups.index.name') - %th= t('user_groups.index.description') - - if @user - %th= t('user_groups.index.tenant_id') - - else - %th= t('user_groups.index.members') - - - reset_cycle - - for user_group in user_groups - %tr{:class => cycle('odd', 'even')} - %td= user_group.name - %td= user_group.description +- 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 - %td= user_group.tenant + %th= t('user_groups.index.tenant_id') - else - %td - =render 'users/listing', :users => user_group.users - - if user_group.users.count > 1 - %br - = render :partial => 'shared/create_link', :locals => {:parent => user_group, :child_class => UserGroupMembership} + %th= t('user_groups.index.members') + %th{:colspan => '3'} + + - 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} + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => user_group.tenant, :child => user_group} diff --git a/app/views/user_groups/edit.html.haml b/app/views/user_groups/edit.html.haml index 35514e0..4d263a4 100644 --- a/app/views/user_groups/edit.html.haml +++ b/app/views/user_groups/edit.html.haml @@ -1,3 +1,3 @@ -- title t("user_groups.edit.page_title", :resource => @user_group) +- content_for :title, t("user_groups.edit.page_title", :resource => @user_group) = render "form" diff --git a/app/views/user_groups/index.html.haml b/app/views/user_groups/index.html.haml index 545b838..7240f5f 100644 --- a/app/views/user_groups/index.html.haml +++ b/app/views/user_groups/index.html.haml @@ -1,4 +1,4 @@ -- title t("user_groups.index.page_title") +- content_for :title, t("user_groups.index.page_title") - if @user_groups.count > 0 = render "index_core", :user_groups => @user_groups diff --git a/app/views/user_groups/new.html.haml b/app/views/user_groups/new.html.haml index dfef18e..3c5920f 100644 --- a/app/views/user_groups/new.html.haml +++ b/app/views/user_groups/new.html.haml @@ -1,3 +1,3 @@ -- title t("user_groups.new.page_title") +- content_for :title, t("user_groups.new.page_title") = render "form" diff --git a/app/views/user_groups/show.html.haml b/app/views/user_groups/show.html.haml index 00bdeb7..fe5b745 100644 --- a/app/views/user_groups/show.html.haml +++ b/app/views/user_groups/show.html.haml @@ -1,4 +1,4 @@ -- title t("user_groups.show.page_title") +- content_for :title, t("user_groups.show.page_title") %p %strong= t('user_groups.show.name') + ":" diff --git a/app/views/users/_conferences.html.haml b/app/views/users/_conferences.html.haml new file mode 100644 index 0000000..b9592b6 --- /dev/null +++ b/app/views/users/_conferences.html.haml @@ -0,0 +1,7 @@ +-# Conferences +-# +- if (can?( :index, Conference ) && user.conferences.count > 0 ) || can?( :create, Conference ) + %h2= t('conferences.index.page_title') + - if can?( :index, Conference ) && user.conferences.count > 0 + = render "conferences/index_core", :conferences => user.conferences + = render :partial => 'shared/create_link', :locals => {:parent => user, :child_class => Conference}
\ No newline at end of file diff --git a/app/views/users/_fax_accounts.html.haml b/app/views/users/_fax_accounts.html.haml new file mode 100644 index 0000000..044b8f9 --- /dev/null +++ b/app/views/users/_fax_accounts.html.haml @@ -0,0 +1,7 @@ +-# FaxAccount +-# +- if (can?( :index, FaxAccount ) && user.fax_accounts.count > 0 ) || can?( :create, FaxAccount ) + %h2= t('fax_accounts.index.page_title') + - if can?( :index, FaxAccount ) && user.fax_accounts.count > 0 + = render "fax_accounts/index_core", {:fax_accounts => user.fax_accounts, :fax_accountable => user} + = render :partial => 'shared/create_link', :locals => {:parent => user, :child_class => FaxAccount}
\ 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 8e18d12..24b15f5 100644 --- a/app/views/users/_form_core.html.haml +++ b/app/views/users/_form_core.html.haml @@ -1,6 +1,6 @@ .inputs - 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 + = 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') = f.input :last_name, :label => t('users.form.last_name.label'), :hint => conditional_hint('users.form.last_name.hint') diff --git a/app/views/users/_index_core.html.haml b/app/views/users/_index_core.html.haml index 51c15de..7f2251a 100644 --- a/app/views/users/_index_core.html.haml +++ b/app/views/users/_index_core.html.haml @@ -1,18 +1,28 @@ -%table - %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') - - - reset_cycle - - for user in users - %tr{:class => cycle('odd', 'even')} - %td - = image_tag user.image_url(:mini).to_s if user.image_url(:mini) - %td= user.user_name - %td= 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 +- 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' + - 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/users/_listing.html.haml b/app/views/users/_listing.html.haml index 0a97ad1..9b7b653 100644 --- a/app/views/users/_listing.html.haml +++ b/app/views/users/_listing.html.haml @@ -1,8 +1,8 @@ - amount_of_users = users.count - if amount_of_users > 0 - - if amount_of_users < 30 + - if amount_of_users < GsParameter.get('NUMBER_OF_SHOWN_ITEMS') = users.map{|user| user}.join(', ') - else - = users.limit(15).map{|user| user}.join(', ') + ', ' + = users.limit((GsParameter.get('NUMBER_OF_SHOWN_ITEMS') / 2).floor).map{|user| user}.join(', ') + ', ' = '[...]' - = users.offset(amount_of_users - 15).map{|user| user}.join(', ')
\ No newline at end of file + = users.offset(amount_of_users - (GsParameter.get('NUMBER_OF_SHOWN_ITEMS') / 2).floor).map{|user| user}.join(', ')
\ No newline at end of file diff --git a/app/views/users/_phone_books.html.haml b/app/views/users/_phone_books.html.haml new file mode 100644 index 0000000..4943bc6 --- /dev/null +++ b/app/views/users/_phone_books.html.haml @@ -0,0 +1,7 @@ +-# Phone books +-# +- if GuiFunction.display?('show_phone_books_in_user_show_view', current_user) + - if can?( :index, PhoneBook ) + %h2=t("phone_books.index.page_title") + = render "phone_books/index_core", :phone_books => phone_books + = render :partial => 'shared/create_link', :locals => {:parent => user, :child_class => PhoneBook}
\ No newline at end of file diff --git a/app/views/users/_phones.html.haml b/app/views/users/_phones.html.haml new file mode 100644 index 0000000..e001eae --- /dev/null +++ b/app/views/users/_phones.html.haml @@ -0,0 +1,7 @@ +-# Phones +-# +- if (can?( :index, Phone, :phoneable => user ) && user.phones.count > 0 ) || can?( :create, Phone, :phoneable => user ) + %h2= t('phones.index.page_title') + - if can?( :index, Phone, :phoneable => user ) && user.phones.count > 0 + = render "phones/index_core", :phones => user.phones + = render :partial => 'shared/create_link', :locals => {:parent => user, :child_class => Phone}
\ No newline at end of file diff --git a/app/views/users/_sip_accounts.html.haml b/app/views/users/_sip_accounts.html.haml new file mode 100644 index 0000000..1861105 --- /dev/null +++ b/app/views/users/_sip_accounts.html.haml @@ -0,0 +1,7 @@ +-# SIP accounts +-# +- if (can?( :index, SipAccount ) && user.sip_accounts.count > 0 ) || can?( :create, SipAccount ) + %h2= t('sip_accounts.index.page_title') + - if can?( :index, SipAccount ) && user.sip_accounts.count > 0 + = render "sip_accounts/index_core", :sip_accounts => user.sip_accounts + = render :partial => 'shared/create_link', :locals => {:parent => user, :child_class => SipAccount}
\ No newline at end of file diff --git a/app/views/users/_tenants.html.haml b/app/views/users/_tenants.html.haml new file mode 100644 index 0000000..49a2d9b --- /dev/null +++ b/app/views/users/_tenants.html.haml @@ -0,0 +1,5 @@ +-# Tenants +-# +- if can?( :index, Tenant ) && user.tenants.count > 1 + %h2=t("tenants.index.page_title") + = render "tenants/index_core", :tenants => user.tenants
\ No newline at end of file diff --git a/app/views/users/_user_groups.html.haml b/app/views/users/_user_groups.html.haml new file mode 100644 index 0000000..81191ae --- /dev/null +++ b/app/views/users/_user_groups.html.haml @@ -0,0 +1,7 @@ +-# User groups (only if the current user can edit or destroy them) +-# +- if user.user_groups.map{ |x| can?( :edit, x ) || can?( :destroy, x ) }.include?(true) + - if can?( :index, UserGroup ) + %h2=t("user_groups.index.page_title") + - if user.user_groups.count > 0 + = render "user_groups/index_core", :user_groups => user.user_groups.where(:tenant_id => tenant.id).order(:name) diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 96272f5..ed79b2c 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -1,3 +1,3 @@ -- title t("users.edit.page_title", :resource => @user) +- content_for :title, t("users.edit.page_title", :resource => @user) = render "form" diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml index 892e035..8a3d1fc 100644 --- a/app/views/users/index.html.haml +++ b/app/views/users/index.html.haml @@ -1,4 +1,4 @@ -- title t("users.index.page_title") +- content_for :title, t("users.index.page_title") - if @users.count > 0 = render "index_core", :users => @users diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml index a014611..64fe55f 100644 --- a/app/views/users/new.html.haml +++ b/app/views/users/new.html.haml @@ -1,3 +1,3 @@ -- title t("users.new.page_title") +- content_for :title, t("users.new.page_title") = render "form" diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 7730447..4c39fd1 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -1,96 +1,60 @@ -- title "User: #{@user}" +- content_for :title, "User: #{@user}" -#user-show - %aside - = image_tag @user.image_url(:small).to_s, class: 'display' 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 - - %p.controls - = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @user } - - - @user.sip_accounts.each do |sip_account| - - phone_number = sip_account.phone_numbers.order(:number).last - - if phone_number && !phone_number.number.blank? && phone_number.number[0] != '+' - %p - %strong= sip_account.phone_numbers.order(:number).last.number - %p - =link_to t("call_histories.index.page_title"), sip_account_call_histories_path(sip_account) - %br - =link_to t("voicemail_messages.index.page_title"), sip_account_voicemail_messages_path(sip_account) - %br - =link_to t("call_forwards.index.page_title"), phone_number_call_forwards_path(phone_number) - %br - =link_to t("voicemail_settings.index.page_title"), sip_account_voicemail_settings_path(sip_account) - %br - =link_to t("softkeys.index.page_title"), sip_account_softkeys_path(sip_account) - %br - =link_to t("ringtones.show.page_title"), phone_number_ringtones_path(phone_number) - - - if @user.conferences.any? +.row + .span3 + - cache(['user_show_aside', I18n.locale, @user, @user.sip_accounts, @user.conferences]) do + = image_tag @user.image_url(:small).to_s, :class => 'img-rounded' if @user.image? && @user.image_url(:small) + %p + %strong= t('users.show.user_name') + ":" + = @user.user_name %p - %strong= t("conferences.index.page_title") - - @user.conferences.each do |conference| + %strong= t('users.show.email') + ":" + = @user.email + + %p.controls + = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @tenant, :child => @user } + + - @user.sip_accounts.each do |sip_account| + - phone_number = sip_account.phone_numbers.order(:number).last + - if phone_number && !phone_number.number.blank? && phone_number.number[0] != '+' + %p + %strong= sip_account.phone_numbers.order(:number).last.number + %p + =link_to t("call_histories.index.page_title"), sip_account_call_histories_path(sip_account) + %br + =link_to t("voicemail_messages.index.page_title"), sip_account_voicemail_messages_path(sip_account) + %br + =link_to t("call_forwards.index.page_title"), phone_number_call_forwards_path(phone_number) + %br + =link_to t("voicemail_settings.index.page_title"), sip_account_voicemail_settings_path(sip_account) + %br + =link_to t("softkeys.index.page_title"), sip_account_softkeys_path(sip_account) + %br + =link_to t("ringtones.show.page_title"), phone_number_ringtones_path(phone_number) + + - if @user.conferences.any? %p - =link_to conference, edit_user_conference_path(@user, conference) - + %strong= t("conferences.index.page_title") + - @user.conferences.each do |conference| + %p + =link_to conference, edit_user_conference_path(@user, conference) - %section - -# Phone books - -# - - if GuiFunction.display?('show_phone_books_in_user_show_view', current_user) - - if can?( :index, PhoneBook ) - %h2=t("phone_books.index.page_title") - = render "phone_books/index_core", :phone_books => @phone_books - = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => PhoneBook} - -# User groups (only if the current user can edit or destroy them) - -# - - if @user.user_groups.map{ |x| can?( :edit, x ) || can?( :destroy, x ) }.include?(true) - - if can?( :index, UserGroup ) - %h2=t("user_groups.index.page_title") - - if @user.user_groups.count > 0 - = render "user_groups/index_core", :user_groups => @user.user_groups.where(:tenant_id => @tenant.id).order(:name) - = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => UserGroup} + .span9 + = render :partial => 'phone_books', :locals => {:user => @user, :phone_books => @phone_books} - -# SIP accounts - -# - - if (can?( :index, SipAccount ) && @user.sip_accounts.count > 0 ) || can?( :create, SipAccount ) - %h2= t('sip_accounts.index.page_title') - - if can?( :index, SipAccount ) && @user.sip_accounts.count > 0 - = render "sip_accounts/index_core", :sip_accounts => @user.sip_accounts - = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => SipAccount} + - if current_user.user_groups.where(:name => 'Admins').any? + - cache(['user_show_user_groups_overview', I18n.locale, @user, @user.user_groups]) do + = render :partial => 'user_groups', :locals => {:user => @user, :tenant => @tenant} - -# Phones - -# - - if (can?( :index, Phone, :phoneable => @user ) && @user.phones.count > 0 ) || can?( :create, Phone, :phoneable => @user ) - %h2= t('phones.index.page_title') - - if can?( :index, Phone, :phoneable => @user ) && @user.phones.count > 0 - = render "phones/index_core", :phones => @user.phones - = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => Phone} + - cache(['user_show_sip_accounts_overview', I18n.locale, @user, @user.sip_accounts]) do + = render :partial => 'sip_accounts', :locals => {:user => @user} - -# FaxAccount - -# - - if (can?( :index, FaxAccount ) && @user.fax_accounts.count > 0 ) || can?( :create, FaxAccount ) - %h2= t('fax_accounts.index.page_title') - - if can?( :index, FaxAccount ) && @user.fax_accounts.count > 0 - = render "fax_accounts/index_core", {:fax_accounts => @user.fax_accounts, :fax_accountable => @user} - = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => FaxAccount} + - cache(['user_show_phones_overview', I18n.locale, @user, @user.phones]) do + = render :partial => 'phones', :locals => {:user => @user} - -# Conferences - -# - - if (can?( :index, Conference ) && @user.conferences.count > 0 ) || can?( :create, Conference ) - %h2= t('conferences.index.page_title') - - if can?( :index, Conference ) && @user.conferences.count > 0 - = render "conferences/index_core", :conferences => @user.conferences - = render :partial => 'shared/create_link', :locals => {:parent => @user, :child_class => Conference} + - cache(['user_show_fax_accounts_overview', I18n.locale, @user, @user.fax_accounts]) do + = render :partial => 'fax_accounts', :locals => {:user => @user} - -# Tenants - -# - - if can?( :index, Tenant ) && @user.tenants.count > 1 - %h2=t("tenants.index.page_title") - = render "tenants/index_core", :tenants => @user.tenants
\ No newline at end of file + - cache(['user_show_conferences_overview', I18n.locale, @user, @user.conferences]) do + = render :partial => 'conferences', :locals => {:user => @user} diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml index b8e47af..ded7ea0 100644 --- a/app/views/voicemail_messages/_index_core.html.haml +++ b/app/views/voicemail_messages/_index_core.html.haml @@ -1,10 +1,10 @@ = 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 - - reset_cycle + %table{:class => 'table table-striped'} + - for voicemail_message in voicemail_messages - %tr.voicemail-messages-entry{:class => cycle('odd', 'even'), :id => "message_#{voicemail_message.uuid}"} + %tr.voicemail-messages-entry{:id => "message_#{voicemail_message.uuid}"} %td.select_box= check_box_tag("selected_uuids[]", voicemail_message.uuid, false, :uuid => "select_item_#{voicemail_message.uuid}", :class => 'select_item') %td.time .voicemail-received @@ -40,5 +40,6 @@ = link_to t('voicemail_messages.index.actions.destroy'), sip_account_voicemail_message_path(@sip_account, voicemail_message), :method => :delete %footer.entries-nav= render :partial => "voicemail_messages/navigation" + = link_to Haml::Engine.new("%i.icon-remove").render + ' test ', root_url = image_submit_tag('icons/cross-16x.png', :confirm => t("voicemail_messages.index.actions.confirm_selected")) = t("voicemail_messages.index.actions.destroy_multiple") diff --git a/app/views/voicemail_messages/index.html.haml b/app/views/voicemail_messages/index.html.haml index 53f8090..53ff745 100644 --- a/app/views/voicemail_messages/index.html.haml +++ b/app/views/voicemail_messages/index.html.haml @@ -1,6 +1,6 @@ - if @type - - title t("voicemail_messages.index.page_title_#{@type}") + - content_for :title, t("voicemail_messages.index.page_title_#{@type}") - else - - title t("voicemail_messages.index.page_title") + - content_for :title, t("voicemail_messages.index.page_title") = render "index_core", :voicemail_messages => @voicemail_messages diff --git a/app/views/voicemail_settings/edit.html.haml b/app/views/voicemail_settings/edit.html.haml index 6bd7031..56e5765 100644 --- a/app/views/voicemail_settings/edit.html.haml +++ b/app/views/voicemail_settings/edit.html.haml @@ -1,3 +1,3 @@ -- title t("voicemail_settings.edit.page_title") +- content_for :title, t("voicemail_settings.edit.page_title") = render "form" diff --git a/app/views/voicemail_settings/show.html.haml b/app/views/voicemail_settings/show.html.haml index 30e12d0..e156d7b 100644 --- a/app/views/voicemail_settings/show.html.haml +++ b/app/views/voicemail_settings/show.html.haml @@ -1,4 +1,4 @@ -- title t("voicemail_settings.show.page_title") +- content_for :title, t("voicemail_settings.show.page_title") %p %strong= t('voicemail_settings.show.greeting_path') + ":" diff --git a/app/views/whitelists/_index_core.html.haml b/app/views/whitelists/_index_core.html.haml index b4c5b0c..3333169 100644 --- a/app/views/whitelists/_index_core.html.haml +++ b/app/views/whitelists/_index_core.html.haml @@ -1,11 +1,11 @@ -%table +%table{:class => 'table table-striped'} %tr %th= t('whitelists.index.name') %th= t('whitelists.index.phone_numbers') - - reset_cycle + - for whitelist in whitelists - %tr{:class => cycle('odd', 'even')} + %tr %td= whitelist.name || '-' %td = render 'phone_numbers/listing', :phone_numbers => whitelist.phone_numbers diff --git a/app/views/whitelists/edit.html.haml b/app/views/whitelists/edit.html.haml index 9f8af90..9adcc58 100644 --- a/app/views/whitelists/edit.html.haml +++ b/app/views/whitelists/edit.html.haml @@ -1,3 +1,3 @@ -- title t("whitelists.edit.page_title") +- content_for :title, t("whitelists.edit.page_title") = render "form" diff --git a/app/views/whitelists/index.html.haml b/app/views/whitelists/index.html.haml index 0873189..52ab453 100644 --- a/app/views/whitelists/index.html.haml +++ b/app/views/whitelists/index.html.haml @@ -1,4 +1,4 @@ -- title t("whitelists.index.page_title") +- content_for :title, t("whitelists.index.page_title") - if @whitelists.count > 0 = render "index_core", :whitelists => @whitelists diff --git a/app/views/whitelists/new.html.haml b/app/views/whitelists/new.html.haml index f1101ad..7086cfd 100644 --- a/app/views/whitelists/new.html.haml +++ b/app/views/whitelists/new.html.haml @@ -1,3 +1,3 @@ -- title t("whitelists.new.page_title") +- content_for :title, t("whitelists.new.page_title") = render "form" diff --git a/app/views/whitelists/show.html.haml b/app/views/whitelists/show.html.haml index 77652f9..054afc5 100644 --- a/app/views/whitelists/show.html.haml +++ b/app/views/whitelists/show.html.haml @@ -1,4 +1,4 @@ -- title t("whitelists.show.page_title") +- content_for :title, t("whitelists.show.page_title") %p %strong= t('whitelists.show.name') + ":" |