Sha256: 66588dd83e831ef97d6219b7c16470f4ab16cbec9e4c42db17529d1505c3e335

Contents?: true

Size: 1.02 KB

Versions: 11

Compression:

Stored size: 1.02 KB

Contents

<div id="versions" style="margin-bottom: 20px;">
  <div id="versions-toggle" data-toggle="collapse" data-target="#versions-panel">
    Versions <b class="caret"></b>
  </div>
  <div id="versions-panel" class="collapse">
    <ul class="list-group" style="margin: 0;">
      <% versionable.versions.order(created_at: :desc).each do |version| %>
        <li class="list-group-item">
          Created on <%= version.created_at.localtime.strftime("%m-%d-%Y @ %I:%M%p") %>
          <%= "by #{version.user.email}" if version.user %>
          <span class="pull-right">
            <% if version == versionable.latest_version %>
              Current Version
            <% else %>
              <%= simple_form_for [:dashboard, versionable] do |f| %>
                <%= f.input :draft_version_id, as: :hidden, input_html: { value: version.id } %>
                <%= f.submit "Restore Version", class: "btn btn-success btn-xs" %>
              <% end %>
            <% end %>
          </span>
        </li>
      <% end %>
    </ul>
  </div>
</div>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
storytime-1.2.0 app/views/storytime/dashboard/versions/_versions_info.html.erb
storytime-1.1.1 app/views/storytime/dashboard/versions/_versions_info.html.erb
storytime-1.0.7 app/views/storytime/dashboard/versions/_versions_info.html.erb
storytime-1.0.6 app/views/storytime/dashboard/versions/_versions_info.html.erb
storytime-1.0.5 app/views/storytime/dashboard/versions/_versions_info.html.erb
storytime-1.0.2 app/views/storytime/dashboard/versions/_versions_info.html.erb
storytime-1.0.1 app/views/storytime/dashboard/versions/_versions_info.html.erb
storytime-1.0.0 app/views/storytime/dashboard/versions/_versions_info.html.erb
storytime-0.0.4 app/views/storytime/dashboard/versions/_versions_info.html.erb
storytime-0.0.2 app/views/storytime/dashboard/versions/_versions_info.html.erb
storytime-0.0.1 app/views/storytime/dashboard/versions/_versions_info.html.erb