Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/views/better_together/pages/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<div class="row my-3 row-cols-1 row-cols-sm-2">
<div class="col mb-3 pb-3 border-bottom align-self-top">
<%= render partial: 'better_together/shared/translated_string_field', locals: { model: page, form: form, attribute: 'title' } %>
<small class="form-text text-muted mt-2">Enter the page title.</small> <!-- Help text added here -->
<small class="form-text text-muted mt-2"><%= t('.enter_page_title_help') %></small> <!-- Help text added here -->
</div>

<div class="col mb-3 pb-3 border-bottom align-self-top">
Expand Down Expand Up @@ -117,7 +117,7 @@
</div>

<div class="col mb-3 pb-3 border-bottom">
<%= form.label :sidebar_nav_id, 'Sidebar Navigation' %>
<%= form.label :sidebar_nav_id, t('.sidebar_navigation') %>
<%= form.collection_select :sidebar_nav_id, BetterTogether::NavigationArea.all, :id, :name, { include_blank: true }, { class: ('form-select' + (page.errors[:sidebar_nav_id].any? ? ' is-invalid' : '')), data: { controller: "better_together--slim-select" } } %>
<% if page.errors[:sidebar_nav_id].any? %>
<div class="invalid-feedback">
Expand Down Expand Up @@ -152,7 +152,7 @@
<div class="row my-3">
<div class="col">
<div class="row">
<h2>Page Blocks</h2>
<h2><%= t('.page_blocks') %></h2>

<div id="blocks-list" data-controller="better_together--page-blocks" data-page-blocks-target="blocks">
<!-- Render existing PageBlocks -->
Expand All @@ -164,7 +164,7 @@
<div class="accordion-item">
<h2 class="accordion-header" id="add-block-heading">
<button class="accordion-button collapsed bg-secondary btn btn-success" type="button" data-bs-toggle="collapse" data-bs-target="#available-block-types" aria-expanded="false" aria-controls="available-block-types">
Add Block
<%= t('.add_block') %>
</button>
</h2>
<div id="available-block-types" class="accordion-collapse collapse" aria-labelledby="add-block-heading" data-bs-parent="#new-page-block-choices">
Expand Down
6 changes: 3 additions & 3 deletions app/views/better_together/pages/_page_row.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<td><%= page.published? ? t('globals.published') : t('globals.draft') %></td>
<td class="text-end">
<% if policy(page).show? %>
<%= link_to render_page_path(page), class: 'btn btn-outline-info btn-sm me-1', 'aria-label' => 'Show Page' do %>
<%= link_to render_page_path(page), class: 'btn btn-outline-info btn-sm me-1', 'aria-label' => t('.show_page') do %>
<i class="fas fa-eye"></i> <%= t('globals.show') %>
<% end %>
<% end %>
<% if policy(page).update? %>
<%= link_to edit_page_path(page), class: 'btn btn-outline-secondary btn-sm me-1', 'aria-label' => 'Edit Page' do %>
<%= link_to edit_page_path(page), class: 'btn btn-outline-secondary btn-sm me-1', 'aria-label' => t('.edit_page') do %>
<i class="fas fa-edit"></i> <%= t('globals.edit') %>
<% end %>
<% end %>
<% if policy(page).destroy? %>
<%= link_to page_path(page), method: :delete, data: { 'turbo-method': 'delete', turbo_confirm: t('pages.confirm_destroy') }, class: 'btn btn-outline-danger btn-sm', 'aria-label' => 'Destroy Page' do %>
<%= link_to page_path(page), method: :delete, data: { 'turbo-method': 'delete', turbo_confirm: t('pages.confirm_destroy') }, class: 'btn btn-outline-danger btn-sm', 'aria-label' => t('.destroy_page') do %>
<i class="fas fa-trash-alt"></i> <%= t('globals.destroy') %>
<% end %>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/better_together/pages/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<div class="container-fluid my-3">
<div class="row">
<div class="col">
<h1>Edit Page</h1>
<div id="form_errors"></div>
<h1><%= t('.title') %></h1>

