aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorZakaria BOUZIANE2014-07-07 17:15:10 +0200
committerZakaria BOUZIANE2014-07-07 17:15:10 +0200
commita77d67e7807f90ea24e96b5c1a9e6bbb290170b0 (patch)
tree80b395a4a06b41369a3cf3eb006f98ea14ed7f22 /app/views
parent22c280f7042b554d8382b7d7511132efcd067ad6 (diff)
parentc5228e916b7b468a56c3c8a7441ac6973b875fff (diff)
downloadchouette-core-a77d67e7807f90ea24e96b5c1a9e6bbb290170b0.tar.bz2
Merge branch 'tad_pmr' into sismo
Conflicts: Gemfile Gemfile.lock db/schema.rb
Diffstat (limited to 'app/views')
-rw-r--r--app/views/api/hub/chemin/show.hub.erb1
-rw-r--r--app/views/api/hub/correspondance/show.hub.erb1
-rw-r--r--app/views/api/hub/course/show.hub.erb1
-rw-r--r--app/views/api/hub/horaire/show.hub.erb2
-rw-r--r--app/views/api/hub/ligne/show.hub.erb1
-rw-r--r--app/views/api/hub/periode/show.hub.erb1
-rw-r--r--app/views/api/hub/stop_area/commercial_show.hub.erb1
-rw-r--r--app/views/api/hub/stop_area/physical_show.hub.erb1
-rw-r--r--app/views/api/hub/stops/show.hub.erb1
-rw-r--r--app/views/api/hub/time_tables/show.hub.erb1
-rw-r--r--app/views/exports/_fields_hub_export.erb2
-rw-r--r--app/views/help/exports.textile10
-rw-r--r--app/views/lines/_form.erb2
-rw-r--r--app/views/lines/show.html.erb36
-rw-r--r--app/views/vehicle_journeys/_form.html.erb2
-rw-r--r--app/views/vehicle_journeys/show.html.erb22
16 files changed, 85 insertions, 0 deletions
diff --git a/app/views/api/hub/chemin/show.hub.erb b/app/views/api/hub/chemin/show.hub.erb
new file mode 100644
index 000000000..ed6e9a4d1
--- /dev/null
+++ b/app/views/api/hub/chemin/show.hub.erb
@@ -0,0 +1 @@
+<%= @journey_pattern.route.line_id %>;<%= @journey_pattern.id %>;<%= @journey_pattern.registration_number %>;<%= @journey_pattern.name %>;<%= @journey_pattern.route.wayback == 'A' ? 1 : 2 %>;<%= @type %>;<% @journey_pattern.stop_points.each do |sp| %>;<%= sp.stop_area_id %>;<%= sp.stop_area.registration_number %>;;<% end %>
diff --git a/app/views/api/hub/correspondance/show.hub.erb b/app/views/api/hub/correspondance/show.hub.erb
new file mode 100644
index 000000000..8d4c5ba7c
--- /dev/null
+++ b/app/views/api/hub/correspondance/show.hub.erb
@@ -0,0 +1 @@
+<%= @connection_link.departure_id %>;<%= @connection_link.departure.registration_number %>;<%= @connection_link.arrival_id %>;<%= @connection_link.arrival.registration_number %>;<%= @connection_link.link_distance %>;<%= @connection_link.default_duration %>;<%= @connection_link.id %>
diff --git a/app/views/api/hub/course/show.hub.erb b/app/views/api/hub/course/show.hub.erb
new file mode 100644
index 000000000..d92939dc2
--- /dev/null
+++ b/app/views/api/hub/course/show.hub.erb
@@ -0,0 +1 @@
+<%= @vehicle_journey.id %>;;;;;<%= @vehicle_journey.route.line_id %>;<%= @vehicle_journey.journey_pattern.id %>;...
diff --git a/app/views/api/hub/horaire/show.hub.erb b/app/views/api/hub/horaire/show.hub.erb
new file mode 100644
index 000000000..bebea0959
--- /dev/null
+++ b/app/views/api/hub/horaire/show.hub.erb
@@ -0,0 +1,2 @@
+<%= @vehicle_journey_at_stop.stop_point.stop_area_id %>;<%= @arrival_time %>;<%= @arrival_type %>;<%= @vehicle_journey_at_stop.vehicle_journey_id %>;<%= @vehicle_journey_at_stop.vehicle_journey.journey_pattern_id %>;<%= @vehicle_journey_at_stop.stop_point.stop_area.registration_number %>;<%= @vehicle_journey_at_stop.id %>
+<%= @vehicle_journey_at_stop.stop_point.stop_area_id %>;<%= @departure_time %>;<%= @departure_type %>;<%= @vehicle_journey_at_stop.vehicle_journey_id %>;<%= @vehicle_journey_at_stop.vehicle_journey.journey_pattern_id %>;<%= @vehicle_journey_at_stop.stop_point.stop_area.registration_number %>;<%= @vehicle_journey_at_stop.id %>
diff --git a/app/views/api/hub/ligne/show.hub.erb b/app/views/api/hub/ligne/show.hub.erb
new file mode 100644
index 000000000..ee6d4de8f
--- /dev/null
+++ b/app/views/api/hub/ligne/show.hub.erb
@@ -0,0 +1 @@
+<%= @line.id %>;<%= @line.objectid %>;<%= @line.name %>;;;<%= @line.company_id %>;<%= @line.network_id %>;;<%= @line.registration_number %>
diff --git a/app/views/api/hub/periode/show.hub.erb b/app/views/api/hub/periode/show.hub.erb
new file mode 100644
index 000000000..342e4016f
--- /dev/null
+++ b/app/views/api/hub/periode/show.hub.erb
@@ -0,0 +1 @@
+<%= @time_table.id %>;<%= @time_table.comment %>;<%= @time_table.start_date %>;<%= @time_table.end_date %>;<%= @calendar %>
diff --git a/app/views/api/hub/stop_area/commercial_show.hub.erb b/app/views/api/hub/stop_area/commercial_show.hub.erb
new file mode 100644
index 000000000..a7cc7585a
--- /dev/null
+++ b/app/views/api/hub/stop_area/commercial_show.hub.erb
@@ -0,0 +1 @@
+<%= @stop_area.id %>;<%= @stop_area.name %>;;<%= @type %>;;;;<%= @stop_area.country_code %>;<%= @stop_area.country_code %>;<%= @stop_area.comment %>;<%= @stop_area.registration_number %>
diff --git a/app/views/api/hub/stop_area/physical_show.hub.erb b/app/views/api/hub/stop_area/physical_show.hub.erb
new file mode 100644
index 000000000..f2aee2e6d
--- /dev/null
+++ b/app/views/api/hub/stop_area/physical_show.hub.erb
@@ -0,0 +1 @@
+<%= @stop_area.id %>;<%= @stop_area.name %>;;<%= @type %>;<%= @stop_area.parent_id %>;<%= @stop_area.projection_x %>;<%= @stop_area.projection_y %>;<%= @stop_area.country_code %>;<%= @stop_area.country_code %>;<%= @stop_area.comment %>;<%= @stop_area.registration_number %>
diff --git a/app/views/api/hub/stops/show.hub.erb b/app/views/api/hub/stops/show.hub.erb
new file mode 100644
index 000000000..2bab51c97
--- /dev/null
+++ b/app/views/api/hub/stops/show.hub.erb
@@ -0,0 +1 @@
+<%= @stop.code %>;<%= @stop.name %>;<%= @stop.description if @stop.description? %>;<%= @stop.type %>;<%= @stop.short_name %>;<%= @stop.x %>;<%= @stop.y %>;<%= @stop.city %>;<%= @stop.administrative_code %>;<%= @stop.comment if @stop.comment? %>;<%= @stop.object_id %>
diff --git a/app/views/api/hub/time_tables/show.hub.erb b/app/views/api/hub/time_tables/show.hub.erb
new file mode 100644
index 000000000..a1c99a7ea
--- /dev/null
+++ b/app/views/api/hub/time_tables/show.hub.erb
@@ -0,0 +1 @@
+<%= @line.objectid %>;<%= @line.name %>;<%= @line.company.objectid %>;<%= @line.network.objectid %>
diff --git a/app/views/exports/_fields_hub_export.erb b/app/views/exports/_fields_hub_export.erb
new file mode 100644
index 000000000..f23d10780
--- /dev/null
+++ b/app/views/exports/_fields_hub_export.erb
@@ -0,0 +1,2 @@
+<%= form.input :start_date, :as => :date_picker %>
+<%= form.input :end_date, :as => :date_picker %>
diff --git a/app/views/help/exports.textile b/app/views/help/exports.textile
index c1da06a11..c82f8cea2 100644
--- a/app/views/help/exports.textile
+++ b/app/views/help/exports.textile
@@ -14,6 +14,7 @@ h3. Formats disponibles
- CSV := format tabulaire spécifique à Chouette (cf "CSV":csv)
- GTFS := format destiné à ["Google Transit":https://developers.google.com/transit/gtfs/?hl=fr] ; les données exportées en GTFS sont explicités ["ICI":http://www.normes-donnees-tc.org/format-dechange/autres-normes/]
- KML := format contenant l'ensemble des données cartographiées pouvant ainsi être importée dans un SIG
+- HUB := format tabulaire interne CityWay
h3. Options des formats
@@ -43,6 +44,15 @@ fixe le fuseau horaire (paramètre obligatoire des données GTFS)
* *CSV* : pas d'option particulière
+* *HUB* :
+
+- Début de période := permet d'exporter uniquement les courses circulant à partir de cette date
+- Fin de période := permet d'exporter uniquement les courses circulant jusqu'à cette date
+- Fuseau horaire :=
+fixe le fuseau horaire (paramètre obligatoire des données GTFS)
+ la valeur proposée par défaut est celle de l'espace de données =:
+
+
h3. Consultation des résultats
diff --git a/app/views/lines/_form.erb b/app/views/lines/_form.erb
index c844fbab4..554de3319 100644
--- a/app/views/lines/_form.erb
+++ b/app/views/lines/_form.erb
@@ -8,6 +8,8 @@
<%= form.input :registration_number %>
<%= form.input :number %>
<%= form.input :transport_mode, :as => :select, :collection => Chouette::Line.transport_modes, :include_blank => false, :member_label => Proc.new { |mode| t("transport_modes.label.#{mode}") } %>
+ <%= form.input :mobility_restricted_suitability, :as => :select, :collection => [[@line.human_attribute_name("accessible"), true], [@line.human_attribute_name("not_accessible"), false]], :include_blank => true %>
+ <%= form.input :flexible_service, :as => :select, :collection => [[@line.human_attribute_name("on_demaond_fs"), true], [@line.human_attribute_name("regular_fs"), false]], :include_blank => true %>
<%= form.input :comment %>
<%= form.input :objectid, :required => !@line.new_record? %>
<% end %>
diff --git a/app/views/lines/show.html.erb b/app/views/lines/show.html.erb
index d62be2066..2b9961ca2 100644
--- a/app/views/lines/show.html.erb
+++ b/app/views/lines/show.html.erb
@@ -40,6 +40,42 @@
<label><%= @line.human_attribute_name("transport_mode") %>: </label>
<%= t("transport_modes.label.#{@line.transport_mode}") %>
</p>
+
+ <p>
+ <label><%= @line.human_attribute_name("mobility_restricted_suitability") %> : </label>
+ <% if @line.mobility_restricted_suitability.nil? %>
+ <%= @line.human_attribute_name("unspecified_mrs") %>
+ <% elsif @line.mobility_restricted_suitability? %>
+ <%= @line.human_attribute_name("accessible") %>
+ <% else %>
+ <%= @line.human_attribute_name("not_accessible") %>
+ <% end %>
+ <br>&nbsp;&nbsp;<%= @line.human_attribute_name("number_of_mrs_vj") %> : <%= @line.vehicle_journeys.where("mobility_restricted_suitability = ?", true).count %>
+ <br>&nbsp;&nbsp;<%= @line.human_attribute_name("number_of_non_mrs_vj") %> : <%= @line.vehicle_journeys.where("mobility_restricted_suitability = ?", false).count %>
+ <br>&nbsp;&nbsp;<%= @line.human_attribute_name("number_of_null_mrs_vj") %> : <%= @line.vehicle_journeys.count -
+ (@line.vehicle_journeys.where("mobility_restricted_suitability = ?", true).count +
+ @line.vehicle_journeys.where("mobility_restricted_suitability = ?", false).count) %>
+ </p>
+ <p>
+ <label><%= @line.human_attribute_name("flexible_service") %> : </label>
+ <% if @line.flexible_service.nil? %>
+ <%= @line.human_attribute_name("unspecified_fs") %>
+ <% elsif @line.flexible_service? %>
+ <%= @line.human_attribute_name("on_demaond_fs") %>
+ <% else %>
+ <%= @line.human_attribute_name("regular_fs") %>
+ <% end %>
+ <br>&nbsp;&nbsp;<%= @line.human_attribute_name("number_of_fs_vj") %> : <%= @line.vehicle_journeys.where("flexible_service = ?", true).count %>
+ <br>&nbsp;&nbsp;<%= @line.human_attribute_name("number_of_non_fs_vj") %> : <%= @line.vehicle_journeys.where("flexible_service = ?", false).count %>
+ <br>&nbsp;&nbsp;<%= @line.human_attribute_name("number_of_null_fs_vj") %>
+ <% if @line.flexible_service.nil? %>
+ (<%= @line.human_attribute_name("default_fs_msg") %>)
+ <% end %>
+ : <%= @line.vehicle_journeys.count -
+ (@line.vehicle_journeys.where("flexible_service = ?", true).count +
+ @line.vehicle_journeys.where("flexible_service = ?", false).count) %>
+ </p>
+
<p>
<label><%= @line.human_attribute_name("comment") %>: </label>
<%= @line.comment %>
diff --git a/app/views/vehicle_journeys/_form.html.erb b/app/views/vehicle_journeys/_form.html.erb
index 530fce22e..859a9027a 100644
--- a/app/views/vehicle_journeys/_form.html.erb
+++ b/app/views/vehicle_journeys/_form.html.erb
@@ -5,6 +5,8 @@
<%= form.input :published_journey_identifier %>
<%= form.input :comment %>
<%= form.input :transport_mode_name, :as => :select, :collection => Chouette::Line.transport_modes, :include_blank => true, :member_label => Proc.new { |mode| t("transport_modes.label.#{mode}") } %>
+ <%= form.input :mobility_restricted_suitability, :as => :select, :collection => [[@vehicle_journey.human_attribute_name("accessible"), true], [@vehicle_journey.human_attribute_name("not_accessible"), false]], :include_blank => true %>
+ <%= form.input :flexible_service, :as => :select, :collection => [[@vehicle_journey.human_attribute_name("on_demaond_fs"), true], [@vehicle_journey.human_attribute_name("regular_fs"), false]], :include_blank => true %>
<%= form.input :status_value %>
<%= form.input :facility %>
<%= form.input :vehicle_type_identifier%>
diff --git a/app/views/vehicle_journeys/show.html.erb b/app/views/vehicle_journeys/show.html.erb
index e083e81e6..235268575 100644
--- a/app/views/vehicle_journeys/show.html.erb
+++ b/app/views/vehicle_journeys/show.html.erb
@@ -22,6 +22,28 @@
<label><%= @vehicle_journey.human_attribute_name("published_journey_identifier") %>: </label>
<%= @vehicle_journey.published_journey_identifier %>
</p>
+
+ <p>
+ <label><%= @vehicle_journey.human_attribute_name("mobility_restricted_suitability") %>: </label>
+ <% if @vehicle_journey.mobility_restricted_suitability.nil? %>
+ <%= @vehicle_journey.human_attribute_name("unspecified_mrs") %>
+ <% elsif @vehicle_journey.mobility_restricted_suitability? %>
+ <%= @vehicle_journey.human_attribute_name("accessible") %>
+ <% else %>
+ <%= @vehicle_journey.human_attribute_name("not_accessible") %>
+ <% end %>
+ </p>
+ <p>
+ <label><%= @vehicle_journey.human_attribute_name("flexible_service") %>: </label>
+ <% if @vehicle_journey.flexible_service.nil? %>
+ <%= @vehicle_journey.human_attribute_name("unspecified_fs") %>
+ <% elsif @vehicle_journey.flexible_service? %>
+ <%= @vehicle_journey.human_attribute_name("on_demaond_fs") %>
+ <% else %>
+ <%= @vehicle_journey.human_attribute_name("regular_fs") %>
+ <% end %>
+ </p>
+
<p>
<label><%= @vehicle_journey.human_attribute_name("comment") %>: </label>
<%= @vehicle_journey.comment %>