Sha256: 9f109a1b76241a8739d39eb57aa254864b089432bda3a3ba1294cdf23416ae6f

Contents?: true

Size: 1.25 KB

Versions: 25

Compression:

Stored size: 1.25 KB

Contents

<% content_for :browser_title, "#{@template.name} | Templates" %>
<% content_for :title, "Templates" %>

<%= render :partial => "secondary_nav" %>

<%= semantic_form_for @template do |f| %>
  <%= f.inputs do %>
    <%= f.input :content, :label => "Template Content", input_html: { id: "template_content-#{@template.id}" } %>
    <div id="template_content_editor-<%= @template.id %>" class="template_content_editor"></div>
  <% end %>
  <%= f.actions do %>
    <%= f.text_field :name %>
    <%= f.action :submit, :label => "Save this #{@template.template_type.capitalize}" %>
  <% end %>
<% end %>

<% content_for :javascript do %>
  <%= javascript_tag do %>
    ace_edit(<%= @template.id %>, '<%= @template_editor_type %>');
  <% end %>
<% end %>

<% content_for :related do %>
  <% unless @template.pages.empty? %>
    <div class="well well-small">
      Pages using this template:
      <ul>
        <% @template.pages.each do |page| %>
        <li><%= link_to page.title, edit_page_path(page.id) %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <p><%= link_to "Delete #{@template.template_type.capitalize}", @template, method: :delete, data: { confirm: "Are you sure you want to delete this #{@template.template_type}?" }, class: 'btn btn-danger' %></p>
<% end %>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
smithycms-0.8.1 app/views/smithy/templates/edit.html.erb
smithycms-0.7.3 app/views/smithy/templates/edit.html.erb
smithycms-0.7.2 app/views/smithy/templates/edit.html.erb
smithycms-0.7.1 app/views/smithy/templates/edit.html.erb
smithycms-0.7.0 app/views/smithy/templates/edit.html.erb
smithycms-0.6.10 app/views/smithy/templates/edit.html.erb
smithycms-0.5.99.3 app/views/smithy/templates/edit.html.erb
smithycms-0.6.9 app/views/smithy/templates/edit.html.erb
smithycms-0.6.7 app/views/smithy/templates/edit.html.erb
smithycms-0.6.6 app/views/smithy/templates/edit.html.erb
smithycms-0.6.5 app/views/smithy/templates/edit.html.erb
smithycms-0.6.4 app/views/smithy/templates/edit.html.erb
smithycms-0.6.3 app/views/smithy/templates/edit.html.erb
smithycms-0.5.99.2 app/views/smithy/templates/edit.html.erb
smithycms-0.5.99.1 app/views/smithy/templates/edit.html.erb
smithycms-0.5.99 app/views/smithy/templates/edit.html.erb
smithycms-0.6.2 app/views/smithy/templates/edit.html.erb
smithycms-0.6.1 app/views/smithy/templates/edit.html.erb
smithycms-0.5.2 app/views/smithy/templates/edit.html.erb
smithycms-0.6.0 app/views/smithy/templates/edit.html.erb