summaryrefslogtreecommitdiff
path: root/app/views/cdrs
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-06-22 10:25:31 +0200
committerPeter Kozak <spag@golwen.net>2013-06-22 10:25:31 +0200
commit130e77d4c9df2cca2425b63a443ea8745133d083 (patch)
tree4637509156e35ac172937d02e9639b6cde8b29a6 /app/views/cdrs
parent08ecc91d89a2b6a83daee4a1ffda5520e38e53c6 (diff)
cdrs added
Diffstat (limited to 'app/views/cdrs')
-rw-r--r--app/views/cdrs/_index_core.html.haml33
-rw-r--r--app/views/cdrs/index.html.haml4
2 files changed, 37 insertions, 0 deletions
diff --git a/app/views/cdrs/_index_core.html.haml b/app/views/cdrs/_index_core.html.haml
new file mode 100644
index 0000000..39e9e7f
--- /dev/null
+++ b/app/views/cdrs/_index_core.html.haml
@@ -0,0 +1,33 @@
+
+- if defined?(cdrs.total_pages)
+ = will_paginate cdrs, :renderer => BootstrapPagination::Rails, :previous_label => raw('<i class = "icon-chevron-left"></i>'), :next_label => raw('<i class = "icon-chevron-right"></i>')
+
+%table.table.table-striped
+ %thead
+ %tr
+ %th= sortable :start_stamp, t('cdrs.index.start_stamp')
+ %th= sortable :caller_id_number, t('cdrs.index.caller_id_number')
+ %th= sortable :caller_id_name, t('cdrs.index.caller_id_name')
+ %th= sortable :dialed_number, t('cdrs.index.dialed_number')
+ %th= sortable :destination_number, t('cdrs.index.destination_number')
+ %th= sortable :callee_id_number, t('cdrs.index.callee_id_number')
+ %th= sortable :callee_id_name, t('cdrs.index.callee_id_name')
+ %th= sortable :billsec, t('cdrs.index.billsec')
+ %th= sortable :hangup_cause, t('cdrs.index.hangup_cause')
+ %th= sortable :dialstatus, t('cdrs.index.dialstatus')
+
+ %tbody
+ - for cdr in cdrs
+ %tr{:class => (cdr.dialstatus == 'SUCCESS' ? '' : 'warning')}
+ %td= l cdr.start_stamp, :format => :short
+ %td= cdr.caller_id_number
+ %td= cdr.caller_id_name
+ %td= cdr.dialed_number
+ %td= cdr.destination_number
+ %td= cdr.callee_id_number
+ %td= cdr.callee_id_name
+ %td= Cdr.seconds_to_minutes_seconds(cdr.billsec)
+ %td= cdr.hangup_cause
+ %td= cdr.dialstatus
+
+ /=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => @tenant, :child => cdr}
diff --git a/app/views/cdrs/index.html.haml b/app/views/cdrs/index.html.haml
new file mode 100644
index 0000000..b260b38
--- /dev/null
+++ b/app/views/cdrs/index.html.haml
@@ -0,0 +1,4 @@
+- content_for :title, t("cdrs.index.page_title")
+
+- if @cdrs.count > 0
+ = render "index_core", :cdrs => @cdrs