Sha256: 5fd5ed11e084c9426ae36f6fbcaa2a254b493020ea0fc91f25d5b1597d74401d

Contents?: true

Size: 1.15 KB

Versions: 21

Compression:

Stored size: 1.15 KB

Contents

<% checkbox = check_box_tag :page_public, nil, @page.public?, name: nil,
  data: {date_format: I18n.t(:datetimepicker, scope: 'time.formats')},
  disabled: @page.attribute_fixed?(:public_on) %>

<label class="checkbox">
<% if @page.attribute_fixed?(:public_on) || @page.attribute_fixed?(:public_until) %>
  <span class="with-hint">
    <%= checkbox %>
    <%= Alchemy::Page.human_attribute_name :public %>
    <span class="hint-bubble">
      <%= Alchemy.t(:attribute_fixed) %>
    </span>
  </span>
<% else %>
  <%= checkbox %>
  <%= Alchemy::Page.human_attribute_name :public %>
<% end %>
</label>

<%= content_tag :div, class: [
  @page.public_on.present? || @page.public_until.present? ? nil : 'hidden',
  'page-publication-date-fields',
  'input-row'
] do %>
  <div class="input-column">
    <label><%= Alchemy.t(:from) %></label>
    <%= alchemy_datepicker @page, :public_on, type: :datetime,
      disabled: @page.attribute_fixed?(:public_on) %>
  </div>
  <div class="input-column">
    <label><%= Alchemy.t(:until) %></label>
    <%= alchemy_datepicker @page, :public_until, type: :datetime,
      disabled: @page.attribute_fixed?(:public_until) %>
  </div>
<% end %>

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
alchemy_cms-4.0.6 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-3.6.7 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-3.6.6 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-4.0.5 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-4.0.4 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-4.0.3 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-3.6.5 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-4.0.2 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-4.0.1 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-3.6.4 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-4.0.0 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-3.6.3 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-3.6.2 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-4.0.0.rc2 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-4.0.0.rc1 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-3.6.1 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-4.0.0.beta app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-3.6.0 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-3.5.0 app/views/alchemy/admin/pages/_publication_fields.html.erb
alchemy_cms-3.5.0.rc2 app/views/alchemy/admin/pages/_publication_fields.html.erb