From 02f913afdf07c8307a3b883833d5cbe1335baf8d Mon Sep 17 00:00:00 2001 From: JC Date: Tue, 6 Dec 2016 12:49:56 +0100 Subject: [PATCH] Now rework the action interface for dossiers in their show --- .../stylesheets/default_data_block.scss | 7 ++++++- app/views/backoffice/dossiers/show.html.haml | 3 +-- app/views/dossiers/_actions.html.haml | 20 ++++++++++++++++++ app/views/dossiers/_infos_dossier.html.haml | 21 ------------------- app/views/dossiers/etapes/_etape1.html.haml | 2 +- app/views/dossiers/etapes/_etape2.html.haml | 2 +- app/views/users/recapitulatif/show.html.haml | 3 +-- 7 files changed, 30 insertions(+), 28 deletions(-) create mode 100644 app/views/dossiers/_actions.html.haml diff --git a/app/assets/stylesheets/default_data_block.scss b/app/assets/stylesheets/default_data_block.scss index 218d7d5ca..5f4a72149 100644 --- a/app/assets/stylesheets/default_data_block.scss +++ b/app/assets/stylesheets/default_data_block.scss @@ -46,8 +46,13 @@ background-color: #E45B51; text-align: center; float: right; - color: white; + line-height: 20px; + font-size: 15px; text-decoration: none; + color: #FFFFFF; + } + .action:hover { + color: #F2F6FA; } .count { font-size: 16px; diff --git a/app/views/backoffice/dossiers/show.html.haml b/app/views/backoffice/dossiers/show.html.haml index 10c989722..8100ab6f0 100644 --- a/app/views/backoffice/dossiers/show.html.haml +++ b/app/views/backoffice/dossiers/show.html.haml @@ -66,7 +66,6 @@ %div.carret-right %div.carret-down CONSTRUCTION DU DOSSIER - %div.col-lg-2.col-md-2.action - EDITER + = render partial: '/dossiers/actions' %div.body = render partial: '/dossiers/infos_dossier' diff --git a/app/views/dossiers/_actions.html.haml b/app/views/dossiers/_actions.html.haml new file mode 100644 index 000000000..6b71eb587 --- /dev/null +++ b/app/views/dossiers/_actions.html.haml @@ -0,0 +1,20 @@ +%div.col-lg-2.col-md-2.action + - unless @facade.dossier.read_only? + - if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email)) + - if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.size > 0 + %a#maj_pj.btn.btn-success{"data-target" => "#UploadPJmodal", + "data-toggle" => "modal", + :type => "button", + style: 'margin-bottom: 15px; margin-top: -30px'} + Modifier les documents + %br + = render partial: 'users/recapitulatif/modal_upload_pj' + + - if @facade.procedure.individual_with_siret + %a#add_siret.btn.btn-success{href: users_dossier_add_siret_path(dossier_id: @facade.dossier.id)} + = "Renseigner un SIRET" + - if @facade.dossier.procedure.module_api_carto.use_api_carto + %a#maj_carte.btn.btn-primary{href: "/users/dossiers/#{@facade.dossier.id}/carte"} + = 'Modifier la carte' + %a#maj_infos.action{href: "/users/dossiers/#{@facade.dossier.id}/description"} + = 'Modifier le dossier' diff --git a/app/views/dossiers/_infos_dossier.html.haml b/app/views/dossiers/_infos_dossier.html.haml index 9a1574311..5710639bf 100644 --- a/app/views/dossiers/_infos_dossier.html.haml +++ b/app/views/dossiers/_infos_dossier.html.haml @@ -67,27 +67,6 @@ = "var dossier_id =#{@facade.dossier.id}" initCarto(); -.row{style: 'text-align:right'} - - unless @facade.dossier.read_only? - - if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email)) - - if @facade.procedure.cerfa_flag? || @facade.dossier.types_de_piece_justificative.size > 0 - %a#maj_pj.btn.btn-success{"data-target" => "#UploadPJmodal", - "data-toggle" => "modal", - :type => "button", - style: 'margin-bottom: 15px; margin-top: -30px'} - Modifier les documents - %br - = render partial: 'users/recapitulatif/modal_upload_pj' - - -if @facade.procedure.individual_with_siret - %a#add_siret.btn.btn-success{href: users_dossier_add_siret_path(dossier_id: @facade.dossier.id)} - = "Renseigner un SIRET" - -if @facade.dossier.procedure.module_api_carto.use_api_carto - %a#maj_carte.btn.btn-primary{href: "/users/dossiers/#{@facade.dossier.id}/carte"} - = 'Modifier la carte' - %a#maj_infos.btn.btn-info{href: "/users/dossiers/#{@facade.dossier.id}/description"} - = 'Modifier le dossier' - #modalCommentairesDossierParChamp.modal.fade{"tabindex" => -1, "role" => "dialog"} .modal-dialog{"role" => "document"} .modal-content diff --git a/app/views/dossiers/etapes/_etape1.html.haml b/app/views/dossiers/etapes/_etape1.html.haml index f9de0d764..f534c7596 100644 --- a/app/views/dossiers/etapes/_etape1.html.haml +++ b/app/views/dossiers/etapes/_etape1.html.haml @@ -22,4 +22,4 @@ - unless @facade.procedure.lien_site_web.blank? .center %a{href: "#{@facade.procedure.lien_site_web.html_safe}", target: '_blank'} - En savoir plus ... \ No newline at end of file + En savoir plus ... diff --git a/app/views/dossiers/etapes/_etape2.html.haml b/app/views/dossiers/etapes/_etape2.html.haml index 3f36a3c2a..fde33f55f 100644 --- a/app/views/dossiers/etapes/_etape2.html.haml +++ b/app/views/dossiers/etapes/_etape2.html.haml @@ -1,4 +1,4 @@ - if @facade.procedure.for_individual? = render partial: 'dossiers/etapes/etape_2/individual' - else - = render partial: 'dossiers/etapes/etape_2/entreprise' \ No newline at end of file + = render partial: 'dossiers/etapes/etape_2/entreprise' diff --git a/app/views/users/recapitulatif/show.html.haml b/app/views/users/recapitulatif/show.html.haml index 8c53bbb2c..4c41498d5 100644 --- a/app/views/users/recapitulatif/show.html.haml +++ b/app/views/users/recapitulatif/show.html.haml @@ -66,7 +66,6 @@ %div.carret-right %div.carret-down CONSTRUCTION DU DOSSIER - %div.col-lg-2.col-md-2.action - EDITER + = render partial: '/dossiers/actions' %div.body = render partial: '/dossiers/infos_dossier'