Name (for URL): |
<%= text_field :pg, :name, class: 'form', style: 'margin-bottom: 0; width: 150px', onchange: (@pg.new_record? ? '' : "if (!confirm('Are you sure you want to change the name of this page? Any bookmarks or links to this page will no longer work if you proceed with this change.')) { this.value = $('original_name').value; };") %> <%= text_field_tag :original_name, @pg.name, style: 'display: none' %> <%= text_field :pg, :parent_id, style: 'display: none' %> |
|||
Page Title: | <%= text_field :pg, :title, class: 'form', style: 'width: 100%;' %> | |||
Page Type: | <%= radio_button :pg, :redirect_enabled, false %> Normal <%= radio_button :pg, :redirect_enabled, true %> Redirect to: <%= text_field :pg, :redirect_to %> | |||
Template: |
<%= select :pg, :cms_template_id, CmsTemplate.order(:name).map { |t| [ t.name, t.id ] }, {}, class: 'form', style: 'width: 100%;' %>
<%= render partial: 'template_options' %>
|
|||
Article Date: |
|
|||
Tags: | <%= text_field_tag :tags, @tags, class: 'form', style: 'width: 100%' %> | |||
Publish Version: | <%= select :pg, :published_version, [ [ '[ None (offline) ]', -1 ], [ '[ Latest ]', 0 ] ].concat(@pg.versions.reverse.map { |pg| [ "#{pg.version} - #{ts_to_str pg.updated_on}#{" by #{pg.updated_by_username}" unless pg.updated_by_username.blank? }", pg.version ] }), {}, class: 'form', style: 'width: 100%' %> | |||
Publish Date: |
|
|||
Expiration Date: |
|
|||
Summary: |
<%= text_area :pg, :summary, class: 'form', style: 'width: 100%; height: 50px;' %> | |||
Thumbnail: | <%- if @pg.new_record? -%> A thumbnail cannot be added until you save this page. <%- else -%> <%= button_to_function "Select Thumbnail...", "selectThumbnail('#{url_for action: 'upload_thumb', id: @pg}');", class: 'form_button' %> <%- if @pg.thumbnail_path.present? -%> <%= button_to_function "Remove", "jQuery('#thumbnail_preview').css({ 'background-image': 'none' }); jQuery('#pg_thumbnail_path').val(''); jQuery(this).remove();", class: 'form_button' %> <%- end -%> <%= text_field :pg, :thumbnail_path, class: 'form', style: 'width: 100%; display: none;' %> <%- end -%> | |||
Feature Image: | <%- if @pg.new_record? -%> A feature image cannot be added until you save this page. <%- else -%> <%= button_to_function "Select Feature Image...", "selectThumbnail('#{url_for action: 'upload_feature_image', id: @pg}');", class: 'form_button' %> <%- if @pg.feature_image_path.present? -%> <%= button_to_function "Remove", "jQuery('#feature_image_preview')..css({ 'background-image': 'none' }); jQuery('#pg_feature_image_path').val(''); jQuery(this).remove();", class: 'form_button' %> <%- end -%> <%= text_field :pg, :feature_image_path, class: 'form', style: 'width: 100%; display: none;' %> <%- end -%> | |||
HTML Head: (advanced) |
<%= text_area :pg, :html_head, class: 'form', style: 'width: 100%; height: 35px; overflow: auto;' %> | |||
Custom Attributes: (advanced) |
<%- @page_objects.to_h.each do |key, val| -%>
<%- key =~ /^obj-(\w+?)-(.+?)$/ -%>
<%= render partial: 'page_attribute', locals: { name: $2 } if $1 == 'attribute' %>
<%- end -%>
|
|||
<%= submit_tag 'Save', id: 'btn_save', class: 'form_button', style: 'width: 70px;' %> <%= link_to_function 'Cancel', "cancelEditProperties();", style: 'font-weight: normal;' %> <%= hidden_field_tag 'return_to', params[:return_to] %> |