diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/calls/_form.html.haml | 7 | ||||
| -rw-r--r-- | app/views/calls/_form_core.html.haml | 2 | ||||
| -rw-r--r-- | app/views/calls/_index_core.html.haml | 34 | ||||
| -rw-r--r-- | app/views/calls/index.html.haml | 6 | ||||
| -rw-r--r-- | app/views/calls/new.html.haml | 3 | ||||
| -rw-r--r-- | app/views/sip_accounts/show.html.haml | 6 | 
6 files changed, 52 insertions, 6 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" 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  | 
