diff options
| author | Michel Etienne | 2012-08-21 14:10:53 +0200 |
|---|---|---|
| committer | Michel Etienne | 2012-08-21 14:10:53 +0200 |
| commit | f5505e924fd512f7d89fc35f6e6a515862de0854 (patch) | |
| tree | 250c428c6542e176c421b75ff06d8b69bbb11987 /app/views | |
| parent | 10c30e65777641945af317bd6cd6806bb9b3a933 (diff) | |
| parent | 13cdfc734313ea6288fa88a0f27960bfbc966e78 (diff) | |
| download | chouette-core-f5505e924fd512f7d89fc35f6e6a515862de0854.tar.bz2 | |
Merge branch 'master' of chouette.dryade.priv:/srv/git/chouette2
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/journey_patterns/_stop_points_detail.html.erb | 10 | ||||
| -rw-r--r-- | app/views/journey_patterns/show.html.erb | 17 | ||||
| -rw-r--r-- | app/views/journey_patterns/show.js.erb | 4 | ||||
| -rw-r--r-- | app/views/journey_patterns/show.kml.erb | 19 | ||||
| -rw-r--r-- | app/views/routes/_stop_points_detail.html.erb | 10 | ||||
| -rw-r--r-- | app/views/routes/show.html.erb | 4 | ||||
| -rw-r--r-- | app/views/routes/show.js.erb | 4 | ||||
| -rw-r--r-- | app/views/routes/show.kml.erb | 1 |
8 files changed, 48 insertions, 21 deletions
diff --git a/app/views/journey_patterns/_stop_points_detail.html.erb b/app/views/journey_patterns/_stop_points_detail.html.erb new file mode 100644 index 000000000..6c9e4afae --- /dev/null +++ b/app/views/journey_patterns/_stop_points_detail.html.erb @@ -0,0 +1,10 @@ + <div class="page_info"> + <span class="search"> <%= t("will_paginate.page_entries_info.list") %></span> <%= page_entries_info @stop_points %> + </div> + <div class="stop_points paginated_content"> + <%= render :partial => "stop_points/stop_point", :collection => @stop_points %> + </div> + <div class="pagination"> + <%= will_paginate @stop_points, :container => false %> + </div> + diff --git a/app/views/journey_patterns/show.html.erb b/app/views/journey_patterns/show.html.erb index 9962e4d8b..507a71cca 100644 --- a/app/views/journey_patterns/show.html.erb +++ b/app/views/journey_patterns/show.html.erb @@ -1,6 +1,7 @@ <%= title_tag t('journey_patterns.show.title', :journey_pattern => journey_name( @journey_pattern), :route => @route.name ) %> -<div class="route_show"> +<div class="journey_pattern_show"> + <%= @map.to_html %> <div class="summary"> <p> @@ -39,18 +40,10 @@ </div> +<p class="after_map" /> <h3 class="journey_pattern_stop_points"><%= t('.stop_points') %></h3> -<div class="pagination"> - <div class="page_info"> - <%= page_entries_info @stop_points %> - </div> - <%= will_paginate @stop_points, :container => false %> -</div> -<div class="stop_points paginated_content"> - <%= render :partial => "stop_points/stop_point", :collection => @stop_points %> -</div> -<div class="pagination"> - <%= will_paginate @stop_points, :container => false %> +<div class="stop_points_detail" > + <%= render :partial => "stop_points_detail" %> </div> <% content_for :sidebar do %> diff --git a/app/views/journey_patterns/show.js.erb b/app/views/journey_patterns/show.js.erb new file mode 100644 index 000000000..aedb0fb9e --- /dev/null +++ b/app/views/journey_patterns/show.js.erb @@ -0,0 +1,4 @@ +$(function (){ + $(".stop_points_detail").html("<%= escape_javascript(render(:partial => "stop_points_detail")) %>"); +}); + diff --git a/app/views/journey_patterns/show.kml.erb b/app/views/journey_patterns/show.kml.erb index e08eb2255..75ca50ab5 100644 --- a/app/views/journey_patterns/show.kml.erb +++ b/app/views/journey_patterns/show.kml.erb @@ -3,18 +3,23 @@ <Document> <Placemark id="route_<%= @journey_pattern.id %>" > <name><%= @journey_pattern.name %></name> - <%= @journey_pattern.geometry.kml_representation.html_safe %> + <inactive>true</inactive> + <%= @journey_pattern.route.geometry.kml_representation.html_safe %> </Placemark> - <% @journey_pattern.stop_areas.where("latitude is not null and longitude is not null").each_with_index do |stop_area, index| %> - <Placemark id="<%= stop_area.id %>" > - <name><%= "#{stop_area.name} (#{index+1})" %></name> - <% if stop_area.id==@journey_pattern.stop_areas.first.id %> + <% @journey_pattern.route.stop_points.each_with_index do |stop_point, index| %> + <% if stop_point.stop_area.geometry %> + <Placemark id="<%= stop_point.stop_area.id %>" > + <name><%= "#{stop_point.stop_area.name} (#{index+1})" %></name> + <stop><%= @journey_pattern.stop_points.include?( stop_point) ? "true" : "false" %></stop> + <% if stop_point.stop_area.id==@route.stop_areas.first.id %> <departure>true</departure> - <% elsif stop_area.id==@journey_pattern.stop_areas.last.id %> + <% elsif stop_point.stop_area.id==@route.stop_areas.last.id %> <arrival>true</arrival> <% end %> - <%= stop_area.geometry.kml_representation.html_safe %> + <iconCode><%= icon_code(stop_point, @journey_pattern)%></iconCode> + <%= stop_point.stop_area.geometry.kml_representation.html_safe %> </Placemark> + <% end %> <% end %> </Document> </kml> diff --git a/app/views/routes/_stop_points_detail.html.erb b/app/views/routes/_stop_points_detail.html.erb new file mode 100644 index 000000000..6c9e4afae --- /dev/null +++ b/app/views/routes/_stop_points_detail.html.erb @@ -0,0 +1,10 @@ + <div class="page_info"> + <span class="search"> <%= t("will_paginate.page_entries_info.list") %></span> <%= page_entries_info @stop_points %> + </div> + <div class="stop_points paginated_content"> + <%= render :partial => "stop_points/stop_point", :collection => @stop_points %> + </div> + <div class="pagination"> + <%= will_paginate @stop_points, :container => false %> + </div> + diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb index 9980543c7..9fa1aa184 100644 --- a/app/views/routes/show.html.erb +++ b/app/views/routes/show.html.erb @@ -71,8 +71,8 @@ <span class="switcher" style="display: none;">-</span> </a> </h3> -<div class="stop_points content" style="display: none;"> - <%= render :partial => "stop_points/stop_point", :collection => @stop_points %> +<div class="stop_points_detail" style="display: none;"> + <%= render :partial => "stop_points_detail" %> </div> <h3 class="route_journey_patterns"><%= t('.journey_patterns') %> diff --git a/app/views/routes/show.js.erb b/app/views/routes/show.js.erb new file mode 100644 index 000000000..aedb0fb9e --- /dev/null +++ b/app/views/routes/show.js.erb @@ -0,0 +1,4 @@ +$(function (){ + $(".stop_points_detail").html("<%= escape_javascript(render(:partial => "stop_points_detail")) %>"); +}); + diff --git a/app/views/routes/show.kml.erb b/app/views/routes/show.kml.erb index 4e90fa963..91ffb9918 100644 --- a/app/views/routes/show.kml.erb +++ b/app/views/routes/show.kml.erb @@ -3,6 +3,7 @@ <Document> <Placemark id="route_<%= @route.id %>" > <name><%= @route.name %></name> + <inactive>true</inactive> <%= @route.geometry.kml_representation.html_safe %> </Placemark> <% @route.stop_areas.where("latitude is not null and longitude is not null").each_with_index do |stop_area, index| %> |
