aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md8
-rw-r--r--Gemfile4
-rw-r--r--Gemfile.lock34
-rw-r--r--README.md6
-rw-r--r--app/assets/stylesheets/main/lines.css.scss16
-rw-r--r--app/helpers/application_helper.rb4
-rw-r--r--app/helpers/lines_helper.rb17
-rw-r--r--app/models/gtfs_export.rb12
-rw-r--r--app/views/companies/_form.erb2
-rw-r--r--app/views/companies/show.html.erb8
-rw-r--r--app/views/exports/_fields_gtfs_export.erb1
-rw-r--r--app/views/help/companies.textile4
-rw-r--r--app/views/help/export_format.textile1
-rw-r--r--app/views/help/introduction.textile2
-rw-r--r--app/views/help/lines.textile7
-rw-r--r--app/views/help/stop_areas.textile3
-rw-r--r--app/views/help/terms.textile7
-rw-r--r--app/views/lines/_form.erb3
-rw-r--r--app/views/lines/_line.erb9
-rw-r--r--app/views/lines/show.html.erb23
-rw-r--r--app/views/stop_areas/_form.html.erb2
-rw-r--r--app/views/stop_areas/show.html.erb8
-rw-r--r--config/deploy.rb8
-rw-r--r--config/deploy/production.rb3
-rw-r--r--config/deploy/sismo.rb1
-rw-r--r--config/deploy/staging.rb3
-rw-r--r--config/deploy/unstable.rb1
-rw-r--r--config/environment.rb2
-rw-r--r--config/environments/production.rb2
-rw-r--r--config/locales/companies.yml4
-rw-r--r--config/locales/exports.yml4
-rw-r--r--config/locales/lines.yml8
-rw-r--r--config/locales/stop_areas.yml4
-rw-r--r--db/migrate/20141105123536_add_gtfs_fields_to_companies.ninoxe_engine.rb9
-rw-r--r--db/migrate/20141105123537_add_gtfs_fields_to_stop_areas.ninoxe_engine.rb9
-rw-r--r--db/migrate/20141105123538_add_gtfs_fields_to_lines.ninoxe_engine.rb10
-rw-r--r--db/schema.rb9
-rw-r--r--lib/tasks/userdoc.rake23
-rw-r--r--public/help/2014-10-30_174529.pngbin21155 -> 45202 bytes
-rw-r--r--public/help/2014-10-30_175216.pngbin7580 -> 23399 bytes
-rw-r--r--public/help/2014-10-30_180131.pngbin13188 -> 26380 bytes
-rw-r--r--public/help/2014-10-30_180211.pngbin445555 -> 234379 bytes
-rw-r--r--public/help/2014-10-31_112140.pngbin388235 -> 224691 bytes
-rw-r--r--public/help/2014-10-31_113958.pngbin27583 -> 65653 bytes
-rw-r--r--public/help/2014-10-31_114639.pngbin14612 -> 90555 bytes
-rw-r--r--public/help/2014-10-31_115014.pngbin397153 -> 233933 bytes
-rw-r--r--public/help/2014-10-31_120428.pngbin22238 -> 72926 bytes
47 files changed, 225 insertions, 56 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 72dfe74ee..a854ae4b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,10 @@
-# Version 2.5.0 (en cours)
+# Version 2.5.1 (14/11/14)
+* Nouvelles foctionnalités
+ * Reprise des imports/exports GTFS
+ * Ajout des couleurs de lignes
+ * Ajouts de champs pour les échanges GTFS
+
+# Version 2.5.0 (23/10/14)
* Nouvelles foctionnalités
* Ajout d'un lien de création d'objet dans la page de consultation (Mantis 26415)
* Ajout d'un lien vers l'accueil dans le bandeau (Mantis 26820)
diff --git a/Gemfile b/Gemfile
index 46fc73fd4..dd02e8afe 100644
--- a/Gemfile
+++ b/Gemfile
@@ -74,9 +74,9 @@ gem 'google-analytics-rails'
gem 'will_paginate', '~> 3.0'
gem 'ransack'
gem 'squeel'
-#gem 'ninoxe', :git => 'https://github.com/afimb/ninoxe.git', :branch => :sismo
+#gem 'ninoxe', :git => 'https://github.com/afimb/ninoxe.git'
#gem 'ninoxe',:path => '~/workspace/chouette/ninoxe'
-gem 'ninoxe', '~> 1.1.0'
+gem 'ninoxe', '~> 1.1.1'
gem 'acts_as_list', '0.1.6'
gem "acts_as_tree-1.8", '1.1.0', :require => "acts_as_tree"
diff --git a/Gemfile.lock b/Gemfile.lock
index 78128d3d1..bbfc5d34b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -28,10 +28,10 @@ GEM
activesupport (= 3.2.18)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activerecord-jdbc-adapter (1.3.9)
+ activerecord-jdbc-adapter (1.3.11)
activerecord (>= 2.2)
- activerecord-jdbcpostgresql-adapter (1.3.9)
- activerecord-jdbc-adapter (~> 1.3.9)
+ activerecord-jdbcpostgresql-adapter (1.3.11)
+ activerecord-jdbc-adapter (~> 1.3.11)
jdbc-postgres (>= 9.1)
activeresource (3.2.18)
activemodel (= 3.2.18)
@@ -50,7 +50,8 @@ GEM
arel (3.0.3)
bcrypt-ruby (3.0.1)
bcrypt-ruby (3.0.1-java)
- bouncy-castle-java (1.5.0146.1)
+ bourne (1.5.0)
+ mocha (>= 0.13.2, < 0.15)
breadcrumbs_on_rails (2.3.0)
builder (3.0.4)
calendar_helper (0.2.5)
@@ -103,7 +104,7 @@ GEM
actionmailer (~> 3.0)
devise (>= 2.1.0)
railties (~> 3.0)
- diff-lcs (1.2.1)
+ diff-lcs (1.2.5)
dr-apartment (0.14.1)
dr-ffi-proj4 (0.0.3)
ffi (>= 1.0.0)
@@ -153,7 +154,7 @@ GEM
inherited_resources (1.4.1)
has_scope (~> 0.6.0.rc)
responders (~> 1.0.0.rc)
- jdbc-postgres (9.3.1101)
+ jdbc-postgres (9.3.1102)
journey (1.0.4)
jquery-rails (2.2.1)
railties (>= 3.0, < 5.0)
@@ -165,12 +166,11 @@ GEM
jquery-rails
jquery-ui-rails (= 4.0.3)
railties (>= 3.1.0)
- jruby-jars (1.7.15)
- jruby-openssl (0.7.7)
- bouncy-castle-java (>= 1.5.0146.1)
+ jruby-jars (1.7.16.1)
+ jruby-openssl (0.9.5-java)
jruby-rack (1.1.16)
- jruby-rack-worker (0.4-java)
- jruby-rack (>= 1.1.1)
+ jruby-rack-worker (0.10.0)
+ jruby-rack (>= 1.1.10)
json (1.8.1)
json (1.8.1-java)
language_engine (0.0.5)
@@ -186,7 +186,10 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
map_layers (0.0.4)
+ metaclass (0.0.1)
mime-types (1.25.1)
+ mocha (0.14.0)
+ metaclass (~> 0.0.1)
modernizr-rails (2.0.6)
morrisjs-rails (0.4.3)
railties (> 3.1, < 5)
@@ -198,7 +201,7 @@ GEM
net-ssh (2.6.2)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
- ninoxe (1.1.0)
+ ninoxe (1.1.1)
activerecord (~> 3.2.13)
acts-as-taggable-on (>= 3)
acts_as_list (>= 0.1.6)
@@ -321,8 +324,9 @@ GEM
multi_json (~> 1.0)
rubyzip (~> 1.0)
websocket (~> 1.0)
- shoulda-matchers (1.2.0)
+ shoulda-matchers (1.5.6)
activesupport (>= 3.0.0)
+ bourne (~> 1.3)
simple_form (2.1.1)
actionpack (~> 3.0)
activemodel (~> 3.0)
@@ -340,7 +344,7 @@ GEM
polyamorous (~> 1.1.0)
therubyracer (0.10.2)
libv8 (~> 3.3.10)
- therubyrhino (2.0.1)
+ therubyrhino (2.0.4)
therubyrhino_jar (>= 1.7.3)
therubyrhino_jar (1.7.4)
thor (0.19.1)
@@ -411,7 +415,7 @@ DEPENDENCIES
map_layers (= 0.0.4)
modernizr-rails (~> 2.0.6)
morrisjs-rails
- ninoxe (~> 1.1.0)
+ ninoxe (~> 1.1.1)
pg (~> 0.11.0)
rabl
rails (= 3.2.18)
diff --git a/README.md b/README.md
index cc60251f0..b23eb3e2e 100644
--- a/README.md
+++ b/README.md
@@ -65,9 +65,9 @@ Assume Linux user is myuser and its group mygroup (that user is the one who star
sudo mkdir -p /usr/local/opt/chouette-command/
sudo chown -R myuser:mygroup /usr/local/opt/chouette-command/
cd /usr/local/opt/chouette-command/
-wget http://maven.chouette.cityway.fr/fr/certu/chouette/chouette-gui-command/2.5.0/chouette-gui-command-2.5.0.zip
-unzip chouette-gui-command-2.5.0.zip
-cd chouette-cmd_2.5.0
+wget http://maven.chouette.cityway.fr/fr/certu/chouette/chouette-gui-command/2.5.1/chouette-gui-command-2.5.1.zip
+unzip chouette-gui-command-2.5.1.zip
+cd chouette-cmd_2.5.1
sudo chmod a+w .
```
diff --git a/app/assets/stylesheets/main/lines.css.scss b/app/assets/stylesheets/main/lines.css.scss
index 3ce3c50e0..6e2f14dc5 100644
--- a/app/assets/stylesheets/main/lines.css.scss
+++ b/app/assets/stylesheets/main/lines.css.scss
@@ -23,20 +23,24 @@
#workspace.lines.edit, #workspace.lines.new, #workspace.lines.create, #workspace.lines.update
{
- #line_color{ width: 100px;
+ #line_color_old{ width: 100px;
color: white;
font-weight: bold;}
}
#workspace.lines.show
{
- .line_color{ color: white;
- font-weight: bold;
- padding: 0 5px 0 5px;}
-
- .summary p label {
+ .summary p
+ {
+ label {
font-weight: bold;
+ }
+ .color
+ {
+ padding: 3px 15px 3px 15px;
+ }
}
+
.group_of_line {
.position {
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a3808cfc1..a74fa15da 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -39,9 +39,9 @@ module ApplicationHelper
when path.include?("/lines")
"lines"
when path.include?("/access_points")
- "access_points"
+ "access_points_links"
when path.include?("/access_links")
- "access_links"
+ "access_points_links"
when path.include?("/stop_areas")
"stop_areas"
when path.include?("/connection_links")
diff --git a/app/helpers/lines_helper.rb b/app/helpers/lines_helper.rb
index a03868a0a..623d091ca 100644
--- a/app/helpers/lines_helper.rb
+++ b/app/helpers/lines_helper.rb
@@ -1,2 +1,19 @@
module LinesHelper
+
+ def line_sticker( line)
+ return line.name if line.number.blank?
+ line.number
+ end
+
+ def colors?(line)
+ line.text_color.present? || line.color.present?
+ end
+
+ def text_color(line)
+ line.text_color.blank? ? "black" : "##{line.text_color}"
+ end
+
+ def background_color(line)
+ line.color.blank? ? "white" : "#"+line.color
+ end
end
diff --git a/app/models/gtfs_export.rb b/app/models/gtfs_export.rb
index 6f43a93eb..6ee83098f 100644
--- a/app/models/gtfs_export.rb
+++ b/app/models/gtfs_export.rb
@@ -2,21 +2,27 @@ class GtfsExport < Export
validates_presence_of :time_zone
option :time_zone
+ option :object_id_prefix
- after_initialize :init_time_zone
+ after_initialize :init_params
def references_types
[ Chouette::Line, Chouette::Network, Chouette::Company, Chouette::StopArea ]
end
- def init_time_zone
+ def init_params
if time_zone.nil?
self.time_zone = "Paris"
end
end
def export_options
- super.merge(:format => :gtfs, :time_zone => ActiveSupport::TimeZone.find_tzinfo(time_zone).name)
+ opts = super.merge(:format => :gtfs, :time_zone => ActiveSupport::TimeZone.find_tzinfo(time_zone).name)
+ if object_id_prefix.present?
+ opts = opts.merge(:object_id_prefix => object_id_prefix)
+ end
+ puts opts.inspect
+ opts
end
end
diff --git a/app/views/companies/_form.erb b/app/views/companies/_form.erb
index 6f89edbbc..f23edbef9 100644
--- a/app/views/companies/_form.erb
+++ b/app/views/companies/_form.erb
@@ -8,6 +8,8 @@
<%= form.input :phone, :as => :phone %>
<%= form.input :fax, :as => :phone %>
<%= form.input :email, :as => :email %>
+ <%= form.input :time_zone, :include_blank => true %>
+ <%= form.input :url %>
<%= form.input :registration_number, :input_html => { :title => t("formtastic.titles.company.registration_number")} %>
<%= form.input :objectid, :required => !@company.new_record?, :input_html => { :title => t("formtastic.titles.company.objectid")} %>
<% end %>
diff --git a/app/views/companies/show.html.erb b/app/views/companies/show.html.erb
index 0c8585a6c..513b0364e 100644
--- a/app/views/companies/show.html.erb
+++ b/app/views/companies/show.html.erb
@@ -32,6 +32,14 @@
<%= @company.email %>
</p>
<p>
+ <label><%= Chouette::Company.human_attribute_name("time_zone") %>: </label>
+ <%= @company.time_zone %>
+ </p>
+ <p>
+ <label><%= Chouette::Company.human_attribute_name("url") %>: </label>
+ <%= @company.url %>
+ </p>
+ <p>
<label><%= Chouette::Company.human_attribute_name("registration_number") %>: </label>
<%= @company.registration_number %>
</p>
diff --git a/app/views/exports/_fields_gtfs_export.erb b/app/views/exports/_fields_gtfs_export.erb
index 60ffd21c8..3ec95c181 100644
--- a/app/views/exports/_fields_gtfs_export.erb
+++ b/app/views/exports/_fields_gtfs_export.erb
@@ -1 +1,2 @@
<%= form.input :time_zone, :as => :time_zone, :input_html => { :title => t("formtastic.titles.export.time_zone")} %>
+<%= form.input :object_id_prefix, :input_html => { :value => @referential.prefix ,:title => t("formtastic.titles.export.object_id_prefix")} %> \ No newline at end of file
diff --git a/app/views/help/companies.textile b/app/views/help/companies.textile
index 26fcc1882..72edd0b00 100644
--- a/app/views/help/companies.textile
+++ b/app/views/help/companies.textile
@@ -41,10 +41,12 @@ h3. Attributs d'un transporteur
* Nom court : nom abrégé du transporteur
* Nom d'unité : nom de l'unité de gestion dans la société de transport
* Nom du département : nom du département dans la société de transport
-* Code postal : code postal de l'adresse de la société de transport
+* Code : code de la société de transport
* Numéro de téléphone : Numéro de téléphone de l'unité de gestion
* Numéro de fax : Numéro de fax de l'unité de gestion
* Email : adresse électronique de l'unité de gestion de l'unité de gestion
+* Fuseau horaire : fuseau horaire applicable aux courses de ce transporteur (si différent de celui de l'espace de données)
+* Page web associée : adresse http ou https de la page du site public décrivant le transporteur
* Numéro d'enregistrement : code référençant un transporteur au sein d'une autorité supérieure
diff --git a/app/views/help/export_format.textile b/app/views/help/export_format.textile
index 5e3c5b108..f60d20661 100644
--- a/app/views/help/export_format.textile
+++ b/app/views/help/export_format.textile
@@ -27,6 +27,7 @@ Les options des différents formats apparaissent en fonction de celui qui a étÃ
** 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
* *GTFS* :
+** Préfixe d'identifiant Neptune à ignorer : Lorsque ce préfixe est rencontré dans l'identifiant Neptune, celui-ci n'est pas utilisé pour générer l'identifiant GTFS . La valeur proposée par défaut est celle de l'espace de données.
** 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.
** Données incluses (complément) : le choix des arrêts permet de n'exporter que les fichiers d'arrêts (stops.txt) et de correspondances (transfers.txt). 3 champs sont alors ajoutés : l'adresse, la localité et le code postal; ceux-ci seront exploités en retour sur l'import GTFS d'arrêts.
* *NeTex* : pas d'option particulière
diff --git a/app/views/help/introduction.textile b/app/views/help/introduction.textile
index 050c2f0c4..b9c6e0f02 100644
--- a/app/views/help/introduction.textile
+++ b/app/views/help/introduction.textile
@@ -17,7 +17,7 @@ D'autres utilisateurs potentiels sont également identifiés : services de l'ét
h3. Ce que vous trouverez dans ce manuel
Vous trouverez dans ce document, toutes les informations nécessaires à la prise en main de l’application.
-Le manuel couvre la version 2.5.0.
+Le manuel couvre la version 2.5.1.
diff --git a/app/views/help/lines.textile b/app/views/help/lines.textile
index 9c6b13d57..2415b5ace 100644
--- a/app/views/help/lines.textile
+++ b/app/views/help/lines.textile
@@ -52,12 +52,15 @@ Dans le menu latéral situé à droite, un lien _"activer la sélection multiple
h3. Attributs d'une ligne
* Réseau : réseau d'appartenance de la ligne
-* Transporteur : transporteur principal exploitant la ligne. Dans le cas où plusieurs transporteurs assurent le service d'une même ligne, les autres transporteurs peuvent être référencés au niveau de chaque course
+* Transporteur : transporteur principal exploitant la ligne. Dans le cas où plusieurs transporteurs assurent le service d'une même ligne, les autres transporteurs peuvent être référencés au niveau de chaque course
* Nom : nom de la ligne
* Nom public : nom de la ligne connu des usagers
* Numéro d'enregistrement : code référençant une ligne au sein d'une autorité supérieure
-* Indice : indice de la ligne [préciser]
+* Indice : indice ou numéro de la ligne (ce champ n'est pas obligatoirement numérique)
* Mode de transport : mode de transport principal de la ligne. Le cas échéant, d'autres modes de transports particuliers peuvent être indiqués au niveau de chaque course.
+* Couleur du tracé : couleur en rvb hexadécimal du tracé de ligne et du fond de texte
+* Couleur de texte : couleur en rvb hexadécimal du texte du nom de la ligne
+* Page web associée : adresse http ou https de la page du site public décrivant la ligne
* Accessibilité PMR : précise si la ligne est équipée PMR
* Transport à la demande : précise si la ligne est en exploitation à la demande ou pas [préciser si c'est également définissable au niveau de la course]
* Commentaire : zone de texte libre sur la ligne
diff --git a/app/views/help/stop_areas.textile b/app/views/help/stop_areas.textile
index f171e7d76..70d0f904c 100644
--- a/app/views/help/stop_areas.textile
+++ b/app/views/help/stop_areas.textile
@@ -76,6 +76,9 @@ h3. Attributs d'un arrêt
* Code INSEE : code INSEE de la commune de l'arrêt
* Zone tarifaire : zone de tarification applicable à cet arrêt
* Numéro d'enregistrement : code référençant un arrêt au sein d'une autorité supérieure
+* Fuseau horaire : fuseau horaire applicable à cet arrêt (si différent de celui de l'espace de données)
+* Page web associée : adresse http ou https de la page du site public décrivant l'arrêt
+
* Position X : coordonnée horizontale de l'arrêt dans le référentiel de projection de l'espace de données
* Position Y : coordonnée verticale de l'arrêt dans le référentiel de projection de l'espace de données
diff --git a/app/views/help/terms.textile b/app/views/help/terms.textile
new file mode 100644
index 000000000..aa6c345d3
--- /dev/null
+++ b/app/views/help/terms.textile
@@ -0,0 +1,7 @@
+---
+layout: default
+title: Glossaire
+---
+
+p. à renseigner
+
diff --git a/app/views/lines/_form.erb b/app/views/lines/_form.erb
index c1f59ed01..0e393ac53 100644
--- a/app/views/lines/_form.erb
+++ b/app/views/lines/_form.erb
@@ -8,6 +8,9 @@
<%= form.input :registration_number, :input_html => { :title => t("formtastic.titles.line.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 :color, :as => :string %>
+ <%= form.input :text_color %>
+ <%= form.input :url %>
<%= 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 %>
diff --git a/app/views/lines/_line.erb b/app/views/lines/_line.erb
index f5606d907..24450fa20 100644
--- a/app/views/lines/_line.erb
+++ b/app/views/lines/_line.erb
@@ -12,7 +12,14 @@
<h5>
<%= check_box_tag "ids[]", line.id, false, :class => "multiple_selection", :style => "display: none;" %>
<% if line.number and line.number.length <= 3 %>
- <span class="label label-default line_number"><%= line.number %></span>
+ <% if !line.text_color.blank? || !line.color.blank? %>
+ <% text_color = line.text_color.blank? ? "black" : "##{line.text_color}" %>
+ <% bg_color = line.color.blank? ? "white" : "##{line.color}" %>
+ <% number_style = "color: #{text_color}; background-color: #{bg_color};" %>
+ <% else %>
+ <% number_style = "" %>
+ <% end %>
+ <span class="label label-default line_number" style="<%= number_style %>"><%= line.number %></span>
<% end %>
<%= link_to([@referential, line], :class => "preview", :title => "#{Chouette::Line.model_name.human.capitalize} #{line.name}") do %>
<span class="name">
diff --git a/app/views/lines/show.html.erb b/app/views/lines/show.html.erb
index 24eebd794..12af00ff7 100644
--- a/app/views/lines/show.html.erb
+++ b/app/views/lines/show.html.erb
@@ -1,9 +1,20 @@
+<% text_color = @line.text_color.blank? ? "black" : "##{@line.text_color}" %>
+<% bg_color = @line.color.blank? ? "white" : "#"+@line.color %>
+
<%= title_tag t('lines.show.title', :line => @line.name ) %>
<div class="line_show">
<%= @map.to_html %>
<div class="summary">
+<% text_color = @line.text_color.blank? ? "black" : "##{@line.text_color}" %>
+<% bg_color = @line.color.blank? ? "white" : "#"+@line.color %>
+ <% if colors?(@line) %>
+ <p>
+ <label><%= t('lines.index.color') %>: </label>
+ <label class="color" style='<%="color: #{text_color(@line)}; background-color: #{background_color(@line)};"%>'><%= line_sticker(@line) %></label>
+ </p>
+ <% end %>
<p>
<label><%= @line.human_attribute_name(:network) %>: </label>
<% if @line.network.nil? %>
@@ -21,6 +32,10 @@
<% end %>
</p>
<p>
+ <label><%= @line.human_attribute_name("number") %>: </label>
+ <%= @line.number %>
+ </p>
+ <p>
<label><%= @line.human_attribute_name("published_name") %>: </label>
<%= @line.published_name %>
</p>
@@ -29,13 +44,13 @@
<%= @line.registration_number %>
</p>
<p>
- <label><%= @line.human_attribute_name("number") %>: </label>
- <%= @line.number %>
- </p>
- <p>
<label><%= @line.human_attribute_name("transport_mode") %>: </label>
<%= t("transport_modes.label.#{@line.transport_mode}") %>
</p>
+ <p>
+ <label><%= @line.human_attribute_name("url") %>: </label>
+ <%= @line.url %>
+ </p>
<p>
<label><%= @line.human_attribute_name("mobility_restricted_suitability") %> : </label>
diff --git a/app/views/stop_areas/_form.html.erb b/app/views/stop_areas/_form.html.erb
index d108ef193..9fd549e18 100644
--- a/app/views/stop_areas/_form.html.erb
+++ b/app/views/stop_areas/_form.html.erb
@@ -35,6 +35,8 @@
<%= form.input :fare_code, :as => :number %>
<%= form.input :nearest_topic_name %>
<%= form.input :comment, :as => :text, :input_html => { :rows => 5 } %>
+ <%= form.input :time_zone, :include_blank => true %>
+ <%= form.input :url %>
<% end %>
</div>
<div class="pmr_info">
diff --git a/app/views/stop_areas/show.html.erb b/app/views/stop_areas/show.html.erb
index 3a6d88207..7ca59cf70 100644
--- a/app/views/stop_areas/show.html.erb
+++ b/app/views/stop_areas/show.html.erb
@@ -34,6 +34,14 @@
<%= @stop_area.fare_code %>
</p>
<p>
+ <label><%= @stop_area.human_attribute_name("time_zone") %>: </label>
+ <%= @stop_area.time_zone %>
+ </p>
+ <p>
+ <label><%= @stop_area.human_attribute_name("url") %>: </label>
+ <%= @stop_area.url %>
+ </p>
+ <p>
<label><%= @stop_area.human_attribute_name("registration_number") %>: </label>
<%= @stop_area.registration_number %>
</p>
diff --git a/config/deploy.rb b/config/deploy.rb
index 4d7e28009..1d5782462 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -5,6 +5,7 @@ set :stages, %w(sandbox unstable staging production sismo)
set :application, "chouette2"
set :scm, :git
set :repository, "https://github.com/afimb/chouette2.git"
+set :maven_repo, "http://maven.chouette.cityway.fr"
set :deploy_to, "/var/www/chouette2"
set :use_sudo, false
default_run_options[:pty] = true
@@ -12,7 +13,7 @@ set :group_writable, true
set :rake, "bundle exec rake"
set :keep_releases, 4
set :rails_env, "production" #added for delayed job
-set :user, "ldonnet"
+set :user, "metienne"
set :deploy_via, :copy
set :copy_via, :scp
set :copy_exclude, ".git/*"
@@ -67,6 +68,11 @@ namespace :deploy do
run "mkdir -p /var/lib/chouette/exports"
run "mkdir -p /var/lib/chouette/validations"
run "mkdir -p /usr/local/opt/chouette-command/"
+ run "cd /usr/local/opt/chouette-command && rm -f chouette-gui-command-#{gui_cmd}.zip"
+ run "cd /usr/local/opt/chouette-command && wget #{maven_repo}/fr/certu/chouette/chouette-gui-command/#{gui_cmd}/chouette-gui-command-#{gui_cmd}.zip"
+ run "cd /usr/local/opt/chouette-command && rm -rf chouette-cmd_#{gui_cmd}"
+ run "cd /usr/local/opt/chouette-command && unzip chouette-gui-command-#{gui_cmd}.zip"
+ run "cd /usr/local/opt/chouette-command/chouette-cmd_#{gui_cmd} && chmod a+w . && sudo chgrp -R wheel ."
end
desc "Make group writable all deployed files"
diff --git a/config/deploy/production.rb b/config/deploy/production.rb
index 872dfbf1a..57d36de2d 100644
--- a/config/deploy/production.rb
+++ b/config/deploy/production.rb
@@ -1,2 +1,3 @@
server "chouette.cityway.fr", :app, :web, :db, :primary => true
-set :branch, "V2_4"
+set :branch, "V2_5"
+set :gui_cmd, "2.5.1" \ No newline at end of file
diff --git a/config/deploy/sismo.rb b/config/deploy/sismo.rb
index a8cb59006..4e7c6cd57 100644
--- a/config/deploy/sismo.rb
+++ b/config/deploy/sismo.rb
@@ -1,2 +1,3 @@
server "chouette-sismo.marseille.cityway.fr", :app, :web, :db, :primary => true
set :branch, "V2_5"
+set :gui_cmd, "2.5.1"
diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb
index 3a288164b..e8f79cac6 100644
--- a/config/deploy/staging.rb
+++ b/config/deploy/staging.rb
@@ -3,4 +3,5 @@ set :deploy_via, :copy
set :copy_cache, true
set :copy_via, :scp
set :copy_exclude, ".git/*"
-set :branch, "V2_4"
+set :branch, "V2_5"
+set :gui_cmd, "2.5.1" \ No newline at end of file
diff --git a/config/deploy/unstable.rb b/config/deploy/unstable.rb
index d8d5d30bc..e8fe08e75 100644
--- a/config/deploy/unstable.rb
+++ b/config/deploy/unstable.rb
@@ -1,2 +1,3 @@
server "chouette-p.aix.cityway.fr", :app, :web, :db, :primary => true
set :branch, "V2_5"
+set :gui_cmd, "2.5.1" \ No newline at end of file
diff --git a/config/environment.rb b/config/environment.rb
index cc2b4fa95..cc5593ce1 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -6,4 +6,4 @@ require File.expand_path('../application', __FILE__)
ChouetteIhm::Application.initialize!
# Fix version
-APP_VERSION = '2.5.0'
+APP_VERSION = '2.5.1'
diff --git a/config/environments/production.rb b/config/environments/production.rb
index de408f29f..a320dc448 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -152,7 +152,7 @@ ChouetteIhm::Application.configure do
# paths for external resources
config.to_prepare do
Devise::Mailer.layout "mailer"
- Chouette::Command.command = ENV['CHOUETTE_GUI_COMMAND'].nil? ? "/usr/local/opt/chouette-command/chouette-cmd_2.5.0/chouette" : ENV['CHOUETTE_GUI_COMMAND']
+ Chouette::Command.command = ENV['CHOUETTE_GUI_COMMAND'].nil? ? "/usr/local/opt/chouette-command/chouette-cmd_2.5.1/chouette" : ENV['CHOUETTE_GUI_COMMAND']
ImportTask.root = "/var/lib/chouette/imports"
Export.root = "/var/lib/chouette/exports"
end
diff --git a/config/locales/companies.yml b/config/locales/companies.yml
index aad451fc8..a9b2512a2 100644
--- a/config/locales/companies.yml
+++ b/config/locales/companies.yml
@@ -32,6 +32,8 @@ en:
phone: "Phone number"
fax: "Fax number"
email: "Email"
+ time_zone: "Time zone"
+ url: "Web page"
objectid: "Neptune identifier"
object_version: "Version"
creation_time: "Created on"
@@ -76,6 +78,8 @@ fr:
phone: "Numéro de téléphone"
fax: "Numéro de fax"
email: "Email"
+ time_zone: "Fuseau horaire"
+ url: "Page web associée"
objectid: "Identifiant Neptune"
object_version: "Version"
creation_time: "Créé le"
diff --git a/config/locales/exports.yml b/config/locales/exports.yml
index 7b1531314..6ade85762 100644
--- a/config/locales/exports.yml
+++ b/config/locales/exports.yml
@@ -106,6 +106,7 @@ en:
time_zone: "Time Zone"
start_date: "Start of period"
end_date: "End of period"
+ object_id_prefix: "objectId prefix to be ignored"
export_log_message:
created_at: "Date"
position: "N."
@@ -114,6 +115,7 @@ en:
titles:
export:
time_zone: "according to TZ encoding (see http://en.wikipedia.org/wiki/Tz_database)"
+ object_id_prefix: "when prefix has this value, it will be removed to build GTFS id"
start_date: "reduce import to vehicle journeys running from this date"
end_date: "reduce import to vehicle journeys running until this date"
area_types:
@@ -229,6 +231,7 @@ fr:
time_zone: "Fuseau horaire"
start_date: "Début de période"
end_date: "Fin de période"
+ object_id_prefix: "Préfixe d'identifiant Neptune à ignorer"
export_log_message:
created_at: "Date"
position: "No"
@@ -237,6 +240,7 @@ fr:
titles:
export:
time_zone: "selon le codage TZ (http://fr.wikipedia.org/wiki/Tz_database)"
+ object_id_prefix: "lorsque le préfixe d'identifiant Netpune prend cette valeur, il n'est pas utilisé pour composer l'identifiant GTFS"
start_date: "limite l'export aux courses circulant à partir de cette date"
end_date: "limite l'export aux courses circulant jusqu'à cette date"
area_types:
diff --git a/config/locales/lines.yml b/config/locales/lines.yml
index 93f50b6bb..98d93bcd2 100644
--- a/config/locales/lines.yml
+++ b/config/locales/lines.yml
@@ -37,6 +37,7 @@ en:
deselect_all: "Deselect all"
unset: "undefined"
advanced_search: "Advanced Search"
+ color: "Colors"
form:
group_of_lines: "Associated groups of lines"
no_group_of_line: "No group of line"
@@ -56,6 +57,9 @@ en:
published_name: "Published name"
number: "Number"
transport_mode: "Transport mode"
+ url: "Web page"
+ color: "Line color"
+ text_color: "Text color"
mobility_restricted_suitability: "PRM accessibility"
flexible_service: "On demond transportation"
unspecified_mrs: "Not specified"
@@ -123,6 +127,7 @@ fr:
deselect_all: "Tout désélectionner"
unset: "non défini"
advanced_search: "Recherche avancée"
+ color: "Couleurs"
form:
group_of_lines: "Groupes de lignes associés"
no_group_of_line: "Aucun groupe de lignes"
@@ -142,6 +147,9 @@ fr:
published_name: "Nom public"
number: "Indice"
transport_mode: "Mode de transport"
+ url: "Page web associée"
+ color: "Couleur du tracé"
+ text_color: "Couleur du texte"
mobility_restricted_suitability: "Accessibilité PMR"
flexible_service: "Transport à la demande"
unspecified_mrs: "Non spécifié"
diff --git a/config/locales/stop_areas.yml b/config/locales/stop_areas.yml
index 80f05d57c..379838f6e 100644
--- a/config/locales/stop_areas.yml
+++ b/config/locales/stop_areas.yml
@@ -93,6 +93,8 @@ en:
long_lat_type: "Projection type"
longitude: "Longitude"
latitude: "Latitude"
+ time_zone: "Time zone"
+ url: "Web page"
objectid: "Neptune identifier"
object_version: "Version"
creation_time: "Created on"
@@ -209,6 +211,8 @@ fr:
long_lat_type: "Projection"
longitude: "Longitude"
latitude: "Latitude"
+ time_zone: "Fuseau horaire"
+ url: "Page web associée"
objectid: "Identifiant Neptune"
object_version: "Version"
creation_time: "Créé le"
diff --git a/db/migrate/20141105123536_add_gtfs_fields_to_companies.ninoxe_engine.rb b/db/migrate/20141105123536_add_gtfs_fields_to_companies.ninoxe_engine.rb
new file mode 100644
index 000000000..67ad43660
--- /dev/null
+++ b/db/migrate/20141105123536_add_gtfs_fields_to_companies.ninoxe_engine.rb
@@ -0,0 +1,9 @@
+# This migration comes from ninoxe_engine (originally 20141017075349)
+class AddGtfsFieldsToCompanies < ActiveRecord::Migration
+ def change
+ change_table :companies do |t|
+ t.string :url
+ t.string :time_zone
+ end
+ end
+end
diff --git a/db/migrate/20141105123537_add_gtfs_fields_to_stop_areas.ninoxe_engine.rb b/db/migrate/20141105123537_add_gtfs_fields_to_stop_areas.ninoxe_engine.rb
new file mode 100644
index 000000000..e7ea5f4d6
--- /dev/null
+++ b/db/migrate/20141105123537_add_gtfs_fields_to_stop_areas.ninoxe_engine.rb
@@ -0,0 +1,9 @@
+# This migration comes from ninoxe_engine (originally 20141017075515)
+class AddGtfsFieldsToStopAreas < ActiveRecord::Migration
+ def change
+ change_table :stop_areas do |t|
+ t.string :url
+ t.string :time_zone
+ end
+ end
+end
diff --git a/db/migrate/20141105123538_add_gtfs_fields_to_lines.ninoxe_engine.rb b/db/migrate/20141105123538_add_gtfs_fields_to_lines.ninoxe_engine.rb
new file mode 100644
index 000000000..ca960df76
--- /dev/null
+++ b/db/migrate/20141105123538_add_gtfs_fields_to_lines.ninoxe_engine.rb
@@ -0,0 +1,10 @@
+# This migration comes from ninoxe_engine (originally 20141017075627)
+class AddGtfsFieldsToLines < ActiveRecord::Migration
+ def change
+ change_table :lines do |t|
+ t.string :url
+ t.string :color, :limit => 6
+ t.string :text_color, :limit => 6
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 6c45bd44a..89cbf7d87 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20140820074844) do
+ActiveRecord::Schema.define(:version => 20141105123538) do
create_table "access_links", :force => true do |t|
t.integer "access_point_id", :limit => 8
@@ -85,6 +85,8 @@ ActiveRecord::Schema.define(:version => 20140820074844) do
t.string "fax"
t.string "email"
t.string "registration_number"
+ t.string "url"
+ t.string "time_zone"
end
add_index "companies", ["objectid"], :name => "companies_objectid_key", :unique => true
@@ -282,6 +284,9 @@ ActiveRecord::Schema.define(:version => 20140820074844) do
t.boolean "mobility_restricted_suitability"
t.integer "int_user_needs"
t.boolean "flexible_service"
+ t.string "url"
+ t.string "color", :limit => 6
+ t.string "text_color", :limit => 6
end
add_index "lines", ["objectid"], :name => "lines_objectid_key", :unique => true
@@ -394,6 +399,8 @@ ActiveRecord::Schema.define(:version => 20140820074844) do
t.integer "int_user_needs"
t.string "zip_code"
t.string "city_name"
+ t.string "url"
+ t.string "time_zone"
end
add_index "stop_areas", ["objectid"], :name => "stop_areas_objectid_key", :unique => true
diff --git a/lib/tasks/userdoc.rake b/lib/tasks/userdoc.rake
index df72c32e4..8f93644c7 100644
--- a/lib/tasks/userdoc.rake
+++ b/lib/tasks/userdoc.rake
@@ -27,16 +27,21 @@ namespace :doc do
Dir.chdir "tmp/doc"
system "pandoc -s -o ../../userdoc.docx temp.textile"
- # clean working directory
- puts "clean temp files"
- Dir.chdir "../.."
- FileUtils.rm_r("tmp/doc") if File.exist?("tmp/doc")
-
- # patch docx
- patch_docx "userdoc.docx"
+ if !File.exists?("userdoc.docx")
+ puts "pandoc failed to produce document"
+ else
+ # patch docx
+ patch_docx "userdoc.docx"
+
+ # clean working directory
+ puts "clean temp files"
+ Dir.chdir "../.."
+ FileUtils.rm_r("tmp/doc") if File.exist?("tmp/doc")
+
+ # end job
+ puts "User doc completed"
+ end
- # end job
- puts "User doc completed"
end
def merge_textiles
diff --git a/public/help/2014-10-30_174529.png b/public/help/2014-10-30_174529.png
index 24c4a6e7a..f9d84d802 100644
--- a/public/help/2014-10-30_174529.png
+++ b/public/help/2014-10-30_174529.png
Binary files differ
diff --git a/public/help/2014-10-30_175216.png b/public/help/2014-10-30_175216.png
index dcb0a9a2a..42c31aaca 100644
--- a/public/help/2014-10-30_175216.png
+++ b/public/help/2014-10-30_175216.png
Binary files differ
diff --git a/public/help/2014-10-30_180131.png b/public/help/2014-10-30_180131.png
index 2924629b5..728962cbf 100644
--- a/public/help/2014-10-30_180131.png
+++ b/public/help/2014-10-30_180131.png
Binary files differ
diff --git a/public/help/2014-10-30_180211.png b/public/help/2014-10-30_180211.png
index 1cf52e9de..6f405d672 100644
--- a/public/help/2014-10-30_180211.png
+++ b/public/help/2014-10-30_180211.png
Binary files differ
diff --git a/public/help/2014-10-31_112140.png b/public/help/2014-10-31_112140.png
index ad1f75954..acd42eb85 100644
--- a/public/help/2014-10-31_112140.png
+++ b/public/help/2014-10-31_112140.png
Binary files differ
diff --git a/public/help/2014-10-31_113958.png b/public/help/2014-10-31_113958.png
index f333bf7a0..e7187ca5f 100644
--- a/public/help/2014-10-31_113958.png
+++ b/public/help/2014-10-31_113958.png
Binary files differ
diff --git a/public/help/2014-10-31_114639.png b/public/help/2014-10-31_114639.png
index 0f673eaeb..961d78d86 100644
--- a/public/help/2014-10-31_114639.png
+++ b/public/help/2014-10-31_114639.png
Binary files differ
diff --git a/public/help/2014-10-31_115014.png b/public/help/2014-10-31_115014.png
index fa62cff4d..51cde139f 100644
--- a/public/help/2014-10-31_115014.png
+++ b/public/help/2014-10-31_115014.png
Binary files differ
diff --git a/public/help/2014-10-31_120428.png b/public/help/2014-10-31_120428.png
index b8f9b2d1a..60bfcaf78 100644
--- a/public/help/2014-10-31_120428.png
+++ b/public/help/2014-10-31_120428.png
Binary files differ