Merge branch 'dev'
This commit is contained in:
commit
85de08262b
19 changed files with 97 additions and 85 deletions
1
Gemfile
1
Gemfile
|
@ -90,7 +90,6 @@ gem 'browser'
|
|||
|
||||
gem 'simple_form'
|
||||
|
||||
gem 'newrelic_rpm'
|
||||
gem 'skylight'
|
||||
|
||||
gem 'scenic'
|
||||
|
|
|
@ -399,7 +399,6 @@ GEM
|
|||
mustermann (1.0.1)
|
||||
nenv (0.3.0)
|
||||
netrc (0.11.0)
|
||||
newrelic_rpm (3.18.1.330)
|
||||
nio4r (1.2.1)
|
||||
nokogiri (1.6.8.1)
|
||||
mini_portile2 (~> 2.1.0)
|
||||
|
@ -718,7 +717,6 @@ DEPENDENCIES
|
|||
mailjet
|
||||
maruku
|
||||
mina!
|
||||
newrelic_rpm
|
||||
openid_connect
|
||||
openstack
|
||||
pg
|
||||
|
@ -760,4 +758,4 @@ DEPENDENCIES
|
|||
xray-rails
|
||||
|
||||
BUNDLED WITH
|
||||
1.14.6
|
||||
1.16.0
|
||||
|
|
|
@ -7,3 +7,16 @@
|
|||
padding-top: $value;
|
||||
padding-bottom: $value;
|
||||
}
|
||||
|
||||
// due to issues that won't be fixed in ie11 regarding images and flex
|
||||
// https://connect.microsoft.com/IE/Feedback/Details/1218984
|
||||
// we are obliged to use a background-image
|
||||
@mixin ie-compatible-background-image($image-url: false) {
|
||||
display: block;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
@if $image-url {
|
||||
background-image: image-url($image-url);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,12 +55,18 @@ footer {
|
|||
}
|
||||
|
||||
.footer-logo-rf {
|
||||
@include ie-compatible-background-image("footer/logo-rf.svg");
|
||||
|
||||
width: 75px;
|
||||
height: 44px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.footer-logo-beta-gouv-fr {
|
||||
@include ie-compatible-background-image("footer/logo-beta-gouv-fr.svg");
|
||||
|
||||
width: 190px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.footer-link a {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
.personnes-impliquees {
|
||||
padding-bottom: 50px;
|
||||
|
||||
ul {
|
||||
list-style-type: disc;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
|
@ -1,17 +1,14 @@
|
|||
@import "colors";
|
||||
@import "constants";
|
||||
@import "mixins";
|
||||
|
||||
.procedure-logo {
|
||||
display: flex;
|
||||
background: #FFFFFF;
|
||||
@include ie-compatible-background-image();
|
||||
|
||||
background-color: #FFFFFF;
|
||||
background-position: 95% 50%;
|
||||
border: 1px solid $border-grey;
|
||||
height: 84px;
|
||||
width: 84px;
|
||||
margin-right: 2 * $default-spacer;
|
||||
|
||||
img {
|
||||
margin: auto;
|
||||
max-width: 80%;
|
||||
max-height: 80%;
|
||||
}
|
||||
margin-right: $default-padding;
|
||||
}
|
||||
|
|
|
@ -26,13 +26,11 @@
|
|||
}
|
||||
|
||||
.procedure-logo {
|
||||
@include ie-compatible-background-image();
|
||||
|
||||
height: 93px;
|
||||
width: 93px;
|
||||
margin-right: 3 * $default-spacer;
|
||||
flex-shrink: 0;
|
||||
background-image: url("your/url/here");
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 95% 50%;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
@import "constants";
|
||||
|
||||
#procedure-show {
|
||||
.procedure-logo {
|
||||
margin-right: $default-padding;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: $black;
|
||||
font-size: 22px;
|
||||
|
|
|
@ -28,6 +28,12 @@ module NewGestionnaire
|
|||
current_gestionnaire.mark_tab_as_seen(dossier, :avis)
|
||||
end
|
||||
|
||||
def personnes_impliquees
|
||||
@following_accompagnateurs_emails = dossier.followers_gestionnaires.pluck(:email)
|
||||
@avis_emails = dossier.avis.includes(:gestionnaire).map(&:email_to_display)
|
||||
@invites_emails = dossier.invites.map(&:email)
|
||||
end
|
||||
|
||||
def follow
|
||||
current_gestionnaire.follow(dossier)
|
||||
dossier.next_step!('gestionnaire', 'follow')
|
||||
|
|
|
@ -4,18 +4,18 @@
|
|||
%li.footer-column
|
||||
%ul.footer-logos
|
||||
%li
|
||||
= link_to image_tag("footer/logo-rf.svg",
|
||||
:class => "footer-logo footer-logo-rf"),
|
||||
"http://www.gouvernement.fr/"
|
||||
= link_to "http://www.gouvernement.fr/" do
|
||||
%span.footer-logo.footer-logo-rf{ role: 'img', 'aria-label': 'Logo du gouvernement' }
|
||||
|
||||
%li
|
||||
= link_to image_tag("footer/logo-beta-gouv-fr.svg",
|
||||
:class => "footer-logo footer-logo-beta-gouv-fr"),
|
||||
"https://beta.gouv.fr/"
|
||||
= link_to "https://beta.gouv.fr/" do
|
||||
%span.footer-logo.footer-logo-beta-gouv-fr{ role: 'img', 'aria-label': 'Logo de beta.gouv.fr' }
|
||||
|
||||
|
||||
%li.footer-column
|
||||
%ul.footer-links
|
||||
%li.footer-link
|
||||
= link_to "SGMAP", "http://www.modernisation.gouv.fr/le-sgmap", :class => "footer-link"
|
||||
%a{ href: '#', 'data-token' => '11c89e7ddb46fbcdcb7f8fe5fdfca818', onclick: 'mjOpenPopin(event, this)' } Newsletter
|
||||
%li.footer-link
|
||||
= link_to "Nouveautés", "https://github.com/sgmap/tps/releases", :class => "footer-link"
|
||||
%li.footer-link
|
||||
|
@ -23,8 +23,6 @@
|
|||
|
||||
%li.footer-column
|
||||
%ul.footer-links
|
||||
%li.footer-link
|
||||
%a{ href: '#', 'data-token' => '11c89e7ddb46fbcdcb7f8fe5fdfca818', onclick: 'mjOpenPopin(event, this)' } Newsletter
|
||||
%li.footer-link
|
||||
= link_to "Contact",
|
||||
"mailto:#{t('dynamics.contact_email')}",
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
- if notifications_summary[:messagerie]
|
||||
%span.notifications{ 'aria-label': 'notifications' }
|
||||
= link_to "Messagerie", messagerie_dossier_path(dossier.procedure, dossier)
|
||||
%li{ class: current_page?(personnes_impliquees_dossier_path(dossier.procedure, dossier)) ? 'active' : nil }
|
||||
= link_to "Personnes impliquées", personnes_impliquees_dossier_path(dossier.procedure, dossier)
|
||||
|
||||
.container
|
||||
.print-header
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
.accompagnateur-title= title
|
||||
|
||||
- if emails_collection.present?
|
||||
%ul
|
||||
- emails_collection.each do |email|
|
||||
%li
|
||||
= email
|
||||
- else
|
||||
= blank
|
|
@ -0,0 +1,10 @@
|
|||
- content_for(:title, "Personnes impliquées · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
|
||||
|
||||
= render partial: "header", locals: { dossier: @dossier }
|
||||
|
||||
.personnes-impliquees.container
|
||||
= render partial: 'new_gestionnaire/dossiers/personnes_impliquees_block', locals: { emails_collection: @following_accompagnateurs_emails, title: "Accompagnateurs qui suivent le dossier", blank: "Aucun accompagnateur ne suit ce dossier" }
|
||||
|
||||
= render partial: 'new_gestionnaire/dossiers/personnes_impliquees_block', locals: { emails_collection: @avis_emails, title: "Personnes à qui un avis a été demandé", blank: "Aucun avis n'a été demandé" }
|
||||
|
||||
= render partial: 'new_gestionnaire/dossiers/personnes_impliquees_block', locals: { emails_collection: @invites_emails, title: "Personnes invitées à consulter ce dossier", blank: "Aucune personne n'a été invitée à consulter ce dossier" }
|
|
@ -12,7 +12,7 @@
|
|||
= render partial: "identite_individual", locals: { individual: @dossier.individual }
|
||||
|
||||
.accompagnateur-title Formulaire
|
||||
- champs = @dossier.ordered_champs.decorate
|
||||
- champs = @dossier.ordered_champs.includes(:type_de_champ).decorate
|
||||
- if champs.any?
|
||||
.card
|
||||
= render partial: "champs", locals: { champs: champs }
|
||||
|
|
|
@ -4,9 +4,8 @@
|
|||
.accompagnateur-header
|
||||
.container.flex
|
||||
|
||||
.procedure-logo
|
||||
- if @procedure.logo.present?
|
||||
= image_tag @procedure.logo, alt: "Logo de la procédure"
|
||||
.procedure-logo{ style: @procedure.logo.present? ? "background-image: url(#{@procedure.logo.url})" : nil,
|
||||
role: 'img', 'aria-label': "logo de la procédure #{@procedure.libelle}" }
|
||||
|
||||
.procedure-header
|
||||
%h1= @procedure.libelle
|
||||
|
|
|
@ -54,7 +54,6 @@ set :shared_paths, [
|
|||
'public/system',
|
||||
'public/uploads',
|
||||
'config/database.yml',
|
||||
"config/newrelic.yml",
|
||||
"config/skylight.yml",
|
||||
"config/fog_credentials.yml",
|
||||
'config/initializers/secret_token.rb',
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
#
|
||||
# This file configures the New Relic Agent. New Relic monitors Ruby, Java,
|
||||
# .NET, PHP, Python and Node applications with deep visibility and low
|
||||
# overhead. For more information, visit www.newrelic.com.
|
||||
#
|
||||
# Generated March 02, 2017
|
||||
#
|
||||
# This configuration file is custom generated for SGMAP
|
||||
#
|
||||
# For full documentation of agent configuration options, please refer to
|
||||
# https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration
|
||||
|
||||
common: &default_settings
|
||||
# Required license key associated with your New Relic account.
|
||||
license_key: <%= ENV['NEWRELIC_LICENSE_KEY'] %>
|
||||
|
||||
# Your application name. Renaming here affects where data displays in New
|
||||
# Relic. For more details, see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications
|
||||
app_name: Téléprocédures Simplifiées
|
||||
|
||||
# To disable the agent regardless of other settings, uncomment the following:
|
||||
# agent_enabled: false
|
||||
|
||||
# Logging level for log/newrelic_agent.log
|
||||
log_level: info
|
||||
|
||||
|
||||
# Environment-specific settings are in this section.
|
||||
# RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
|
||||
# If your application has other named environments, configure them here.
|
||||
development:
|
||||
<<: *default_settings
|
||||
app_name: Téléprocédures Simplifiées (Development)
|
||||
|
||||
# NOTE: There is substantial overhead when running in developer mode.
|
||||
# Do not use for production or load testing.
|
||||
developer_mode: true
|
||||
|
||||
test:
|
||||
<<: *default_settings
|
||||
# It doesn't make sense to report to New Relic from automated test runs.
|
||||
monitor_mode: false
|
||||
|
||||
staging:
|
||||
<<: *default_settings
|
||||
app_name: Téléprocédures Simplifiées (Staging)
|
||||
|
||||
production:
|
||||
<<: *default_settings
|
|
@ -248,6 +248,7 @@ Rails.application.routes.draw do
|
|||
get 'messagerie'
|
||||
get 'annotations-privees' => 'dossiers#annotations_privees'
|
||||
get 'avis'
|
||||
get 'personnes-impliquees' => 'dossiers#personnes_impliquees'
|
||||
patch 'follow'
|
||||
patch 'unfollow'
|
||||
patch 'archive'
|
||||
|
|
|
@ -112,6 +112,29 @@ feature 'The gestionnaire part' do
|
|||
expect(page).to have_text('a great answer')
|
||||
end
|
||||
|
||||
scenario 'A gestionnaire can see the personnes impliquées' do
|
||||
gestionnaire2 = FactoryGirl.create(:gestionnaire, password: password)
|
||||
|
||||
log_in(gestionnaire.email, password)
|
||||
|
||||
click_on 'nouvelle interface'
|
||||
click_on procedure.libelle
|
||||
click_on dossier.user.email
|
||||
|
||||
click_on 'Avis externes'
|
||||
expect(page).to have_current_path(avis_dossier_path(procedure, dossier))
|
||||
|
||||
expert_email = 'expert@tps.com'
|
||||
ask_confidential_avis(expert_email, 'a good introduction')
|
||||
|
||||
expert_email = gestionnaire2.email
|
||||
ask_confidential_avis(expert_email, 'a good introduction')
|
||||
|
||||
click_on 'Personnes impliquées'
|
||||
expect(page).to have_text(expert_email)
|
||||
expect(page).to have_text(gestionnaire2.email)
|
||||
end
|
||||
|
||||
def log_in(email, password)
|
||||
visit '/'
|
||||
click_on 'Connexion'
|
||||
|
|
Loading…
Reference in a new issue