aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile.lock2
-rw-r--r--app/assets/stylesheets/main/stop_areas.css.scss9
-rw-r--r--app/assets/stylesheets/vendor/map_layers.css.scss1
-rw-r--r--app/controllers/connection_link_areas_controller.rb8
-rw-r--r--app/controllers/time_table_combinations_controller.rb9
-rw-r--r--app/inputs/search_stop_area_input.rb38
-rw-r--r--app/models/time_table_combination.rb8
-rw-r--r--app/models/vehicle_journey_export.rb12
-rw-r--r--app/views/access_links/_form.html.erb2
-rw-r--r--app/views/access_links/show.html.erb6
-rw-r--r--app/views/companies/_form.erb4
-rw-r--r--app/views/companies/show.html.erb9
-rw-r--r--app/views/connection_links/_form.erb2
-rw-r--r--app/views/connection_links/select_areas.html.erb35
-rw-r--r--app/views/connection_links/show.html.erb6
-rw-r--r--app/views/exports/_fields_gtfs_export.erb2
-rw-r--r--app/views/exports/_fields_hub_export.erb4
-rw-r--r--app/views/exports/_fields_neptune_export.erb4
-rw-r--r--app/views/group_of_lines/_form.erb2
-rw-r--r--app/views/group_of_lines/show.html.erb7
-rw-r--r--app/views/help/index.textile13
-rw-r--r--app/views/help/lines.textile2
-rw-r--r--app/views/help/routes.textile6
-rw-r--r--app/views/help/time_tables.textile41
-rw-r--r--app/views/help/vehicle_journeys.textile9
-rw-r--r--app/views/import_tasks/_fields_gtfs_import.erb8
-rw-r--r--app/views/journey_patterns/_form.html.erb2
-rw-r--r--app/views/journey_patterns/show.html.erb4
-rw-r--r--app/views/lines/_form.erb4
-rw-r--r--app/views/lines/show.html.erb9
-rw-r--r--app/views/networks/_form.erb4
-rw-r--r--app/views/networks/show.html.erb7
-rw-r--r--app/views/referentials/_clean.html.erb2
-rw-r--r--app/views/referentials/_form.erb8
-rw-r--r--app/views/routes/_form.html.erb2
-rw-r--r--app/views/routes/show.html.erb5
-rw-r--r--app/views/stop_areas/_form.html.erb101
-rw-r--r--app/views/time_table_combinations/_combine.html.erb1
-rw-r--r--app/views/time_table_combinations/create_failure.js.erb5
-rw-r--r--app/views/time_table_combinations/create_success.js.erb (renamed from app/views/time_table_combinations/create.js.erb)3
-rw-r--r--app/views/time_tables/_form.erb2
-rw-r--r--app/views/time_tables/_show_time_table.html.erb4
-rw-r--r--app/views/vehicle_journeys/_form.html.erb3
-rw-r--r--app/views/vehicle_journeys/show.html.erb8
-rw-r--r--config/environment.rb2
-rw-r--r--config/environments/production.rb2
-rw-r--r--config/locales/access_links.yml4
-rw-r--r--config/locales/clean_ups.yml4
-rw-r--r--config/locales/companies.yml4
-rw-r--r--config/locales/connection_links.yml4
-rw-r--r--config/locales/exports.yml18
-rw-r--r--config/locales/group_of_lines.yml4
-rw-r--r--config/locales/import_tasks.yml4
-rw-r--r--config/locales/journey_patterns.yml4
-rw-r--r--config/locales/lines.yml4
-rw-r--r--config/locales/networks.yml4
-rw-r--r--config/locales/referentials.yml4
-rw-r--r--config/locales/routes.yml4
-rw-r--r--config/locales/stop_areas.yml18
-rw-r--r--config/locales/time_tables.yml4
-rw-r--r--config/locales/vehicle_journeys.yml6
61 files changed, 285 insertions, 232 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index 66e76c29c..03309d76a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/afimb/ninoxe.git
- revision: 5bb26096ba96661c684c76c05dac05deda877937
+ revision: abee1ec401e4f8f44528620225e2db2c06e1c97f
branch: sismo
specs:
ninoxe (1.1.0)
diff --git a/app/assets/stylesheets/main/stop_areas.css.scss b/app/assets/stylesheets/main/stop_areas.css.scss
index 74f8e0277..26aada5fd 100644
--- a/app/assets/stylesheets/main/stop_areas.css.scss
+++ b/app/assets/stylesheets/main/stop_areas.css.scss
@@ -27,17 +27,20 @@
legend { padding-bottom: 20px; }
#prefetch {
- padding: 10px 10px 30px 10px;
+ padding: 10px 10px 20px 10px;
label{
- font-size: 18px;
- margin-right: 20px;
+ font-size: 16px;
+ margin-right: 25px;
}
+
+ input{ width: 330px; }
}
#map{
float:none;
width: 100%;
+ height: 450px;
}
}
diff --git a/app/assets/stylesheets/vendor/map_layers.css.scss b/app/assets/stylesheets/vendor/map_layers.css.scss
index 7d9972038..835417ddc 100644
--- a/app/assets/stylesheets/vendor/map_layers.css.scss
+++ b/app/assets/stylesheets/vendor/map_layers.css.scss
@@ -6,4 +6,5 @@ p.after_map {
float: right;
width: 400px;
height: 400px;
+ border: 1px solid gray;
} \ No newline at end of file
diff --git a/app/controllers/connection_link_areas_controller.rb b/app/controllers/connection_link_areas_controller.rb
index 40f029801..eceb1b0fc 100644
--- a/app/controllers/connection_link_areas_controller.rb
+++ b/app/controllers/connection_link_areas_controller.rb
@@ -10,7 +10,13 @@ class ConnectionLinkAreasController < ChouetteController
def areas_maps
areas.collect do |area|
- { :id => area.id.to_s, :name => "#{area.name} #{area.country_code}" }
+ { :id => area.id.to_s,
+ :name => area.name,
+ :country_code => area.country_code,
+ :zip_code => area.zip_code || "",
+ :city_name => area.city_name || "",
+ :area_type => t("area_types.label.#{area.area_type.underscore}")
+ }
end
end
diff --git a/app/controllers/time_table_combinations_controller.rb b/app/controllers/time_table_combinations_controller.rb
index eb41dc2e1..baaf90fec 100644
--- a/app/controllers/time_table_combinations_controller.rb
+++ b/app/controllers/time_table_combinations_controller.rb
@@ -7,15 +7,18 @@ class TimeTableCombinationsController < ChouetteController
def create
@time_table_combination = TimeTableCombination.new( params[:time_table_combination].merge( :source_id => parent.id))
+ #@time_table = parent
@year = params[:year] ? params[:year].to_i : Date.today.cwyear
if @time_table_combination.valid?
begin
- @time_table_combination.combine
+ @time_table = @time_table_combination.combine
flash[:notice] = t('time_table_combinations.success')
- rescue
+ render "create_success"
+ rescue Exception=> e
+ Rails.logger.error "Error: #{e}"
flash[:error] = t('time_table_combinations.failure')
+ render "create_failure"
end
- parent.reload
end
end
diff --git a/app/inputs/search_stop_area_input.rb b/app/inputs/search_stop_area_input.rb
new file mode 100644
index 000000000..e51b31bf8
--- /dev/null
+++ b/app/inputs/search_stop_area_input.rb
@@ -0,0 +1,38 @@
+class SearchStopAreaInput < Formtastic::Inputs::SearchInput
+
+ def search
+ if options[:json]
+ template.content_tag( :script,
+ ("$(document).ready(function() {
+ $('##{dom_id}').tokenInput('#{options[:json]}', {
+ crossDomain: false,
+ tokenLimit: 1,
+ minChars: 3,
+ hintText: '#{options[:hint_text]}',
+ noResultsText: '#{options[:no_result_text]}',
+ searchingText: '#{options[:searching_text]}',
+ resultsFormatter: function(item){ return '<li><div class=\"name\">' + item.name + '</div><div class=\"info\">' + item.area_type + '</div><div class=\"info\">' + item.zip_code + ' ' + item.city_name + '</div></li>' },
+ tokenFormatter: function(item) { return '<li><p>' + item.name + '</p></li>' }
+ });
+ });").html_safe)
+ end
+ end
+
+ def to_html
+ input_wrapping do
+ label_html <<
+ builder.search_field(method, input_html_options) <<
+ search
+ end
+ end
+
+ def input_html_options
+ super.merge({
+ :required => nil,
+ :autofocus => nil,
+ :class => 'token-input',
+ 'data-model-name' => object.class.model_name.human
+ })
+ end
+
+end
diff --git a/app/models/time_table_combination.rb b/app/models/time_table_combination.rb
index 26fb38fbe..85ab20bb7 100644
--- a/app/models/time_table_combination.rb
+++ b/app/models/time_table_combination.rb
@@ -3,7 +3,7 @@ class TimeTableCombination
include ActiveModel::Conversion
extend ActiveModel::Naming
- attr_accessor :source_id, :combined_id, :combined_name, :operation, :status
+ attr_accessor :source_id, :combined_id, :combined_name, :operation
validates_presence_of :source_id, :combined_id, :operation, :combined_name
validates_inclusion_of :operation, :in => %w( union intersection disjunction)
@@ -14,7 +14,6 @@ class TimeTableCombination
self.combined_name = nil
self.operation = nil
self.errors.clear
- self.status = false
end
def valid?(context = nil)
@@ -35,7 +34,6 @@ class TimeTableCombination
attributes.each do |name, value|
send("#{name}=", value)
end
- self.status = false
end
def persisted?
@@ -43,7 +41,6 @@ class TimeTableCombination
end
def combine
- self.status = false
source = Chouette::TimeTable.find( source_id)
combined = Chouette::TimeTable.find( combined_id)
if operation == "union"
@@ -55,8 +52,7 @@ class TimeTableCombination
else
raise "unknown operation"
end
- source.save
- self.status = true
+ source
end
end
diff --git a/app/models/vehicle_journey_export.rb b/app/models/vehicle_journey_export.rb
index 653e339d9..7f5577e22 100644
--- a/app/models/vehicle_journey_export.rb
+++ b/app/models/vehicle_journey_export.rb
@@ -15,13 +15,19 @@ class VehicleJourneyExport
def persisted?
false
end
+
+ def vehicle_journey_at_stops_matrix
+ (vehicle_journeys.collect{ |vj| vj.vehicle_journey_at_stops.collect(&:departure_time).collect{|time| time.strftime("%H:%M")} }).transpose
+ end
def to_csv(options = {})
- CSV.generate(options) do |csv|
- vehicle_journey_at_stops_matrix = (vehicle_journeys.collect{ |vj| vj.vehicle_journey_at_stops.collect(&:departure_time).collect{|time| time.strftime("%H:%M")} }).transpose
+ CSV.generate(options) do |csv|
csv << column_names
route.stop_points.each_with_index do |stop_point, index|
- csv << [stop_point.id, stop_point.stop_area.name] + vehicle_journey_at_stops_matrix[index]
+ puts vehicle_journey_at_stops_matrix[index].inspect
+
+ times = vehicle_journey_at_stops_matrix[index].present? ? vehicle_journey_at_stops_matrix[index] : []
+ csv << [stop_point.id, stop_point.stop_area.name] + times
end
end
end
diff --git a/app/views/access_links/_form.html.erb b/app/views/access_links/_form.html.erb
index 4de6e8e85..b0138c1bd 100644
--- a/app/views/access_links/_form.html.erb
+++ b/app/views/access_links/_form.html.erb
@@ -10,7 +10,7 @@
<%= form.input :mobility_restricted_suitability,:as => :boolean %>
<%= form.input :stairs_availability,:as => :boolean %>
<%= form.input :lift_availability,:as => :boolean %>
- <%= form.input :objectid, :required => !@access_link.new_record? %>
+ <%= form.input :objectid, :required => !@access_link.new_record?, :input_html => { :title => t("formtastic.titles.access_link.objectid")} %>
<%= form.inputs :name => t('access_links.show.durations') do %>
<%= form.input :default_duration, :as => :extended_time_picker, :size => 8, :step => :seconds, :label => @access_link.human_attribute_name("default_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
<%= form.input :frequent_traveller_duration, :as => :extended_time_picker, :size => 8, :step => :seconds, :include_seconds => true, :label => @access_link.human_attribute_name("frequent_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
diff --git a/app/views/access_links/show.html.erb b/app/views/access_links/show.html.erb
index a318a84c6..79294bb38 100644
--- a/app/views/access_links/show.html.erb
+++ b/app/views/access_links/show.html.erb
@@ -13,7 +13,7 @@
<%= link_to @access_link.stop_area.name, [@referential, @access_link.stop_area] %>
</p>
<p>
- <label><%= @access_link.human_attribute_name("name") %>: </label>
+ <label><%= @access_link.human_attribute_name(:name) %>: </label>
<%= @access_link.name %>
</p>
<p>
@@ -67,10 +67,6 @@
<label><%= @access_link.human_attribute_name("lift_availability") %>: </label>
<%= t((@access_link.lift_availability == true).to_s) %>
</p>
- <p>
- <label><%= @access_link.human_attribute_name("objectid") %>: </label>
- <%= @access_link.objectid %>
- </p>
</div>
</div>
diff --git a/app/views/companies/_form.erb b/app/views/companies/_form.erb
index c4fb90ee1..6f89edbbc 100644
--- a/app/views/companies/_form.erb
+++ b/app/views/companies/_form.erb
@@ -8,8 +8,8 @@
<%= form.input :phone, :as => :phone %>
<%= form.input :fax, :as => :phone %>
<%= form.input :email, :as => :email %>
- <%= form.input :registration_number %>
- <%= form.input :objectid, :required => !@company.new_record? %>
+ <%= 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 %>
<%= form.actions do %>
diff --git a/app/views/companies/show.html.erb b/app/views/companies/show.html.erb
index 844832ee1..0ac132511 100644
--- a/app/views/companies/show.html.erb
+++ b/app/views/companies/show.html.erb
@@ -1,10 +1,10 @@
<%= title_tag t('companies.show.title', :company => @company.name) %>
-<div class="line_show">
+<div class="company_show">
<div class="summary">
<p>
- <label><%= Chouette::Company.human_attribute_name("name") %>: </label>
+ <label><%= @company.human_attribute_name(:name) %>: </label>
<%= @company.name %>
</p>
<p>
@@ -39,15 +39,12 @@
<label><%= Chouette::Company.human_attribute_name("registration_number") %>: </label>
<%= @company.registration_number %>
</p>
- <p>
- <label><%= Chouette::Company.human_attribute_name("objectid") %>: </label>
- <%= @company.objectid %>
- </p>
</div>
</div>
<% content_for :sidebar do %>
<ul class="actions">
+ <li><%= link_to t('companies.actions.new'), new_referential_company_path(@referential), :class => "add" %></li>
<li><%= link_to t('companies.actions.edit'), edit_referential_company_path(@referential, @company), :class => "edit" %></li>
<li><%= link_to t('companies.actions.destroy'), referential_company_path(@referential, @company), :method => :delete, :data => {:confirm => t('companies.actions.destroy_confirm')}, :class => "remove" %></li>
<br>
diff --git a/app/views/connection_links/_form.erb b/app/views/connection_links/_form.erb
index 41eef1480..fdc6ce018 100644
--- a/app/views/connection_links/_form.erb
+++ b/app/views/connection_links/_form.erb
@@ -9,7 +9,7 @@
<%= form.input :stairs_availability,:as => :boolean %>
<%= form.input :lift_availability,:as => :boolean %>
- <%= form.input :objectid, :required => !@connection_link.new_record? %>
+ <%= form.input :objectid, :required => !@connection_link.new_record?, :input_html => { :title => t("formtastic.titles.connection_link.objectid")} %>
<% end %>
<%= form.inputs :name => t('connection_links.show.durations') do %>
<%= form.input :default_duration, :as => :extended_time_picker, :size => 8, :step => :seconds, :label => @connection_link.human_attribute_name("default_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
diff --git a/app/views/connection_links/select_areas.html.erb b/app/views/connection_links/select_areas.html.erb
index ac1a95dab..f2c9cc883 100644
--- a/app/views/connection_links/select_areas.html.erb
+++ b/app/views/connection_links/select_areas.html.erb
@@ -3,8 +3,8 @@
<%= semantic_form_for [@referential, @connection_link] do |form| %>
<div>
<%= form.inputs do %>
- <%= form.input :departure_id, :as => :text, :input_html => { :"data-pre" => ( @departure.present? ? [ { :id => @departure.id.to_s, :name => "#{@departure.name} [#{@departure.country_code}]" } ]: [] ).to_json } %>
- <%= form.input :arrival_id, :as => :text, :input_html => { :"data-pre" => ( @arrival.present? ? [ { :id => @arrival.id.to_s, :name => "#{@arrival.name} [#{@arrival.country_code}]" } ]: [] ).to_json } %>
+ <%= form.input :departure_id, :as => :search_stop_area, :json => referential_connection_link_connection_link_areas_path(@referential, @connection_link, :format => :json), :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :input_html => { :"data-pre" => ( @departure.present? ? [ { :id => @departure.id.to_s, :name => "#{@departure.name}" } ]: [] ).to_json } %>
+ <%= form.input :arrival_id, :as => :search_stop_area, :json => referential_connection_link_connection_link_areas_path(@referential, @connection_link, :format => :json), :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :input_html => { :"data-pre" => ( @arrival.present? ? [ { :id => @arrival.id.to_s, :name => "#{@arrival.name}" } ]: [] ).to_json } %>
<% end %>
<%= form.actions do %>
@@ -13,34 +13,3 @@
<% end %>
</div>
<% end %>
-
-<script>
- $(function() {
- $( "#connection_link_departure_id" ).tokenInput('<%= referential_connection_link_connection_link_areas_path(@referential, @connection_link, :format => :json) %>', {
- crossDomain: false,
- prePopulate: $('#connection_link_departure_id').data('pre'),
- tokenLimit: 1,
- minChars: 3,
- hintText: '<%= t('search_hint') %>',
- noResultsText: '<%= t('no_result_text') %>',
- searchingText: '<%= t('searching_term') %>'
- });
- });
-
- $(function() {
- $( "#connection_link_arrival_id" ).tokenInput('<%= referential_connection_link_connection_link_areas_path(@referential, @connection_link, :format => :json) %>', {
- crossDomain: false,
- prePopulate: $('#connection_link_arrival_id').data('pre'),
- tokenLimit: 1,
- minChars: 3,
- hintText: '<%= t('search_hint') %>',
- noResultsText: '<%= t('no_result_text') %>',
- searchingText: '<%= t('searching_term') %>'
- });
- });
-</script>
-
-<% content_for :sidebar do %>
-<ul class="actions">
-</ul>
-<% end %>
diff --git a/app/views/connection_links/show.html.erb b/app/views/connection_links/show.html.erb
index a41112621..70547bda1 100644
--- a/app/views/connection_links/show.html.erb
+++ b/app/views/connection_links/show.html.erb
@@ -21,7 +21,7 @@
<% end %>
</p>
<p>
- <label><%= @connection_link.human_attribute_name("name") %>: </label>
+ <label><%= @connection_link.human_attribute_name(:name) %>: </label>
<%= @connection_link.name %>
</p>
<p>
@@ -75,10 +75,6 @@
<label><%= @connection_link.human_attribute_name("lift_availability") %>: </label>
<%= t((@connection_link.lift_availability == true).to_s) %>
</p>
- <p>
- <label><%= @connection_link.human_attribute_name("objectid") %>: </label>
- <%= @connection_link.objectid %>
- </p>
</div>
</div>
diff --git a/app/views/exports/_fields_gtfs_export.erb b/app/views/exports/_fields_gtfs_export.erb
index 89d7bbf37..60ffd21c8 100644
--- a/app/views/exports/_fields_gtfs_export.erb
+++ b/app/views/exports/_fields_gtfs_export.erb
@@ -1 +1 @@
-<%= form.input :time_zone, :as => :time_zone %>
+<%= form.input :time_zone, :as => :time_zone, :input_html => { :title => t("formtastic.titles.export.time_zone")} %>
diff --git a/app/views/exports/_fields_hub_export.erb b/app/views/exports/_fields_hub_export.erb
index f23d10780..fc7cf7112 100644
--- a/app/views/exports/_fields_hub_export.erb
+++ b/app/views/exports/_fields_hub_export.erb
@@ -1,2 +1,2 @@
-<%= form.input :start_date, :as => :date_picker %>
-<%= form.input :end_date, :as => :date_picker %>
+<%= form.input :start_date, :as => :date_picker, :input_html => { :title => t("formtastic.titles.export.start_date")} %>
+<%= form.input :end_date, :as => :date_picker, :input_html => { :title => t("formtastic.titles.export.end_date")} %>
diff --git a/app/views/exports/_fields_neptune_export.erb b/app/views/exports/_fields_neptune_export.erb
index 3ed863c20..d4debb6f2 100644
--- a/app/views/exports/_fields_neptune_export.erb
+++ b/app/views/exports/_fields_neptune_export.erb
@@ -1,2 +1,2 @@
- <%= form.input :start_date, :as => :date_picker %>
- <%= form.input :end_date, :as => :date_picker %>
+ <%= form.input :start_date, :as => :date_picker, :input_html => { :title => t("formtastic.titles.export.start_date")} %>
+ <%= form.input :end_date, :as => :date_picker, :input_html => { :title => t("formtastic.titles.export.end_date")} %>
diff --git a/app/views/group_of_lines/_form.erb b/app/views/group_of_lines/_form.erb
index b92fa1ea1..3c685964b 100644
--- a/app/views/group_of_lines/_form.erb
+++ b/app/views/group_of_lines/_form.erb
@@ -2,7 +2,7 @@
<%= form.inputs do %>
<%= form.input :name %>
<%= form.input :comment %>
- <%= form.input :objectid, :required => !@group_of_line.new_record? %>
+ <%= form.input :objectid, :required => !@group_of_line.new_record?, :input_html => { :title => t("formtastic.titles.group_of_line.objectid")} %>
<% end %>
<%= form.inputs do %>
diff --git a/app/views/group_of_lines/show.html.erb b/app/views/group_of_lines/show.html.erb
index 5e77bfe78..e5923d539 100644
--- a/app/views/group_of_lines/show.html.erb
+++ b/app/views/group_of_lines/show.html.erb
@@ -4,17 +4,13 @@
<%= @map.to_html %>
<div class="summary">
<p>
- <label><%= @group_of_line.human_attribute_name("name") %>: </label>
+ <label><%= @group_of_line.human_attribute_name(:name) %>: </label>
<%= @group_of_line.name %>
</p>
<p>
<label><%= @group_of_line.human_attribute_name("comment") %>: </label>
<%= @group_of_line.comment %>
</p>
- <p>
- <label><%= @group_of_line.human_attribute_name("objectid") %>: </label>
- <%= @group_of_line.objectid %>
- </p>
</div>
<p class="after_map" />
@@ -31,6 +27,7 @@
<% content_for :sidebar do %>
<ul class="actions">
+ <li><%= link_to t('group_of_lines.actions.new'), new_referential_group_of_line_path(@referential), :class => "add" %></li>
<li><%= link_to t('group_of_lines.actions.edit'), edit_referential_group_of_line_path(@referential, @group_of_line), :class => "edit" %></li>
<li><%= link_to t('group_of_lines.actions.destroy'), referential_group_of_line_path(@referential, @group_of_line), :method => :delete, :data => {:confirm => t('group_of_lines.actions.destroy_confirm')} , :class => "remove" %></li>
<br>
diff --git a/app/views/help/index.textile b/app/views/help/index.textile
index 3e0af420b..943634ecc 100644
--- a/app/views/help/index.textile
+++ b/app/views/help/index.textile
@@ -3,7 +3,7 @@ layout: default
title: Chouette v2
---
-Version 2.4.1
+Version 2.5.0
h3. Logiciel libre propriété de :
@@ -24,6 +24,17 @@ A cet égard l'attention de l'utilisateur est attirée sur les risques associé
h3. Notes de version
+h4. Version 2.5.0
+
+* Evolutions :
+** Ajout de tags sur les calendriers (Mantis 26833)
+** Gestion de dates exclues sur les calendriers (Mantis 26837)
+** Fonctions de combinaisons de calendriers (Mantis 26838)
+** Recherches multi-critères pour les calendriers et les arrêts (Mantis 26829, 26834)
+** Localisation des arrêts par résolution d'adresse (Mantis 26825)
+** Attributs PMR et TAD sur les lignes (Mantis 26846)
+** Saisie des latitudes et longitudes sur un seul champ (Mantis 26827)
+
h4. Version 2.4.1
* Corrections des anomalies suivantes :
diff --git a/app/views/help/lines.textile b/app/views/help/lines.textile
index 4b35d2b61..518f9dc9a 100644
--- a/app/views/help/lines.textile
+++ b/app/views/help/lines.textile
@@ -23,6 +23,8 @@ les autres transporteurs de la lignes peuvent être référencés au niveau de c
mode de transport principal de la ligne
d'autres modes de transports particuliers peuvent être indiqués au niveau de chaque course
=:
+- 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
- Commentaire := zone de texte libre sur la ligne
- Groupes de lignes := "groupes de lignes":group_of_lines auxquels appartient la ligne
diff --git a/app/views/help/routes.textile b/app/views/help/routes.textile
index c422be1ad..43a7fc14d 100644
--- a/app/views/help/routes.textile
+++ b/app/views/help/routes.textile
@@ -17,7 +17,7 @@ h3. Attributs
- Direction := orientation principale (points cardinaux, circulaire ou aller/retour)
- Indice := numéro de la séquence d'arrêts
- Sens := aller ou retour
-- Itinéraire associé en sens opposé := référence de l'itinéraire de sens opposé associé
+- Séquence d'arrêts associée en sens opposé := référence de la séquence d'arrêts de sens opposé associée
p(attr_data). Données de gestion :
@@ -36,7 +36,3 @@ il est possible aussi de ne renseigner que l'identifiant technique, auquel cas l
- Version := version de l'objet (auto incrémenté à chaque modification)
- Créé par := compte utilisateur ayant procédé à la dernière modification
-h3. Implémentation
-
-p. TODO
-
diff --git a/app/views/help/time_tables.textile b/app/views/help/time_tables.textile
index 87e04b37f..28a217a4c 100644
--- a/app/views/help/time_tables.textile
+++ b/app/views/help/time_tables.textile
@@ -14,6 +14,7 @@ Les calendriers sont caractérisés par :
* une liste de quantièmes (jours calendaires dans l'année)
* une liste de jours d'application (lundis, mardis, etc.)
* une liste de périodes sur lesquelles s'appliquent les jours d'application
+* une liste de dates à exclure des périodes.
L'utilisateur doit donc faire attention au nommage de ses différents calendriers d'application.
@@ -23,15 +24,25 @@ Ainsi, il est possible de construire des calendriers d'application qui sont ensu
h3. Attributs
-- Commentaire := Description du calendrier
-- Version := version du calendrier (différent de la version de l'objet)
-- Jours d'application := jours de la semaine effectivement applicables dans le cas où des périodes sont définies dans le calendrier
+- Nom := Description du calendrier
+- Abréviation := Code abrégé
+- Etiquettes :=
+Marqueurs caractérisant le calendrier (pour simplifier la recherche)
+Afin d'être enregistrées, les étiquettes doivent être saisiées séparées par une ',' (virgule) et la touche 'tab' permet d'activer la dernière.
+Un assistant propose les étiquettes déjà saisies sur d'autres calendriers.
+=:
- Périodes d'application := périodes calendaires durant lesquelles le calendrier est applicable
-- Dates d'application :=
+- Jours d'application := jours de la semaine effectivement applicables dans le cas où des périodes sont définies dans le calendrier
+- Dates particulières :=
dates spécifiques pour lesquelles le calendrier est applicable;
ces dates peuvent être ajoutées dans ou en dehors des périodes calendaires.
Un calendrier peut n'avoir que des dates calendaires, auquel cas les jours d'applications n'ont pas de signification
=:
+- Dates exclues :=
+dates spécifiques à retirer des dates définies par les périodes et les jours d'application;
+une même date calendaire ne peut pas être à la fois particulière et exclue;
+une date exclue hors périodes et jours d'application n'a aucun effet.
+=:
p(attr_data). Données de gestion :
@@ -50,7 +61,25 @@ il est possible aussi de ne renseigner que l'identifiant technique, auquel cas l
- Version := version de l'objet (auto incrémenté à chaque modification)
- Créé par := compte utilisateur ayant procédé à la dernière modification
-h3. Implémentation
+h3. Opérations particulières
+
+Lors de la consultation d'un calendrier, 2 opérations particulières sont disponibles : *Dupliquer* et *Combiner*
+
+h4. Duplication
+
+La duplication d'un calendrier consiste à créer un calendrier copie conforme du calendrier consulté à l'exception du nom et de l'identifiant Neptune
+
+* le nom est précédé de "Copie de"
+* l'identifiant Neptune est complété par un numéro secondaire "_n" où n est la valeur minimale non présente dans l'Espace de données.
+
+Une fois la duplication effectuée, le double est enregistré en base et affiché en mode édition afin de permettre à l'opérateur de l'adapter à ses besoins.
+
+h4. Combinaisons
+
+La combinaison de calendriers consiste à modifier le calendrier consulté à l'aide d'un autre; les opérations sont :
-p. TODO
+- ajouter les dates := les dates et périodes du second calendrier sont ajoutées au premier
+- conserver les dates commune := seules les dates et périodes communes aux 2 calendriers sont conservées
+- soustraire les dates := les dates communes aux 2 calendriers sont retirées du premier
+L'opération est effectuée en base et ne nécessite pas d'action de sauvegarde.
diff --git a/app/views/help/vehicle_journeys.textile b/app/views/help/vehicle_journeys.textile
index d5186cf57..7deafd73b 100644
--- a/app/views/help/vehicle_journeys.textile
+++ b/app/views/help/vehicle_journeys.textile
@@ -10,11 +10,16 @@ De plus, la course est rattachée à un nombre variable de "calendriers d'applic
h3. Attributs
-- Nom := nom de la course
+- Numéro := numéro de la course
- Nom public := nom public pour les voyageurs
+- Identifiant public := identifiant public
- Commentaire := zone de texte libre
- Mode de transport := mode de transport pour la course; par défaut, c'est le mode de transport de la ligne qui est appliqué
-- Particularité := champs libre pouvant préciser des modes de fonctionnement (TAD par exemple)
+- Accessibilité PMR := précise si la course est équipée PMR
+- Transport à la demande := précise si la course est en exploitation à la demande ou pas
+- Etat de trafic := état de trafic
+- Equipement := équipement
+- Type d'identifiant du véhicule := type d'identifiant du véhicule
p(attr_data). Données de gestion :
diff --git a/app/views/import_tasks/_fields_gtfs_import.erb b/app/views/import_tasks/_fields_gtfs_import.erb
index 460f6cc9b..70ffb207a 100644
--- a/app/views/import_tasks/_fields_gtfs_import.erb
+++ b/app/views/import_tasks/_fields_gtfs_import.erb
@@ -1,7 +1,7 @@
<%= form.input :object_id_prefix, :input_html => { :value => @referential.prefix } %>
-<%= form.input :max_distance_for_commercial , :as => :number , :input_html => { :title => t("formtastic.hints.import_task.max_distance_for_commercial"), :value => 50 } %>
-<%= form.input :ignore_last_word , :as => :boolean , :input_html => { :title => t("formtastic.hints.import_task.ignore_last_word"), :value => false }%>
-<%= form.input :ignore_end_chars , :as => :number , :input_html => { :title => t("formtastic.hints.import_task.ignore_end_chars"), :value => 0 }%>
-<%= form.input :max_distance_for_connection_link , :as => :number , :input_html => { :title => t("formtastic.hints.import_task.max_distance_for_connection_link"), :value => 100 }%>
+<%= form.input :max_distance_for_commercial , :as => :number , :input_html => { :title => t("formtastic.titles.import_task.max_distance_for_commercial"), :value => 50 } %>
+<%= form.input :ignore_last_word , :as => :boolean , :input_html => { :title => t("formtastic.titles.import_task.ignore_last_word"), :value => false }%>
+<%= form.input :ignore_end_chars , :as => :number , :input_html => { :title => t("formtastic.titles.import_task.ignore_end_chars"), :value => 0 }%>
+<%= form.input :max_distance_for_connection_link , :as => :number , :input_html => { :title => t("formtastic.titles.import_task.max_distance_for_connection_link"), :value => 100 }%>
diff --git a/app/views/journey_patterns/_form.html.erb b/app/views/journey_patterns/_form.html.erb
index 771283885..361f7f380 100644
--- a/app/views/journey_patterns/_form.html.erb
+++ b/app/views/journey_patterns/_form.html.erb
@@ -5,7 +5,7 @@
<%= form.input :registration_number %>
<%= form.input :comment %>
<%= form.input :stop_point_ids, :label => stop_point_ids_label(@journey_pattern), :as => :check_boxes, :collection => @route.stop_points.map { |s| [s.stop_area.name, s.id.to_s]}, :input_html => (@journey_pattern.new_record? ? { :checked => 'checked' }:{}) %>
- <%= form.input :objectid, :required => !@journey_pattern.new_record? %>
+ <%= form.input :objectid, :required => !@journey_pattern.new_record?, :input_html => { :title => t("formtastic.titles.journey_pattern.objectid")} %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/journey_patterns/show.html.erb b/app/views/journey_patterns/show.html.erb
index 2ea427380..cb0b75acc 100644
--- a/app/views/journey_patterns/show.html.erb
+++ b/app/views/journey_patterns/show.html.erb
@@ -28,10 +28,6 @@
<label><%= @journey_pattern.human_attribute_name(:comment) %>: </label>
<%= @journey_pattern.comment %>
</p>
- <p>
- <label><%= @journey_pattern.human_attribute_name("objectid") %>: </label>
- <%= @journey_pattern.objectid %>
- </p>
</div>
</div>
diff --git a/app/views/lines/_form.erb b/app/views/lines/_form.erb
index 554de3319..c1f59ed01 100644
--- a/app/views/lines/_form.erb
+++ b/app/views/lines/_form.erb
@@ -5,13 +5,13 @@
<%= form.input :company, :as => :select, :collection => Chouette::Company.all, :include_blank => false%>
<%= form.input :name %>
<%= form.input :published_name %>
- <%= form.input :registration_number %>
+ <%= 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 :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? %>
+ <%= form.input :objectid, :required => !@line.new_record?, :input_html => { :title => t("formtastic.titles.line.objectid")} %>
<% end %>
<%= form.inputs do %>
diff --git a/app/views/lines/show.html.erb b/app/views/lines/show.html.erb
index 2b9961ca2..d1a13aacf 100644
--- a/app/views/lines/show.html.erb
+++ b/app/views/lines/show.html.erb
@@ -21,7 +21,7 @@
<% end %>
</p>
<p>
- <label><%= @line.human_attribute_name("name") %>: </label>
+ <label><%= @line.human_attribute_name(:name) %>: </label>
<%= @line.name %>
</p>
<p>
@@ -80,10 +80,6 @@
<label><%= @line.human_attribute_name("comment") %>: </label>
<%= @line.comment %>
</p>
- <p>
- <label><%= @line.human_attribute_name("objectid") %>: </label>
- <%= @line.objectid %>
- </p>
</div>
</div>
@@ -102,8 +98,9 @@
<% content_for :sidebar do %>
<ul class="actions">
+ <li><%= link_to t('lines.actions.new'), new_referential_line_path(@referential), :class => "add" %></li>
<li><%= link_to t('lines.actions.edit'), edit_referential_line_path(@referential, @line), :class => "edit" %></li>
- <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('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>
</ul>
<%= creation_tag(@line) %>
diff --git a/app/views/networks/_form.erb b/app/views/networks/_form.erb
index 61b52a6a4..bb87d9e46 100644
--- a/app/views/networks/_form.erb
+++ b/app/views/networks/_form.erb
@@ -1,13 +1,13 @@
<%= semantic_form_for [@referential, @network] do |form| %>
<%= form.inputs do %>
<%= form.input :name %>
- <%= form.input :registration_number %>
+ <%= form.input :registration_number, :input_html => { :title => t("formtastic.titles.network.registration_number")} %>
<%= form.input :comment %>
<%= form.input :version_date, :as => :date_picker %>
<%= form.input :description %>
<%= form.input :source_name %>
<%= form.input :source_identifier %>
- <%= form.input :objectid, :required => !@network.new_record? %>
+ <%= form.input :objectid, :required => !@network.new_record?, :input_html => { :title => t("formtastic.titles.network.objectid")} %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/networks/show.html.erb b/app/views/networks/show.html.erb
index 273a04aed..1999c9869 100644
--- a/app/views/networks/show.html.erb
+++ b/app/views/networks/show.html.erb
@@ -4,7 +4,7 @@
<%= @map.to_html %>
<div class="summary">
<p>
- <label><%= Chouette::Network.human_attribute_name("name") %>: </label>
+ <label><%= @network.human_attribute_name(:name) %>: </label>
<%= @network.name %>
</p>
<p>
@@ -33,15 +33,12 @@
<label><%= Chouette::Network.human_attribute_name("source_identifier") %>: </label>
<%= @network.source_identifier %>
</p>
- <p>
- <label><%= Chouette::Network.human_attribute_name("objectid") %>: </label>
- <%= @network.objectid %>
- </p>
</div>
</div>
<% content_for :sidebar do %>
<ul class="actions">
+ <li><%= link_to t('networks.actions.new'), new_referential_network_path(@referential), :class => "add" %></li>
<li><%= link_to t('networks.actions.edit'), edit_referential_network_path(@referential, @network), :class => "edit" %></li>
<li><%= link_to t('networks.actions.destroy'), referential_network_path(@referential, @network), :method => :delete, :data => {:confirm => t('networks.actions.destroy_confirm')}, :class => "remove" %></li>
<br>
diff --git a/app/views/referentials/_clean.html.erb b/app/views/referentials/_clean.html.erb
index 5c749867f..995b7644d 100644
--- a/app/views/referentials/_clean.html.erb
+++ b/app/views/referentials/_clean.html.erb
@@ -1,7 +1,7 @@
<div id="clean_up" >
<%= semantic_form_for [@referential, CleanUp.new] do |form| %>
<%= form.inputs do %>
- <%= form.input :expected_date, :as => :date_picker , :wrapper_html => { :class => 'date', :title => t('hints.clean_up.expected_date') } %>
+ <%= form.input :expected_date, :as => :date_picker , :wrapper_html => { :class => 'date', :title => t('titles.clean_up.expected_date') } %>
<%= form.input :keep_lines, :as => :boolean %>
<%= form.input :keep_stops, :as => :boolean %>
<%= form.input :keep_companies, :as => :boolean %>
diff --git a/app/views/referentials/_form.erb b/app/views/referentials/_form.erb
index 60f5cacf3..814195dde 100644
--- a/app/views/referentials/_form.erb
+++ b/app/views/referentials/_form.erb
@@ -2,18 +2,18 @@
<%= form.inputs do %>
<%= form.input :name %>
<% if @referential.new_record? %>
- <%= form.input :slug%>
+ <%= form.input :slug, :input_html => { :title => t("formtastic.titles.referential.slug")}%>
<% else %>
<li class="input">
<label class="label" ><%= @referential.human_attribute_name("slug") %></label>
<%= @referential.slug %>
</li>
<% end %>
- <%= form.input :prefix %>
+ <%= form.input :prefix, :input_html => { :title => t("formtastic.titles.referential.prefix")} %>
<%= form.input :projection_type, :as => :select, :collection => Referential.available_srids %>
<%= form.input :time_zone %>
- <%= form.input :upper_corner %>
- <%= form.input :lower_corner %>
+ <%= form.input :upper_corner, :input_html => { :title => t("formtastic.titles.referential.upper_corner")} %>
+ <%= form.input :lower_corner, :input_html => { :title => t("formtastic.titles.referential.lower_corner")} %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/routes/_form.html.erb b/app/views/routes/_form.html.erb
index ff4a4403e..004af05e3 100644
--- a/app/views/routes/_form.html.erb
+++ b/app/views/routes/_form.html.erb
@@ -7,7 +7,7 @@
<%= form.input :opposite_route, :as => :select, :collection => @line.routes.select { |r| r.id != @route.id } %>
<%= form.input :direction_code, :as => :select, :collection => Chouette::Route.directions, :include_blank => false, :member_label => Proc.new { |mode| t("directions.label.#{mode}") } %>
<%= form.input :wayback_code, :as => :select, :collection => Chouette::Route.waybacks, :include_blank => false, :member_label => Proc.new { |mode| t("waybacks.label.#{mode}") } %>
- <%= form.input :objectid, :required => !@route.new_record?%>
+ <%= form.input :objectid, :required => !@route.new_record?, :input_html => { :title => t("formtastic.titles.route.objectid")}%>
<% end %>
<div id="stop_points">
<%= form.semantic_fields_for :stop_points, :include_id => false, :label => "TOTO" do |p| %>
diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb
index 262212477..3a9504775 100644
--- a/app/views/routes/show.html.erb
+++ b/app/views/routes/show.html.erb
@@ -48,10 +48,6 @@
<%= t(".no_opposite_route") %>
<% end %>
</p>
- <p>
- <label><%= @route.human_attribute_name("objectid") %>: </label>
- <%= @route.objectid %>
- </p>
</div>
</div>
@@ -94,6 +90,7 @@
<% content_for :sidebar do %>
<ul class="actions">
+ <li><%= link_to t('routes.actions.new'), new_referential_line_route_path(@referential, @line), :class => "add" %></li>
<li><%= link_to t('routes.actions.edit'), edit_referential_line_route_path(@referential, @line, @route), :class => "edit" %></li>
<li><%= link_to t('routes.actions.destroy'), referential_line_route_path(@referential, @line, @route), :method => :delete, :data => {:confirm => t('routes.actions.destroy_confirm')}, :class => "remove" %></li>
<% if @route.stop_points.size >= 2 %>
diff --git a/app/views/stop_areas/_form.html.erb b/app/views/stop_areas/_form.html.erb
index 21b1a4f98..4a1ba1c97 100644
--- a/app/views/stop_areas/_form.html.erb
+++ b/app/views/stop_areas/_form.html.erb
@@ -1,62 +1,60 @@
-<div class="container-fluid">
- <div class="col-md-7">
-
+<%= semantic_form_for [@referential, @stop_area] do |form| %>
+ <div class="row">
+ <div class="col-md-6">
+ <%= form.inputs do %>
+ <%= form.input :id, :as => :hidden %>
+ <%= form.input :name %>
+ <%= form.input :stop_area_type, :as => :select, :input_html => { :disabled => !@stop_area.new_record? }, :collection => Chouette::StopArea.stop_area_types, :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %>
+ <div class="location_info">
+ <h3><%= t("stop_areas.stop_area.localisation") %></h3>
+ <% if @stop_area.new_record? %>
<div id="prefetch">
<label><%= t('.geolocalize') %></label>
- <input class="typeahead form-control input-lg" maxlength="255" name="stop_area[address]" type="text" placeholder="<%= t('.address') %>" />
+ <input class="typeahead form-control input-lg" maxlength="255" type="text" placeholder="<%= t('.address') %>" />
</div>
-
- <%= semantic_form_for [@referential, @stop_area] do |form| %>
- <%= form.inputs do %>
- <%= form.input :id, :as => :hidden %>
- <%= form.input :name %>
- <%= form.input :stop_area_type, :as => :select, :input_html => { :disabled => !@stop_area.new_record? }, :collection => Chouette::StopArea.stop_area_types, :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %>
- <% unless @referential.projection_type_label.empty? %>
- <div class="panel panel-default">
- <div class="panel-heading"><%= @referential.projection_type_label %></div>
- <div class="panel-body">
- <%= form.input :projection_xy, :input_html => { :title => t("formtastic.titles.stop_area.projection_xy")} %>
- </div>
- </div>
+ <% end %>
+ <% unless @referential.projection_type_label.empty? %>
+ <%= form.input :projection_xy, :label => t("projection_xy", :projection => @referential.projection_type_label), :input_html => { :title => t("formtastic.titles.stop_area.projection_xy")} %>
<% end %>
- <div class="panel panel-default">
- <div class="panel-heading">WGS84</div>
- <div class="panel-body">
<%= form.input :coordinates, :input_html => { :title => t("formtastic.titles.stop_area.coordinates")} %>
- </div>
- </div>
- <%= form.input :registration_number, :input_html => { :title => t("formtastic.titles.stop_area.registration_number")} %>
- <%= form.input :street_name %>
- <%= form.input :country_code %>
- <%= form.input :zip_code %>
- <%= form.input :city_name %>
- <%= form.input :fare_code %>
- <%= form.input :nearest_topic_name %>
- <%= form.input :comment, :as => :text %>
-
- <% if !manage_itl %>
- <%= form.input :mobility_restricted_suitability,:as => :boolean %>
- <%= form.input :stairs_availability,:as => :boolean %>
- <%= form.input :lift_availability,:as => :boolean %>
- <% end %>
-
- <%= form.input :objectid, :required => !@stop_area.new_record?, :input_html => { :title => t("formtastic.titles.stop_area.objectid")} %>
-
- <% end %>
-
- <%= form.actions do %>
- <%= form.action :submit, :as => :button %>
- <%= form.action :cancel, :as => :link %>
+ <%= form.input :street_name %>
+ <%= form.input :country_code %>
+ <%= form.input :zip_code %>
+ <%= form.input :city_name %>
+ <% end %>
+ </div>
+ <div class="col-md-6">
+ <% if !manage_itl && @map %>
+ <%= @map.to_html %>
<% end %>
- <% end %>
-
+ </div>
</div>
- <div class="col-md-5">
- <% if !manage_itl && @map %>
- <%= @map.to_html %>
+ <div class="stop_areas.stop_area.general_info">
+ <h3><%= t("stop_area.general") %></h3>
+ <%= form.inputs do %>
+ <%= form.input :objectid, :required => !@stop_area.new_record?, :input_html => { :title => t("formtastic.titles.stop_area.objectid")} %>
+ <%= form.input :registration_number, :input_html => { :title => t("formtastic.titles.stop_area.registration_number")} %>
+ <%= form.input :fare_code, :as => :number %>
+ <%= form.input :nearest_topic_name %>
+ <%= form.input :comment, :as => :text, :input_html => { :rows => 5 } %>
<% end %>
- </div>
-</div>
+ </div>
+ <div class="pmr_info">
+ <h3><%= t("stop_areas.stop_area.accessibility") %></h3>
+ <%= form.inputs do %>
+ <% if !manage_itl %>
+ <%= form.input :mobility_restricted_suitability,:as => :boolean %>
+ <%= form.input :stairs_availability,:as => :boolean %>
+ <%= form.input :lift_availability,:as => :boolean %>
+ <% end %>
+ <% end %>
+ </div>
+
+ <%= form.actions do %>
+ <%= form.action :submit, :as => :button %>
+ <%= form.action :cancel, :as => :link %>
+ <% end %>
+<% end %>
<script>
var address_display = function( address ) {
@@ -132,3 +130,4 @@
$('input[name="stop_area[city_name]"]').val(datum.city);
})
</script>
+
diff --git a/app/views/time_table_combinations/_combine.html.erb b/app/views/time_table_combinations/_combine.html.erb
index a83d109a1..85fc5ab26 100644
--- a/app/views/time_table_combinations/_combine.html.erb
+++ b/app/views/time_table_combinations/_combine.html.erb
@@ -6,7 +6,6 @@
<h4 class="modal-title" id="myModalLabel"><%= t('time_tables.show.combine_form') %></h4>
</div>
<%= render "time_table_combinations/combine_form" %>
-
</div>
</div>
diff --git a/app/views/time_table_combinations/create_failure.js.erb b/app/views/time_table_combinations/create_failure.js.erb
new file mode 100644
index 000000000..65cc241c5
--- /dev/null
+++ b/app/views/time_table_combinations/create_failure.js.erb
@@ -0,0 +1,5 @@
+
+var combine_form_partial = '<%= j render "time_table_combinations/combine_form" %> ';
+
+$('#new_time_table_combination').replaceWith(combine_form_partial);
+
diff --git a/app/views/time_table_combinations/create.js.erb b/app/views/time_table_combinations/create_success.js.erb
index 06655deea..79ab543d9 100644
--- a/app/views/time_table_combinations/create.js.erb
+++ b/app/views/time_table_combinations/create_success.js.erb
@@ -3,9 +3,6 @@ var combine_form_partial = '<%= j render "time_table_combinations/combine_form"
$('#new_time_table_combination').replaceWith(combine_form_partial);
-<% if @time_table_combination.status %>
-
var time_table_partial = '<%= j render "time_tables/show_time_table" %> ';
$('#time_table_show').replaceWith(time_table_partial);
-<% end %>
diff --git a/app/views/time_tables/_form.erb b/app/views/time_tables/_form.erb
index 71718995d..24e72e676 100644
--- a/app/views/time_tables/_form.erb
+++ b/app/views/time_tables/_form.erb
@@ -6,7 +6,7 @@
<%= form.input :tag_search, :input_html => { class: "tm-input typeahead", :placeholder => t("formtastic.placeholders.time_table.tag_search") } %>
<%= form.input :tag_list, :as => :hidden, :input_html => { :id => "tag_list" } %>
- <%= form.input :objectid, :required => !@time_table.new_record? %>
+ <%= form.input :objectid, :required => !@time_table.new_record?, :input_html => { :title => t("formtastic.titles.time_table.objectid")} %>
<% end %>
<h3 class="time_table_periods">
diff --git a/app/views/time_tables/_show_time_table.html.erb b/app/views/time_tables/_show_time_table.html.erb
index 71fe973c9..5095ac918 100644
--- a/app/views/time_tables/_show_time_table.html.erb
+++ b/app/views/time_tables/_show_time_table.html.erb
@@ -13,6 +13,10 @@
</div>
<div class="summary">
<p>
+ <label><%= @time_table.human_attribute_name("comment") %>: </label>
+ <%= @time_table.comment %>
+ </p>
+ <p>
<label><%= @time_table.human_attribute_name("version") %>: </label>
<%= @time_table.version %>
</p>
diff --git a/app/views/vehicle_journeys/_form.html.erb b/app/views/vehicle_journeys/_form.html.erb
index e785c70dc..793304397 100644
--- a/app/views/vehicle_journeys/_form.html.erb
+++ b/app/views/vehicle_journeys/_form.html.erb
@@ -1,6 +1,7 @@
<%= semantic_form_for [@referential, @line, @route, @vehicle_journey] do |form| %>
<%= form.inputs do %>
<%= form.input :journey_pattern, :as => :select, :collection => @route.journey_patterns, :member_label => Proc.new { |jp| journey_name(jp) } %>
+ <%= form.input :number %>
<%= form.input :published_journey_name %>
<%= form.input :published_journey_identifier %>
<%= form.input :comment %>
@@ -10,7 +11,7 @@
<%= form.input :status_value %>
<%= form.input :facility %>
<%= form.input :vehicle_type_identifier%>
- <%= form.input :objectid, :required => !@vehicle_journey.new_record? %>
+ <%= form.input :objectid, :required => !@vehicle_journey.new_record?, :input_html => { :title => t("formtastic.titles.vehicle_journey.objectid")} %>
<%= form.input :time_table_tokens, :label => t('.time_tables'), :as => :text, :input_html => { :"data-pre" => ( @vehicle_journey.time_tables.map { |time_table| { :id => time_table.id, :name => time_table_description(time_table) } } ).to_json } %>
<li class="input">
<%= form.label @vehicle_journey.human_attribute_name(:vehicle_journey_at_stop_ids), :class => "label" %>
diff --git a/app/views/vehicle_journeys/show.html.erb b/app/views/vehicle_journeys/show.html.erb
index b965169b0..4068757c9 100644
--- a/app/views/vehicle_journeys/show.html.erb
+++ b/app/views/vehicle_journeys/show.html.erb
@@ -27,6 +27,10 @@
<%= link_to journey_name(@vehicle_journey.journey_pattern), [@referential, @line, @route, @vehicle_journey.journey_pattern] %>
</p>
<p>
+ <label><%= @vehicle_journey.human_attribute_name("number") %>: </label>
+ <%= @vehicle_journey.number %>
+ </p>
+ <p>
<label><%= @vehicle_journey.human_attribute_name("published_journey_name") %>: </label>
<%= @vehicle_journey.published_journey_name %>
</p>
@@ -72,10 +76,6 @@
<label><%= @vehicle_journey.human_attribute_name("vehicle_type_identifier") %>: </label>
<%= @vehicle_journey.vehicle_type_identifier %>
</p>
- <p>
- <label><%= @vehicle_journey.human_attribute_name("objectid") %>: </label>
- <%= @vehicle_journey.objectid %>
- </p>
</div>
</div>
<h3><%= @vehicle_journey.human_attribute_name(:vehicle_journey_at_stop_ids) %></h3>
diff --git a/config/environment.rb b/config/environment.rb
index 299eb7b07..cc2b4fa95 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.4.1'
+APP_VERSION = '2.5.0'
diff --git a/config/environments/production.rb b/config/environments/production.rb
index c0dcc1933..6494b4c60 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -146,7 +146,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.4.1/chouette" : ENV['CHOUETTE_GUI_COMMAND']
+ Chouette::Command.command = ENV['CHOUETTE_GUI_COMMAND'].nil? ? "/usr/local/opt/chouette-command/chouette-cmd_2.5.0/chouette" : ENV['CHOUETTE_GUI_COMMAND']
ImportTask.root = "/var/lib/chouette/imports"
Export.root = "/var/lib/chouette/exports"
end
diff --git a/config/locales/access_links.yml b/config/locales/access_links.yml
index b714bfad4..0a0aeedbb 100644
--- a/config/locales/access_links.yml
+++ b/config/locales/access_links.yml
@@ -40,7 +40,7 @@ en:
creation_time: "Created on"
creatorid: "Created by "
formtastic:
- hints:
+ titles:
access_link:
objectid: "[prefix]:AccessLink:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"
@@ -86,7 +86,7 @@ fr:
creation_time: "Créé le"
creator_id: "Créé par"
formtastic:
- hints:
+ titles:
access_link:
objectid: "[prefixe]:AccessLink:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"
diff --git a/config/locales/clean_ups.yml b/config/locales/clean_ups.yml
index dc03fb4a1..48d22981e 100644
--- a/config/locales/clean_ups.yml
+++ b/config/locales/clean_ups.yml
@@ -22,7 +22,7 @@ en:
keep_companies: "keep companies"
keep_networks: "keep networks"
keep_group_of_lines: "keep groups of lines"
- hints:
+ titles:
clean_up:
expected_date: "value included in clean up"
fr:
@@ -49,7 +49,7 @@ fr:
keep_companies: "conserver les transporteurs"
keep_networks: "conserver les réseaux"
keep_group_of_lines: "conserver les groupes de lignes"
- hints:
+ titles:
clean_up:
expected_date: "valeur incluse dans la purge"
diff --git a/config/locales/companies.yml b/config/locales/companies.yml
index f4ffc06ee..09b010cc9 100644
--- a/config/locales/companies.yml
+++ b/config/locales/companies.yml
@@ -37,7 +37,7 @@ en:
creation_time: "Created on"
creator_id: "Created by "
formtastic:
- hints:
+ titles:
company:
registration_number: "only alphanumerical or underscore characters "
objectid: "[prefix]:Company:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"
@@ -81,7 +81,7 @@ fr:
creation_time: "Créé le"
creator_id: "Créé par"
formtastic:
- hints:
+ titles:
company:
registration_number: "caractères autorisés : alphanumériques et 'souligné'"
objectid: "[prefixe]:Company:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"
diff --git a/config/locales/connection_links.yml b/config/locales/connection_links.yml
index d1f107526..815a913f8 100644
--- a/config/locales/connection_links.yml
+++ b/config/locales/connection_links.yml
@@ -58,7 +58,7 @@ en:
creation_time: "Created on"
creator_id: "Created by"
formtastic:
- hints:
+ titles:
connection_link:
objectid: "[prefix]:ConnectionLink:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"
@@ -122,7 +122,7 @@ fr:
creation_time: "Créé le"
creator_id: "Créé par"
formtastic:
- hints:
+ titles:
connection_link:
objectid: "[prefixe]:ConnectionLink:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"
diff --git a/config/locales/exports.yml b/config/locales/exports.yml
index d1a8e1c62..cf21a4787 100644
--- a/config/locales/exports.yml
+++ b/config/locales/exports.yml
@@ -98,10 +98,11 @@ en:
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"
+ titles:
+ export:
+ 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"
area_types:
quay: "Quays and Boarding Positions"
commercial_stop_point: "Commercial Stop Points"
@@ -207,10 +208,11 @@ fr:
position: "No"
full_message: "Message"
formtastic:
- hints:
- 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"
+ titles:
+ export:
+ 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"
area_types:
quay: "Arrêts"
commercial_stop_point: "Arrêts commerciaux"
diff --git a/config/locales/group_of_lines.yml b/config/locales/group_of_lines.yml
index 06b893667..1f970d4f9 100644
--- a/config/locales/group_of_lines.yml
+++ b/config/locales/group_of_lines.yml
@@ -33,7 +33,7 @@ en:
creation_time: "Created on"
creator_id: "Created by"
formtastic:
- hints:
+ titles:
group_of_line:
objectid: "[prefix]:GroupOfLine:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"
@@ -72,7 +72,7 @@ fr:
creation_time: "Créé le"
creator_id: "Créé par"
formtastic:
- hints:
+ titles:
group_of_line:
objectid: "[prefixe]:GroupOfLine:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"
diff --git a/config/locales/import_tasks.yml b/config/locales/import_tasks.yml
index 1d5313607..1dca0a445 100644
--- a/config/locales/import_tasks.yml
+++ b/config/locales/import_tasks.yml
@@ -82,7 +82,7 @@ en:
ignore_last_word: "ignore last word"
ignore_end_chars: "ignore last chars"
formtastic:
- hints:
+ titles:
import_task:
max_distance_for_commercial: "Maximal distance to merge homonymous stops in commercial stop in meter"
max_distance_for_connection_link: "Maximal distance to link stops by connection link stop in meter"
@@ -186,7 +186,7 @@ fr:
ignore_last_word: "ignorer le dernier mot"
ignore_end_chars: "ignorer les n derniers caractères"
formtastic:
- hints:
+ titles:
import_task:
max_distance_for_commercial: "Distance maximale entre deux arrêts homonymes pour créer les zones d'arrêt (en mètre)"
max_distance_for_connection_link: "Distance maximale entre deux arrêts pour créer les correspondances (en mètre)"
diff --git a/config/locales/journey_patterns.yml b/config/locales/journey_patterns.yml
index 3c781d656..b16985c2c 100644
--- a/config/locales/journey_patterns.yml
+++ b/config/locales/journey_patterns.yml
@@ -40,7 +40,7 @@ en:
creation_time: "Created on"
creator_id: "Created by"
formtastic:
- hints:
+ titles:
journey_pattern:
objectid: "[prefix]:JourneyPattern:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"
@@ -86,6 +86,6 @@ fr:
creation_time: "Créé le"
creator_id: "Créé par"
formtastic:
- hints:
+ titles:
journey_pattern:
objectid: "[prefixe]:JourneyPattern:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"
diff --git a/config/locales/lines.yml b/config/locales/lines.yml
index cee2d0756..2a35cccc6 100644
--- a/config/locales/lines.yml
+++ b/config/locales/lines.yml
@@ -76,7 +76,7 @@ en:
creation_time: "Created on"
creator_id: "Created by"
formtastic:
- hints:
+ titles:
line:
registration_number: "only alphanumerical or underscore characters"
objectid: "[prefix]:Line:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"
@@ -159,7 +159,7 @@ fr:
creation_time: "Créé le"
creator_id: "Créé par"
formtastic:
- hints:
+ titles:
line:
registration_number: "caractères autorisés : alphanumériques et 'souligné'"
objectid: "[prefixe]:Line:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"
diff --git a/config/locales/networks.yml b/config/locales/networks.yml
index a8374c770..30cd399b9 100644
--- a/config/locales/networks.yml
+++ b/config/locales/networks.yml
@@ -36,7 +36,7 @@ en:
creation_time: "Created on"
creator_id: "Created by "
formtastic:
- hints:
+ titles:
network:
registration_number: "only alphanumerical or underscore characters"
objectid: "[prefix]:GroupOfLine:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"
@@ -78,7 +78,7 @@ fr:
creation_time: "Créé le"
creator_id: "Créé par"
formtastic:
- hints:
+ titles:
network:
registration_number: "caractères autorisés : alphanumériques et 'souligné'"
objectid: "[prefixe]:GroupOfLine:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"
diff --git a/config/locales/referentials.yml b/config/locales/referentials.yml
index a324dc481..8353c1e9e 100644
--- a/config/locales/referentials.yml
+++ b/config/locales/referentials.yml
@@ -66,7 +66,7 @@ en:
export_tasks: "Exports"
compliance_check_tasks: "Validations"
formtastic:
- hints:
+ titles:
referential:
slug: "only lowercase alphanumerical or underscore characters, first character must be a letter"
prefix: "only alphanumerical or underscore characters"
@@ -141,7 +141,7 @@ fr:
export_tasks: "Exports"
compliance_check_tasks: "Validations"
formtastic:
- hints:
+ titles:
referential:
slug: "caractères autorisés : alphanumériques minuscules et 'souligné' et doit commencer par une lettre"
prefix: "caractères autorisés : alphanumériques et 'souligné'"
diff --git a/config/locales/routes.yml b/config/locales/routes.yml
index 623b9d9fc..b68f1802a 100644
--- a/config/locales/routes.yml
+++ b/config/locales/routes.yml
@@ -59,7 +59,7 @@ en:
creation_time: "Created on"
creator_id: "Created by"
formtastic:
- hints:
+ titles:
route:
objectid: "[prefix]:Route:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"
@@ -124,7 +124,7 @@ fr:
creator_id: "Créé par"
no_journey_pattern: "Pas de mission"
formtastic:
- hints:
+ titles:
route:
objectid: "[prefixe]:Route:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"
diff --git a/config/locales/stop_areas.yml b/config/locales/stop_areas.yml
index ccc3d2c5b..452395cef 100644
--- a/config/locales/stop_areas.yml
+++ b/config/locales/stop_areas.yml
@@ -4,6 +4,9 @@ en:
stop_area:
no_position: "No Position"
lines: "Lines :"
+ general: "General"
+ localisation: "Localisation"
+ accessibility: "Accessibility"
actions:
new: "Add a new stop"
edit: "Edit this stop"
@@ -26,7 +29,7 @@ en:
title: "Add a new stop"
form:
address: "15 rue du Louvre, Paris"
- geolocalize: "Pinpoint : "
+ geolocalize: "Pinpoint "
edit:
title: "Update stop %{stop_area}"
show:
@@ -84,7 +87,7 @@ en:
projection: "Projection type"
projection_x: "x-position"
projection_y: "y-position"
- projection_xy: "position (x,y)"
+ projection_xy: "position (x,y) %{projection}"
long_lat_type: "Projection type"
longitude: "Longitude"
latitude: "Latitude"
@@ -96,7 +99,7 @@ en:
routing_stop_ids: "Attached stops"
routing_line_ids: "Attached lines"
parent: "Parent"
- coordinates: "Coordinates (lat,lng)"
+ coordinates: "Coordinates (lat,lng) WGS84"
zip_code: "Zip code"
city_name: "City"
formtastic:
@@ -113,6 +116,9 @@ fr:
stop_area:
no_position: "Pas de position"
lines: "Lignes :"
+ general: "General"
+ localisation: "Localisation"
+ accessibility: "Accessibilité"
actions:
new: "Ajouter un arrêt"
edit: "Modifier cet arrêt"
@@ -136,7 +142,7 @@ fr:
title: "Ajouter un arrêt"
form:
address: "15 rue du Louvre, Paris"
- geolocalize: "Géolocalisez : "
+ geolocalize: "Géolocalisez "
edit:
title: "Modifier l'arrêt %{stop_area}"
show:
@@ -195,7 +201,7 @@ fr:
projection: "Projection"
projection_x: "Position X"
projection_y: "Position Y"
- projection_xy: "Position (x,y)"
+ projection_xy: "Position (x,y) %{projection}"
long_lat_type: "Projection"
longitude: "Longitude"
latitude: "Latitude"
@@ -207,7 +213,7 @@ fr:
routing_stop_ids: "Arrêts concernés par l'ITL"
routing_line_ids: "Lignes affectées par l'ITL"
parent: "Parent"
- coordinates: "Coordonnées (lat,lng)"
+ coordinates: "Coordonnées (lat,lng) WGS84"
zip_code: "Code postal"
city_name: "Commune"
formtastic:
diff --git a/config/locales/time_tables.yml b/config/locales/time_tables.yml
index 5742b7e30..0cd04dff5 100644
--- a/config/locales/time_tables.yml
+++ b/config/locales/time_tables.yml
@@ -76,7 +76,7 @@ en:
period_end: "to"
tag_search: "Tags"
formtastic:
- hints:
+ titles:
time_table:
objectid: "[prefix]:Timetable:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"
placeholders:
@@ -165,7 +165,7 @@ fr:
tag_search: "Etiquettes"
tag_list: "Etiquettes"
formtastic:
- hints:
+ titles:
time_table:
objectid: "[prefixe]:Timetable:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"
placeholders:
diff --git a/config/locales/vehicle_journeys.yml b/config/locales/vehicle_journeys.yml
index 01a59217a..0e1b5ad34 100644
--- a/config/locales/vehicle_journeys.yml
+++ b/config/locales/vehicle_journeys.yml
@@ -60,6 +60,7 @@ en:
time_tables: "Calendars"
time_slot: "Time Slot"
company: "Company"
+ number: "Number"
comment: "Comments"
status_value: "Status Value"
transport_mode_name: "Transport Mode"
@@ -86,7 +87,7 @@ en:
vehicle_journey:
invalid_times: "Invalid times"
formtastic:
- hints:
+ titles:
vehicle_journey:
objectid: "[prefix]:VehicleJourney:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"
@@ -151,6 +152,7 @@ fr:
time_tables: "Calendriers"
time_slot: "Fréquence"
company: "Transporteur"
+ number: "Numéro"
comment: "Commentaires"
status_value: "Etat de trafic"
transport_mode_name: "Mode de transport"
@@ -177,7 +179,7 @@ fr:
vehicle_journey:
invalid_times: "Horaires invalides"
formtastic:
- hints:
+ titles:
vehicle_journey:
objectid: "[prefixe]:VehicleJourney:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"