Custom content blocks for top_links and footer
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<%= form_for [:admin, @content_block], html: {class: "edit_page", data: {watch_changes: true}} do |f| %>
|
||||
|
||||
<% if @content_block.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>
|
||||
|
||||
<strong>
|
||||
<%= @content_block.errors.count %>
|
||||
<%= t("admin.site_customization.content_blocks.errors.form.error", count: @content_block.errors.count) %>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
<% end %>
|
||||
@@ -0,0 +1,15 @@
|
||||
<% provide :title do %>
|
||||
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 %>
|
||||
|
||||
<%= 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" %>
|
||||
|
||||
<div class="row margin-top">
|
||||
<h2><%= t("admin.site_customization.content_blocks.edit.title") %></h2>
|
||||
<%= render 'form' %>
|
||||
</div>
|
||||
@@ -0,0 +1,29 @@
|
||||
<% provide :title do %>
|
||||
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" %>
|
||||
<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>
|
||||
@@ -0,0 +1,14 @@
|
||||
<% provide :title do %>
|
||||
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 %>
|
||||
|
||||
<div class="row margin-top">
|
||||
<h2><%= t("admin.site_customization.content_blocks.new.title") %></h2>
|
||||
<%= render 'form' %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user