Merge branch 'develop' into staging

This commit is contained in:
Xavier J 2017-01-02 18:36:42 +01:00
commit 670fa3680a
37 changed files with 259 additions and 202 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -1,5 +1,5 @@
.header_section{ .header_section{
background-color: rgb(245,245,245); background-color: rgb(0, 49, 137);
margin-top: 20px; margin-top: 20px;
margin-bottom: 10px; margin-bottom: 10px;
margin-left: 0; margin-left: 0;
@ -7,6 +7,12 @@
text-align:center; text-align:center;
padding-bottom: 8px; padding-bottom: 8px;
color: white;
.form-control.libelle {
font-weight: bold;
}
.form-group.description { .form-group.description {
display: none; display: none;
} }

View file

@ -56,6 +56,9 @@ h5 span {
padding: 15px 40px 15px 20px; padding: 15px 40px 15px 20px;
cursor: pointer; cursor: pointer;
line-height: 1.8em; line-height: 1.8em;
.progress-bar-warning {
background-color: #E4594F;
}
} }
.procedure_list_element:hover, .notification:hover { .procedure_list_element:hover, .notification:hover {
background-color: #668ABD; background-color: #668ABD;

View file

@ -1,16 +1,26 @@
#landing { #landing {
background-image: image-url('landing_background.png'); background-image: image-url('landing_background.png');
background-attachment: fixed; background-attachment: fixed;
background-size: 130% auto;
background-position: top center; background-position: top center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-color: rgba(11,107,168,0.2); h5{
color: grey;
}
.logos {
width: 150px;
}
#logo-tps {
width: 200px;
}
#title { #title {
h1 { padding-bottom: 2%;
font-size: 65px; padding-top: 1%;
}
h2 { h2 {
font-size: 35px; font-size: 35px;
} }
@ -18,104 +28,31 @@
.btn { .btn {
text-shadow: none; text-shadow: none;
} }
color: white; color: white;
padding-top: 3%;
padding-bottom: 4%;
text-shadow: 0px 0px 10px rgb(0, 0, 0); text-shadow: 0px 0px 10px rgb(0, 0, 0);
} }
.logo img {
width: 70px;
}
} }
#suite { .background-tps{
.row{ background-color: #668AEA;
width: 100%; color: white;
margin-left: 0; }
margin-right: 0;
}
.word {
border-bottom: solid darkgrey 1px;
img { #landing_body{
padding-top: 50px; .split-hr-left {
padding-bottom: 50px; margin-left: auto;
width: 200px; margin-right: auto;
margin-left: 25%;
} margin-top: 40px;
margin-bottom: 20px;
border-color: grey;
width: 40%;
} }
.simplifier { #etapes, #request_access{
ul { margin-top: 20px;
margin-top: 13%; margin-bottom: 20px;
}
}
.securiser {
img {
width: 300px;
}
ul {
margin-top: 11%;
}
}
.echanger {
ul {
margin-top: 4%;
}
}
.profiter {
//border-bottom: none;
ul {
margin-top: 10%;
}
}
.news {
padding-top: 25px;
padding-bottom: 25px;
.latest_release {
.body {
margin-left: 3%;
}
}
}
.demo_account {
img {
margin-left: 0;
padding-top: 10px;
padding-bottom: 0;
}
padding-top: 25px;
padding-bottom: 25px;
.btn {
margin-top: 10%;
}
}
.documentation {
border-bottom: none;
padding-top: 15px;
padding-bottom: 15px;
a {
margin-top: 16%;
}
ul{
margin-top: 14%;
}
img {
margin-left: 0;
width: 22%;
}
} }
} }

View file

