From 3a0f9f2736ec6a253e632b5671dfd669ffe99173 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 28 Feb 2013 03:13:57 -0500 Subject: fax documents index view --- app/views/fax_documents/_index_core.html.haml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml index 2f9b214..df1e2ac 100644 --- a/app/views/fax_documents/_index_core.html.haml +++ b/app/views/fax_documents/_index_core.html.haml @@ -25,9 +25,24 @@ %tr{:class => current_status} %td - case fax_document.state + - when 'received' + %i.icon-warning-sign + = l fax_document.sent_at, :format => :short + - when 'unsuccessful' + %i.icon-ban-circle + = t("fax_documents.states.#{fax_document.state}") - when 'successful' - = "#{fax_document.inbound ? '⇨' : '⇦'}".html_safe + - if fax_document.inbound + %i.icon-arrow-right + - else + %i.icon-arrow-left = l fax_document.sent_at, :format => :short + - when 'queued_for_sending' + %i.icon-time + = t("fax_documents.states.#{fax_document.state}") + - when 'sending' + %i.icon-print + = t("fax_documents.states.#{fax_document.state}") - else = t("fax_documents.states.#{fax_document.state}") %td -- cgit v1.2.3 From 6238abea422a1be14d5f3d8cbacd78f2e72fd466 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 28 Feb 2013 09:09:10 -0500 Subject: group defaults --- app/views/groups/_form_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/groups/_form_core.html.haml b/app/views/groups/_form_core.html.haml index 1f9a39f..02f296b 100644 --- a/app/views/groups/_form_core.html.haml +++ b/app/views/groups/_form_core.html.haml @@ -1,4 +1,4 @@ .inputs = f.input :name, :label => t('groups.form.name.label'), :hint => conditional_hint('groups.form.name.hint') - = f.input :active, :label => t('groups.form.active.label'), :hint => conditional_hint('groups.form.active.hint') = f.input :comment, :label => t('groups.form.comment.label'), :hint => conditional_hint('groups.form.comment.hint') + = f.input :active, :label => t('groups.form.active.label'), :hint => conditional_hint('groups.form.active.hint') -- cgit v1.2.3 From e1c2ef6e5d2d48eab026f788d93e6c170d276194 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 28 Feb 2013 09:38:07 -0500 Subject: phone book entry view --- app/views/phone_book_entries/show.html.haml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/phone_book_entries/show.html.haml b/app/views/phone_book_entries/show.html.haml index 7dd9bcb..1afb019 100644 --- a/app/views/phone_book_entries/show.html.haml +++ b/app/views/phone_book_entries/show.html.haml @@ -70,26 +70,39 @@ - case phone_number.name.to_s.downcase - when /fax/ .fax + %i.icon-print + = 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= phone_number.name - when /home/ .home + %i.icon-home + = 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 + %i.icon-signal + = 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= phone_number.name - when /office/ .office + %i.icon-briefcase + = 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= phone_number.name - - else + - when /phone/ .phone + %i.icon-asterisk + = 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') + - else + .phone_number + %i.icon-star + = 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= phone_number.name - = link_to t('phone_book_entries.show.manage_phone_numbers'), phone_book_entry_phone_numbers_path(@phone_book_entry) + %p + %a.btn.btn-small.btn-default{ :href => phone_book_entry_phone_numbers_path(@phone_book_entry) } + %i.icon-edit + = t('phone_book_entries.show.manage_phone_numbers') .widget.adresses - @phone_book_entry.addresses.each do |address| -- cgit v1.2.3 From b8425f5453eab4a0fe475952af89d55ace45878e Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Sun, 3 Mar 2013 04:03:24 -0500 Subject: firewall restart after intruder changes --- app/views/intruders/_form_core.html.haml | 4 +++- app/views/intruders/_index_core.html.haml | 12 ++---------- app/views/intruders/index.html.haml | 9 ++++++--- 3 files changed, 11 insertions(+), 14 deletions(-) (limited to 'app/views') diff --git a/app/views/intruders/_form_core.html.haml b/app/views/intruders/_form_core.html.haml index 780d8cd..a0c2eb0 100644 --- a/app/views/intruders/_form_core.html.haml +++ b/app/views/intruders/_form_core.html.haml @@ -1,5 +1,7 @@ .inputs = f.input :list_type, :collection => Intruder::LIST_TYPES, :label => t('intruders.form.list_type.label'), :hint => conditional_hint('intruders.form.list_type.hint'), :include_blank => false = f.input :contact_ip, :label => t('intruders.form.contact_ip.label'), :hint => conditional_hint('intruders.form.contact_ip.hint') - = f.input :ban_end, :label => t('intruders.form.ban_end.label'), :hint => conditional_hint('intruders.form.ban_end.hint') + = f.input :points, :label => t('intruders.form.points.label'), :hint => conditional_hint('intruders.form.points.hint') + = f.input :bans, :label => t('intruders.form.bans.label'), :hint => conditional_hint('intruders.form.bans.hint'), as: :boolean + = f.input :comment, :label => t('intruders.form.comment.label'), :hint => conditional_hint('intruders.form.comment.hint') diff --git a/app/views/intruders/_index_core.html.haml b/app/views/intruders/_index_core.html.haml index 63f2253..b9c5a76 100644 --- a/app/views/intruders/_index_core.html.haml +++ b/app/views/intruders/_index_core.html.haml @@ -2,11 +2,8 @@ %tr %th %th= t('intruders.index.contact_ip') - %th= t('intruders.index.contact_port') %th= t('intruders.index.points') - %th= t('intruders.index.bans') %th= t('intruders.index.ban_last') - %th= t('intruders.index.ban_end') %th= t('intruders.index.contact_count') %th= t('intruders.index.contact_last') %th= t('intruders.index.contacts_per_second') @@ -19,21 +16,16 @@ %td - if intruder.list_type == 'whitelist' %i.icon-ok - - elsif intruder.bans > 0 + - elsif intruder.bans.to_i > 0 %i.icon-fire - - elsif intruder.points > 0 + - elsif intruder.points.to_i > 0 %i.icon-warning-sign %td= intruder.contact_ip - %td= intruder.contact_port %td= intruder.points - %td= intruder.bans %td - if intruder.ban_last = l intruder.ban_last, :format => :short - %td - - if intruder.ban_end - = l intruder.ban_end, :format => :short %td= intruder.contact_count %td diff --git a/app/views/intruders/index.html.haml b/app/views/intruders/index.html.haml index 72b8882..79b4ceb 100644 --- a/app/views/intruders/index.html.haml +++ b/app/views/intruders/index.html.haml @@ -1,6 +1,9 @@ - content_for :title, t("intruders.index.page_title") -- if @intruders && @intruders.count > 0 - = render "index_core", :intruders => @intruders +- if @intruders && @intruders.count > 0 && @list_types && @list_types.count > 0 + - @list_types.each do |list_type| + %h3= list_type + %table.table.table-striped + = render "index_core", :intruders => @intruders.where(:list_type => list_type) -= render :partial => 'shared/create_link', :locals => {:child_class => Intruder} \ No newline at end of file += render :partial => 'shared/create_link', :locals => {:child_class => Intruder} -- cgit v1.2.3 From 86e4f6f2241fee9597d7c1a7de1ff585634da4c5 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 4 Mar 2013 05:28:26 -0500 Subject: display group item --- app/views/group_memberships/_index_core.html.haml | 3 ++- app/views/group_memberships/show.html.haml | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/group_memberships/_index_core.html.haml b/app/views/group_memberships/_index_core.html.haml index beeefc9..31a9050 100644 --- a/app/views/group_memberships/_index_core.html.haml +++ b/app/views/group_memberships/_index_core.html.haml @@ -2,10 +2,11 @@ %tr %th= t('group_memberships.index.item_type') %th= t('group_memberships.index.item_id') - + %th= t('group_memberships.index.item') - for group_membership in group_memberships %tr %td= group_membership.item_type %td= group_membership.item_id + %td= group_membership.item =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => group_membership.group, :child => group_membership} diff --git a/app/views/group_memberships/show.html.haml b/app/views/group_memberships/show.html.haml index 0875f0b..362b25f 100644 --- a/app/views/group_memberships/show.html.haml +++ b/app/views/group_memberships/show.html.haml @@ -7,4 +7,8 @@ %strong= t('group_memberships.show.item_id') + ":" = @group_membership.item_id +%p + %strong= t('group_memberships.show.item') + ":" + = @group_membership.item + = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @group, :child => @group_membership } -- cgit v1.2.3 From 716a7dc8e7838fe397b6d9ca2a52f6d8b2ff52a9 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 4 Mar 2013 05:29:45 -0500 Subject: list permissions and memberships in group index --- app/views/groups/_index_core.html.haml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/groups/_index_core.html.haml b/app/views/groups/_index_core.html.haml index 3a444bf..e67eb66 100644 --- a/app/views/groups/_index_core.html.haml +++ b/app/views/groups/_index_core.html.haml @@ -2,6 +2,8 @@ %tr %th %th= t('groups.index.name') + %th= t('groups.index.permissions') + %th= t('groups.index.memberships') %th= t('groups.index.comment') @@ -13,5 +15,11 @@ - else %i.icon-ban-circle %td= group.name + %td + - if group.group_permissions.count > 0 && group.group_permissions.count < 4 + = group.group_permissions.pluck(:permission).uniq.join(' ') + - else + = group.group_permissions.count + %td= group.group_memberships.count %td= group.comment - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => group} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => group} -- cgit v1.2.3 From 8042e6c314737feab61209e0b8b26ddba5c7e763 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 4 Mar 2013 05:34:43 -0500 Subject: display provisioning key activity flag --- app/views/phones/_form_core.html.haml | 2 +- app/views/phones/show.html.haml | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/phones/_form_core.html.haml b/app/views/phones/_form_core.html.haml index 31f3c24..e093899 100644 --- a/app/views/phones/_form_core.html.haml +++ b/app/views/phones/_form_core.html.haml @@ -11,5 +11,5 @@ - 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 GsParameter.get('PROVISIONING_KEY_LENGTH') == 0 + - if @phone && @phone.provisioning_key_active = 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/show.html.haml b/app/views/phones/show.html.haml index e9b8b21..1996d48 100644 --- a/app/views/phones/show.html.haml +++ b/app/views/phones/show.html.haml @@ -34,12 +34,11 @@ %td = @phone.nightly_reboot == true ? t('simple_form.yes') : t('simple_form.no') - - if GsParameter.get('PROVISIONING_KEY_LENGTH') == 0 - %tr - %td - %strong= t('phones.show.provisioning_key_active') + ":" - %td - = @phone.provisioning_key_active == true ? t('simple_form.yes') : t('simple_form.no') + %tr + %td + %strong= t('phones.show.provisioning_key_active') + ":" + %td + = @phone.provisioning_key_active == true ? t('simple_form.yes') : t('simple_form.no') %tr{:class => (@phone.ip_address.blank? ? 'warning' : '')} %td -- cgit v1.2.3 From 45fe4f5022f7181aa5d6e66f03ba3c8cf281879a Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 4 Mar 2013 10:41:59 -0500 Subject: sort gs_parameters by entity+section --- app/views/gs_parameters/index.html.haml | 48 ++++++++++++++++++++++++++------- app/views/gs_parameters/show.html.haml | 10 +++++-- 2 files changed, 47 insertions(+), 11 deletions(-) (limited to 'app/views') diff --git a/app/views/gs_parameters/index.html.haml b/app/views/gs_parameters/index.html.haml index 8df2bb3..9d757a0 100644 --- a/app/views/gs_parameters/index.html.haml +++ b/app/views/gs_parameters/index.html.haml @@ -2,12 +2,42 @@ - cache(['gs_parameter_all_tables', I18n.locale, @gs_parameters.count, @gs_parameters.reorder(:updated_at).first, @gs_parameters.reorder(:updated_at).last]) do - if @gs_parameters && @gs_parameters.count > 0 - - if @sections - - @sections.each do |section| - %h3= section - %table.table.table-striped - -# Template Dependency: gs_parameters/_index_core - = render "index_core", :gs_parameters => @gs_parameters.where(:section => section) - - else - %table.table.table-striped - = render "index_core", :gs_parameters => @gs_parameters + %table.table.table-striped + %thead + %tr + %th + %th + %th + %th + + %tbody + - @entities.each do |entity_name, entity| + %tr.table.info + %td{:colspan => 5} + - if !entity_name.blank? + %strong= entity_name + - entity.each do |section_name, section| + %tr.table.success + %td + %td{:colspan => 4} + %strong= section_name + - gs_parameters = @gs_parameters.where(:entity => entity_name, :section => section_name) + - cache(['gs_parameter_sub_table', I18n.locale, gs_parameters.count, gs_parameters.reorder(:updated_at).first, gs_parameters.reorder(:updated_at).last]) do + + - for gs_parameter in gs_parameters + - cache(['gs_parameters_table_single_row', I18n.locale, gs_parameter]) do + %tr + %td + %td + %td + %span.hidden-phone + = truncate(gs_parameter.name, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH')) + %span.visible-phone + = truncate(gs_parameter.name, :length => GsParameter.get('MOBILE_MAX_STRING_LENGTH')) + %td + %span.hidden-phone + = truncate(gs_parameter.value, :length => GsParameter.get('DESKTOP_MAX_STRING_LENGTH')) + %span.visible-phone + = truncate(gs_parameter.value, :length => GsParameter.get('MOBILE_MAX_STRING_LENGTH')) + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => gs_parameter} + diff --git a/app/views/gs_parameters/show.html.haml b/app/views/gs_parameters/show.html.haml index 706625f..85e9b98 100644 --- a/app/views/gs_parameters/show.html.haml +++ b/app/views/gs_parameters/show.html.haml @@ -3,16 +3,22 @@ - cache(@gs_parameter) do %table.table.table-striped %tbody + %tr %tr %td - %strong= t('gs_parameters.show.name') + ":" + %strong= t('gs_parameters.show.entity') + ":" %td - = @gs_parameter.name + = @gs_parameter.entity %tr %td %strong= t('gs_parameters.show.section') + ":" %td = @gs_parameter.section + %tr + %td + %strong= t('gs_parameters.show.name') + ":" + %td + = @gs_parameter.name %tr %td %strong= t('gs_parameters.show.value') + ":" -- cgit v1.2.3 From ef4bb3de4a23e0a4068c46caf05e2150e9922b71 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 5 Mar 2013 01:44:21 -0500 Subject: display last missed call on idle screen --- app/views/config_polycom/idle_screen.xml.haml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/config_polycom/idle_screen.xml.haml b/app/views/config_polycom/idle_screen.xml.haml index fa52c4f..f6d8cf9 100644 --- a/app/views/config_polycom/idle_screen.xml.haml +++ b/app/views/config_polycom/idle_screen.xml.haml @@ -3,5 +3,18 @@ %head %title= @sip_account.caller_name %body - - @sip_account.phone_numbers.each do |number| - %br= number.number + - phone_numbers = @sip_account.phone_numbers.order(:position) + - if phone_numbers[0] + %strong= phone_numbers[0].number + - else + %strong= sip_account.to_s + - if phone_numbers[1] + %strong= phone_numbers[1].number + - if phone_numbers[2] + %strong= phone_numbers[2].number + - if phone_numbers[3] + %strong ... + - call = @sip_account.call_histories.where(:entry_type => 'missed').order('start_stamp DESC').first + %p + Missed: + %br= "#{call.start_stamp.strftime('%d.%m %H:%M')} #{call.display_name} #{call.display_number}" -- cgit v1.2.3 From 2f2276dc424196ace5d1859dfa3d3999926effce Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 5 Mar 2013 01:45:31 -0500 Subject: bypassing softkeys controller --- app/views/softkeys/_form_core.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/softkeys/_form_core.html.haml b/app/views/softkeys/_form_core.html.haml index 2863d5c..7c1dd4a 100644 --- a/app/views/softkeys/_form_core.html.haml +++ b/app/views/softkeys/_form_core.html.haml @@ -6,7 +6,7 @@ .inputs = f.input :softkey_function_id, :as => :select, :collection => @softkey_functions.map {|x| [I18n.t("softkeys.functions.#{x}"), x.id] }, :label => t('softkeys.form.function.label'), :hint => conditional_hint('softkeys.form.function.hint'), :include_blank => false - - if @available_call_forwards && @available_call_forwards.count > 0 - = f.association :softkeyable, :collection => @available_call_forwards, :label => t('softkeys.form.call_forward.label'), :hint => conditional_hint('softkeys.form.call_forward.hint'), :include_blank => false + - if @softkey.possible_call_forwards && @softkey.possible_call_forwards.count > 0 + = f.association :softkeyable, :collection => @softkey.possible_call_forwards, :label => t('softkeys.form.call_forward.label'), :hint => conditional_hint('softkeys.form.call_forward.hint'), :include_blank => false = f.input :number, :label => t('softkeys.form.number.label'), :hint => conditional_hint('softkeys.form.number.hint') = f.input :label, :label => t('softkeys.form.label.label'), :hint => conditional_hint('softkeys.form.label.hint') -- cgit v1.2.3 From 260264886fd136b388ad4adaaa93e264d7da87ba Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 5 Mar 2013 09:53:59 +0100 Subject: Fixed a caching issue. #221 --- app/views/tenants/_table_of_automatic_call_distributors.html.haml | 2 +- app/views/tenants/_table_of_hunt_groups.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/tenants/_table_of_automatic_call_distributors.html.haml b/app/views/tenants/_table_of_automatic_call_distributors.html.haml index 22796af..c3ab309 100644 --- a/app/views/tenants/_table_of_automatic_call_distributors.html.haml +++ b/app/views/tenants/_table_of_automatic_call_distributors.html.haml @@ -1,4 +1,4 @@ -- cache(['tenant_show_table_of_automatic_call_distributors', I18n.locale, tenant, tenant.automatic_call_distributors.count, tenant.automatic_call_distributors.reorder(:updated_at).last]) do +- cache(['tenant_show_table_of_automatic_call_distributors', I18n.locale, tenant, tenant.automatic_call_distributors.count, tenant.automatic_call_distributors.reorder(:updated_at).last, PhoneNumber.where(:phone_numberable_type => 'AutomaticCallDistributor').order(:updated_at).last]) do -# AutomaticCallDistributors -# - if (can?( :index, AutomaticCallDistributor ) && tenant.automatic_call_distributors.count > 0 ) || can?( :create, AutomaticCallDistributor ) diff --git a/app/views/tenants/_table_of_hunt_groups.html.haml b/app/views/tenants/_table_of_hunt_groups.html.haml index aca570d..d93ebe6 100644 --- a/app/views/tenants/_table_of_hunt_groups.html.haml +++ b/app/views/tenants/_table_of_hunt_groups.html.haml @@ -1,4 +1,4 @@ -- cache(['table_of_pbx_features_hunt_groups_row', I18n.locale, tenant, tenant.hunt_groups.count, tenant.hunt_groups.reorder(:updated_at).last]) do +- cache(['table_of_pbx_features_hunt_groups_row', I18n.locale, tenant, tenant.hunt_groups.count, tenant.hunt_groups.reorder(:updated_at).last, PhoneNumber.where(:phone_numberable_type => 'HuntGroup').order(:updated_at).last]) do -# HuntGroups -# - if (can?( :index, HuntGroup ) && tenant.hunt_groups.count > 0 ) || can?( :create, HuntGroup ) -- cgit v1.2.3 From 00db10565a2b1906728087eeb95542214720fb23 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 5 Mar 2013 10:01:27 +0100 Subject: colors added --- app/views/intruders/_index_core.html.haml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/intruders/_index_core.html.haml b/app/views/intruders/_index_core.html.haml index b9c5a76..1fca601 100644 --- a/app/views/intruders/_index_core.html.haml +++ b/app/views/intruders/_index_core.html.haml @@ -9,16 +9,25 @@ %th= t('intruders.index.contacts_per_second') %th= t('intruders.index.user_agent') %th= t('intruders.index.to_user') + %th - for intruder in intruders - %tr + - if intruder.list_type == 'whitelist' + - entry_class = 'success' + - elsif intruder.bans.to_i > 0 + - entry_class = 'error' + - elsif intruder.points.to_i > 0 + - entry_class = 'warn' + - else + - entry_class = '' + %tr{:class => "table #{entry_class}"} %td - - if intruder.list_type == 'whitelist' + - if entry_class == 'success' %i.icon-ok - - elsif intruder.bans.to_i > 0 + - elsif entry_class == 'error' %i.icon-fire - - elsif intruder.points.to_i > 0 + - elsif entry_class == 'warn' %i.icon-warning-sign %td= intruder.contact_ip -- cgit v1.2.3 From 134150c4f6b1f0a50c837e00a3c2bbe186dfb14e Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 6 Mar 2013 03:01:28 -0500 Subject: show sim_cards in user view depending on existence and ability --- app/views/users/show.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 8148005..ea90ab4 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -75,10 +75,11 @@ - cache(['user_show_phones_overview', I18n.locale, @user, @user.phones]) do = render :partial => 'phones', :locals => {:user => @user} - - if GsParameter.get('SIM_CARDS') == true + - if GsParameter.get('SIM_CARDS') == true && (@user.sim_cards.count > 0 || can?( :create, SimCard )) - cache(['user_show_sim_cards_overview', I18n.locale, @user, @user.sim_cards]) do %h2=t('sim_cards.index.page_title') - = render :partial => 'sim_cards/index_core', :locals => {:parent => SimCardProvider.first, :sim_cards => @user.sim_cards} + - if @user.sim_cards.count > 0 + = render :partial => 'sim_cards/index_core', :locals => {:parent => SimCardProvider.first, :sim_cards => @user.sim_cards} = render :partial => 'shared/create_link', :locals => {:parent => SimCardProvider.first, :child_class => SimCard} - cache(['user_show_fax_accounts_overview', I18n.locale, @user, @user.fax_accounts]) do -- cgit v1.2.3 From c98072557273ff4383013f73621061ece34fc6d2 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 7 Mar 2013 02:36:38 -0500 Subject: call model table changed --- app/views/calls/_form_core.html.haml | 2 +- app/views/calls/_index_core.html.haml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/calls/_form_core.html.haml b/app/views/calls/_form_core.html.haml index 4cdd55e..ec795f2 100644 --- a/app/views/calls/_form_core.html.haml +++ b/app/views/calls/_form_core.html.haml @@ -1,2 +1,2 @@ .inputs - = f.input :dest, :as => :string, :label => t('calls.form.destination.label'), :hint => conditional_hint('calls.form.destination.hint'), :autofocus => true + = f.input :destination, :as => :string, :label => t('calls.form.destination.label'), :hint => conditional_hint('calls.form.destination.hint'), :autofocus => true diff --git a/app/views/calls/_index_core.html.haml b/app/views/calls/_index_core.html.haml index e5b769e..5ed5538 100644 --- a/app/views/calls/_index_core.html.haml +++ b/app/views/calls/_index_core.html.haml @@ -19,17 +19,17 @@ - else %i.icon-arrow-right %td - = call.created + = l Time.at(call.start_stamp), :format => :short %td - = call.dest + = call.destination %td - = "#{call.cid_name} #{call.cid_num}" + = "#{call.caller_id_name} #{call.caller_id_number}" %td - = "#{call.callee_name} #{call.callee_num}" + = "#{call.callee_name} #{call.callee_number}" %td = call.callstate %td - = "#{call.read_codec}/#{call.write_codec}" + = "#{call.read_codec}/#{call.read_rate}:#{call.write_codec}/#{call.write_rate}" %td %p -- cgit v1.2.3 From 1bcb85853b282606f28f1c9cd7f4e13d494a7290 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Thu, 7 Mar 2013 03:44:36 -0500 Subject: presence permissions for softkeys added --- app/views/softkeys/_form_core.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/softkeys/_form_core.html.haml b/app/views/softkeys/_form_core.html.haml index 7c1dd4a..f447aa6 100644 --- a/app/views/softkeys/_form_core.html.haml +++ b/app/views/softkeys/_form_core.html.haml @@ -6,7 +6,8 @@ .inputs = f.input :softkey_function_id, :as => :select, :collection => @softkey_functions.map {|x| [I18n.t("softkeys.functions.#{x}"), x.id] }, :label => t('softkeys.form.function.label'), :hint => conditional_hint('softkeys.form.function.hint'), :include_blank => false - - if @softkey.possible_call_forwards && @softkey.possible_call_forwards.count > 0 - = f.association :softkeyable, :collection => @softkey.possible_call_forwards, :label => t('softkeys.form.call_forward.label'), :hint => conditional_hint('softkeys.form.call_forward.hint'), :include_blank => false + - call_forwards = @softkey.possible_call_forwards + - if call_forwards && call_forwards.count > 0 + = f.association :softkeyable, :collection => call_forwards, :label => t('softkeys.form.call_forward.label'), :hint => conditional_hint('softkeys.form.call_forward.hint'), :include_blank => false = f.input :number, :label => t('softkeys.form.number.label'), :hint => conditional_hint('softkeys.form.number.hint') = f.input :label, :label => t('softkeys.form.label.label'), :hint => conditional_hint('softkeys.form.label.hint') -- cgit v1.2.3