aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlban Peignier2017-12-28 07:55:28 +0100
committerAlban Peignier2017-12-28 07:55:28 +0100
commite903a6439271cdab44d809dda1d8babee356524e (patch)
tree5f9b9d8b55b11a770e484682bd964cb472bb1756
parent5826d342ae08b904ed23c45fd96066a348f04596 (diff)
downloadchouette-core-e903a6439271cdab44d809dda1d8babee356524e.tar.bz2
Fixes JS features list in journey_patterns_collections#show. Refs #5407
-rw-r--r--app/controllers/journey_patterns_collections_controller.rb1
-rw-r--r--app/views/journey_patterns_collections/show.html.slim2
2 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/journey_patterns_collections_controller.rb b/app/controllers/journey_patterns_collections_controller.rb
index 736fb1441..5fe78766c 100644
--- a/app/controllers/journey_patterns_collections_controller.rb
+++ b/app/controllers/journey_patterns_collections_controller.rb
@@ -49,6 +49,7 @@ class JourneyPatternsCollectionsController < ChouetteController
end
def user_permissions
+ @features = Hash[*current_organisation.features.map{|f| [f, true]}.flatten].to_json
policy = policy(:journey_pattern)
@perms =
%w{create destroy update}.inject({}) do | permissions, action |
diff --git a/app/views/journey_patterns_collections/show.html.slim b/app/views/journey_patterns_collections/show.html.slim
index 97a62f7db..8a7b0c47c 100644
--- a/app/views/journey_patterns_collections/show.html.slim
+++ b/app/views/journey_patterns_collections/show.html.slim
@@ -17,7 +17,7 @@
| window.stopPoints = #{(@stop_points_list.to_json).html_safe};
| window.journeyPatternLength = #{@journey_patterns.total_entries()};
| window.journeyPatternsPerPage = #{@ppage};
- | window.perms = #{raw @perms}
+ | window.perms = #{raw @perms};
| window.features = #{raw @features};
= javascript_pack_tag 'journey_patterns/index.js'