Sha256: 921a63e096ef911c8cda0211eb4f893cd0b0084049c97fb92d2ae4f8714b3f22

Contents?: true

Size: 1.58 KB

Versions: 7

Compression:

Stored size: 1.58 KB

Contents

<%= flash_message %>

<h2>Edit Template</h2>

<%= form_tag({}, { :onsubmit => "temp_content.toggleEditor();" }) do %>
<table width="100%" height="100%">
  <col width="100" />
  <tr>
    <td>Name:</td>
    <td><%= text_field :temp, :name %></td>
  </tr>
  <tr>
    <td valign="top"><div style="margin-top: 2px">Content:</div></td>
    <td>
      <%= text_area :temp, :content, :class => 'codepress html autocomplete-off', :style => 'width: 100%; height: 600px;' %>
    </td>
  </tr>
  <tr>
    <td></td>
    <td>
      <%= submit_tag 'Save Template', :class => 'form_button' %>
      <button onclick="$('preview_frame').scrollIntoView(); temp_content.toggleEditor(); $('preview_content').value = $('temp_content_cp').value; $('preview_form').submit(); temp_content.toggleEditor(); return false;" class="form_button">Preview</button>
      <%= link_to 'Cancel', :action => 'templates' %>
    </td>
  </tr>
</table>
<br/>

<%= render :partial => 'template_reference' %>
<br/>

<table width="100%">
  <col width="100" />
  <tr>
    <td valign="top"><div style="margin-top: 2px">Preview:</div></td>
    <td>
      <iframe id="preview_frame" name="preview_frame" style="width: 100%; height: 600px; border: 1px solid gray;"></iframe>
      <%= submit_tag 'Save Template', :class => 'form_button' %>
    </td>
  </tr>
</table>
<% end %>


<%= form_tag({ :controller => '/cms/content', :action => 'preview_template' }, :id => 'preview_form', :target => 'preview_frame') do %>
  <%= text_area_tag 'temp[content]', '', :id => 'preview_content', :style => 'display: none;' %>
  <%= hidden_field_tag 'mode', 'preview' %>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
imagine_cms-4.1.4 app/views/management/cms/edit_template.html.erb
imagine_cms-4.1.3 app/views/management/cms/edit_template.html.erb
imagine_cms-4.1.2 app/views/management/cms/edit_template.html.erb
imagine_cms-4.1.1 app/views/management/cms/edit_template.html.erb
imagine_cms-4.1.0 app/views/management/cms/edit_template.html.erb
imagine_cms-4.0.1 app/views/management/cms/edit_template.html.erb
imagine_cms-4.0.0 app/views/management/cms/edit_template.html.erb