aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/vehicle_journeys
diff options
context:
space:
mode:
authorVlatka Pavisic2017-02-06 11:42:12 +0100
committerVlatka Pavisic2017-02-07 11:25:29 +0100
commitd94b1271d147fdb5bbd1e616e116173198e858db (patch)
treee1b5631e72e009ffd80fdf4e47159b2b11cd899e /app/views/vehicle_journeys
parent9c3095c20aaef122212ed71ce8818e3a18b13308 (diff)
downloadchouette-core-d94b1271d147fdb5bbd1e616e116173198e858db.tar.bz2
Refs #2476 : Disable modification and deletion of resources from another referential; in progress
Diffstat (limited to 'app/views/vehicle_journeys')
-rw-r--r--app/views/vehicle_journeys/_show_sidebar.html.slim2
-rw-r--r--app/views/vehicle_journeys/_sidebar.html.slim2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/vehicle_journeys/_show_sidebar.html.slim b/app/views/vehicle_journeys/_show_sidebar.html.slim
index 44d5f8233..ca7e140bc 100644
--- a/app/views/vehicle_journeys/_show_sidebar.html.slim
+++ b/app/views/vehicle_journeys/_show_sidebar.html.slim
@@ -1,7 +1,7 @@
- content_for :sidebar do
ul.actions
li
- - if policy(@vehicle_journey).create?
+ - if policy(@vehicle_journey).create? && @vehicle_journey.referential.organisation == current_organisation
= link_to t('vehicle_journeys.actions.new'), new_referential_line_route_vehicle_journey_path(@referential, @line, @route), class: "add"
li = link_to t('vehicle_journeys.actions.new_frequency'), new_referential_line_route_vehicle_journey_frequency_path(@referential, @line, @route), class: "add"
li
diff --git a/app/views/vehicle_journeys/_sidebar.html.slim b/app/views/vehicle_journeys/_sidebar.html.slim
index 187de1b08..e0a07d6e4 100644
--- a/app/views/vehicle_journeys/_sidebar.html.slim
+++ b/app/views/vehicle_journeys/_sidebar.html.slim
@@ -1,6 +1,6 @@
ul.actions
li
- - if policy(Chouette::VehicleJourney).create?
+ - if policy(Chouette::VehicleJourney).create? && @referential.organisation == current_organisation
= link_to t('vehicle_journeys.actions.new'), new_referential_line_route_vehicle_journey_path(@referential, @line, @route), class: "add"
li
= link_to t('vehicle_journeys.actions.new_frequency'), new_referential_line_route_vehicle_journey_frequency_path(@referential, @line, @route), class: "add"