User and Gestionnaire sort list

This commit is contained in:
Xavier J 2016-01-08 11:39:04 +01:00
parent 0d2bd17a9e
commit 7a2b935c04
9 changed files with 68 additions and 40 deletions

View file

@ -1,17 +1,23 @@
%table.table
%thead
%th Procédure
%th Nom du Projet
%th Etat
%th Mise à jour
- @dossiers.each do |dossier|
%tr
%td
= dossier.procedure.libelle
%td
= link_to(dossier.nom_projet, users_dossier_recapitulatif_path(dossier))
%td{id: "dossier_#{dossier.id}_state"}= dossier.display_state
%td= dossier.last_update
- unless smart_listing.empty?
%table.table
%thead
%th.col-md-4.col-lg-4= smart_listing.sortable 'Procédure', 'procedure.libelle'
%th.col-md-4.col-lg-4= smart_listing.sortable 'Nom du Projet', 'nom_projet'
%th.col-md-2.col-lg-2= smart_listing.sortable 'État', 'state'
%th.col-md-2.col-lg-2= smart_listing.sortable 'Date de mise à jour', 'updated_at'
- @dossiers.each do |dossier|
- dossier = dossier.decorate
%tr
%td
= dossier.procedure.libelle
%td
= link_to(dossier.nom_projet, users_dossier_recapitulatif_path(dossier))
%td{id: "dossier_#{dossier.id}_state"}= dossier.display_state
%td= dossier.last_update
.pagination
= will_paginate @dossiers, renderer: BootstrapPagination::Rails
= smart_listing.paginate
= smart_listing.pagination_per_page_links
- else
%h4.center
Aucun dossier

View file

@ -3,21 +3,21 @@
#onglets
%ul.nav.nav-tabs
%li{ class: (@dossiers.active_class_a_traiter(@liste) unless @dossiers.nil?) }
%li{ class: @a_traiter_class }
%a{:href => "#{url_for users_dossiers_path(liste: 'a_traiter')}"}
%h5.text-danger
= "À traiter "
.badge.progress-bar-danger
= @dossiers_a_traiter_total
%li{ class: (@dossiers.active_class_en_attente(@liste) unless @dossiers.nil?) }
%li{ class: @en_attente_class }
%a{:href => "#{url_for users_dossiers_path(liste: 'en_attente')}"}
%h5.text-info
="En attente "
.badge.progress-bar-info
= @dossiers_en_attente_total
%li{ class: (@dossiers.active_class_termine(@liste) unless @dossiers.nil?) }
%li{ class: @termine_class }
%a{:href => "#{url_for users_dossiers_path(liste: 'termine')}"}
%h5.text-success
= "Terminé"

View file

@ -1,4 +1,4 @@
#users_index
= render partial: 'onglets'
= render partial: 'list'
= smart_listing_render :dossiers

View file

@ -0,0 +1 @@
<%= smart_listing_update :dossiers %>