added i18n text to custom pages cards
This commit is contained in:
@@ -2,7 +2,8 @@ class Admin::SiteCustomization::CardsController < Admin::SiteCustomization::Base
|
|||||||
skip_authorization_check
|
skip_authorization_check
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@cards = ::Widget::Card.page(params[:page_id])
|
@page = ::SiteCustomization::Page.find(params[:page_id])
|
||||||
|
@cards = @page.cards
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.homepage.cards.title") %></th>
|
<th><%= t("admin.site_customization.pages.cards.title") %></th>
|
||||||
<th class="small-4"><%= t("admin.homepage.cards.description") %></th>
|
<th class="small-4"><%= t("admin.site_customization.pages.cards.description") %></th>
|
||||||
<th><%= t("admin.homepage.cards.link_text") %> / <%= t("admin.homepage.cards.link_url") %></th>
|
<th><%= t("admin.site_customization.pages.cards.link_text") %> / <%= t("admin.site_customization.pages.cards.link_url") %></th>
|
||||||
<th><%= t("admin.shared.image") %></th>
|
<th><%= t("admin.shared.image") %></th>
|
||||||
<th class="small-2"><%= t("admin.shared.actions") %></th>
|
<th class="small-2"><%= t("admin.shared.actions") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
<%= back_link_to admin_site_customization_pages_path %>
|
<%= back_link_to admin_site_customization_pages_path %>
|
||||||
<div id="cards">
|
<div id="cards">
|
||||||
<h3 class="inline-block"><%= t("admin.homepage.cards_title") %></h3>
|
<h3 class="inline-block">
|
||||||
|
<%= @page.title %> <%= t("admin.site_customization.pages.cards.cards_title") %></h3>
|
||||||
|
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<%= link_to t("admin.homepage.create_card"), new_admin_widget_card_path(page_id: params[:page_id]), class: "button" %>
|
<%= link_to t("admin.site_customization.pages.cards.create_card"),
|
||||||
|
new_admin_widget_card_path(page_id: params[:page_id]), class: "button" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if @cards.present? %>
|
<% if @cards.present? %>
|
||||||
<%= render "cards", cards: @cards %>
|
<%= render "cards", cards: @cards %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="callout primary clear">
|
<div class="callout primary clear">
|
||||||
<%= t("admin.homepage.no_cards") %>
|
<%= t("admin.site_customization.pages.cards.no_cards") %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.site_customization.pages.page.title") %></th>
|
<th><%= t("admin.site_customization.pages.page.title") %></th>
|
||||||
<th><%= t("admin.site_customization.pages.page.slug") %></th>
|
<th><%= t("admin.site_customization.pages.page.slug") %></th>
|
||||||
<th><%= t("admin.homepage.cards_title") %></th>
|
<th><%= t("admin.site_customization.pages.page.cards_title") %></th>
|
||||||
<th><%= t("admin.site_customization.pages.page.created_at") %></th>
|
<th><%= t("admin.site_customization.pages.page.created_at") %></th>
|
||||||
<th><%= t("admin.site_customization.pages.page.updated_at") %></th>
|
<th><%= t("admin.site_customization.pages.page.updated_at") %></th>
|
||||||
<th><%= t("admin.site_customization.pages.page.status") %></th>
|
<th><%= t("admin.site_customization.pages.page.status") %></th>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td><%= page.slug %></td>
|
<td><%= page.slug %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to "Cards", admin_site_customization_page_cards_path(page),
|
<%= link_to t("admin.site_customization.pages.page.see_cards"), admin_site_customization_page_cards_path(page),
|
||||||
class: "button hollow expanded" %>
|
class: "button hollow expanded" %>
|
||||||
</td>
|
</td>
|
||||||
<td><%= I18n.l page.created_at, format: :short %></td>
|
<td><%= I18n.l page.created_at, format: :short %></td>
|
||||||
|
|||||||
@@ -1424,6 +1424,16 @@ en:
|
|||||||
status_published: Published
|
status_published: Published
|
||||||
title: Title
|
title: Title
|
||||||
slug: Slug
|
slug: Slug
|
||||||
|
cards_title: Cards
|
||||||
|
see_cards: See Cards
|
||||||
|
cards:
|
||||||
|
cards_title: cards
|
||||||
|
create_card: Create card
|
||||||
|
no_cards: There are no cards.
|
||||||
|
title: Title
|
||||||
|
description: Description
|
||||||
|
link_text: Link text
|
||||||
|
link_url: Link URL
|
||||||
homepage:
|
homepage:
|
||||||
title: Homepage
|
title: Homepage
|
||||||
description: The active modules appear in the homepage in the same order as here.
|
description: The active modules appear in the homepage in the same order as here.
|
||||||
|
|||||||
@@ -1423,6 +1423,16 @@ es:
|
|||||||
status_published: Publicada
|
status_published: Publicada
|
||||||
title: Título
|
title: Título
|
||||||
slug: Slug
|
slug: Slug
|
||||||
|
cards_title: Tarjetas
|
||||||
|
see_cards: Ver tarjetas
|
||||||
|
cards:
|
||||||
|
cards_title: tarjetas
|
||||||
|
create_card: Crear tarjeta
|
||||||
|
no_cards: No hay tarjetas.
|
||||||
|
title: Título
|
||||||
|
description: Descripción
|
||||||
|
link_text: Texto del enlace
|
||||||
|
link_url: URL del enlace
|
||||||
homepage:
|
homepage:
|
||||||
title: Título
|
title: Título
|
||||||
description: Los módulos activos aparecerán en la homepage en el mismo orden que aquí.
|
description: Los módulos activos aparecerán en la homepage en el mismo orden que aquí.
|
||||||
|
|||||||
Reference in New Issue
Block a user