improves site customization layout, tables, i18n
This commit is contained in:
@@ -14,34 +14,35 @@
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :name %>
|
||||
<%= f.select :name, SiteCustomization::ContentBlock::VALID_BLOCKS, label: false %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :locale %>
|
||||
<%= f.select :locale, I18n.available_locales, label: false %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :name %>
|
||||
<%= f.select :name, SiteCustomization::ContentBlock::VALID_BLOCKS, label: false %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.label :locale %>
|
||||
<%= f.select :locale, I18n.available_locales, label: false %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :body %>
|
||||
<%= f.text_area :body, label: false, rows: 10 %>
|
||||
<%= f.submit class: "button success" %>
|
||||
<div class="small-12 column">
|
||||
<%= f.label :body %>
|
||||
<%= f.text_area :body, label: false, rows: 10 %>
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<%= f.submit class: "button success expanded" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<h4><%= t('.content_blocks_information') %></h4>
|
||||
<h3><%= t('.content_blocks_information') %></h3>
|
||||
|
||||
<p><%= t('.content_block_about') %></p>
|
||||
|
||||
<p><%= t('.content_block_top_links_html') %></p>
|
||||
<pre>
|
||||
<li><a href="http://site1.com">Site 1</a></li>
|
||||
<li><a href="http://site2.com">Site 2</a></li>
|
||||
<li><a href="http://site3.com">Site 3</a></li>
|
||||
</pre>
|
||||
<br>
|
||||
|
||||
<p><%= t('.content_block_footer_html') %></p>
|
||||
<code><li><a href="http://site1.com">Site 1</a></li></code><br>
|
||||
<code><li><a href="http://site2.com">Site 2</a></li></code><br>
|
||||
<code><li><a href="http://site3.com">Site 3</a></li></code><br>
|
||||
|
||||
<p class="margin-top"><%= t('.content_block_footer_html') %></p>
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
Admin - <%= t("admin.menu.site_customization.content_blocks") %> - <%= @content_block.name %> (<%= @content_block.locale %>)
|
||||
<% end %>
|
||||
|
||||
<%= link_to admin_site_customization_content_blocks_path, class: "back" do %>
|
||||
<span class="icon-angle-left"></span>
|
||||
<%= t("admin.site_customization.content_blocks.edit.back") %>
|
||||
<% end %>
|
||||
<%= back_link_to admin_site_customization_content_blocks_path %>
|
||||
|
||||
<%= button_to t("admin.site_customization.content_blocks.index.delete"), admin_site_customization_content_block_path(@content_block), method: :delete, class: "button hollow alert float-right margin-right" %>
|
||||
<%= button_to t("admin.site_customization.content_blocks.index.delete"), admin_site_customization_content_block_path(@content_block), method: :delete, class: "button hollow alert float-right small" %>
|
||||
|
||||
<div class="row margin-top">
|
||||
<h2><%= t("admin.site_customization.content_blocks.edit.title") %></h2>
|
||||
<%= render 'form' %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<h2><%= t("admin.site_customization.content_blocks.edit.title") %></h2>
|
||||
<%= render 'form' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,28 +2,29 @@
|
||||
Admin - <%= t("admin.menu.site_customization.content_blocks") %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to t("admin.site_customization.content_blocks.index.create"), new_admin_site_customization_content_block_path, class: "button float-right margin-right" %>
|
||||
<%= link_to t("admin.site_customization.content_blocks.index.create"), new_admin_site_customization_content_block_path, class: "button float-right" %>
|
||||
|
||||
<h2 class="inline-block"><%= t("admin.site_customization.content_blocks.index.title") %></h2>
|
||||
|
||||
<table class="cms_page_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.site_customization.content_blocks.content_block.name") %></th>
|
||||
<th><%= t("admin.site_customization.content_blocks.content_block.body") %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @content_blocks.each do |content_block| %>
|
||||
<tr id="<%= dom_id(content_block) %>">
|
||||
<td><%= link_to "#{content_block.name} (#{content_block.locale})", edit_admin_site_customization_content_block_path(content_block) %></td>
|
||||
<td><%= content_block.body %></td>
|
||||
<td>
|
||||
<%= button_to t("admin.site_customization.content_blocks.index.delete"),
|
||||
admin_site_customization_content_block_path(content_block),
|
||||
method: :delete, class: "button hollow alert" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="cms_page_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.site_customization.content_blocks.content_block.name") %></th>
|
||||
<th><%= t("admin.site_customization.content_blocks.content_block.body") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @content_blocks.each do |content_block| %>
|
||||
<tr id="<%= dom_id(content_block) %>">
|
||||
<td><%= link_to "#{content_block.name} (#{content_block.locale})", edit_admin_site_customization_content_block_path(content_block) %></td>
|
||||
<td><%= content_block.body.html_safe %></td>
|
||||
<td>
|
||||
<%= button_to t("admin.site_customization.content_blocks.index.delete"),
|
||||
admin_site_customization_content_block_path(content_block),
|
||||
method: :delete, class: "button hollow alert" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
Admin - <%= t("admin.menu.site_customization.content_blocks") %> - <%= t("admin.site_customization.content_blocks.new.title") %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to admin_site_customization_content_blocks_path, class: "back" do %>
|
||||
<span class="icon-angle-left"></span>
|
||||
<%= t("admin.site_customization.content_blocks.new.back") %>
|
||||
<% end %>
|
||||
<%= back_link_to admin_site_customization_content_blocks_path %>
|
||||
|
||||
<div class="row margin-top">
|
||||
<h2><%= t("admin.site_customization.content_blocks.new.title") %></h2>
|
||||
<%= render 'form' %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<h2><%= t("admin.site_customization.content_blocks.new.title") %></h2>
|
||||
<%= render 'form' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
<h2><%= t("admin.site_customization.images.index.title") %></h2>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.site_customization.images.index.image") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @images.each do |image| %>
|
||||
<tr class="<%= image.name %>">
|
||||
|
||||
@@ -1,21 +1,44 @@
|
||||
<%= form_for [:admin, @page], html: {class: "edit_page", data: {watch_changes: true}} do |f| %>
|
||||
|
||||
<% if @page.errors.any? %>
|
||||
<div id="error_explanation" data-alert class="callout alert" data-closable>
|
||||
<button class="close-button" aria-label="<%= t("application.close") %>" type="button" data-close>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
||||
<div id="error_explanation" data-alert class="callout alert" data-closable>
|
||||
<button class="close-button" aria-label="<%= t("application.close") %>" type="button" data-close>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
||||
<strong>
|
||||
<%= @page.errors.count %>
|
||||
<%= t("admin.site_customization.pages.errors.form.error", count: @page.errors.count) %>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<strong>
|
||||
<%= @page.errors.count %>
|
||||
<%= t("admin.site_customization.pages.errors.form.error", count: @page.errors.count) %>
|
||||
</strong>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="small-12 medium-9 column">
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
</div>
|
||||
<div class="small-12 medium-5 column">
|
||||
<h3><%= t("admin.site_customization.pages.form.options") %></h3>
|
||||
<%= f.check_box :more_info_flag, class: "small" %>
|
||||
<%= f.check_box :print_content_flag %>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= f.label :status %>
|
||||
<% ::SiteCustomization::Page::VALID_STATUSES.each do |status| %>
|
||||
<%= f.radio_button :status, status, label: false %>
|
||||
<%= f.label "status_#{status}", t("admin.site_customization.pages.page.status_#{status}") %>
|
||||
<br>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="small-12 medium-4 column">
|
||||
<%= f.label :slug %>
|
||||
<%= f.text_field :slug, label: false, size: 80, maxlength: 80 %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<hr>
|
||||
|
||||
<%= f.label :title %>
|
||||
<%= f.text_field :title, label: false %>
|
||||
@@ -23,30 +46,14 @@
|
||||
<%= f.label :subtitle %>
|
||||
<%= f.text_field :subtitle, label: false, size: 80, maxlength: 80 %>
|
||||
|
||||
<%= f.label :slug %>
|
||||
<%= f.text_field :slug, label: false, size: 80, maxlength: 80 %>
|
||||
|
||||
<div class="ckeditor margin-top">
|
||||
<%= f.label :content %>
|
||||
<%= f.cktext_area :content, label: false, cols: 80, rows: 10, ckeditor: { language: I18n.locale } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<div class="page_edit">
|
||||
<h4><%= t("admin.site_customization.pages.form.options") %></h4>
|
||||
<%= f.check_box :more_info_flag %>
|
||||
<%= f.check_box :print_content_flag %>
|
||||
<hr>
|
||||
|
||||
<h4><%= f.label :status %></h4>
|
||||
<% ::SiteCustomization::Page::VALID_STATUSES.each do |status| %>
|
||||
<%= f.radio_button :status, status, label: false %>
|
||||
<%= f.label "status_#{status}", t("admin.site_customization.pages.page.status_#{status}") %>
|
||||
<br/>
|
||||
<% end %>
|
||||
|
||||
<%= f.submit class: "button success" %>
|
||||
<div class="small-12 medium-6 large-4">
|
||||
<%= f.submit class: "button success expanded" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -2,14 +2,13 @@
|
||||
Admin - <%= t("admin.menu.site_customization.pages") %> - <%= @page.title %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to admin_site_customization_pages_path, class: "back" do %>
|
||||
<span class="icon-angle-left"></span>
|
||||
<%= t("admin.site_customization.pages.edit.back") %>
|
||||
<% end %>
|
||||
<%= back_link_to admin_site_customization_pages_path %>
|
||||
|
||||
<%= button_to t("admin.site_customization.pages.index.delete"), admin_site_customization_page_path(@page), method: :delete, class: "button hollow alert float-right margin-right" %>
|
||||
<%= button_to t("admin.site_customization.pages.index.delete"), admin_site_customization_page_path(@page), method: :delete, class: "button hollow alert small float-right" %>
|
||||
|
||||
<div class="row margin-top">
|
||||
<h2><%= t("admin.site_customization.pages.edit.title", page_title: @page.title) %></h2>
|
||||
<%= render 'form' %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<h2><%= t("admin.site_customization.pages.edit.title", page_title: @page.title) %></h2>
|
||||
<%= render 'form' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,42 +2,45 @@
|
||||
Admin - <%= t("admin.menu.site_customization.pages") %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to t("admin.site_customization.pages.index.create"), new_admin_site_customization_page_path, class: "button float-right margin-right" %>
|
||||
<%= link_to t("admin.site_customization.pages.index.create"), new_admin_site_customization_page_path, class: "button float-right" %>
|
||||
<h2 class="inline-block"><%= t("admin.site_customization.pages.index.title") %></h2>
|
||||
|
||||
<h3><%= page_entries_info @pages %></h3>
|
||||
<h3><%= page_entries_info @pages %></h3>
|
||||
|
||||
<table class="cms_page_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.site_customization.pages.page.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>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @pages.each do |page| %>
|
||||
<tr id="<%= dom_id(page) %>">
|
||||
<td>
|
||||
<%= link_to page.title, edit_admin_site_customization_page_path(page) %>
|
||||
</td>
|
||||
<td><%= I18n.l page.created_at, format: :short %></td>
|
||||
<td><%= I18n.l page.created_at, format: :short %></td>
|
||||
<td><%= t("admin.site_customization.pages.page.status_#{page.status}") %></td>
|
||||
<td class="small">
|
||||
<span class="icon-eye"></span>
|
||||
<%= link_to t("admin.site_customization.pages.index.see_page"), page.url %>
|
||||
</td>
|
||||
<td class="small">
|
||||
<span class="icon-x"></span>
|
||||
<%= link_to t("admin.site_customization.pages.index.delete"), admin_site_customization_page_path(page), method: :delete %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="cms_page_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.site_customization.pages.page.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>
|
||||
<th colspan="2"><%= t("admin.actions.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @pages.each do |page| %>
|
||||
<tr id="<%= dom_id(page) %>">
|
||||
<td>
|
||||
<%= link_to page.title, edit_admin_site_customization_page_path(page) %>
|
||||
</td>
|
||||
<td><%= I18n.l page.created_at, format: :short %></td>
|
||||
<td><%= I18n.l page.created_at, format: :short %></td>
|
||||
<td><%= t("admin.site_customization.pages.page.status_#{page.status}") %></td>
|
||||
<td class="small">
|
||||
<span class="icon-eye"></span>
|
||||
<% if page.status == "published" %>
|
||||
<%= link_to t("admin.site_customization.pages.index.see_page"), page.url, target: "_blank" %>
|
||||
<% else %>
|
||||
<%= t("admin.site_customization.pages.index.see_page") %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="small delete">
|
||||
<span class="icon-x"></span>
|
||||
<%= link_to t("admin.site_customization.pages.index.delete"), admin_site_customization_page_path(page), method: :delete, class: "delete" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate @pages %>
|
||||
<%= paginate @pages %>
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
Admin - <%= t("admin.menu.site_customization.pages") %> - <%= t("admin.site_customization.pages.new.title") %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to admin_site_customization_pages_path, class: "back" do %>
|
||||
<span class="icon-angle-left"></span>
|
||||
<%= t("admin.site_customization.pages.new.back") %>
|
||||
<% end %>
|
||||
<%= back_link_to admin_site_customization_pages_path %>
|
||||
|
||||
<div class="row margin-top">
|
||||
<h2><%= t("admin.site_customization.pages.new.title") %></h2>
|
||||
<%= render 'form' %>
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<h2><%= t("admin.site_customization.pages.new.title") %></h2>
|
||||
<%= render 'form' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -679,16 +679,14 @@ en:
|
||||
notice: Content block deleted successfully
|
||||
edit:
|
||||
title: Editing content block
|
||||
back: Back
|
||||
errors:
|
||||
form:
|
||||
error: Error
|
||||
index:
|
||||
create: Create new content block
|
||||
delete: Delete
|
||||
delete: Delete block
|
||||
title: Content blocks
|
||||
new:
|
||||
back: Back
|
||||
title: Create new content block
|
||||
content_block:
|
||||
body: Body
|
||||
@@ -698,6 +696,7 @@ en:
|
||||
title: Custom images
|
||||
update: Update
|
||||
delete: Delete
|
||||
image: Image
|
||||
update:
|
||||
notice: Image updated successfully
|
||||
error: Image couldn't be updated
|
||||
@@ -715,7 +714,6 @@ en:
|
||||
notice: Page deleted successfully
|
||||
edit:
|
||||
title: Editing %{page_title}
|
||||
back: Back
|
||||
errors:
|
||||
form:
|
||||
error: Error
|
||||
@@ -723,11 +721,10 @@ en:
|
||||
options: Options
|
||||
index:
|
||||
create: Create new page
|
||||
delete: Delete
|
||||
delete: Delete page
|
||||
title: Custom Pages
|
||||
see_page: See page
|
||||
new:
|
||||
back: Back
|
||||
title: Create new custom page
|
||||
page:
|
||||
created_at: Created at
|
||||
|
||||
@@ -679,16 +679,14 @@ es:
|
||||
notice: Bloque borrado correctamente
|
||||
edit:
|
||||
title: Editar bloque
|
||||
back: Volver
|
||||
errors:
|
||||
form:
|
||||
error: Error
|
||||
index:
|
||||
create: Crear nuevo bloque
|
||||
delete: Borrar
|
||||
delete: Borrar bloque
|
||||
title: Bloques
|
||||
new:
|
||||
back: Volver
|
||||
title: Crear nuevo bloque
|
||||
content_block:
|
||||
body: Contenido
|
||||
@@ -698,6 +696,7 @@ es:
|
||||
title: Personalizar imágenes
|
||||
update: Actualizar
|
||||
delete: Borrar
|
||||
image: Imagen
|
||||
update:
|
||||
notice: Imagen actualizada correctamente
|
||||
error: No se ha podido actualizar la imagen
|
||||
@@ -715,7 +714,6 @@ es:
|
||||
notice: Página eliminada correctamente
|
||||
edit:
|
||||
title: Editar %{page_title}
|
||||
back: Volver
|
||||
errors:
|
||||
form:
|
||||
error: Error
|
||||
@@ -723,13 +721,13 @@ es:
|
||||
options: Opciones
|
||||
index:
|
||||
create: Crear nueva página
|
||||
delete: Borrar
|
||||
delete: Borrar página
|
||||
title: Páginas
|
||||
see_page: Ver página
|
||||
new:
|
||||
back: Back
|
||||
title: Página nueva
|
||||
page:
|
||||
actions: Acciones
|
||||
created_at: Creada
|
||||
status: Estado
|
||||
title: Título
|
||||
|
||||
Reference in New Issue
Block a user