From c74bf5dd8f5ec012a8541f8c1839f3b19474fe72 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Mon, 31 Jul 2017 15:01:26 +0200 Subject: [PATCH] Dossier index use .dossiers-table class --- .../new_design/procedures_show.scss | 69 +------------------ .../procedures/show.html.haml | 31 +++++---- 2 files changed, 19 insertions(+), 81 deletions(-) diff --git a/app/assets/stylesheets/new_design/procedures_show.scss b/app/assets/stylesheets/new_design/procedures_show.scss index 914f65fa1..c69942023 100644 --- a/app/assets/stylesheets/new_design/procedures_show.scss +++ b/app/assets/stylesheets/new_design/procedures_show.scss @@ -14,74 +14,7 @@ } .dossiers-table { - margin: (2 * $default-padding) auto; - width: 100%; - - tr { - border-bottom: 1px solid $border-grey; - - &:last-child { - border-bottom: none; - } - - &:hover { - background-color: $light-grey; - } - - &:first-child { - &:hover { - background: #FFFFFF; - } - } - } - - th { - font-weight: bold; - padding: (1.5 * $default-padding) 2px; - text-align: left; - } - - td { - vertical-align: middle; - } - - .number-col { - width: 130px; - - a::before { - content: ""; - background-image: image-url("icons/folder.svg"); - display: inline-block; - width: 24px; - height: 24px; - margin: 0 $default-spacer; - } - } - - .big-link { - color: $black; - display: flex; - align-items: center; - padding: (1.5 * $default-padding) 2px; - } - - .status-col { - width: 200px; - } - - .follow-col { - width: 200px; - } - - .label { - width: 110px; - text-align: center; - } - - .button { - width: 180px; - text-align: center; - } + margin: (3 * $default-spacer) auto; } h2 { diff --git a/app/views/new_gestionnaire/procedures/show.html.haml b/app/views/new_gestionnaire/procedures/show.html.haml index 3f70ac732..497fcfdd9 100644 --- a/app/views/new_gestionnaire/procedures/show.html.haml +++ b/app/views/new_gestionnaire/procedures/show.html.haml @@ -34,19 +34,24 @@ .container - if @dossiers.present? - %table.dossiers-table - %tr - %th.number-col Nº dossier - %th Demandeur - %th.status-col Statut - %th.follow-col - - @dossiers.each do |dossier| + %table.table.dossiers-table.hoverable + %thead %tr - %td.number-col= link_to(dossier.id, dossier_path(@procedure, dossier), class: 'big-link') - %td= link_to(dossier.user.email, dossier_path(@procedure, dossier), class: 'big-link') - %td.status-col - = link_to(dossier_path(@procedure, dossier), class: 'big-link') do - = render partial: 'status', locals: { dossier: dossier } - %td.follow-col= render partial: 'dossier_actions', locals: { procedure: @procedure, dossier: dossier, dossier_is_followed: @followed_dossiers_id.include?(dossier.id) } + %th.number-col Nº dossier + %th Demandeur + %th.status-col Statut + %th.follow-col + %tbody + - @dossiers.each do |dossier| + %tr + %td.number-col + = link_to(dossier_path(@procedure, dossier), class: 'cell-link') do + %i.folder + = dossier.id + %td= link_to(dossier.user.email, dossier_path(@procedure, dossier), class: 'cell-link') + %td.status-col + = link_to(dossier_path(@procedure, dossier), class: 'cell-link') do + = render partial: 'status', locals: { dossier: dossier } + %td.follow-col= render partial: 'dossier_actions', locals: { procedure: @procedure, dossier: dossier, dossier_is_followed: @followed_dossiers_id.include?(dossier.id) } - else %h2 Aucun dossier