A little whitespace cleanup in Views
This commit is contained in:
parent
3bef45277f
commit
14561d998d
|
@ -1,4 +1,4 @@
|
|||
<% @title = "Instiki Setup"; @content_width = 500 %>
|
||||
<%- @title = "Instiki Setup"; @content_width = 500 -%>
|
||||
|
||||
<p>
|
||||
Congratulations on succesfully installing and starting Instiki.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% @title = "New Wiki Web"; @content_width = 500 %>
|
||||
<%- @title = "New Wiki Web"; @content_width = 500 -%>
|
||||
|
||||
<p>
|
||||
Each web serves as an isolated name space for wiki pages,
|
||||
|
@ -36,7 +36,7 @@
|
|||
<input type="submit" value="Create Web" />
|
||||
</p>
|
||||
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<script type="text/javascript">
|
||||
function proposeAddress() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% @title = "Edit Web" %>
|
||||
<%- @title = "Edit Web" -%>
|
||||
|
||||
<% form_tag({ :controller => 'admin', :action => 'edit_web', :web => @web.address },
|
||||
{ 'id' => 'setup', 'method' => 'post',
|
||||
|
@ -36,7 +36,6 @@
|
|||
<%= html_options({ 'Green' => '008B26', 'Purple' => '504685', 'Red' => 'DA0006',
|
||||
'Orange' => 'C50', 'Grey' => '8BA2B0' }, @web.color) %>
|
||||
</select>
|
||||
<br/>
|
||||
<p>
|
||||
<input type="checkbox" class="disableAutoComplete" id="safe_mode" name="safe_mode" <%= 'checked="checked"' if @web.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? %> />
|
||||
<label for="count_pages">Count pages</label>
|
||||
<br/>
|
||||
|
||||
<input type="checkbox" class="disableAutoComplete" name="allow_uploads" <%= 'checked="checked"' if @web.allow_uploads? %> />
|
||||
Allow uploads of no more than
|
||||
<input type="text" class="disableAutoComplete" name="max_upload_size" value="<%= @web.max_upload_size %>"
|
||||
|
@ -58,7 +56,6 @@
|
|||
<em>-
|
||||
allow users to upload pictures and other files and include them on wiki pages
|
||||
</em>
|
||||
<br/>
|
||||
</p>
|
||||
|
||||
<a href="#" onclick="toggleView('additionalStyle');return false;">
|
||||
|
@ -106,10 +103,8 @@
|
|||
<br/><br/>
|
||||
...or forget changes and <%= link_to 'create a new web', :action => 'create_web' %>
|
||||
</p>
|
||||
<%- end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<br/>
|
||||
<h1>Other administrative tasks</h1>
|
||||
|
||||
<% form_tag({:controller => 'admin', :web => @web.address, :action => 'remove_orphaned_pages'},
|
||||
|
@ -123,10 +118,10 @@
|
|||
and
|
||||
<input type="submit" value="Delete Orphan Pages" />
|
||||
</p>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<% categories = WikiReference.list_categories(@web).sort
|
||||
if categories.length > 0 %>
|
||||
<%- categories = WikiReference.list_categories(@web).sort
|
||||
if categories.length > 0 -%>
|
||||
<% form_tag({:controller => 'admin', :web => @web.address, :action => 'remove_orphaned_pages_in_category'},
|
||||
{ :id => 'remove_orphaned_pages_in_category',
|
||||
:onsubmit => "return checkSystemPassword(document.getElementById('system_password_orphaned_in_category').value)",
|
||||
|
@ -142,8 +137,8 @@
|
|||
and
|
||||
<input type="submit" value="Delete Orphan Pages in Category" />
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
<%- end -%>
|
||||
|
||||
<div class="inputBox">
|
||||
<% form_tag({:controller => 'admin', :web => @web.address, :action => 'delete_web'},
|
||||
|
@ -157,7 +152,7 @@
|
|||
and
|
||||
<input type="submit" value="Delete Web" />
|
||||
</p>
|
||||
<% end %>
|
||||
<%- end %>
|
||||
</div>
|
||||
|
||||
<%= javascript_include_tag 'edit_web' %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%
|
||||
<%-
|
||||
@title = "Upload #{h @file_name}"
|
||||
@hide_navigation = false
|
||||
%>
|
||||
-%>
|
||||
|
||||
<%= error_messages_for 'file' %>
|
||||
|
||||
|
@ -28,4 +28,4 @@
|
|||
:onfocus => "this.value == 'AnonymousCoward' ? this.value = '' : true;",
|
||||
:onblur => "this.value == '' ? this.value = 'AnonymousCoward' : true" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
<input type="submit" value="Update" /> as
|
||||
<input type="text" name="author" id="authorName" value="<%= @author %>"
|
||||
onclick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
|
||||
<% if @page %>
|
||||
<%- if @page -%>
|
||||
| <%= link_to 'Cancel', :web => @web.address, :action => 'file'%> <small>(unlocks page)</small>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
</p>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</p>
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>
|
||||
<% if @page and (@page.name == 'HomePage') and (%w( show published print ).include?(params['action'])) %>
|
||||
<%= h @web.name %>
|
||||
<% elsif @web %>
|
||||
<%= @title %> in <%= h @web.name %>
|
||||
<% else %>
|
||||
<%- if @page and (@page.name == 'HomePage') and (%w( show published print ).include?(params['action'])) -%>
|
||||
<%= h @web.name -%>
|
||||
<%- elsif @web -%>
|
||||
<%= @title %> in <%= h @web.name -%>
|
||||
<%- else -%>
|
||||
<%= @title %>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
<%= @show_diff ? ' (changes)' : '' %>
|
||||
</title>
|
||||
|
||||
|
@ -31,10 +31,10 @@
|
|||
<%= @web ? @web.additional_style : '' %>
|
||||
/*]]>*/--></style>
|
||||
<%= 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_content') %>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -54,22 +54,22 @@
|
|||
|
||||
<%= render(:file => 'navigation') unless @web.nil? || @hide_navigation %>
|
||||
|
||||
<% if flash[:info] %>
|
||||
<%- if flash[:info] -%>
|
||||
<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>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<%= @content_for_layout %>
|
||||
|
||||
<% if @show_footer %>
|
||||
<%- if @show_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>Powered by <a href="http://rubyonrails.com/">Ruby on Rails</a> <%= "#{Rails::VERSION::STRING}" %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
</div> <!-- Content -->
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<% unless @page.linked_from.empty? %>
|
||||
<%- unless @page.linked_from.empty? -%>
|
||||
<span class="linked">
|
||||
| Linked from:
|
||||
<%= @page.linked_from.collect { |referring_page| link_to_existing_page referring_page }.join(", ") %>
|
||||
</span>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<% unless @page.included_from.empty? %>
|
||||
<%- unless @page.included_from.empty? -%>
|
||||
<span class="linked">
|
||||
| Included from:
|
||||
<%= @page.included_from.collect { |referring_page| link_to_existing_page referring_page }.join(", ") %>
|
||||
</span>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<% @title = 'Authors' %>
|
||||
<%- @title = 'Authors' -%>
|
||||
|
||||
<ul id="authorList">
|
||||
<% for author in @authors %>
|
||||
<%- for author in @authors -%>
|
||||
<li>
|
||||
<%= link_to_page author.delete("\x01-\x08\x0B\x0C\x0E-\x1F") %>
|
||||
co- or authored:
|
||||
<%= @page_names_by_author[author].collect { |page_name| link_to_page(page_name) }.sort.join ', ' %>
|
||||
</li>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</ul>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<%
|
||||
<%-
|
||||
@title = "Editing #{CGI.escapeHTML(@page.name)}"
|
||||
@content_width = 720
|
||||
@hide_navigation = true
|
||||
%>
|
||||
-%>
|
||||
|
||||
<div id="MarkupHelp">
|
||||
<%= render(:file => "#{@web.markup}_help") %>
|
||||
|
@ -27,7 +27,7 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<script type="text/javascript">
|
||||
function cleanAuthorName() {
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
<ul id="feedsList">
|
||||
<%- if @rss_with_content_allowed -%>
|
||||
<li>
|
||||
<% if @rss_with_content_allowed %>
|
||||
<%= link_to 'Full content (Atom 1.0)', :web => @web.address, :action => :atom_with_content %>
|
||||
<% end %>
|
||||
</li>
|
||||
<%- end -%>
|
||||
<li>
|
||||
<%= link_to 'Headlines (Atom 1.0)', :web => @web.address, :action => :atom_with_headlines %>
|
||||
</li>
|
||||
|
|
|
@ -1,30 +1,31 @@
|
|||
<% @title = "All Pages" %>
|
||||
<%- @title = "All Pages" -%>
|
||||
|
||||
<%= categories_menu unless @categories.empty? %>
|
||||
|
||||
<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>
|
||||
All Pages
|
||||
<br/><span class="pageType">All pages in <%= @set_name %> listed alphabetically</span>
|
||||
</h2>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<ul>
|
||||
<% @pages_in_category.each do |page| %>
|
||||
<%- @pages_in_category.each do |page| -%>
|
||||
<li>
|
||||
<%= link_to_existing_page page, truncate(page.plain_name, :length => 35) %>
|
||||
</li>
|
||||
<% end %></ul>
|
||||
<%- end -%>
|
||||
</ul>
|
||||
|
||||
<% if @web.count_pages? %>
|
||||
<%- if @web.count_pages? -%>
|
||||
<% total_chars = @pages_in_category.characters %>
|
||||
<p class="pageStats">All content: <%= total_chars %> chars / approx. <%= sprintf("%-.1f", (total_chars / 2275 )) %> printed pages</p>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</div>
|
||||
|
||||
<div id="wantedPages">
|
||||
<% unless @page_names_that_are_wanted.empty? %>
|
||||
<%- unless @page_names_that_are_wanted.empty? -%>
|
||||
<h2>
|
||||
Wanted Pages
|
||||
<br/>
|
||||
|
@ -34,7 +35,7 @@
|
|||
</h2>
|
||||
|
||||
<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>
|
||||
<%= link_to_page(wanted_page_name, @web, truncate(WikiWords.separate(wanted_page_name), :length => 35)) %>
|
||||
wanted by
|
||||
|
@ -43,22 +44,22 @@
|
|||
}.join(", ")
|
||||
%>
|
||||
</li>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<% unless @pages_that_are_orphaned.empty? %>
|
||||
<%- unless @pages_that_are_orphaned.empty? -%>
|
||||
<h2>
|
||||
Orphaned Pages
|
||||
<br/><span class="pageType">Pages in <%= @set_name %> that no other page reference</span>
|
||||
</h2>
|
||||
|
||||
<ul style="margin-bottom: 35px">
|
||||
<% @pages_that_are_orphaned.each do |orphan_page| %>
|
||||
<%- @pages_that_are_orphaned.each do |orphan_page| -%>
|
||||
<li>
|
||||
<%= link_to_existing_page orphan_page, truncate(orphan_page.plain_name, :length => 35) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</div>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<% @title = "#{@page.plain_name} is locked" %>
|
||||
<%- @title = "#{@page.plain_name} is locked" -%>
|
||||
|
||||
<p>
|
||||
<%= 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.
|
||||
<% else %>
|
||||
<%- else -%>
|
||||
has been editing this page for <%= @page.lock_duration(Time.now) %> minutes.
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -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},
|
||||
{ 'id' => 'loginForm', 'method' => 'post', 'accept-charset' => 'utf-8' }) do %>
|
||||
|
@ -13,7 +13,7 @@
|
|||
<input type="password" name="password" id="password" />
|
||||
<input type="submit" value="Login" />
|
||||
</p>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.forms["loginForm"].elements["password"].focus();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<%
|
||||
<%-
|
||||
@title = "Creating #{CGI.escapeHTML(WikiWords.separate(@page_name))}"
|
||||
@content_width = 720
|
||||
@hide_navigation = true
|
||||
%>
|
||||
-%>
|
||||
|
||||
<div id="MarkupHelp">
|
||||
<%= render(:file => "#{@web.markup}_help") %>
|
||||
|
@ -20,7 +20,7 @@
|
|||
:onfocus => "this.value == 'AnonymousCoward' ? this.value = '' : true;",
|
||||
:onblur => "this.value == '' ? this.value = 'AnonymousCoward' : true" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<%
|
||||
<%-
|
||||
@title = @page.plain_name
|
||||
@title += ' (changes)' if @show_diff
|
||||
@show_footer = true
|
||||
%>
|
||||
-%>
|
||||
|
||||
<div id="revision">
|
||||
<% if @show_diff %>
|
||||
<%- 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 %>
|
||||
<%- else -%>
|
||||
<%= @renderer.display_content %>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</div>
|
||||
|
||||
<div class="byline">
|
||||
|
@ -35,7 +35,7 @@
|
|||
<%= link_to('Print',
|
||||
{ :web => @web.address, :action => 'print', :id => @page.name },
|
||||
{ :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},
|
||||
{:id => 'view_tex', :rel => 'nofollow' } %>
|
||||
|
@ -43,8 +43,8 @@
|
|||
|
|
||||
<%= link_to 'S5', {:web => @web.address, :action => 's5', :id => @page.name},
|
||||
{:id => 'view_S5'} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
<%- end -%>
|
||||
</span>
|
||||
|
||||
<%= render :partial => 'inbound_links' %>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<%
|
||||
<%-
|
||||
@title = @page.plain_name
|
||||
@hide_navigation = true
|
||||
@style_additions = ".newWikiWord { background-color: white; font-style: italic; }"
|
||||
@inline_style = true
|
||||
%>
|
||||
-%>
|
||||
|
||||
<%= @renderer.display_content_for_export %>
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<%
|
||||
<%-
|
||||
@title = @page.plain_name
|
||||
@hide_navigation = false
|
||||
@style_additions = ".newWikiWord { background-color: white; font-style: italic; }"
|
||||
@inline_style = true
|
||||
@show_footer = true
|
||||
%>
|
||||
-%>
|
||||
|
||||
<%= @renderer.display_published %>
|
||||
|
||||
|
@ -16,10 +16,10 @@
|
|||
|
||||
<div class="navigation navfoot">
|
||||
<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:
|
||||
<%= link_to 'S5', {:web => @web.address, :action => 's5',
|
||||
:id => @page.name}, {:id => 'view_S5'} %>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<% @title = "Recently Revised" %>
|
||||
<%- @title = "Recently Revised" -%>
|
||||
|
||||
<%= 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>
|
||||
<ul>
|
||||
<% for page in @pages_by_day[day] %>
|
||||
<%- for page in @pages_by_day[day] -%>
|
||||
<li>
|
||||
<%= link_to_existing_page page %>
|
||||
<div class="byline" style="margin-bottom: 0px">
|
||||
|
@ -14,6 +14,6 @@
|
|||
<%= "from #{page.author.ip}" if page.author.respond_to?(:ip) %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<%
|
||||
<%-
|
||||
@title = "#{@page.plain_name} (Rev ##{@revision_number}#{@show_diff ? ', changes' : ''})"
|
||||
%>
|
||||
-%>
|
||||
|
||||
|
||||
<div id="revision">
|
||||
<% if @show_diff %>
|
||||
<%- if @show_diff -%>
|
||||
<p class="show_diff">
|
||||
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>
|
||||
</p>
|
||||
<%= @renderer.display_diff %>
|
||||
<% else %>
|
||||
<%- else -%>
|
||||
<%= @renderer.display_content %>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</div> <!-- Revision -->
|
||||
|
||||
<div class="byline">
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<%
|
||||
<%-
|
||||
@title = "Rollback to #{@page.plain_name} Rev ##{@revision_number}"
|
||||
@content_width = 720
|
||||
@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"] %>
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<script type="text/javascript">
|
||||
function cleanAuthorName() {
|
||||
|
|
|
@ -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>
|
||||
<ul>
|
||||
<% for page in @title_results %>
|
||||
<%- for page in @title_results -%>
|
||||
<li>
|
||||
<%= link_to page.plain_name, :web => @web.address, :action => 'show', :id => page.name %>
|
||||
</li>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
|
||||
<% unless @results.empty? %>
|
||||
<%- unless @results.empty? -%>
|
||||
<h2> <%= @results.length %> page(s) containing search string in the page text:</h2>
|
||||
<ul>
|
||||
<% for page in @results %>
|
||||
<%- for page in @results -%>
|
||||
<li>
|
||||
<%= link_to page.plain_name, :web => @web.address, :action => 'show', :id => page.name %>
|
||||
</li>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</ul>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<% if (@results + @title_results).empty? %>
|
||||
<%- if (@results + @title_results).empty? -%>
|
||||
<h2>No pages contain "<%= h params["query"] %>" </h2>
|
||||
<p>
|
||||
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
|
||||
"[a-z]*Leet?RegExpSkill(s|z)"
|
||||
</p>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
|
|
@ -1,25 +1,28 @@
|
|||
<% @title = "Wiki webs" %>
|
||||
<%- @title = "Wiki webs" -%>
|
||||
|
||||
<ul>
|
||||
<% @webs.each do |web| %>
|
||||
<%- @webs.each do |web| -%>
|
||||
|
||||
<li>
|
||||
<% if web.password %> <div class="web_protected">
|
||||
<% else %> <div class="web_normal"> <% 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 %>
|
||||
<%- if web.password -%>
|
||||
<div class="web_protected">
|
||||
<%- else -%>
|
||||
<div class="web_normal">
|
||||
<%- 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">
|
||||
<%= 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/>
|
||||
<% if ! web.last_page.nil? %>
|
||||
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 %>)
|
||||
<% 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/>
|
||||
<%- if ! web.last_page.nil? -%>
|
||||
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 %>)
|
||||
<%- end -%>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in a new issue