Sha256: 18056125be4201487552cfdf95a334839d001fb0b321ca36403bba2ba645cfa0

Contents?: true

Size: 1.58 KB

Versions: 42

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

42 entries across 42 versions & 1 rubygems

Version Path
imagine_cms-3.0.33 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.32 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.31 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.30 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.29 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.28 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.27 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.26 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.25 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.24 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.23.1 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.23 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.22 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.21 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.20 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.19 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.18 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.17 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.16 app/views/management/cms/edit_template.html.erb
imagine_cms-3.0.15 app/views/management/cms/edit_template.html.erb