aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Florisson2012-09-06 10:31:18 +0200
committerMarc Florisson2012-09-06 10:31:18 +0200
commit65f44388bd45b3d996e527e2abd19f4543aa00a7 (patch)
tree9f02c07b456e09d45c7927625ae9cc8f27e282c1
parent09500773ee2bdb67719ffa0a6e529107a7cfc663 (diff)
parenta54aa55e7d435ff0974c15723038278009a69683 (diff)
downloadchouette-core-65f44388bd45b3d996e527e2abd19f4543aa00a7.tar.bz2
Merge branch 'master' of chouette.dryade.priv:/srv/git/chouette2
-rw-r--r--Gemfile.lock3
-rw-r--r--app/views/journey_patterns/show.html.erb4
-rw-r--r--app/views/routes/_route.html.erb8
-rw-r--r--app/views/routes/show.html.erb7
-rw-r--r--config/locales/routes.yml12
-rw-r--r--config/locales/stop_points.yml3
6 files changed, 32 insertions, 5 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index e8929de66..5af91e2b9 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: git://chouette.dryade.priv/ninoxe
- revision: 55d3c3c3f8dde90dc1b30224cefbe679a4ee9786
+ revision: ddc6b0f9adfb2df8aa2b521d6a749c229977383c
specs:
ninoxe (0.0.8)
GeoRuby
@@ -195,7 +195,6 @@ GEM
jruby-rack (1.1.9)
jruby-rack-worker (0.4-java)
jruby-rack (>= 1.1.1)
- json (1.7.5)
json (1.7.5-java)
json_pure (1.7.5)
launchy (2.1.0)
diff --git a/app/views/journey_patterns/show.html.erb b/app/views/journey_patterns/show.html.erb
index 507a71cca..149f9df6a 100644
--- a/app/views/journey_patterns/show.html.erb
+++ b/app/views/journey_patterns/show.html.erb
@@ -5,6 +5,10 @@
<div class="summary">
<p>
+ <label><%= @route.human_attribute_name(:line) %>: </label>
+ <%= link_to line_formatted_name( @line), [@referential, @line] %>
+ </p>
+ <p>
<label><%= @journey_pattern.human_attribute_name(:route) %>: </label>
<%= link_to @route.name, [@referential, @line, @route] %>
</p>
diff --git a/app/views/routes/_route.html.erb b/app/views/routes/_route.html.erb
index e99f418b1..416a032ea 100644
--- a/app/views/routes/_route.html.erb
+++ b/app/views/routes/_route.html.erb
@@ -10,10 +10,16 @@
<% if route.direction.blank? %>
<%= route.human_attribute_name('direction') %> <%= route.direction %> -
<% end %>
- <%= route.human_attribute_name('wayback_code') %> <%= (route.wayback=="A") ? t('route.wayback.positive') : t('wayback.negative') %>
+ <%= route.human_attribute_name('wayback_code') %> <%= (route.wayback=="A") ? t('.wayback.positive') : t('.wayback.negative') %>
+ <% if route.journey_patterns.size > 0 %>
<div class="actions">
<%= link_to t("vehicle_journeys.actions.index"), referential_line_route_vehicle_journeys_path(@referential, @line, route), :class => "link" %>
</div>
+ <% else %>
+ <div class="actions">
+ <%= t('.no_journey_pattern')%>
+ </div>
+ <% end%>
</div>
<% end %>
diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb
index 970ab7981..ad2ba73b4 100644
--- a/app/views/routes/show.html.erb
+++ b/app/views/routes/show.html.erb
@@ -65,7 +65,7 @@
</div>
<p class="after_map" />
- <h3 class="route_stop_points">
+<h3 class="route_stop_points">
<a class="stop_points"><%= t('.stop_points') %>
<%= image_tag("icons/plus.png" , :class => "switcher") %>
<%= image_tag("icons/minus.png" , :class => "switcher" , :style => "display: none;") %>
@@ -85,6 +85,7 @@
<%= render :partial => "journey_patterns/journey_pattern", :collection => @route.journey_patterns %>
</div>
+
<% content_for :sidebar do %>
<ul class="actions">
<li><%= link_to t('routes.actions.edit'), edit_referential_line_route_path(@referential, @line, @route), :class => "edit" %></li>
@@ -92,12 +93,16 @@
<li>
<%= link_to t('stop_points.actions.sort'), [@referential, @line, @route, :stop_points], :class => "edit" %>
</li>
+<% if @route.stop_points.size >= 2 %>
<li>
<%= link_to t('journey_patterns.actions.new'), new_referential_line_route_journey_pattern_path(@referential, @line, @route), :class => "add" %>
</li>
+<% end %>
+<% if @route.journey_patterns.size > 0 %>
<li>
<%= link_to t('vehicle_journeys.actions.index'), [@referential, @line, @route, :vehicle_journeys], :class => "link" %>
</li>
+<% end %>
</ul>
<% end %>
diff --git a/config/locales/routes.yml b/config/locales/routes.yml
index 36de61539..7cba2523a 100644
--- a/config/locales/routes.yml
+++ b/config/locales/routes.yml
@@ -19,6 +19,12 @@ en:
title: Routes
selection: Selection
selection_all: All
+ route:
+ no_journey_pattern: No Journey pattern
+ wayback:
+ positive: forward
+ negative: backward
+
activerecord:
models:
route:
@@ -66,6 +72,11 @@ fr:
title: "Séquences d'arrêts"
selection: Sélection
selection_all: Tous
+ route:
+ no_journey_pattern: Pas de mission
+ wayback:
+ positive: Aller
+ negative: Retour
activerecord:
models:
route:
@@ -91,5 +102,6 @@ fr:
object_version: Version
creation_time: Créé le
creator_id: Créé par
+ no_journey_pattern: Pas de mission
diff --git a/config/locales/stop_points.yml b/config/locales/stop_points.yml
index d40ef7873..cea5debcf 100644
--- a/config/locales/stop_points.yml
+++ b/config/locales/stop_points.yml
@@ -27,7 +27,7 @@ en:
other: stop points on route
attributes:
stop_point:
-
+ lines: lines
fr:
stop_points:
reorder_success: "La list des arrêts a été mise à jour"
@@ -57,3 +57,4 @@ fr:
other: "arrêts sur séquence d'arrêts"
attributes:
stop_point:
+ lines: lignes