Sha256: 8244214d31b01021a43b344db8ac7807544be74bba8722bac84b0ac08bb2c712

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

<% if record.statusable? %>
  <% date_label = local_assigns.fetch(:date_label, 'Published date') %>
  <div class="status-scheduler form-group">
    <%= f.input :status, as: :select, collection: record.class.statuses_for_select.collect { |k, v| [k.titleize, k] }, include_blank: false %>
    <% if record.respond_to?(:published_date) %>
      <%= f.input :published_date,
                  as: :datepicker,
                  hint: "Set the date of this record to a future date and it will be hidden until this time.",
                  input_html: { value: f.object.published_date.presence || Date.today },
                  label: date_label %>
    <% elsif record.respond_to?(:scheduled_date) %>
      <%= f.input :scheduled_date,
                  as: :string,
                  hint: "Set the date of this record to a future date and it will be hidden until this time.",
                  label: date_label,
                  wrapper_html: {
                    class: ('active' if record.scheduled?) } %>
    <% end %>
  </div>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
forest_cms-0.98.1 app/views/admin/form_inputs/_status.html.erb