Skip to content

Commit

Permalink
Merge branch 'develop' into corrige-init-questionnaire-numeratie
Browse files Browse the repository at this point in the history
  • Loading branch information
etienneCharignon authored Oct 7, 2024
2 parents 1969845 + b00271f commit 586a914
Show file tree
Hide file tree
Showing 249 changed files with 1,468 additions and 1,166 deletions.
7 changes: 6 additions & 1 deletion app/admin/annonce_generales.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@
permit_params :texte, :afficher

index do
column :texte
column :texte do |ag|
link_to ag.texte, admin_annonce_generale_path(ag)
end
column :afficher
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end
end
9 changes: 7 additions & 2 deletions app/admin/beneficiaire.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@
render partial: 'show'
end

index row_class: ->(elem) { 'anonyme' if elem.anonyme? } do
column(:nom) { |beneficiaire| render NomAnonymisableComponent.new(beneficiaire) }
index do
column :nom do |beneficiaire|
render partial: 'nom_beneficiaire', locals: { beneficiaire: beneficiaire }
end
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end
end
7 changes: 6 additions & 1 deletion app/admin/campagnes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
end

index do
column :libelle
column :libelle do |campagne|
link_to campagne.libelle, admin_campagne_path(campagne)
end
column :code
column :nombre_evaluations, class: 'col-nombre_evaluations text-right',
sortable: :nombre_evaluations
Expand All @@ -39,6 +41,9 @@
column :compte if can?(:manage, Compte)
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

show do
Expand Down
7 changes: 6 additions & 1 deletion app/admin/comptes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def filtrer_par_activation_structure(statut_activation, options = {})
filtrer_par_activation_structure(:abandonnistes)

index do
column :prenom
column :prenom do |compte|
link_to compte.prenom, admin_compte_path(compte)
end
column :nom
column :email
column :telephone
Expand All @@ -78,6 +80,9 @@ def filtrer_par_activation_structure(statut_activation, options = {})
column :created_at
end
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

action_item :stats, only: :index, if: -> { can? :manage, Compte } do
Expand Down
7 changes: 6 additions & 1 deletion app/admin/parcours_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@
form partial: 'form'

index do
column :libelle
column :libelle do |pt|
link_to pt.libelle, admin_parcours_type_path(pt)
end
column :nom_technique
column :duree_moyenne
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

show do
Expand Down
7 changes: 6 additions & 1 deletion app/admin/questionnaires.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@
end

index do
column :libelle
column :libelle do |q|
link_to q.libelle, admin_questionnaire_path(q)
end
column :nom_technique
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

show do
Expand Down
7 changes: 6 additions & 1 deletion app/admin/questions_clic_dans_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@
form partial: 'form'

index do
column :libelle
column :libelle do |q|
link_to q.libelle, admin_question_clic_dans_image_path(q)
end
column :intitule do |question|
question.transcription_intitule&.ecrit
end
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

show do
Expand Down
7 changes: 6 additions & 1 deletion app/admin/questions_frequentes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
filter :created_at

index do
column :question
column :question do |q|
link_to q.question, admin_aide_question_frequente_path(q)
end
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end
end
9 changes: 7 additions & 2 deletions app/admin/questions_glisser_deposer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

permit_params :libelle, :nom_technique, :description, :illustration, :supprimer_illustration,
:supprimer_audio_modalite_reponse, :supprimer_audio_intitule,
:zone_depot_url, :supprimer_zone_depot_url,
:supprimer_zone_depot, :zone_depot,
transcriptions_attributes: %i[id categorie ecrit audio _destroy],
reponses_attributes: %i[id illustration position type_choix position_client
nom_technique _destroy]
Expand All @@ -18,12 +18,17 @@
form partial: 'form'

index do
column :libelle
column :libelle do |q|
link_to q.libelle, admin_question_glisser_deposer_path(q)
end
column :intitule do |question|
question.transcription_intitule&.ecrit
end
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

show do
Expand Down
7 changes: 6 additions & 1 deletion app/admin/questions_qcm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
form partial: 'form'

