diff options
| author | Bruno Perles | 2015-10-29 13:57:27 +0100 |
|---|---|---|
| committer | Bruno Perles | 2015-10-29 13:57:27 +0100 |
| commit | c30c2f466232e90cf559dbe13eae08b2e6ba72d0 (patch) | |
| tree | 5526b58ed233af1e4e0736e484821bfa4d781e07 /app/views | |
| parent | e44df2e9e0770d6f7e83c23d0b79dcb2c83c4467 (diff) | |
| download | chouette-core-c30c2f466232e90cf559dbe13eae08b2e6ba72d0.tar.bz2 | |
Update vehicle_journey view and prepare to the matrix
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/vehicle_journey_frequencies/_journey_frequency_fields.html.erb | 2 | ||||
| -rw-r--r-- | app/views/vehicle_journeys/_vehicle_journeys.html.erb | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/app/views/vehicle_journey_frequencies/_journey_frequency_fields.html.erb b/app/views/vehicle_journey_frequencies/_journey_frequency_fields.html.erb index 3a944e53e..9370fc8d3 100644 --- a/app/views/vehicle_journey_frequencies/_journey_frequency_fields.html.erb +++ b/app/views/vehicle_journey_frequencies/_journey_frequency_fields.html.erb @@ -1,6 +1,6 @@ <div class="nested-fields"> <ul class="ce-FrequencyFormFields"> - <%= f.input :timeband, collection: Chouette::Timeband.all, label: false %> + <%= f.input :timeband, collection: Chouette::Timeband.all.map{ |timeband| [timeband.fullname, timeband.id] }, label: false %> <%= f.input :first_departure_time, label: false %> <%= f.input :last_departure_time, label: false %> <%= f.input :scheduled_headway_interval, label: false %> diff --git a/app/views/vehicle_journeys/_vehicle_journeys.html.erb b/app/views/vehicle_journeys/_vehicle_journeys.html.erb index ecdb12c6e..b810ae71d 100644 --- a/app/views/vehicle_journeys/_vehicle_journeys.html.erb +++ b/app/views/vehicle_journeys/_vehicle_journeys.html.erb @@ -13,7 +13,16 @@ </th> <% @vehicle_journeys.each do |vj| %> <th class="vehicle_journey"> - <button data-style="primary" data-container="body" rel="popover" data-toggle="popover" data-title='<%= link_to(vehicle_title(vj), [@referential, @line, @route, vj] ) %> <%= link_to('<span class="fa fa-pencil"></span>'.html_safe, ["edit", @referential, @line, @route, vj], :class => "btn btn-default btn-sm" ) %>' data-placement= "top" data-content='<%= render( partial: "show_popover", :locals => { :vehicle_journey => vj }) %>' class="vehicle_journey_popover btn btn-default btn-sm"><i class='fa fa-search'></i></button> + <button data-style="primary" data-container="body" rel="popover" data-toggle="popover" + data-title='<%= link_to(vehicle_title(vj), [@referential, @line, @route, vj] ) %> + <%= link_to('<span class="fa fa-pencil"></span>'.html_safe, + send("edit_referential_line_route_vehicle_journey#{'_frequency' if vj.frequency?}_path", @referential, @line, @route, vj), + :class => "btn btn-default btn-sm" ) %>' + data-placement= "top" + data-content='<%= render( partial: "show_popover", :locals => { :vehicle_journey => vj }) %>' + class="vehicle_journey_popover btn btn-default btn-sm"> + <i class='fa fa-search'></i> + </button> </th> <% end %> </tr> @@ -23,7 +32,7 @@ <tr class="<%= cycle('odd', 'even') %>"> <td class="stop_area"><%= sp.stop_area.name %></td> <% @vehicle_journeys.each do |vj| %> - <td class="hours <%= missing_time_check(@matrix["#{vj.id}-#{sp.id}"]) %>"> + <td class="hours <%= missing_time_check(@matrix["#{vj.id}-#{sp.id}"]) %><%= ' ce-VehicleJourneyBlock-frequency' if vj.frequency? %>"> <%= (@matrix["#{vj.id}-#{sp.id}"] && @matrix["#{vj.id}-#{sp.id}"].departure_time) ? l( @matrix["#{vj.id}-#{sp.id}"].departure_time, :format => :hour) : "--" %> </td> <% end %> |
