Skip to content
Snippets Groups Projects
Commit 04042296 authored by pabois's avatar pabois
Browse files

locales

parent 143c40f0
No related branches found
No related tags found
No related merge requests found
Showing
with 24 additions and 22 deletions
......@@ -24,7 +24,7 @@ module Admin::ApplicationHelper
link_to options.delete(:label) || t('delete'),
polymorphic_url_param(object, **options),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: options.delete(:confirm_message) || t('please_confirm') },
class: button_classes_danger
end
......
......@@ -61,7 +61,7 @@ class Communication::Website::Page < ApplicationRecord
has_many :children,
class_name: 'Communication::Website::Page',
foreign_key: :parent_id,
dependent: :nullify
dependent: :destroy
validates :title, presence: true
......
......@@ -52,7 +52,7 @@ class Education::Program < ApplicationRecord
has_many :children,
class_name: 'Education::Program',
foreign_key: :parent_id,
dependent: :nullify
dependent: :destroy
has_and_belongs_to_many :schools,
class_name: 'Education::School',
join_table: 'education_programs_schools',
......@@ -95,6 +95,10 @@ class Education::Program < ApplicationRecord
self.path = "#{parent&.path}/#{slug}".gsub(/\/+/, '/')
end
def update_children_paths
children.each(&:save)
end
def list_of_other_programs
university.list_of_programs.reject! { |p| p[:id] == id }
end
......
......@@ -17,7 +17,7 @@
<%= link_to t('delete'),
admin_administration_member_path(member),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: t('please_confirm') },
class: button_classes_danger %>
</div>
</td>
......
......@@ -17,7 +17,7 @@
<%= link_to t('delete'),
admin_communication_website_category_path(website_id: category.website.id, id: category.id),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: t('please_confirm') },
class: button_classes_danger if can?(:destroy, category) %>
</div>
</td>
......
......@@ -22,7 +22,7 @@
<%= link_to t('delete'),
admin_communication_website_menu_item_path(website_id: item.website.id, menu_id: item.menu.id, id: item.id),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: t('please_confirm') },
class: button_classes_danger if can?(:destroy, item) %>
</div>
</div>
......
......@@ -17,7 +17,7 @@
<%= link_to t('delete'),
admin_communication_website_menu_path(website_id: menu.website.id, id: menu.id),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: t('please_confirm') },
class: button_classes_danger if can?(:destroy, menu) %>
</div>
</td>
......
......@@ -21,7 +21,7 @@
<%= link_to t('delete'),
admin_communication_website_page_path(website_id: page.website.id, id: page.id),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: page.children.any? ? t('please_confirm_with_children') : t('please_confirm') },
class: button_classes_danger if can?(:destroy, page) %>
</div>
</td>
......
......@@ -18,7 +18,7 @@
<span class="move_btn py-2 ps-2"><i class="fas fa-sort"></i></span>
<div class="btn-group ms-auto" role="group">
<%= edit_link page %>
<%= destroy_link page %>
<%= destroy_link page, confirm_message: page.children.any? ? t('please_confirm_with_children') : t('please_confirm') %>
</div>
</div>
<ul class="list-unstyled treeview__children js-treeview-children <%= 'js-treeview-sortable-container' if can?(:reorder, page) %> ms-4" data-id="<%= page.id %>">
......
......@@ -45,7 +45,7 @@
<%= link_to t('delete'),
admin_communication_website_post_path(website_id: post.website.id, id: post.id),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: t('please_confirm') },
class: button_classes_danger if can?(:destroy, post) %>
</div>
</td>
......
......@@ -15,9 +15,9 @@
edit_admin_education_program_path(program),
class: button_classes %>
<%= link_to t('delete'),
admin_research_journal_article_path(program),
admin_education_program_path(program),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: program.children.any? ? t('please_confirm_with_children') : t('please_confirm') },
class: button_classes_danger %>
</div>
</td>
......
......@@ -17,7 +17,7 @@
<span class="move_btn py-2 ps-2"><i class="fas fa-sort"></i></span>
<div class="btn-group ms-auto" role="group">
<%= edit_link program %>
<%= destroy_link program %>
<%= destroy_link program, confirm_message: program.children.any? ? t('please_confirm_with_children') : t('please_confirm') %>
</div>
</div>
<ul class="list-unstyled treeview__children js-treeview-children <%= 'js-treeview-sortable-container' if can?(:reorder, program) %> ms-4" data-id="<%= program.id %>">
......
......@@ -19,7 +19,7 @@
<%= link_to t('delete'),
admin_research_journal_article_path(journal_id: article.journal, id: article),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: t('please_confirm') },
class: button_classes_danger %>
</div>
</td>
......
......@@ -22,7 +22,7 @@
<%= link_to t('delete'),
server_language_path(language),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: t('please_confirm') },
class: button_classes_danger %>
</div>
</td>
......
......@@ -23,7 +23,7 @@
<%= link_to t('delete'),
server_university_path(university),
method: :delete,
data: { confirm: t('please-confirm') },
data: { confirm: t('please_confirm') },
class: button_classes_danger %>
</div>
</td>
......
......@@ -59,11 +59,7 @@ module Osuny
"name", "sizes", "src", "srcset", "style", "target", "title", "type", "width", "xml:lang"
]
<<<<<<< HEAD
config.allowed_special_chars = '#?!,@$%^&*+:;£µ-'
=======
config.allowed_special_chars = '#?!,@$%^&*+£µ-:;'
>>>>>>> 180fe9d5da503643bf79111fb74f248d5bc32cea
config.generators do |g|
g.orm :active_record, primary_key_type: :uuid
......
......@@ -103,7 +103,8 @@ en:
server_admin: Admin server
sign_out: Log out
metadata: Metadata
please-confirm: Are you sure?
please_confirm: Are you sure?
please_confirm_with_children: "WARNING: deleting this element will also remove every child. Are you sure?"
privacy_policy: Privacy policy
privacy_policy_url: https://osuny.org/politique-de-confidentialite
save: Save
......
......@@ -103,7 +103,8 @@ fr:
server_admin: Admin serveur
sign_out: Déconnexion
metadata: Informations
please-confirm: Est-ce que vous confirmez ?
please_confirm: Est-ce que vous confirmez ?
please_confirm_with_children: "ATTENTION : effacer cet élément supprimera aussi tous ses enfants. Est-ce que vous confirmez ?"
privacy_policy: Politique de confidentialité
privacy_policy_url: https://osuny.org/politique-de-confidentialite
save: Enregistrer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment