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
|
||||
|
||||
def index
|
||||
@cards = ::Widget::Card.page(params[:page_id])
|
||||
@page = ::SiteCustomization::Page.find(params[:page_id])
|
||||
@cards = @page.cards
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.homepage.cards.title") %></th>
|
||||
<th class="small-4"><%= t("admin.homepage.cards.description") %></th>
|
||||
<th><%= t("admin.homepage.cards.link_text") %> / <%= t("admin.homepage.cards.link_url") %></th>
|
||||
<th><%= t("admin.site_customization.pages.cards.title") %></th>
|
||||
<th class="small-4"><%= t("admin.site_customization.pages.cards.description") %></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 class="small-2"><%= t("admin.shared.actions") %></th>
|
||||
</tr>
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
<%= back_link_to admin_site_customization_pages_path %>
|
||||
<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">
|
||||
<%= 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>
|
||||
|
||||
<% if @cards.present? %>
|
||||
<%= render "cards", cards: @cards %>
|
||||
<% else %>
|
||||
<div class="callout primary clear">
|
||||
<%= t("admin.homepage.no_cards") %>
|
||||
<%= t("admin.site_customization.pages.cards.no_cards") %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<tr>
|
||||
<th><%= t("admin.site_customization.pages.page.title") %></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.updated_at") %></th>
|
||||
<th><%= t("admin.site_customization.pages.page.status") %></th>
|
||||
@@ -28,7 +28,7 @@
|
||||
</td>
|
||||
<td><%= page.slug %></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" %>
|
||||
</td>
|
||||
<td><%= I18n.l page.created_at, format: :short %></td>
|
||||
|
||||
@@ -1424,6 +1424,16 @@ en:
|
||||
status_published: Published
|
||||
title: Title
|
||||
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:
|
||||
title: Homepage
|
||||
description: The active modules appear in the homepage in the same order as here.
|
||||
|
||||
@@ -1423,6 +1423,16 @@ es:
|
||||
status_published: Publicada
|
||||
title: Título
|
||||
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:
|
||||
title: Título
|
||||
description: Los módulos activos aparecerán en la homepage en el mismo orden que aquí.
|
||||
|
||||
Reference in New Issue
Block a user