@ -14,26 +14,55 @@
font-family: Arial; font-family: Arial;
font-size: 16px; font-size: 16px;
line-height: 18px; line-height: 18px;
margin-top: 20px;
.infos { .infos {
font-size: 25px; font-size: 25px;
text-align: center; text-align: center;
margin: 20px 10px 30px 0; margin: 10px 10px 30px 0;
.projet-name { .projet-name {
font-size: 25px; font-size: 25px;
line-height: normal; line-height: normal;
padding: 5px; padding: 5px;
} }
} }
.count {
display: inline-block;
padding: 3px;
border-radius: 25px;
min-width: 40px;
text-align: center;
line-height: 23px;
}
.text {
display: inline-block;
width: 30px;
margin: 0 0 0 8px;
}
.dossiers-en-cours, .en-cours { .dossiers-en-cours, .en-cours {
margin-top: 20px; margin-top: 20px;
} }
.dossiers-en-cours, .nouveaux-dossiers, .en-cours { .dossiers-en-cours {
line-height: initial; .count {
text-align: center; border: 1px solid #FFFFFF;
margin-right: 10px; }
}
.nouveaux-dossiers {
.count {
background-color: #5CB85C;
}
}
.nouvelles-notifications {
.count {
background-color: #E4594F;
}
}
.dossiers-en-cours, .nouveaux-dossiers, .nouvelles-notifications, .en-cours {
margin: 5px auto 0 20px;
width: 150px;
} }
} }
#action-block { #action-block {
text-align: center;
margin: 10px; margin: 10px;
.action { .action {
background-color: #E45B51; background-color: #E45B51;
@ -140,13 +169,26 @@
margin: 0 30px 0 30px; margin: 0 30px 0 30px;
} }
.notification { .notification {
padding: 10px 10px 10px 20px; padding: 10px 2px 10px 15px;
.dossier, .updated-at { .dossier, .updated-at {
display: inline-block; display: inline-block;
color: #CCCCCC; color: #CCCCCC;
font-size: 12px; font-size: 12px;
text-align: left; text-align: left;
} }
.dossier-index, .updated-at-index, .count {
display: inline-block;
color: #FFFFFF;
font-size: 14px;
text-align: left;
}
.count {
background-color: #F0AD4E;
border-radius: 25px;
padding: 0 5px 0 5px;
width: 25px;
text-align: center;
}
.type-notif { .type-notif {
font-size: 16px; font-size: 16px;
} }

View file

@ -3,6 +3,6 @@ class NotificationDecorator < Draper::Decorator
def index_display def index_display
['champs', 'piece_justificative'].include?(type_notif) ? type = liste.join(" ") : type = liste.last ['champs', 'piece_justificative'].include?(type_notif) ? type = liste.join(" ") : type = liste.last
{ dossier: "Dossier n°#{dossier.id}", date: updated_at.strftime('%d/%m %H:%M'), type: type } { dossier: "Dossier n°#{dossier.id}", date: created_at.strftime('%d/%m %H:%M'), type: type }
end end
end end

View file

@ -31,13 +31,17 @@ class DossiersListFacades
end end
def gestionnaire_procedures_name_and_id_list def gestionnaire_procedures_name_and_id_list
@current_devise_profil.procedures.order('libelle ASC').inject([]) { |acc, procedure| acc.push({id: procedure.id, libelle: procedure.libelle, unread_notifications: @current_devise_profil.notifications_for(procedure)}) } @current_devise_profil.procedures.order('libelle ASC').inject([]) { |acc, procedure| acc.push({id: procedure.id, libelle: procedure.libelle, unread_notifications: @current_devise_profil.dossier_with_notification_for(procedure)}) }
end end
def unread_notifications def unread_notifications
current_devise_profil.notifications current_devise_profil.notifications
end end
def dossiers_with_unread_notifications
(unread_notifications.inject([]) { |acc, notif| acc.push(notif.dossier) }).uniq
end
def procedure_id def procedure_id
@procedure.nil? ? nil : @procedure.id @procedure.nil? ? nil : @procedure.id
end end

View file

@ -1,6 +1,6 @@
class NotificationMailer < ApplicationMailer class NotificationMailer < ApplicationMailer
def new_answer dossier def new_answer dossier
send_mail dossier, "Nouveau commentaire pour votre dossier TPS N°#{dossier.id}" send_mail dossier, "Nouveau message pour votre dossier TPS N°#{dossier.id}"
end end
def dossier_received dossier def dossier_received dossier

View file

@ -59,6 +59,14 @@ class Dossier < ActiveRecord::Base
TERMINE = %w(closed refused without_continuation) TERMINE = %w(closed refused without_continuation)
ALL_STATE = %w(initiated updated replied validated submitted received closed refused without_continuation) ALL_STATE = %w(initiated updated replied validated submitted received closed refused without_continuation)
def unreaded_notifications
@unreaded_notif ||= notifications.where(already_read: false)
end
def first_unread_notification
unreaded_notifications.order("created_at ASC").first
end
def retrieve_last_piece_justificative_by_type(type) def retrieve_last_piece_justificative_by_type(type)
pieces_justificatives.where(type_de_piece_justificative_id: type).last pieces_justificatives.where(type_de_piece_justificative_id: type).last
end end

View file

@ -79,6 +79,18 @@ class Gestionnaire < ActiveRecord::Base
0 0
end end
def dossier_with_notification_for procedure
procedure_ids = dossiers_follow.pluck(:procedure_id)
if procedure_ids.include?(procedure.id)
return dossiers_follow.where(procedure_id: procedure.id)
.inject(0) do |acc, dossier|
acc += ((dossier.notifications.where(already_read: false).count) > 0 ? 1 : 0)
end
end
0
end
private private
def valid_couple_table_attr? table, column def valid_couple_table_attr? table, column

View file

@ -4,7 +4,11 @@
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title %div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
.carret-right .carret-right
.carret-down .carret-down
MESSAGES MESSAGERIE avec votre
- if user_signed_in?
Administration
- elsif gestionnaire_signed_in?
Usager
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count %div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count
- message_count = @facade.commentaires.count - message_count = @facade.commentaires.count
= (message_count == 1) ? "1 message" : "#{message_count} messages" = (message_count == 1) ? "1 message" : "#{message_count} messages"

View file

@ -95,8 +95,9 @@
%a{ href: "#{@pj.content_url}", target: '_blank' } Consulter %a{ href: "#{@pj.content_url}", target: '_blank' } Consulter
%span{style:'margin-left:12px'} %span{style:'margin-left:12px'}
\- \-
= link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#PJmodal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => 'cerfa' do - if @facade.dossier.pieces_justificatives.where(type_de_piece_justificative_id: type_de_piece_justificative.id).count > 1
%span.fa.fa-clock-o = link_to "", class: "historique", "data-toggle" => "modal", "data-target" => "#PJmodal", :type => "button", "data-modal_title" => 'formulaires', "data-modal_index" => "type_de_pj_#{type_de_piece_justificative.id}" do
%span.fa.fa-clock-o
- else - else
= 'Pièce non fournie' = 'Pièce non fournie'

View file

@ -13,9 +13,7 @@
%body %body
= render partial: 'layouts/support_navigator_banner' = render partial: 'layouts/support_navigator_banner'
#beta{class:(Rails.env == 'production' ? '' : 'beta_staging')} #beta{class:(Rails.env == 'production' ? '' : 'beta_staging')}
- if Rails.env == 'production' - if Rails.env != 'production'
Beta
- else
Env Test Env Test
- if Rails.env == 'test' - if Rails.env == 'test'

View file

@ -1,10 +1,13 @@
%div#first-block %div#first-block
%div.dossiers-en-cours %div.dossiers-en-cours
= @facade_data_view.total_dossier .count= @facade_data_view.total_dossier
DOSSIERS EN COURS .text= "SUIVIS"
%div.nouveaux-dossiers %div.nouveaux-dossiers
= @facade_data_view.total_new_dossier .count= @facade_data_view.total_new_dossier
NOUVEAUX DOSSIERS .text= "NOUVEAUX"
%div.nouvelles-notifications
.count= @facade_data_view.dossiers_with_unread_notifications.count
.text= "MODIFIÉS"
%div#action-block %div#action-block
@ -29,13 +32,12 @@
.badge.progress-bar-warning{title: 'Notifications'} .badge.progress-bar-warning{title: 'Notifications'}
= procedure[:unread_notifications] = procedure[:unread_notifications]
#notifications_list.hidden #notifications_list.hidden
- if @facade_data_view.unread_notifications.empty? - if @facade_data_view.dossiers_with_unread_notifications.empty?
.no-notification= "Aucune notification pour le moment." .no-notification= "Aucune notification pour le moment."
- else - else
- @facade_data_view.unread_notifications.each do |notification| - @facade_data_view.dossiers_with_unread_notifications.each do |dossier|
= link_to backoffice_dossier_path(notification.dossier.id) do = link_to backoffice_dossier_path(dossier.id) do
.notification .notification
.dossier= notification.decorate.index_display[:dossier] .dossier-index= "Dossier n°#{dossier.id}"
.updated-at= notification.decorate.index_display[:date] .updated-at-index= dossier.first_unread_notification.created_at.strftime('%d/%m %H:%M')
= render partial: "layouts/left_panels/type_notif_fa", locals: {notification: notification} .count= dossier.unreaded_notifications.count
.type= notification.decorate.index_display[:type]

View file

@ -1,7 +1,7 @@
- case notification.type_notif - case notification.type_notif
- when "commentaire" - when "commentaire"
.type-notif.fa.fa-comments-o .type-notif.fa.fa-comments-o
- when "submited" - when "submitted"
.type-notif.fa.fa-thumbs-o-up .type-notif.fa.fa-thumbs-o-up
- when "champs" - when "champs"
.type-notif.fa.fa-list-alt .type-notif.fa.fa-list-alt

View file

@ -6,5 +6,9 @@ A tout moment, vous pouvez consulter le contenu de vos dossiers et les éventuel
Bonne journée Bonne journée
---
Merci de ne pas répondre à ce mail. Postez directement vos questions dans votre dossier sur la plateforme.
---
--- ---
L'équide TPS - tps@apientreprise.fr L'équide TPS - tps@apientreprise.fr

View file

@ -6,5 +6,9 @@ Pour en savoir plus sur le motif du refus, vous pouvez consulter le contenu de v
Bonne journée, Bonne journée,
---
Merci de ne pas répondre à ce mail. Postez directement vos questions dans votre dossier sur la plateforme.
---
--- ---
L'équide TPS - tps@apientreprise.fr L'équide TPS - tps@apientreprise.fr

View file

@ -4,5 +4,9 @@ Nous vous confirmons que votre dossier N°<%=@dossier.id%> a été déposé aupr
Bonne journée, Bonne journée,
---
Merci de ne pas répondre à ce mail. Postez directement vos questions dans votre dossier sur la plateforme.
---
--- ---
L'équide TPS - tps@apientreprise.fr L'équide TPS - tps@apientreprise.fr

View file

@ -6,5 +6,9 @@ Afin de finaliser son dépôt, merci de vous rendre sur <%=users_dossier_recapit
Bonne journée, Bonne journée,
---
Merci de ne pas répondre à ce mail. Postez directement vos questions dans votre dossier sur la plateforme.
---
--- ---
L'équide TPS - tps@apientreprise.fr L'équide TPS - tps@apientreprise.fr

View file

@ -6,5 +6,9 @@ Pour en savoir plus sur les raisons de ce classement sans suite, vous pouvez con
Bonne journée, Bonne journée,
---
Merci de ne pas répondre à ce mail. Postez directement vos questions dans votre dossier sur la plateforme.
---
--- ---
L'équide TPS - tps@apientreprise.fr L'équide TPS - tps@apientreprise.fr

View file

@ -1,10 +1,14 @@
Bonjour <%= @user.email %> Bonjour <%= @user.email %>
Un nouveau commentaire est disponible dans votre espace TPS. Un nouveau message est disponible dans votre espace TPS.
Pour le consulter, merci de vous rendre sur <%=users_dossier_recapitulatif_url(dossier_id: @dossier.id)%> Pour le consulter, merci de vous rendre sur <%=users_dossier_recapitulatif_url(dossier_id: @dossier.id)%>
Bonne journée Bonne journée
---
Merci de ne pas répondre à ce mail. Postez directement vos questions dans votre dossier sur la plateforme.
---
--- ---
L'équide TPS - tps@apientreprise.fr L'équide TPS - tps@apientreprise.fr

View file

@ -1,87 +1,102 @@
- total = 100 - 2
- interface = 5
- notification = 10
- bugs = 10
- realise = total - interface - notification - bugs
#landing.max-size #landing.max-size
#title{style:'padding-bottom: 2%; padding-top: 2%'} #title
%h1.center %h1.center
TPS V2 %img#logo-tps{src: image_url('logos/logo-tps.png')}
%h2.center %h2.center
Pour une meilleure plateforme TéléProcédure Simplifiée
%h3.center
Plateforme publique pour réaliser des démarches administratives 100% en ligne.
%br %br
%h3.center %br
La plateforme évolue pour une meilleure interface, de meilleures interactions et une meilleure expérience. .center
%button.background-tps.js-scrollTo.btn.btn-lg{cible: '.demo_account'}
Envie d'essayer ?
#progression{style:'margin-left: 2em; margin-right: 2em; margin-top: 50px'} #landing_body.max-size
%h2.center Où en est la migration vers TPS V2 ? ... .row#etapes.center
#create_1.col-lg-3.col-md-3.col-sm-3.col-xs-3
%img{src:image_url('etapes/create_1.png')}
%br
%h4 Administration
%h3.text-info Je construis ma démarche 100% en ligne
#complet_2.col-lg-3.col-md-3.col-sm-3.col-xs-3
%img{src:image_url('etapes/complet_2.png')}
%br
%h4 Usager
%h3.text-success Je remplis un dossier de manière simplifiée
#message_3.col-lg-3.col-md-3.col-sm-3.col-xs-3
%img{src:image_url('etapes/message_3.png')}
%br
%h4 Usager
%h3.text-warning Je dialogue avec mon administration en ligne
#shared_4.col-lg-3.col-md-3.col-sm-3.col-xs-3
%img{src:image_url('etapes/shared_4.png')}
%br
%h4 Usager et Administrations
%h3.text-danger
J'invite des partenaires à co-construire le dossier
%h2.text-success.center{style:'margin-left: 135px'} .split-hr-left
= realise
\%
%i.text-default{style:'font-size: 18px'}
du site migré
%div{style: "width: 60%; margin-left:auto; margin-right:auto"}
.progress{style:'height: 30px; background-color: #ddd'}
.progress-bar.progress-bar-success.progress-bar-striped{:style => "width: #{realise}%;"}
.progress-bar.progress-bar-warning{:style => "width: #{interface}%;"}
%div{style:'margin-top: 0.4em'}
Interface
.progress-bar.progress-bar-purple{:style => "width: #{notification}%;"}
%div{style:'margin-top: 0.4em'}
Notifications
.progress-bar.progress-bar-danger{:style => "width: #{bugs}%;"}
%div{style:'margin-top: 0.4em'}
Fiabilisations et bugs
.row.demo_account.center
.col-md-4.col-lg-4
%h3.text-primary Acteurs publics
%h4 Créez des démarches en ligne simplifiées et sécurisées.
=link_to 'Démonstration', 'https://tps-dev.apientreprise.fr/administrateurs/sign_in/demo', {class: 'btn btn-lg btn-primary'}
#road_map.center{style:'margin-top: 30px; margin-bottom: 50px'} .col-md-4.col-lg-4
%h2.text-success %h3.text-warning Agents et services
Réalisé %h4 Accompagnez et co-traitez les projets avec les usagers.
=link_to 'Démonstration', 'https://tps-dev.apientreprise.fr/gestionnaires/sign_in/demo', {class: 'btn btn-lg btn-warning'}
#realise{style: 'width: 650px; margin-left: auto; margin-right: auto; text-align:left'} .col-md-4.col-lg-4
%ul %h3.text-success Usagers
%li %h4 Profitez de démarches simplifiées et déchanges continus avec les services traitants.
Un design général qui permet de mieux s'y retrouver =link_to 'Démonstration', 'https://tps-dev.apientreprise.fr/users/sign_in/demo', {class: 'btn btn-lg btn-success'}
%li
Utilisateur, Accompagnateur et Administrateur ont maintenant la même page de connexion
%li
Un tout nouveau tableau de bord pour les Accompagnateurs
%li
Une page récapitulative pour un dossier entièrement revue
%li
La possibilité de changer en un clic de compte entre Utilisateur, Accompagnateur et Administrateur
%li
Une recherche globale : tapez et vous trouverez !!
%br .split-hr-left
%h2.text-warning
Reste à faire
#reste_a_faire{style: 'width: 650px; margin-left: auto; margin-right: auto; text-align:left'} #request_access.row.center
%ul .col-xs-12.col-sm-12.col-md-12.col-lg-12
%li %h3 Envi de commencer à créer votre démarche ?
Terminer d'optimiser nos pages avec la nouvelle interface
%b.text-warning
="(#{interface}%)"
%li
Centre de notification : un seul endroit pour suivre l'activité de l'ensemble de vos dossiers (Accompagnateur)
%b.text-purple
="(#{notification}%)"
%li
Fiabilisation accrue de la plateforme : un certain nombre de bugs est encore présents ...
%b.text-danger
="(#{bugs}%)"
%li
%b
Prendre vos retours en compte :
= link_to 'feedback@tps.apientreprise.fr', "mailto:feedback@tps.apientreprise.fr"
= link_to 'Demander un accès administrateur', 'https://tps.apientreprise.fr/users/dossiers/new?procedure_id=31', {class: 'btn btn-lg background-tps', target: '_blank'}
%h3.center .split-hr-left
Disponible sur
= link_to "tps.apientreprise.fr", 'https://tps.apientreprise.fr', target: '_blank' .center
le .row
%span.text-success #utilisateurs.col-xs-12.col-sm-12.col-md-12.col-lg-12
3 Janvier 2017 %h4 Ils nous font confiances
Consel regional Ile de France,
Politique de la ville du Pas de calais,
DRIEA Ile de France
%br
Préfecture de la martinique,
DRIEE Ile de France,
Ministère de l'écologie et du développement durable,
MEME,
CCI Normandie
%br
.row
#partenaires.col-xs-12.col-sm-12.col-md-12.col-lg-12
%h4 Ils travaillent avec nous
Insee
Infogreff,
Ministere de la jeunesse et du sport,
IGN,
DGFIP
France Connect,
BAN,
api.gouv.fr
Euroquity,
BPI,
FNTP,
Qualibat

View file

@ -14,5 +14,6 @@
= h @dossier.procedure.description.html_safe = h @dossier.procedure.description.html_safe
- else - else
= image_tag(image_url(LOGO_NAME), {id: 'logo_tps'}) #logo_procedure.flag
= image_tag(image_url(LOGO_NAME), {id: 'logo_tps'})
%br %br