diff options
| author | Michel Etienne | 2014-11-04 15:02:14 +0100 |
|---|---|---|
| committer | Michel Etienne | 2014-11-04 15:02:14 +0100 |
| commit | db89e7c94cbf7fdea3d46dcf37ac643075f79000 (patch) | |
| tree | b7903021b2058d31860db2fc351f6fe006c578db /app/views | |
| parent | 6841cc3d36990a0ed12c78f371112af9b3590f72 (diff) | |
| parent | c9fd03422743d3d716bbd7199184c035c1b0d4c9 (diff) | |
| download | chouette-core-db89e7c94cbf7fdea3d46dcf37ac643075f79000.tar.bz2 | |
Merge branch 'sismo' of github.com:afimb/chouette2 into sismo
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/api/hub/arrets_generiques.hub.erb | 2 | ||||
| -rw-r--r-- | app/views/api/hub/arrets_physiques.hub.erb | 2 | ||||
| -rw-r--r-- | app/views/api/hub/chemins.hub.erb | 2 | ||||
| -rw-r--r-- | app/views/api/hub/communes.hub.erb | 2 | ||||
| -rw-r--r-- | app/views/api/hub/directions.hub.erb | 2 | ||||
| -rw-r--r-- | app/views/api/hub/groupe_de_lignes.hub.erb | 2 | ||||
| -rw-r--r-- | app/views/api/hub/lignes.hub.erb | 2 | ||||
| -rw-r--r-- | app/views/api/hub/periodes.hub.erb | 2 | ||||
| -rw-r--r-- | app/views/api/hub/reseaux.hub.erb | 2 | ||||
| -rw-r--r-- | app/views/api/hub/transporteurs.hub.erb | 2 | ||||
| -rw-r--r-- | app/views/devise/_links.erb | 2 | ||||
| -rw-r--r-- | app/views/devise/registrations/new.html.erb | 7 | ||||
| -rw-r--r-- | app/views/exports/_export.erb | 4 | ||||
| -rw-r--r-- | app/views/exports/_exports.html.erb | 10 | ||||
| -rw-r--r-- | app/views/exports/index.js.erb | 2 | ||||
| -rw-r--r-- | app/views/group_of_lines/_form.erb | 2 | ||||
| -rw-r--r-- | app/views/import_tasks/_import_task.erb | 4 | ||||
| -rw-r--r-- | app/views/vehicle_journeys/_form.html.erb | 51 | ||||
| -rw-r--r-- | app/views/vehicle_journeys/select_journey_pattern.js.erb | 3 |
19 files changed, 49 insertions, 56 deletions
diff --git a/app/views/api/hub/arrets_generiques.hub.erb b/app/views/api/hub/arrets_generiques.hub.erb index b540130f9..00f041552 100644 --- a/app/views/api/hub/arrets_generiques.hub.erb +++ b/app/views/api/hub/arrets_generiques.hub.erb @@ -1 +1 @@ -<%= @stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @stop_area.objectid %>;<%= @stop_area.name if @stop_area.name %>;<%= @stop_area.nearest_topic_name if @stop_area.nearest_topic_name %>;<%= @type %>;;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[0].to_i : '' %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[1].to_i : '' %>;<%= @stop_area.city_name if @stop_area.city_name %>;<%= @stop_area.zip_code if @stop_area.zip_code %>;<%= @stop_area.comment if @stop_area.comment %>;<%= "\u000D\u000A" %>
\ No newline at end of file +<%= @stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @stop_area.objectid %>;<%= @stop_area.name.encode(Encoding::ISO_8859_1) if @stop_area.name %>;<%= @stop_area.nearest_topic_name.encode(Encoding::ISO_8859_1) if @stop_area.nearest_topic_name %>;<%= @type %>;;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[0].to_i : '' %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[1].to_i : '' %>;<%= @stop_area.city_name.encode(Encoding::ISO_8859_1) if @stop_area.city_name %>;<%= @stop_area.zip_code if @stop_area.zip_code %>;<%= @stop_area.comment.encode(Encoding::ISO_8859_1) if @stop_area.comment %>;<%= "\u000D\u000A" %>
\ No newline at end of file diff --git a/app/views/api/hub/arrets_physiques.hub.erb b/app/views/api/hub/arrets_physiques.hub.erb index a69047882..02cb11238 100644 --- a/app/views/api/hub/arrets_physiques.hub.erb +++ b/app/views/api/hub/arrets_physiques.hub.erb @@ -1 +1 @@ -<%= @stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @stop_area.objectid %>;<%= @stop_area.name if @stop_area.name %>;<%= @stop_area.nearest_topic_name if @stop_area.nearest_topic_name %>;<%= @type %>;<%= @parent.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @parent %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[0].to_i : -1 %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[1].to_i : -1 %>;<%= @stop_area.city_name if @stop_area.city_name %>;<%= @stop_area.zip_code if @stop_area.zip_code %>;<%= @stop_area.comment if @stop_area.comment %>;<%= @stop_area.registration_number %><%= "\u000D\u000A" %>
\ No newline at end of file +<%= @stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @stop_area.objectid %>;<%= @stop_area.name.encode(Encoding::ISO_8859_1) if @stop_area.name %>;<%= @stop_area.nearest_topic_name.encode(Encoding::ISO_8859_1) if @stop_area.nearest_topic_name %>;<%= @type %>;<%= @parent.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @parent %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[0].to_i : -1 %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[1].to_i : -1 %>;<%= @stop_area.city_name.encode(Encoding::ISO_8859_1) if @stop_area.city_name %>;<%= @stop_area.zip_code if @stop_area.zip_code %>;<%= @stop_area.comment.encode(Encoding::ISO_8859_1) if @stop_area.comment %>;<%= @stop_area.registration_number %><%= "\u000D\u000A" %>
\ No newline at end of file diff --git a/app/views/api/hub/chemins.hub.erb b/app/views/api/hub/chemins.hub.erb index 2a4235db9..f5408c51f 100644 --- a/app/views/api/hub/chemins.hub.erb +++ b/app/views/api/hub/chemins.hub.erb @@ -1 +1 @@ -<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern.objectid %>;<%= @journey_pattern.registration_number if @journey_pattern.registration_number %>;<%= @journey_pattern.name if @journey_pattern.name %>;<%= (@journey_pattern.route.wayback == 'A' ? 1 : 2) if @journey_pattern.route %>;<%= @type %>;<% @stop_areas.each do |s| %>;<%= s.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if s.objectid %>;<%= s.registration_number %>;;<% end %><%= "\u000D\u000A" %>
\ No newline at end of file +<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern.objectid %>;<%= @journey_pattern.registration_number if @journey_pattern.registration_number %>;<%= @journey_pattern.name.encode(Encoding::ISO_8859_1) if @journey_pattern.name %>;<%= (@journey_pattern.route.wayback == 'A' ? 1 : 2) if @journey_pattern.route %>;<%= @type %>;<% @stop_areas.each do |s| %>;<%= s.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if s.objectid %>;<%= s.registration_number %>;;<% end %><%= "\u000D\u000A" %>
\ No newline at end of file diff --git a/app/views/api/hub/communes.hub.erb b/app/views/api/hub/communes.hub.erb index 714969301..265271c54 100644 --- a/app/views/api/hub/communes.hub.erb +++ b/app/views/api/hub/communes.hub.erb @@ -1 +1 @@ -<%= @city_code %>;<%= @city_name %><%= "\u000D\u000A" %>
\ No newline at end of file +<%= @city_code %>;<%= @city_name.encode(Encoding::ISO_8859_1) if @city_name %><%= "\u000D\u000A" %>
\ No newline at end of file diff --git a/app/views/api/hub/directions.hub.erb b/app/views/api/hub/directions.hub.erb index f7ae19781..dd069968d 100644 --- a/app/views/api/hub/directions.hub.erb +++ b/app/views/api/hub/directions.hub.erb @@ -1 +1 @@ -<%= @direction.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @direction %>;<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= (@journey_pattern.route.wayback == 'A' ? 1 : 2) if @journey_pattern.route %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern.objectid %><%= "\u000D\u000A" %>
\ No newline at end of file +<%= @journey_pattern.name.encode(Encoding::ISO_8859_1) if @journey_pattern.name %>;<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= (@journey_pattern.route.wayback == 'A' ? 1 : 2) if @journey_pattern.route %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern.objectid %><%= "\u000D\u000A" %>
\ No newline at end of file diff --git a/app/views/api/hub/groupe_de_lignes.hub.erb b/app/views/api/hub/groupe_de_lignes.hub.erb index 7f7e24abc..2547c1e11 100644 --- a/app/views/api/hub/groupe_de_lignes.hub.erb +++ b/app/views/api/hub/groupe_de_lignes.hub.erb @@ -1 +1 @@ -<%= @group_of_lines.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @group_of_lines.name %>;<%= @group_of_lines.id %><%= "\u000D\u000A" %>
\ No newline at end of file +<%= @group_of_lines.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @group_of_lines.name.encode(Encoding::ISO_8859_1) if @group_of_lines.name %>;<%= @group_of_lines.id %><%= "\u000D\u000A" %>
\ No newline at end of file diff --git a/app/views/api/hub/lignes.hub.erb b/app/views/api/hub/lignes.hub.erb index 312d45e1c..921eb7056 100644 --- a/app/views/api/hub/lignes.hub.erb +++ b/app/views/api/hub/lignes.hub.erb @@ -1 +1 @@ -<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line.objectid %>;<%= @line.number %>;<%= @line.name %>;;;<%= @company.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @company %>;<%= @network.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @network %>;<%= @group_of_line %>;<%= @line.id %><%= "\u000D\u000A" %>
\ No newline at end of file +<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line.objectid %>;<%= @line.number %>;<%= @line.name.encode(Encoding::ISO_8859_1) if @line.name %>;;;<%= @company.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @company %>;<%= @network.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @network %>;<%= @group_of_line %>;<%= @line.id %><%= "\u000D\u000A" %>
\ No newline at end of file diff --git a/app/views/api/hub/periodes.hub.erb b/app/views/api/hub/periodes.hub.erb index 38b2d3db9..2bb3e8368 100644 --- a/app/views/api/hub/periodes.hub.erb +++ b/app/views/api/hub/periodes.hub.erb @@ -1 +1 @@ -<%= Chouette::TimeTable.find(@time_table.id).objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @time_table.comment %>;<%= @time_table.start_date.strftime("%d/%m/%Y") %>;<%= @time_table.end_date.strftime("%d/%m/%Y") %>;<%= @calendar %>;<%= @identifier %><%= "\u000D\u000A" %>
\ No newline at end of file +<%= Chouette::TimeTable.find(@time_table.id).objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @time_table.comment.encode(Encoding::ISO_8859_1) if @time_table.comment %>;<%= @time_table.start_date.strftime("%d/%m/%Y") %>;<%= @time_table.end_date.strftime("%d/%m/%Y") %>;<%= @calendar %>;<%= @identifier %><%= "\u000D\u000A" %>
\ No newline at end of file diff --git a/app/views/api/hub/reseaux.hub.erb b/app/views/api/hub/reseaux.hub.erb index 1f12a7017..95ab8d547 100644 --- a/app/views/api/hub/reseaux.hub.erb +++ b/app/views/api/hub/reseaux.hub.erb @@ -1 +1 @@ -<%= @network.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @network.name %>;<%= @network.id %><%= "\u000D\u000A" %>
\ No newline at end of file +<%= @network.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @network.name.encode(Encoding::ISO_8859_1) if @network.name %>;<%= @network.id %><%= "\u000D\u000A" %>
\ No newline at end of file diff --git a/app/views/api/hub/transporteurs.hub.erb b/app/views/api/hub/transporteurs.hub.erb index 7d153ad7c..595d3b5fb 100644 --- a/app/views/api/hub/transporteurs.hub.erb +++ b/app/views/api/hub/transporteurs.hub.erb @@ -1 +1 @@ -<%= @company.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @company.name %>;<%= @company.id %><%= "\u000D\u000A" %>
\ No newline at end of file +<%= @company.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @company.name.encode(Encoding::ISO_8859_1) if @company.name %>;<%= @company.id %><%= "\u000D\u000A" %>
\ No newline at end of file diff --git a/app/views/devise/_links.erb b/app/views/devise/_links.erb index 3381b2e8e..e2a1bf3ef 100644 --- a/app/views/devise/_links.erb +++ b/app/views/devise/_links.erb @@ -7,7 +7,7 @@ </li> <li> - <%- if devise_mapping.registerable? && controller_name != 'registrations' %> + <%- if devise_mapping.registerable? && controller_name != 'registrations' && Rails.application.config.accept_user_creation %> <%= link_to t(".sign_up"), new_registration_path(resource_name) %><br /> <% end -%> </li> diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index d18db9402..79edcb53b 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -1,10 +1,13 @@ <%= title_tag t('.title') %> <%= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |form| %> - <%= form.inputs do %> + <%= form.inputs do %> + <%= form.semantic_fields_for :organisation, Organisation.new do |organisation| %> + <%= organisation.input :name, :label => t("helpers.label.user.organisation_name") %> + <% end %> <% if resource.respond_to?( :name) %> <%= form.input :name %> - <% end %> + <% end %> <%= form.input :email %> <%= form.input :password, :as => :password %> <%= form.input :password_confirmation, :as => :password %> diff --git a/app/views/exports/_export.erb b/app/views/exports/_export.erb index 649251b78..a139e3171 100644 --- a/app/views/exports/_export.erb +++ b/app/views/exports/_export.erb @@ -25,9 +25,7 @@ </p> </div> <div class="panel-footer"> - <div class="progress"> - <div class="progress-bar <%= export.status %>" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"> <%= t("exports.statuses.#{export.status}") %></div> - </div> + <%= export_progress_bar_tag(export) %> <div class="history"> <%= l export.created_at, :format => "%d/%m/%Y %H:%M" %> </div> diff --git a/app/views/exports/_exports.html.erb b/app/views/exports/_exports.html.erb index 58d4d7e70..9417cfed6 100644 --- a/app/views/exports/_exports.html.erb +++ b/app/views/exports/_exports.html.erb @@ -2,15 +2,7 @@ <span class="search"> <%= t("will_paginate.page_entries_info.search") %></span> <%= page_entries_info @exports %> </div> <div class="exports paginated_content"> - <% @exports.each_slice(3) do |row_exports| %> - <div class="row"> - <% row_exports.each do |export| %> - <div class="col-md-4"> - <%= render :partial => "export", locals: { export: export } %> - </div> - <% end %> - </div> - <% end %> + <%= paginated_content @exports, "export" %> </div> <div class="pagination"> <%= will_paginate @exports, :container => false, renderer: RemoteBootstrapPaginationLinkRenderer %> diff --git a/app/views/exports/index.js.erb b/app/views/exports/index.js.erb index 08ddf1dc5..e9f06f09e 100644 --- a/app/views/exports/index.js.erb +++ b/app/views/exports/index.js.erb @@ -1 +1 @@ -$('#compliance_check_tasks').html('<%= escape_javascript(render("compliance_check_tasks")) %>');
\ No newline at end of file +$('#exports').html('<%= escape_javascript(render("exports")) %>');
\ No newline at end of file diff --git a/app/views/group_of_lines/_form.erb b/app/views/group_of_lines/_form.erb index 3c685964b..a0ef4a4c4 100644 --- a/app/views/group_of_lines/_form.erb +++ b/app/views/group_of_lines/_form.erb @@ -6,7 +6,7 @@ <% end %> <%= form.inputs do %> - <%= form.input :line_tokens, :label => t('.lines'), :as => :text, :input_html => { :"data-pre" => ( @group_of_line.lines.map { |line| { :id => line.id, :name => line.published_name } } ).to_json } %> + <%= form.input :line_tokens, :label => t('.lines'), :as => :text, :input_html => { :"data-pre" => ( @group_of_line.lines.map { |line| { :id => line.id, :name => line.name } } ).to_json } %> <% end %> <%= form.actions do %> diff --git a/app/views/import_tasks/_import_task.erb b/app/views/import_tasks/_import_task.erb index 0bb8cad08..7ba2c1058 100644 --- a/app/views/import_tasks/_import_task.erb +++ b/app/views/import_tasks/_import_task.erb @@ -22,9 +22,7 @@ <% end %> </div> <div class="panel-footer"> - <div class="progress"> - <div class="progress-bar <%= import_task.status %>" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"> <%= t("import_tasks.statuses.#{import_task.status}") %></div> - </div> + <%= import_progress_bar_tag(import_task) %> <div class="history"> <%= l import_task.created_at, :format => "%d/%m/%Y %H:%M" %> | <%= import_task.user_name %> </div> diff --git a/app/views/vehicle_journeys/_form.html.erb b/app/views/vehicle_journeys/_form.html.erb index 478a6b9d3..1c3945164 100644 --- a/app/views/vehicle_journeys/_form.html.erb +++ b/app/views/vehicle_journeys/_form.html.erb @@ -16,10 +16,11 @@ <li class="input"> <%= form.label @vehicle_journey.human_attribute_name(:vehicle_journey_at_stop_ids), :class => "label" %> </li> + <% unless @vehicle_journey.vehicle_journey_at_stops.empty? || @vehicle_journey.vehicle_journey_at_stops.any? { |vjas| vjas.departure_time.nil? } %> <div class="vehicle_journey_at_stops"> <div class="well"> - <span class="title"><%= t(".slide_title") %></span> + <span class="title"><%= t(".slide_title") %></span> <div> <span><%= t(".set") %></span> <%= select_tag "", options_for_select( [ [t('.slide_departure'), "departure"], [t('.slide_arrival'), "arrival"] ] ), :class => "departure_or_arrival" %> <span><%= t(".to") %></span> <%= select_hour(@vehicle_journey.vehicle_journey_at_stops.first.departure_time.hour) %> @@ -27,32 +28,32 @@ <a class="slide btn btn-default"><%= t(".slide") %></a> </div> </div> + <% end %> - <% end %> - - <table class="table table-hover table-striped"> - <thead> - <tr> - <th class="hour title"><%= t('.arrival') %></th> - <th class="stop title" ><%= t('.stop_title') %></th> - <th class="hour title"><%= t('.departure') %></th> - </tr> - </thead> - <tfoot> - <tr> - <td class="title"> <a class="to_departures"><%= t('.to_departures') %></a></td> - <td class="title" ></td> - <td class="title"><a class="to_arrivals"><%= t('.to_arrivals') %></a></td> - </tr> - </tfoot> - <tbody class="journey_pattern_dependent_list"> - <%= render :partial => "vehicle_journeys/vehicle_journey_at_stop_fields", - :collection => @vehicle_journey.vehicle_journey_at_stops, :as => :vehicle_journey_at_stop, :locals => { :vehicle_journey_at_stops_size => @vehicle_journey.vehicle_journey_at_stops.size } %> - </tbody> - </table> - </div> + <table class="table table-hover table-striped"> + <thead> + <tr> + <th class="hour title"><%= t('.arrival') %></th> + <th class="stop title" ><%= t('.stop_title') %></th> + <th class="hour title"><%= t('.departure') %></th> + </tr> + </thead> + <tfoot> + <tr> + <td class="title"> <a class="to_departures"><%= t('.to_departures') %></a></td> + <td class="title" ></td> + <td class="title"><a class="to_arrivals"><%= t('.to_arrivals') %></a></td> + </tr> + </tfoot> + <tbody class="journey_pattern_dependent_list"> + <%= render :partial => "vehicle_journeys/vehicle_journey_at_stop_fields", + :collection => @vehicle_journey.vehicle_journey_at_stops, :as => :vehicle_journey_at_stop, :locals => { :vehicle_journey_at_stops_size => @vehicle_journey.vehicle_journey_at_stops.size } %> + + </tbody> + </table> + <% end %> - + <%= form.actions do %> <%= form.action :submit, :as => :button %> <%= form.action :cancel, :as => :link %> diff --git a/app/views/vehicle_journeys/select_journey_pattern.js.erb b/app/views/vehicle_journeys/select_journey_pattern.js.erb index 3487da1ae..6a32c7b9d 100644 --- a/app/views/vehicle_journeys/select_journey_pattern.js.erb +++ b/app/views/vehicle_journeys/select_journey_pattern.js.erb @@ -1,6 +1,7 @@ $('.journey_pattern_dependent_list').html('<%= escape_javascript( render(:partial => 'vehicle_journeys/vehicle_journey_at_stop_fields', :collection => @vehicle_journey.vehicle_journey_at_stops, - :as => :vehicle_journey_at_stop)).html_safe %>'); + :as => :vehicle_journey_at_stop, + :locals => { :vehicle_journey_at_stops_size => @vehicle_journey.vehicle_journey_at_stops.size })).html_safe %>'); |
