aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlban Peignier2017-12-14 11:08:28 +0100
committerAlban Peignier2018-01-05 10:22:59 +0100
commit63c8ca8680c9d77032abde84c7a5d969545d675a (patch)
tree5ef74bc6ef6adcaf022d9431fd0e780abee80ab1
parent28d3edbe08b2e8ff55b1f586b0652086f3beb18c (diff)
downloadchouette-core-63c8ca8680c9d77032abde84c7a5d969545d675a.tar.bz2
Create WorkbenchOutputsController. Refs #5299
-rw-r--r--app/controllers/workbench_outputs_controller.rb8
-rw-r--r--app/views/workbench_outputs/show.html.slim5
-rw-r--r--config/breadcrumbs.rb5
-rw-r--r--config/routes.rb2
4 files changed, 20 insertions, 0 deletions
diff --git a/app/controllers/workbench_outputs_controller.rb b/app/controllers/workbench_outputs_controller.rb
new file mode 100644
index 000000000..b7f9f27cf
--- /dev/null
+++ b/app/controllers/workbench_outputs_controller.rb
@@ -0,0 +1,8 @@
+class WorkbenchOutputsController < ChouetteController
+ respond_to :html, only: [:show]
+ defaults resource_class: Workbench
+
+ def show
+ @workbench = current_organisation.workbenches.find params[:workbench_id]
+ end
+end
diff --git a/app/views/workbench_outputs/show.html.slim b/app/views/workbench_outputs/show.html.slim
new file mode 100644
index 000000000..ad42e476d
--- /dev/null
+++ b/app/views/workbench_outputs/show.html.slim
@@ -0,0 +1,5 @@
+- breadcrumb :workbench_output, @workbench
+- page_header_content_for @workbench
+
+.page_content
+ .container-fluid
diff --git a/config/breadcrumbs.rb b/config/breadcrumbs.rb
index 3f6503308..e255cc91b 100644
--- a/config/breadcrumbs.rb
+++ b/config/breadcrumbs.rb
@@ -6,6 +6,11 @@ crumb :workbench do |workbench|
link workbench.name, workbench_path(workbench)
end
+crumb :workbench_output do |workbench|
+ link I18n.t('workbench_outputs.show.title'), workbench_output_path(workbench)
+ parent :workbench, current_offer_workbench
+end
+
crumb :referential do |referential|
link breadcrumb_name(referential), referential_path(referential)
parent :workbench, current_offer_workbench
diff --git a/config/routes.rb b/config/routes.rb
index bf796a385..bab1a0aac 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -15,6 +15,8 @@ ChouetteIhm::Application.routes.draw do
get :executed, on: :member
resources :compliance_checks, only: [:show]
end
+
+ resource :output, controller: :workbench_outputs
end
devise_for :users, :controllers => {