diff options
| author | Michel Etienne | 2012-08-27 08:43:42 +0200 |
|---|---|---|
| committer | Michel Etienne | 2012-08-27 08:43:42 +0200 |
| commit | 12bc9121ed81545fae10c9f5c23359fc64b78f2b (patch) | |
| tree | b117fd3298a7f15ba75a6a8eec688ed68702a50b | |
| parent | 31179c6c8b309a076a2ccee380522beb845a7a6e (diff) | |
| download | chouette-core-12bc9121ed81545fae10c9f5c23359fc64b78f2b.tar.bz2 | |
hide reorder button when no stops in route
| -rw-r--r-- | app/views/stop_points/index.html.erb | 6 |
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> |
