summaryrefslogtreecommitdiff
path: root/app/views/calls
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/calls')
-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
5 files changed, 47 insertions, 5 deletions
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"