commit
a75f1d7ae9
5 changed files with 66 additions and 25 deletions
|
@ -4,31 +4,15 @@
|
||||||
%tr
|
%tr
|
||||||
%td.cell-label Libelle
|
%td.cell-label Libelle
|
||||||
%td.cell-label Type de champ
|
%td.cell-label Type de champ
|
||||||
%td.cell-label Rempli
|
|
||||||
%td.cell-label Modifier le modèle
|
%td.cell-label Modifier le modèle
|
||||||
%tbody
|
%tbody
|
||||||
- field.data.order(:order_place).each do |f|
|
- field.data.order(:order_place).each do |type_de_champ|
|
||||||
%tr
|
= render partial: 'fields/types_de_champ_collection_field/type_champ_line',
|
||||||
%td.cell-data
|
locals: { type_de_champ: type_de_champ }
|
||||||
= f.libelle
|
|
||||||
- if f.mandatory?
|
|
||||||
%span.mandatory{ style: 'color: #A10005;' } *
|
|
||||||
%td.cell-data
|
|
||||||
= I18n.t("activerecord.attributes.type_de_champ.type_champs.#{f.type_champ}")
|
|
||||||
|
|
||||||
%td.cell-data
|
- if type_de_champ.type_champ == 'repetition'
|
||||||
- if f.blank?
|
- type_de_champ.types_de_champ.each do |sub_champ|
|
||||||
vide
|
= render partial: 'fields/types_de_champ_collection_field/type_champ_line',
|
||||||
- else
|
locals: { type_de_champ: sub_champ }
|
||||||
rempli
|
|
||||||
|
|
||||||
%td.cell-data
|
|
||||||
- if f.type_champ == 'piece_justificative'
|
|
||||||
= form_for f,
|
|
||||||
url: change_piece_justificative_template_manager_procedure_path,
|
|
||||||
method: :post do |form|
|
|
||||||
= form.hidden_field :id
|
|
||||||
= form.file_field :piece_justificative_template
|
|
||||||
= form.submit 'modifier'
|
|
||||||
- else
|
- else
|
||||||
Aucun
|
Aucun
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
%tr
|
||||||
|
%td.cell-data
|
||||||
|
= type_de_champ.libelle
|
||||||
|
- if type_de_champ.mandatory?
|
||||||
|
%span.mandatory{ style: 'color: #A10005;' } *
|
||||||
|
%td.cell-data
|
||||||
|
= I18n.t("activerecord.attributes.type_de_champ.type_champs.#{type_de_champ.type_champ}")
|
||||||
|
|
||||||
|
%td.cell-data
|
||||||
|
- if type_de_champ.type_champ == 'piece_justificative'
|
||||||
|
= form_for type_de_champ,
|
||||||
|
url: change_piece_justificative_template_manager_procedure_path,
|
||||||
|
method: :post do |form|
|
||||||
|
= form.hidden_field :id
|
||||||
|
= form.file_field :piece_justificative_template
|
||||||
|
= form.submit 'modifier'
|
|
@ -18,9 +18,9 @@
|
||||||
|
|
||||||
.contact-champ
|
.contact-champ
|
||||||
= label_tag :type do
|
= label_tag :type do
|
||||||
Votre problème
|
Votre question
|
||||||
%span.mandatory *
|
%span.mandatory *
|
||||||
= select_tag :type, options_for_select(@options, params[:type]), include_blank: "Choisir un problème", required: true
|
= select_tag :type, options_for_select(@options, params[:type]), include_blank: "Choisir une question", required: true
|
||||||
|
|
||||||
.support.card.featured.hidden{ data: { 'contact-type-only': Helpscout::FormAdapter::TYPE_INFO } }
|
.support.card.featured.hidden{ data: { 'contact-type-only': Helpscout::FormAdapter::TYPE_INFO } }
|
||||||
.card-title
|
.card-title
|
||||||
|
@ -53,6 +53,24 @@
|
||||||
%br
|
%br
|
||||||
%p Si vous souhaitez poser une question pour un problème technique sur le site, utilisez le formulaire ci-dessous. Nous ne pourrons pas vous renseigner sur l'instruction de votre dossier.
|
%p Si vous souhaitez poser une question pour un problème technique sur le site, utilisez le formulaire ci-dessous. Nous ne pourrons pas vous renseigner sur l'instruction de votre dossier.
|
||||||
|
|
||||||
|
.support.card.featured.hidden{ data: { 'contact-type-only': Helpscout::FormAdapter::TYPE_AMELIORATION } }
|
||||||
|
.card-title
|
||||||
|
👉 Notre réponse
|
||||||
|
%p
|
||||||
|
Une idée ? Pensez à consulter notre
|
||||||
|
= succeed ' !' do
|
||||||
|
%strong
|
||||||
|
tableau de bord des améliorations
|
||||||
|
%p
|
||||||
|
%ul
|
||||||
|
%li • Votez pour vos améliorations prioritaires ;
|
||||||
|
%li • Proposez votre propre idée.
|
||||||
|
|
||||||
|
%p
|
||||||
|
%strong
|
||||||
|
%a{ href: 'https://demarches-simplifiees.featureupvote.com' }
|
||||||
|
➡ Accéder au tableau des améliorations
|
||||||
|
|
||||||
.contact-champ
|
.contact-champ
|
||||||
= label_tag :dossier_id, 'Numéro du dossier concerné'
|
= label_tag :dossier_id, 'Numéro du dossier concerné'
|
||||||
= text_field_tag :dossier_id, @dossier_id
|
= text_field_tag :dossier_id, @dossier_id
|
||||||
|
|
|
@ -11,4 +11,18 @@ describe Manager::ProceduresController, type: :controller do
|
||||||
|
|
||||||
it { expect(procedure.whitelisted_at).not_to be_nil }
|
it { expect(procedure.whitelisted_at).not_to be_nil }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#show' do
|
||||||
|
render_views
|
||||||
|
|
||||||
|
let(:administration) { create(:administration) }
|
||||||
|
let!(:procedure) { create(:procedure, :with_repetition) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
sign_in(administration)
|
||||||
|
get :show, params: { id: procedure.id }
|
||||||
|
end
|
||||||
|
|
||||||
|
it { expect(response.body).to include('sub type de champ') }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -153,6 +153,15 @@ FactoryBot.define do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
trait :with_repetition do
|
||||||
|
after(:build) do |procedure, _evaluator|
|
||||||
|
type_de_champ = create(:type_de_champ_repetition)
|
||||||
|
procedure.types_de_champ << type_de_champ
|
||||||
|
|
||||||
|
type_de_champ.types_de_champ << create(:type_de_champ, libelle: 'sub type de champ')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
trait :published do
|
trait :published do
|
||||||
after(:build) do |procedure, _evaluator|
|
after(:build) do |procedure, _evaluator|
|
||||||
procedure.path = generate(:published_path)
|
procedure.path = generate(:published_path)
|
||||||
|
|
Loading…
Reference in a new issue