Merge pull request #6179 from betagouv/main

2021-05-06-01
This commit is contained in:
Pierre de La Morinerie 2021-05-06 11:40:02 +02:00 committed by GitHub
commit 752401a18a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 53 additions and 31 deletions

View file

@ -5,7 +5,7 @@ gem 'active_link_to' # Automatically set a class on active links
gem 'active_model_serializers' gem 'active_model_serializers'
gem 'activestorage-openstack' gem 'activestorage-openstack'
gem 'active_storage_validations' gem 'active_storage_validations'
gem 'administrate' gem 'administrate', git: 'https://github.com/thoughtbot/administrate.git', ref: 'refs/pull/1972/head' # Provides an administration UI (pull request #1972 has fixes for Rails 6.1.3.2)
gem 'after_party' gem 'after_party'
gem 'anchored' gem 'anchored'
gem 'bcrypt' gem 'bcrypt'

View file

@ -6,6 +6,22 @@ GIT
open4 (~> 1.3.4) open4 (~> 1.3.4)
rake rake
GIT
remote: https://github.com/thoughtbot/administrate.git
revision: 27404f6bbbfa8ae7227ff205ac8cc4ad194194dd
ref: refs/pull/1972/head
specs:
administrate (0.15.0)
actionpack (>= 5.0)
actionview (>= 5.0)
activerecord (>= 5.0)
datetime_picker_rails (~> 0.0.7)
jquery-rails (>= 4.0)
kaminari (>= 1.0)
momentjs-rails (~> 2.8)
sassc-rails (~> 2.1)
selectize-rails (~> 0.6)
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
@ -86,17 +102,6 @@ GEM
zeitwerk (~> 2.3) zeitwerk (~> 2.3)
addressable (2.7.0) addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
administrate (0.14.0)
actionpack (>= 4.2)
actionview (>= 4.2)
activerecord (>= 4.2)
autoprefixer-rails (>= 6.0)
datetime_picker_rails (~> 0.0.7)
jquery-rails (>= 4.0)
kaminari (>= 1.0)
momentjs-rails (~> 2.8)
sassc-rails (~> 2.1)
selectize-rails (~> 0.6)
aes_key_wrap (1.1.0) aes_key_wrap (1.1.0)
after_party (1.11.2) after_party (1.11.2)
anchored (1.1.0) anchored (1.1.0)
@ -107,8 +112,6 @@ GEM
attr_encrypted (3.1.0) attr_encrypted (3.1.0)
encryptor (~> 3.0.0) encryptor (~> 3.0.0)
attr_required (1.0.1) attr_required (1.0.1)
autoprefixer-rails (10.2.4.0)
execjs
axe-matchers (2.6.1) axe-matchers (2.6.1)
dumb_delegator (~> 0.8) dumb_delegator (~> 0.8)
virtus (~> 1.0) virtus (~> 1.0)
@ -772,7 +775,7 @@ DEPENDENCIES
active_model_serializers active_model_serializers
active_storage_validations active_storage_validations
activestorage-openstack activestorage-openstack
administrate administrate!
after_party after_party
anchored anchored
annotate annotate

View file

@ -46,8 +46,6 @@
} }
.notification-col { .notification-col {
width: 45px;
a { a {
font-size: 16px; font-size: 16px;
} }

View file

@ -101,4 +101,10 @@ module DossierHelper
end end
end end
end end
def annuaire_link(siren)
base_url = "https://annuaire-entreprises.data.gouv.fr"
return base_url if siren.blank?
"#{base_url}/entreprise/#{siren}"
end
end end

View file

@ -1,8 +1,9 @@
%th{ class: classname } %th{ class: classname }
= link_to update_sort_instructeur_procedure_path(@procedure, table: field['table'], column: field['column']) do = link_to update_sort_instructeur_procedure_path(@procedure, table: field['table'], column: field['column']) do
= field['label']
- if @procedure_presentation.sort['table'] == field['table'] && @procedure_presentation.sort['column'] == field['column'] - if @procedure_presentation.sort['table'] == field['table'] && @procedure_presentation.sort['column'] == field['column']
- if @procedure_presentation.sort['order'] == 'asc' - if @procedure_presentation.sort['order'] == 'asc'
%img.caret-icon{ src: image_url("table/up_caret.svg"), width: 10, height: 6, loading: 'lazy' } #{field['label']} ↑
- else - else
%img.caret-icon{ src: image_url("table/down_caret.svg"), width: 10, height: 6, loading: 'lazy' } #{field['label']} ↓
- else
#{field['label']}

View file

@ -38,7 +38,7 @@
badge: number_with_html_delimiter(@traites_count), badge: number_with_html_delimiter(@traites_count),
notification: @has_termine_notifications) notification: @has_termine_notifications)
= tab_item('tous les dossiers', = tab_item('au total',
instructeur_procedure_path(@procedure, statut: 'tous'), instructeur_procedure_path(@procedure, statut: 'tous'),
active: @statut == 'tous', active: @statut == 'tous',
badge: number_with_html_delimiter(@tous_count)) badge: number_with_html_delimiter(@tous_count))

