- add decorator for procedure and procedures

- add link to procedure on admin procedures list
This commit is contained in:
Xavier J 2015-12-03 15:38:17 +01:00
parent 515713b3fa
commit 49217a1b39
10 changed files with 38 additions and 41 deletions

View file

@ -0,0 +1,14 @@
%table.table
%thead
%th#id ID
%th#libelle Libellé
%th#lien Lien
- @procedures.each do |procedure|
%tr
%td.col-md-1.col-lg-1= procedure.id
%td.col-md-6.col-lg-6
= link_to(procedure.libelle, "/admin/procedures/#{procedure.id}")
%td= link_to procedure.lien, procedure.lien
.pagination
= will_paginate @procedures, renderer: BootstrapPagination::Rails

View file

@ -1,11 +1,11 @@
#onglets
%ul.nav.nav-tabs
%li{class: "#{'active' unless @procedures.nil? }"}
%li{class: "#{'active' if @page == 'active' }"}
%a{:href => "#{url_for :admin_procedures}"}
%h5.text-success
= "Actives"
%li{class: "#{'active' unless @procedures_archived.nil? }"}
%li{class: "#{'active' if @page == 'archived' }"}
%a{:href => "#{url_for :admin_procedures_archived}"}
%h5{style: 'color: black'}
="Archivées"

View file

@ -4,19 +4,4 @@
= render partial: 'onglets'
%table.table
%thead
%th#id ID
%th#libelle Libellé
%th#organisation Organisation
%th#direction Direction
- @procedures_archived.each do |procedure|
%tr
%td= procedure.id
%td
= link_to(procedure.libelle, "/admin/procedures/#{procedure.id}")
%td= procedure.organisation
%td= procedure.direction
.pagination
= will_paginate @procedures_archived, renderer: BootstrapPagination::Rails
= render partial: 'list'

View file

@ -4,19 +4,4 @@
= render partial: 'onglets'
%table.table
%thead
%th#id ID
%th#libelle Libellé
%th#organisation Organisation
%th#direction Direction
- @procedures.each do |procedure|
%tr
%td= procedure.id
%td
= link_to(procedure.libelle, "/admin/procedures/#{procedure.id}")
%td= procedure.organisation
%td= procedure.direction
.pagination
= will_paginate @procedures, renderer: BootstrapPagination::Rails
= render partial: 'list'

View file

@ -30,4 +30,4 @@
= render partial: 'informations', locals: {f: f}
= f.submit 'Editer', class: 'btn btn-success', style: 'float:right'
%br
%br
%br