Merge pull request #6270 from betagouv/small_ui_changes
corrige de légers problèmes graphique au niveau de l'interface administrateur / instructeur
This commit is contained in:
commit
5cde8d85c4
8 changed files with 67 additions and 67 deletions
|
@ -2,6 +2,7 @@
|
||||||
@import "constants";
|
@import "constants";
|
||||||
|
|
||||||
.card-admin {
|
.card-admin {
|
||||||
|
color: $black;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
width: 236px;
|
width: 236px;
|
||||||
|
@ -35,6 +36,18 @@
|
||||||
.card-admin-action {
|
.card-admin-action {
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
margin: auto auto 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $blue;
|
||||||
|
|
||||||
|
.button {
|
||||||
|
color: $blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 600px) {
|
@media only screen and (max-width: 600px) {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
th {
|
th {
|
||||||
vertical-align: middle;
|
vertical-align: top;
|
||||||
padding: (2 * $default-spacer) $default-spacer;
|
padding: (2 * $default-spacer) $default-spacer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,8 @@ module ProcedureHelper
|
||||||
typeDeChampsTypes: TypeDeChamp.type_de_champ_types_for(procedure, current_user),
|
typeDeChampsTypes: TypeDeChamp.type_de_champ_types_for(procedure, current_user),
|
||||||
typeDeChamps: (procedure.draft_revision ? procedure.draft_revision : procedure).types_de_champ.as_json_for_editor,
|
typeDeChamps: (procedure.draft_revision ? procedure.draft_revision : procedure).types_de_champ.as_json_for_editor,
|
||||||
baseUrl: admin_procedure_types_de_champ_path(procedure),
|
baseUrl: admin_procedure_types_de_champ_path(procedure),
|
||||||
directUploadUrl: rails_direct_uploads_url
|
directUploadUrl: rails_direct_uploads_url,
|
||||||
|
continuerUrl: admin_procedure_path(procedure)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -40,7 +41,8 @@ module ProcedureHelper
|
||||||
typeDeChampsTypes: TypeDeChamp.type_de_champ_types_for(procedure, current_user),
|
typeDeChampsTypes: TypeDeChamp.type_de_champ_types_for(procedure, current_user),
|
||||||
typeDeChamps: (procedure.draft_revision ? procedure.draft_revision : procedure).types_de_champ_private.as_json_for_editor,
|
typeDeChamps: (procedure.draft_revision ? procedure.draft_revision : procedure).types_de_champ_private.as_json_for_editor,
|
||||||
baseUrl: admin_procedure_types_de_champ_path(procedure),
|
baseUrl: admin_procedure_types_de_champ_path(procedure),
|
||||||
directUploadUrl: rails_direct_uploads_url
|
directUploadUrl: rails_direct_uploads_url,
|
||||||
|
continuerUrl: admin_procedure_path(procedure)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -60,12 +60,9 @@ function TypeDeChamps({ state: rootState, typeDeChamps }) {
|
||||||
|
|
||||||
{addChampLabel(state.isAnnotation)}
|
{addChampLabel(state.isAnnotation)}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<a className="button accepted" href={state.continuerUrl}>
|
||||||
className="button primary"
|
Continuer >
|
||||||
onClick={() => state.flash.success()}
|
</a>
|
||||||
>
|
|
||||||
Enregistrer
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -22,7 +22,8 @@ class TypesDeChampEditor extends Component {
|
||||||
defaultTypeDeChampAttributes,
|
defaultTypeDeChampAttributes,
|
||||||
typeDeChampsTypes: props.typeDeChampsTypes,
|
typeDeChampsTypes: props.typeDeChampsTypes,
|
||||||
directUploadUrl: props.directUploadUrl,
|
directUploadUrl: props.directUploadUrl,
|
||||||
isAnnotation: props.isAnnotation
|
isAnnotation: props.isAnnotation,
|
||||||
|
continuerUrl: props.continuerUrl
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +36,7 @@ class TypesDeChampEditor extends Component {
|
||||||
|
|
||||||
TypesDeChampEditor.propTypes = {
|
TypesDeChampEditor.propTypes = {
|
||||||
baseUrl: PropTypes.string,
|
baseUrl: PropTypes.string,
|
||||||
|
continuerUrl: PropTypes.string,
|
||||||
directUploadUrl: PropTypes.string,
|
directUploadUrl: PropTypes.string,
|
||||||
isAnnotation: PropTypes.bool,
|
isAnnotation: PropTypes.bool,
|
||||||
typeDeChamps: PropTypes.array,
|
typeDeChamps: PropTypes.array,
|
||||||
|
|
|
@ -4,8 +4,9 @@
|
||||||
- steps.each do |step|
|
- steps.each do |step|
|
||||||
%li= step
|
%li= step
|
||||||
- if defined?(preview) && preview
|
- if defined?(preview) && preview
|
||||||
= link_to "Prévisualiser le formulaire", apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'button'
|
.mb-2
|
||||||
= link_to "Continuer >", admin_procedure_path(@procedure), title: 'Vous pourrez revenir ici par la suite', class: 'button accepted'
|
= link_to "Prévisualiser le formulaire", apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'button'
|
||||||
|
= link_to "Continuer >", admin_procedure_path(@procedure), title: 'Vous pourrez revenir ici par la suite', class: 'button accepted'
|
||||||
- if defined?(metadatas)
|
- if defined?(metadatas)
|
||||||
%ul.admin-metadata
|
%ul.admin-metadata
|
||||||
- metadatas.each do |metadata|
|
- metadatas.each do |metadata|
|
||||||
|
|
|
@ -32,18 +32,17 @@
|
||||||
.container
|
.container
|
||||||
%h2.procedure-admin-explanation Indispensable avant publication
|
%h2.procedure-admin-explanation Indispensable avant publication
|
||||||
.procedure-grid
|
.procedure-grid
|
||||||
.card-admin
|
= link_to edit_admin_procedure_path(@procedure), id: 'presentation', class: 'card-admin' do
|
||||||
%div
|
%div
|
||||||
%span.icon.accept
|
%span.icon.accept
|
||||||
%p.card-admin-status-accept Validé
|
%p.card-admin-status-accept Validé
|
||||||
%div
|
%div
|
||||||
%p.card-admin-title Présentation
|
%p.card-admin-title Présentation
|
||||||
%p.card-admin-subtitle Logo, nom, description
|
%p.card-admin-subtitle Logo, nom, description
|
||||||
.card-admin-action
|
%p.button Modifier
|
||||||
= link_to 'Modifier', edit_admin_procedure_path(@procedure), class: 'button', id: "presentation"
|
|
||||||
|
|
||||||
- if !@procedure.locked?
|
- if !@procedure.locked?
|
||||||
.card-admin
|
= link_to champs_admin_procedure_path(@procedure), class: 'card-admin' do
|
||||||
- if @procedure.draft_types_de_champ.count > 0
|
- if @procedure.draft_types_de_champ.count > 0
|
||||||
%div
|
%div
|
||||||
%span.icon.accept
|
%span.icon.accept
|
||||||
|
@ -57,10 +56,19 @@
|
||||||
%span.badge.baseline= @procedure.draft_types_de_champ.count
|
%span.badge.baseline= @procedure.draft_types_de_champ.count
|
||||||
Champs du formulaire
|
Champs du formulaire
|
||||||
%p.card-admin-subtitle À remplir par les usagers
|
%p.card-admin-subtitle À remplir par les usagers
|
||||||
.card-admin-action
|
%p.button Modifier
|
||||||
= link_to 'Modifier', champs_admin_procedure_path(@procedure), class: 'button'
|
|
||||||
|
|
||||||
.card-admin
|
- if @procedure.service.present?
|
||||||
|
- service_link = edit_admin_service_path(@procedure.service, procedure_id: @procedure.id)
|
||||||
|
- service_button_text = 'Modifier'
|
||||||
|
- elsif current_administrateur.services.present?
|
||||||
|
- service_link = admin_services_path(procedure_id: @procedure.id)
|
||||||
|
- service_button_text = 'Choisir'
|
||||||
|
- else
|
||||||
|
- service_link = new_admin_service_path(procedure_id: @procedure.id)
|
||||||
|
- service_button_text = 'Remplir'
|
||||||
|
|
||||||
|
= link_to service_link, class: 'card-admin' do
|
||||||
- if @procedure.service_id.present?
|
- if @procedure.service_id.present?
|
||||||
%div
|
%div
|
||||||
%span.icon.accept
|
%span.icon.accept
|
||||||
|
@ -76,15 +84,9 @@
|
||||||
= @procedure.service.nom
|
= @procedure.service.nom
|
||||||
- else
|
- else
|
||||||
Choix du service administratif
|
Choix du service administratif
|
||||||
.card-admin-action
|
%p.button= service_button_text
|
||||||
- if @procedure.service.present?
|
|
||||||
= link_to 'Modifier', edit_admin_service_path(@procedure.service, procedure_id: @procedure.id), class: 'button'
|
|
||||||
- elsif current_administrateur.services.present?
|
|
||||||
= link_to 'Choisir', admin_services_path(procedure_id: @procedure.id), class: 'button'
|
|
||||||
- else
|
|
||||||
= link_to 'Remplir', new_admin_service_path(procedure_id: @procedure.id), class: 'button'
|
|
||||||
|
|
||||||
.card-admin
|
= link_to admin_procedure_administrateurs_path(@procedure), id: 'administrateurs', class: 'card-admin' do
|
||||||
%div
|
%div
|
||||||
%span.icon.accept
|
%span.icon.accept
|
||||||
%p.card-admin-status-accept Validé
|
%p.card-admin-status-accept Validé
|
||||||
|
@ -92,17 +94,17 @@
|
||||||
%p.card-admin-title
|
%p.card-admin-title
|
||||||
%span.badge.baseline= @procedure.administrateurs.count
|
%span.badge.baseline= @procedure.administrateurs.count
|
||||||
#{"Administrateur".pluralize(@procedure.administrateurs.count)}
|
#{"Administrateur".pluralize(@procedure.administrateurs.count)}
|
||||||
|
|
||||||
%p.card-admin-subtitle Gestion de la démarche
|
%p.card-admin-subtitle Gestion de la démarche
|
||||||
.card-admin-action
|
%p.button Modifier
|
||||||
= link_to 'Modifier', admin_procedure_administrateurs_path(@procedure), class: 'button', id: "administrateurs"
|
|
||||||
|
|
||||||
.card-admin
|
|
||||||
- if feature_enabled?(:administrateur_routage)
|
- if feature_enabled?(:administrateur_routage)
|
||||||
%div
|
- instructeur_link = admin_procedure_groupe_instructeurs_path(@procedure)
|
||||||
%span.icon.accept
|
- else
|
||||||
%p.card-admin-status-accept Validé
|
- instructeur_link = admin_procedure_groupe_instructeur_path(@procedure, @procedure.defaut_groupe_instructeur)
|
||||||
- elsif @procedure.instructeurs.count > 1
|
|
||||||
|
= link_to instructeur_link, id: 'groupe-instructeurs', class: 'card-admin' do
|
||||||
|
- if feature_enabled?(:administrateur_routage) || @procedure.instructeurs.count > 1
|
||||||
%div
|
%div
|
||||||
%span.icon.accept
|
%span.icon.accept
|
||||||
%p.card-admin-status-accept Validé
|
%p.card-admin-status-accept Validé
|
||||||
|
@ -119,15 +121,12 @@
|
||||||
|
|
||||||
= feature_enabled?(:administrateur_routage) ? "Groupe Instructeurs" : "#{"Instructeur".pluralize(@procedure.instructeurs.count)}"
|
= feature_enabled?(:administrateur_routage) ? "Groupe Instructeurs" : "#{"Instructeur".pluralize(@procedure.instructeurs.count)}"
|
||||||
%p.card-admin-subtitle Suivi des dossiers
|
%p.card-admin-subtitle Suivi des dossiers
|
||||||
.card-admin-action
|
%p.button Modifier
|
||||||
- if feature_enabled?(:administrateur_routage)
|
|
||||||
= link_to 'Modifier', admin_procedure_groupe_instructeurs_path(@procedure), class: 'button', id: "groupe-instructeurs"
|
|
||||||
- else
|
|
||||||
= link_to 'Modifier', admin_procedure_groupe_instructeur_path(@procedure, @procedure.defaut_groupe_instructeur), class: 'button', id: "instructeurs"
|
|
||||||
|
|
||||||
%h2.procedure-admin-explanation Pour aller plus loin
|
%h2.procedure-admin-explanation Pour aller plus loin
|
||||||
.procedure-grid
|
.procedure-grid
|
||||||
.card-admin
|
|
||||||
|
= link_to edit_admin_procedure_attestation_template_path(@procedure), class: 'card-admin' do
|
||||||
- if @procedure.attestation_template.present? && @procedure.attestation_template.activated
|
- if @procedure.attestation_template.present? && @procedure.attestation_template.activated
|
||||||
%div
|
%div
|
||||||
%span.icon.accept
|
%span.icon.accept
|
||||||
|
@ -139,34 +138,29 @@
|
||||||
%div
|
%div
|
||||||
%p.card-admin-title Attestation
|
%p.card-admin-title Attestation
|
||||||
%p.card-admin-subtitle Délivrance automatique pour les dossiers acceptés
|
%p.card-admin-subtitle Délivrance automatique pour les dossiers acceptés
|
||||||
.card-admin-action
|
%p.button Modifier
|
||||||
= link_to 'Modifier', edit_admin_procedure_attestation_template_path(@procedure), class: 'button'
|
|
||||||
|
|
||||||
.card-admin
|
= link_to admin_procedure_experts_path(@procedure), class: 'card-admin' do
|
||||||
%div
|
%div
|
||||||
%span.icon.preview
|
%span.icon.preview
|
||||||
%p.card-admin-status-todo À configurer
|
%p.card-admin-status-todo À configurer
|
||||||
|
|
||||||
%div
|
%div
|
||||||
%p.card-admin-title Avis externes
|
%p.card-admin-title Avis externes
|
||||||
%p.card-admin-subtitle Gérer les avis des experts invités
|
%p.card-admin-subtitle Gérer les avis des experts invités
|
||||||
|
%p.button Modifier
|
||||||
.card-admin-action
|
|
||||||
= link_to "Modifier", admin_procedure_experts_path(@procedure), class: 'button'
|
|
||||||
|
|
||||||
|
|
||||||
.card-admin
|
= link_to admin_procedure_mail_templates_path(@procedure), class: 'card-admin' do
|
||||||
%div
|
%div
|
||||||
%span.icon.clock
|
%span.icon.clock
|
||||||
%p.card-admin-status-todo À configurer
|
%p.card-admin-status-todo À configurer
|
||||||
%div
|
%div
|
||||||
%p.card-admin-title Configuration des emails
|
%p.card-admin-title Configuration des emails
|
||||||
%p.card-admin-subtitle Notifications automatiques
|
%p.card-admin-subtitle Notifications automatiques
|
||||||
.card-admin-action
|
%p.button Modifier
|
||||||
= link_to 'Modifier', admin_procedure_mail_templates_path(@procedure), class: 'button'
|
|
||||||
|
|
||||||
- if !@procedure.locked?
|
- if !@procedure.locked?
|
||||||
.card-admin
|
= link_to annotations_admin_procedure_path(@procedure), class: 'card-admin' do
|
||||||
- if @procedure.draft_types_de_champ_private.present?
|
- if @procedure.draft_types_de_champ_private.present?
|
||||||
%div
|
%div
|
||||||
%span.icon.accept
|
%span.icon.accept
|
||||||
|
@ -178,10 +172,9 @@
|
||||||
%div
|
%div
|
||||||
%p.card-admin-title Annotations privées
|
%p.card-admin-title Annotations privées
|
||||||
%p.card-admin-subtitle Champs à remplir par l’administration
|
%p.card-admin-subtitle Champs à remplir par l’administration
|
||||||
.card-admin-action
|
%p.button Modifier
|
||||||
= link_to 'Modifier', annotations_admin_procedure_path(@procedure), class: 'button'
|
|
||||||
|
|
||||||
.card-admin
|
= link_to jeton_admin_procedure_path(@procedure), class: 'card-admin' do
|
||||||
- if @procedure.api_entreprise_token.present?
|
- if @procedure.api_entreprise_token.present?
|
||||||
%div
|
%div
|
||||||
%span.icon.accept
|
%span.icon.accept
|
||||||
|
@ -193,10 +186,9 @@
|
||||||
%div
|
%div
|
||||||
%p.card-admin-title Jeton
|
%p.card-admin-title Jeton
|
||||||
%p.card-admin-subtitle Configurer le jeton API entreprise
|
%p.card-admin-subtitle Configurer le jeton API entreprise
|
||||||
.card-admin-action
|
%p.button Modifier
|
||||||
= link_to 'Modifier', jeton_admin_procedure_path(@procedure), class: 'button'
|
|
||||||
|
|
||||||
.card-admin
|
= link_to monavis_admin_procedure_path(@procedure), class: 'card-admin' do
|
||||||
- if @procedure.monavis_embed.present?
|
- if @procedure.monavis_embed.present?
|
||||||
%div
|
%div
|
||||||
%span.icon.accept
|
%span.icon.accept
|
||||||
|
@ -208,5 +200,4 @@
|
||||||
%div
|
%div
|
||||||
%p.card-admin-title MonAvis
|
%p.card-admin-title MonAvis
|
||||||
%p.card-admin-subtitle Avis des usagers sur votre démarche
|
%p.card-admin-subtitle Avis des usagers sur votre démarche
|
||||||
.card-admin-action
|
%p.button Modifier
|
||||||
= link_to 'Modifier', monavis_admin_procedure_path(@procedure), class: 'button'
|
|
||||||
|
|
|
@ -13,12 +13,6 @@ feature 'As an administrateur I can edit types de champ', js: true do
|
||||||
fill_in 'champ-0-libelle', with: 'libellé de champ'
|
fill_in 'champ-0-libelle', with: 'libellé de champ'
|
||||||
blur
|
blur
|
||||||
expect(page).to have_content('Formulaire enregistré')
|
expect(page).to have_content('Formulaire enregistré')
|
||||||
|
|
||||||
page.refresh
|
|
||||||
within '.buttons' do
|
|
||||||
click_on 'Enregistrer'
|
|
||||||
end
|
|
||||||
expect(page).to have_content('Formulaire enregistré')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it "Add multiple champs" do
|
it "Add multiple champs" do
|
||||||
|
|
Loading…
Reference in a new issue