<% content_for :page_scripts do %> function open_content_dialog(type, content_id) { var $this = $(this); var outputHolder = $("
Please wait whilst content is loaded
"); $("body").append(outputHolder); outputHolder.load("/page/<%= @page.id %>/content/" + content_id + "/" + type, null, function() { outputHolder.dialog({modal: true, height: 600, width: 600}); }); return false; } <% end %> <% right_column %> <% content_for :main do %>

Page '<%= @page.title %>'

<%# TODO: render(:partial=>"favourite_link", :locals=>{:page_url=>@page.full_path }) %>
<% unless @page.is_stub? %>
<%= icon_to "View", @page.full_path, false, :method=>:get %> <%= icon_to("Edit", @page.full_path+"?edit=1") unless @page.is_stub? || @page.locked? %>
<% end %>

Summary

<%= icon_to "Edit Info", "/page/#{@page.id}/edit" unless @page.locked? %> <% if @page.status.is_published==0 %> <%= link_to "Publish", "/page/#{@page.id}/info?publish=1", {:method=>:post, :class=>"action"} unless @page.is_stub? || @page.locked? %> <% end %> <% if @page.is_deleted==0 %> <%= link_to "Delete", "/page/#{@page.id}", {:confirm=>"Are you sure?", :method=>:delete, :disable_with=>"Deleting", :class=>"action"} unless @page.locked? %> <% else %> <%= link_to "UnDelete", "/page/#{@page.id}/undelete", {:method=>:delete, :disable_with=>"Undeleting", :class=>"action"} %> <%= link_to "Destroy", "/pages/#{@page.id}?destroy=1", {:confirm=>"Are you sure? If you go ahead with this the page will be gone forever and cannot be recovered.", :method=>:delete, :disable_with=>"Destroying", :class=>"action advanced"} %> <% end %> <%= icon_to "Copy", "/page/#{@page.id}/copy", false, :method=>:post unless @page.is_stub? %>
<% if @page.is_deleted==1 %> <% end %> <% if @page.is_stub? %> <% end %> <% if @page.page_template && @page.page_template.has_mobile_version? && feature?("mobile_templates") %> <% end %> <% first = true %> <% if @page.page_template && @page.page_template.page_template_terms.count > 0 %> <% if @page.terms.size > 0 %> <% @page.terms.each do |term| %> <% end %> <% else %> <% end %> <% end %> <% if @page.is_favourite?(current_user) %> <% else %> <% end %> <% if @being_edited_by.size>0 %> <% end %> <% if Preference.get_cached(_sid, "show_include_in_sitemap")=="true" %> <% if @page.in_sitemap? %> <% else %> <% end %> <% end %> <% if feature?('comments') %> <% end %>
Title <%= @page.title %>
This page is currently deleted - it won't be visible to users
This page is only a stub page - it can't be edited or published
To make the page editable you should click "Edit Info" above, then choose a template and change the status to something other than "Stub".
Status: <%= @page.status.name %>
Locked: <%= @page.locked? ? "Yes" : "No" %> <%= link_to @page.locked? ? "No" : "Yes", "/page/#{@page.id}/info?locked=#{!@page.locked?}", :class=>"action", :method=>:post %>
Path: <%= @page.full_path %>
Links To This Page: <%= PageLink.sys(_sid).where(:url=>@page.full_path).count %>
Template: <%= link_to(@page.page_template.name, "/admin/page_templates/#{@page.page_template_id}") rescue '' %> <%= icon_to "Change", "/page/#{@page.id}/page_template", false, :style=>"position:relative; left: -3px;" %>
Use Mobile Version: <%= @page.mobile_dif==1 ? 'Yes' : 'No' %> <%= link_to @page.mobile_dif==1 ? 'No' : 'Yes', "/page/#{@page.id}/info?mobile_dif=#{@page.mobile_dif==1 ? 0 : 1}", :class=>"action", :method=>:post %>
Tags: <%= field_reveal(@page.tags, 200) %>
<% if first %>Terms: <% else %> <% end %> <% if term.page_template_term %> <%= term.page_template_term.name %> : <%= term.value %> <% end %> <% if first %> <%= icon_to "Edit", "/page/#{@page.id}/terms", false, :style=>"margin-left: 10px;" %> <% first = false %> <% else %>   <% end %>
Terms:   <%= icon_to "Edit", "/page/#{@page.id}/terms", false, :style=>"margin-left: 10px;" %>
Meta Description: <%= field_reveal(@page.meta_description, 80) %>
Meta Keywords: <%= field_reveal(@page.meta_keywords, 80) %>
Created: <%= time_ago_in_words(@page.created_at) %> ago @ <%= @page.updated_at %>
Updated: <%= time_ago_in_words(@page.updated_at) %> ago @ <%= @page.updated_at %>
Published At: <% if @page.published_at %> <%= time_ago_in_words(@page.published_at) %> ago @ <%= @page.published_at.to_s rescue '' %> <% end %>
Favourite:Yes <%= link_to "Remove", "/pages/#{@page.id}/favourite", :method=>:delete, :class=>"action" %>No <%= link_to "Add", "/pages/#{@page.id}/favourite", :method=>:post, :class=>"action" %>
Currently editing: <%= @being_edited_by.join(',') %> <%= link_to "Clear", "/pages/notification/#{@page.id}/delete", {:method=>:post, :class=>"action"} %>
Home Page: This page <%= @page.is_home_page? ? 'is' : 'is not' %> the home page. <% unless @page.is_home_page? %> <%= link_to 'Make it the home page', "/page/#{@page.id}/make_home", :method=>:post, :class=>"action", :confirm=>"Are you sure you want to make this page the home page?" if @page.status==Status.published_status(_sid) && !@page.is_deleted? %> <% end %>  
Include in sitemap:Yes<%= link_to "Don't Include", "/page/#{@page.id}/info?sitemap=0", :class=>"action", :style=>"margin-left: 10px;", :method=>:post, :class=>"action" %>No<%= link_to "Do Include", "/page/#{@page.id}/info?sitemap=1", :class=>"action", :style=>"margin-left: 10px;", :method=>:post, :class=>"action" %>
Anon Comments <%= @page.allow_anonymous_comments? ? "Yes" : "No" %> <%= link_to @page.allow_anonymous_comments? ? "No" : "Yes", "/page/#{@page.id}/info?anonymous_comments=#{!@page.allow_anonymous_comments?}", :class=>"action", :method=>:post %>
User Comments <%= @page.allow_user_comments? ? "Yes" : "No" %> <%= link_to @page.allow_user_comments? ? "No" : "Yes", "/page/#{@page.id}/info?user_comments=#{!@page.allow_user_comments?}", :class=>"action", :method=>:post %>

Show: <%= icon_to "Links", "/page/#{@page.id}/links", false %> <%= icon_to "Page Analysis", "/db/content/analyse/#{@page.id}", false, :class=>"icon_stack advanced" %> <%= icon_to "Content", "/page/#{@page.id}/contents", false, :class=>"advanced" %> <%= icon_to "Blocks Used", "/admin/block_instances?page_id=#{@page.id}", false, :class=>"advanced" %> <%= icon_to_function "Access Permissions", "$('#access').slideDown(); $('#show_access_link').hide();",false, {:id=>'show_access_link', :class=>"icon_stack"} %>

Menus

<% on_menu = {} %> <% @page.menu_items.each do |menu_item| %> <% on_menu[menu_item.menu_id] = 1 %> <% end %> <% menus = Menu.sys(@page.system_id).order("name").all %> <% c = 0 %> <% menus.each { |menu| c += 1 unless on_menu[menu.id] || @page.is_deleted? } %> <% if c>0 %> <% end %>
Menu: <%= link_to menu_item.menu.name, "/menu/#{menu_item.menu_id}" %> Item: <%= "#{menu_item.parent.name} →".html_safe if menu_item.parent_id != 0 && menu_item.parent %> <%= menu_item.name %>
<%= icon_to "Remove", "/menu/item/#{menu_item.id}", false, :method=>:delete %>
Append to menu: <% menus.each do |menu| %> <% next if on_menu[menu.id] || @page.is_deleted? %> <%= icon_to_function menu.name, "$('#parents_#{menu.id}').show();" %> <% end %>
<% menus.each do |menu| %> <% next if on_menu[menu.id] || @page.is_deleted? %> <% end %>

Notes

You can add any number of notes or comments to the page. These are not visible to your users, only to people who are allowed to edit the page. The notes can also be viewed whilst you're editing the page.

Revisions

This section shows details of the life of the page. When the content is changed the older versions are kept and can be seen by clicking History and then View next to the version you want to see. Once a page has been published you can create a draft and edit a draft revision. Ordinarily when you edit the content on a published page your users would see those changes immediately, but if you edit a draft revision they won't see the changes you're making until you publish the draft. Note that older versions of drafts are not recorded.
<% if @page.page_contents.where(:version=>-2).count>0 %>

Content Auto Saves

These are versions of the content that have been saved automatically by the editor. When you explicitly save your content these are removed, so their presence suggests that the editor abandoned their changes either deliberately or because of a technical problem. You can recover the autosaved versions by Viewing them and then pasting them in to the editor.
<%= icon_to "Remove", "/page/#{@page.id}/auto_saves/contents", false, :confirm=>"Are you sure? This cannot be undone", :method=>:delete %>
<% end %> <% if @page.block_instances.where(:version=>-2).count>0 %>

Block Auto Saves

There are versions of blocks (with their options) that have been saved automatically by the editor. When you explicitly save your content these are removed, so their presence suggests that the editor abandoned their changes or there was a technical problem. You can click each one to view its contents.
<%= icon_to "Remove", "/page/#{@page.id}/auto_saves/blocks", false, :confirm=>"Are you sure? This cannot be undone", :method=>:delete %>
<% end %> <% end %>