diff options
| author | jpl | 2017-06-06 15:59:39 +0200 |
|---|---|---|
| committer | jpl | 2017-06-06 15:59:39 +0200 |
| commit | 280cc337c7d2eb3d5e7457d0399e4f0ee5cdb2aa (patch) | |
| tree | ff76211b493de1c1c8a350447485e69f2d535e9d /app/views | |
| parent | 6e6a2158f88e0a4e8973cb8e098e92b444aecf77 (diff) | |
| download | chouette-core-280cc337c7d2eb3d5e7457d0399e4f0ee5cdb2aa.tar.bz2 | |
Refs #3488: updating itl#show
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/referential_lines/show.html.slim | 8 | ||||
| -rw-r--r-- | app/views/routing_constraint_zones/index.html.slim | 2 | ||||
| -rw-r--r-- | app/views/routing_constraint_zones/show.html.slim | 44 |
3 files changed, 36 insertions, 18 deletions
diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim index 43a70dfb5..db99381d3 100644 --- a/app/views/referential_lines/show.html.slim +++ b/app/views/referential_lines/show.html.slim @@ -1,7 +1,7 @@ / PageHeader = pageheader 'map-marker', @line.name, - 'Lorem ipsum dolor sit amet', + '', t('last_update', time: l(@line.updated_at, format: :short)) do / Below is secundary actions & optional contents @@ -11,13 +11,13 @@ = link_to t('routing_constraint_zones.index.title'), referential_line_routing_constraint_zones_path(@referential, @line), class: 'btn btn-primary' - if policy(Chouette::Line).create? && @referential.organisation == current_organisation - = link_to t('lines.actions.new'), new_referential_line_path(@referential), class: 'btn btn-primary' + = link_to t('actions.new'), new_referential_line_path(@referential), class: 'btn btn-primary' - if policy(@line).update? - = link_to t('lines.actions.edit'), edit_referential_line_path(@referential, @line), class: 'btn btn-primary' + = link_to t('actions.edit'), edit_referential_line_path(@referential, @line), class: 'btn btn-primary' - if policy(@line).destroy? = link_to referential_line_path(@referential, @line), method: :delete, data: {confirm: t('lines.actions.destroy_confirm')}, class: 'btn btn-primary' do span.fa.fa-trash - span = t('lines.actions.destroy') + span = t('actions.destroy') - if !@line.hub_restricted? || (@line.hub_restricted? && @line.routes.size < 2) - if policy(Chouette::Route).create? && @referential.organisation == current_organisation diff --git a/app/views/routing_constraint_zones/index.html.slim b/app/views/routing_constraint_zones/index.html.slim index 83d4b47c3..248efedb4 100644 --- a/app/views/routing_constraint_zones/index.html.slim +++ b/app/views/routing_constraint_zones/index.html.slim @@ -3,7 +3,7 @@ t('routing_constraint_zones.index.title'), '', '', - ((policy(Chouette::RoutingConstraintZone).create? && @referential.organisation == current_organisation) ? link_to(t('routing_constraint_zones.actions.new'), new_referential_line_routing_constraint_zone_path(@referential, @line), class: 'btn btn-primary') : '') + ((policy(Chouette::RoutingConstraintZone).create? && @referential.organisation == current_organisation) ? link_to(t('actions.new'), new_referential_line_routing_constraint_zone_path(@referential, @line), class: 'btn btn-primary') : '') / PageContent .page_content diff --git a/app/views/routing_constraint_zones/show.html.slim b/app/views/routing_constraint_zones/show.html.slim index 351784ecc..f0c244387 100644 --- a/app/views/routing_constraint_zones/show.html.slim +++ b/app/views/routing_constraint_zones/show.html.slim @@ -1,17 +1,35 @@ -= title_tag @routing_constraint_zone.name +/ PageHeader += pageheader 'map-marker', + @routing_constraint_zone.name, + '', + t('last_update', time: l(@routing_constraint_zone.updated_at, format: :short)) do -p - label => "#{@routing_constraint_zone.human_attribute_name(:name)} : " - = @routing_constraint_zone.name + / Below is secundary actions & optional contents + .row + .col-lg-12.text-right.mb-sm + - if policy(@routing_constraint_zone).update? + = link_to t('actions.edit'), edit_referential_line_routing_constraint_zone_path(@referential, @line, @routing_constraint_zone), class: 'btn btn-primary' -p - label => "#{Chouette::Route.model_name.human.capitalize} : " - = link_to @routing_constraint_zone.route.name, referential_line_route_path(@referential, @line, @routing_constraint_zone.route) + - if policy(@routing_constraint_zone).destroy? + = link_to referential_line_routing_constraint_zone_path(@referential, @line, @routing_constraint_zone), method: :delete, data: {confirm: t('routing_constraint_zones.actions.destroy_confirm')}, class: 'btn btn-primary' do + span.fa.fa-trash + span = t('actions.destroy') -p - label => "#{Chouette::StopPoint.model_name.human.pluralize.capitalize} : " - br - - @routing_constraint_zone.stop_points.each do |stop_point| - = link_to stop_point.name, referential_stop_area_path(@referential, stop_point.stop_area) - br +/ PageContent +.page_content + .container-fluid + .row + .col-lg-6.col-md-6.col-sm-12.col-xs-12 + = definition_list t('metadatas'), + { @routing_constraint_zone.human_attribute_name(:name) => @routing_constraint_zone.try(:name), + @routing_constraint_zone.human_attribute_name(:route) => link_to(@routing_constraint_zone.try(:route_name), [@referential, @line, @routing_constraint_zone.route]), + @routing_constraint_zone.human_attribute_name(:line) => link_to(@line.name, [@referential, @line])} + .row + .col-lg-12 + = table_builder @routing_constraint_zone.route.stop_points, + { "Arrêts de l'itinéraire" => 'name', + "Arrêts inclus dans l'ITL" => Proc.new{ |rsp| (@routing_constraint_zone.stop_points.collect{|c| c.name}.include? rsp.name) ? 'Oui' : 'Non' } }, + [], + [], + 'table has-stoppoints' |
