aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/journey_patterns
diff options
context:
space:
mode:
authorMarc Florisson2012-07-09 11:38:55 +0200
committerMarc Florisson2012-07-09 11:38:55 +0200
commitc9e933013f0cc402f06bf5550c5c10643e44961e (patch)
tree75596daa26ba0a58f7f4ea917615993590a46441 /app/views/journey_patterns
parentea483438db92d2d8c46717e2fc20ea1417e2c4b6 (diff)
downloadchouette-core-c9e933013f0cc402f06bf5550c5c10643e44961e.tar.bz2
add links to journey pattern's vehicle journeys. Refs #84
Diffstat (limited to 'app/views/journey_patterns')
-rw-r--r--app/views/journey_patterns/_journey_pattern.html.erb3
-rw-r--r--app/views/journey_patterns/show.html.erb1
2 files changed, 4 insertions, 0 deletions
diff --git a/app/views/journey_patterns/_journey_pattern.html.erb b/app/views/journey_patterns/_journey_pattern.html.erb
index 41a898888..bf0f84fb1 100644
--- a/app/views/journey_patterns/_journey_pattern.html.erb
+++ b/app/views/journey_patterns/_journey_pattern.html.erb
@@ -8,6 +8,9 @@
<%= t('.vehicle_journeys_count', :count => journey_pattern.vehicle_journeys.count) %>
<div class="actions">
<%= link_to t("actions.destroy"), referential_line_route_journey_pattern_path(@referential, @line, @route, journey_pattern), :method => :delete, :confirm => t('journey_patterns.actions.destroy_confirm'), :class => "remove" %>
+ <% if journey_pattern.vehicle_journeys.count > 0 %>
+ | <%= link_to t('journey_patterns.journey_pattern.vehicle_journey_at_stops'), referential_line_route_vehicle_journeys_path(@referential, @line, @route, :q => {:journey_pattern_id_eq => journey_pattern.id}), :class => "link" %>
+ <% end %>
</div>
</div>
<% end %>
diff --git a/app/views/journey_patterns/show.html.erb b/app/views/journey_patterns/show.html.erb
index 0b9676350..9962e4d8b 100644
--- a/app/views/journey_patterns/show.html.erb
+++ b/app/views/journey_patterns/show.html.erb
@@ -57,6 +57,7 @@
<ul class="actions">
<li><%= link_to t('journey_patterns.actions.edit'), edit_referential_line_route_journey_pattern_path(@referential, @line, @route, @journey_pattern), :class => "edit" %></li>
<li><%= link_to t('journey_patterns.actions.destroy'), referential_line_route_journey_pattern_path(@referential, @line, @route, @journey_pattern), :method => :delete, :confirm => t('journey_patterns.actions.destroy_confirm'), :class => "remove" %></li>
+ <li><%= link_to t('journey_patterns.journey_pattern.vehicle_journey_at_stops'), referential_line_route_vehicle_journeys_path(@referential, @line, @route, :q => {:journey_pattern_id_eq => @journey_pattern.id}), :class => "link" %></li>
</ul>
<% end %>