View file

@ -16,7 +16,7 @@ as defined by the routes in the `admin/` namespace
<%= link_to( <%= link_to(
display_resource_name(resource), display_resource_name(resource),
[namespace, resource.path], resource_index_route(resource),
class: "navigation__link navigation__link--#{nav_link_state(resource)}" class: "navigation__link navigation__link--#{nav_link_state(resource)}"
) %> ) %>
<% end %> <% end %>

View file

@ -2,6 +2,6 @@
- if notification - if notification
%span.notifications{ 'aria-label': 'notifications' } %span.notifications{ 'aria-label': 'notifications' }
= link_to(url) do = link_to(url) do
= label
- if badge.present? - if badge.present?
%span.badge= badge %span.badge= badge
= label

View file

@ -146,5 +146,5 @@
%p %p
= link_to "➡ Autres informations sur lorganisme sur « annuaire-entreprises.data.gouv.fr » (ex: fiche d'immatriculation RNCS)", = link_to "➡ Autres informations sur lorganisme sur « annuaire-entreprises.data.gouv.fr » (ex: fiche d'immatriculation RNCS)",
"https://annuaire-entreprises.data.gouv.fr/entreprise/#{etablissement.siren}", annuaire_link(etablissement.siren),
target: "_blank" target: "_blank"

View file

@ -31,5 +31,5 @@
%p.etablissement-exercices Les 3 derniers bilans connus de votre entreprise par la Banque de France ont été joints à votre dossier. %p.etablissement-exercices Les 3 derniers bilans connus de votre entreprise par la Banque de France ont été joints à votre dossier.
%p %p
= link_to "➡ Autres informations sur lorganisme sur « annuaire-entreprises.data.gouv.fr »", = link_to "➡ Autres informations sur lorganisme sur « annuaire-entreprises.data.gouv.fr »",
"https://annuaire-entreprises.data.gouv.fr/entreprise/#{etablissement.siren}", annuaire_link(etablissement.siren),
target: "_blank" target: "_blank"

View file

@ -86,8 +86,22 @@ Rails.application.configure do
port: '587', port: '587',
authentication: :cram_md5 authentication: :cram_md5
} }
else
# https://usehelo.com
if ENV['HELO_ENABLED'] == 'enabled'
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
user_name: APPLICATION_NAME,
password: '',
address: '127.0.0.1',
domain: '127.0.0.1',
port: ENV.fetch('HELO_PORT', '2525'),
authentication: :plain
}
else else
config.action_mailer.delivery_method = :letter_opener_web config.action_mailer.delivery_method = :letter_opener_web
end
config.action_mailer.default_url_options = { config.action_mailer.default_url_options = {
host: 'localhost', host: 'localhost',
port: 3000 port: 3000

View file

@ -216,11 +216,11 @@ feature 'Instructing a dossier:', js: true do
def test_statut_bar(a_suivre: 0, suivi: 0, traite: 0, tous_les_dossiers: 0, archive: 0) def test_statut_bar(a_suivre: 0, suivi: 0, traite: 0, tous_les_dossiers: 0, archive: 0)
texts = [ texts = [
"à suivre #{a_suivre}", "#{a_suivre} à suivre",
"suivi #{suivi}", "#{suivi} suivi",
"traité #{traite}", "#{traite} traité",
"tous les dossiers #{tous_les_dossiers}", "#{tous_les_dossiers} au total",
"archivé #{archive}" "#{archive} archivé"
] ]
texts.each { |text| expect(page).to have_text(text) } texts.each { |text| expect(page).to have_text(text) }