Sha256: 6bf9629afd8a4d28c8a7375db825328e7d786ea013d3713c71e3823513e0eeca

Contents?: true

Size: 1.52 KB

Versions: 49

Compression:

Stored size: 1.52 KB

Contents

<%= flash_message %>

<h2>Edit Snippet</h2>

<%= form_tag({}, { :onsubmit => "snip_content.toggleEditor();" }) do %>
<table width="100%" height="100%">
  <col width="100" />
  <tr>
    <td>Name:</td>
    <td><%= text_field :snip, :name %></td>
  </tr>
  <tr>
    <td valign="top"><div style="margin-top: 2px">Content:</div></td>
    <td>
      <%= text_area :snip, :content, :class => 'codepress html autocomplete-off', :style => 'width: 100%; height: 600px;' %>
    </td>
  </tr>
  <tr>
    <td></td>
    <td>
      <%= submit_tag 'Save Snippet', :class => 'form_button' %>
      <button onclick="$('preview_frame').scrollIntoView(); snip_content.toggleEditor(); $('preview_content').value = $('snip_content_cp').value; $('preview_form').submit(); snip_content.toggleEditor(); return false;" class="form_button">Preview</button>
      <%= link_to 'Cancel', :action => 'snippets' %>
    </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 Snippet', :class => 'form_button' %>
    </td>
  </tr>
</table>
<% end %>


<form id="preview_form" action="<%= url_for :controller => '/cms/content', :action => 'preview_template' %>" target="preview_frame">
  <textarea id="preview_content" name="temp[content]" style="display: none;"></textarea>
</form>

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
imagine_cms-4.1.4 app/views/management/cms/edit_snippet.html.erb
imagine_cms-4.1.3 app/views/management/cms/edit_snippet.html.erb
imagine_cms-4.1.2 app/views/management/cms/edit_snippet.html.erb
imagine_cms-4.1.1 app/views/management/cms/edit_snippet.html.erb
imagine_cms-4.1.0 app/views/management/cms/edit_snippet.html.erb
imagine_cms-4.0.1 app/views/management/cms/edit_snippet.html.erb
imagine_cms-4.0.0 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.33 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.32 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.31 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.30 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.29 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.28 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.27 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.26 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.25 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.24 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.23.1 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.23 app/views/management/cms/edit_snippet.html.erb
imagine_cms-3.0.22 app/views/management/cms/edit_snippet.html.erb