instiki/app/views/wiki/page.rhtml
Jacques Distler 3ca33e52b5 Cleanup
Got rid of redcloth_for_tex.
Fixed almost all the busted tests.
2007-06-13 01:56:44 -05:00

52 lines
1.7 KiB
Plaintext

<%
@title = @page.plain_name
@title += ' (changes)' if @show_diff
@show_footer = true
%>
<div id="revision">
<% if @show_diff %>
<p class="show_diff">
Showing changes from revision #<%= @page.revisions.size - 1 %> to #<%= @page.revisions.size %>:
<ins class="diffins">Added</ins> | <del class="diffdel">Removed</del> | <del class="diffmod">Chan</del><ins class="diffmod">ged</ins>
</p>
<%= @renderer.display_diff %>
<% else %>
<%= @renderer.display_content %>
<% end %>
</div>
<div class="byline">
<%= @page.revisions? ? "Revised" : "Created" %> on <%= format_date(@page.revised_at) %>
by <%= author_link(@page).delete("\x01-\x08\x0B\x0C\x0E-\x1F") %>
<%= "(#{@page.author.ip})" if @page.author.respond_to?(:ip) %>
<% if @web.count_pages? %>
<% total_chars = @page.content.length %>
(<%= total_chars %> characters / <%= sprintf("%-.1f", (total_chars / 2275 rescue 0)) %> pages)
<% end %>
</div>
<div class="navigation">
<%= navigation_menu_for_page.join(' | ') %>
<span class="views">
| Views:
<%= link_to('Print',
{ :web => @web.address, :action => 'print', :id => @page.name },
{ :accesskey => 'p', :id => 'view_print' }) %>
<% if @web.markup == :markdownMML or @web.markup == :markdown %>
|
<%= link_to 'TeX', {:web => @web.address, :action => 'tex', :id => @page.name},
{:id => 'view_tex'} %>
<% if WikiReference.pages_in_category(@web, 'S5-slideshow').map.include?(@page.name) %>
|
<%= link_to 'S5', {:web => @web.address, :action => 's5', :id => @page.name},
{:id => 'view_S5'} %>
<% end %>
<% end %>
</span>
<%= render :partial => 'inbound_links' %>
</div>