aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Etienne2012-08-27 08:43:42 +0200
committerMichel Etienne2012-08-27 08:43:42 +0200
commit12bc9121ed81545fae10c9f5c23359fc64b78f2b (patch)
treeb117fd3298a7f15ba75a6a8eec688ed68702a50b
parent31179c6c8b309a076a2ccee380522beb845a7a6e (diff)
downloadchouette-core-12bc9121ed81545fae10c9f5c23359fc64b78f2b.tar.bz2
hide reorder button when no stops in route
-rw-r--r--app/views/stop_points/index.html.erb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/stop_points/index.html.erb b/app/views/stop_points/index.html.erb
index 486aefb5f..0204ea67a 100644
--- a/app/views/stop_points/index.html.erb
+++ b/app/views/stop_points/index.html.erb
@@ -27,8 +27,10 @@
<input type="hidden" id="<%= "pos_#{sp.position}" %>" name="stop_point[]" value="<%= sp.id %>" />
<% end %>
<%= form.actions do %>
- <%= form.action :submit, :as => :button, :label => t('.reorder_button') %>
- <%= form.action :cancel, :as => :link , :url => referential_line_route_stop_points_path(@referential, @line, @route) %>
+ <% if !@stop_points.empty? %>
+ <%= form.action :submit, :as => :button, :label => t('.reorder_button') %>
+ <%= form.action :cancel, :as => :link , :url => referential_line_route_stop_points_path(@referential, @line, @route) %>
+ <% end %>
<% end %>
<% end %>
</div>