From f449be5c4ef6c88da9ea74bfbca89fc7e1e7114c Mon Sep 17 00:00:00 2001 From: Xavier J Date: Mon, 30 Nov 2015 10:59:56 +0100 Subject: [PATCH] Add column Organisation on Demo page --- app/controllers/demo_controller.rb | 2 +- app/views/demo/index.html.haml | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/controllers/demo_controller.rb b/app/controllers/demo_controller.rb index 6c48fd52f..7b27fa43d 100644 --- a/app/controllers/demo_controller.rb +++ b/app/controllers/demo_controller.rb @@ -1,7 +1,7 @@ class DemoController < ApplicationController def index - + @procedures = Procedure.all.where(archived: false).order('libelle ASC') end end diff --git a/app/views/demo/index.html.haml b/app/views/demo/index.html.haml index 82b027fd3..737b4466a 100644 --- a/app/views/demo/index.html.haml +++ b/app/views/demo/index.html.haml @@ -1,15 +1,20 @@ %table.table %tr - %th{colspan: 3} + %th{colspan: 4} %h4 Lien vers les procédures TPS %tr - %td + %th ID %th Titre %th Description - - Procedure.all.where(archived: false).each do |procedure| + %th Organisation + + - @procedures.each do |procedure| %tr - %td.col-md-1.col-lg-1 + %td + = procedure.id %td.col-md-4.col-lg-4 = link_to procedure.libelle, "/users/procedure/#{procedure.id}" %td - = procedure.description \ No newline at end of file + = procedure.description + %td.col-md-3.col-lg-3 + = procedure.organisation \ No newline at end of file