<% if(logged_in? && @page && !@hide_page_toolbar) %> <% status = @page.live? ? 'published' : 'draft' %> <%= image_tag "cms/page_toolbar/page_toolbar_l.gif", :style => "float: left;" %> <%= image_tag "cms/page_toolbar/status_#{status}_l.gif", :style => "float: left;" %> <%= image_tag "cms/page_toolbar/page_toolbar_r.gif", :style => "float: right;" %>
Status:
<%= image_tag "cms/page_toolbar/page_toolbar_inset_#{ status }_l.gif", :style => "float: left;" %>
<%= status %>
<%= image_tag "cms/page_toolbar/page_toolbar_inset_#{ status }_r.gif", :style => "float: left;" %>
Section:
<%= image_tag "cms/page_toolbar/page_toolbar_inset_l.gif", :style => "float: left;" %> <%= image_tag "cms/page_toolbar/page_toolbar_inset_r.gif", :style => "float: left;" %>
Page:
<%= image_tag "cms/page_toolbar/page_toolbar_inset_l.gif", :style => "float: left;" %>
<%= h(@page.name) %>
<%= image_tag "cms/page_toolbar/page_toolbar_inset_r.gif", :style => "float: left;" %>
Template:
<%= image_tag "cms/page_toolbar/page_toolbar_inset_l.gif", :style => "float: left;" %>
<%= h(@page.template_name) %>
<%= image_tag "cms/page_toolbar/page_toolbar_inset_r.gif", :style => "float: left;" %>
Version:
<%= image_tag "cms/page_toolbar/page_toolbar_inset_l.gif", :style => "float: left;" %>
<%= h(@page.version) %><%= ' (LIVE)' if @page.live_version && @page.version == @page.live_version.version %>
<%= image_tag "cms/page_toolbar/page_toolbar_inset_r.gif", :style => "float: left;" %>
<%= link_to "Publish", @page.live? ? '#' : publish_cms_page_path(@page), :id => "publish_button", :class => "http_put button#{' disabled' if !current_user.able_to?(:publish_content) || @page.version != @page.draft.version || @page.live?} left", :target => "_top" %> <%= link_to "Assign", new_cms_page_task_path(@page), :id => "assign_button", :class => "button#{ ' disabled' if @page.assigned_to == current_user} middle", :target => "_top" %> <%= link_to "Complete Task", @page.current_task ? complete_cms_task_path(@page.current_task) : '#', :id => "complete_task_button", :class => "http_put button#{ ' disabled' unless @page.assigned_to == current_user} right", :target => "_top" %> <%= link_to "Edit Properties", [:edit, :cms, @page], :id => "edit_properties_button", :class => "spacer button", :target => "_top" %> <%= link_to "List Versions", versions_cms_page_path(@page), :class => "spacer button left", :target => "_top" %> <% able_to? :publish_content do %> <% if @page.draft_version? %> <%= link_to " Delete", [:cms, @page], :id => "delete_button", :title => "Are you sure you want to delete '#{@page.name}'?", :target => "_top", :class => "button confirm_with_title http_delete right" %> <% else %> <%= link_to "Revert to this Version", revert_to_cms_page_path(@page, @page.version), :id => "revert_button", :class => "button http_put", :target => "_top" %> <% end %> <% end %>
<% if @page.version == @page.draft.version %>
Visual Editor:
<% if @mode == "edit" %>
ON
<% else %>
OFF
<% end %>
<% if @mode == "edit" %>
<%= link_to 'TURN OFF', url_with_mode(request.referrer, "view"), :target => "_top", :class => "sm_button" %>
<% else %>
<%= link_to 'TURN ON', url_with_mode(request.referrer, "edit"), :target => "_top", :class => "sm_button" %>
<% end %>
<% else %>
<%= link_to("View Current Version", @page.path, :class => "button current_version", :target => "_top") %> <% end %>
<% end %>