From de845aa642e22b0ae08c5ce991bcdef9b656e079 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 19 Feb 2013 09:30:47 +0100 Subject: phone number name tag --- app/views/phone_numbers/_form_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/phone_numbers/_form_core.html.haml b/app/views/phone_numbers/_form_core.html.haml index a0a69db..1589e7e 100644 --- a/app/views/phone_numbers/_form_core.html.haml +++ b/app/views/phone_numbers/_form_core.html.haml @@ -1,7 +1,7 @@ .inputs - 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 :name, :collection => PhoneBookEntry::PHONE_NUMBER_NAMES, :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'), :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 -- cgit v1.2.3 From 2b3892ac24bb61c4814e0afe141bf53765fb1e4b Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 19 Feb 2013 13:16:12 +0100 Subject: fax storage directory --- app/views/fax_documents/_index_core.html.haml | 2 +- app/views/fax_documents/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (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 5355521..2f9b214 100644 --- a/app/views/fax_documents/_index_core.html.haml +++ b/app/views/fax_documents/_index_core.html.haml @@ -50,7 +50,7 @@ - if fax_document.document? %p - %a{:href => fax_document.document.url} + %a{:href => fax_account_fax_document_path(@fax_account, fax_document, :format => :pdf), :method => :get} %i{:class => 'icon-download'} = t("fax_documents.index.actions.download_pdf") + " (#{number_to_human_size(fax_document.document.size, :precision => 2)})" diff --git a/app/views/fax_documents/show.html.haml b/app/views/fax_documents/show.html.haml index 9925c2f..b8f3e9e 100644 --- a/app/views/fax_documents/show.html.haml +++ b/app/views/fax_documents/show.html.haml @@ -46,7 +46,7 @@ - if @fax_document.document? %p - %a{:href => @fax_document.document.url} + %a{:href => fax_account_fax_document_path(@fax_account, @fax_document, :format => :pdf), :method => :get} %i{:class => 'icon-download'} = t("fax_documents.index.actions.download_pdf") + " (#{number_to_human_size(@fax_document.document.size, :precision => 2)})" -- cgit v1.2.3 From 2a9b798f9e122582abb36605a7d4a1da0e70eca9 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Fri, 22 Feb 2013 07:08:23 -0500 Subject: pickup group permission model added --- app/views/group_memberships/_form.html.haml | 7 +++++++ app/views/group_memberships/_form_core.html.haml | 4 ++++ app/views/group_memberships/_index_core.html.haml | 11 ++++++++++ app/views/group_memberships/edit.html.haml | 3 +++ app/views/group_memberships/index.html.haml | 6 ++++++ app/views/group_memberships/new.html.haml | 3 +++ app/views/group_memberships/show.html.haml | 10 +++++++++ app/views/group_permissions/_form.html.haml | 7 +++++++ app/views/group_permissions/_form_core.html.haml | 3 +++ app/views/group_permissions/_index_core.html.haml | 11 ++++++++++ app/views/group_permissions/edit.html.haml | 3 +++ app/views/group_permissions/index.html.haml | 6 ++++++ app/views/group_permissions/new.html.haml | 3 +++ app/views/group_permissions/show.html.haml | 10 +++++++++ app/views/groups/_form.html.haml | 7 +++++++ app/views/groups/_form_core.html.haml | 4 ++++ app/views/groups/_index_core.html.haml | 13 ++++++++++++ app/views/groups/edit.html.haml | 3 +++ app/views/groups/index.html.haml | 6 ++++++ app/views/groups/new.html.haml | 3 +++ app/views/groups/show.html.haml | 25 +++++++++++++++++++++++ 21 files changed, 148 insertions(+) create mode 100644 app/views/group_memberships/_form.html.haml create mode 100644 app/views/group_memberships/_form_core.html.haml create mode 100644 app/views/group_memberships/_index_core.html.haml create mode 100644 app/views/group_memberships/edit.html.haml create mode 100644 app/views/group_memberships/index.html.haml create mode 100644 app/views/group_memberships/new.html.haml create mode 100644 app/views/group_memberships/show.html.haml create mode 100644 app/views/group_permissions/_form.html.haml create mode 100644 app/views/group_permissions/_form_core.html.haml create mode 100644 app/views/group_permissions/_index_core.html.haml create mode 100644 app/views/group_permissions/edit.html.haml create mode 100644 app/views/group_permissions/index.html.haml create mode 100644 app/views/group_permissions/new.html.haml create mode 100644 app/views/group_permissions/show.html.haml create mode 100644 app/views/groups/_form.html.haml create mode 100644 app/views/groups/_form_core.html.haml create mode 100644 app/views/groups/_index_core.html.haml create mode 100644 app/views/groups/edit.html.haml create mode 100644 app/views/groups/index.html.haml create mode 100644 app/views/groups/new.html.haml create mode 100644 app/views/groups/show.html.haml (limited to 'app/views') diff --git a/app/views/group_memberships/_form.html.haml b/app/views/group_memberships/_form.html.haml new file mode 100644 index 0000000..c8a6a51 --- /dev/null +++ b/app/views/group_memberships/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([@group, @group_membership]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .form-actions + = f.button :submit, conditional_t('group_memberships.form.submit') diff --git a/app/views/group_memberships/_form_core.html.haml b/app/views/group_memberships/_form_core.html.haml new file mode 100644 index 0000000..4a28a06 --- /dev/null +++ b/app/views/group_memberships/_form_core.html.haml @@ -0,0 +1,4 @@ +.inputs + - if @group.group_memberships.count < 1 + = f.input :item_type, :label => t('group_memberships.form.item_type.label'), :hint => conditional_hint('group_memberships.form.item_type.hint') + = f.input :item_id, :label => t('group_memberships.form.item_id.label'), :hint => conditional_hint('group_memberships.form.item_id.hint') diff --git a/app/views/group_memberships/_index_core.html.haml b/app/views/group_memberships/_index_core.html.haml new file mode 100644 index 0000000..beeefc9 --- /dev/null +++ b/app/views/group_memberships/_index_core.html.haml @@ -0,0 +1,11 @@ +%table.table.table-striped + %tr + %th= t('group_memberships.index.item_type') + %th= t('group_memberships.index.item_id') + + + - for group_membership in group_memberships + %tr + %td= group_membership.item_type + %td= group_membership.item_id + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => group_membership.group, :child => group_membership} diff --git a/app/views/group_memberships/edit.html.haml b/app/views/group_memberships/edit.html.haml new file mode 100644 index 0000000..643c095 --- /dev/null +++ b/app/views/group_memberships/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("group_memberships.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/group_memberships/index.html.haml b/app/views/group_memberships/index.html.haml new file mode 100644 index 0000000..b493017 --- /dev/null +++ b/app/views/group_memberships/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("group_memberships.index.page_title") + +- if @group_memberships && @group_memberships.count > 0 + = render "index_core", :group_memberships => @group_memberships + += render :partial => 'shared/create_link', :locals => {:parent => @group, :child_class => GroupMembership} diff --git a/app/views/group_memberships/new.html.haml b/app/views/group_memberships/new.html.haml new file mode 100644 index 0000000..6cf2ce7 --- /dev/null +++ b/app/views/group_memberships/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("group_memberships.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/group_memberships/show.html.haml b/app/views/group_memberships/show.html.haml new file mode 100644 index 0000000..0875f0b --- /dev/null +++ b/app/views/group_memberships/show.html.haml @@ -0,0 +1,10 @@ +- content_for :title, t("group_memberships.show.page_title") + +%p + %strong= t('group_memberships.show.item_type') + ":" + = @group_membership.item_type +%p + %strong= t('group_memberships.show.item_id') + ":" + = @group_membership.item_id + += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @group, :child => @group_membership } diff --git a/app/views/group_permissions/_form.html.haml b/app/views/group_permissions/_form.html.haml new file mode 100644 index 0000000..5f593f2 --- /dev/null +++ b/app/views/group_permissions/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([@group, @group_permission]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .form-actions + = f.button :submit, conditional_t('group_permissions.form.submit') diff --git a/app/views/group_permissions/_form_core.html.haml b/app/views/group_permissions/_form_core.html.haml new file mode 100644 index 0000000..49c9e7c --- /dev/null +++ b/app/views/group_permissions/_form_core.html.haml @@ -0,0 +1,3 @@ +.inputs + = f.input :permission, :collection => GroupPermission::PERMISSION_TYPES, :label => t('group_permissions.form.permission.label'), :hint => conditional_hint('group_permissions.form.permission.hint'), :include_blank => false + = f.input :target_group_id, :collection => Group.all.collect, :label => t('group_permissions.form.target_group_id.label'), :hint => conditional_hint('group_permissions.form.target_group_id.hint'), :include_blank => false diff --git a/app/views/group_permissions/_index_core.html.haml b/app/views/group_permissions/_index_core.html.haml new file mode 100644 index 0000000..ad06b38 --- /dev/null +++ b/app/views/group_permissions/_index_core.html.haml @@ -0,0 +1,11 @@ +%table.table.table-striped + %tr + %th= t('group_permissions.index.permission') + %th= t('group_permissions.index.target_group_id') + + + - for group_permission in group_permissions + %tr + %td= group_permission.permission + %td= group_permission.target_group + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => group_permission.group, :child => group_permission} diff --git a/app/views/group_permissions/edit.html.haml b/app/views/group_permissions/edit.html.haml new file mode 100644 index 0000000..c673eea --- /dev/null +++ b/app/views/group_permissions/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("group_permissions.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/group_permissions/index.html.haml b/app/views/group_permissions/index.html.haml new file mode 100644 index 0000000..0bc0c37 --- /dev/null +++ b/app/views/group_permissions/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("group_permissions.index.page_title") + +- if @group_permissions && @group_permissions.count > 0 + = render "index_core", :group_permissions => @group_permissions + += render :partial => 'shared/create_link', :locals => {:parent => @group, :child_class => GroupPermission} \ No newline at end of file diff --git a/app/views/group_permissions/new.html.haml b/app/views/group_permissions/new.html.haml new file mode 100644 index 0000000..8012273 --- /dev/null +++ b/app/views/group_permissions/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("group_permissions.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/group_permissions/show.html.haml b/app/views/group_permissions/show.html.haml new file mode 100644 index 0000000..402c5ce --- /dev/null +++ b/app/views/group_permissions/show.html.haml @@ -0,0 +1,10 @@ +- content_for :title, t("group_permissions.show.page_title") + +%p + %strong= t('group_permissions.show.permission') + ":" + = @group_permission.permission +%p + %strong= t('group_permissions.show.target_group_id') + ":" + = @group_permission.target_group_id + += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @group, :child => @group_permission } diff --git a/app/views/groups/_form.html.haml b/app/views/groups/_form.html.haml new file mode 100644 index 0000000..f5bdece --- /dev/null +++ b/app/views/groups/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@group) do |f| + = f.error_notification + + = render "form_core", :f => f + + .form-actions + = f.button :submit, conditional_t('groups.form.submit') diff --git a/app/views/groups/_form_core.html.haml b/app/views/groups/_form_core.html.haml new file mode 100644 index 0000000..1f9a39f --- /dev/null +++ b/app/views/groups/_form_core.html.haml @@ -0,0 +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') diff --git a/app/views/groups/_index_core.html.haml b/app/views/groups/_index_core.html.haml new file mode 100644 index 0000000..d99874a --- /dev/null +++ b/app/views/groups/_index_core.html.haml @@ -0,0 +1,13 @@ +%table.table.table-striped + %tr + %th= t('groups.index.name') + %th= t('groups.index.active') + %th= t('groups.index.comment') + + + - for group in groups + %tr + %td= group.name + %td= group.active + %td= group.comment + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => group} \ No newline at end of file diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml new file mode 100644 index 0000000..7a3f784 --- /dev/null +++ b/app/views/groups/edit.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("groups.edit.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/groups/index.html.haml b/app/views/groups/index.html.haml new file mode 100644 index 0000000..7984b9e --- /dev/null +++ b/app/views/groups/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("groups.index.page_title") + +- if @groups && @groups.count > 0 + = render "index_core", :groups => @groups + += render :partial => 'shared/create_link', :locals => {:child_class => Group} \ No newline at end of file diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml new file mode 100644 index 0000000..e8017a8 --- /dev/null +++ b/app/views/groups/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("groups.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml new file mode 100644 index 0000000..fc291f3 --- /dev/null +++ b/app/views/groups/show.html.haml @@ -0,0 +1,25 @@ +- content_for :title, t("groups.show.page_title") + +%p + %strong= t('groups.show.name') + ":" + = @group.name +%p + %strong= t('groups.show.active') + ":" + = @group.active +%p + %strong= t('groups.show.comment') + ":" + = @group.comment + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @group } + +%h3= t('group_permissions.index.page_title') +- if @group.group_permissions.any? + = render "group_permissions/index_core", :group_permissions => @group.group_permissions + %br += render :partial => 'shared/create_link', :locals => { :parent => @group, :child_class => GroupPermission } + +%h3= t('group_memberships.index.page_title') +- if @group.group_memberships.any? + = render "group_memberships/index_core", :group_memberships => @group.group_memberships + %br += render :partial => 'shared/create_link', :locals => { :parent => @group, :child_class => GroupMembership } -- cgit v1.2.3 From 0442cd19bc9383669b506185356227361a16e442 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 25 Feb 2013 09:29:40 -0500 Subject: call_forwards - polymorphism added --- app/views/call_forwards/_form.html.haml | 2 +- app/views/call_forwards/_index_core.html.haml | 14 +++++++------- app/views/call_forwards/index.html.haml | 2 +- app/views/call_forwards/show.html.haml | 24 +++++++++++------------- app/views/gs_nodes/sync.xml.haml | 2 +- app/views/sip_accounts/_form_core.html.haml | 2 +- 6 files changed, 22 insertions(+), 24 deletions(-) (limited to 'app/views') diff --git a/app/views/call_forwards/_form.html.haml b/app/views/call_forwards/_form.html.haml index 58ffd78..1944fc4 100644 --- a/app/views/call_forwards/_form.html.haml +++ b/app/views/call_forwards/_form.html.haml @@ -1,4 +1,4 @@ -= simple_form_for([ @phone_number, @call_forward ]) do |f| += simple_form_for([ @parent, @call_forward ]) do |f| = f.error_notification = render "form_core", :f => f diff --git a/app/views/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml index 878e0e2..48afa54 100644 --- a/app/views/call_forwards/_index_core.html.haml +++ b/app/views/call_forwards/_index_core.html.haml @@ -2,7 +2,7 @@ %thead %tr - if !@phone_number - %th= t('call_forwards.index.phone_number_id') + %th= t('call_forwards.index.call_forwardable') %th= t('call_forwards.index.call_forward_case_id') %th= t('call_forwards.index.timeout') %th= t('call_forwards.index.destination') @@ -15,18 +15,18 @@ - for call_forward in call_forwards %tr - if !@phone_number - %td= call_forward.phone_number + %td= call_forward.call_forwardable %td= t("call_forward_cases.#{call_forward.call_forward_case.value}") %td= call_forward.timeout %td = call_forward.destination - - if call_forward.call_forwardable_type + - if call_forward.destinationable_type %br - = call_forward.call_forwardable_type - - if call_forward.call_forwardable - = ": #{call_forward.call_forwardable}" + = call_forward.destinationable_type + - if call_forward.destinationable_id + = ": #{call_forward.destinationable}" %td= call_forward.source - if GuiFunction.display?('depth_field_value_in_index_table', current_user) %td= call_forward.depth %td= call_forward.active - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.phone_number, :child => call_forward} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.call_forwardable, :child => call_forward} \ 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 91b923a..e206653 100644 --- a/app/views/call_forwards/index.html.haml +++ b/app/views/call_forwards/index.html.haml @@ -3,4 +3,4 @@ - if @call_forwards.count > 0 = render "index_core", :call_forwards => @call_forwards -= render :partial => 'shared/create_link', :locals => {:parent => @phone_number, :child_class => CallForward} \ No newline at end of file += render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => CallForward} \ No newline at end of file diff --git a/app/views/call_forwards/show.html.haml b/app/views/call_forwards/show.html.haml index c2187b1..9f9d27a 100644 --- a/app/views/call_forwards/show.html.haml +++ b/app/views/call_forwards/show.html.haml @@ -1,25 +1,23 @@ - content_for :title, t("call_forwards.show.page_title") %p - %strong= t('call_forwards.show.phone_number_id') + ":" - = @call_forward.phone_number + %strong= t('call_forwards.show.call_forwardable') + ":" + = "#{@call_forward.call_forwardable_type}: #{@call_forward.call_forwardable}" %p - %strong= t('call_forwards.show.call_forward_case_id') + ":" + %strong= t('call_forwards.show.call_forward_case') + ":" = t("call_forward_cases.#{@call_forward.call_forward_case.value}") %p %strong= t('call_forwards.show.timeout') + ":" = @call_forward.timeout %p %strong= t('call_forwards.show.destination') + ":" - = @call_forward.destination -- if @call_forward.call_forwardable_type == 'HuntGroup' && @call_forward.call_forwardable.class == HuntGroup - %p - %strong= t('call_forwards.show.hunt_group') + ":" - = @call_forward.call_forwardable -- if @call_forward.call_forwardable_type == 'Voicemail' - %p - %strong= t('call_forwards.show.to_voicemail') + ":" - = 'active' + - if @call_forward.destinationable_id && @call_forward.destinationable + = "#{@call_forward.destinationable_type}: #{@call_forward.destinationable}" + - elsif !@call_forward.destinationable_type.blank? + = "#{@call_forward.destinationable_type}: #{@call_forward.destination}" + - else + = @call_forward.destination + %p %strong= t('call_forwards.show.source') + ":" = @call_forward.source @@ -30,4 +28,4 @@ %strong= t('call_forwards.show.active') + ":" = @call_forward.active -= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number, :child => @call_forward } \ No newline at end of file += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @call_forward } \ No newline at end of file diff --git a/app/views/gs_nodes/sync.xml.haml b/app/views/gs_nodes/sync.xml.haml index a2fa71a..bba5c4e 100644 --- a/app/views/gs_nodes/sync.xml.haml +++ b/app/views/gs_nodes/sync.xml.haml @@ -55,7 +55,7 @@ - if !@call_forwards.blank? %call_forwards - @call_forwards.each do |call_forward| - %call_forward{ :uuid => call_forward.uuid, :service => call_forward.call_forward_case.try(:value), :timeout => call_forward.timeout, :destination => call_forward.destination, :source => call_forward.source, :active => call_forward.active.to_s, :created_at => call_forward.created_at, :updated_at => call_forward.updated_at, :phone_number_uuid => call_forward.phone_number.try(:uuid), :depth => call_forward.depth, :call_forwardable_type => call_forward.call_forwardable_type, :call_forwardable_uuid => call_forward.call_forwardable.try(:uuid), :position => call_forward.position} + %call_forward{ :uuid => call_forward.uuid, :service => call_forward.call_forward_case.try(:value), :timeout => call_forward.timeout, :destination => call_forward.destination, :source => call_forward.source, :active => call_forward.active.to_s, :created_at => call_forward.created_at, :updated_at => call_forward.updated_at, :phone_number_uuid => call_forward.phone_number.try(:uuid), :depth => call_forward.depth, :call_forwardable_type => call_forward.call_forwardable_type, :call_forwardable_uuid => call_forward.call_forwardable.try(:uuid), :destinationable_type => call_forward.destinationable_type, :destinationable_uuid => call_forward.destinationable.try(:uuid), :position => call_forward.position} - if !@softkeys.blank? %softkeys diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml index 1a8876a..1a09912 100644 --- a/app/views/sip_accounts/_form_core.html.haml +++ b/app/views/sip_accounts/_form_core.html.haml @@ -13,6 +13,6 @@ - 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 + - if CallForward.where(:call_forwardable_id => @sip_account.phone_number_ids, :call_forwardable_type => 'PhoneNumber').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') = f.input :language_code, :collection => Language.all.collect{|l| [l.to_s, l.code]}, :label => t('sip_accounts.form.language_code.label'), :hint => conditional_hint('sip_accounts.form.language_id.hint'), :include_blank => false -- cgit v1.2.3 From fd07b7b85d2d40d7d2999c2899cc890eda2095fd Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 25 Feb 2013 11:41:55 -0500 Subject: more polymorphic objects --- app/views/call_forwards/_form_core.html.haml | 6 +----- app/views/call_forwards/_index_core.html.haml | 10 +--------- app/views/call_forwards/show.html.haml | 8 +------- app/views/ringtones/_form_core.html.haml | 2 +- app/views/ringtones/_index_core.html.haml | 4 ++-- app/views/ringtones/index.html.haml | 4 ++-- app/views/sip_accounts/show.html.haml | 7 +++++++ app/views/users/show.html.haml | 2 +- 8 files changed, 16 insertions(+), 27 deletions(-) (limited to 'app/views') diff --git a/app/views/call_forwards/_form_core.html.haml b/app/views/call_forwards/_form_core.html.haml index b751fb3..83de044 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, :autofocus => true + = 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.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 @@ -8,8 +8,4 @@ = 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..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 48afa54..221baf2 100644 --- a/app/views/call_forwards/_index_core.html.haml +++ b/app/views/call_forwards/_index_core.html.haml @@ -1,21 +1,15 @@ %table.table.table-striped %thead %tr - - if !@phone_number - %th= t('call_forwards.index.call_forwardable') - %th= t('call_forwards.index.call_forward_case_id') + %th= t('call_forwards.index.call_forward_case') %th= t('call_forwards.index.timeout') %th= t('call_forwards.index.destination') %th= t('call_forwards.index.source') - - if GuiFunction.display?('depth_field_value_in_index_table', current_user) - %th= t('call_forwards.index.depth') %th= t('call_forwards.index.active') %tbody - for call_forward in call_forwards %tr - - if !@phone_number - %td= call_forward.call_forwardable %td= t("call_forward_cases.#{call_forward.call_forward_case.value}") %td= call_forward.timeout %td @@ -26,7 +20,5 @@ - if call_forward.destinationable_id = ": #{call_forward.destinationable}" %td= call_forward.source - - if GuiFunction.display?('depth_field_value_in_index_table', current_user) - %td= call_forward.depth %td= call_forward.active =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.call_forwardable, :child => call_forward} \ No newline at end of file diff --git a/app/views/call_forwards/show.html.haml b/app/views/call_forwards/show.html.haml index 9f9d27a..ad9ab16 100644 --- a/app/views/call_forwards/show.html.haml +++ b/app/views/call_forwards/show.html.haml @@ -1,8 +1,5 @@ - content_for :title, t("call_forwards.show.page_title") -%p - %strong= t('call_forwards.show.call_forwardable') + ":" - = "#{@call_forward.call_forwardable_type}: #{@call_forward.call_forwardable}" %p %strong= t('call_forwards.show.call_forward_case') + ":" = t("call_forward_cases.#{@call_forward.call_forward_case.value}") @@ -21,11 +18,8 @@ %p %strong= t('call_forwards.show.source') + ":" = @call_forward.source -%p - %strong= t('call_forwards.show.depth') + ":" - = @call_forward.depth %p %strong= t('call_forwards.show.active') + ":" = @call_forward.active -= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @call_forward } \ No newline at end of file += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @parent, :child => @call_forward } diff --git a/app/views/ringtones/_form_core.html.haml b/app/views/ringtones/_form_core.html.haml index e44c950..de1cc38 100644 --- a/app/views/ringtones/_form_core.html.haml +++ b/app/views/ringtones/_form_core.html.haml @@ -1,3 +1,3 @@ .inputs / = f.input :audio, :label => t('ringtones.form.audio.label'), :hint => conditional_hint('ringtones.form.audio.hint') - = f.input :bellcore_id, :collection => 0..10, :label => t('ringtones.form.bellcore_id.label'), :hint => conditional_hint('ringtones.form.bellcore_id.hint'), :include_blank => true + = f.input :bellcore_id, :collection => Ringtone::CORE_RINGTONES_AVAILABLE, :label => t('ringtones.form.bellcore_id.label'), :hint => conditional_hint('ringtones.form.bellcore_id.hint'), :include_blank => false diff --git a/app/views/ringtones/_index_core.html.haml b/app/views/ringtones/_index_core.html.haml index 715db3c..51347a5 100644 --- a/app/views/ringtones/_index_core.html.haml +++ b/app/views/ringtones/_index_core.html.haml @@ -1,12 +1,12 @@ %table.table.table-striped %thead %tr - %th= t('ringtones.index.audio') + /%th= t('ringtones.index.audio') %th= t('ringtones.index.bellcore_id') %tbody - for ringtone in ringtones %tr - %td= ringtone.audio + /%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/index.html.haml b/app/views/ringtones/index.html.haml index 2eea5fe..2e316a5 100644 --- a/app/views/ringtones/index.html.haml +++ b/app/views/ringtones/index.html.haml @@ -2,5 +2,5 @@ - if @ringtones.count > 0 = render "index_core", :ringtones => @ringtones - -= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Ringtone} \ No newline at end of file +- else + = render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Ringtone} \ No newline at end of file diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 72e10df..0a332af 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -72,6 +72,13 @@ %br = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => PhoneNumber } +- if @sip_account.call_forwards.count > 0 || can?(:create, @sip_account.call_forwards.build) + %h2= t('call_forwards.index.page_title') + - if @sip_account.call_forwards.count > 0 + = render "call_forwards/index_core", :call_forwards => @sip_account.call_forwards + %br + = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => CallForward } + - if @sip_account.softkeys.count > 0 || can?(:create, @sip_account.softkeys.build) %h2= t("softkeys.index.page_title") - if @sip_account.softkeys.count > 0 diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 0f6cc2c..8882c08 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -38,7 +38,7 @@ %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) + =link_to t("call_forwards.index.page_title"), sip_account_call_forwards_path(sip_account) %br =link_to t("voicemail_settings.index.page_title"), sip_account_voicemail_settings_path(sip_account) %br -- cgit v1.2.3 From 26e2e09b20f7f775942b415df6eb55ddb7193879 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 25 Feb 2013 11:57:28 -0500 Subject: sip_account ringtone as default --- app/views/users/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 8882c08..d3b1cf3 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -44,7 +44,7 @@ %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) + =link_to t("ringtones.show.page_title"), sip_account_ringtones_path(sip_account) - if @user.conferences.any? %p -- cgit v1.2.3 From c6d5308480df11e3ebc829a3fa7df8f0453c9630 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 25 Feb 2013 11:57:55 -0500 Subject: edit ringtone --- app/views/sip_accounts/show.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/views') diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 0a332af..bf9d692 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -65,6 +65,13 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account } +%p + %strong= t('ringtones.name') + ':' + - if @sip_account.ringtones.count > 0 + = link_to @sip_account.ringtones.first, sip_account_ringtone_path(@sip_account, @sip_account.ringtones.first) + - else + = link_to t('ringtones.set_a_ringtone'), new_sip_account_ringtone_path(@sip_account) + - if @sip_account.phone_numbers.count > 0 || can?(:create, @sip_account.phone_numbers.build) %h2= t('phone_numbers.index.page_title') - if @sip_account.phone_numbers.count > 0 -- cgit v1.2.3 From 04bcdeca551f21748becfbf610e6ea2001c18bc1 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 25 Feb 2013 17:12:34 -0500 Subject: icons --- app/views/groups/_index_core.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/groups/_index_core.html.haml b/app/views/groups/_index_core.html.haml index d99874a..3a444bf 100644 --- a/app/views/groups/_index_core.html.haml +++ b/app/views/groups/_index_core.html.haml @@ -1,13 +1,17 @@ %table.table.table-striped %tr + %th %th= t('groups.index.name') - %th= t('groups.index.active') %th= t('groups.index.comment') - for group in groups %tr + %td + -if group.active + %i.icon-ok + - else + %i.icon-ban-circle %td= group.name - %td= group.active %td= group.comment =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => group} \ No newline at end of file -- cgit v1.2.3 From 90ccb06c88c920c0a21282acf86c0ecad6b6310a Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 25 Feb 2013 17:12:49 -0500 Subject: icons --- app/views/call_forwards/_index_core.html.haml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/call_forwards/_index_core.html.haml b/app/views/call_forwards/_index_core.html.haml index 221baf2..3c57405 100644 --- a/app/views/call_forwards/_index_core.html.haml +++ b/app/views/call_forwards/_index_core.html.haml @@ -1,15 +1,20 @@ %table.table.table-striped %thead %tr + %th %th= t('call_forwards.index.call_forward_case') %th= t('call_forwards.index.timeout') %th= t('call_forwards.index.destination') - %th= t('call_forwards.index.source') - %th= t('call_forwards.index.active') + %th= t('call_forwards.index.source') %tbody - for call_forward in call_forwards %tr + %td + -if call_forward.active + %i.icon-ok + - else + %i.icon-ban-circle %td= t("call_forward_cases.#{call_forward.call_forward_case.value}") %td= call_forward.timeout %td @@ -20,5 +25,5 @@ - if call_forward.destinationable_id = ": #{call_forward.destinationable}" %td= call_forward.source - %td= call_forward.active - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.call_forwardable, :child => call_forward} \ No newline at end of file + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => call_forward.call_forwardable, :child => call_forward} + -- cgit v1.2.3 From cf89633baaa6e9bc901c2cc630ed2c94296109f1 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 25 Feb 2013 18:02:59 -0500 Subject: callforward_rules_act_per_sip_account removed from views --- app/views/sip_accounts/_form_core.html.haml | 2 -- app/views/sip_accounts/show.html.haml | 5 ----- 2 files changed, 7 deletions(-) (limited to 'app/views') diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml index 1a09912..d7c65d0 100644 --- a/app/views/sip_accounts/_form_core.html.haml +++ b/app/views/sip_accounts/_form_core.html.haml @@ -13,6 +13,4 @@ - 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(:call_forwardable_id => @sip_account.phone_number_ids, :call_forwardable_type => 'PhoneNumber').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') = f.input :language_code, :collection => Language.all.collect{|l| [l.to_s, l.code]}, :label => t('sip_accounts.form.language_code.label'), :hint => conditional_hint('sip_accounts.form.language_id.hint'), :include_blank => false diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index bf9d692..ede5150 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -37,11 +37,6 @@ %strong= t('sip_accounts.show.hotdeskable') + ":" %td = @sip_account.hotdeskable == true ? t('simple_form.yes') : t('simple_form.no') - %tr - %td - %strong= t('sip_accounts.show.callforward_rules_act_per_sip_account') + ":" - %td - = @sip_account.callforward_rules_act_per_sip_account == true ? t('simple_form.yes') : t('simple_form.no') - if @sip_account.registration.try(:network_ip) && @sip_account.registration.try(:network_port) %tr -- cgit v1.2.3 From 387ce8f6694b41ab73d264190ce41dcd13484ede Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 25 Feb 2013 18:03:42 -0500 Subject: icons --- app/views/intruders/_index_core.html.haml | 9 ++++++++- app/views/sip_accounts/_index_core.html.haml | 4 ++-- app/views/users/show.html.haml | 16 ++++++++++++---- 3 files changed, 22 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/intruders/_index_core.html.haml b/app/views/intruders/_index_core.html.haml index 31bbd11..63f2253 100644 --- a/app/views/intruders/_index_core.html.haml +++ b/app/views/intruders/_index_core.html.haml @@ -16,7 +16,14 @@ - for intruder in intruders %tr - %td= intruder.list_type.chars.first + %td + - if intruder.list_type == 'whitelist' + %i.icon-ok + - elsif intruder.bans > 0 + %i.icon-fire + - elsif intruder.points > 0 + %i.icon-warning-sign + %td= intruder.contact_ip %td= intruder.contact_port %td= intruder.points diff --git a/app/views/sip_accounts/_index_core.html.haml b/app/views/sip_accounts/_index_core.html.haml index 34aac64..d98ea0a 100644 --- a/app/views/sip_accounts/_index_core.html.haml +++ b/app/views/sip_accounts/_index_core.html.haml @@ -20,13 +20,13 @@ - if sip_account.registration %i.icon-ok - else - %i.icon-thumbs-down + %i.icon-ban-circle %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) + = render 'phone_numbers/listing', :phone_numbers => sip_account.phone_numbers.order(:position) - if sip_accounts.map{ |sip_account| sip_account.phone_sip_accounts.any? }.include?(true) %td %span.hidden-phone diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index d3b1cf3..8148005 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -29,10 +29,18 @@ = 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 + - phone_numbers = sip_account.phone_numbers.order(:position) + %p + - 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 ... %p =link_to t("call_histories.index.page_title"), sip_account_call_histories_path(sip_account) %br -- cgit v1.2.3 From ffaa80e8d46b3b6b7597af6f157724005f48bae4 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 26 Feb 2013 10:48:08 +0100 Subject: RestoreJob scaffold --- app/views/backup_jobs/show.html.haml | 48 +++++++++++++++++----------- app/views/restore_jobs/_form.html.haml | 7 ++++ app/views/restore_jobs/_form_core.html.haml | 2 ++ app/views/restore_jobs/_index_core.html.haml | 12 +++++++ app/views/restore_jobs/index.html.haml | 6 ++++ app/views/restore_jobs/new.html.haml | 3 ++ app/views/restore_jobs/show.html.haml | 22 +++++++++++++ 7 files changed, 82 insertions(+), 18 deletions(-) create mode 100644 app/views/restore_jobs/_form.html.haml create mode 100644 app/views/restore_jobs/_form_core.html.haml create mode 100644 app/views/restore_jobs/_index_core.html.haml create mode 100644 app/views/restore_jobs/index.html.haml create mode 100644 app/views/restore_jobs/new.html.haml create mode 100644 app/views/restore_jobs/show.html.haml (limited to 'app/views') diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml index 6fcb1dc..ddc4766 100644 --- a/app/views/backup_jobs/show.html.haml +++ b/app/views/backup_jobs/show.html.haml @@ -1,22 +1,34 @@ - content_for :title, t("backup_jobs.show.page_title") -%p - %strong= t('backup_jobs.show.started_at') + ":" - = @backup_job.started_at -%p - %strong= t('backup_jobs.show.finished_at') + ":" - = @backup_job.finished_at -%p - %strong= t('backup_jobs.show.state') + ":" - = @backup_job.state -%p - %strong= t('backup_jobs.show.directory') + ":" - = @backup_job.directory -%p - %strong= t('backup_jobs.show.size_of_the_backup') + ":" - - if @backup_job.backup_file? - %a{:href => backup_job.backup_file.url} - %i{:class => 'icon-download'} - = number_to_human_size(backup_job.backup_file.size, :precision => 2) +%table.table.table-striped + %tbody + %tr + %td + %strong= t('backup_jobs.show.started_at') + ":" + %td + = @backup_job.started_at + %tr + %td + %strong= t('backup_jobs.show.finished_at') + ":" + %td + = @backup_job.finished_at + %tr + %td + %strong= t('backup_jobs.show.state') + ":" + %td + = @backup_job.state + %tr + %td + %strong= t('backup_jobs.show.directory') + ":" + %td + = @backup_job.directory + %tr + %td + %strong= t('backup_jobs.show.size_of_the_backup') + ":" + %td + - if @backup_job.backup_file? + %a{:href => backup_job.backup_file.url} + %i{:class => 'icon-download'} + = number_to_human_size(backup_job.backup_file.size, :precision => 2) = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @backup_job } \ No newline at end of file diff --git a/app/views/restore_jobs/_form.html.haml b/app/views/restore_jobs/_form.html.haml new file mode 100644 index 0000000..43ced9a --- /dev/null +++ b/app/views/restore_jobs/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for(@restore_job) do |f| + = f.error_notification + + = render "form_core", :f => f + + .form-actions + = f.button :submit, conditional_t('restore_jobs.form.submit') diff --git a/app/views/restore_jobs/_form_core.html.haml b/app/views/restore_jobs/_form_core.html.haml new file mode 100644 index 0000000..017c124 --- /dev/null +++ b/app/views/restore_jobs/_form_core.html.haml @@ -0,0 +1,2 @@ +.inputs + = f.input :backup_file, :label => t('restore_jobs.form.backup_file.label'), :hint => conditional_hint('restore_jobs.form.backup_file.hint') diff --git a/app/views/restore_jobs/_index_core.html.haml b/app/views/restore_jobs/_index_core.html.haml new file mode 100644 index 0000000..f6127ba --- /dev/null +++ b/app/views/restore_jobs/_index_core.html.haml @@ -0,0 +1,12 @@ +%table.table.table-striped + %tr + %th= t('restore_jobs.index.state') + %th= t('restore_jobs.index.backup_file') + %th + + + - for restore_job in restore_jobs + %tr + %td= restore_job.state + %td= restore_job.to_s + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => restore_job} \ No newline at end of file diff --git a/app/views/restore_jobs/index.html.haml b/app/views/restore_jobs/index.html.haml new file mode 100644 index 0000000..b8aa74e --- /dev/null +++ b/app/views/restore_jobs/index.html.haml @@ -0,0 +1,6 @@ +- content_for :title, t("restore_jobs.index.page_title") + +- if @restore_jobs && @restore_jobs.count > 0 + = render "index_core", :restore_jobs => @restore_jobs + += render :partial => 'shared/create_link', :locals => {:child_class => RestoreJob} \ No newline at end of file diff --git a/app/views/restore_jobs/new.html.haml b/app/views/restore_jobs/new.html.haml new file mode 100644 index 0000000..ffae792 --- /dev/null +++ b/app/views/restore_jobs/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("restore_jobs.new.page_title") + += render "form" \ No newline at end of file diff --git a/app/views/restore_jobs/show.html.haml b/app/views/restore_jobs/show.html.haml new file mode 100644 index 0000000..5993872 --- /dev/null +++ b/app/views/restore_jobs/show.html.haml @@ -0,0 +1,22 @@ +- content_for :title, t("restore_jobs.show.page_title") + +%table.table.table-striped + %tbody + %tr + %td + %strong= t('restore_jobs.show.state') + ":" + %td + = @restore_job.state + %tr + %td + %strong= t('restore_jobs.show.backup_file') + ":" + %td + = @restore_job.to_s + %tr + %td + %strong= t('backup_jobs.show.size_of_the_backup') + ":" + %td + - if @restore_job.backup_file? + = number_to_human_size(@restore_job.backup_file.size, :precision => 2) + += render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @restore_job } \ No newline at end of file -- cgit v1.2.3 From 0a976c6b463288df4a9516bbd08f6232a37d427c Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 26 Feb 2013 09:21:34 -0500 Subject: enable tel: handling for sip_accounts --- app/views/sip_accounts/show.html.haml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/views') diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index ede5150..12e54c3 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -60,6 +60,10 @@ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account } +%p + %strong= t('sip_accounts.show.tel_protocol') + ':' + %a{:href => '', :onclick => "navigator.registerProtocolHandler(\"tel\", \"#{@register_tel_protocol}\", \"#{@sip_account.to_s}\");" }= t('sip_accounts.show.register_tel_protocol') + %p %strong= t('ringtones.name') + ':' - if @sip_account.ringtones.count > 0 -- cgit v1.2.3 From df0bc9db9cdbf9bfbc92a5f1f00e57fc0e7d7792 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 26 Feb 2013 16:17:06 +0100 Subject: Search box in the top navigation bar. --- app/views/layouts/_navbar.html.haml | 27 ++++++++++++++------------- app/views/layouts/application.html.haml | 2 +- app/views/phone_books/_index_core.html.haml | 7 +++++-- app/views/sessions/new.html.haml | 16 ++++++++++------ 4 files changed, 30 insertions(+), 22 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 8e09859..a7f47cf 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -1,13 +1,9 @@ .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 + %span.hidden-phone + %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))} + Gemeinschaft 5 .nav-collapse.collapse %ul.nav @@ -29,13 +25,14 @@ - if current_user %ul.nav.pull-right %li.display - - 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' + %span.hidden-phone + - if current_user.image? + = image_tag(current_user.image_url(:mini).to_s, :class => 'img-rounded') - else - = image_tag 'icons/user-female-16x.png', :class => 'img-rounded' + - 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 @@ -51,3 +48,7 @@ %a.navbar-link{:href => log_out_path} %i.icon-off.icon-white + - if GuiFunction.display?('search_field_in_top_navigation_bar', current_user) + = form_tag search_path, :method => :post, :class => 'navbar-search pull-right' do + %input.text{:placeholder => 'Suchen ...', :name => 'q', :class => 'search-query span2'} + diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 33a730f..eab6096 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -3,7 +3,7 @@ %head %meta{:charset => "utf-8"}/ %title - = content_for?(:title) ? yield(:title) : "Gemeinschaft 5" + = content_for?(:title) ? yield(:title) : "Gemeinschaft 5.1" %meta{:name => 'viewport', :content => "width=device-width, initial-scale=1.0"} - if content_for?(:meta_description) %meta{:description => yield(:meta_description)}/ diff --git a/app/views/phone_books/_index_core.html.haml b/app/views/phone_books/_index_core.html.haml index 09ce3a3..290a12e 100644 --- a/app/views/phone_books/_index_core.html.haml +++ b/app/views/phone_books/_index_core.html.haml @@ -5,7 +5,9 @@ %th %span.visible-desktop = t('phone_books.index.description') - %th= t('phone_books.index.count') + %th + %span.visible-desktop + = t('phone_books.index.count') %tbody - for phone_book in phone_books @@ -16,6 +18,7 @@ %span.visible-desktop = phone_book.description %td - = number_with_delimiter( phone_book.phone_book_entries.count ) + %span.visible-desktop + = number_with_delimiter( phone_book.phone_book_entries.count ) =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => phone_book.phone_bookable, :child => phone_book} \ No newline at end of file diff --git a/app/views/sessions/new.html.haml b/app/views/sessions/new.html.haml index 75dd3de..0c5c96d 100644 --- a/app/views/sessions/new.html.haml +++ b/app/views/sessions/new.html.haml @@ -1,8 +1,12 @@ - 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 - = t.input :password, :label => t('sessions.form.password'), :required => false - = t.input :reset_password, :label => t('sessions.form.reset_password'), :as => :boolean - .form-actions - = t.button :submit, :value => 'Login' +.row + .span12 + %h1=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 + = t.input :password, :label => t('sessions.form.password'), :required => false + = t.input :reset_password, :label => t('sessions.form.reset_password'), :as => :boolean + .form-actions + = t.button :submit, :value => 'Login' -- cgit v1.2.3 From 16c8605ad879bf0ac0c46bc24f2e9cd5c62e3a7d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 26 Feb 2013 16:25:05 +0100 Subject: Bugfix #204 --- app/views/backup_jobs/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml index ddc4766..8bb270f 100644 --- a/app/views/backup_jobs/show.html.haml +++ b/app/views/backup_jobs/show.html.haml @@ -27,8 +27,8 @@ %strong= t('backup_jobs.show.size_of_the_backup') + ":" %td - if @backup_job.backup_file? - %a{:href => backup_job.backup_file.url} + %a{:href => @backup_job.backup_file.url} %i{:class => 'icon-download'} - = number_to_human_size(backup_job.backup_file.size, :precision => 2) + = number_to_human_size(@backup_job.backup_file.size, :precision => 2) = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @backup_job } \ No newline at end of file -- cgit v1.2.3 From bc45716cb2aa3cd81ad5519edac8e09239a45984 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 26 Feb 2013 16:16:46 -0500 Subject: buttons added --- app/views/sip_accounts/show.html.haml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 12e54c3..fd955dd 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -62,14 +62,24 @@ %p %strong= t('sip_accounts.show.tel_protocol') + ':' - %a{:href => '', :onclick => "navigator.registerProtocolHandler(\"tel\", \"#{@register_tel_protocol}\", \"#{@sip_account.to_s}\");" }= t('sip_accounts.show.register_tel_protocol') +%p + %a.btn.btn-small.btn-default{ :href => '', :onclick => "navigator.registerProtocolHandler(\"tel\", \"#{@register_tel_protocol}\", \"#{@sip_account.to_s}\");" } + %i.icon-plus + = t('sip_accounts.show.register_tel_protocol') %p %strong= t('ringtones.name') + ':' - if @sip_account.ringtones.count > 0 - = link_to @sip_account.ringtones.first, sip_account_ringtone_path(@sip_account, @sip_account.ringtones.first) + = @sip_account.ringtones.first + %p + %a.btn.btn-small.btn-warning{:href => edit_sip_account_ringtone_path(@sip_account, @sip_account.ringtones.first) } + %i.icon-edit.icon-white + =t('ringtones.index.actions.edit') - else - = link_to t('ringtones.set_a_ringtone'), new_sip_account_ringtone_path(@sip_account) + %p + %a.btn.btn-small.btn-default{ :href => new_sip_account_ringtone_path(@sip_account) } + %i.icon-plus + = t('ringtones.set_a_ringtone') - if @sip_account.phone_numbers.count > 0 || can?(:create, @sip_account.phone_numbers.build) %h2= t('phone_numbers.index.page_title') -- cgit v1.2.3 From 22bd2d6fb05e488527beb9c0e134c1fa47673a35 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Tue, 26 Feb 2013 16:29:16 -0500 Subject: use partials for buttons --- app/views/phone_numbers/show.html.haml | 15 ++++++++------- app/views/sip_accounts/show.html.haml | 10 ++-------- 2 files changed, 10 insertions(+), 15 deletions(-) (limited to 'app/views') diff --git a/app/views/phone_numbers/show.html.haml b/app/views/phone_numbers/show.html.haml index de6cb1b..9fe6ea4 100644 --- a/app/views/phone_numbers/show.html.haml +++ b/app/views/phone_numbers/show.html.haml @@ -9,15 +9,16 @@ %strong= t('phone_numbers.show.number') + ":" = @phone_number.to_s += render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number.phone_numberable, :child => @phone_number } + - if @ringtoneable_classes.has_key?(@phone_number.phone_numberable.class.to_s) %p - %strong= t('ringtones.name') + ':' - - if @phone_number.ringtones.count > 0 - = link_to @phone_number.ringtones.first, phone_number_ringtone_path(@phone_number, @phone_number.ringtones.first) - - else - = link_to t('ringtones.set_a_ringtone'), new_phone_number_ringtone_path(@phone_number) - -= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number.phone_numberable, :child => @phone_number } + %strong= t('ringtones.name') + ':' + - if @phone_number.ringtones.count > 0 + = @phone_number.ringtones.first + = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @phone_number, :child => @phone_number.ringtones.first } + - else + = render :partial => 'shared/create_link', :locals => { :parent => @phone_number, :child_class => Ringtone } - if @forwardable_classes.has_key?(@phone_number.phone_numberable.class.to_s) %h3= t("call_forwards.index.page_title") diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index fd955dd..0aaf920 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -71,15 +71,9 @@ %strong= t('ringtones.name') + ':' - if @sip_account.ringtones.count > 0 = @sip_account.ringtones.first - %p - %a.btn.btn-small.btn-warning{:href => edit_sip_account_ringtone_path(@sip_account, @sip_account.ringtones.first) } - %i.icon-edit.icon-white - =t('ringtones.index.actions.edit') + = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account, :child => @sip_account.ringtones.first } - else - %p - %a.btn.btn-small.btn-default{ :href => new_sip_account_ringtone_path(@sip_account) } - %i.icon-plus - = t('ringtones.set_a_ringtone') + = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => Ringtone } - if @sip_account.phone_numbers.count > 0 || can?(:create, @sip_account.phone_numbers.build) %h2= t('phone_numbers.index.page_title') -- cgit v1.2.3 From 15d5f410afafce67b61a27479a21546cebd48ed9 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 27 Feb 2013 10:23:26 +0100 Subject: Show a restore link in the setup navigation bar. --- app/views/layouts/_navbar.html.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index a7f47cf..8004c0e 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -3,10 +3,12 @@ .container %span.hidden-phone %a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))} - Gemeinschaft 5 + Gemeinschaft 5.1 .nav-collapse.collapse %ul.nav + - if !GemeinschaftSetup.any? + %li=link_to t('restore_jobs.new.page_title'), new_restore_job_path - if current_user && GemeinschaftSetup.any? && current_user.admin? - if current_page?(page_help_path) %li.active -- cgit v1.2.3 From ed0117210837dd1d0d2dbf403799b70225caf0cd Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Wed, 27 Feb 2013 06:04:50 -0500 Subject: calls views added --- app/views/calls/_form.html.haml | 7 +++++++ app/views/calls/_form_core.html.haml | 2 ++ app/views/calls/_index_core.html.haml | 34 +++++++++++++++++++++++++++++++--- app/views/calls/index.html.haml | 6 ++++-- app/views/calls/new.html.haml | 3 +++ app/views/sip_accounts/show.html.haml | 6 +++++- 6 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 app/views/calls/_form.html.haml create mode 100644 app/views/calls/_form_core.html.haml create mode 100644 app/views/calls/new.html.haml (limited to 'app/views') diff --git a/app/views/calls/_form.html.haml b/app/views/calls/_form.html.haml new file mode 100644 index 0000000..ccdcd72 --- /dev/null +++ b/app/views/calls/_form.html.haml @@ -0,0 +1,7 @@ += simple_form_for([ @parent, @call ]) do |f| + = f.error_notification + + = render "form_core", :f => f + + .form-actions + = f.button :submit, conditional_t('calls.form.submit') diff --git a/app/views/calls/_form_core.html.haml b/app/views/calls/_form_core.html.haml new file mode 100644 index 0000000..4cdd55e --- /dev/null +++ b/app/views/calls/_form_core.html.haml @@ -0,0 +1,2 @@ +.inputs + = f.input :dest, :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 10f79f1..e5b769e 100644 --- a/app/views/calls/_index_core.html.haml +++ b/app/views/calls/_index_core.html.haml @@ -1,10 +1,38 @@ %table.table.table-striped %thead %tr - %th= t('calls.index.uuid') + %th + %th= t('calls.index.created') + %th= t('calls.index.destination') + %th= t('calls.index.caller') + %th= t('calls.index.callee') + %th= t('calls.index.callstate') + %th= t('calls.index.codecs') + %th %tbody - - for call in @calls + - for call in calls %tr %td - = call.uuid + - if call.direction == 'inbound' + %i.icon-arrow-left + - else + %i.icon-arrow-right + %td + = call.created + %td + = call.dest + %td + = "#{call.cid_name} #{call.cid_num}" + %td + = "#{call.callee_name} #{call.callee_num}" + %td + = call.callstate + %td + = "#{call.read_codec}/#{call.write_codec}" + + %td + %p + %a.btn.btn-small.btn-danger{'data-confirm' => t('calls.index.actions.confirm_destroy'), 'data-method' => 'delete', :href => method( :"#{parent.class.name.underscore}_call_path" ).(parent, call), :rel => 'nofollow'} + %i.icon-trash.icon-white + =t('calls.index.actions.destroy') diff --git a/app/views/calls/index.html.haml b/app/views/calls/index.html.haml index be678cd..a87f809 100644 --- a/app/views/calls/index.html.haml +++ b/app/views/calls/index.html.haml @@ -1,6 +1,8 @@ - content_for :title, t("calls.index.page_title") - if @calls.count > 0 - = render "index_core", :calls => @calls + = render "index_core", :calls => @calls, :parent => @parent -= render :partial => 'shared/create_link', :locals => {:parent => @parent, :child_class => Call} \ No newline at end of file +%a.btn.btn-small.btn-default{:href => method( :"new_#{@parent.class.name.underscore}_call_path" ).(@parent) } + %i.icon-plus + =t("calls.index.actions.create") diff --git a/app/views/calls/new.html.haml b/app/views/calls/new.html.haml new file mode 100644 index 0000000..44bb6ae --- /dev/null +++ b/app/views/calls/new.html.haml @@ -0,0 +1,3 @@ +- content_for :title, t("calls.new.page_title") + += render "form" diff --git a/app/views/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml index 0aaf920..365aea8 100644 --- a/app/views/sip_accounts/show.html.haml +++ b/app/views/sip_accounts/show.html.haml @@ -94,4 +94,8 @@ - if @sip_account.softkeys.count > 0 = render "softkeys/index_core", :softkeys => @sip_account.softkeys %br - = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => Softkey } \ No newline at end of file + = render :partial => 'shared/create_link', :locals => { :parent => @sip_account, :child_class => Softkey } + +- if @sip_account.calls.count > 0 + %h2= t("calls.index.page_title") + = render "calls/index_core", :calls => @sip_account.calls, :parent => @sip_account -- cgit v1.2.3