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.find(:all, :order => 'name').collect { |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 -%>
<%- if @pg.thumbnail_path.blank? -%>
<%- else -%>
<%= image_tag(@pg.thumbnail_path, :onclick => "jQuery('#pg_thumbnail_path').show();") %>
<%- end -%>
<%= button_to_function "Select Thumbnail...",
"selectThumbnail('#{url_for :action => 'upload_thumb', :id => @pg}');",
:class => 'form_button' %>
<%- end -%>
<%= text_field :pg, :thumbnail_path, :class => 'form', :style => 'width: 100%; display: none;' %>
|
|||
Feature Image: |
<%- if @pg.new_record? -%>
A feature image cannot be added until you save this page.
<%- else -%>
<%- if @pg.feature_image_path.blank? -%>
<%- else -%>
<%= image_tag(@pg.feature_image_path, :onclick => "jQuery('#pg_feature_image_path').show();") %>
<%- end -%>
<%= button_to_function "Select Feature Image...",
"selectThumbnail('#{url_for :action => 'upload_feature_image', :id => @pg}');",
:class => 'form_button' %>
<%- end -%>
<%= text_field :pg, :feature_image_path, :class => 'form', :style => 'width: 100%; display: none;' %>
|
|||
HTML Head: (advanced) |
<%= text_area :pg, :html_head, :class => 'form', :style => 'width: 100%; height: 35px; overflow: auto;' %> | |||
Custom Attributes: (advanced) |
<%- @page_objects.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] %> |