From 14192916f194f22c20b5d086d0649316875ee81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chai=CC=88b=20Martinez?= Date: Wed, 17 Jul 2019 17:39:45 +0200 Subject: [PATCH] Add edit dossier link [fix #4114] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Chaïb Martinez --- app/views/invites/_dropdown.html.haml | 2 +- .../users/dossiers/_dossier_actions.html.haml | 14 ++++++++++++++ app/views/users/dossiers/demande.html.haml | 2 +- app/views/users/dossiers/show/_header.html.haml | 5 +++-- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/app/views/invites/_dropdown.html.haml b/app/views/invites/_dropdown.html.haml index 368c359ef..869804b53 100644 --- a/app/views/invites/_dropdown.html.haml +++ b/app/views/invites/_dropdown.html.haml @@ -1,4 +1,4 @@ -%span.dropdown.invite-user-action +%span.dropdown.invite-user-action{ :style => "float:right;right: 10px;" } %button.button.dropdown-button %span.icon.person - if dossier.invites.count > 0 diff --git a/app/views/users/dossiers/_dossier_actions.html.haml b/app/views/users/dossiers/_dossier_actions.html.haml index cc9cc58ed..bad0197ba 100644 --- a/app/views/users/dossiers/_dossier_actions.html.haml +++ b/app/views/users/dossiers/_dossier_actions.html.haml @@ -9,6 +9,20 @@ Actions .dropdown-content.fade-in-down %ul.dropdown-items + - if !dossier.read_only? + - if dossier.brouillon? + %li + = link_to(url_for_dossier(dossier)) do + %span.icon.edit + .dropdown-description + Modifier le brouillon + - else + %li + = link_to modifier_dossier_path(dossier) do + %span.icon.edit + .dropdown-description + Modifier le dossier + - if has_new_dossier_action %li = link_to procedure_lien(dossier.procedure) do diff --git a/app/views/users/dossiers/demande.html.haml b/app/views/users/dossiers/demande.html.haml index b4050b41d..0d7ce1898 100644 --- a/app/views/users/dossiers/demande.html.haml +++ b/app/views/users/dossiers/demande.html.haml @@ -10,5 +10,5 @@ .container - if !@dossier.read_only? - = link_to "Modifier le dossier", modifier_dossier_path(@dossier), class: 'button primary edit-form' + = link_to "Modifier le dossier", modifier_dossier_path(@dossier), class: 'button accepted edit-form', 'title'=> "Vous pouvez modifier votre dossier tant qu'il n'est passé en instruction" .clearfix diff --git a/app/views/users/dossiers/show/_header.html.haml b/app/views/users/dossiers/show/_header.html.haml index e1d488610..8753abecb 100644 --- a/app/views/users/dossiers/show/_header.html.haml +++ b/app/views/users/dossiers/show/_header.html.haml @@ -11,8 +11,9 @@ = "- Déposé le #{l(dossier.en_construction_at, format: '%d %B %Y')}" - if current_user.owns?(dossier) - .header-actions - = render partial: 'invites/dropdown', locals: { dossier: dossier } + = link_to "Modifier mon dossier", modifier_dossier_path(dossier.id), class: 'button accepted edit-form', 'title'=> "Vous pouvez modifier votre dossier tant qu'il n'est passé en instruction" + = render partial: 'invites/dropdown', locals: { dossier: dossier } + .clearfix %ul.tabs = dynamic_tab_item('Résumé', dossier_path(dossier))