Name/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' %> |
|||
Title: | <%= text_field :pg, :title, :class => 'form', :style => 'width: 100%;' %> | |||
HTML Head: (for advanced users) |
<%= text_area :pg, :html_head, :class => 'form', :style => 'width: 100%; height: 50px; overflow: auto;' %> | |||
Template: |
<%= select :pg, :cms_template_id, CmsTemplate.find(:all, :order => 'name').collect { |t| [ t.name, t.id ] }, {}, :class => 'form', :style => 'width: 100%;', :onchange => '' %>
<%= render :partial => 'template_options' %>
<%= observe_field 'pg_cms_template_id', :update => 'edit_page_template_options', :with => 'template_id',
:url => { :action => 'show_template_options', :id => @pg },
:loading => "$('edit_page_template_options').innerHTML = 'Loading...';"
%>
|
|||
Article Date: |
|
|||
Tags: | <%= text_field_tag :tags, @tags, :class => 'form', :style => 'width: 100%' %> | |||
Published Version: | <%= select :pg, :published_version, [ [ '[ Offline ]', -1 ], [ '[ Latest Version ]', 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.empty? }", 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.empty? -%>
no thumbnail image selected
<%- 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.empty? -%>
no feature image selected
<%- 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;' %>
|
|||
Custom Attributes: |
<%- @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();" %> <%= hidden_field_tag 'return_to', params[:return_to] %> |