A little whitespace cleanup in Views

This commit is contained in:
Jacques Distler 2008-12-15 13:19:22 -06:00
parent 3bef45277f
commit 14561d998d
23 changed files with 126 additions and 127 deletions

View file

@ -1,4 +1,4 @@
<% @title = "Instiki Setup"; @content_width = 500 %> <%- @title = "Instiki Setup"; @content_width = 500 -%>
<p> <p>
Congratulations on succesfully installing and starting Instiki. Congratulations on succesfully installing and starting Instiki.

View file

@ -1,4 +1,4 @@
<% @title = "New Wiki Web"; @content_width = 500 %> <%- @title = "New Wiki Web"; @content_width = 500 -%>
<p> <p>
Each web serves as an isolated name space for wiki pages, Each web serves as an isolated name space for wiki pages,
@ -36,7 +36,7 @@
<input type="submit" value="Create Web" /> <input type="submit" value="Create Web" />
</p> </p>
<% end %> <%- end -%>
<script type="text/javascript"> <script type="text/javascript">
function proposeAddress() { function proposeAddress() {

View file

@ -1,4 +1,4 @@
<% @title = "Edit Web" %> <%- @title = "Edit Web" -%>
<% form_tag({ :controller => 'admin', :action => 'edit_web', :web => @web.address }, <% form_tag({ :controller => 'admin', :action => 'edit_web', :web => @web.address },
{ 'id' => 'setup', 'method' => 'post', { 'id' => 'setup', 'method' => 'post',
@ -36,7 +36,6 @@
<%= html_options({ 'Green' => '008B26', 'Purple' => '504685', 'Red' => 'DA0006', <%= html_options({ 'Green' => '008B26', 'Purple' => '504685', 'Red' => 'DA0006',
'Orange' => 'C50', 'Grey' => '8BA2B0' }, @web.color) %> 'Orange' => 'C50', 'Grey' => '8BA2B0' }, @web.color) %>
</select> </select>
<br/>
<p> <p>
<input type="checkbox" class="disableAutoComplete" id="safe_mode" name="safe_mode" <%= 'checked="checked"' if @web.safe_mode? %> /> <input type="checkbox" class="disableAutoComplete" id="safe_mode" name="safe_mode" <%= 'checked="checked"' if @web.safe_mode? %> />
<label for="safe_mode">Safe mode <label for="safe_mode">Safe mode
@ -49,7 +48,6 @@
<input type="checkbox" class="disableAutoComplete" id="count_pages" name="count_pages" <%= 'checked="checked"' if @web.count_pages? %> /> <input type="checkbox" class="disableAutoComplete" id="count_pages" name="count_pages" <%= 'checked="checked"' if @web.count_pages? %> />
<label for="count_pages">Count pages</label> <label for="count_pages">Count pages</label>
<br/> <br/>
<input type="checkbox" class="disableAutoComplete" name="allow_uploads" <%= 'checked="checked"' if @web.allow_uploads? %> /> <input type="checkbox" class="disableAutoComplete" name="allow_uploads" <%= 'checked="checked"' if @web.allow_uploads? %> />
Allow uploads of no more than Allow uploads of no more than
<input type="text" class="disableAutoComplete" name="max_upload_size" value="<%= @web.max_upload_size %>" <input type="text" class="disableAutoComplete" name="max_upload_size" value="<%= @web.max_upload_size %>"
@ -58,7 +56,6 @@
<em>- <em>-
allow users to upload pictures and other files and include them on wiki pages allow users to upload pictures and other files and include them on wiki pages
</em> </em>
<br/>
</p> </p>
<a href="#" onclick="toggleView('additionalStyle');return false;"> <a href="#" onclick="toggleView('additionalStyle');return false;">
@ -106,10 +103,8 @@
<br/><br/> <br/><br/>
...or forget changes and <%= link_to 'create a new web', :action => 'create_web' %> ...or forget changes and <%= link_to 'create a new web', :action => 'create_web' %>
</p> </p>
<%- end %>
<% end %>
<br/>
<h1>Other administrative tasks</h1> <h1>Other administrative tasks</h1>
<% form_tag({:controller => 'admin', :web => @web.address, :action => 'remove_orphaned_pages'}, <% form_tag({:controller => 'admin', :web => @web.address, :action => 'remove_orphaned_pages'},
@ -123,10 +118,10 @@
and and
<input type="submit" value="Delete Orphan Pages" /> <input type="submit" value="Delete Orphan Pages" />
</p> </p>
<% end %> <%- end -%>
<% categories = WikiReference.list_categories(@web).sort <%- categories = WikiReference.list_categories(@web).sort
if categories.length > 0 %> if categories.length > 0 -%>
<% form_tag({:controller => 'admin', :web => @web.address, :action => 'remove_orphaned_pages_in_category'}, <% form_tag({:controller => 'admin', :web => @web.address, :action => 'remove_orphaned_pages_in_category'},
{ :id => 'remove_orphaned_pages_in_category', { :id => 'remove_orphaned_pages_in_category',
:onsubmit => "return checkSystemPassword(document.getElementById('system_password_orphaned_in_category').value)", :onsubmit => "return checkSystemPassword(document.getElementById('system_password_orphaned_in_category').value)",
@ -142,8 +137,8 @@
and and
<input type="submit" value="Delete Orphan Pages in Category" /> <input type="submit" value="Delete Orphan Pages in Category" />
</p> </p>
<% end %> <%- end -%>
<% end %> <%- end -%>
<div class="inputBox"> <div class="inputBox">
<% form_tag({:controller => 'admin', :web => @web.address, :action => 'delete_web'}, <% form_tag({:controller => 'admin', :web => @web.address, :action => 'delete_web'},
@ -157,7 +152,7 @@
and and
<input type="submit" value="Delete Web" /> <input type="submit" value="Delete Web" />
</p> </p>
<% end %> <%- end %>
</div> </div>
<%= javascript_include_tag 'edit_web' %> <%= javascript_include_tag 'edit_web' %>

View file

@ -1,7 +1,7 @@
<% <%-
@title = "Upload #{h @file_name}" @title = "Upload #{h @file_name}"
@hide_navigation = false @hide_navigation = false
%> -%>
<%= error_messages_for 'file' %> <%= error_messages_for 'file' %>
@ -28,4 +28,4 @@
:onfocus => "this.value == 'AnonymousCoward' ? this.value = '' : true;", :onfocus => "this.value == 'AnonymousCoward' ? this.value = '' : true;",
:onblur => "this.value == '' ? this.value = 'AnonymousCoward' : true" %> :onblur => "this.value == '' ? this.value = 'AnonymousCoward' : true" %>
</div> </div>
<% end %> <%- end -%>

View file

@ -14,10 +14,10 @@
<input type="submit" value="Update" /> as <input type="submit" value="Update" /> as
<input type="text" name="author" id="authorName" value="<%= @author %>" <input type="text" name="author" id="authorName" value="<%= @author %>"
onclick="this.value == 'AnonymousCoward' ? this.value = '' : true" /> onclick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
<% if @page %> <%- if @page -%>
| <%= link_to 'Cancel', :web => @web.address, :action => 'file'%> <small>(unlocks page)</small> | <%= link_to 'Cancel', :web => @web.address, :action => 'file'%> <small>(unlocks page)</small>
<% end %> <%- end -%>
</p> </p>
<% end %> <%- end -%>
</p> </p>

View file

@ -2,13 +2,13 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title> <title>
<% if @page and (@page.name == 'HomePage') and (%w( show published print ).include?(params['action'])) %> <%- if @page and (@page.name == 'HomePage') and (%w( show published print ).include?(params['action'])) -%>
<%= h @web.name %> <%= h @web.name -%>
<% elsif @web %> <%- elsif @web -%>
<%= @title %> in <%= h @web.name %> <%= @title %> in <%= h @web.name -%>
<% else %> <%- else -%>
<%= @title %> <%= @title %>
<% end %> <%- end -%>
<%= @show_diff ? ' (changes)' : '' %> <%= @show_diff ? ' (changes)' : '' %>
</title> </title>
@ -31,10 +31,10 @@
<%= @web ? @web.additional_style : '' %> <%= @web ? @web.additional_style : '' %>
/*]]>*/--></style> /*]]>*/--></style>
<%= javascript_include_tag :defaults %> <%= javascript_include_tag :defaults %>
<% if @web %> <%- if @web -%>
<%= auto_discovery_link_tag(:atom, :controller => 'wiki', :web => @web.address, :action => 'atom_with_headlines') %> <%= auto_discovery_link_tag(:atom, :controller => 'wiki', :web => @web.address, :action => 'atom_with_headlines') %>
<%= auto_discovery_link_tag(:atom, :controller => 'wiki', :web => @web.address, :action => 'atom_with_content') %> <%= auto_discovery_link_tag(:atom, :controller => 'wiki', :web => @web.address, :action => 'atom_with_content') %>
<% end %> <%- end -%>
</head> </head>
<body> <body>
@ -54,22 +54,22 @@
<%= render(:file => 'navigation') unless @web.nil? || @hide_navigation %> <%= render(:file => 'navigation') unless @web.nil? || @hide_navigation %>
<% if flash[:info] %> <%- if flash[:info] -%>
<div class="info"><%= escape_preserving_linefeeds flash[:info] %></div> <div class="info"><%= escape_preserving_linefeeds flash[:info] %></div>
<% end %> <%- end -%>
<% if @error or flash[:error] %> <%- if @error or flash[:error] -%>
<div class="errorExplanation"><%= escape_preserving_linefeeds(@error || flash[:error]) %></div> <div class="errorExplanation"><%= escape_preserving_linefeeds(@error || flash[:error]) %></div>
<% end %> <%- end -%>
<%= @content_for_layout %> <%= @content_for_layout %>
<% if @show_footer %> <%- if @show_footer -%>
<div id="footer"> <div id="footer">
<div>This site is running on <a href="http://golem.ph.utexas.edu/instiki/show/HomePage">Instiki <%= "#{Instiki::VERSION::STRING}" %></a></div> <div>This site is running on <a href="http://golem.ph.utexas.edu/instiki/show/HomePage">Instiki <%= "#{Instiki::VERSION::STRING}" %></a></div>
<div>Powered by <a href="http://rubyonrails.com/">Ruby on Rails</a> <%= "#{Rails::VERSION::STRING}" %></div> <div>Powered by <a href="http://rubyonrails.com/">Ruby on Rails</a> <%= "#{Rails::VERSION::STRING}" %></div>
</div> </div>
<% end %> <%- end -%>
</div> <!-- Content --> </div> <!-- Content -->

View file

@ -1,13 +1,13 @@
<% unless @page.linked_from.empty? %> <%- unless @page.linked_from.empty? -%>
<span class="linked"> <span class="linked">
| Linked from: | Linked from:
<%= @page.linked_from.collect { |referring_page| link_to_existing_page referring_page }.join(", ") %> <%= @page.linked_from.collect { |referring_page| link_to_existing_page referring_page }.join(", ") %>
</span> </span>
<% end %> <%- end -%>
<% unless @page.included_from.empty? %> <%- unless @page.included_from.empty? -%>
<span class="linked"> <span class="linked">
| Included from: | Included from:
<%= @page.included_from.collect { |referring_page| link_to_existing_page referring_page }.join(", ") %> <%= @page.included_from.collect { |referring_page| link_to_existing_page referring_page }.join(", ") %>
</span> </span>
<% end %> <%- end -%>

View file

@ -1,11 +1,11 @@
<% @title = 'Authors' %> <%- @title = 'Authors' -%>
<ul id="authorList"> <ul id="authorList">
<% for author in @authors %> <%- for author in @authors -%>
<li> <li>
<%= link_to_page author.delete("\x01-\x08\x0B\x0C\x0E-\x1F") %> <%= link_to_page author.delete("\x01-\x08\x0B\x0C\x0E-\x1F") %>
co- or authored: co- or authored:
<%= @page_names_by_author[author].collect { |page_name| link_to_page(page_name) }.sort.join ', ' %> <%= @page_names_by_author[author].collect { |page_name| link_to_page(page_name) }.sort.join ', ' %>
</li> </li>
<% end %> <%- end -%>
</ul> </ul>

View file

@ -1,8 +1,8 @@
<% <%-
@title = "Editing #{CGI.escapeHTML(@page.name)}" @title = "Editing #{CGI.escapeHTML(@page.name)}"
@content_width = 720 @content_width = 720
@hide_navigation = true @hide_navigation = true
%> -%>
<div id="MarkupHelp"> <div id="MarkupHelp">
<%= render(:file => "#{@web.markup}_help") %> <%= render(:file => "#{@web.markup}_help") %>
@ -27,7 +27,7 @@
</span> </span>
</div> </div>
</div> </div>
<% end %> <%- end -%>
<script type="text/javascript"> <script type="text/javascript">
function cleanAuthorName() { function cleanAuthorName() {

View file

@ -1,4 +1,4 @@
<% @title = "Export" %> <%- @title = "Export" -%>
<p>You can export all the pages in this web as a zip file in either HTML (with working links and all) or the pure markup (to import in another wiki).</p> <p>You can export all the pages in this web as a zip file in either HTML (with working links and all) or the pure markup (to import in another wiki).</p>

View file

@ -1,13 +1,13 @@
<% @title = "Feeds" %> <%- @title = "Feeds" -%>
<p>You can subscribe to this wiki's Atom feed and get either just the headlines of the pages that change or the entire page.</p> <p>You can subscribe to this wiki's Atom feed and get either just the headlines of the pages that change or the entire page.</p>
<ul id="feedsList"> <ul id="feedsList">
<%- if @rss_with_content_allowed -%>
<li> <li>
<% if @rss_with_content_allowed %>
<%= link_to 'Full content (Atom 1.0)', :web => @web.address, :action => :atom_with_content %> <%= link_to 'Full content (Atom 1.0)', :web => @web.address, :action => :atom_with_content %>
<% end %>
</li> </li>
<%- end -%>
<li> <li>
<%= link_to 'Headlines (Atom 1.0)', :web => @web.address, :action => :atom_with_headlines %> <%= link_to 'Headlines (Atom 1.0)', :web => @web.address, :action => :atom_with_headlines %>
</li> </li>

View file

@ -1,30 +1,31 @@
<% @title = "All Pages" %> <%- @title = "All Pages" -%>
<%= categories_menu unless @categories.empty? %> <%= categories_menu unless @categories.empty? %>
<div id="allPages"> <div id="allPages">
<% unless @pages_that_are_orphaned.empty? && @page_names_that_are_wanted.empty? %> <%- unless @pages_that_are_orphaned.empty? && @page_names_that_are_wanted.empty? -%>
<h2> <h2>
All Pages All Pages
<br/><span class="pageType">All pages in <%= @set_name %> listed alphabetically</span> <br/><span class="pageType">All pages in <%= @set_name %> listed alphabetically</span>
</h2> </h2>
<% end %> <%- end -%>
<ul> <ul>
<% @pages_in_category.each do |page| %> <%- @pages_in_category.each do |page| -%>
<li> <li>
<%= link_to_existing_page page, truncate(page.plain_name, :length => 35) %> <%= link_to_existing_page page, truncate(page.plain_name, :length => 35) %>
</li> </li>
<% end %></ul> <%- end -%>
</ul>
<% if @web.count_pages? %> <%- if @web.count_pages? -%>
<% total_chars = @pages_in_category.characters %> <% total_chars = @pages_in_category.characters %>
<p class="pageStats">All content: <%= total_chars %> chars / approx. <%= sprintf("%-.1f", (total_chars / 2275 )) %> printed pages</p> <p class="pageStats">All content: <%= total_chars %> chars / approx. <%= sprintf("%-.1f", (total_chars / 2275 )) %> printed pages</p>
<% end %> <%- end -%>
</div> </div>
<div id="wantedPages"> <div id="wantedPages">
<% unless @page_names_that_are_wanted.empty? %> <%- unless @page_names_that_are_wanted.empty? -%>
<h2> <h2>
Wanted Pages Wanted Pages
<br/> <br/>
@ -34,7 +35,7 @@
</h2> </h2>
<ul style="margin-bottom: 10px"> <ul style="margin-bottom: 10px">
<% @page_names_that_are_wanted.each do |wanted_page_name| %> <%- @page_names_that_are_wanted.each do |wanted_page_name| -%>
<li> <li>
<%= link_to_page(wanted_page_name, @web, truncate(WikiWords.separate(wanted_page_name), :length => 35)) %> <%= link_to_page(wanted_page_name, @web, truncate(WikiWords.separate(wanted_page_name), :length => 35)) %>
wanted by wanted by
@ -43,22 +44,22 @@
}.join(", ") }.join(", ")
%> %>
</li> </li>
<% end %> <%- end -%>
</ul> </ul>
<% end %> <%- end -%>
<% unless @pages_that_are_orphaned.empty? %> <%- unless @pages_that_are_orphaned.empty? -%>
<h2> <h2>
Orphaned Pages Orphaned Pages
<br/><span class="pageType">Pages in <%= @set_name %> that no other page reference</span> <br/><span class="pageType">Pages in <%= @set_name %> that no other page reference</span>
</h2> </h2>
<ul style="margin-bottom: 35px"> <ul style="margin-bottom: 35px">
<% @pages_that_are_orphaned.each do |orphan_page| %> <%- @pages_that_are_orphaned.each do |orphan_page| -%>
<li> <li>
<%= link_to_existing_page orphan_page, truncate(orphan_page.plain_name, :length => 35) %> <%= link_to_existing_page orphan_page, truncate(orphan_page.plain_name, :length => 35) %>
</li> </li>
<% end %> <%- end -%>
</ul> </ul>
<% end %> <%- end -%>
</div> </div>

View file

@ -1,12 +1,12 @@
<% @title = "#{@page.plain_name} is locked" %> <%- @title = "#{@page.plain_name} is locked" -%>
<p> <p>
<%= link_to_page(h(@page.locked_by.delete("\x01-\x08\x0B\x0C\x0E-\x1F"))) %> <%= link_to_page(h(@page.locked_by.delete("\x01-\x08\x0B\x0C\x0E-\x1F"))) %>
<% if @page.lock_duration(Time.now) == 0 %> <%- if @page.lock_duration(Time.now) == 0 -%>
just started editing this page. just started editing this page.
<% else %> <%- else -%>
has been editing this page for <%= @page.lock_duration(Time.now) %> minutes. has been editing this page for <%= @page.lock_duration(Time.now) %> minutes.
<% end %> <%- end -%>
</p> </p>
<p> <p>

View file

@ -1,4 +1,4 @@
<% @title = "#{@web_name} Login" %><% @hide_navigation = true %> <%- @title = "#{@web_name} Login" %><% @hide_navigation = true -%>
<% form_tag({ :controller => 'wiki', :action => 'authenticate', :web => @web.address}, <% form_tag({ :controller => 'wiki', :action => 'authenticate', :web => @web.address},
{ 'id' => 'loginForm', 'method' => 'post', 'accept-charset' => 'utf-8' }) do %> { 'id' => 'loginForm', 'method' => 'post', 'accept-charset' => 'utf-8' }) do %>
@ -13,7 +13,7 @@
<input type="password" name="password" id="password" /> <input type="password" name="password" id="password" />
<input type="submit" value="Login" /> <input type="submit" value="Login" />
</p> </p>
<% end %> <%- end -%>
<script type="text/javascript"> <script type="text/javascript">
document.forms["loginForm"].elements["password"].focus(); document.forms["loginForm"].elements["password"].focus();

View file

@ -1,8 +1,8 @@
<% <%-
@title = "Creating #{CGI.escapeHTML(WikiWords.separate(@page_name))}" @title = "Creating #{CGI.escapeHTML(WikiWords.separate(@page_name))}"
@content_width = 720 @content_width = 720
@hide_navigation = true @hide_navigation = true
%> -%>
<div id="MarkupHelp"> <div id="MarkupHelp">
<%= render(:file => "#{@web.markup}_help") %> <%= render(:file => "#{@web.markup}_help") %>
@ -20,7 +20,7 @@
:onfocus => "this.value == 'AnonymousCoward' ? this.value = '' : true;", :onfocus => "this.value == 'AnonymousCoward' ? this.value = '' : true;",
:onblur => "this.value == '' ? this.value = 'AnonymousCoward' : true" %> :onblur => "this.value == '' ? this.value = 'AnonymousCoward' : true" %>
</div> </div>
<% end %> <%- end -%>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">

View file

@ -1,19 +1,19 @@
<% <%-
@title = @page.plain_name @title = @page.plain_name
@title += ' (changes)' if @show_diff @title += ' (changes)' if @show_diff
@show_footer = true @show_footer = true
%> -%>
<div id="revision"> <div id="revision">
<% if @show_diff %> <%- if @show_diff -%>
<p class="show_diff"> <p class="show_diff">
Showing changes from revision #<%= @page.revisions.size - 1 %> to #<%= @page.revisions.size %>: 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> <ins class="diffins">Added</ins> | <del class="diffdel">Removed</del> | <del class="diffmod">Chan</del><ins class="diffmod">ged</ins>
</p> </p>
<%= @renderer.display_diff %> <%= @renderer.display_diff %>
<% else %> <%- else -%>
<%= @renderer.display_content %> <%= @renderer.display_content %>
<% end %> <%- end -%>
</div> </div>
<div class="byline"> <div class="byline">
@ -35,7 +35,7 @@
<%= link_to('Print', <%= link_to('Print',
{ :web => @web.address, :action => 'print', :id => @page.name }, { :web => @web.address, :action => 'print', :id => @page.name },
{ :accesskey => 'p', :id => 'view_print', :rel => 'nofollow' }) %> { :accesskey => 'p', :id => 'view_print', :rel => 'nofollow' }) %>
<% if @web.markup == :markdownMML or @web.markup == :markdown or @web.markup == :markdownPNG %> <%- if @web.markup == :markdownMML or @web.markup == :markdown or @web.markup == :markdownPNG -%>
| |
<%= link_to 'TeX', {:web => @web.address, :action => 'tex', :id => @page.name}, <%= link_to 'TeX', {:web => @web.address, :action => 'tex', :id => @page.name},
{:id => 'view_tex', :rel => 'nofollow' } %> {:id => 'view_tex', :rel => 'nofollow' } %>
@ -43,8 +43,8 @@
| |
<%= link_to 'S5', {:web => @web.address, :action => 's5', :id => @page.name}, <%= link_to 'S5', {:web => @web.address, :action => 's5', :id => @page.name},
{:id => 'view_S5'} %> {:id => 'view_S5'} %>
<% end %> <%- end -%>
<% end %> <%- end -%>
</span> </span>
<%= render :partial => 'inbound_links' %> <%= render :partial => 'inbound_links' %>

View file

@ -1,9 +1,9 @@
<% <%-
@title = @page.plain_name @title = @page.plain_name
@hide_navigation = true @hide_navigation = true
@style_additions = ".newWikiWord { background-color: white; font-style: italic; }" @style_additions = ".newWikiWord { background-color: white; font-style: italic; }"
@inline_style = true @inline_style = true
%> -%>
<%= @renderer.display_content_for_export %> <%= @renderer.display_content_for_export %>

View file

@ -1,10 +1,10 @@
<% <%-
@title = @page.plain_name @title = @page.plain_name
@hide_navigation = false @hide_navigation = false
@style_additions = ".newWikiWord { background-color: white; font-style: italic; }" @style_additions = ".newWikiWord { background-color: white; font-style: italic; }"
@inline_style = true @inline_style = true
@show_footer = true @show_footer = true
%> -%>
<%= @renderer.display_published %> <%= @renderer.display_published %>
@ -16,10 +16,10 @@
<div class="navigation navfoot"> <div class="navigation navfoot">
<span class="views"> <span class="views">
<% if WikiReference.pages_in_category(@web, 'S5-slideshow').map.include?(@page.name) %> <%- if WikiReference.pages_in_category(@web, 'S5-slideshow').map.include?(@page.name) -%>
Views: Views:
<%= link_to 'S5', {:web => @web.address, :action => 's5', <%= link_to 'S5', {:web => @web.address, :action => 's5',
:id => @page.name}, {:id => 'view_S5'} %> :id => @page.name}, {:id => 'view_S5'} %>
<% end %> <%- end -%>
</span> </span>
</div> </div>

View file

@ -1,11 +1,11 @@
<% @title = "Recently Revised" %> <%- @title = "Recently Revised" -%>
<%= categories_menu %> <%= categories_menu %>
<% @pages_by_day.keys.sort.reverse.each do |day| %> <%- @pages_by_day.keys.sort.reverse.each do |day| -%>
<h3><%= format_date(day, include_time = false) %></h3> <h3><%= format_date(day, include_time = false) %></h3>
<ul> <ul>
<% for page in @pages_by_day[day] %> <%- for page in @pages_by_day[day] -%>
<li> <li>
<%= link_to_existing_page page %> <%= link_to_existing_page page %>
<div class="byline" style="margin-bottom: 0px"> <div class="byline" style="margin-bottom: 0px">
@ -14,6 +14,6 @@
<%= "from #{page.author.ip}" if page.author.respond_to?(:ip) %> <%= "from #{page.author.ip}" if page.author.respond_to?(:ip) %>
</div> </div>
</li> </li>
<% end %> <%- end -%>
</ul> </ul>
<% end %> <%- end -%>

View file

@ -1,18 +1,18 @@
<% <%-
@title = "#{@page.plain_name} (Rev ##{@revision_number}#{@show_diff ? ', changes' : ''})" @title = "#{@page.plain_name} (Rev ##{@revision_number}#{@show_diff ? ', changes' : ''})"
%> -%>
<div id="revision"> <div id="revision">
<% if @show_diff %> <%- if @show_diff -%>
<p class="show_diff"> <p class="show_diff">
Showing changes from revision #<%= @revision_number - 1 %> to #<%= @revision_number %>: Showing changes from revision #<%= @revision_number - 1 %> to #<%= @revision_number %>:
<ins class="diffins">Added</ins> | <del class="diffdel">Removed</del> | <del class="diffmod">Chan</del><ins class="diffmod">ged</ins> <ins class="diffins">Added</ins> | <del class="diffdel">Removed</del> | <del class="diffmod">Chan</del><ins class="diffmod">ged</ins>
</p> </p>
<%= @renderer.display_diff %> <%= @renderer.display_diff %>
<% else %> <%- else -%>
<%= @renderer.display_content %> <%= @renderer.display_content %>
<% end %> <%- end -%>
</div> <!-- Revision --> </div> <!-- Revision -->
<div class="byline"> <div class="byline">

View file

@ -1,8 +1,8 @@
<% <%-
@title = "Rollback to #{@page.plain_name} Rev ##{@revision_number}" @title = "Rollback to #{@page.plain_name} Rev ##{@revision_number}"
@content_width = 720 @content_width = 720
@hide_navigation = true @hide_navigation = true
%> -%>
<%= "<p style='color:red'>Please correct the error that caused this error in rendering:<br/><small>#{params["msg"]}</small></p>" if params["msg"] %> <%= "<p style='color:red'>Please correct the error that caused this error in rendering:<br/><small>#{params["msg"]}</small></p>" if params["msg"] %>
@ -28,7 +28,7 @@
</span> </span>
</div> </div>
</div> </div>
<% end %> <%- end -%>
<script type="text/javascript"> <script type="text/javascript">
function cleanAuthorName() { function cleanAuthorName() {

View file

@ -1,29 +1,29 @@
<% @title = "Search results for \"#{h params["query"]}\"" %> <%- @title = "Search results for \"#{h params["query"]}\"" -%>
<% unless @title_results.empty? %> <%- unless @title_results.empty? -%>
<h2><%= @title_results.length %> page(s) containing search string in the page name:</h2> <h2><%= @title_results.length %> page(s) containing search string in the page name:</h2>
<ul> <ul>
<% for page in @title_results %> <%- for page in @title_results -%>
<li> <li>
<%= link_to page.plain_name, :web => @web.address, :action => 'show', :id => page.name %> <%= link_to page.plain_name, :web => @web.address, :action => 'show', :id => page.name %>
</li> </li>
<% end %> <%- end -%>
</ul> </ul>
<% end %> <%- end -%>
<% unless @results.empty? %> <%- unless @results.empty? -%>
<h2> <%= @results.length %> page(s) containing search string in the page text:</h2> <h2> <%= @results.length %> page(s) containing search string in the page text:</h2>
<ul> <ul>
<% for page in @results %> <%- for page in @results -%>
<li> <li>
<%= link_to page.plain_name, :web => @web.address, :action => 'show', :id => page.name %> <%= link_to page.plain_name, :web => @web.address, :action => 'show', :id => page.name %>
</li> </li>
<% end %> <%- end -%>
</ul> </ul>
<% end %> <%- end -%>
<% if (@results + @title_results).empty? %> <%- if (@results + @title_results).empty? -%>
<h2>No pages contain "<%= h params["query"] %>" </h2> <h2>No pages contain "<%= h params["query"] %>" </h2>
<p> <p>
Perhaps you should try expanding your query. Remember that Instiki searches for entire Perhaps you should try expanding your query. Remember that Instiki searches for entire
@ -35,4 +35,4 @@
expression. That's actually what Instiki uses, so go right ahead and flex your expression. That's actually what Instiki uses, so go right ahead and flex your
"[a-z]*Leet?RegExpSkill(s|z)" "[a-z]*Leet?RegExpSkill(s|z)"
</p> </p>
<% end %> <%- end -%>

View file

@ -1,25 +1,28 @@
<% @title = "Wiki webs" %> <%- @title = "Wiki webs" -%>
<ul> <ul>
<% @webs.each do |web| %> <%- @webs.each do |web| -%>
<li> <li>
<% if web.password %> <div class="web_protected"> <%- if web.password -%>
<% else %> <div class="web_normal"> <% end %> <div class="web_protected">
<%= link_to(web.name, {:web => web.address, :action => 'show', :id => 'HomePage'}) %> <%- else -%>
<% if web.published? %> <div class="web_normal">
(<%= link_to_page 'HomePage', web, 'published version', :mode => 'publish' %>) <%- end -%>
<% end %> <%= link_to(web.name, {:web => web.address, :action => 'show', :id => 'HomePage'}) %>
<%- if web.published? -%>
(<%= link_to_page 'HomePage', web, 'published version', :mode => 'publish' %>)
<%- end -%>
<div class="byline" style="margin-bottom: 0px"> <div class="byline" style="margin-bottom: 0px">
<%= web.pages.length %> page<% if web.pages.length != 1 %>s<% end %> by <%= web.authors.length %> author<% if web.authors.length != 1 %>s<% end %> <%= web.pages.length %> page<% if web.pages.length != 1 %>s<% end %> by <%= web.authors.length %> author<% if web.authors.length != 1 %>s<% end %>
- Last Update: <%= web.last_page.nil? ? format_date(web.created_at) : format_date(web.last_page.revised_at) %><br/> - Last Update: <%= web.last_page.nil? ? format_date(web.created_at) : format_date(web.last_page.revised_at) %><br/>
<% if ! web.last_page.nil? %> <%- if ! web.last_page.nil? -%>
Last Document: <%= link_to_page(web.last_page.name,web) %> Last Document: <%= link_to_page(web.last_page.name,web) %>
<%= web.last_page.revisions? ? "Revised" : "Created" %> by <%= author_link(web.last_page).delete("\x01-\x08\x0B\x0C\x0E-\x1F") %> (<%= web.last_page.current_revision.ip %>) <%= web.last_page.revisions? ? "Revised" : "Created" %> by <%= author_link(web.last_page).delete("\x01-\x08\x0B\x0C\x0E-\x1F") %> (<%= web.last_page.current_revision.ip %>)
<% end %> <%- end -%>
</div> </div>
</div> </div>
</li> </li>
<% end %> <%- end -%>
</ul> </ul>