diff --git a/Gemfile.lock b/Gemfile.lock index b8b6435b19e397c71e972c39ed01dfafbedb4a24..1a59976afe2a49b0ef2201bad6dadfd90de07de9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -463,4 +463,4 @@ RUBY VERSION ruby 2.7.5p203 BUNDLED WITH - 2.2.33 + 2.3.2 diff --git a/app/views/admin/education/programs/show.html.erb b/app/views/admin/education/programs/show.html.erb index c52a813cb4ced4ddbd17a5e558020d10f49d1956..b3f71ddfdfe79be6e5e33363532073ec06f8dba4 100644 --- a/app/views/admin/education/programs/show.html.erb +++ b/app/views/admin/education/programs/show.html.erb @@ -55,7 +55,7 @@ best_prop_source = @program.public_send("best_#{prop}_source") %> <% next if best_prop_value.blank? # No value at all%> - <h3 class="h5<%= ' mt-4' if index > 0 %>"> + <h3 class="h5 mt-4"> <%= Education::Program.human_attribute_name(prop) %> <% if best_prop_source %> <span class="small text-muted"> diff --git a/docs/websites/export.md b/docs/websites/export.md index 32f1173a4bc9f5b7bd88fa3963ee13cdd65759e4..a7bb28a667f6952c7362fde84af8ba9392632946 100644 --- a/docs/websites/export.md +++ b/docs/websites/export.md @@ -1,3 +1,13 @@ # Export -Comment exporter les attachments, qu'ils soient liés à un objet active storage, ou dans un champ action text ? \ No newline at end of file +Tout objet qui doit être exporté sur un ou plusieurs websites doit : + - avoir une méthode `website` ou `websites` + - inclure le concern `WithGithubFiles` + +S'il possède des médias (`featured_image` et/ou images dans des rich texts), il doit inclure le concern `Communication::Website::WithMedia` + +Le concern `WithGithubFiles` ajoute un manifest à l'objet qui permet de définir les fichiers exportés côté GitHub pour celui-ci. + +Quand l'objet est sauvegardé, on se base sur le(s) websites et ce manifest pour créer et publier des objets `Communication::Website::GithubFile`. Ces derniers permettent de garder la trace du chemin actuel d'un fichier distant dans le cas où celui-ci viendrait à être déplacé (changement de slug, etc.). + +Ces fichiers servent également dans le cas où on souhaite republier manuellement une partie d'un site (exemple : tous les posts), la méthode `Communication::Website#publish_posts!` peut tout grouper en un batch.