aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Donnet2013-06-28 09:29:45 +0200
committerLuc Donnet2013-06-28 09:29:45 +0200
commit8f8c8b07b587b0f5f2300f8635b68aeb0415024d (patch)
tree80ab900d245b09bd264a17f3de6edcf2ca78197a
parente8bf323e77a548e3ea7e9ab8e1e13e90764046c4 (diff)
downloadchouette-core-8f8c8b07b587b0f5f2300f8635b68aeb0415024d.tar.bz2
Add kml links to kml resources for api
-rw-r--r--app/assets/images/icons/kml.pngbin0 -> 1049 bytes
-rw-r--r--app/assets/stylesheets/layout.css.scss4
-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--config/locales/lines.yml4
-rw-r--r--config/locales/routes.yml4
-rw-r--r--config/locales/stop_areas.yml8
9 files changed, 32 insertions, 1 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/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/config/locales/lines.yml b/config/locales/lines.yml
index 48e8bff68..d54367358 100644
--- a/config/locales/lines.yml
+++ b/config/locales/lines.yml
@@ -6,6 +6,8 @@ en:
destroy: "Remove this line"
destroy_confirm: "Are you sure you want destroy this line?"
import: "Import lines"
+ export_kml: "Export KML line"
+ export__kml_all: "Export KML lines"
new:
title: "Add a new line"
edit:
@@ -66,6 +68,8 @@ fr:
destroy: "Supprimer cette ligne"
destroy_confirm: "Etes vous sûr de détruire cette ligne ?"
import: "Importer des lignes"
+ export_kml: "Export KML de la ligne"
+ export_kml_all: "Export KML des lignes"
new:
title: "Ajouter une ligne"
edit:
diff --git a/config/locales/routes.yml b/config/locales/routes.yml
index bd6051d0e..fb5f49b4a 100644
--- a/config/locales/routes.yml
+++ b/config/locales/routes.yml
@@ -5,6 +5,8 @@ en:
edit: "Edit this route"
destroy: "Remove this route"
destroy_confirm: "Are you sure you want destroy this route?"
+ export_kml: "Export KML route"
+ export_kml_all: "Export KML routes"
new:
title: "Add a new route"
edit:
@@ -64,6 +66,8 @@ fr:
edit: "Modifier cette séquence d'arrêts"
destroy: "Supprimer cette séquence d'arrêts"
destroy_confirm: "Etes vous sûr de détruire cette séquence d'arrêts ?"
+ export_kml: "Export KML de l'itinéraire"
+ export_kml_all: "Export KML des itinéraires"
new:
title: "Ajouter une séquence d'arrêts"
edit:
diff --git a/config/locales/stop_areas.yml b/config/locales/stop_areas.yml
index b7201b983..ffc670522 100644
--- a/config/locales/stop_areas.yml
+++ b/config/locales/stop_areas.yml
@@ -16,6 +16,9 @@ en:
add_routing_lines: "Manage constraint's lines"
add_routing_stops: "Manage constraint's stops"
default_geometry: "Compute missing geometries"
+ export_kml_place: "Export KML places"
+ export_kml_commercial: "Export KML commercial stop points"
+ export_kml_physical: "Export KML physical"
new:
title: "Add a new stop"
edit:
@@ -76,7 +79,7 @@ en:
objectid: "Neptune identifier"
object_version: "Version"
creation_time: "Created on"
- creatorid: Created by
+ creatorid: "Created by"
children_ids: "Children"
routing_stop_ids: "Attached stops"
routing_line_ids: "Attached lines"
@@ -106,6 +109,9 @@ fr:
manage_access_links: "Gérer les liens arrêt-accès"
add_children: "Gérer les fils"
default_geometry: "Calculer les géométries manquantes"
+ export_kml_place: "Export KML des pôles d'échange"
+ export_kml_commercial: "Export KML des arrêt commerciaux"
+ export_kml_physical: "Export KML des arrêts physiques"
new:
title: "Ajouter un arrêt"
edit: