From cb5b6651d5ba92845748637b222f3509fba71c27 Mon Sep 17 00:00:00 2001 From: JC Date: Mon, 28 Nov 2016 15:22:00 +0100 Subject: [PATCH] Working on navbar --- app/assets/stylesheets/navbar.scss | 11 ++++++- ...ckoffice_dossierscontroller_show.html.haml | 33 +++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/navbar.scss b/app/assets/stylesheets/navbar.scss index 454ed1dd1..2b39d4e92 100644 --- a/app/assets/stylesheets/navbar.scss +++ b/app/assets/stylesheets/navbar.scss @@ -54,6 +54,14 @@ padding: 8px; border-right: 1px solid #C8C6C8; height: 60px; + .dropdown-toggle { + cursor: pointer; + } + .dropdown-pannel { + min-height: 100px; + width: 400px; + padding-left: 10px; + } } .log-options { color: #003189; @@ -136,9 +144,10 @@ color: #FFFFFF; cursor: pointer; display: block; - width: 140px; + width: 150px; text-align: center; padding: 2px; + float: right; .fa { font-size: 20px; margin-right: 10px; diff --git a/app/views/layouts/navbars/_navbar_backoffice_dossierscontroller_show.html.haml b/app/views/layouts/navbars/_navbar_backoffice_dossierscontroller_show.html.haml index 0a95bf5b2..8ae469a14 100644 --- a/app/views/layouts/navbars/_navbar_backoffice_dossierscontroller_show.html.haml +++ b/app/views/layouts/navbars/_navbar_backoffice_dossierscontroller_show.html.haml @@ -9,5 +9,34 @@ %i.fa.fa-user-times Ne plus suivre -else - %i.fa.fa-user-plus - = link_to("S'abonner", backoffice_dossier_follow_path(dossier_id: @facade.dossier.id), 'data-method' => :put, class: 'btn btn-md btn-primary', id: "suivre_dossier_#{@facade.dossier.id}") + = link_to backoffice_dossier_follow_path(dossier_id: @facade.dossier.id), 'data-method' => :put, class: 'button-navbar-action', id: "suivre_dossier_#{@facade.dossier.id}" do + %i.fa.fa-user-plus + Suivre le dossier + %div.row + %div.col-lg-12.col-md-12 + %div.dropdown-toggle{ 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false } + %i.fa.fa-user + Voir les personnes impliquées + %div.dropdown-menu.dropdown-menu-right.dropdown-pannel + %h4= t('dynamics.dossiers.followers.title') + %ul + - unless @facade.followers.empty? + - @facade.followers.each do |follower| + %li= follower.email + - else + Aucune personne ne suit ce dossier + %h3= t('dynamics.dossiers.invites.title') + + - if @facade.invites.size > 0 + %ul + - @facade.invites.each do |invite| + %li + = invite.email + - else + Aucune personne invitée + + .col-md-3.col-lg-3 + =form_tag invites_dossier_path(dossier_id: @facade.dossier.id), method: :post, class: 'form-inline' do + =text_field_tag :email, '', class: 'form-control', placeholder: 'Envoyer une invitation' + =submit_tag 'Ajouter', class: 'btn btn-success' +