aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile.lock4
-rw-r--r--app/models/neptune_export.rb13
-rw-r--r--app/views/exports/_fields_neptune_export.erb2
-rw-r--r--config/locales/exports.yml15
-rw-r--r--db/migrate/20130710123351_set_accessibiliity_to_existing_stop_area.ninoxe_engine.rb17
-rw-r--r--db/schema.rb2
6 files changed, 48 insertions, 5 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index bdfb57160..872e18f6e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: git://github.com/dryade/georuby-ext.git
- revision: 014bb8903d08bdf9fb946e06ac757c8213158b88
+ revision: 69e3460141d831f0ad76780ee2b3f0a925a744f8
specs:
georuby-ext (0.0.2)
activesupport
@@ -15,7 +15,7 @@ GIT
GIT
remote: git://github.com/dryade/ninoxe.git
- revision: 8e555ff5bd94250c98940878c052f449f4d14d7f
+ revision: ae8291fe90073bf5f00fe26526c3aa0abc0b602b
specs:
ninoxe (0.1.2)
activerecord (~> 3.1)
diff --git a/app/models/neptune_export.rb b/app/models/neptune_export.rb
index fd429101c..ef26e27de 100644
--- a/app/models/neptune_export.rb
+++ b/app/models/neptune_export.rb
@@ -1,7 +1,18 @@
class NeptuneExport < Export
+ option :start_date
+ option :end_date
+
def export_options
- super.merge(:format => :neptune)
+ if (start_date.empty? && end_date.empty?)
+ super.merge(:format => :neptune).except(:start_date).except(:end_date)
+ elsif start_date.empty?
+ super.merge(:format => :neptune, :end_date => end_date).except(:start_date)
+ elsif end_date.empty?
+ super.merge(:format => :neptune, :start_date => start_date).except(:end_date)
+ else
+ super.merge(:format => :neptune, :start_date => start_date, :end_date => end_date)
+ end
end
end
diff --git a/app/views/exports/_fields_neptune_export.erb b/app/views/exports/_fields_neptune_export.erb
new file mode 100644
index 000000000..3ed863c20
--- /dev/null
+++ b/app/views/exports/_fields_neptune_export.erb
@@ -0,0 +1,2 @@
+ <%= form.input :start_date, :as => :date_picker %>
+ <%= form.input :end_date, :as => :date_picker %>
diff --git a/config/locales/exports.yml b/config/locales/exports.yml
index 41b3d891e..aaa2a1b7c 100644
--- a/config/locales/exports.yml
+++ b/config/locales/exports.yml
@@ -80,13 +80,21 @@ en:
attributes:
export:
status: "Status"
+ created_at: "Created on"
references_type: "Associated Data Type"
reference_ids: "Associated Data"
time_zone: "Time Zone"
+ start_date: "Start of period"
+ end_date: "End of period"
export_log_message:
created_at: "Date"
position: "N."
full_message: "Message"
+ formtastic:
+ hints:
+ time_zone: "according to TZ encoding (see http://en.wikipedia.org/wiki/Tz_database)"
+ start_date: "reduce import to vehicle journeys running from this date"
+ end_date: "reduce import to vehicle journeys running until this date"
fr:
exports:
actions:
@@ -169,13 +177,18 @@ fr:
attributes:
export:
status: "Status"
+ created_at: "Créé le"
references_type: "Type de données incluses"
reference_ids: "Données incluses"
time_zone: "Fuseau horaire"
+ start_date: "Début de période"
+ end_date: "Fin de période"
export_log_message:
created_at: "Date"
position: "No"
full_message: "Message"
formtastic:
hints:
- time_zone: "selon le codage TZ (http://fr.wikipedia.org/wiki/Tz_database)" \ No newline at end of file
+ time_zone: "selon le codage TZ (http://fr.wikipedia.org/wiki/Tz_database)"
+ start_date: "limite l'export aux courses circulant à partir de cette date"
+ end_date: "limite l'export aux courses circulant jusqu'à cette date" \ No newline at end of file
diff --git a/db/migrate/20130710123351_set_accessibiliity_to_existing_stop_area.ninoxe_engine.rb b/db/migrate/20130710123351_set_accessibiliity_to_existing_stop_area.ninoxe_engine.rb
new file mode 100644
index 000000000..d6511e833
--- /dev/null
+++ b/db/migrate/20130710123351_set_accessibiliity_to_existing_stop_area.ninoxe_engine.rb
@@ -0,0 +1,17 @@
+# This migration comes from ninoxe_engine (originally 20130710122648)
+class SetAccessibiliityToExistingStopArea < ActiveRecord::Migration
+ def up
+ Chouette::StopArea.all.each do |s|
+ if s.mobility_restricted_suitability.nil?
+ s.mobility_restricted_suitability = false
+ s.stairs_availability = false
+ s.lift_availability = false
+ s.int_user_needs = 0
+ s.save
+ end
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f967e6b0a..f6e27009d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130708084944) do
+ActiveRecord::Schema.define(:version => 20130710123351) do
create_table "access_links", :force => true do |t|
t.integer "access_point_id", :limit => 8