aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorVlatka Pavisic2017-02-13 17:39:30 +0100
committerXinhui2017-02-20 11:52:06 +0100
commit86cd6fb168b94debc3fc0eb99ac61f1a9b9b0049 (patch)
tree8b94bf10593393b9ad6bf73fb13b623abb615778 /app
parent84e433dbdbd457c922725ea54cd703ed28da7ab6 (diff)
downloadchouette-core-86cd6fb168b94debc3fc0eb99ac61f1a9b9b0049.tar.bz2
Refs #2596 : Replace creation_time with timestamps
Diffstat (limited to 'app')
-rw-r--r--app/controllers/access_links_controller.rb2
-rw-r--r--app/controllers/access_points_controller.rb2
-rw-r--r--app/controllers/companies_controller.rb2
-rw-r--r--app/controllers/connection_links_controller.rb2
-rw-r--r--app/controllers/group_of_lines_controller.rb2
-rw-r--r--app/controllers/journey_patterns_controller.rb2
-rw-r--r--app/controllers/lines_controller.rb2
-rw-r--r--app/controllers/networks_controller.rb2
-rw-r--r--app/controllers/referential_companies_controller.rb2
-rw-r--r--app/controllers/referential_group_of_lines_controller.rb2
-rw-r--r--app/controllers/referential_lines_controller.rb1
-rw-r--r--app/controllers/referential_networks_controller.rb2
-rw-r--r--app/controllers/referential_stop_areas_controller.rb2
-rw-r--r--app/controllers/routes_controller.rb2
-rw-r--r--app/controllers/routing_constraint_zones_controller.rb2
-rw-r--r--app/controllers/stop_areas_controller.rb2
-rw-r--r--app/controllers/time_tables_controller.rb2
-rw-r--r--app/helpers/history_helper.rb4
-rw-r--r--app/models/chouette/stop_area.rb1
-rw-r--r--app/models/concerns/default_attributes_support.rb9
-rw-r--r--app/models/concerns/default_netex_attributes_support.rb9
-rw-r--r--app/views/api/kml/access_links/index.kml.slim8
-rw-r--r--app/views/api/kml/access_points/index.kml.slim10
-rw-r--r--app/views/api/kml/connection_links/index.kml.slim6
-rw-r--r--app/views/api/kml/journey_patterns/show.kml.slim12
-rw-r--r--app/views/api/kml/lines/show.kml.slim8
-rw-r--r--app/views/api/kml/routes/show.kml.slim2
-rw-r--r--app/views/api/kml/stop_areas/index.kml.slim8
-rw-r--r--app/views/api/v1/trident_objects/show.rabl2
29 files changed, 45 insertions, 67 deletions
diff --git a/app/controllers/access_links_controller.rb b/app/controllers/access_links_controller.rb
index d590aba00..d783c3212 100644
--- a/app/controllers/access_links_controller.rb
+++ b/app/controllers/access_links_controller.rb
@@ -90,7 +90,7 @@ class AccessLinksController < ChouetteController
private
def access_link_params
- params.require(:access_link).permit(:access_link_type,:access_point_id, :stop_area_id, :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :link_distance, :link_type, :default_duration, :frequent_traveller_duration, :occasional_traveller_duration, :mobility_restricted_traveller_duration, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs, :link_orientation, :link_orientation_type, :stop_area )
+ params.require(:access_link).permit(:access_link_type,:access_point_id, :stop_area_id, :objectid, :object_version, :creator_id, :name, :comment, :link_distance, :link_type, :default_duration, :frequent_traveller_duration, :occasional_traveller_duration, :mobility_restricted_traveller_duration, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs, :link_orientation, :link_orientation_type, :stop_area )
end
end
diff --git a/app/controllers/access_points_controller.rb b/app/controllers/access_points_controller.rb
index 534b0c835..771f013e7 100644
--- a/app/controllers/access_points_controller.rb
+++ b/app/controllers/access_points_controller.rb
@@ -66,7 +66,7 @@ class AccessPointsController < ChouetteController
private
def access_point_params
- params.require(:access_point).permit( :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :zip_code, :city_name, :openning_time, :closing_time, :access_type, :access_point_type, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :stop_area_id, :coordinates )
+ params.require(:access_point).permit( :objectid, :object_version, :creator_id, :name, :comment, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :zip_code, :city_name, :openning_time, :closing_time, :access_type, :access_point_type, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :stop_area_id, :coordinates )
end
end
diff --git a/app/controllers/companies_controller.rb b/app/controllers/companies_controller.rb
index bf298786a..3ce59146c 100644
--- a/app/controllers/companies_controller.rb
+++ b/app/controllers/companies_controller.rb
@@ -61,7 +61,7 @@ class CompaniesController < BreadcrumbController
helper_method :current_referential
def company_params
- params.require(:company).permit( :objectid, :object_version, :creation_time, :creator_id, :name, :short_name, :organizational_unit, :operating_department_name, :code, :phone, :fax, :email, :registration_number, :url, :time_zone )
+ params.require(:company).permit( :objectid, :object_version, :creator_id, :name, :short_name, :organizational_unit, :operating_department_name, :code, :phone, :fax, :email, :registration_number, :url, :time_zone )
end
private
diff --git a/app/controllers/connection_links_controller.rb b/app/controllers/connection_links_controller.rb
index ca36a999f..4a01f1963 100644
--- a/app/controllers/connection_links_controller.rb
+++ b/app/controllers/connection_links_controller.rb
@@ -55,7 +55,7 @@ class ConnectionLinksController < ChouetteController
private
def connection_link_params
- params.require(:connection_link).permit( :connection_link_type,:departure_id, :arrival_id, :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :link_distance, :link_type, :default_duration, :frequent_traveller_duration, :occasional_traveller_duration, :mobility_restricted_traveller_duration, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs )
+ params.require(:connection_link).permit( :connection_link_type,:departure_id, :arrival_id, :objectid, :object_version, :creator_id, :name, :comment, :link_distance, :link_type, :default_duration, :frequent_traveller_duration, :occasional_traveller_duration, :mobility_restricted_traveller_duration, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs )
end
end
diff --git a/app/controllers/group_of_lines_controller.rb b/app/controllers/group_of_lines_controller.rb
index 112ff2dd0..26ab1ae5d 100644
--- a/app/controllers/group_of_lines_controller.rb
+++ b/app/controllers/group_of_lines_controller.rb
@@ -80,7 +80,7 @@ class GroupOfLinesController < BreadcrumbController
end
def group_of_line_params
- params.require(:group_of_line).permit( :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :lines, :registration_number, :line_tokens)
+ params.require(:group_of_line).permit( :objectid, :object_version, :creator_id, :name, :comment, :lines, :registration_number, :line_tokens)
end
end
diff --git a/app/controllers/journey_patterns_controller.rb b/app/controllers/journey_patterns_controller.rb
index 69f16321e..dd457332c 100644
--- a/app/controllers/journey_patterns_controller.rb
+++ b/app/controllers/journey_patterns_controller.rb
@@ -60,7 +60,7 @@ class JourneyPatternsController < ChouetteController
end
def journey_pattern_params
- params.require(:journey_pattern).permit(:route_id, :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :registration_number, :published_name, :departure_stop_point_id, :arrival_stop_point_id, {:stop_point_ids => []})
+ params.require(:journey_pattern).permit(:route_id, :objectid, :object_version, :creator_id, :name, :comment, :registration_number, :published_name, :departure_stop_point_id, :arrival_stop_point_id, {:stop_point_ids => []})
end
end
diff --git a/app/controllers/lines_controller.rb b/app/controllers/lines_controller.rb
index 9a0a007aa..4c36ecb21 100644
--- a/app/controllers/lines_controller.rb
+++ b/app/controllers/lines_controller.rb
@@ -106,7 +106,7 @@ class LinesController < BreadcrumbController
helper_method :current_referential
def line_params
- params.require(:line).permit( :transport_mode, :network_id, :company_id, :objectid, :object_version, :creation_time, :creator_id, :name, :number, :published_name, :transport_mode, :registration_number, :comment, :mobility_restricted_suitability, :int_user_needs, :flexible_service, :group_of_lines, :group_of_line_ids, :group_of_line_tokens, :url, :color, :text_color, :stable_id, { footnotes_attributes: [ :code, :label, :_destroy, :id ] } )
+ params.require(:line).permit( :transport_mode, :network_id, :company_id, :objectid, :object_version, :creator_id, :name, :number, :published_name, :transport_mode, :registration_number, :comment, :mobility_restricted_suitability, :int_user_needs, :flexible_service, :group_of_lines, :group_of_line_ids, :group_of_line_tokens, :url, :color, :text_color, :stable_id, { footnotes_attributes: [ :code, :label, :_destroy, :id ] } )
end
end
diff --git a/app/controllers/networks_controller.rb b/app/controllers/networks_controller.rb
index d9070e7e8..4249bb301 100644
--- a/app/controllers/networks_controller.rb
+++ b/app/controllers/networks_controller.rb
@@ -66,7 +66,7 @@ class NetworksController < BreadcrumbController
helper_method :current_referential
def network_params
- params.require(:network).permit(:objectid, :object_version, :creation_time, :creator_id, :version_date, :description, :name, :registration_number, :source_name, :source_type_name, :source_identifier, :comment )
+ params.require(:network).permit(:objectid, :object_version, :creator_id, :version_date, :description, :name, :registration_number, :source_name, :source_type_name, :source_identifier, :comment )
end
private
diff --git a/app/controllers/referential_companies_controller.rb b/app/controllers/referential_companies_controller.rb
index 882796951..0966389b4 100644
--- a/app/controllers/referential_companies_controller.rb
+++ b/app/controllers/referential_companies_controller.rb
@@ -45,7 +45,7 @@ class ReferentialCompaniesController < ChouetteController
end
def company_params
- params.require(:company).permit( :objectid, :object_version, :creation_time, :creator_id, :name, :short_name, :organizational_unit, :operating_department_name, :code, :phone, :fax, :email, :registration_number, :url, :time_zone )
+ params.require(:company).permit( :objectid, :object_version, :creator_id, :name, :short_name, :organizational_unit, :operating_department_name, :code, :phone, :fax, :email, :registration_number, :url, :time_zone )
end
private
diff --git a/app/controllers/referential_group_of_lines_controller.rb b/app/controllers/referential_group_of_lines_controller.rb
index 4decef558..73520d00a 100644
--- a/app/controllers/referential_group_of_lines_controller.rb
+++ b/app/controllers/referential_group_of_lines_controller.rb
@@ -71,7 +71,7 @@ class ReferentialGroupOfLinesController < ChouetteController
private
def group_of_line_params
- params.require(:group_of_line).permit( :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :lines, :registration_number, :line_tokens)
+ params.require(:group_of_line).permit( :objectid, :object_version, :creator_id, :name, :comment, :lines, :registration_number, :line_tokens)
end
end
diff --git a/app/controllers/referential_lines_controller.rb b/app/controllers/referential_lines_controller.rb
index 4ffee27cb..81c00a0ae 100644
--- a/app/controllers/referential_lines_controller.rb
+++ b/app/controllers/referential_lines_controller.rb
@@ -107,7 +107,6 @@ class ReferentialLinesController < ChouetteController
:company_id,
:objectid,
:object_version,
- :creation_time,
:creator_id,
:name, :number,
:published_name,
diff --git a/app/controllers/referential_networks_controller.rb b/app/controllers/referential_networks_controller.rb
index 711b0cc69..30c7dd244 100644
--- a/app/controllers/referential_networks_controller.rb
+++ b/app/controllers/referential_networks_controller.rb
@@ -53,7 +53,7 @@ class ReferentialNetworksController < ChouetteController
end
def network_params
- params.require(:network).permit(:objectid, :object_version, :creation_time, :creator_id, :version_date, :description, :name, :registration_number, :source_name, :source_type_name, :source_identifier, :comment )
+ params.require(:network).permit(:objectid, :object_version, :creator_id, :version_date, :description, :name, :registration_number, :source_name, :source_type_name, :source_identifier, :comment )
end
private
diff --git a/app/controllers/referential_stop_areas_controller.rb b/app/controllers/referential_stop_areas_controller.rb
index 8f0d6fea3..4d33ebb2e 100644
--- a/app/controllers/referential_stop_areas_controller.rb
+++ b/app/controllers/referential_stop_areas_controller.rb
@@ -152,7 +152,7 @@ class ReferentialStopAreasController < ChouetteController
end
def stop_area_params
- params.require(:stop_area).permit( :routing_stop_ids, :routing_line_ids, :children_ids, :stop_area_type, :parent_id, :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :area_type, :registration_number, :nearest_topic_name, :fare_code, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :zip_code, :city_name, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs, :coordinates, :url, :time_zone )
+ params.require(:stop_area).permit( :routing_stop_ids, :routing_line_ids, :children_ids, :stop_area_type, :parent_id, :objectid, :object_version, :creator_id, :name, :comment, :area_type, :registration_number, :nearest_topic_name, :fare_code, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :zip_code, :city_name, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs, :coordinates, :url, :time_zone )
end
end
diff --git a/app/controllers/routes_controller.rb b/app/controllers/routes_controller.rb
index be6329006..72a1c1778 100644
--- a/app/controllers/routes_controller.rb
+++ b/app/controllers/routes_controller.rb
@@ -93,7 +93,7 @@ class RoutesController < ChouetteController
private
def route_params
- params.require(:route).permit( :line_id, :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :opposite_route_id, :published_name, :number, :direction, :wayback, { stop_points_attributes: [ :id, :_destroy, :position, :stop_area_id, :for_boarding, :for_alighting ] } )
+ params.require(:route).permit( :line_id, :objectid, :object_version, :creator_id, :name, :comment, :opposite_route_id, :published_name, :number, :direction, :wayback, { stop_points_attributes: [ :id, :_destroy, :position, :stop_area_id, :for_boarding, :for_alighting ] } )
end
end
diff --git a/app/controllers/routing_constraint_zones_controller.rb b/app/controllers/routing_constraint_zones_controller.rb
index cd8cd5aa7..054456a52 100644
--- a/app/controllers/routing_constraint_zones_controller.rb
+++ b/app/controllers/routing_constraint_zones_controller.rb
@@ -16,7 +16,7 @@ class RoutingConstraintZonesController < ChouetteController
private
def routing_constraint_zone_params
- params.require(:routing_constraint_zone).permit(:name, { stop_area_ids: [] }, :line_id, :objectid, :object_version, :creation_time, :creator_id)
+ params.require(:routing_constraint_zone).permit(:name, { stop_area_ids: [] }, :line_id, :objectid, :object_version, :creator_id)
end
end
diff --git a/app/controllers/stop_areas_controller.rb b/app/controllers/stop_areas_controller.rb
index fca33bdfb..ae3edbd3e 100644
--- a/app/controllers/stop_areas_controller.rb
+++ b/app/controllers/stop_areas_controller.rb
@@ -174,7 +174,7 @@ class StopAreasController < BreadcrumbController
helper_method :current_referential
def stop_area_params
- params.require(:stop_area).permit( :routing_stop_ids, :routing_line_ids, :children_ids, :stop_area_type, :parent_id, :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :area_type, :registration_number, :nearest_topic_name, :fare_code, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :zip_code, :city_name, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs, :coordinates, :url, :time_zone )
+ params.require(:stop_area).permit( :routing_stop_ids, :routing_line_ids, :children_ids, :stop_area_type, :parent_id, :objectid, :object_version, :creator_id, :name, :comment, :area_type, :registration_number, :nearest_topic_name, :fare_code, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :zip_code, :city_name, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs, :coordinates, :url, :time_zone )
end
end
diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb
index ec62dfb98..fa74fe9ee 100644
--- a/app/controllers/time_tables_controller.rb
+++ b/app/controllers/time_tables_controller.rb
@@ -121,6 +121,6 @@ class TimeTablesController < ChouetteController
private
def time_table_params
- params.require(:time_table).permit( :objectid, :object_version, :creation_time, :creator_id, :calendar_id, :version, :comment, :int_day_types, :monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday, :start_date, :end_date, { :dates_attributes => [:date, :in_out, :id, :_destroy] }, { :periods_attributes => [:period_start, :period_end, :_destroy, :id] }, :tag_list, :tag_search )
+ params.require(:time_table).permit( :objectid, :object_version, :creator_id, :calendar_id, :version, :comment, :int_day_types, :monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday, :start_date, :end_date, { :dates_attributes => [:date, :in_out, :id, :_destroy] }, { :periods_attributes => [:period_start, :period_end, :_destroy, :id] }, :tag_list, :tag_search )
end
end
diff --git a/app/helpers/history_helper.rb b/app/helpers/history_helper.rb
index 3ad38a11e..56c651c1d 100644
--- a/app/helpers/history_helper.rb
+++ b/app/helpers/history_helper.rb
@@ -4,9 +4,7 @@ module HistoryHelper
field_set_tag t("layouts.history_tag.title"), :class => "history_tag" do
content_tag :ul do
[(content_tag :li do
- if object.has_attribute?(:creation_time)
- object.human_attribute_name('creation_time') + ' : ' + l(object.creation_time, :format => :short)
- else
+ if object.has_attribute?(:created_at)
object.class.human_attribute_name('created_at') + ' : ' + l(object.created_at, :format => :short)
end
end),
diff --git a/app/models/chouette/stop_area.rb b/app/models/chouette/stop_area.rb
index 9b48cde17..cada56384 100644
--- a/app/models/chouette/stop_area.rb
+++ b/app/models/chouette/stop_area.rb
@@ -58,7 +58,6 @@ class Chouette::StopArea < Chouette::ActiveRecord
before_validation :prepare_auto_columns
def prepare_auto_columns
self.object_version = 1
- self.creation_time = Time.now
self.creator_id = 'chouette'
end
diff --git a/app/models/concerns/default_attributes_support.rb b/app/models/concerns/default_attributes_support.rb
index ba5611fe3..ecad26856 100644
--- a/app/models/concerns/default_attributes_support.rb
+++ b/app/models/concerns/default_attributes_support.rb
@@ -47,7 +47,6 @@ module DefaultAttributesSupport
else
self.object_version += 1
end
- self.creation_time = Time.now
self.creator_id = 'chouette'
end
@@ -102,12 +101,4 @@ module DefaultAttributesSupport
self.object_version ||= 1
end
- def timestamp_attributes_for_update #:nodoc:
- [:creation_time]
- end
-
- def timestamp_attributes_for_create #:nodoc:
- [:creation_time]
- end
-
end
diff --git a/app/models/concerns/default_netex_attributes_support.rb b/app/models/concerns/default_netex_attributes_support.rb
index 89007f2a2..4cf77ea65 100644
--- a/app/models/concerns/default_netex_attributes_support.rb
+++ b/app/models/concerns/default_netex_attributes_support.rb
@@ -32,7 +32,6 @@ module DefaultNetexAttributesSupport
else
self.object_version += 1
end
- self.creation_time = Time.now
self.creator_id = 'chouette'
end
@@ -70,12 +69,4 @@ module DefaultNetexAttributesSupport
self.object_version ||= 1
end
- def timestamp_attributes_for_update #:nodoc:
- [:creation_time]
- end
-
- def timestamp_attributes_for_create #:nodoc:
- [:creation_time]
- end
-
end
diff --git a/app/views/api/kml/access_links/index.kml.slim b/app/views/api/kml/access_links/index.kml.slim
index f402a7aa4..1bcfdacf1 100644
--- a/app/views/api/kml/access_links/index.kml.slim
+++ b/app/views/api/kml/access_links/index.kml.slim
@@ -1,14 +1,14 @@
doctype XML
-kml xmlns="http://www.opengis.net/kml/2.2"
+kml xmlns="http://www.opengis.net/kml/2.2"
document
name = h(Chouette::AccessLink.model_name.human)
-
+
- @access_links.each do |access_link|
placemark id="#{access_link.objectid}"
name = h(access_link.name)
extendeddata
- - [ :access_link_type, :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :link_distance, :link_type, :default_duration, :frequent_traveller_duration, :occasional_traveller_duration, :mobility_restricted_traveller_duration, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs, :link_orientation].each do |prop|
+ - [ :access_link_type, :objectid, :object_version, :created_at, :updated_at, :creator_id, :name, :comment, :link_distance, :link_type, :default_duration, :frequent_traveller_duration, :occasional_traveller_duration, :mobility_restricted_traveller_duration, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs, :link_orientation].each do |prop|
data name="#{prop.to_s}"
value = h(access_link.send( prop))
@@ -18,4 +18,4 @@ kml xmlns="http://www.opengis.net/kml/2.2"
data name="stop_area_objectid"
value = h(access_link.stop_area.objectid)
- = access_link.geometry_presenter.geometry.kml_representation.html_safe \ No newline at end of file
+ = access_link.geometry_presenter.geometry.kml_representation.html_safe
diff --git a/app/views/api/kml/access_points/index.kml.slim b/app/views/api/kml/access_points/index.kml.slim
index 4f47272e6..1a162f7ed 100644
--- a/app/views/api/kml/access_points/index.kml.slim
+++ b/app/views/api/kml/access_points/index.kml.slim
@@ -1,19 +1,19 @@
doctype XML
-kml xmlns="http://www.opengis.net/kml/2.2"
+kml xmlns="http://www.opengis.net/kml/2.2"
document
name = h(Chouette::AccessPoint.model_name.human)
name access
-
+
- @access_points.each do |access_point|
placemark id="#{access_point.objectid}"
name = h(access_point.name)
extendeddata
- - [ :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :openning_time, :closing_time, :access_type, :access_point_type, :mobility_restricted_suitability, :stairs_availability, :lift_availability].each do |prop|
+ - [ :objectid, :object_version, :creator_id, :created_at, :updated_at, :name, :comment, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :openning_time, :closing_time, :access_type, :access_point_type, :mobility_restricted_suitability, :stairs_availability, :lift_availability].each do |prop|
data name="#{prop.to_s}"
value = h(access_point.send( prop))
data name="stop_area_objectid"
value = h(access_point.stop_area.objectid)
-
- = access_point.geometry_presenter.geometry.kml_representation.html_safe \ No newline at end of file
+
+ = access_point.geometry_presenter.geometry.kml_representation.html_safe
diff --git a/app/views/api/kml/connection_links/index.kml.slim b/app/views/api/kml/connection_links/index.kml.slim
index b5a6e9560..7305fbc78 100644
--- a/app/views/api/kml/connection_links/index.kml.slim
+++ b/app/views/api/kml/connection_links/index.kml.slim
@@ -1,6 +1,6 @@
doctype XML
-kml xmlns="http://www.opengis.net/kml/2.2"
+kml xmlns="http://www.opengis.net/kml/2.2"
document
name = h(Chouette::ConnectionLink.model_name.human)
@@ -8,7 +8,7 @@ kml xmlns="http://www.opengis.net/kml/2.2"
placemark id="#{connection_link.objectid}"
name = h(connection_link.name)
extendeddata
- - [ :connection_link_type, :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :link_distance, :link_type, :default_duration, :frequent_traveller_duration, :occasional_traveller_duration, :mobility_restricted_traveller_duration, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs].each do |prop|
+ - [ :connection_link_type, :objectid, :object_version, :creator_id, :created_at, :updated_at, :name, :comment, :link_distance, :link_type, :default_duration, :frequent_traveller_duration, :occasional_traveller_duration, :mobility_restricted_traveller_duration, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs].each do |prop|
data name="#{prop.to_s}"
value = h(connection_link.send( prop))
@@ -18,4 +18,4 @@ kml xmlns="http://www.opengis.net/kml/2.2"
data name="arrival_objectid"
value = h(connection_link.arrival.objectid)
- = connection_link.geometry_presenter.geometry.kml_representation.html_safe \ No newline at end of file
+ = connection_link.geometry_presenter.geometry.kml_representation.html_safe
diff --git a/app/views/api/kml/journey_patterns/show.kml.slim b/app/views/api/kml/journey_patterns/show.kml.slim
index f7e6dc9f4..15fb96daa 100644
--- a/app/views/api/kml/journey_patterns/show.kml.slim
+++ b/app/views/api/kml/journey_patterns/show.kml.slim
@@ -1,10 +1,10 @@
doctype XML
-kml xmlns="http://www.opengis.net/kml/2.2"
+kml xmlns="http://www.opengis.net/kml/2.2"
document
name = "#{h(Chouette::JourneyPattern.model_name.human)} : #{h(@journey_pattern.name)}"
extendeddata
- - [:objectid, :object_version, :creation_time, :creator_id, :name, :comment, :registration_number, :published_name].each do |prop|
+ - [:objectid, :object_version, :creator_id, :created_at, :updated_at, :name, :comment, :registration_number, :published_name].each do |prop|
data name="#{prop.to_s}"
value = h(@journey_pattern.send( prop))
@@ -17,15 +17,15 @@ kml xmlns="http://www.opengis.net/kml/2.2"
placemark id="#{stop_area.objectid}"
name = h(stop_area.name)
extendeddata
- - [ :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :area_type, :registration_number, :nearest_topic_name, :fare_code, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs].each do |prop|
+ - [ :objectid, :object_version, :creator_id, :name, :comment, :area_type, :registration_number, :nearest_topic_name, :fare_code, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs].each do |prop|
data name="#{prop.to_s}"
value = h(stop_area.send( prop))
-
+
- if stop_area.parent
data name="parent_objectid"
value = h(stop_area.parent.objectid)
-
+
data name="stop"
value = @journey_pattern.stop_points.include?( stop_point) ? "true" : "false"
- = stop_area.geometry_presenter.geometry.kml_representation.html_safe \ No newline at end of file
+ = stop_area.geometry_presenter.geometry.kml_representation.html_safe
diff --git a/app/views/api/kml/lines/show.kml.slim b/app/views/api/kml/lines/show.kml.slim
index d314b8f19..d1e48323d 100644
--- a/app/views/api/kml/lines/show.kml.slim
+++ b/app/views/api/kml/lines/show.kml.slim
@@ -1,13 +1,13 @@
doctype XML
-kml xmlns="http://www.opengis.net/kml/2.2"
+kml xmlns="http://www.opengis.net/kml/2.2"
document
name = "#{h(Chouette::Line.model_name.human)} : #{h(@line.name)}"
-
+
placemark id="#{@line.objectid}"
name = h(@line.name)
extendeddata
- - [ :transport_mode, :objectid, :object_version, :creation_time, :creator_id, :name, :number, :published_name, :registration_number, :comment, :mobility_restricted_suitability, :int_user_needs].each do |prop|
+ - [ :transport_mode, :objectid, :created_at, :updated_at, :object_version, :creator_id, :name, :number, :published_name, :registration_number, :comment, :mobility_restricted_suitability, :int_user_needs].each do |prop|
data name="#{prop.to_s}"
value = h(@line.send( prop))
@@ -17,4 +17,4 @@ kml xmlns="http://www.opengis.net/kml/2.2"
data name="network_objectid"
value = h(@line.network.objectid)
- = @line.geometry_presenter.geometry.kml_representation.html_safe \ No newline at end of file
+ = @line.geometry_presenter.geometry.kml_representation.html_safe
diff --git a/app/views/api/kml/routes/show.kml.slim b/app/views/api/kml/routes/show.kml.slim
index 51d2817c8..8a2843bc0 100644
--- a/app/views/api/kml/routes/show.kml.slim
+++ b/app/views/api/kml/routes/show.kml.slim
@@ -6,7 +6,7 @@ kml xmlns="http://www.opengis.net/kml/2.2"
placemark id="#{@route.objectid}"
name = h(@route.name)
extendeddata
- - [:direction, :wayback, :objectid, :object_version, :creation_time, :creator_id, :name, :comment, :published_name, :number, :direction_text, :wayback_text].each do |prop|
+ - [:direction, :wayback, :objectid, :object_version, :creator_id, :created_at, :updated_at, :name, :comment, :published_name, :number, :direction_text, :wayback_text].each do |prop|
data name="#{prop.to_s}"
value = h(@route.send( prop))
diff --git a/app/views/api/kml/stop_areas/index.kml.slim b/app/views/api/kml/stop_areas/index.kml.slim
index 64f7e08be..a08dbf963 100644
--- a/app/views/api/kml/stop_areas/index.kml.slim
+++ b/app/views/api/kml/stop_areas/index.kml.slim
@@ -1,14 +1,14 @@
doctype XML
-kml xmlns="http://www.opengis.net/kml/2.2"
+kml xmlns="http://www.opengis.net/kml/2.2"
document
name = h( I18n.t("area_types.#{@area_type.underscore}") )
-
+
- @stop_areas.select { |sa| sa.latitude && sa.longitude}.each do |stop_area|
placemark id="#{stop_area.objectid}"
name = h(stop_area.name)
extendeddata
- - [:objectid, :object_version, :creation_time, :creator_id, :name, :comment, :area_type, :registration_number, :nearest_topic_name, :fare_code, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs].each do |prop|
+ - [:objectid, :object_version, :creator_id, :created_at, :updated_at, :name, :comment, :area_type, :registration_number, :nearest_topic_name, :fare_code, :longitude, :latitude, :long_lat_type, :country_code, :street_name, :mobility_restricted_suitability, :stairs_availability, :lift_availability, :int_user_needs].each do |prop|
data name="#{prop.to_s}"
value = h(stop_area.send( prop))
@@ -16,4 +16,4 @@ kml xmlns="http://www.opengis.net/kml/2.2"
data name="parent_objectid"
value = h(stop_area.parent.objectid)
- = stop_area.geometry_presenter.geometry.kml_representation.html_safe \ No newline at end of file
+ = stop_area.geometry_presenter.geometry.kml_representation.html_safe
diff --git a/app/views/api/v1/trident_objects/show.rabl b/app/views/api/v1/trident_objects/show.rabl
index 7d58d9a55..e53a791ef 100644
--- a/app/views/api/v1/trident_objects/show.rabl
+++ b/app/views/api/v1/trident_objects/show.rabl
@@ -1,5 +1,5 @@
attributes :objectid => :object_id
-[ :object_version, :creation_time, :creator_id].each do |attr|
+[ :object_version, :created_at, :updated_at, :creator_id].each do |attr|
attributes attr, :unless => lambda { |m| m.send( attr).nil?}
end