- add decorator for procedure and procedures
- add link to procedure on admin procedures list
This commit is contained in:
parent
515713b3fa
commit
49217a1b39
10 changed files with 38 additions and 41 deletions
14
app/views/admin/procedures/_list.html.haml
Normal file
14
app/views/admin/procedures/_list.html.haml
Normal 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
|
|
@ -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"
|
||||
|
|
|
@ -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'
|
|
@ -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'
|
|
@ -30,4 +30,4 @@
|
|||
= render partial: 'informations', locals: {f: f}
|
||||
= f.submit 'Editer', class: 'btn btn-success', style: 'float:right'
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue