summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/backup_jobs/show.html.haml48
-rw-r--r--app/views/call_forwards/_form.html.haml2
-rw-r--r--app/views/call_forwards/_form_core.html.haml6
-rw-r--r--app/views/call_forwards/_index_core.html.haml31
-rw-r--r--app/views/call_forwards/index.html.haml2
-rw-r--r--app/views/call_forwards/show.html.haml26
-rw-r--r--app/views/calls/_form.html.haml7
-rw-r--r--app/views/calls/_form_core.html.haml2
-rw-r--r--app/views/calls/_index_core.html.haml34
-rw-r--r--app/views/calls/index.html.haml6
-rw-r--r--app/views/calls/new.html.haml3
-rw-r--r--app/views/fax_documents/_index_core.html.haml2
-rw-r--r--app/views/fax_documents/show.html.haml2
-rw-r--r--app/views/group_memberships/_form.html.haml7
-rw-r--r--app/views/group_memberships/_form_core.html.haml4
-rw-r--r--app/views/group_memberships/_index_core.html.haml11
-rw-r--r--app/views/group_memberships/edit.html.haml3
-rw-r--r--app/views/group_memberships/index.html.haml6
-rw-r--r--app/views/group_memberships/new.html.haml3
-rw-r--r--app/views/group_memberships/show.html.haml10
-rw-r--r--app/views/group_permissions/_form.html.haml7
-rw-r--r--app/views/group_permissions/_form_core.html.haml3
-rw-r--r--app/views/group_permissions/_index_core.html.haml11
-rw-r--r--app/views/group_permissions/edit.html.haml3
-rw-r--r--app/views/group_permissions/index.html.haml6
-rw-r--r--app/views/group_permissions/new.html.haml3
-rw-r--r--app/views/group_permissions/show.html.haml10
-rw-r--r--app/views/groups/_form.html.haml7
-rw-r--r--app/views/groups/_form_core.html.haml4
-rw-r--r--app/views/groups/_index_core.html.haml17
-rw-r--r--app/views/groups/edit.html.haml3
-rw-r--r--app/views/groups/index.html.haml6
-rw-r--r--app/views/groups/new.html.haml3
-rw-r--r--app/views/groups/show.html.haml25
-rw-r--r--app/views/gs_nodes/sync.xml.haml2
-rw-r--r--app/views/intruders/_index_core.html.haml9
-rw-r--r--app/views/layouts/_navbar.html.haml29
-rw-r--r--app/views/layouts/application.html.haml2
-rw-r--r--app/views/phone_books/_index_core.html.haml7
-rw-r--r--app/views/phone_numbers/_form_core.html.haml2
-rw-r--r--app/views/phone_numbers/show.html.haml15
-rw-r--r--app/views/restore_jobs/_form.html.haml7
-rw-r--r--app/views/restore_jobs/_form_core.html.haml2
-rw-r--r--app/views/restore_jobs/_index_core.html.haml12
-rw-r--r--app/views/restore_jobs/index.html.haml6
-rw-r--r--app/views/restore_jobs/new.html.haml3
-rw-r--r--app/views/restore_jobs/show.html.haml22
-rw-r--r--app/views/ringtones/_form_core.html.haml2
-rw-r--r--app/views/ringtones/_index_core.html.haml4
-rw-r--r--app/views/ringtones/index.html.haml4
-rw-r--r--app/views/sessions/new.html.haml16
-rw-r--r--app/views/sip_accounts/_form_core.html.haml2
-rw-r--r--app/views/sip_accounts/_index_core.html.haml4
-rw-r--r--app/views/sip_accounts/show.html.haml33
-rw-r--r--app/views/users/show.html.haml20
55 files changed, 407 insertions, 119 deletions
diff --git a/app/views/backup_jobs/show.html.haml b/app/views/backup_jobs/show.html.haml
index 6fcb1dc..8bb270f 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/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/_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 878e0e2..3c57405 100644
--- a/app/views/call_forwards/_index_core.html.haml
+++ b/app/views/call_forwards/_index_core.html.haml
@@ -1,32 +1,29 @@
%table.table.table-striped
%thead
%tr
- - if !@phone_number
- %th= t('call_forwards.index.phone_number_id')
- %th= t('call_forwards.index.call_forward_case_id')
+ %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')
- - if GuiFunction.display?('depth_field_value_in_index_table', current_user)
- %th= t('call_forwards.index.depth')
- %th= t('call_forwards.index.active')
+ %th= t('call_forwards.index.source')
%tbody
- for call_forward in call_forwards
%tr
- - if !@phone_number
- %td= call_forward.phone_number
+ %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
= 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}
+
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..ad9ab16 100644
--- a/app/views/call_forwards/show.html.haml
+++ b/app/views/call_forwards/show.html.haml
@@ -1,33 +1,25 @@
- content_for :title, t("call_forwards.show.page_title")
%p
- %strong= t('call_forwards.show.phone_number_id') + ":"
- = @call_forward.phone_number
-%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
%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 => @phone_number, :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/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/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)})"
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..3a444bf
--- /dev/null
+++ b/app/views/groups/_index_core.html.haml
@@ -0,0 +1,17 @@
+%table.table.table-striped
+ %tr
+ %th
+ %th= t('groups.index.name')
+ %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.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 }
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/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/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml
index 8e09859..8004c0e 100644
--- a/app/views/layouts/_navbar.html.haml
+++ b/app/views/layouts/_navbar.html.haml
@@ -1,16 +1,14 @@
.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.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
@@ -29,13 +27,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 +50,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/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
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/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
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/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'
diff --git a/app/views/sip_accounts/_form_core.html.haml b/app/views/sip_accounts/_form_core.html.haml
index 1a8876a..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(: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')
= 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/_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/sip_accounts/show.html.haml b/app/views/sip_accounts/show.html.haml
index 72e10df..365aea8 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
@@ -65,6 +60,21 @@
= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account.sip_accountable, :child => @sip_account }
+%p
+ %strong= t('sip_accounts.show.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
+ = @sip_account.ringtones.first
+ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @sip_account, :child => @sip_account.ringtones.first }
+ - else
+ = 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')
- if @sip_account.phone_numbers.count > 0
@@ -72,9 +82,20 @@
%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
= 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
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 0f6cc2c..8148005 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -29,22 +29,30 @@
= 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
=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
=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