index do
column :libelle
column :libelle do |q|
link_to q.libelle, admin_question_qcm_path(q)
end
column :categorie
column :intitule do |question|
question.transcription_intitule&.ecrit
Expand All @@ -27,6 +29,9 @@
column :type_qcm
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

show do
Expand Down
7 changes: 6 additions & 1 deletion app/admin/questions_saisie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@
form partial: 'form'

index do
column :libelle
column :libelle do |q|
link_to q.libelle, admin_question_saisie_path(q)
end
column :categorie
column :intitule do |question|
question.transcription_intitule&.ecrit
end
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

show do
Expand Down
20 changes: 16 additions & 4 deletions app/admin/questions_sous_consigne.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
ActiveAdmin.register QuestionSousConsigne do
menu parent: 'Parcours', if: proc { current_compte.superadmin? }

permit_params :libelle, :nom_technique,
permit_params :libelle, :nom_technique, :illustration, :supprimer_illustration,
:supprimer_audio_intitule,
transcriptions_attributes: %i[id categorie ecrit audio _destroy]

filter :libelle
Expand All @@ -14,10 +15,16 @@
f.inputs do
f.input :libelle
f.input :nom_technique
render partial: 'admin/questions/input_illustration', locals: { f: f }

f.object.transcriptions.build(categorie: :intitule) if f.object.transcription_intitule.nil?

f.has_many :transcriptions, allow_destroy: false, new_record: false, heading: false do |t|
t.input :ecrit, label: t('.label.intitule')
render partial: 'admin/transcriptions/input_ecrit_audio',
locals: { f: f, transcription_categorie: :intitule }

if f.object.transcription_intitule&.audio&.attached?
f.input :supprimer_audio_intitule, as: :boolean,
hint: tag_audio(f.object.transcription_intitule)
end
end
f.actions do
Expand All @@ -27,12 +34,17 @@
end

index do
column :libelle
column :libelle do |q|
link_to q.libelle, admin_question_sous_consigne_path(q)
end
column :intitule do |question|
question.transcription_intitule&.ecrit
end
column :created_at
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

show do
Expand Down
6 changes: 5 additions & 1 deletion app/admin/situations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

index do
column :illustration do |situation|
situation_illustration(situation)
illustration = situation_illustration(situation)
link_to illustration, admin_situation_path(situation) if illustration.present?
end
column :libelle
column :nom_technique
Expand All @@ -35,6 +36,9 @@
actions do |situation|
link_to 'Parties', admin_situation_parties_path(situation) if can?(:manage, Partie)
end
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

show do
Expand Down
9 changes: 7 additions & 2 deletions app/admin/source_aides.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@
config.filters = false

index do
column :titre do |sa|
link_to sa.titre, admin_source_aide_path(sa)
end
column(:categorie) do |a|
render(Tag.new(t(a.categorie, scope: 'activerecord.attributes.source_aide.categories'),
classes: 'tag-categorie'))
classes: 'tag-categorie source-aide'))
end
column :position
column :titre
column :description
column :url do |a|
link_to a.url, a.url, target: '_blank', rel: 'noopener'
end
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end
end
7 changes: 6 additions & 1 deletion app/admin/structures_administratives.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@
filter :created_at

index do
column :nom
column :nom do |sa|
link_to sa.nom, admin_structure_administrative_path(sa)
end
column :created_at do |structure|
l(structure.created_at, format: :sans_heure)
end
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

show do
Expand Down
7 changes: 6 additions & 1 deletion app/admin/structures_locales.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
sidebar :aide_filtres, only: :index, if: -> { params[:stats] }

index do
column :nom
column :nom do |sl|
link_to sl.nom, admin_structure_locale_path(sl)
end
column(:type_structure) do |structure|
traduction_type_structure(structure.type_structure)
end
Expand All @@ -46,6 +48,9 @@
column :nombre_evaluations, sortable: :nombre_evaluations
column :date_derniere_evaluation, sortable: :date_derniere_evaluation
actions
column '', class: 'bouton-action' do
render partial: 'components/bouton_menu_actions'
end
end

csv do
Expand Down
2 changes: 1 addition & 1 deletion app/assets/images/aide-redaction.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/images/attention_concentration.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions app/assets/images/attention_icone.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 586a914

Please sign in to comment.