<%= render 'form', page: @page %>
</div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions app/views/better_together/pages/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
<div class="container my-3">
<div class="row">
<div class="col">
<h1>New Page</h1>
<div id="form_errors"></div>
<h1><%= t('.title') %></h1>
<%= render 'form', page: @page %>
</div>
</div>
Expand Down
19 changes: 19 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1185,10 +1185,26 @@ en:
removed: You were removed as an author on %{page_title}
removed_by: "%{actor_name} removed you as an author on %{page_title}"
pages:
new:
title: New Page
edit:
title: Edit Page
form:
create_page_before_adding_content: Create page before adding content
validation_errors_heading: Please correct the following errors:
view_page: View Page
protected: Protected
protected_message: This record is protected and cannot be deleted.
enter_page_title_help: Enter the page title.
sidebar_navigation: Sidebar Navigation
page_blocks: Page Blocks
add_block: Add Block
index:
new_page: New page
page_row:
show_page: Show Page
edit_page: Edit Page
destroy_page: Destroy Page
people:
allow_messages_from_members: Allow messages from platform members
device_permissions:
Expand Down Expand Up @@ -1982,6 +1998,9 @@ en:
description_fallback: Read %{title} on %{platform_name}
title: "%{title} | %{platform_name}"
pages:
created: Page was successfully created.
updated: Page was successfully updated.
destroyed: Page was successfully destroyed.
confirm_destroy: Confirm destroy
partners:
confirm_delete: Confirm delete
Expand Down
19 changes: 19 additions & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1189,10 +1189,26 @@ es:
removed: Has sido eliminado como autor en %{page_title}
removed_by: "%{actor_name} eliminó tu autoría en %{page_title}"
pages:
new:
title: Nueva página
edit:
title: Editar página
form:
create_page_before_adding_content: Crear página antes de agregar contenido
validation_errors_heading: Corrige los siguientes errores:
view_page: Ver página
protected: Protegido
protected_message: Este registro está protegido y no se puede eliminar.
enter_page_title_help: Ingresa el título de la página.
sidebar_navigation: Navegación lateral
page_blocks: Bloques de página
add_block: Agregar bloque
index:
new_page: Nueva página
page_row:
show_page: Mostrar página
edit_page: Editar página
destroy_page: Eliminar página
people:
allow_messages_from_members: Permitir mensajes de miembros de la plataforma
device_permissions:
Expand Down Expand Up @@ -1985,6 +2001,9 @@ es:
description_fallback: Lee %{title} en %{platform_name}
title: "%{title} | %{platform_name}"
pages:
created: La página se creó correctamente.
updated: La página se actualizó correctamente.
destroyed: La página se eliminó correctamente.
confirm_destroy: Confirmar destrucción
partners:
confirm_delete: Confirmar eliminación
Expand Down
19 changes: 19 additions & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1195,10 +1195,26 @@ fr:
removed: Vous avez été retiré comme auteur sur %{page_title}
removed_by: "%{actor_name} a retiré votre autorat sur %{page_title}"
pages:
new:
title: Nouvelle page
edit:
title: Modifier la page
form:
create_page_before_adding_content: Créez une page avant d'ajouter du contenu
validation_errors_heading: Veuillez corriger les erreurs suivantes :
view_page: Voir la page
protected: Protégé
protected_message: Cet enregistrement est protégé et ne peut pas être supprimé.
enter_page_title_help: Entrez le titre de la page.
sidebar_navigation: Navigation latérale
page_blocks: Blocs de page
add_block: Ajouter un bloc
index:
new_page: Nouvelle page
page_row:
show_page: Afficher la page
edit_page: Modifier la page
destroy_page: Supprimer la page
people:
allow_messages_from_members: Autoriser les messages des membres de la plateforme
device_permissions:
Expand Down Expand Up @@ -2012,6 +2028,9 @@ fr:
description_fallback: Lire %{title} sur %{platform_name}
title: "%{title} | %{platform_name}"
pages:
created: La page a été créée avec succès.
updated: La page a été mise à jour avec succès.
destroyed: La page a été supprimée avec succès.
confirm_destroy: Confirmer la destruction
partners:
confirm_delete: Confirmer la suppression
Expand Down
Loading