aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/images/icons/kml.pngbin0 -> 1049 bytes
-rw-r--r--app/assets/stylesheets/layout.css.scss4
-rw-r--r--app/helpers/stop_areas_helper.rb2
-rw-r--r--app/views/access_points/show.html.erb4
-rw-r--r--app/views/lines/index.html.erb1
-rw-r--r--app/views/lines/show.html.erb2
-rw-r--r--app/views/routes/show.html.erb4
-rw-r--r--app/views/stop_areas/index.html.erb6
-rw-r--r--app/views/stop_areas/show.html.erb2
9 files changed, 21 insertions, 4 deletions
diff --git a/app/assets/images/icons/kml.png b/app/assets/images/icons/kml.png
new file mode 100644
index 000000000..9e62a35a5
--- /dev/null
+++ b/app/assets/images/icons/kml.png
Binary files differ
diff --git a/app/assets/stylesheets/layout.css.scss b/app/assets/stylesheets/layout.css.scss
index 5800a767e..4a5237aa7 100644
--- a/app/assets/stylesheets/layout.css.scss
+++ b/app/assets/stylesheets/layout.css.scss
@@ -116,4 +116,8 @@ ul.user li.language.selected
a.export {
background: url(image-path('icons/export-small.png')) no-repeat;
}
+ a.kml {
+ background: url(image-path('icons/kml.png')) no-repeat;
+ }
+
}
diff --git a/app/helpers/stop_areas_helper.rb b/app/helpers/stop_areas_helper.rb
index 4a2f3f9a4..da29b2ec6 100644
--- a/app/helpers/stop_areas_helper.rb
+++ b/app/helpers/stop_areas_helper.rb
@@ -5,7 +5,7 @@ module StopAreasHelper
end
def show_map?
- manage_itl || @stop_area.projection_type != nil || @stop_area.long_lat_type != nil
+ manage_itl || @stop_area.long_lat_type != nil
end
def manage_access_points
diff --git a/app/views/access_points/show.html.erb b/app/views/access_points/show.html.erb
index 7f34ed0e0..b7c8ba391 100644
--- a/app/views/access_points/show.html.erb
+++ b/app/views/access_points/show.html.erb
@@ -1,6 +1,6 @@
<%= title_tag t('access_points.show.title', :access_point => @access_point.name) %>
<div class="access_point_show">
- <% if @access_point.projection_type != nil || @access_point.long_lat_type != nil %>
+ <% if @access_point.long_lat_type != nil %>
<%= @map.to_html %>
<% end %>
<div class="summary">
@@ -53,7 +53,7 @@
<%= t((@access_point.lift_availability == true).to_s) %>
</p>
<p> <label><%= t('access_points.show.geographic_data') %> </label></p>
- <% if @access_point.projection_type == nil && @access_point.long_lat_type == nil %>
+ <% if @access_point.long_lat_type == nil %>
<span class='geo_data'><%= t('access_points.show.no_geographic_data') %></span>
<% else %>
<% if !@access_point.projection.nil? %>
diff --git a/app/views/lines/index.html.erb b/app/views/lines/index.html.erb
index ff14e8749..59c341e79 100644
--- a/app/views/lines/index.html.erb
+++ b/app/views/lines/index.html.erb
@@ -47,6 +47,7 @@
<ul class="actions">
<li><%= link_to t('lines.actions.import'), new_referential_import_path(@referential), :class => "import" %></li>
+ <li><%= link_to t('lines.actions.export_kml_all'), api_kml_referential_lines_path(@referential, :format => :kml), :class => "kml" %></li>
</ul>
<h3><%= t(".selection") %></h3>
diff --git a/app/views/lines/show.html.erb b/app/views/lines/show.html.erb
index 1b30aff49..d5c89cc3b 100644
--- a/app/views/lines/show.html.erb
+++ b/app/views/lines/show.html.erb
@@ -72,6 +72,8 @@
<li><%= link_to t('lines.actions.destroy'), referential_line_path(@referential, @line), :method => :delete, :data => {:confirm => t('lines.actions.destroy_confirm')}, :class => "remove" %></li>
<li><%= link_to t('routes.actions.new'), new_referential_line_route_path(@referential, @line), :class => "add" %></li>
<br>
+ <li><%= link_to t('lines.actions.export_kml'), api_kml_referential_line_path(@referential, @line, :format => :kml), :class => "kml" %></li>
+ <li><%= link_to t('routes.actions.export_kml_all'), api_kml_referential_line_routes_path(@referential, @line, :format => :kml), :class => "kml" %></li>
</ul>
<%= creation_tag(@line) %>
<% end %>
diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb
index 654e3975a..2a73740d9 100644
--- a/app/views/routes/show.html.erb
+++ b/app/views/routes/show.html.erb
@@ -96,6 +96,10 @@
</li>
<% end %>
</ul>
+<ul class="actions">
+ <li><%= link_to t('routes.actions.export_kml'), api_kml_referential_line_route_path(@referential, @line, @route, :format => :kml), :class => "kml" %></li>
+</ul>
+
<%= creation_tag(@route) %>
<% end %>
diff --git a/app/views/stop_areas/index.html.erb b/app/views/stop_areas/index.html.erb
index 982895a29..3c06b67dd 100644
--- a/app/views/stop_areas/index.html.erb
+++ b/app/views/stop_areas/index.html.erb
@@ -25,6 +25,12 @@
<li><%= link_to t('stop_areas.actions.default_geometry'), default_geometry_referential_stop_areas_path(@referential), :method => :put, :class => "calculator_edit" %></li>
</ul>
+<ul class="actions">
+ <li><%= link_to t('stop_areas.actions.export_kml_place'), api_kml_referential_stop_areas_path(@referential, :format => :kml, :category => "Place" ), :class => "kml" %></li>
+ <li><%= link_to t('stop_areas.actions.export_kml_commercial'), api_kml_referential_stop_areas_path(@referential, :format => :kml, :category => "CommercialStopPoint" ), :class => "kml" %></li>
+ <li><%= link_to t('stop_areas.actions.export_kml_physical'), api_kml_referential_stop_areas_path(@referential, :format => :kml, :category => "Physical" ), :class => "kml" %></li>
+</ul>
+
<h3><%= t(".selection") %></h3>
<h4><%= t(".area_type") %></h4>
diff --git a/app/views/stop_areas/show.html.erb b/app/views/stop_areas/show.html.erb
index b98378d71..632036959 100644
--- a/app/views/stop_areas/show.html.erb
+++ b/app/views/stop_areas/show.html.erb
@@ -39,7 +39,7 @@
</p>
<% if !manage_itl %>
<p> <label><%= t('stop_areas.show.geographic_data') %> </label></p>
- <% if @stop_area.projection_type == nil && @stop_area.long_lat_type == nil %>
+ <% if @stop_area.long_lat_type == nil %>
<span class='geo_data'><%= t('stop_areas.show.no_geographic_data') %></span>
<% else %>
<% if !@stop_area.projection.nil? %>