From d4a664a0495bd183b16a239aeb4c342e1ca739fa Mon Sep 17 00:00:00 2001 From: spag Date: Wed, 30 Jan 2013 15:59:52 +0100 Subject: select route endpoint --- app/views/call_routes/_form_core.html.haml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/views/call_routes') diff --git a/app/views/call_routes/_form_core.html.haml b/app/views/call_routes/_form_core.html.haml index b64d660..6679a7b 100644 --- a/app/views/call_routes/_form_core.html.haml +++ b/app/views/call_routes/_form_core.html.haml @@ -1,5 +1,4 @@ .inputs = f.input :routing_table, :collection => CallRoute::ROUTING_TABLES, :label => t('call_routes.form.table.label'), :hint => conditional_hint('call_routes.form.table.hint'), :include_blank => false, :autofocus => true = f.input :name, :label => t('call_routes.form.name.label'), :hint => conditional_hint('call_routes.form.name.hint') - = f.input :endpoint_type, :label => t('call_routes.form.endpoint_type.label'), :hint => conditional_hint('call_routes.form.endpoint_type.hint') - = f.input :endpoint_id, :label => t('call_routes.form.endpoint_id.label'), :hint => conditional_hint('call_routes.form.endpoint_id.hint') + = f.input :endpoint_str, :collection => @endpoints, :label => t('call_routes.form.endpoint.label'), :hint => conditional_hint('call_routes.form.endpoint.hint'), :include_blank => false -- cgit v1.2.3 From 4acda4279f11dc917b43aa7505ecb07d2161f0f6 Mon Sep 17 00:00:00 2001 From: spag Date: Fri, 1 Feb 2013 08:11:16 +0100 Subject: position added --- app/views/call_routes/_form_core.html.haml | 1 + app/views/call_routes/_index_core.html.haml | 2 ++ app/views/call_routes/show.html.haml | 3 +++ 3 files changed, 6 insertions(+) (limited to 'app/views/call_routes') diff --git a/app/views/call_routes/_form_core.html.haml b/app/views/call_routes/_form_core.html.haml index 6679a7b..926c985 100644 --- a/app/views/call_routes/_form_core.html.haml +++ b/app/views/call_routes/_form_core.html.haml @@ -2,3 +2,4 @@ = f.input :routing_table, :collection => CallRoute::ROUTING_TABLES, :label => t('call_routes.form.table.label'), :hint => conditional_hint('call_routes.form.table.hint'), :include_blank => false, :autofocus => true = f.input :name, :label => t('call_routes.form.name.label'), :hint => conditional_hint('call_routes.form.name.hint') = f.input :endpoint_str, :collection => @endpoints, :label => t('call_routes.form.endpoint.label'), :hint => conditional_hint('call_routes.form.endpoint.hint'), :include_blank => false + = f.input :position, :label => t('call_routes.form.position.label'), :hint => conditional_hint('call_routes.form.position.hint') \ No newline at end of file diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index f0acebb..52a45ba 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -2,6 +2,7 @@ %table.table.table-striped %thead %tr + %th %th= t('call_routes.index.name') %th= t('route_elements.index.pattern') %th= t('call_routes.index.endpoint') @@ -10,6 +11,7 @@ - for call_route in call_routes - cache(['call_route_single_table_row', call_route, call_routes.count]) do %tr + %td= call_route.position %td= call_route.name %td - if call_route.route_elements.any? diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml index 09daf53..a33a29b 100644 --- a/app/views/call_routes/show.html.haml +++ b/app/views/call_routes/show.html.haml @@ -1,5 +1,8 @@ - content_for :title, t("call_routes.show.page_title") +%p + %strong= t('call_routes.show.position') + ":" + = @call_route.position %p %strong= t('call_routes.show.table') + ":" = @call_route.routing_table -- cgit v1.2.3 From ba5b2737365592cc511a526a3b14be46c3a75467 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 2 Feb 2013 11:42:52 +0100 Subject: Created a sortable table for the call_routes. #151 --- app/views/call_routes/_index_core.html.haml | 58 +++++++++++++++-------------- app/views/call_routes/index.html.haml | 11 ++---- 2 files changed, 34 insertions(+), 35 deletions(-) (limited to 'app/views/call_routes') diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index 52a45ba..9eae9ee 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -1,29 +1,31 @@ -- cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do - %table.table.table-striped - %thead - %tr - %th - %th= t('call_routes.index.name') - %th= t('route_elements.index.pattern') - %th= t('call_routes.index.endpoint') +/ - cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do +%table.table.table-striped{ :id => "call_routes" } + %thead + %tr + %th + %th= t('call_routes.index.name') + %th= t('route_elements.index.pattern') + %th= t('call_routes.index.endpoint') - %tbody - - for call_route in call_routes - - cache(['call_route_single_table_row', call_route, call_routes.count]) do - %tr - %td= call_route.position - %td= call_route.name - %td - - if call_route.route_elements.any? - = call_route.route_elements.first.pattern - - if call_route.route_elements.count > 1 - = ', ...' - - else - = '-' - %td - - endpoint = call_route.endpoint - - if endpoint - = endpoint - - else - = call_route.endpoint_type - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} + %tbody + - for call_route in call_routes + / - cache(['call_route_single_table_row', call_route, call_routes.count]) do + = content_tag_for :tr, call_route do + %td + %span.handle + %i.icon-resize-vertical + %td= call_route.name + %td + - if call_route.route_elements.any? + = call_route.route_elements.first.pattern + - if call_route.route_elements.count > 1 + = ', ...' + - else + = '-' + %td + - endpoint = call_route.endpoint + - if endpoint + = endpoint + - else + = call_route.endpoint_type + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} diff --git a/app/views/call_routes/index.html.haml b/app/views/call_routes/index.html.haml index 488e1c7..d5181e3 100644 --- a/app/views/call_routes/index.html.haml +++ b/app/views/call_routes/index.html.haml @@ -1,11 +1,8 @@ - content_for :title, t("call_routes.index.page_title") -- if @call_routes && @call_routes.count > 0 - %table.table.table-striped - - @routing_tables.each do |routing_table| - %tr - %td{:colspan => 3} - %h3= routing_table - = render "index_core", :call_routes => @call_routes.where(:routing_table => routing_table) +- if @call_routes && @call_routes.any? + - @routing_tables.each do |routing_table| + %h3= routing_table + = render "index_core", :call_routes => @call_routes.where(:routing_table => routing_table) = render :partial => 'shared/create_link', :locals => {:child_class => CallRoute} -- cgit v1.2.3 From 636be20a183fac10637fea700f55f89bc371577b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 4 Feb 2013 13:51:15 +0100 Subject: Refactoring and bugfixes. --- app/views/call_routes/_index_core.html.haml | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'app/views/call_routes') diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index 9eae9ee..b6c5d33 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -1,31 +1,31 @@ -/ - cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do -%table.table.table-striped{ :id => "call_routes" } - %thead - %tr - %th - %th= t('call_routes.index.name') - %th= t('route_elements.index.pattern') - %th= t('call_routes.index.endpoint') +- cache(['call_routes_table', I18n.locale, call_routes.count, call_routes.reorder(:updated_at).last]) do + %table.table.table-striped + %thead + %tr + %th + %th= t('call_routes.index.name') + %th= t('route_elements.index.pattern') + %th= t('call_routes.index.endpoint') - %tbody - - for call_route in call_routes - / - cache(['call_route_single_table_row', call_route, call_routes.count]) do - = content_tag_for :tr, call_route do - %td - %span.handle - %i.icon-resize-vertical - %td= call_route.name - %td - - if call_route.route_elements.any? - = call_route.route_elements.first.pattern - - if call_route.route_elements.count > 1 - = ', ...' - - else - = '-' - %td - - endpoint = call_route.endpoint - - if endpoint - = endpoint - - else - = call_route.endpoint_type - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} + %tbody{ :id => "call_routes", :'data-update-url' => sort_call_routes_url} + - for call_route in call_routes + - cache(['call_route_single_table_row', I18n.locale, call_route]) do + = content_tag_for :tr, call_route do + %td + %span.handle + %i.icon-resize-vertical + %td= call_route.name + %td + - if call_route.route_elements.any? + = call_route.route_elements.first.pattern + - if call_route.route_elements.count > 1 + = ', ...' + - else + = '-' + %td + - endpoint = call_route.endpoint + - if endpoint + = endpoint + - else + = call_route.endpoint_type + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} -- cgit v1.2.3 From bcce809c6e628fb7c067437e98a5195c5e228532 Mon Sep 17 00:00:00 2001 From: spag Date: Tue, 5 Feb 2013 13:58:58 +0100 Subject: show dialplan variables --- app/views/call_routes/show_variables.html.haml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/views/call_routes/show_variables.html.haml (limited to 'app/views/call_routes') diff --git a/app/views/call_routes/show_variables.html.haml b/app/views/call_routes/show_variables.html.haml new file mode 100644 index 0000000..4bec39d --- /dev/null +++ b/app/views/call_routes/show_variables.html.haml @@ -0,0 +1,13 @@ +%h3= 'Channel Variables' + +%table.table.table-striped + %thead + %tr + %th= 'Variable' + %th= 'Value' + + %tbody{ :id => "show_variables" } + - @channel_variables.each do |key, value| + %tr + %td= key + %td= value.gsub(/\n/, '
').html_safe -- cgit v1.2.3 From e497de90ccf55b3cbec1de7890e20220fa8e603f Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 9 Feb 2013 10:27:24 +0100 Subject: call_route xml view added --- app/views/call_routes/show.xml.haml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 app/views/call_routes/show.xml.haml (limited to 'app/views/call_routes') diff --git a/app/views/call_routes/show.xml.haml b/app/views/call_routes/show.xml.haml new file mode 100644 index 0000000..5800816 --- /dev/null +++ b/app/views/call_routes/show.xml.haml @@ -0,0 +1,5 @@ +!!! XML +%call_route{ :name => @call_route.name, :routing_table => @call_route.routing_table, :position => @call_route.position, :endpoint => @call_route.endpoint, :endpoint_type => @call_route.endpoint_type } + %route_elements{ :count => @call_route.route_elements.count } + - @call_route.route_elements.each do |route_element| + %route_element{ :var_in => route_element.var_in, :var_out => route_element.var_out, :pattern => route_element.pattern, :replacement => route_element.replacement, :action => route_element.action, :mandatory => route_element.mandatory.to_s, :position => route_element.position } -- cgit v1.2.3 From cc4dda2b37119e1364cf0a5362aedfae639bcbc7 Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 9 Feb 2013 11:12:57 +0100 Subject: duplicate ids fixed --- app/views/call_routes/_index_core.html.haml | 2 +- app/views/call_routes/index.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views/call_routes') diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index b6c5d33..6f2eadd 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -7,7 +7,7 @@ %th= t('route_elements.index.pattern') %th= t('call_routes.index.endpoint') - %tbody{ :id => "call_routes", :'data-update-url' => sort_call_routes_url} + %tbody{ :id => "call_routes_#{routing_table}", :'data-update-url' => sort_call_routes_url} - for call_route in call_routes - cache(['call_route_single_table_row', I18n.locale, call_route]) do = content_tag_for :tr, call_route do diff --git a/app/views/call_routes/index.html.haml b/app/views/call_routes/index.html.haml index d5181e3..0108322 100644 --- a/app/views/call_routes/index.html.haml +++ b/app/views/call_routes/index.html.haml @@ -3,6 +3,6 @@ - if @call_routes && @call_routes.any? - @routing_tables.each do |routing_table| %h3= routing_table - = render "index_core", :call_routes => @call_routes.where(:routing_table => routing_table) + = render "index_core", :call_routes => @call_routes.where(:routing_table => routing_table), :routing_table => routing_table = render :partial => 'shared/create_link', :locals => {:child_class => CallRoute} -- cgit v1.2.3 From 5fba89e83722e11232b1130a1a939d55aed94387 Mon Sep 17 00:00:00 2001 From: spag Date: Sat, 9 Feb 2013 11:24:36 +0100 Subject: multiple css ids bug fixed --- app/views/call_routes/_index_core.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/call_routes') diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index 6f2eadd..a62a9c4 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -7,7 +7,7 @@ %th= t('route_elements.index.pattern') %th= t('call_routes.index.endpoint') - %tbody{ :id => "call_routes_#{routing_table}", :'data-update-url' => sort_call_routes_url} + %tbody{ :class => "call_routes", :id => "call_routes_#{routing_table}", :'data-update-url' => sort_call_routes_url} - for call_route in call_routes - cache(['call_route_single_table_row', I18n.locale, call_route]) do = content_tag_for :tr, call_route do -- cgit v1.2.3 From aa5a2b806d117ffde9888e282c7100066156d94b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 12 Feb 2013 12:46:36 +0100 Subject: Misc I18n and GUI improvements. --- app/views/call_routes/show.html.haml | 47 +++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'app/views/call_routes') diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml index a33a29b..998558e 100644 --- a/app/views/call_routes/show.html.haml +++ b/app/views/call_routes/show.html.haml @@ -1,26 +1,33 @@ - content_for :title, t("call_routes.show.page_title") -%p - %strong= t('call_routes.show.position') + ":" - = @call_route.position -%p - %strong= t('call_routes.show.table') + ":" - = @call_route.routing_table -%p - %strong= t('call_routes.show.name') + ":" - = @call_route.name -%p - %strong= t('call_routes.show.endpoint') + ":" - - endpoint = @call_route.endpoint - - if endpoint - = endpoint - - else - = @call_route.endpoint_type +.row + .span5 + %table.table.table-striped + %tr + %td + %strong= t('call_routes.show.table') + ":" + %td + = @call_route.routing_table + %tr + %td + %strong= t('call_routes.show.name') + ":" + %td + = @call_route.name + %tr + %td + %strong= t('call_routes.show.endpoint') + ":" + %td + - if @call_route.endpoint.blank? + = @call_route.endpoint_type + - else + = @call_route.endpoint = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route } -%h3= t('route_elements.index.page_title') -- if @call_route.route_elements && @call_route.route_elements.count > 0 - = render "route_elements/index_core", :route_elements => @call_route.route_elements +.row + .span12 + %h3= t('route_elements.index.page_title') + - if @call_route.route_elements && @call_route.route_elements.count > 0 + = render "route_elements/index_core", :route_elements => @call_route.route_elements -= render :partial => 'shared/create_link', :locals => { :parent => @call_route, :child_class => RouteElement } + = render :partial => 'shared/create_link', :locals => { :parent => @call_route, :child_class => RouteElement } -- cgit v1.2.3 From f8f35f666613eff24d3988bda1a22cc40ef2ab30 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 12 Feb 2013 13:26:30 +0100 Subject: Make the call_elements table sortable by drag and drop. --- app/views/call_routes/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/call_routes') diff --git a/app/views/call_routes/show.html.haml b/app/views/call_routes/show.html.haml index 998558e..7c695c8 100644 --- a/app/views/call_routes/show.html.haml +++ b/app/views/call_routes/show.html.haml @@ -22,7 +22,7 @@ - else = @call_route.endpoint -= render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route } + = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route } .row .span12 -- cgit v1.2.3