From 8fdc1332bbff9c23400459dc7018cba147279cc5 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 22 Jan 2013 21:21:49 +0100 Subject: Added %thead and %tbody to the tables. --- app/views/call_routes/_index_core.html.haml | 39 +++++++++++++++-------------- 1 file changed, 20 insertions(+), 19 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 5dc7c21..a665b5d 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -1,21 +1,22 @@ - cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do %table{:class => 'table table-striped'} - %tr - %th= t('call_routes.index.name') - %th= t('route_elements.index.pattern') - %th= t('call_routes.index.endpoint_type') - %th{:colspan => '3'} - - - for call_route in call_routes - - cache(['call_route_single_table_row', call_route, call_routes.count]) do - %tr - %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= call_route.endpoint_type - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} \ No newline at end of file + %thead + %tr + %th= t('call_routes.index.name') + %th= t('route_elements.index.pattern') + %th= t('call_routes.index.endpoint_type') + + %tbody + - for call_route in call_routes + - cache(['call_route_single_table_row', call_route, call_routes.count]) do + %tr + %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= call_route.endpoint_type + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} \ No newline at end of file -- cgit v1.2.3 From 680073d4cf7619bddfb7f79ea9e538a33d9dcdee Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 26 Jan 2013 20:11:45 +0100 Subject: Refactoring --- 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 a665b5d..2e9238e 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -1,5 +1,5 @@ - cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do - %table{:class => 'table table-striped'} + %table.table.table-striped %thead %tr %th= t('call_routes.index.name') diff --git a/app/views/call_routes/index.html.haml b/app/views/call_routes/index.html.haml index bd4468c..488e1c7 100644 --- a/app/views/call_routes/index.html.haml +++ b/app/views/call_routes/index.html.haml @@ -1,7 +1,7 @@ - content_for :title, t("call_routes.index.page_title") - if @call_routes && @call_routes.count > 0 - %table{:class => 'table table-striped'} + %table.table.table-striped - @routing_tables.each do |routing_table| %tr %td{:colspan => 3} -- cgit v1.2.3 From 29ac1a26b5d78c3d8570928df73610de0a361297 Mon Sep 17 00:00:00 2001 From: spag Date: Mon, 28 Jan 2013 09:26:47 +0100 Subject: render route endpoint --- app/views/call_routes/_index_core.html.haml | 11 ++++++++--- app/views/call_routes/show.html.haml | 11 ++++++----- 2 files changed, 14 insertions(+), 8 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 2e9238e..f0acebb 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -4,7 +4,7 @@ %tr %th= t('call_routes.index.name') %th= t('route_elements.index.pattern') - %th= t('call_routes.index.endpoint_type') + %th= t('call_routes.index.endpoint') %tbody - for call_route in call_routes @@ -18,5 +18,10 @@ = ', ...' - else = '-' - %td= call_route.endpoint_type - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} \ No newline at end of file + %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/show.html.haml b/app/views/call_routes/show.html.haml index 70fe13e..09daf53 100644 --- a/app/views/call_routes/show.html.haml +++ b/app/views/call_routes/show.html.haml @@ -7,11 +7,12 @@ %strong= t('call_routes.show.name') + ":" = @call_route.name %p - %strong= t('call_routes.show.endpoint_type') + ":" - = @call_route.endpoint_type -%p - %strong= t('call_routes.show.endpoint_id') + ":" - = @call_route.endpoint_id + %strong= t('call_routes.show.endpoint') + ":" + - endpoint = @call_route.endpoint + - if endpoint + = endpoint + - else + = @call_route.endpoint_type = render :partial => 'shared/show_edit_destroy_part', :locals => { :child => @call_route } -- cgit v1.2.3