aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/referential_stop_areas_controller.rb5
-rw-r--r--app/views/referential_stop_areas/show.html.slim14
2 files changed, 10 insertions, 9 deletions
diff --git a/app/controllers/referential_stop_areas_controller.rb b/app/controllers/referential_stop_areas_controller.rb
index 4d33ebb2e..7519418e7 100644
--- a/app/controllers/referential_stop_areas_controller.rb
+++ b/app/controllers/referential_stop_areas_controller.rb
@@ -72,13 +72,16 @@ class ReferentialStopAreasController < ChouetteController
def show
map.editable = false
@access_points = @stop_area.access_points
+
show! do |format|
unless stop_area.position or params[:default] or params[:routing]
format.kml {
render :nothing => true, :status => :not_found
}
-
end
+
+ @stop_area = @stop_area.decorate
+
build_breadcrumb :show
end
end
diff --git a/app/views/referential_stop_areas/show.html.slim b/app/views/referential_stop_areas/show.html.slim
index 7932b6c2e..d594665f7 100644
--- a/app/views/referential_stop_areas/show.html.slim
+++ b/app/views/referential_stop_areas/show.html.slim
@@ -5,14 +5,12 @@
.row
.col-lg-12.text-right.mb-sm
- - if policy(Chouette::StopArea).new?
- = link_to t('stop_areas.actions.new'), new_stop_area_referential_stop_area_path(@stop_area_referential), class: 'btn btn-primary'
- - if policy(@stop_area).update?
- = link_to t('stop_areas.actions.edit'), edit_stop_area_referential_stop_area_path(@stop_area_referential, @stop_area), class: 'btn btn-primary'
- - if policy(@stop_area).destroy?
- = link_to stop_area_referential_stop_area_path(@stop_area_referential, @stop_area), method: :delete, data: {confirm: t('stop_areas.actions.destroy_confirm')}, class: 'btn btn-primary' do
- span.fa.fa-trash
- span = t('stop_areas.actions.destroy')
+ - @stop_area.action_links.each do |link|
+ = link_to link.href,
+ method: link.method,
+ data: link.data,
+ class: 'btn btn-primary' do
+ = link.content
/ PageContent
.page_content