fixup! Merge pull request #5400 from betagouv/add-test-for-zip-download

This commit is contained in:
kara Diaby 2020-07-27 16:06:34 +02:00
parent 347dbe4c87
commit dddecc6872
2 changed files with 87 additions and 0 deletions

View file

@ -0,0 +1,68 @@
- procedures.each do |procedure|
.card
.card-flex
%div{style: "display: flex;"}
- if procedure.logo.present?
= image_tag procedure.logo, alt: '', height: '', width: '100', class: ''
.card-title= procedure.libelle
%div
%p.notice N° #{procedure.id}
%p.notice créée le #{procedure.created_at.strftime('%d/%m/%Y')}
- if procedure.published_at.present?
%p.notice publiée le #{procedure.published_at.strftime('%d/%m/%Y')}
- if procedure.closed_at.present?
%p.notice archivée le #{procedure.closed_at.strftime('%d/%m/%Y')}
.card-flex
%div
- if feature_enabled?(:administrateur_routage)
%span.icon.person
%span.badge.baseline #{procedure.groupe_instructeurs.count}
- else
%span.icon.person
%span.badge.baseline #{procedure.instructeurs.count}
%span.icon.folder
%span.badge.baseline #{procedure.dossiers.count}
%div
= link_to admin_procedure_path(procedure), class: 'button' do
%span.icon.edit
Modifier
.dropdown
.button.dropdown-button
Actions
.dropdown-content.fade-in-down
%ul.dropdown-items{style: "padding-left: 0"}
- if !procedure.close?
%li
= link_to sanitize_url(procedure.brouillon? ? commencer_test_url(path: procedure.path) : commencer_url(path: procedure.path)), target: :blank, rel: :noopener do
%span.icon.in-progress
.dropdown-description
%h4 Tester
%li
=link_to admin_procedure_clone_path(procedure.id), data: { method: :put } do
%span.icon.new-folder
.dropdown-description
%h4 Cloner
- if procedure.publiee?
%li
=link_to admin_procedure_archive_path(procedure_id: procedure.id), method: :put, data: { confirm: "Voulez-vous vraiment clore la démarche ? \nLes dossiers en cours pourront être instruits, mais aucun nouveau dossier ne pourra plus être déposé.", disable_with: "Archivage..."} do
%span.icon.archive
.dropdown-description
%h4 Clore
- if procedure.brouillon?
%li
=link_to admin_procedure_path(procedure), method: :delete, data: { confirm: "Voulez-vous vraiment supprimer la démarche ? \nToute suppression est définitive et s'appliquera aux éventuels autres administrateurs de cette démarche !" } do
%span.icon.refuse
.dropdown-description
%h4 Supprimer
- else
%li
=link_to admin_procedure_publication_path(procedure) do
%span.icon.unarchive
.dropdown-description
%h4 Réactiver

View file

@ -0,0 +1,19 @@
.sub-header
.container.procedure-admin-listing-container
%ul.tabs
= tab_item(t('pluralize.published', count: @procedures_publiees.count), admin_procedures_path(statut: 'publiees'), active: @statut == 'publiees', badge: number_with_html_delimiter(@procedures_publiees.count))
= tab_item('En test', admin_procedures_path(statut: 'brouillons'), active: @statut == 'brouillons', badge: number_with_html_delimiter(@procedures_draft.count))
= tab_item(t('pluralize.procedure_archived', count: @procedures_closed.count), admin_procedures_path(statut: 'archivees'), active: @statut == 'archivees', badge: number_with_html_delimiter(@procedures_closed.count))
%div
=link_to "Nouvelle Démarche", new_admin_procedure_path, class: 'button primary'
.container
- if @statut === "publiees"
= render partial: "procedures_list", locals: { procedures: @procedures_publiees }
- if @statut === "brouillons"
= render partial: "procedures_list", locals: { procedures: @procedures_draft }
- if @statut === "archivees"
= render partial: "procedures_list", locals: { procedures: @procedures_closed }