diff options
| author | Marc Florisson | 2013-05-06 15:19:02 +0200 |
|---|---|---|
| committer | Marc Florisson | 2013-05-06 15:19:02 +0200 |
| commit | bb36732ddfad9c587c042f4a76ea0e3ada87cab2 (patch) | |
| tree | e07096cb5ed0dcd0a5b50b27f60df707bb36e7d9 | |
| parent | 8c35f17d98684b63be1cfdefa28deab1bfdc3f43 (diff) | |
| download | chouette-core-bb36732ddfad9c587c042f4a76ea0e3ada87cab2.tar.bz2 | |
fix lines/_route partial for Route without wayback. Refs #134
| -rw-r--r-- | app/views/routes/_route.html.erb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/views/routes/_route.html.erb b/app/views/routes/_route.html.erb index 2c6e810fa..be5bbeb2b 100644 --- a/app/views/routes/_route.html.erb +++ b/app/views/routes/_route.html.erb @@ -1,5 +1,7 @@ <%= div_for(route) do %> - <%= link_to image_tag("icons/#{route.wayback}.png"), referential_line_route_path( @referential, @line, route) %> + <% if ( route.wayback_code ) %> + <%= link_to image_tag("icons/#{route.wayback}.png"), referential_line_route_path( @referential, @line, route) %> + <% end %> <div> <%= link_to route.name, referential_line_route_path( @referential, @line, route) %> </div> @@ -10,8 +12,12 @@ <% if ! route.direction.blank? %> <%= route.human_attribute_name('direction_code') %> <%= t('directions.label.'+route.direction_code) %> - <% end %> - <%= route.human_attribute_name('wayback_code') %> <%= (route.wayback=="A") ? t('.wayback.positive') : t('.wayback.negative') %> - <br/> + <% if route.wayback_code %> + <%= route.human_attribute_name('wayback_code') %> <%= (route.wayback=="A") ? t('.wayback.positive') : t('.wayback.negative') %> + <% end %> + <% if route.wayback_code || (not route.direction.blank?) || ( not route.number.blank?) %> + <br/> + <% end %> <% if route.opposite_route %> <%= t('.opposite') %> <%= link_to route.opposite_route.name, referential_line_route_path( @referential, @line, route.opposite_route) %> <% else %> |
