Change UX on dossier list (user and backoffice) to go on recap dossier.
This commit is contained in:
parent
40a792bd13
commit
f2a5d582b8
4 changed files with 26 additions and 12 deletions
9
app/assets/javascripts/dossiers_list_link.js
Normal file
9
app/assets/javascripts/dossiers_list_link.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
$(document).on('page:load', link_init);
|
||||
$(document).ready(link_init);
|
||||
|
||||
|
||||
function link_init() {
|
||||
$('#dossiers_list tr').on('click', function () {
|
||||
$(location).attr('href', $(this).data('dossier_url'))
|
||||
});
|
||||
}
|
|
@ -27,4 +27,9 @@ h5 span {
|
|||
#validate_button {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
#dossiers_list tr:hover{
|
||||
background-color: #eeeeee;
|
||||
cursor: pointer;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
%table.table
|
||||
%table#dossiers_list.table
|
||||
%thead
|
||||
- @dossiers_list_facade.preference_list_dossiers_filter.each do |preference|
|
||||
%th{class: "col-md-#{preference.bootstrap_lg} col-lg-#{preference.bootstrap_lg}"}
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
- unless smart_listing.empty?
|
||||
- @dossiers.each do |dossier|
|
||||
%tr
|
||||
%tr{'data-dossier_url' => backoffice_dossier_url(id: dossier.id)}
|
||||
- @dossiers_list_facade.preference_list_dossiers_filter.each_with_index do |preference, index|
|
||||
%td
|
||||
- if preference.table.nil? || preference.table.empty?
|
||||
|
@ -30,10 +30,7 @@
|
|||
- rescue NoMethodError
|
||||
- value = ''
|
||||
|
||||
- if index == 0
|
||||
= link_to value, backoffice_dossier_path(id: dossier.id)
|
||||
- else
|
||||
= value
|
||||
= value
|
||||
|
||||
%td.center
|
||||
- if current_gestionnaire.follow?(dossier.id)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- unless smart_listing.empty?
|
||||
%table.table
|
||||
%table#dossiers_list.table
|
||||
%thead
|
||||
%th.col-md-1.col-lg-1= smart_listing.sortable 'Numéro', 'id'
|
||||
%th.col-md-5.col-lg-5= smart_listing.sortable 'Procédure', 'procedure.libelle'
|
||||
|
@ -13,14 +13,17 @@
|
|||
-dossier = invite.dossier.decorate
|
||||
- else
|
||||
- dossier = dossier.decorate
|
||||
%tr
|
||||
|
||||
- dossier_url = users_dossiers_invite_path(id: invite.id) unless invite.nil?
|
||||
- if invite.nil?
|
||||
- dossier_url = users_dossier_recapitulatif_path(dossier) unless dossier.brouillon?
|
||||
- dossier_url = users_dossier_description_path(dossier) if dossier.brouillon?
|
||||
|
||||
%tr{'data-dossier_url' => dossier_url}
|
||||
%td.center
|
||||
= dossier.id
|
||||
%td
|
||||
= link_to(dossier.procedure.libelle, users_dossiers_invite_path(id: invite.id)) unless invite.nil?
|
||||
- if invite.nil?
|
||||
= link_to(dossier.procedure.libelle, users_dossier_recapitulatif_path(dossier)) unless dossier.brouillon?
|
||||
= link_to(dossier.procedure.libelle, users_dossier_description_path(dossier)) if dossier.brouillon?
|
||||
= dossier.procedure.libelle
|
||||
|
||||
%td{id: "dossier_#{dossier.id}_state"}= dossier.display_state
|
||||
%td= dossier.last_update
|
||||
|
|
Loading…
Reference in a new issue