aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock18
-rw-r--r--README.md10
-rw-r--r--app/controllers/access_links_controller.rb23
-rw-r--r--app/controllers/access_points_controller.rb15
-rw-r--r--app/controllers/companies_controller.rb21
-rw-r--r--app/controllers/compliance_check_tasks_controller.rb11
-rw-r--r--app/controllers/connection_links_controller.rb20
-rw-r--r--app/controllers/exports_controller.rb2
-rw-r--r--app/controllers/group_of_lines_controller.rb18
-rw-r--r--app/controllers/import_tasks_controller.rb2
-rw-r--r--app/controllers/journey_patterns_controller.rb23
-rw-r--r--app/controllers/lines_controller.rb16
-rw-r--r--app/controllers/networks_controller.rb17
-rw-r--r--app/controllers/routes_controller.rb19
-rw-r--r--app/controllers/rule_parameter_sets_controller.rb21
-rw-r--r--app/controllers/stop_area_copies_controller.rb5
-rw-r--r--app/controllers/stop_areas_controller.rb20
-rw-r--r--app/exporters/chouette/hub/exporter.rb2
-rw-r--r--app/exporters/chouette/kml/exporter.rb4
-rw-r--r--app/models/vehicle_journey_export.rb5
-rw-r--r--app/views/referentials/index.html.erb2
-rw-r--r--app/views/routes/show.html.erb1
-rw-r--r--app/views/rule_parameter_sets/show.html.erb3
-rw-r--r--config/locales/layouts.yml8
-rw-r--r--config/locales/referentials.yml2
-rw-r--r--spec/exporters/chouette/kml/exporter_spec.rb8
-rw-r--r--spec/requests/referentials_spec.rb2
28 files changed, 254 insertions, 46 deletions
diff --git a/Gemfile b/Gemfile
index d86691037..984c9b675 100644
--- a/Gemfile
+++ b/Gemfile
@@ -54,7 +54,7 @@ gem 'bootstrap-timepicker-rails'
# Format Output
gem 'json'
-gem 'rubyzip', :require => 'zip/zip'
+gem 'rubyzip', '~> 1.1.6'
gem 'roo'
# Controller
diff --git a/Gemfile.lock b/Gemfile.lock
index 9106a5f2a..afd4e21dc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/afimb/ninoxe.git
- revision: 931ae2e2d580d7d241090a8f35ccebaacbd7174d
+ revision: 139f461be9a23566d242495df14331ec06308ce1
branch: sismo
specs:
ninoxe (1.1.0)
@@ -89,7 +89,7 @@ GEM
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
- childprocess (0.3.9)
+ childprocess (0.5.3)
ffi (~> 1.0, >= 1.0.11)
choice (0.1.6)
cocoon (1.1.2)
@@ -302,17 +302,17 @@ GEM
rspec-mocks (~> 2.13.0)
ruby-graphviz (1.0.9)
ruby-ole (1.2.11.7)
- rubyzip (0.9.9)
+ rubyzip (1.1.6)
sass (3.3.7)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
- selenium-webdriver (2.35.1)
- childprocess (>= 0.2.5)
+ selenium-webdriver (2.43.0)
+ childprocess (~> 0.5)
multi_json (~> 1.0)
- rubyzip (< 1.0.0)
- websocket (~> 1.0.4)
+ rubyzip (~> 1.0)
+ websocket (~> 1.0)
shoulda-matchers (1.2.0)
activesupport (>= 3.0.0)
simple_form (2.1.1)
@@ -354,7 +354,7 @@ GEM
rubyzip (>= 0.9.4)
warden (1.2.1)
rack (>= 1.0)
- websocket (1.0.7)
+ websocket (1.2.1)
will_paginate (3.0.5)
will_paginate-bootstrap (1.0.0)
will_paginate (>= 3.0.3)
@@ -422,7 +422,7 @@ DEPENDENCIES
remarkable_activerecord (~> 4.0.0.alpha4)
roo
rspec-rails (~> 2.0)
- rubyzip
+ rubyzip (~> 1.1.6)
sass-rails (~> 3.2.3)
shoulda-matchers
simple_form
diff --git a/README.md b/README.md
index 1637d5bd0..3b0127f99 100644
--- a/README.md
+++ b/README.md
@@ -57,15 +57,17 @@ sudo apt-get install make
Installation
------------
+On debian, chouette can also be installed as package : see [debian packages](http://packages.chouette.cityway.fr/debian/chouette)
+
Install chouette-gui-command to import, export and validate transport offer,
Assume Linux user is myuser and its group mygroup (that user is the one who starts Rails server)
```sh
sudo mkdir -p /usr/local/opt/chouette-command/
sudo chown -R myuser:mygroup /usr/local/opt/chouette-command/
cd /usr/local/opt/chouette-command/
-wget http://maven.chouette.cityway.fr/fr/certu/chouette/chouette-gui-command/2.4.1/chouette-gui-command-2.4.1.zip
-unzip chouette-gui-command-2.4.1.zip
-cd chouette-cmd_2.4.1
+wget http://maven.chouette.cityway.fr/fr/certu/chouette/chouette-gui-command/2.5.0/chouette-gui-command-2.5.0.zip
+unzip chouette-gui-command-2.5.0.zip
+cd chouette-cmd_2.5.0
sudo chmod a+w .
```
@@ -74,7 +76,7 @@ Install web application
Get git source code :
```sh
cd
-git clone -b V2_4 git://github.com/afimb/chouette2
+git clone -b V2_5 git://github.com/afimb/chouette2
cd chouette2
```
Download gem librairies
diff --git a/app/controllers/access_links_controller.rb b/app/controllers/access_links_controller.rb
index 8c6172a7c..4509de575 100644
--- a/app/controllers/access_links_controller.rb
+++ b/app/controllers/access_links_controller.rb
@@ -16,7 +16,15 @@ class AccessLinksController < ChouetteController
def show
@map = AccessLinkMap.new(resource).with_helpers(self)
- show!
+ @access_point = Chouette::AccessPoint.find(params[:access_point_id])
+ @access_link = Chouette::AccessLink.find(params[:id])
+ @stop_area = @access_link.stop_area
+ show! do
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
+ add_breadcrumb @access_point.name, referential_stop_area_access_point_path(@referential, @stop_area,@access_point)
+ add_breadcrumb Chouette::AccessLink.model_name.human(:count => 2), access_links_referential_stop_area_path(@referential, @stop_area)
+ end
end
def new
@@ -34,7 +42,11 @@ class AccessLinksController < ChouetteController
data[:name] = name
end
@access_link = Chouette::AccessLink.new(data)
- new!
+ new! do
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
+ add_breadcrumb @access_point.name, referential_stop_area_access_point_path(@referential, @stop_area,@access_point)
+ end
end
def create
@@ -50,7 +62,12 @@ class AccessLinksController < ChouetteController
@access_link = Chouette::AccessLink.find(params[:id])
@stop_area = @access_link.stop_area
@orientation = @access_link.link_orientation_type
- edit!
+ edit! do
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
+ add_breadcrumb @access_point.name, referential_stop_area_access_point_path(@referential, @stop_area,@access_point)
+ add_breadcrumb @access_link.name, referential_access_point_access_link_path(@referential, @access_point, @access_link)
+ end
end
protected
diff --git a/app/controllers/access_points_controller.rb b/app/controllers/access_points_controller.rb
index cf7507100..0e06bee19 100644
--- a/app/controllers/access_points_controller.rb
+++ b/app/controllers/access_points_controller.rb
@@ -30,13 +30,26 @@ class AccessPointsController < ChouetteController
}
end
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
end
end
+ def new
+ new! do
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
+ end
+ end
+
def edit
access_point.position ||= access_point.default_position
map.editable = true
- edit!
+ edit! do
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
+ add_breadcrumb @access_point.name, referential_stop_area_access_point_path(@referential, @stop_area,@access_point)
+ end
end
diff --git a/app/controllers/companies_controller.rb b/app/controllers/companies_controller.rb
index 3b5631a8f..20f84e763 100644
--- a/app/controllers/companies_controller.rb
+++ b/app/controllers/companies_controller.rb
@@ -14,9 +14,30 @@ class CompaniesController < ChouetteController
if collection.out_of_bounds?
redirect_to params.merge(:page => 1)
end
+ add_breadcrumb Referential.model_name.human(:count => 2), referentials_path()
+ add_breadcrumb @referential.name, referential_path(@referential)
}
end
end
+
+ def show
+ show! do
+ add_breadcrumb Referential.human_attribute_name("companies"), referential_companies_path(@referential)
+ end
+ end
+
+ def new
+ new! do
+ add_breadcrumb Referential.human_attribute_name("companies"), referential_companies_path(@referential)
+ end
+ end
+
+ def edit
+ edit! do
+ add_breadcrumb Referential.human_attribute_name("companies"), referential_companies_path(@referential)
+ add_breadcrumb @company.name, referential_line_path(@referential, @company)
+ end
+ end
protected
def collection
diff --git a/app/controllers/compliance_check_tasks_controller.rb b/app/controllers/compliance_check_tasks_controller.rb
index 9acce4510..bf8a670a3 100644
--- a/app/controllers/compliance_check_tasks_controller.rb
+++ b/app/controllers/compliance_check_tasks_controller.rb
@@ -2,6 +2,17 @@ class ComplianceCheckTasksController < ChouetteController
respond_to :html, :js
belongs_to :referential
+ def new
+ new! do
+ add_breadcrumb Referential.human_attribute_name("compliance_check_tasks"), referential_compliance_check_tasks_path(@referential)
+ end
+ end
+
+ def show
+ show! do
+ add_breadcrumb Referential.human_attribute_name("compliance_check_tasks"), referential_compliance_check_tasks_path(@referential)
+ end
+ end
def references
@references = referential.send(params[:type]).where("name ilike ?", "%#{params[:q]}%")
respond_to do |format|
diff --git a/app/controllers/connection_links_controller.rb b/app/controllers/connection_links_controller.rb
index 3c7dd3ab6..ca34aecdc 100644
--- a/app/controllers/connection_links_controller.rb
+++ b/app/controllers/connection_links_controller.rb
@@ -22,13 +22,31 @@ class ConnectionLinksController < ChouetteController
def show
@map = ConnectionLinkMap.new(resource).with_helpers(self)
- show!
+ show! do
+ add_breadcrumb Referential.human_attribute_name("connection_links"), referential_connection_links_path(@referential)
+ end
end
+ def new
+ new! do
+ add_breadcrumb Referential.human_attribute_name("connection_links"), referential_connection_links_path(@referential)
+ end
+ end
+
+ def edit
+ edit! do
+ add_breadcrumb Referential.human_attribute_name("connection_links"), referential_connection_links_path(@referential)
+ add_breadcrumb @connection_link.name, referential_connection_link_path(@referential, @connection_link)
+ end
+ end
+
+
def select_areas
@connection_link = connection_link
@departure = connection_link.departure
@arrival = connection_link.arrival
+ add_breadcrumb Referential.human_attribute_name("connection_links"), referential_connection_links_path(@referential)
+ add_breadcrumb @connection_link.name, referential_connection_link_path(@referential, @connection_link)
end
protected
diff --git a/app/controllers/exports_controller.rb b/app/controllers/exports_controller.rb
index ed2ecd329..d5723ff78 100644
--- a/app/controllers/exports_controller.rb
+++ b/app/controllers/exports_controller.rb
@@ -7,6 +7,7 @@ class ExportsController < ChouetteController
def new
new! do
+ add_breadcrumb Referential.human_attribute_name("exports"), referential_exports_path(@referential)
available_exports
end
end
@@ -19,6 +20,7 @@ class ExportsController < ChouetteController
end
def show
+ add_breadcrumb Referential.human_attribute_name("exports"), referential_exports_path(@referential)
show! do |format|
format.zip { send_file @export.file, :type => :zip }
end
diff --git a/app/controllers/group_of_lines_controller.rb b/app/controllers/group_of_lines_controller.rb
index 5bbda9b84..7167cc40e 100644
--- a/app/controllers/group_of_lines_controller.rb
+++ b/app/controllers/group_of_lines_controller.rb
@@ -11,7 +11,9 @@ class GroupOfLinesController < ChouetteController
def show
@map = GroupOfLineMap.new(resource).with_helpers(self)
@lines = resource.lines.order(:name).paginate(:page => params[:page])
- show!
+ show! do
+ add_breadcrumb Referential.human_attribute_name("group_of_lines"), referential_group_of_lines_path(@referential)
+ end
end
def index
@@ -23,12 +25,24 @@ class GroupOfLinesController < ChouetteController
}
end
end
+
+ def new
+ new! do
+ add_breadcrumb Referential.human_attribute_name("group_of_lines"), referential_group_of_lines_path(@referential)
+ end
+ end
+
+ def edit
+ edit! do
+ add_breadcrumb Referential.human_attribute_name("group_of_lines"), referential_group_of_lines_path(@referential)
+ add_breadcrumb @group_of_line.name, referential_group_of_line_path(@referential, @group_of_line)
+ end
+ end
def name_filter
respond_to do |format|
format.json { render :json => filtered_group_of_lines_maps}
end
-
end
protected
diff --git a/app/controllers/import_tasks_controller.rb b/app/controllers/import_tasks_controller.rb
index 1d7e8c3aa..e900c79ce 100644
--- a/app/controllers/import_tasks_controller.rb
+++ b/app/controllers/import_tasks_controller.rb
@@ -5,12 +5,14 @@ class ImportTasksController < ChouetteController
def new
new! do
+ add_breadcrumb Referential.human_attribute_name("import_tasks"), referential_import_tasks_path(@referential)
available_imports
end
end
def show
show! do
+ add_breadcrumb Referential.human_attribute_name("import_tasks"), referential_import_tasks_path(@referential)
if import_task.completed?
@files_stats = import_task.result["files"]["stats"]
@files_list = import_task.result["files"]["list"]
diff --git a/app/controllers/journey_patterns_controller.rb b/app/controllers/journey_patterns_controller.rb
index 0274b9b71..084f34b03 100644
--- a/app/controllers/journey_patterns_controller.rb
+++ b/app/controllers/journey_patterns_controller.rb
@@ -27,7 +27,28 @@ class JourneyPatternsController < ChouetteController
def show
@map = JourneyPatternMap.new(journey_pattern).with_helpers(self)
@stop_points = journey_pattern.stop_points.paginate(:page => params[:page])
- show!
+ show! do
+ add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential)
+ add_breadcrumb @line.name, referential_line_path(@referential, @line)
+ add_breadcrumb @route.name, referential_line_route_path(@referential, @line, @route)
+ end
+ end
+
+ def new
+ new! do
+ add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential)
+ add_breadcrumb @line.name, referential_line_path(@referential, @line)
+ add_breadcrumb @route.name, referential_line_route_path(@referential, @line, @route)
+ end
+ end
+
+ def edit
+ edit! do
+ add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential)
+ add_breadcrumb @line.name, referential_line_path(@referential, @line)
+ add_breadcrumb @route.name, referential_line_route_path(@referential, @line, @route)
+ add_breadcrumb @journey_pattern.name, referential_line_route_journey_pattern_path(@referential, @line, @route, @journey_pattern)
+ end
end
def new_vehicle_journey
diff --git a/app/controllers/lines_controller.rb b/app/controllers/lines_controller.rb
index 3721a957d..2ff732721 100644
--- a/app/controllers/lines_controller.rb
+++ b/app/controllers/lines_controller.rb
@@ -22,9 +22,23 @@ class LinesController < ChouetteController
@map = LineMap.new(resource).with_helpers(self)
@routes = @line.routes
@group_of_lines = @line.group_of_lines
- show!
+ show! do
+ add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential)
+ end
end
+ def new
+ new! do
+ add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential)
+ end
+ end
+
+ def edit
+ edit! do
+ add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential)
+ add_breadcrumb @line.name, referential_line_path(@referential, @line)
+ end
+ end
# overwrite inherited resources to use delete instead of destroy
# foreign keys will propagate deletion)
def destroy_resource(object)
diff --git a/app/controllers/networks_controller.rb b/app/controllers/networks_controller.rb
index 04d565812..f99ff494b 100644
--- a/app/controllers/networks_controller.rb
+++ b/app/controllers/networks_controller.rb
@@ -10,7 +10,9 @@ class NetworksController < ChouetteController
def show
@map = NetworkMap.new(resource).with_helpers(self)
- show!
+ show! do
+ add_breadcrumb Referential.human_attribute_name("networks"), referential_networks_path(@referential)
+ end
end
def index
@@ -23,6 +25,19 @@ class NetworksController < ChouetteController
end
end
+ def new
+ new! do
+ add_breadcrumb Referential.human_attribute_name("networks"), referential_networks_path(@referential)
+ end
+ end
+
+ def edit
+ edit! do
+ add_breadcrumb Referential.human_attribute_name("networks"), referential_networks_path(@referential)
+ add_breadcrumb @network.name, referential_line_path(@referential, @network)
+ end
+ end
+
protected
def collection
diff --git a/app/controllers/routes_controller.rb b/app/controllers/routes_controller.rb
index 7b5e096db..7d51c47ad 100644
--- a/app/controllers/routes_controller.rb
+++ b/app/controllers/routes_controller.rb
@@ -18,9 +18,26 @@ class RoutesController < ChouetteController
def show
@map = RouteMap.new(route).with_helpers(self)
@stop_points = route.stop_points.paginate(:page => params[:page])
- show!
+ show! do
+ add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential)
+ add_breadcrumb @line.name, referential_line_path(@referential, @line)
+ end
end
+ def new
+ new! do
+ add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential)
+ add_breadcrumb @line.name, referential_line_path(@referential, @line)
+ end
+ end
+
+ def edit
+ edit! do
+ add_breadcrumb Referential.human_attribute_name("lines"), referential_lines_path(@referential)
+ add_breadcrumb @line.name, referential_line_path(@referential, @line)
+ add_breadcrumb @route.name, referential_line_route_path(@referential, @line, @route)
+ end
+ end
# overwrite inherited resources to use delete instead of destroy
# foreign keys will propagate deletion)
def destroy_resource(object)
diff --git a/app/controllers/rule_parameter_sets_controller.rb b/app/controllers/rule_parameter_sets_controller.rb
index fbd5281c8..9918e0eb5 100644
--- a/app/controllers/rule_parameter_sets_controller.rb
+++ b/app/controllers/rule_parameter_sets_controller.rb
@@ -6,7 +6,26 @@ class RuleParameterSetsController < ChouetteController
def new
@rule_parameter_set = RuleParameterSet.default( @referential)
- new!
+ new! do
+ add_breadcrumb Referential.human_attribute_name("import_tasks"), referential_import_tasks_path(@referential)
+ add_breadcrumb Referential.human_attribute_name("compliance_check_tasks"), referential_compliance_check_tasks_path(@referential)
+ add_breadcrumb Referential.human_attribute_name("rule_parameter_sets"), referential_rule_parameter_sets_path(@referential)
+ end
+ end
+
+ def index
+ index! do
+ add_breadcrumb Referential.human_attribute_name("import_tasks"), referential_import_tasks_path(@referential)
+ add_breadcrumb Referential.human_attribute_name("compliance_check_tasks"), referential_compliance_check_tasks_path(@referential)
+ end
+ end
+
+ def show
+ show! do
+ add_breadcrumb Referential.human_attribute_name("import_tasks"), referential_import_tasks_path(@referential)
+ add_breadcrumb Referential.human_attribute_name("compliance_check_tasks"), referential_compliance_check_tasks_path(@referential)
+ add_breadcrumb Referential.human_attribute_name("rule_parameter_sets"), referential_rule_parameter_sets_path(@referential)
+ end
end
def destroy
diff --git a/app/controllers/stop_area_copies_controller.rb b/app/controllers/stop_area_copies_controller.rb
index dbb66c2bd..642932acd 100644
--- a/app/controllers/stop_area_copies_controller.rb
+++ b/app/controllers/stop_area_copies_controller.rb
@@ -8,7 +8,10 @@ class StopAreaCopiesController < ChouetteController
def new
@stop_area_copy = StopAreaCopy.new(:hierarchy => params[:hierarchy], :source => parent)
- new!
+ new! do
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
+ end
end
def create
diff --git a/app/controllers/stop_areas_controller.rb b/app/controllers/stop_areas_controller.rb
index ab4900ef1..ca72c362b 100644
--- a/app/controllers/stop_areas_controller.rb
+++ b/app/controllers/stop_areas_controller.rb
@@ -19,27 +19,37 @@ class StopAreasController < ChouetteController
def select_parent
@stop_area = stop_area
@parent = stop_area.parent
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
end
def add_children
@stop_area = stop_area
@children = stop_area.children
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
end
def add_routing_lines
@stop_area = stop_area
@lines = stop_area.routing_lines
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
end
def add_routing_stops
@stop_area = stop_area
@stops = stop_area.routing_stops
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
end
def access_links
@stop_area = stop_area
@generic_access_links = stop_area.generic_access_link_matrix
@detail_access_links = stop_area.detail_access_link_matrix
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
end
def index
@@ -57,7 +67,9 @@ class StopAreasController < ChouetteController
def new
@map = StopAreaMap.new( Chouette::StopArea.new).with_helpers(self)
@map.editable = true
- new!
+ new! do
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ end
end
def show
@@ -70,6 +82,7 @@ class StopAreasController < ChouetteController
}
end
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
end
end
@@ -77,7 +90,10 @@ class StopAreasController < ChouetteController
stop_area.position ||= stop_area.default_position
map.editable = true
- edit!
+ edit! do
+ add_breadcrumb Referential.human_attribute_name("stop_areas"), referential_stop_areas_path(@referential)
+ add_breadcrumb @stop_area.name, referential_stop_area_path(@referential, @stop_area)
+ end
end
def default_geometry
diff --git a/app/exporters/chouette/hub/exporter.rb b/app/exporters/chouette/hub/exporter.rb
index 5f1a1508f..3d709cc18 100644
--- a/app/exporters/chouette/hub/exporter.rb
+++ b/app/exporters/chouette/hub/exporter.rb
@@ -172,7 +172,7 @@ class Chouette::Hub::Exporter
end
- ::Zip::ZipFile.open(zip_file_path, ::Zip::ZipFile::CREATE) do |zipfile|
+ ::Zip::File.open(zip_file_path, ::Zip::File::CREATE) do |zipfile|
Dir[File.join(temp_dir, '*.TXT')].each do |f|
#Rails.logger.error("Adding File #{File.basename(f)}")
zipfile.add(File.basename(f), f)
diff --git a/app/exporters/chouette/kml/exporter.rb b/app/exporters/chouette/kml/exporter.rb
index 06af4bc2f..5b6170edc 100644
--- a/app/exporters/chouette/kml/exporter.rb
+++ b/app/exporters/chouette/kml/exporter.rb
@@ -1,5 +1,7 @@
class Chouette::Kml::Exporter
+ require 'zip'
+
attr_reader :referential
attr_reader :kml_export, :lines, :routes, :journey_patterns
@@ -103,7 +105,7 @@ class Chouette::Kml::Exporter
end
- ::Zip::ZipFile.open(zip_file_path, ::Zip::ZipFile::CREATE) do |zipfile|
+ ::Zip::File.open(zip_file_path, ::Zip::File::CREATE) do |zipfile|
Dir[File.join(temp_dir, '*.kml')].each do |f|
zipfile.add(File.basename(f), f)
end
diff --git a/app/models/vehicle_journey_export.rb b/app/models/vehicle_journey_export.rb
index 6848ccffb..7e67e17c9 100644
--- a/app/models/vehicle_journey_export.rb
+++ b/app/models/vehicle_journey_export.rb
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
require "csv"
-require "zip/zip"
class VehicleJourneyExport
include ActiveModel::Validations
@@ -152,8 +151,8 @@ class VehicleJourneyExport
end
def to_zip(temp_file,options = {})
- ::Zip::ZipOutputStream.open(temp_file) { |zos| }
- ::Zip::ZipFile.open(temp_file.path, ::Zip::ZipFile::CREATE) do |zipfile|
+ ::Zip::OutputStream.open(temp_file) { |zos| }
+ ::Zip::File.open(temp_file.path, ::Zip::File::CREATE) do |zipfile|
zipfile.get_output_stream(label("vj_filename")+route.id.to_s+".csv") { |f| f.puts to_csv(options) }
zipfile.get_output_stream(label("tt_filename")+".csv") { |f| f.puts time_tables_to_csv(options) }
end
diff --git a/app/views/referentials/index.html.erb b/app/views/referentials/index.html.erb
index 220fc17ba..cf4eaa245 100644
--- a/app/views/referentials/index.html.erb
+++ b/app/views/referentials/index.html.erb
@@ -1,4 +1,4 @@
-<%= title_tag Referential.model_name.human.pluralize %>
+<%= title_tag Referential.model_name.human(:count => 2) %>
<div class="referentials paginated_content">
<%= paginated_content @referentials %>
diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb
index 5621f7a36..b935a6f34 100644
--- a/app/views/routes/show.html.erb
+++ b/app/views/routes/show.html.erb
@@ -97,6 +97,7 @@
<li><%= link_to t('journey_patterns.actions.new'), new_referential_line_route_journey_pattern_path(@referential, @line, @route), :class => "add" %></li>
<% end %>
<li><%= link_to t('vehicle_journey_imports.new.title'), new_referential_line_route_vehicle_journey_import_path( @referential, @line, @route ), :class => "import" %></li>
+ <li><%= link_to image_tag("icons/file_csv.png") + t('vehicle_journey_exports.new.title'), referential_line_route_vehicle_journey_exports_path(@referential, @line, @route, :format => :zip), :class => "with_fa" %></li>
<% if @route.journey_patterns.size > 0 %>
<li>
<i class="fa fa-clock-o fa-fw"></i><%= link_to t('vehicle_journeys.actions.index'), [@referential, @line, @route, :vehicle_journeys], :class => "with_fa" %>
diff --git a/app/views/rule_parameter_sets/show.html.erb b/app/views/rule_parameter_sets/show.html.erb
index f2427e36e..f4ca5e912 100644
--- a/app/views/rule_parameter_sets/show.html.erb
+++ b/app/views/rule_parameter_sets/show.html.erb
@@ -97,13 +97,12 @@
<% content_for :sidebar do %>
<ul class="actions">
+ <li><%= link_to t('rule_parameter_sets.actions.new'), new_referential_rule_parameter_set_path(@referential), :class => "add" %></li>
<% if @rule_parameter_set.persisted? %>
- <li><%= link_to t('rule_parameter_sets.actions.index'), referential_rule_parameter_sets_path(@referential), :class => "link" %></li>
<li><%= link_to t('rule_parameter_sets.actions.edit'), edit_referential_rule_parameter_set_path(@referential, @rule_parameter_set), :class => "edit" %></li>
<% if @referential.rule_parameter_sets.size > 1 %>
<li><%= link_to t('rule_parameter_sets.actions.destroy'), referential_rule_parameter_set_path(@referential, @rule_parameter_set), :method => :delete, :data => {:confirm => t('rule_parameter_sets.actions.destroy_confirm')}, :class => "remove" %></li>
<% end %>
- <li><%= link_to t('rule_parameter_sets.actions.new'), new_referential_rule_parameter_set_path(@referential), :class => "add" %></li>
<% end %>
</ul>
<% end %>
diff --git a/config/locales/layouts.yml b/config/locales/layouts.yml
index 342e052b8..d1b479254 100644
--- a/config/locales/layouts.yml
+++ b/config/locales/layouts.yml
@@ -7,8 +7,8 @@ en:
profile: "My Profile"
sign_out: "Sign out"
navbar:
- return_to_referentials: "Return to referentials"
- select_referential: "Select referential"
+ return_to_referentials: "Return to data spaces"
+ select_referential: "Select data space"
select_referential_datas: "Select datas"
return_to_dashboard: "Return to Dashboard"
referential_datas: "Datas"
@@ -49,8 +49,8 @@ fr:
profile: "Mon Profil"
sign_out: "Déconnexion"
navbar:
- return_to_referentials: "Retour à la liste des référentiels"
- select_referential: "Sélection du référentiel"
+ return_to_referentials: "Retour à la liste des espaces de données"
+ select_referential: "Sélection de l'espace de données"
select_referential_datas: "Sélection des données"
return_to_dashboard: "Retour au Tableau de Bord"
referential_datas: "Données"
diff --git a/config/locales/referentials.yml b/config/locales/referentials.yml
index 8353c1e9e..0d3a63498 100644
--- a/config/locales/referentials.yml
+++ b/config/locales/referentials.yml
@@ -65,6 +65,7 @@ en:
import_tasks: "Imports"
export_tasks: "Exports"
compliance_check_tasks: "Validations"
+ rule_parameter_sets: "Rule parameters sets"
formtastic:
titles:
referential:
@@ -140,6 +141,7 @@ fr:
import_tasks: "Imports"
export_tasks: "Exports"
compliance_check_tasks: "Validations"
+ rule_parameter_sets: "Jeux de paramètres"
formtastic:
titles:
referential:
diff --git a/spec/exporters/chouette/kml/exporter_spec.rb b/spec/exporters/chouette/kml/exporter_spec.rb
index 2135c0b91..a996b0746 100644
--- a/spec/exporters/chouette/kml/exporter_spec.rb
+++ b/spec/exporters/chouette/kml/exporter_spec.rb
@@ -28,25 +28,25 @@ describe Chouette::Kml::Exporter do
it "should return a zip file with nothing inside with no objects in arguments" do
subject.export(zip_file_path, {:export_id => 1, :o => "line"} )
File.exists?(zip_file_path).should be_true
- ::Zip::ZipFile.open(zip_file_path).size.should == 6
+ ::Zip::File.open(zip_file_path).size.should == 6
end
it "should return a zip file with 4 kml files" do
subject.export(zip_file_path, {:export_id => 1, :o => "line", :id => "#{line.id}" } )
File.exists?(zip_file_path).should be_true
- ::Zip::ZipFile.open(zip_file_path).size.should == 4
+ ::Zip::File.open(zip_file_path).size.should == 4
end
it "should return a zip file with 6 kml files" do
subject.export(zip_file_path, {:export_id => 1, :o => "line", :id => "#{line.id},#{line2.id}" } )
File.exists?(zip_file_path).should be_true
- ::Zip::ZipFile.open(zip_file_path).size.should == 6
+ ::Zip::File.open(zip_file_path).size.should == 6
end
it "should return a zip file with 6 kml files" do
subject.export(zip_file_path, {:export_id => 1, :o => "", :id => "" } )
File.exists?(zip_file_path).should be_true
- ::Zip::ZipFile.open(zip_file_path).size.should == 6
+ ::Zip::File.open(zip_file_path).size.should == 6
end
end
diff --git a/spec/requests/referentials_spec.rb b/spec/requests/referentials_spec.rb
index c57192d9b..975248375 100644
--- a/spec/requests/referentials_spec.rb
+++ b/spec/requests/referentials_spec.rb
@@ -8,7 +8,7 @@ describe "Referentials" do
it "should support no referential" do
visit referentials_path
- page.should have_content("Espace de Données")
+ page.should have_content("Espaces de Données")
end
context "when several referentials exist" do