diff --git a/app/models/administration/qualiopi/indicator.rb b/app/models/administration/qualiopi/indicator.rb index c43737ecec0ff0f33f11a12b85d2730fc6652174..8231f9cdebe7ef68ac431bbe809ef6f386098580 100644 --- a/app/models/administration/qualiopi/indicator.rb +++ b/app/models/administration/qualiopi/indicator.rb @@ -20,7 +20,7 @@ # # Foreign Keys # -# fk_rails_eed87f7acf (criterion_id => administration_qualiopi_criterions.id) +# fk_rails_31f1a0a2c9 (criterion_id => administration_qualiopi_criterions.id) # class Administration::Qualiopi::Indicator < ApplicationRecord belongs_to :criterion diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index a5ff5c58040dd786e9de27571e4cf684669065bc..e61b8cb241b5debee53d54946c70bf579af4d934 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -30,7 +30,7 @@ # # Foreign Keys # -# fk_rails_bb6a496c08 (university_id => universities.id) +# fk_rails_94b0abd85b (university_id => universities.id) # class Communication::Website < ApplicationRecord include WithAbouts diff --git a/app/models/communication/website/git_file.rb b/app/models/communication/website/git_file.rb index 155b8cb073bf694efceb7e508dbbd3d478b4ec91..4ade6aec3f007a6d9a1a6d01f1bb92617906d229 100644 --- a/app/models/communication/website/git_file.rb +++ b/app/models/communication/website/git_file.rb @@ -19,7 +19,7 @@ # # Foreign Keys # -# fk_rails_8505d649e8 (website_id => communication_websites.id) +# fk_rails_b6b8b2cce2 (website_id => communication_websites.id) # class Communication::Website::GitFile < ApplicationRecord belongs_to :website, class_name: 'Communication::Website' diff --git a/app/models/communication/website/page.rb b/app/models/communication/website/page.rb index fa9ffcd3bd2594f0ee911d97d1290f4b407b65bc..c54c59b6224f2a52687615750949cb77fdd5c1cb 100644 --- a/app/models/communication/website/page.rb +++ b/app/models/communication/website/page.rb @@ -33,8 +33,8 @@ # Foreign Keys # # fk_rails_1a42003f06 (parent_id => communication_website_pages.id) +# fk_rails_2315541232 (related_category_id => communication_website_categories.id) # fk_rails_280107c62b (communication_website_id => communication_websites.id) -# fk_rails_47b37cf8b2 (related_category_id => communication_website_categories.id) # fk_rails_d208d15a73 (university_id => universities.id) # diff --git a/app/models/education/program.rb b/app/models/education/program.rb index d2328f5b296f94eda3123c877eb6a665834bcb76..cec653a4a5952ba56db12f73f460b52a52e3a8b6 100644 --- a/app/models/education/program.rb +++ b/app/models/education/program.rb @@ -39,7 +39,7 @@ # # Foreign Keys # -# fk_rails_08b351087c (university_id => universities.id) +# fk_rails_6e16107511 (university_id => universities.id) # fk_rails_ec1f16f607 (parent_id => education_programs.id) # class Education::Program < ApplicationRecord diff --git a/app/models/university/person.rb b/app/models/university/person.rb index 49718973f6abed6db2b9bf4b1e863f47a5e4bb4b..da61385fdd3ecc61cd4d361c0f79d2d65920f330 100644 --- a/app/models/university/person.rb +++ b/app/models/university/person.rb @@ -27,8 +27,8 @@ # # Foreign Keys # -# fk_rails_b47a769440 (user_id => users.id) -# fk_rails_da35e70d61 (university_id => universities.id) +# fk_rails_433744b4e8 (user_id => users.id) +# fk_rails_49ac392937 (university_id => universities.id) # class University::Person < ApplicationRecord include WithGit diff --git a/app/models/university/person/administrator.rb b/app/models/university/person/administrator.rb index b7bca44426417b0705317eb94dbdb4af47d11eeb..d11f849b2ce178c8d0c5dd953fbe2d54640c2846 100644 --- a/app/models/university/person/administrator.rb +++ b/app/models/university/person/administrator.rb @@ -27,8 +27,8 @@ # # Foreign Keys # -# fk_rails_b47a769440 (user_id => users.id) -# fk_rails_da35e70d61 (university_id => universities.id) +# fk_rails_433744b4e8 (user_id => users.id) +# fk_rails_49ac392937 (university_id => universities.id) # class University::Person::Administrator < University::Person def self.polymorphic_name diff --git a/app/models/university/person/author.rb b/app/models/university/person/author.rb index 5bf2ee2c4a68b86044a237691a08fd9b4391e150..5c5fb92cc87d8f5011cd93e33aad406c4a772a22 100644 --- a/app/models/university/person/author.rb +++ b/app/models/university/person/author.rb @@ -27,8 +27,8 @@ # # Foreign Keys # -# fk_rails_b47a769440 (user_id => users.id) -# fk_rails_da35e70d61 (university_id => universities.id) +# fk_rails_433744b4e8 (user_id => users.id) +# fk_rails_49ac392937 (university_id => universities.id) # class University::Person::Author < University::Person def self.polymorphic_name diff --git a/app/models/university/person/researcher.rb b/app/models/university/person/researcher.rb index 9ca52242568e5da3fee487a5a4868d3bb28aaa88..989f141a54956e1ead39198db4380378636287c1 100644 --- a/app/models/university/person/researcher.rb +++ b/app/models/university/person/researcher.rb @@ -27,8 +27,8 @@ # # Foreign Keys # -# fk_rails_b47a769440 (user_id => users.id) -# fk_rails_da35e70d61 (university_id => universities.id) +# fk_rails_433744b4e8 (user_id => users.id) +# fk_rails_49ac392937 (university_id => universities.id) # class University::Person::Researcher < University::Person def self.polymorphic_name diff --git a/app/models/university/person/teacher.rb b/app/models/university/person/teacher.rb index 2f75bd1ab96b16846fa83af4670c2724d9d116e4..e83a8b826202f29d4ad9ff7869853e1705f05b6f 100644 --- a/app/models/university/person/teacher.rb +++ b/app/models/university/person/teacher.rb @@ -27,8 +27,8 @@ # # Foreign Keys # -# fk_rails_b47a769440 (user_id => users.id) -# fk_rails_da35e70d61 (university_id => universities.id) +# fk_rails_433744b4e8 (user_id => users.id) +# fk_rails_49ac392937 (university_id => universities.id) # class University::Person::Teacher < University::Person def self.polymorphic_name diff --git a/app/views/admin/communication/website/blocks/edit.html.erb b/app/views/admin/communication/website/blocks/edit.html.erb index 014c0187761c3bda983f930fbe1f0dda37d6881b..1b9e549043a13b7d0c9201f775426019a87145d7 100644 --- a/app/views/admin/communication/website/blocks/edit.html.erb +++ b/app/views/admin/communication/website/blocks/edit.html.erb @@ -48,7 +48,8 @@ console.log(error); } else { object[key] = { - id: blob.signed_id, + id: blob.id, + signed_id: blob.signed_id, filename: blob.filename }; } @@ -58,7 +59,7 @@ return this.directUpload.blobUrlTemplate.replace(':signed_id', signed_id).replace(':filename', filename); }, getImageUrl(data) { - return this.getFileUrl(data.id, data.filename); + return this.getFileUrl(data.signed_id, data.filename); } } }); diff --git a/app/views/admin/communication/website/blocks/templates/partners/_edit.html.erb b/app/views/admin/communication/website/blocks/templates/partners/_edit.html.erb index 941954b6f38f04ad87baa9359db25602f10c5aa7..4684bf18f4a749c3e8b06e04b689f18f0ed4c944 100644 --- a/app/views/admin/communication/website/blocks/templates/partners/_edit.html.erb +++ b/app/views/admin/communication/website/blocks/templates/partners/_edit.html.erb @@ -67,6 +67,7 @@ :id="'category-' + categoryIndex + '-partner-url-' + partnerIndex"> </div> <div class="col-lg-4"> + <%# TODO : create a uploader vue3 component %> <label class="form-label" :for="'category-' + categoryIndex + '-partner-logo-' + partnerIndex"> Logo diff --git a/app/views/admin/communication/website/blocks/templates/partners/_static.html.erb b/app/views/admin/communication/website/blocks/templates/partners/_static.html.erb index e1b0208838e1dc8c629e31141633714b9f8b22e3..593e0f53624b25bba1214c81509c2004ef867252 100644 --- a/app/views/admin/communication/website/blocks/templates/partners/_static.html.erb +++ b/app/views/admin/communication/website/blocks/templates/partners/_static.html.erb @@ -2,9 +2,18 @@ <% block.data['elements'].each do |element| %> - name: > <%= element['title'] %> - url: <%= element['url'] %> - <% if element['logo'] %> - logo: <%= element['logo']['id'] %> - <% end %> + partners: +<% +element['partners'].each do |partner| +%> + - name: "<%= partner['name'] %>" + url: "<%= partner['url'] %>" + <% if partner.has_key?('logo') %> + <% if partner['logo'].has_key?('id') %> + logo: "<%= partner['logo']['id'] %>" + <% end %> + <% end %> +<% end %> + <% end %> <% end %>