Sha256: e9f8b1a6be02d625c9e8309dffdd24192a9f3631ebef25966a1520aa34d10c39

Contents?: true

Size: 1.58 KB

Versions: 8

Compression:

Stored size: 1.58 KB

Contents

<%= simple_form_for [:dashboard, @snippet], remote: true, html: { class: "storytime-modal-form #{'edit-snippet-form' unless @snippet.new_record?}", data: { redirect: "index" } } do |f| %>
  <div class="scroll-panel wysiwyg" id="wysiwyg-snippet">
    <div class="scroll-panel-header">
      <%= link_to icon("angle-left"), [:dashboard, Storytime::Snippet], class: "btn btn-sm btn-default pull-left storytime-modal-trigger", remote: true %>
      <div class="pull-right">
        <%= link_to "HTML", "#", class: "toggle-codemirror btn btn-sm btn-default", style: "margin-right: 10px;", data: { toggle: "codemirror" }  %>
        <%= f.submit "Save", class: "btn btn-sm btn-primary btn-outline pull-right" %>
      </div>
      
      <h3 class="scroll-panel-title">
        <%= @snippet.new_record? ? "New" : "Edit" %> Text Snippet
      </h3>
    </div>
    <div class="scroll-panel-body">
      
      <input type="hidden" value="<%= params[:controller].camelize %>" id="storytime-modal-controller">
      <input type="hidden" value="<%= params[:action].camelize %>" id="storytime-modal-action">

      <%= f.error_notification %>
      <%= f.input :name, autofocus: true %>
      <div class="editor">
        <!-- Do not add any extra whitespace inside this div. It gets copied into the post content. -->
        <div class="medium-editor" id="medium-editor-snippet" data-input="#snippet_content" contenteditable='true' style="outline: none;"><%= raw @snippet.content %></div>
      </div>
      <%= f.input :content, as: :text, label: false, input_html: { class: "codemirror" }  %>
      
    </div>
  </div>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
storytime-2.1.6 app/views/storytime/dashboard/snippets/_form.html.erb
storytime-2.1.5 app/views/storytime/dashboard/snippets/_form.html.erb
storytime-2.1.4 app/views/storytime/dashboard/snippets/_form.html.erb
storytime-2.1.3 app/views/storytime/dashboard/snippets/_form.html.erb
storytime-2.1.2 app/views/storytime/dashboard/snippets/_form.html.erb
storytime-2.1.1 app/views/storytime/dashboard/snippets/_form.html.erb
storytime-2.1.0 app/views/storytime/dashboard/snippets/_form.html.erb
storytime-2.0.0 app/views/storytime/dashboard/snippets/_form.html.erb