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'))
|
||||||
|
});
|
||||||
|
}
|
|
@ -28,3 +28,8 @@ h5 span {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#dossiers_list tr:hover{
|
||||||
|
background-color: #eeeeee;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
%table.table
|
%table#dossiers_list.table
|
||||||
%thead
|
%thead
|
||||||
- @dossiers_list_facade.preference_list_dossiers_filter.each do |preference|
|
- @dossiers_list_facade.preference_list_dossiers_filter.each do |preference|
|
||||||
%th{class: "col-md-#{preference.bootstrap_lg} col-lg-#{preference.bootstrap_lg}"}
|
%th{class: "col-md-#{preference.bootstrap_lg} col-lg-#{preference.bootstrap_lg}"}
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
- unless smart_listing.empty?
|
- unless smart_listing.empty?
|
||||||
- @dossiers.each do |dossier|
|
- @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|
|
- @dossiers_list_facade.preference_list_dossiers_filter.each_with_index do |preference, index|
|
||||||
%td
|
%td
|
||||||
- if preference.table.nil? || preference.table.empty?
|
- if preference.table.nil? || preference.table.empty?
|
||||||
|
@ -30,9 +30,6 @@
|
||||||
- rescue NoMethodError
|
- rescue NoMethodError
|
||||||
- value = ''
|
- value = ''
|
||||||
|
|
||||||
- if index == 0
|
|
||||||
= link_to value, backoffice_dossier_path(id: dossier.id)
|
|
||||||
- else
|
|
||||||
= value
|
= value
|
||||||
|
|
||||||
%td.center
|
%td.center
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- unless smart_listing.empty?
|
- unless smart_listing.empty?
|
||||||
%table.table
|
%table#dossiers_list.table
|
||||||
%thead
|
%thead
|
||||||
%th.col-md-1.col-lg-1= smart_listing.sortable 'Numéro', 'id'
|
%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'
|
%th.col-md-5.col-lg-5= smart_listing.sortable 'Procédure', 'procedure.libelle'
|
||||||
|
@ -13,14 +13,17 @@
|
||||||
-dossier = invite.dossier.decorate
|
-dossier = invite.dossier.decorate
|
||||||
- else
|
- else
|
||||||
- dossier = dossier.decorate
|
- 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
|
%td.center
|
||||||
= dossier.id
|
= dossier.id
|
||||||
%td
|
%td
|
||||||
= link_to(dossier.procedure.libelle, users_dossiers_invite_path(id: invite.id)) unless invite.nil?
|
= dossier.procedure.libelle
|
||||||
- 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?
|
|
||||||
|
|
||||||
%td{id: "dossier_#{dossier.id}_state"}= dossier.display_state
|
%td{id: "dossier_#{dossier.id}_state"}= dossier.display_state
|
||||||
%td= dossier.last_update
|
%td= dossier.last_update
|
||||||
|
|
Loading…
Reference in a new issue