Sha256: 9e9643283dd946e6339f968e6834f63b0202f7a1b3aa272cff35d51a4de7f3b9

Contents?: true

Size: 1.91 KB

Versions: 1

Compression:

Stored size: 1.91 KB

Contents

<%= stylesheet_link_tag 'rails_admin/content_builder', 'data-turbolinks-track' => false %>
<%= javascript_include_tag 'rails_admin/content_builder', 'data-turbolinks-track' => false %>

<div class="cb-snippet">
  <%= link_to '#', class: 'cb-snippet__btn', data: {snippet: '1'} do %>
    <%= image_tag 'cb-snippet-text.jpg', class: 'cb-snippet__image' %>
  <% end %>

  <%= link_to '#', class: 'cb-snippet__btn', data: {snippet: '2'} do %>
    <%= image_tag 'cb-snippet-image-text.jpg', class: 'cb-snippet__image' %>
  <% end %>

  <%= link_to '#', class: 'cb-snippet__btn', data: {snippet: '3'} do %>
    <%= image_tag 'cb-snippet-text-image.jpg', class: 'cb-snippet__image' %>
  <% end %>

  <%= link_to '#', class: 'cb-snippet__btn', data: {snippet: '4'} do %>
    <%= image_tag 'cb-snippet-image.jpg', class: 'cb-snippet__image' %>
  <% end %>

  <%= link_to '#', class: 'cb-snippet__btn', data: {snippet: '5'} do %>
    <%= image_tag 'cb-snippet-video.jpg', class: 'cb-snippet__image' %>
  <% end %>
</div>

<%= simple_form_for rails_admin.content_builder_url(@abstract_model.to_param, id: @object.id), html: { class: 'cb-form' }, remote: false do |f| %>
  <div class="cb-controls">
    <%= f.button :submit, t('admin.actions.content_builder.button.save'), name: 'save', class: 'btn btn-block btn-primary' %>
    <% if @object.status %>
      <%= f.button :submit, t('admin.actions.content_builder.button.unpublish'), name: 'unpublish', class: 'btn btn-block btn-danger' %>
    <% else %>
      <%= f.button :submit, t('admin.actions.content_builder.button.publish'), name: 'publish', class: 'btn btn-block btn-success' %>
    <% end %>
  </div>

  <div class="cb-container">
    <%= @object.content.try(:html_safe) %>
  </div>

  <%= f.input :id, as: :hidden, :input_html => { :name => "id", :value => @object.id } %>
  <%= f.input :content, as: :hidden, :input_html => { :name => "content", :id => "content", :value => @object.content } %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_admin_content_builder-1.0.3 app/views/rails_admin/main/content_builder.html.erb