Merge branch 'develop' into staging
This commit is contained in:
commit
6d3d779ba8
28 changed files with 91 additions and 65 deletions
|
@ -36,7 +36,7 @@ linters:
|
||||||
style: lisp_case
|
style: lisp_case
|
||||||
|
|
||||||
ImplicitDiv:
|
ImplicitDiv:
|
||||||
enabled: false
|
enabled: true
|
||||||
|
|
||||||
Indentation:
|
Indentation:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
class Backoffice::DossiersController < Backoffice::DossiersListController
|
class Backoffice::DossiersController < Backoffice::DossiersListController
|
||||||
respond_to :html, :xlsx, :ods, :csv
|
respond_to :html, :xlsx, :ods, :csv
|
||||||
|
|
||||||
|
before_action :ensure_gestionnaire_is_authorized, only: :show
|
||||||
|
|
||||||
def index
|
def index
|
||||||
procedure = current_gestionnaire.procedure_filter
|
procedure = current_gestionnaire.procedure_filter
|
||||||
|
|
||||||
|
@ -185,6 +187,14 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def ensure_gestionnaire_is_authorized
|
||||||
|
current_gestionnaire.dossiers.find(params[:id])
|
||||||
|
|
||||||
|
rescue ActiveRecord::RecordNotFound
|
||||||
|
flash.alert = t('errors.messages.dossier_not_found')
|
||||||
|
redirect_to url_for(controller: '/backoffice')
|
||||||
|
end
|
||||||
|
|
||||||
def create_dossier_facade dossier_id
|
def create_dossier_facade dossier_id
|
||||||
@facade = DossierFacades.new dossier_id, current_gestionnaire.email
|
@facade = DossierFacades.new dossier_id, current_gestionnaire.email
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
%td.col-xs-6
|
%td.col-xs-6
|
||||||
= procedure.libelle
|
= procedure.libelle
|
||||||
- if @active_class
|
- if @active_class
|
||||||
%td= link_to procedure.lien, procedure.lien, class: 'procedure-lien', 'data-method' => :get
|
%td.procedure-lien= link_to procedure.lien, procedure.lien, 'data-method' => :get
|
||||||
%td
|
%td
|
||||||
= procedure.created_at_fr
|
= procedure.created_at_fr
|
||||||
%td
|
%td
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
type: 'email',
|
type: 'email',
|
||||||
placeholder: 'Email administrateur cible',
|
placeholder: 'Email administrateur cible',
|
||||||
style: 'width: 300px; margin-left:auto; margin-right:auto' }
|
style: 'width: 300px; margin-left:auto; margin-right:auto' }
|
||||||
%div#not_found_admin.center.text-danger{ style:'display: none; margin-top: 10px;' }
|
#not_found_admin.center.text-danger{ style:'display: none; margin-top: 10px;' }
|
||||||
Cet administrateur n'existe pas.
|
Cet administrateur n'existe pas.
|
||||||
.modal-footer
|
.modal-footer
|
||||||
= submit_tag "Envoyer", class: 'btn btn-success'
|
= submit_tag "Envoyer", class: 'btn btn-success'
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
.carret-down
|
.carret-down
|
||||||
Procédures
|
Procédures
|
||||||
%a{ href: '/admin/procedures/new' }
|
%a{ href: '/admin/procedures/new' }
|
||||||
%div#new-procedure.col-lg-2.col-md-2.col-sm-2.col-xs-2.action
|
#new-procedure.col-lg-2.col-md-2.col-sm-2.col-xs-2.action
|
||||||
Nouvelle
|
Nouvelle
|
||||||
|
|
||||||
.body
|
.body
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#procedure_show
|
#procedure_show
|
||||||
- unless @facade.procedure.published?
|
- unless @facade.procedure.published?
|
||||||
- if @facade.procedure.gestionnaires.size == 0
|
- if @facade.procedure.gestionnaires.size == 0
|
||||||
%a.action_button.btn.btn-success{ style: 'float: right; margin-top: 10px;', disabled: 'disabled', 'data-toggle' => :tooltip, title: 'Vous ne pouvez pas publier une procédure sans qu\'aucun accompagnateur ne soit affecté à celle-ci.', id: 'publish-procedure' }
|
%a.action_button.btn.btn-success#publish-procedure{ style: 'float: right; margin-top: 10px;', disabled: 'disabled', 'data-toggle' => :tooltip, title: 'Vous ne pouvez pas publier une procédure sans qu\'aucun accompagnateur ne soit affecté à celle-ci.' }
|
||||||
%i.fa.fa-eraser
|
%i.fa.fa-eraser
|
||||||
Publier
|
Publier
|
||||||
- else
|
- else
|
||||||
%a.btn.btn-success{ "data-target" => "#publish-modal", "data-toggle" => "modal", :type => "button", style: 'float: right; margin-top: 10px;', id: 'publish-procedure' }
|
%a.btn.btn-success#publish-procedure{ "data-target" => "#publish-modal", "data-toggle" => "modal", :type => "button", style: 'float: right; margin-top: 10px;' }
|
||||||
%i.fa.fa-eraser
|
%i.fa.fa-eraser
|
||||||
Publier
|
Publier
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,9 @@
|
||||||
CARTOGRAPHIE
|
CARTOGRAPHIE
|
||||||
= render partial: '/dossiers/edit_carto'
|
= render partial: '/dossiers/edit_carto'
|
||||||
.body.display-block-on-print
|
.body.display-block-on-print
|
||||||
%input{ id: 'json_latlngs', type: 'hidden', value: "#{@facade.dossier.json_latlngs}", name: 'json_latlngs' }
|
%input#json_latlngs{ type: 'hidden', value: "#{@facade.dossier.json_latlngs}", name: 'json_latlngs' }
|
||||||
%input{ id: 'quartier_prioritaires', type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}" }
|
%input#quartier_prioritaires{ type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}" }
|
||||||
%input{ id: 'cadastres', type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}" }
|
%input#cadastres{ type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}" }
|
||||||
|
|
||||||
= render partial: '/users/carte/map', locals: { dossier: @facade.dossier }
|
= render partial: '/users/carte/map', locals: { dossier: @facade.dossier }
|
||||||
= render partial: 'users/carte/init_carto', locals: { dossier: @facade.dossier }
|
= render partial: 'users/carte/init_carto', locals: { dossier: @facade.dossier }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- unless @facade.dossier.read_only?
|
- unless @facade.dossier.read_only?
|
||||||
- if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email))
|
- if user_signed_in? && (@facade.dossier.owner?(current_user.email) || @facade.dossier.invite_by_user?(current_user.email))
|
||||||
%a#maj_infos.action{ href: "/users/dossiers/#{@facade.dossier.id}/description" }
|
%a#maj_infos.action{ href: "/users/dossiers/#{@facade.dossier.id}/description" }
|
||||||
%div#edit-dossier.col-lg-2.col-md-2.col-sm-2.col-xs-2.action
|
#edit-dossier.col-lg-2.col-md-2.col-sm-2.col-xs-2.action
|
||||||
= "éditer".upcase
|
= "éditer".upcase
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
#map.mini{ class: @facade.dossier.procedure.module_api_carto.classes }
|
#map.mini{ class: @facade.dossier.procedure.module_api_carto.classes }
|
||||||
|
|
||||||
%input{ id: 'json_latlngs', type: 'hidden', value: "#{@facade.dossier.json_latlngs}" }
|
%input#json_latlngs{ type: 'hidden', value: "#{@facade.dossier.json_latlngs}" }
|
||||||
%input{ id: 'quartier_prioritaires', type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}" }
|
%input#quartier_prioritaires{ type: 'hidden', value: "#{@facade.dossier.quartier_prioritaires.to_json}" }
|
||||||
%input{ id: 'cadastres', type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}" }
|
%input#cadastres{ type: 'hidden', value: "#{@facade.dossier.cadastres.to_json}" }
|
||||||
|
|
||||||
%script{ type: 'text/javascript' }
|
%script{ type: 'text/javascript' }
|
||||||
= "var dossier_id =#{@facade.dossier.id}"
|
= "var dossier_id =#{@facade.dossier.id}"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#pieces-justificatives
|
#pieces-justificatives
|
||||||
%table.table
|
%table.table
|
||||||
- if @facade.procedure.cerfa_flag?
|
- if @facade.procedure.cerfa_flag?
|
||||||
%tr{ id: "piece_justificative_0" }
|
%tr#piece_justificative_0
|
||||||
%th.col-lg-6
|
%th.col-lg-6
|
||||||
Formulaire
|
Formulaire
|
||||||
%td.col-lg-6.col-md-6.col-sm-6.col-xs-6
|
%td.col-lg-6.col-md-6.col-sm-6.col-xs-6
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
= form_tag(url_for({ controller: 'commentaires', action: :create, dossier_id: dossier_facade.dossier.id, champ_id: dossier_facade.champ_id }), class: 'form-inline', method: 'POST', multipart: true) do
|
= form_tag(url_for({ controller: 'commentaires', action: :create, dossier_id: dossier_facade.dossier.id, champ_id: dossier_facade.champ_id }), class: 'form-inline', method: 'POST', multipart: true) do
|
||||||
|
|
||||||
%textarea.form-control.wysihtml5{ id: 'texte_commentaire', name: 'texte_commentaire', style: 'width: 100%; margin-bottom: 2%;', rows: '5', placeholder: "Commentaire" }
|
%textarea.form-control.wysihtml5#texte_commentaire{ name: 'texte_commentaire', style: 'width: 100%; margin-bottom: 2%;', rows: '5', placeholder: "Commentaire" }
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-md-6
|
.col-md-6
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%div#footer
|
#footer
|
||||||
%p{ class: "copyright col-md-push-#{12-main_container_size} col-md-#{main_container_size} col-lg-push-#{12-main_container_size} col-lg-#{main_container_size} text-muted small" }
|
%p{ class: "copyright col-md-push-#{12-main_container_size} col-md-#{main_container_size} col-lg-push-#{12-main_container_size} col-lg-#{main_container_size} text-muted small" }
|
||||||
= link_to 'SGMAP', "http://etatplateforme.modernisation.gouv.fr"
|
= link_to 'SGMAP', "http://etatplateforme.modernisation.gouv.fr"
|
||||||
= Time.now.year
|
= Time.now.year
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.new-header
|
.new-header
|
||||||
.header-inner-content
|
.header-inner-content
|
||||||
%img{ src: image_url("header/logo-tps.svg"), class: "header-logo pull-left" }
|
%img.header-logo.pull-left{ src: image_url("header/logo-tps.svg") }
|
||||||
|
|
||||||
= link_to "Connexion", new_user_session_path, :class => "header-login-button pull-right"
|
= link_to "Connexion", new_user_session_path, :class => "header-login-button pull-right"
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
= render partial: 'layouts/ie_lt_10'
|
= render partial: 'layouts/ie_lt_10'
|
||||||
|
|
||||||
|
|
||||||
%div#wrap
|
#wrap
|
||||||
.row
|
.row
|
||||||
%div#header.navbar
|
#header.navbar
|
||||||
= render partial: "layouts/navbar"
|
= render partial: "layouts/navbar"
|
||||||
.row.no-margin
|
.row.no-margin
|
||||||
- if RenderPartialService.left_panel_exist? @left_pannel_url
|
- if RenderPartialService.left_panel_exist? @left_pannel_url
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
%div#first-block
|
#first-block
|
||||||
.en-cours
|
.en-cours
|
||||||
%b
|
%b
|
||||||
= dossier_count = current_administrateur.procedures.count
|
= dossier_count = current_administrateur.procedures.count
|
||||||
= ("Procedures".pluralize(dossier_count)).upcase
|
= ("Procedures".pluralize(dossier_count)).upcase
|
||||||
|
|
||||||
%div#action-block
|
#action-block
|
||||||
|
|
||||||
%div#menu-block
|
#menu-block
|
||||||
.split-hr-left
|
.split-hr-left
|
||||||
#procedure-list
|
#procedure-list
|
||||||
%a{ :href => "#{url_for :admin_procedures_draft}", id: "draft-procedures" }
|
%a#draft-procedures{ :href => "#{url_for :admin_procedures_draft}" }
|
||||||
.procedure-list-element{ class: @draft_class }
|
.procedure-list-element{ class: @draft_class }
|
||||||
Brouillons
|
Brouillons
|
||||||
.badge.progress-bar-default
|
.badge.progress-bar-default
|
||||||
= current_administrateur.procedures.where(published: false, archived: false).count
|
= current_administrateur.procedures.where(published: false, archived: false).count
|
||||||
|
|
||||||
%a{ :href => "#{url_for :admin_procedures}", id: "active-procedures" }
|
%a#active-procedures{ :href => "#{url_for :admin_procedures}" }
|
||||||
.procedure-list-element{ class: @active_class }
|
.procedure-list-element{ class: @active_class }
|
||||||
Actives
|
Actives
|
||||||
.badge.progress-bar-success
|
.badge.progress-bar-success
|
||||||
= current_administrateur.procedures.where(published: true, archived: false).count
|
= current_administrateur.procedures.where(published: true, archived: false).count
|
||||||
|
|
||||||
%a{ :href => "#{url_for :admin_procedures_archived}", id: "archived-procedures" }
|
%a#archived-procedures{ :href => "#{url_for :admin_procedures_archived}" }
|
||||||
.procedure-list-element{ class: @archived_class }
|
.procedure-list-element{ class: @archived_class }
|
||||||
Archivées
|
Archivées
|
||||||
.badge.progress-bar-purple
|
.badge.progress-bar-purple
|
||||||
|
@ -30,4 +30,4 @@
|
||||||
.split-hr-left
|
.split-hr-left
|
||||||
|
|
||||||
|
|
||||||
%div#infos-block
|
#infos-block
|
||||||
|
|
|
@ -1,51 +1,51 @@
|
||||||
%div#first-block
|
#first-block
|
||||||
.en-cours
|
.en-cours
|
||||||
- unless @procedure.logo.blank?
|
- unless @procedure.logo.blank?
|
||||||
= image_tag @procedure.decorate.logo_img, style: 'width: 30px;'
|
= image_tag @procedure.decorate.logo_img, style: 'width: 30px;'
|
||||||
%b
|
%b
|
||||||
= @procedure.libelle
|
= @procedure.libelle
|
||||||
|
|
||||||
%div#action-block
|
#action-block
|
||||||
|
|
||||||
%div#menu-block
|
#menu-block
|
||||||
.split-hr-left
|
.split-hr-left
|
||||||
#procedure-list
|
#procedure-list
|
||||||
%a{ :href => "#{url_for admin_procedure_path(@procedure)}", id: 'onglet-infos' }
|
%a#onglet-infos{ :href => "#{url_for admin_procedure_path(@procedure)}" }
|
||||||
.procedure-list-element{ class: ('active' if active == 'Informations') }
|
.procedure-list-element{ class: ('active' if active == 'Informations') }
|
||||||
Informations
|
Informations
|
||||||
|
|
||||||
%a{ :href => "#{url_for admin_procedure_accompagnateurs_path(@procedure)}", id: 'onglet-accompagnateurs' }
|
%a#onglet-accompagnateurs{ :href => "#{url_for admin_procedure_accompagnateurs_path(@procedure)}" }
|
||||||
.procedure-list-element{ class: ('active' if active == 'Accompagnateurs') }
|
.procedure-list-element{ class: ('active' if active == 'Accompagnateurs') }
|
||||||
= t('dynamics.admin.procedure.onglets.accompagnateurs')
|
= t('dynamics.admin.procedure.onglets.accompagnateurs')
|
||||||
|
|
||||||
%a{ :href => "#{url_for edit_admin_procedure_path(@procedure)}", id: 'onglet-description' }
|
%a#onglet-description{ :href => "#{url_for edit_admin_procedure_path(@procedure)}" }
|
||||||
.procedure-list-element{ class: ('active' if active == 'Description') }
|
.procedure-list-element{ class: ('active' if active == 'Description') }
|
||||||
Description
|
Description
|
||||||
|
|
||||||
- unless @procedure.locked?
|
- unless @procedure.locked?
|
||||||
%a{ :href => "#{url_for admin_procedure_types_de_champ_path(@procedure)}", id: 'onglet-champs' }
|
%a#onglet-champs{ :href => "#{url_for admin_procedure_types_de_champ_path(@procedure)}" }
|
||||||
.procedure-list-element{ class: ('active' if active == 'Champs') }
|
.procedure-list-element{ class: ('active' if active == 'Champs') }
|
||||||
Champs
|
Champs
|
||||||
|
|
||||||
- unless @procedure.locked?
|
- unless @procedure.locked?
|
||||||
%a{ :href => "#{url_for admin_procedure_pieces_justificatives_path(@procedure)}", id: 'onglet-pieces' }
|
%a#onglet-pieces{ :href => "#{url_for admin_procedure_pieces_justificatives_path(@procedure)}" }
|
||||||
.procedure-list-element{ class: ('active' if active == 'Pieces') }
|
.procedure-list-element{ class: ('active' if active == 'Pieces') }
|
||||||
Pièces jointes
|
Pièces jointes
|
||||||
|
|
||||||
- unless @procedure.locked?
|
- unless @procedure.locked?
|
||||||
%a{ :href => "#{url_for admin_procedure_types_de_champ_private_path(@procedure)}", id: 'onglet-private-champs' }
|
%a#onglet-private-champs{ :href => "#{url_for admin_procedure_types_de_champ_private_path(@procedure)}" }
|
||||||
.procedure-list-element{ class: ('active' if active == 'Champs privés') }
|
.procedure-list-element{ class: ('active' if active == 'Champs privés') }
|
||||||
Champs privés
|
Champs privés
|
||||||
|
|
||||||
%a{ :href => "#{url_for admin_procedure_mail_templates_path(@procedure)}", id: 'onglet-inemailsfos' }
|
%a#onglet-inemailsfos{ :href => "#{url_for admin_procedure_mail_templates_path(@procedure)}" }
|
||||||
.procedure-list-element{ class: ('active' if active == 'E-mails') }
|
.procedure-list-element{ class: ('active' if active == 'E-mails') }
|
||||||
E-mails
|
E-mails
|
||||||
|
|
||||||
%a{ :href => "#{url_for admin_procedure_previsualisation_path(@procedure)}", id: 'onglet-preview' }
|
%a#onglet-preview{ :href => "#{url_for admin_procedure_previsualisation_path(@procedure)}" }
|
||||||
.procedure-list-element{ class: ('active' if active == 'Prévisualisation') }
|
.procedure-list-element{ class: ('active' if active == 'Prévisualisation') }
|
||||||
Prévisualisation
|
Prévisualisation
|
||||||
|
|
||||||
.split-hr-left
|
.split-hr-left
|
||||||
|
|
||||||
|
|
||||||
%div#infos-block
|
#infos-block
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%div#cgu_menu_block
|
#cgu_menu_block
|
||||||
#procedure-list{ style: 'margin-top: 0;' }
|
#procedure-list{ style: 'margin-top: 0;' }
|
||||||
= link_to cgu_path(:anchor => "editeur") do
|
= link_to cgu_path(:anchor => "editeur") do
|
||||||
.procedure-list-element
|
.procedure-list-element
|
||||||
|
|
|
@ -1,46 +1,46 @@
|
||||||
%div#first-block
|
#first-block
|
||||||
.en-cours
|
.en-cours
|
||||||
= dossier_count = current_user.dossiers.count
|
= dossier_count = current_user.dossiers.count
|
||||||
= ("Dossier".pluralize(dossier_count)).upcase
|
= ("Dossier".pluralize(dossier_count)).upcase
|
||||||
%br
|
%br
|
||||||
EN COURS
|
EN COURS
|
||||||
|
|
||||||
%div#action-block
|
#action-block
|
||||||
|
|
||||||
%div#menu-block
|
#menu-block
|
||||||
.split-hr-left
|
.split-hr-left
|
||||||
#procedure-list
|
#procedure-list
|
||||||
- unless current_user.dossiers.count == 0
|
- unless current_user.dossiers.count == 0
|
||||||
%a{ :href => "#{url_for users_dossiers_path(liste: 'brouillon')}", 'data-toggle' => :tooltip, title: 'Les dossiers jamais proposés à la relecture.' }
|
%a{ :href => "#{url_for users_dossiers_path(liste: 'brouillon')}", 'data-toggle' => :tooltip, title: 'Les dossiers jamais proposés à la relecture.' }
|
||||||
.procedure-list-element{ class: ('active' if @liste == 'brouillon'), id: 'brouillon' }
|
.procedure-list-element#brouillon{ class: ('active' if @liste == 'brouillon') }
|
||||||
Brouillons
|
Brouillons
|
||||||
.badge.progress-bar-default
|
.badge.progress-bar-default
|
||||||
= @user_dossiers.brouillon.count
|
= @user_dossiers.brouillon.count
|
||||||
|
|
||||||
%a{ :href => "#{url_for users_dossiers_path(liste: 'a_traiter')}", 'data-toggle' => :tooltip, title: 'Les dossiers qui requièrent une action de votre part.' }
|
%a{ :href => "#{url_for users_dossiers_path(liste: 'a_traiter')}", 'data-toggle' => :tooltip, title: 'Les dossiers qui requièrent une action de votre part.' }
|
||||||
.procedure-list-element{ class: ('active' if @liste == 'a_traiter'), id: 'a_traiter' }
|
.procedure-list-element#a_traiter{ class: ('active' if @liste == 'a_traiter') }
|
||||||
En construction
|
En construction
|
||||||
.badge.progress-bar-danger
|
.badge.progress-bar-danger
|
||||||
= @user_dossiers.en_construction.count
|
= @user_dossiers.en_construction.count
|
||||||
|
|
||||||
%a{ :href => "#{url_for users_dossiers_path(liste: 'en_instruction')}", 'data-toggle' => :tooltip, title: 'Les dossiers en cours d\'examen par l\'administration compétante.' }
|
%a{ :href => "#{url_for users_dossiers_path(liste: 'en_instruction')}", 'data-toggle' => :tooltip, title: 'Les dossiers en cours d\'examen par l\'administration compétante.' }
|
||||||
.procedure-list-element{ class: ('active' if @liste == 'en_instruction'), id: 'en_instruction' }
|
.procedure-list-element#en_instruction{ class: ('active' if @liste == 'en_instruction') }
|
||||||
En instruction
|
En instruction
|
||||||
.badge.progress-bar-default
|
.badge.progress-bar-default
|
||||||
= @user_dossiers.en_instruction.count
|
= @user_dossiers.en_instruction.count
|
||||||
|
|
||||||
%a{ :href => "#{url_for users_dossiers_path(liste: 'termine')}", 'data-toggle' => :tooltip, title: 'Les dossiers cloturés qui peuvent être "Accepté", "Refusé" ou "Sans suite".' }
|
%a{ :href => "#{url_for users_dossiers_path(liste: 'termine')}", 'data-toggle' => :tooltip, title: 'Les dossiers cloturés qui peuvent être "Accepté", "Refusé" ou "Sans suite".' }
|
||||||
.procedure-list-element{ class: ('active' if @liste == 'termine'), id: 'termine' }
|
.procedure-list-element#termine{ class: ('active' if @liste == 'termine') }
|
||||||
Terminé
|
Terminé
|
||||||
.badge.progress-bar-success
|
.badge.progress-bar-success
|
||||||
= @user_dossiers.termine.count
|
= @user_dossiers.termine.count
|
||||||
|
|
||||||
%a{ :href => "#{url_for users_dossiers_path(liste: 'invite')}" }
|
%a{ :href => "#{url_for users_dossiers_path(liste: 'invite')}" }
|
||||||
.procedure-list-element{ class: ('active' if @liste == 'invite'), id: 'invite' }
|
.procedure-list-element#invite{ class: ('active' if @liste == 'invite') }
|
||||||
Invitation
|
Invitation
|
||||||
.badge.progress-bar-warning
|
.badge.progress-bar-warning
|
||||||
= current_user.invites.count
|
= current_user.invites.count
|
||||||
.split-hr-left
|
.split-hr-left
|
||||||
|
|
||||||
|
|
||||||
%div#infos-block
|
#infos-block
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
%div#first-block
|
#first-block
|
||||||
.en-cours
|
.en-cours
|
||||||
%h2 Récapitulatif
|
%h2 Récapitulatif
|
||||||
.infos
|
.infos
|
||||||
%div= t('dynamics.dossiers.numéro') + @facade.dossier.id.to_s
|
%div= t('dynamics.dossiers.numéro') + @facade.dossier.id.to_s
|
||||||
|
|
||||||
%div#menu-block
|
#menu-block
|
||||||
|
|
||||||
%div#infos-block
|
#infos-block
|
||||||
.split-hr-left
|
.split-hr-left
|
||||||
.dossier-state= @facade.dossier.display_state
|
.dossier-state= @facade.dossier.display_state
|
||||||
.split-hr-left
|
.split-hr-left
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
.input-group
|
.input-group
|
||||||
= text_field_tag('q', "#{@search_terms unless @search_terms.nil?}", id: 'q', placeholder: "Recherchez parmi tous vos dossiers", class: 'form-control')
|
= text_field_tag('q', "#{@search_terms unless @search_terms.nil?}", id: 'q', placeholder: "Recherchez parmi tous vos dossiers", class: 'form-control')
|
||||||
%span.input-group-btn
|
%span.input-group-btn
|
||||||
%button.btn.btn-default{ id: 'search-button' }
|
%button.btn.btn-default#search-button
|
||||||
%i.fa.fa-search
|
%i.fa.fa-search
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
.col-lg-3.col-md-3.col-sm-3.col-xs-3.options
|
.col-lg-3.col-md-3.col-sm-3.col-xs-3.options
|
||||||
.row.centered-option
|
.row.centered-option
|
||||||
.col-lg-12.col-md-12.col-sm-12.col-xs-12
|
.col-lg-12.col-md-12.col-sm-12.col-xs-12
|
||||||
%div#invitations.dropdown-toggle{ 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false }
|
#invitations.dropdown-toggle{ 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false }
|
||||||
%i.fa.fa-user
|
%i.fa.fa-user
|
||||||
= t('utils.involved')
|
= t('utils.involved')
|
||||||
.badge.progress-bar-info
|
.badge.progress-bar-info
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
- if current_user.loged_in_with_france_connect?
|
- if current_user.loged_in_with_france_connect?
|
||||||
%div{ id: "fconnect-profile", "data-fc-logout-url" => '/users/sign_out" data-method="delete' }
|
#fconnect-profile{ "data-fc-logout-url" => '/users/sign_out" data-method="delete' }
|
||||||
%a.text-info{ href: "#" }
|
%a.text-info{ href: "#" }
|
||||||
= "#{current_user.given_name} #{current_user.family_name}"
|
= "#{current_user.given_name} #{current_user.family_name}"
|
||||||
= link_to "", "/users/sign_out", method: :delete, class: "btn fa fa-power-off off-fc-link"
|
= link_to "", "/users/sign_out", method: :delete, class: "btn fa fa-power-off off-fc-link"
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
|
|
||||||
= form_tag(url_for({ controller: :carte, action: :save, dossier_id: @dossier.id }), class: 'form-inline', method: 'POST') do
|
= form_tag(url_for({ controller: :carte, action: :save, dossier_id: @dossier.id }), class: 'form-inline', method: 'POST') do
|
||||||
%br
|
%br
|
||||||
%input{ type: 'hidden', value: "#{@dossier.json_latlngs}", name: 'json_latlngs', id: 'json_latlngs' }
|
%input#json_latlngs{ type: 'hidden', value: "#{@dossier.json_latlngs}", name: 'json_latlngs' }
|
||||||
%input{ id: 'quartier_prioritaires', type: 'hidden', value: "#{@dossier.quartier_prioritaires.to_json}" }
|
%input#quartier_prioritaires{ type: 'hidden', value: "#{@dossier.quartier_prioritaires.to_json}" }
|
||||||
%input{ id: 'cadastres', type: 'hidden', value: "#{@dossier.cadastres.to_json}" }
|
%input#cadastres{ type: 'hidden', value: "#{@dossier.cadastres.to_json}" }
|
||||||
|
|
||||||
- if @dossier.draft?
|
- if @dossier.draft?
|
||||||
= render partial: '/layouts/etape_suivante'
|
= render partial: '/layouts/etape_suivante'
|
||||||
|
|
|
@ -8,15 +8,15 @@
|
||||||
%em
|
%em
|
||||||
Récupérer le formulaire de demande ou CERFA vierge pour mon dossier :
|
Récupérer le formulaire de demande ou CERFA vierge pour mon dossier :
|
||||||
= link_to "Télécharger", "#{dossier.procedure.lien_demarche}", target: :blank, id: :lien_cerfa
|
= link_to "Télécharger", "#{dossier.procedure.lien_demarche}", target: :blank, id: :lien_cerfa
|
||||||
-# %a{ id: 'lien_cerfa', href: "#{dossier.procedure.lien_demarche}", target: '_blank' } Télécharger
|
-# %a#lien_cerfa{ href: "#{dossier.procedure.lien_demarche}", target: '_blank' } Télécharger
|
||||||
|
|
||||||
%td
|
%td
|
||||||
- if dossier.cerfa_available?
|
- if dossier.cerfa_available?
|
||||||
%span.btn.btn-sm.btn-file.btn-success
|
%span.btn.btn-sm.btn-file.btn-success
|
||||||
Modifier
|
Modifier
|
||||||
%input{ type: 'file', name: 'cerfa_pdf', id: 'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
|
%input#cerfa_pdf{ type: 'file', name: 'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
|
||||||
- else
|
- else
|
||||||
%input{ type: 'file', name: 'cerfa_pdf', id: 'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
|
%input#cerfa_pdf{ type: 'file', name: 'cerfa_pdf', accept: PieceJustificative.accept_format, :max_file_size => 6.megabytes }
|
||||||
|
|
||||||
- dossier.types_de_piece_justificative.order('order_place ASC').each do |tpj|
|
- dossier.types_de_piece_justificative.order('order_place ASC').each do |tpj|
|
||||||
%tr
|
%tr
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
%p.lead{ id: 'pro_section' }
|
%p.lead#pro_section
|
||||||
.flag
|
.flag
|
||||||
= image_tag(image_url(LOGO_NAME))
|
= image_tag(image_url(LOGO_NAME))
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
feature 'add commentaire on backoffice' do
|
feature 'add commentaire on backoffice' do
|
||||||
let(:dossier) { create(:dossier, :with_entreprise) }
|
let(:procedure) { create(:procedure) }
|
||||||
|
let(:dossier) { create(:dossier, :with_entreprise, procedure: procedure, state: 'updated') }
|
||||||
let(:dossier_id) { dossier.id }
|
let(:dossier_id) { dossier.id }
|
||||||
let!(:commentaire) { create(:commentaire, dossier: dossier, email: 'toto@toto.com') }
|
let!(:commentaire) { create(:commentaire, dossier: dossier, email: 'toto@toto.com') }
|
||||||
let(:email_commentaire) { 'test@test.com' }
|
let(:email_commentaire) { 'test@test.com' }
|
||||||
|
@ -10,6 +11,7 @@ feature 'add commentaire on backoffice' do
|
||||||
let(:body) { 'Commentaire de test' }
|
let(:body) { 'Commentaire de test' }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
create :assign_to, gestionnaire: gestionnaire, procedure: procedure
|
||||||
login_as gestionnaire, scope: :gestionnaire
|
login_as gestionnaire, scope: :gestionnaire
|
||||||
visit backoffice_dossier_path(dossier)
|
visit backoffice_dossier_path(dossier)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
feature 'backoffice: flux de commentaires' do
|
feature 'backoffice: flux de commentaires' do
|
||||||
|
let(:procedure) { create(:procedure) }
|
||||||
let(:gestionnaire) { create(:gestionnaire) }
|
let(:gestionnaire) { create(:gestionnaire) }
|
||||||
let(:dossier) { create(:dossier, :with_entreprise) }
|
let(:dossier) { create(:dossier, :with_entreprise, procedure: procedure, state: 'updated') }
|
||||||
let(:dossier_id) { dossier.id }
|
let(:dossier_id) { dossier.id }
|
||||||
|
|
||||||
let(:champ1) { dossier.champs.first }
|
let(:champ1) { create(:champ, dossier: dossier, type_de_champ: create(:type_de_champ_public, libelle: "subtitle1")) }
|
||||||
let(:champ2) { create(:champ, dossier: dossier, type_de_champ: create(:type_de_champ_public, libelle: "subtitle")) }
|
let(:champ2) { create(:champ, dossier: dossier, type_de_champ: create(:type_de_champ_public, libelle: "subtitle2")) }
|
||||||
|
|
||||||
let!(:commentaire1) { create(:commentaire, dossier: dossier, champ: champ1) }
|
let!(:commentaire1) { create(:commentaire, dossier: dossier, champ: champ1) }
|
||||||
let!(:commentaire2) { create(:commentaire, dossier: dossier) }
|
let!(:commentaire2) { create(:commentaire, dossier: dossier) }
|
||||||
|
@ -14,6 +15,7 @@ feature 'backoffice: flux de commentaires' do
|
||||||
let!(:commentaire4) { create(:commentaire, dossier: dossier, champ: champ1) }
|
let!(:commentaire4) { create(:commentaire, dossier: dossier, champ: champ1) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
create :assign_to, gestionnaire: gestionnaire, procedure: procedure
|
||||||
login_as gestionnaire, scope: :gestionnaire
|
login_as gestionnaire, scope: :gestionnaire
|
||||||
visit backoffice_dossier_path(dossier)
|
visit backoffice_dossier_path(dossier)
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,6 +32,18 @@ feature 'on backoffice page', js: true do
|
||||||
expect(page).to have_css('#backoffice-dossier-show')
|
expect(page).to have_css('#backoffice-dossier-show')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "and goes to the page of a dossier he hasn't access to" do
|
||||||
|
let!(:unauthorized_dossier) { create(:dossier, :with_entreprise, state: 'updated') }
|
||||||
|
|
||||||
|
before do
|
||||||
|
visit backoffice_dossier_path(unauthorized_dossier)
|
||||||
|
end
|
||||||
|
|
||||||
|
scenario "it shows an error message" do
|
||||||
|
expect(page).to have_content("Le dossier n'existe pas ou vous n'y avez pas accès.")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when gestionnaire have enterprise and individual dossier in his inbox', js: true do
|
context 'when gestionnaire have enterprise and individual dossier in his inbox', js: true do
|
||||||
|
|
Loading…
Reference in a new issue