Merge branch 'dev'
This commit is contained in:
commit
3268da02d5
25 changed files with 72 additions and 33 deletions
Binary file not shown.
Before Width: | Height: | Size: 9.7 KiB |
1
app/assets/images/marianne.svg
Normal file
1
app/assets/images/marianne.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.7 KiB |
|
@ -1,7 +1,9 @@
|
||||||
|
@import "colors";
|
||||||
@import "constants";
|
@import "constants";
|
||||||
|
|
||||||
.demande {
|
.demande {
|
||||||
padding-bottom: $default-padding;
|
padding-top: 3 * $default-padding;
|
||||||
|
padding-bottom: 3 * $default-padding;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
margin-bottom: $default-padding;
|
margin-bottom: $default-padding;
|
||||||
|
@ -14,4 +16,12 @@
|
||||||
b {
|
b {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
border: none;
|
||||||
|
height: 1px;
|
||||||
|
background-color: $grey;
|
||||||
|
margin-top: 2 * $default-padding;
|
||||||
|
margin-bottom: 2 * $default-padding;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,26 @@ class Admin::AttestationTemplatesController < AdminController
|
||||||
render 'admin/attestation_templates/show', formats: [:pdf]
|
render 'admin/attestation_templates/show', formats: [:pdf]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def delete_logo
|
||||||
|
attestation_template = @procedure.attestation_template
|
||||||
|
|
||||||
|
attestation_template.remove_logo!
|
||||||
|
attestation_template.save
|
||||||
|
|
||||||
|
flash.notice = 'le logo a bien été supprimée'
|
||||||
|
redirect_to edit_admin_procedure_attestation_template_path(@procedure)
|
||||||
|
end
|
||||||
|
|
||||||
|
def delete_signature
|
||||||
|
attestation_template = @procedure.attestation_template
|
||||||
|
|
||||||
|
attestation_template.remove_signature!
|
||||||
|
attestation_template.save
|
||||||
|
|
||||||
|
flash.notice = 'la signature a bien été supprimée'
|
||||||
|
redirect_to edit_admin_procedure_attestation_template_path(@procedure)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def activated_attestation_params
|
def activated_attestation_params
|
||||||
|
|
|
@ -228,6 +228,15 @@ class Admin::ProceduresController < AdminController
|
||||||
redirect_to edit_admin_procedure_path(procedure)
|
redirect_to edit_admin_procedure_path(procedure)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def delete_notice
|
||||||
|
procedure = Procedure.find(params[:id])
|
||||||
|
|
||||||
|
procedure.notice.purge_later
|
||||||
|
|
||||||
|
flash.notice = 'la notice a bien été supprimée'
|
||||||
|
redirect_to edit_admin_procedure_path(procedure)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def cloned_from_library?
|
def cloned_from_library?
|
||||||
|
|
|
@ -13,7 +13,7 @@ class ProcedureDecorator < Draper::Decorator
|
||||||
|
|
||||||
def logo_img
|
def logo_img
|
||||||
if logo.blank?
|
if logo.blank?
|
||||||
h.image_url(LOGO_NAME)
|
h.image_url("marianne.svg")
|
||||||
else
|
else
|
||||||
if Flipflop.remote_storage?
|
if Flipflop.remote_storage?
|
||||||
(RemoteDownloader.new logo.filename).url
|
(RemoteDownloader.new logo.filename).url
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
= image_tag @attestation_template.logo.url, class: 'thumbnail'
|
= image_tag @attestation_template.logo.url, class: 'thumbnail'
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :logo, "Logo de l'attestation"
|
= f.label :logo, "Logo de l'attestation"
|
||||||
|
- if @attestation_template.logo.present?
|
||||||
|
= link_to 'Supprimer le logo', admin_procedure_attestation_template_logo_path(@procedure), method: :delete
|
||||||
= f.file_field :logo, accept: 'image/png, image/jpg, image/jpeg'
|
= f.file_field :logo, accept: 'image/png, image/jpg, image/jpeg'
|
||||||
%p.help-block
|
%p.help-block
|
||||||
Fichier accepté : JPG / JPEG / PNG
|
Fichier accepté : JPG / JPEG / PNG
|
||||||
|
@ -52,6 +54,8 @@
|
||||||
= image_tag @attestation_template.signature.url, class: 'thumbnail'
|
= image_tag @attestation_template.signature.url, class: 'thumbnail'
|
||||||
.form-group
|
.form-group
|
||||||
= f.label :signature, "Tampon de l'attestation"
|
= f.label :signature, "Tampon de l'attestation"
|
||||||
|
- if @attestation_template.signature.present?
|
||||||
|
= link_to 'Supprimer le tampon', admin_procedure_attestation_template_signature_path(@procedure), method: :delete
|
||||||
= f.file_field :signature, accept: 'image/png, image/jpg, image/jpeg'
|
= f.file_field :signature, accept: 'image/png, image/jpg, image/jpeg'
|
||||||
%p.help-block
|
%p.help-block
|
||||||
Fichier accepté : JPG / JPEG / PNG
|
Fichier accepté : JPG / JPEG / PNG
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
= f.label :duree_conservation_dossiers_dans_ds, "Sur demarches-simplifiees.fr* (durée en mois après le début de l’instruction)"
|
= f.label :duree_conservation_dossiers_dans_ds, "Sur demarches-simplifiees.fr* (durée en mois après le début de l’instruction)"
|
||||||
= f.number_field :duree_conservation_dossiers_dans_ds, class: 'form-control', placeholder: '6', required: true
|
= f.number_field :duree_conservation_dossiers_dans_ds, class: 'form-control', placeholder: '6', required: true
|
||||||
|
|
||||||
= f.label :duree_conservation_dossiers_hors_ds, "Hors demarches-simplifiees.fr* (durée en mois)"
|
= f.label :duree_conservation_dossiers_hors_ds, "Hors demarches-simplifiees.fr* (durée en mois après la fin de l'instruction)"
|
||||||
= f.number_field :duree_conservation_dossiers_hors_ds, class: 'form-control', placeholder: '6', required: true
|
= f.number_field :duree_conservation_dossiers_hors_ds, class: 'form-control', placeholder: '6', required: true
|
||||||
|
|
||||||
.form-group
|
.form-group
|
||||||
|
@ -60,6 +60,9 @@
|
||||||
- else
|
- else
|
||||||
%a{ href: url_for(notice), target: '_blank' }
|
%a{ href: url_for(notice), target: '_blank' }
|
||||||
= notice.filename.to_s
|
= notice.filename.to_s
|
||||||
|
\-
|
||||||
|
= link_to 'supprimer', delete_notice_admin_procedure_path(@procedure),
|
||||||
|
method: :delete
|
||||||
%br
|
%br
|
||||||
Modifier :
|
Modifier :
|
||||||
= f.file_field :notice,
|
= f.file_field :notice,
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
#form-login
|
#form-login
|
||||||
%br
|
|
||||||
= image_tag(image_url(LOGO_NAME))
|
|
||||||
%br
|
|
||||||
%h2#login_admin
|
%h2#login_admin
|
||||||
= t('dynamics.admin.connexion_title')
|
= t('dynamics.admin.connexion_title')
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
- content_for(:title, 'Demande de compte administrateur')
|
||||||
|
|
||||||
|
- content_for :footer do
|
||||||
|
= render partial: "root/footer"
|
||||||
|
|
||||||
.container.demande
|
.container.demande
|
||||||
%h1 Demande de compte administrateur
|
%h1 Demande de compte administrateur
|
||||||
|
|
||||||
|
@ -5,6 +10,8 @@
|
||||||
%p.intro Pour obtenir un compte administrateur sur demarches-simplifiees.fr, veuillez remplir le formulaire ci-dessous et un membre de notre équipe vous contactera dès que possible.
|
%p.intro Pour obtenir un compte administrateur sur demarches-simplifiees.fr, veuillez remplir le formulaire ci-dessous et un membre de notre équipe vous contactera dès que possible.
|
||||||
%p.intro Tous les champs sont obligatoires.
|
%p.intro Tous les champs sont obligatoires.
|
||||||
|
|
||||||
|
%hr
|
||||||
|
|
||||||
= form_tag({ controller: 'demandes', action: 'create' }, class: 'form') do
|
= form_tag({ controller: 'demandes', action: 'create' }, class: 'form') do
|
||||||
|
|
||||||
= label_tag :organization_name do
|
= label_tag :organization_name do
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
= devise_error_messages!
|
= devise_error_messages!
|
||||||
|
|
||||||
#form-login
|
#form-login
|
||||||
= image_tag(image_url(LOGO_NAME))
|
|
||||||
%br
|
|
||||||
%h2#gestionnaire_login Changement de mot de passe
|
%h2#gestionnaire_login Changement de mot de passe
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
%br
|
%br
|
||||||
#form-login
|
#form-login
|
||||||
= image_tag(image_url(LOGO_NAME))
|
|
||||||
%br
|
|
||||||
%h2#gestionnaire_login Mot de passe oublié
|
%h2#gestionnaire_login Mot de passe oublié
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
#form-login
|
#form-login
|
||||||
%br
|
|
||||||
= image_tag(image_url(LOGO_NAME))
|
|
||||||
%br
|
|
||||||
%h2#gestionnaire_login Instructeur
|
%h2#gestionnaire_login Instructeur
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
%a#title-navbar{ href: root_path }
|
%a#title-navbar{ href: root_path }
|
||||||
.row#home
|
.row#home
|
||||||
.col-lg-6.no-padding
|
.col-lg-6.no-padding
|
||||||
= image_tag('marianne_small.png', class: 'logo')
|
= image_tag('marianne.svg', class: 'logo')
|
||||||
.col-lg-6.no-padding#tps-title
|
.col-lg-6.no-padding#tps-title
|
||||||
demarches-simplifiees.fr
|
demarches-simplifiees.fr
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
= devise_error_messages!
|
= devise_error_messages!
|
||||||
|
|
||||||
#form-login
|
#form-login
|
||||||
.flag
|
|
||||||
= image_tag(image_url(LOGO_NAME))
|
|
||||||
%br
|
|
||||||
%h2#gestionnaire_login Changement de mot de passe
|
%h2#gestionnaire_login Changement de mot de passe
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
%br
|
%br
|
||||||
#form-login
|
#form-login
|
||||||
.flag
|
|
||||||
= image_tag(image_url(LOGO_NAME))
|
|
||||||
%br
|
|
||||||
%h2#gestionnaire_login Mot de passe oublié
|
%h2#gestionnaire_login Mot de passe oublié
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|
|
@ -14,7 +14,3 @@
|
||||||
= @dossier.procedure.libelle
|
= @dossier.procedure.libelle
|
||||||
%p.procedure-description
|
%p.procedure-description
|
||||||
= h string_to_html(@dossier.procedure.description)
|
= h string_to_html(@dossier.procedure.description)
|
||||||
|
|
||||||
- else
|
|
||||||
#logo_procedure.flag
|
|
||||||
= image_tag(image_url(LOGO_NAME), { id: 'logo_tps' })
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
%p.lead#pro_section
|
%p.lead#pro_section
|
||||||
.flag
|
|
||||||
= image_tag(image_url(LOGO_NAME))
|
|
||||||
%br
|
|
||||||
%h2#titre-procedure.text-info
|
%h2#titre-procedure.text-info
|
||||||
= @procedure.libelle
|
= @procedure.libelle
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
LOGO_NAME = 'logos/logo-ds.png'
|
|
|
@ -113,6 +113,11 @@ fr:
|
||||||
format:
|
format:
|
||||||
delimiter: ''
|
delimiter: ''
|
||||||
activerecord:
|
activerecord:
|
||||||
|
attributes:
|
||||||
|
user:
|
||||||
|
password: 'Le mot de passe'
|
||||||
|
gestionnaire:
|
||||||
|
password: 'Le mot de passe'
|
||||||
errors:
|
errors:
|
||||||
messages:
|
messages:
|
||||||
blank: "doit être rempli"
|
blank: "doit être rempli"
|
||||||
|
@ -138,7 +143,7 @@ fr:
|
||||||
invalid: invalide
|
invalid: invalide
|
||||||
taken: déjà utilisé
|
taken: déjà utilisé
|
||||||
password:
|
password:
|
||||||
too_short: ': Le mot de passe est trop court'
|
too_short: 'est trop court'
|
||||||
password_confirmation:
|
password_confirmation:
|
||||||
confirmation: ': Les deux mots de passe ne correspondent pas'
|
confirmation: ': Les deux mots de passe ne correspondent pas'
|
||||||
invite:
|
invite:
|
||||||
|
@ -151,7 +156,7 @@ fr:
|
||||||
invalid: invalide
|
invalid: invalide
|
||||||
taken: déjà utilisé
|
taken: déjà utilisé
|
||||||
password:
|
password:
|
||||||
too_short: ': Le mot de passe est trop court'
|
too_short: 'est trop court'
|
||||||
|
|
||||||
errors:
|
errors:
|
||||||
messages:
|
messages:
|
||||||
|
|
|
@ -194,6 +194,7 @@ Rails.application.routes.draw do
|
||||||
member do
|
member do
|
||||||
post :hide
|
post :hide
|
||||||
delete :delete_deliberation
|
delete :delete_deliberation
|
||||||
|
delete :delete_notice
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :types_de_champ, only: [:destroy]
|
resources :types_de_champ, only: [:destroy]
|
||||||
|
@ -231,6 +232,9 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
post 'attestation_template/preview' => 'attestation_templates#preview'
|
post 'attestation_template/preview' => 'attestation_templates#preview'
|
||||||
patch 'attestation_template/preview' => 'attestation_templates#preview'
|
patch 'attestation_template/preview' => 'attestation_templates#preview'
|
||||||
|
|
||||||
|
delete 'attestation_template/logo' => 'attestation_templates#delete_logo'
|
||||||
|
delete 'attestation_template/signature' => 'attestation_templates#delete_signature'
|
||||||
end
|
end
|
||||||
|
|
||||||
namespace :instructeurs do
|
namespace :instructeurs do
|
||||||
|
|
|
@ -27,6 +27,6 @@ namespace :dev do
|
||||||
end
|
end
|
||||||
|
|
||||||
task :console do
|
task :console do
|
||||||
exec("ssh tps@sgmap_production1 -t 'source /etc/profile && cd current && bundle exec rails c production'")
|
exec("ssh tps@sgmap_production1 -t 'source /etc/profile && cd current && bundle exec rails c -e production'")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -276,7 +276,7 @@ describe NewGestionnaire::AvisController, type: :controller do
|
||||||
|
|
||||||
it { expect(created_gestionnaire).to be_nil }
|
it { expect(created_gestionnaire).to be_nil }
|
||||||
it { is_expected.to redirect_to sign_up_gestionnaire_avis_path(avis_id, invited_email) }
|
it { is_expected.to redirect_to sign_up_gestionnaire_avis_path(avis_id, invited_email) }
|
||||||
it { expect(flash.alert).to eq(['Password doit être rempli']) }
|
it { expect(flash.alert).to eq(['Le mot de passe doit être rempli']) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,7 +24,7 @@ describe ProcedureDecorator do
|
||||||
|
|
||||||
describe 'logo_img' do
|
describe 'logo_img' do
|
||||||
subject { super().logo_img }
|
subject { super().logo_img }
|
||||||
it { is_expected.to match(/http.*#{ActionController::Base.helpers.image_url(LOGO_NAME)}/) }
|
it { is_expected.to match(/http.*#{ActionController::Base.helpers.image_url("marianne.svg")}/) }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'geographic_information' do
|
describe 'geographic_information' do
|
||||||
|
|
Loading…
Reference in a new issue