diff options
| author | Michel Etienne | 2012-11-12 15:12:24 +0100 |
|---|---|---|
| committer | Michel Etienne | 2012-11-12 15:12:24 +0100 |
| commit | e4728a4cc84f91bc2aa6bb82c38c1b87ff629ba2 (patch) | |
| tree | c2a413e09fcfbbd7ac476a96ba5303c7a62b65d5 /app/controllers | |
| parent | 2746176c6b2675d13568208061296915b2904277 (diff) | |
| download | chouette-core-e4728a4cc84f91bc2aa6bb82c38c1b87ff629ba2.tar.bz2 | |
manage generic access_links and hide/show datas on several views
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/access_points_controller.rb | 3 | ||||
| -rw-r--r-- | app/controllers/file_validations_controller.rb | 13 | ||||
| -rw-r--r-- | app/controllers/stop_areas_controller.rb | 3 |
3 files changed, 17 insertions, 2 deletions
diff --git a/app/controllers/access_points_controller.rb b/app/controllers/access_points_controller.rb index 4f3c0d717..d26595a85 100644 --- a/app/controllers/access_points_controller.rb +++ b/app/controllers/access_points_controller.rb @@ -15,7 +15,8 @@ class AccessPointsController < ChouetteController def show map.editable = false - @access_links = @access_point.access_link_matrix + @generic_access_links = @access_point.generic_access_link_matrix + @detail_access_links = @access_point.detail_access_link_matrix show! do |format| unless access_point.position or params[:default] format.kml { diff --git a/app/controllers/file_validations_controller.rb b/app/controllers/file_validations_controller.rb index cc50a7499..274d11f9f 100644 --- a/app/controllers/file_validations_controller.rb +++ b/app/controllers/file_validations_controller.rb @@ -1,23 +1,36 @@ class FileValidationsController < InheritedResources::Base respond_to :html, :xml, :json + def index + no_referential + index! + end + def show + no_referential @toc = TestSheetPage.find("toc") show! end def new + no_referential @toc = TestSheetPage.find("toc") new! end def create + no_referential create! do |success, failure| success.html { redirect_to file_validations_path } end end + protected + def no_referential + Apartment::Database.switch("public") + end + def resource @file_validation ||= current_organisation.file_validations.find_by_id(params[:id]) end diff --git a/app/controllers/stop_areas_controller.rb b/app/controllers/stop_areas_controller.rb index dfd756d9b..d08ed1803 100644 --- a/app/controllers/stop_areas_controller.rb +++ b/app/controllers/stop_areas_controller.rb @@ -36,7 +36,8 @@ class StopAreasController < ChouetteController def access_links @stop_area = stop_area - @access_links = stop_area.access_link_matrix + @generic_access_links = stop_area.generic_access_link_matrix + @detail_access_links = stop_area.detail_access_link_matrix end def index |
