<% 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".html_safe, @page.live? ? '#' : cms.publish_page_path(@page), :id => "publish_button", :class => "http_put button#{' disabled' if !current_user.able_to?(:publish_content) || !current_user.able_to_edit?(@page) || @page.version != @page.draft.version || @page.live?} left", :target => "_top" %> <%= link_to "Assign".html_safe, cms.new_page_task_path(@page), :id => "assign_button", :class => "button#{ ' disabled' if @page.assigned_to == current_user || !current_user.able_to_edit?(@page) } middle", :target => "_top" %> <%= link_to "Complete Task".html_safe, @page.current_task ? cms.complete_task_path(@page.current_task) : '#', :id => "complete_task_button", :class => "http_put button#{ ' disabled' if @page.assigned_to != current_user || !current_user.able_to_edit?(@page) } right", :target => "_top" %> <%= link_to "Edit Properties".html_safe, [:edit, @page], :id => "edit_properties_button", :class => "spacer button#{ ' disabled' unless current_user.able_to_edit?(@page) }", :target => "_top" %> <%= link_to "List Versions".html_safe, cms.versions_page_path(@page), :class => "spacer button#{ ' disabled' unless current_user.able_to_edit?(@page) }", :target => "_top" %> <%= able_to? :publish_content do %> <% if @page.draft_version? %> <%= link_to " Delete".html_safe, [@page], :id => "delete_button", :title => "Are you sure you want to delete '#{@page.name}'?", :target => "_top", :class => "spacer button confirm_with_title http_delete#{ ' disabled' unless current_user.able_to_publish?(@page) }" %> <% else %> <%= link_to "Revert to this Version".html_safe, cms.revert_page_path(@page, @page.version), :id => "revert_button", :class => "button http_put", :target => "_top" %> <% end %> <% end %> <%= render :partial => "cms/toolbar/mobile_toggle" %>
<% if @page.version == @page.draft.version %>
Visual Editor:
<% if @mode == "edit" %>
>ON<%= '*' unless current_user.able_to_edit?(@page) %>
<% else %>
OFF
<% end %>
<% if @mode == "edit" %>
<%= link_to 'TURN OFF'.html_safe, url_with_mode(request.referrer, "view"), :target => "_top", :class => "sm_button" %>
<% else %>
<%= link_to 'TURN ON'.html_safe, url_with_mode(request.referrer, "edit"), :target => "_top", :class => "sm_button" %>
<% end %>
<% else %>
<%= link_to("View Current Version".html_safe, @page.path, :class => "button current_version", :target => "_top") %> <% end %>
<% end %>