Massive change of SVN properties to deal with EOL style problem

This commit is contained in:
Alexey Verkhovsky 2005-01-24 18:52:04 +00:00
parent b747b611b3
commit 3b6566577c
108 changed files with 12417 additions and 12417 deletions

View file

@ -1,22 +1,22 @@
<%
@title = "Upload #{@file_name}"
@hide_navigatio = false
%>
<p>
<%= form_tag({}, {:multipart => true}) %>
<p>
File to upload:
<br/>
<input type="file" name="file" size="40" />
</p>
<p>
<input type="submit" value="Update" /> as
<input type="text" name="author" id="authorName" value="<%= @author %>"
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
<% if @page %>
| <a href="../file/">Cancel</a> <small>(unlocks page)</small>
<% end %>
</p>
<%= end_form_tag %>
<%
@title = "Upload #{@file_name}"
@hide_navigatio = false
%>
<p>
<%= form_tag({}, {:multipart => true}) %>
<p>
File to upload:
<br/>
<input type="file" name="file" size="40" />
</p>
<p>
<input type="submit" value="Update" /> as
<input type="text" name="author" id="authorName" value="<%= @author %>"
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
<% if @page %>
| <a href="../file/">Cancel</a> <small>(unlocks page)</small>
<% end %>
</p>
<%= end_form_tag %>
</p>

View file

@ -1,72 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<% if @page and (@page.name == 'HomePage') and (%w( show published print ).include?(@action_name)) %>
<%= @web.name %>
<% elsif @web %>
<%= @title %> in <%= @web.name %>
<% else %>
<%= @title %>
<% end %>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
h1#pageName, .newWikiWord a, a.existingWikiWord, .newWikiWord a:hover, #TextileHelp h3 {
color: #<%= @web ? @web.color : "393" %>;
}
#Container, #Content {
width: <%= @content_width || "600" %>px;
}
<%= File.read(RAILS_ROOT + '/public/stylesheets/instiki.css') if @inline_style %>
</style>
<link rel="Stylesheet" href="/stylesheets/instiki.css" type="text/css" media="screen" />
<style type="text/css">
<%= @style_additions %>
<%= @web ? @web.additional_style : '' %>
</style>
</head>
<body>
<div id="Container">
<div id="Content">
<h1 id="pageName">
<% if @page and (@page.name == 'HomePage') and %w( show published print ).include?(@action_name) %>
<%= @web.name %>
<% elsif @web %>
<small><%= @web.name %></small><br />
<%= @title %>
<% else %>
<%= @title %>
<% end %>
</h1>
<% if @flash[:error] %> <div id="error">
<hr/><p><%= @flash[:error].to_s %></p><hr/></div>
<% end %>
<% if @flash[:info] %> <div id="info">
<hr/><p><%= @flash[:info].to_s %></p><hr/></div>
<% end %>
<%= render 'navigation' unless @web.nil? || @hide_navigation %>
<%= @content_for_layout %>
<div id="footer">
<hr/>
<p>This site is running on <a href="http://instiki.org/">Instiki</a></p>
<br/>
<p>Powered by <a href="http://rubyonrails.com/">Ruby on Rails</a></p>
</div>
</div> <!-- Content -->
</div> <!-- Container -->
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<% if @page and (@page.name == 'HomePage') and (%w( show published print ).include?(@action_name)) %>
<%= @web.name %>
<% elsif @web %>
<%= @title %> in <%= @web.name %>
<% else %>
<%= @title %>
<% end %>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
h1#pageName, .newWikiWord a, a.existingWikiWord, .newWikiWord a:hover, #TextileHelp h3 {
color: #<%= @web ? @web.color : "393" %>;
}
#Container, #Content {
width: <%= @content_width || "600" %>px;
}
<%= File.read(RAILS_ROOT + '/public/stylesheets/instiki.css') if @inline_style %>
</style>
<link rel="Stylesheet" href="/stylesheets/instiki.css" type="text/css" media="screen" />
<style type="text/css">
<%= @style_additions %>
<%= @web ? @web.additional_style : '' %>
</style>
</head>
<body>
<div id="Container">
<div id="Content">
<h1 id="pageName">
<% if @page and (@page.name == 'HomePage') and %w( show published print ).include?(@action_name) %>
<%= @web.name %>
<% elsif @web %>
<small><%= @web.name %></small><br />
<%= @title %>
<% else %>
<%= @title %>
<% end %>
</h1>
<% if @flash[:error] %> <div id="error">
<hr/><p><%= @flash[:error].to_s %></p><hr/></div>
<% end %>
<% if @flash[:info] %> <div id="info">
<hr/><p><%= @flash[:info].to_s %></p><hr/></div>
<% end %>
<%= render 'navigation' unless @web.nil? || @hide_navigation %>
<%= @content_for_layout %>
<div id="footer">
<hr/>
<p>This site is running on <a href="http://instiki.org/">Instiki</a></p>
<br/>
<p>Powered by <a href="http://rubyonrails.com/">Ruby on Rails</a></p>
</div>
</div> <!-- Content -->
</div> <!-- Container -->
</body>
</html>

30
app/views/markdown_help.rhtml Executable file → Normal file
View file

@ -1,16 +1,16 @@
<div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
<h3>Markdown formatting tips (<a target="_new" href="http://daringfireball.net/projects/markdown/syntax">advanced</a>)</h3>
<table cellspacing="0" cellpadding="0">
<tr><td>_your text_</td><td class="arrow">&rarr;</td><td><em>your text</em></td></tr>
<tr><td>**your text**</td><td class="arrow">&rarr;</td><td><strong>your text</strong></td></tr>
<tr><td>`my code`</td><td class="arrow">&rarr;</td><td><code>my code</code></td></tr>
<tr><td>* Bulleted list<br />* Second item</td><td class="arrow">&rarr;</td><td>&#8226; Bulleted list<br />&#8226; Second item</td></tr>
<tr><td>1. Numbered list<br />1. Second item</td><td class="arrow">&rarr;</td><td>1. Numbered list<br />2. Second item</td></tr>
<tr><td>[link name](URL)</td><td class="arrow">&rarr;</td><td><a href="URL">link name</a></td></tr>
<tr><td>***</td><td class="arrow">&rarr;</td><td>Horizontal ruler</td></tr>
<tr><td>&lt;http://url><br />&lt;email@add.com></td><td class="arrow">&rarr;</td><td>Auto-linked</td></tr>
<tr><td>![Alt text](URL)</td><td class="arrow">&rarr;</td><td>Image</td></tr>
</table>
<%= render 'wiki_words_help' %>
<div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
<h3>Markdown formatting tips (<a target="_new" href="http://daringfireball.net/projects/markdown/syntax">advanced</a>)</h3>
<table cellspacing="0" cellpadding="0">
<tr><td>_your text_</td><td class="arrow">&rarr;</td><td><em>your text</em></td></tr>
<tr><td>**your text**</td><td class="arrow">&rarr;</td><td><strong>your text</strong></td></tr>
<tr><td>`my code`</td><td class="arrow">&rarr;</td><td><code>my code</code></td></tr>
<tr><td>* Bulleted list<br />* Second item</td><td class="arrow">&rarr;</td><td>&#8226; Bulleted list<br />&#8226; Second item</td></tr>
<tr><td>1. Numbered list<br />1. Second item</td><td class="arrow">&rarr;</td><td>1. Numbered list<br />2. Second item</td></tr>
<tr><td>[link name](URL)</td><td class="arrow">&rarr;</td><td><a href="URL">link name</a></td></tr>
<tr><td>***</td><td class="arrow">&rarr;</td><td>Horizontal ruler</td></tr>
<tr><td>&lt;http://url><br />&lt;email@add.com></td><td class="arrow">&rarr;</td><td>Auto-linked</td></tr>
<tr><td>![Alt text](URL)</td><td class="arrow">&rarr;</td><td>Image</td></tr>
</table>
<%= render 'wiki_words_help' %>
</div>

50
app/views/navigation.rhtml Executable file → Normal file
View file

@ -1,25 +1,25 @@
<%
def list_item(title, url, description, accesskey = nil)
if @title == title
"<b class=\"navOn\" title=\"#{description}\" accesskey=\"#{accesskey}\">#{title}</b>"
else
"<a href=\"#{url}\" title=\"#{description}\" accesskey=\"#{accesskey}\">#{title}</a>"
end
end
%>
<form id="navigationForm" class="navigation" action="../search/" method="get" style="font-size: 10px">
<% if @action_name != "published" then %>
<%= list_item "Home Page", "../show/HomePage", "Home, Sweet Home", "H" %> |
<%= list_item "All Pages", "../list/", "Alphabetically sorted list of pages", "A" %> |
<%= list_item "Recently Revised", "../recently_revised/", "Pages sorted by when they were last changed", "U" %> |
<%= list_item "Authors", "../authors/", "Who wrote what" %> |
<%= list_item "Feeds", "../feeds/", "Subscribe to changes by RSS" %> |
<%= list_item "Export", "../export/", "Download a zip with all the pages in this wiki", "X" %> |
<input type="text" id="searchField" name="query" style="font-size: 10px" value="Search" onClick="this.value == 'Search' ? this.value = '' : true" />
<% else %>
<%= list_item "Home Page", "../published/HomePage", "Home, Sweet Home", "H" %> |
<% end%>
</form>
<%
def list_item(title, url, description, accesskey = nil)
if @title == title
"<b class=\"navOn\" title=\"#{description}\" accesskey=\"#{accesskey}\">#{title}</b>"
else
"<a href=\"#{url}\" title=\"#{description}\" accesskey=\"#{accesskey}\">#{title}</a>"
end
end
%>
<form id="navigationForm" class="navigation" action="../search/" method="get" style="font-size: 10px">
<% if @action_name != "published" then %>
<%= list_item "Home Page", "../show/HomePage", "Home, Sweet Home", "H" %> |
<%= list_item "All Pages", "../list/", "Alphabetically sorted list of pages", "A" %> |
<%= list_item "Recently Revised", "../recently_revised/", "Pages sorted by when they were last changed", "U" %> |
<%= list_item "Authors", "../authors/", "Who wrote what" %> |
<%= list_item "Feeds", "../feeds/", "Subscribe to changes by RSS" %> |
<%= list_item "Export", "../export/", "Download a zip with all the pages in this wiki", "X" %> |
<input type="text" id="searchField" name="query" style="font-size: 10px" value="Search" onClick="this.value == 'Search' ? this.value = '' : true" />
<% else %>
<%= list_item "Home Page", "../published/HomePage", "Home, Sweet Home", "H" %> |
<% end%>
</form>

30
app/views/rdoc_help.rhtml Executable file → Normal file
View file

@ -1,16 +1,16 @@
<div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
<h3>RDoc formatting tips (<a target="_new" href="http://rdoc.sourceforge.net/doc/files/markup/simple_markup_rb.html">advanced</a>)</h3>
<table cellspacing="0" cellpadding="0">
<tr><td>_your text_</td><td class="arrow">&rarr;</td><td><em>your text</em></td></tr>
<tr><td>*your text*</td><td class="arrow">&rarr;</td><td><strong>your text</strong></td></tr>
<tr><td>* Bulleted list<br />* Second item</td><td class="arrow">&rarr;</td><td>&#8226; Bulleted list<br />&#8226; Second item</td></tr>
<tr><td>1. Numbered list<br />2. Second item</td><td class="arrow">&rarr;</td><td>1. Numbered list<br />2. Second item</td></tr>
<tr><td>+my_code+</td><td class="arrow">&rarr;</td><td><code>my_code</code></td></tr>
<tr><td>---</td><td class="arrow">&rarr;</td><td>Horizontal ruler</td></tr>
<tr><td>[[URL linkname]]</td><td class="arrow">&rarr;</td><td><a href="URL">linkname</a></td></tr>
<tr><td>http://url<br />mailto:e@add.com</td><td class="arrow">&rarr;</td><td>Auto-linked</td></tr>
<tr><td>imageURL</td><td class="arrow">&rarr;</td><td>Image</td></tr>
</table>
<%= render 'wiki_words_help' %>
<div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
<h3>RDoc formatting tips (<a target="_new" href="http://rdoc.sourceforge.net/doc/files/markup/simple_markup_rb.html">advanced</a>)</h3>
<table cellspacing="0" cellpadding="0">
<tr><td>_your text_</td><td class="arrow">&rarr;</td><td><em>your text</em></td></tr>
<tr><td>*your text*</td><td class="arrow">&rarr;</td><td><strong>your text</strong></td></tr>
<tr><td>* Bulleted list<br />* Second item</td><td class="arrow">&rarr;</td><td>&#8226; Bulleted list<br />&#8226; Second item</td></tr>
<tr><td>1. Numbered list<br />2. Second item</td><td class="arrow">&rarr;</td><td>1. Numbered list<br />2. Second item</td></tr>
<tr><td>+my_code+</td><td class="arrow">&rarr;</td><td><code>my_code</code></td></tr>
<tr><td>---</td><td class="arrow">&rarr;</td><td>Horizontal ruler</td></tr>
<tr><td>[[URL linkname]]</td><td class="arrow">&rarr;</td><td><a href="URL">linkname</a></td></tr>
<tr><td>http://url<br />mailto:e@add.com</td><td class="arrow">&rarr;</td><td>Auto-linked</td></tr>
<tr><td>imageURL</td><td class="arrow">&rarr;</td><td>Image</td></tr>
</table>
<%= render 'wiki_words_help' %>
</div>

54
app/views/textile_help.rhtml Executable file → Normal file
View file

@ -1,28 +1,28 @@
<div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
<h3>Textile formatting tips (<a href="#" onClick="quickRedReference(); return false;">advanced</a>)</h3>
<table cellspacing="0" cellpadding="0">
<tr><td>_your text_</td><td class="arrow">&rarr;</td><td><em>your text</em></td></tr>
<tr><td>*your text*</td><td class="arrow">&rarr;</td><td><strong>your text</strong></td></tr>
<tr><td>%{color:red}hello%</td><td class="arrow">&rarr;</td><td><span style="color: red;">hello</span></td></tr>
<tr><td>* Bulleted list<br />* Second item</td><td class="arrow">&rarr;</td><td>&#8226; Bulleted list<br />&#8226; Second item</td></tr>
<tr><td># Numbered list<br /># Second item</td><td class="arrow">&rarr;</td><td>1. Numbered list<br />2. Second item</td></tr>
<tr><td>"linkname":URL</td><td class="arrow">&rarr;</td><td><a href="URL">linkname</a></td></tr>
<tr><td>|a|table|row|<br />|b|table|row|</td><td class="arrow">&rarr;</td><td>Table</td></tr>
<tr><td>http://url<br />email@address.com</td><td class="arrow">&rarr;</td><td>Auto-linked</td></tr>
<tr><td>!imageURL!</td><td class="arrow">&rarr;</td><td>Image</td></tr>
</table>
<%= render 'wiki_words_help' %>
</div>
<script language="JavaScript">
function quickRedReference() {
window.open(
"http://hobix.com/textile/quick.html",
"redRef",
"height=600,width=550,channelmode=0,dependent=0," +
"directories=0,fullscreen=0,location=0,menubar=0," +
"resizable=0,scrollbars=1,status=1,toolbar=0"
);
}
<div id="TextileHelp" style="float: right; width: 250px; margin-top: 5px">
<h3>Textile formatting tips (<a href="#" onClick="quickRedReference(); return false;">advanced</a>)</h3>
<table cellspacing="0" cellpadding="0">
<tr><td>_your text_</td><td class="arrow">&rarr;</td><td><em>your text</em></td></tr>
<tr><td>*your text*</td><td class="arrow">&rarr;</td><td><strong>your text</strong></td></tr>
<tr><td>%{color:red}hello%</td><td class="arrow">&rarr;</td><td><span style="color: red;">hello</span></td></tr>
<tr><td>* Bulleted list<br />* Second item</td><td class="arrow">&rarr;</td><td>&#8226; Bulleted list<br />&#8226; Second item</td></tr>
<tr><td># Numbered list<br /># Second item</td><td class="arrow">&rarr;</td><td>1. Numbered list<br />2. Second item</td></tr>
<tr><td>"linkname":URL</td><td class="arrow">&rarr;</td><td><a href="URL">linkname</a></td></tr>
<tr><td>|a|table|row|<br />|b|table|row|</td><td class="arrow">&rarr;</td><td>Table</td></tr>
<tr><td>http://url<br />email@address.com</td><td class="arrow">&rarr;</td><td>Auto-linked</td></tr>
<tr><td>!imageURL!</td><td class="arrow">&rarr;</td><td>Image</td></tr>
</table>
<%= render 'wiki_words_help' %>
</div>
<script language="JavaScript">
function quickRedReference() {
window.open(
"http://hobix.com/textile/quick.html",
"redRef",
"height=600,width=550,channelmode=0,dependent=0," +
"directories=0,fullscreen=0,location=0,menubar=0," +
"resizable=0,scrollbars=1,status=1,toolbar=0"
);
}
</script>

22
app/views/wiki/authors.rhtml Executable file → Normal file
View file

@ -1,11 +1,11 @@
<% @title = 'Authors' %>
<ul id="authorList">
<% for author in @authors %>
<li>
<%= @web.make_link(author) %>
co- or authored:
<%= @web.select.pages_authored_by(author).collect { |page| page.link }.join ', ' %>
</li>
<% end %>
</ul>
<% @title = 'Authors' %>
<ul id="authorList">
<% for author in @authors %>
<li>
<%= @web.make_link(author) %>
co- or authored:
<%= @web.select.pages_authored_by(author).collect { |page| page.link }.join ', ' %>
</li>
<% end %>
</ul>

58
app/views/wiki/edit.rhtml Executable file → Normal file
View file

@ -1,29 +1,29 @@
<%
@title = "Editing #{@page.name}"
@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"] %>
<%= render("#{@web.markup}_help") if @web %>
<form id="editForm" action="../save/<%= @page.name %>" method="post" onSubmit="cleanAuthorName();">
<p>
<textarea name="content" style="width: 450px; height: 500px"><%= @page.content %></textarea>
</p>
<p>
<input type="submit" value="Update" /> as
<input type="text" name="author" id="authorName" value="<%= @author %>"
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
| <a href="../cancel_edit/<%= @page.name %>">Cancel</a> <small>(unlocks page)</small>
</p>
</form>
<script language="JavaScript1.2">
function cleanAuthorName() {
if (document.getElementById('authorName').value == "") {
document.getElementById('authorName').value = 'AnonymousCoward';
}
}
</script>
<%
@title = "Editing #{@page.name}"
@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"] %>
<%= render("#{@web.markup}_help") if @web %>
<form id="editForm" action="../save/<%= @page.name %>" method="post" onSubmit="cleanAuthorName();">
<p>
<textarea name="content" style="width: 450px; height: 500px"><%= @page.content %></textarea>
</p>
<p>
<input type="submit" value="Update" /> as
<input type="text" name="author" id="authorName" value="<%= @author %>"
onClick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
| <a href="../cancel_edit/<%= @page.name %>">Cancel</a> <small>(unlocks page)</small>
</p>
</form>
<script language="JavaScript1.2">
function cleanAuthorName() {
if (document.getElementById('authorName').value == "") {
document.getElementById('authorName').value = 'AnonymousCoward';
}
}
</script>

234
app/views/wiki/edit_web.rhtml Executable file → Normal file
View file

@ -1,117 +1,117 @@
<% @title = "Edit Web" %>
<form action="../update_web" id="setup" method="post" onSubmit="cleanAddress(); return validateSetup()">
<h2 style="margin-bottom: 3px">Name and address</h2>
<div class="help">
The name of the web is included in the title on all pages.
The address is the base path that all pages within the web live beneath.
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
</div>
<div class="inputBox, disableAutoComplete">
Name: <input type="text" id="name" name="name" value="<%= @web.name %>"
onChange="proposeAddress();" /> &nbsp;&nbsp;
Address: <input type="text" id="address" name="address" value="<%= @web.address %>"
onChange="cleanAddress();" />
<i>(Letters and digits only)</i>
</div>
<h2 style="margin-bottom: 3px">Specialize</h2>
<div class="help">
Turning safe mode on will strip HTML tags and stylesheet options from the content of all pages.
Turning on "brackets only" will require all wiki words to be as [[wiki word]] and WikiWord
won't work.
Turning "allow uploads" on will let wiki users to upload pictures and other files to the wiki
and include them on wiki pages.
Additions to the stylesheet take precedence over the existing styles.
<i>Hint:</i> View source on a page you want to style to find ID names on individual tags.
<a href="#" onClick="document.getElementById('additionalStyle').style.display='block';return false;">
See styles &gt;&gt;
</a>
</div>
<div class="inputBox, disableAutoComplete">
Markup:
<select name="markup">
<%= html_options({"Textile" => :textile, "Markdown" => :markdown, "RDoc" => :rdoc },
@web.markup) %>
</select>
&nbsp;&nbsp;
Color:
<select name="color">
<%= html_options({ "Green" => "008B26", "Purple" => "504685", "Red" => "DA0006",
"Orange" => "FA6F00", "Grey" => "8BA2B0" }, @web.color) %>
</select>
&nbsp;&nbsp;
<small>
<input type="checkbox" name="safe_mode" <%= 'checked="on"' if @web.safe_mode %> /> Safe mode
&nbsp;&nbsp;
<input type="checkbox" name="brackets_only" <%= 'checked="on"' if @web.brackets_only %> />
Brackets only
&nbsp;&nbsp;
<input type="checkbox" name="count_pages" <%= 'checked="on"' if @web.count_pages %> /> Count pages
&nbsp;&nbsp;
<input type="checkbox" name="allow_uploads" <%= 'checked="on"' if @web.allow_uploads %> /> Allow uploads
</small>
<textarea id="additionalStyle"
style="display: none; margin-top: 10px; margin-bottom: 5px; width: 560px; height: 200px"
name="additional_style"><%= @web.additional_style %>
</textarea>
</div>
<h2 style="margin-bottom: 3px">Password protection for this web (<%= @web.name %>)</h2>
<div class="help">
This is the password that visitors need to view and edit this web.
Setting the password to nothing will remove the password protection.
</div>
<div class="inputBox">
Password: <input class="disableAutoComplete" type="password" id="password"
name="password" value="<%= @web.password %>" />
&nbsp;&nbsp;
Verify: <input class="disableAutoComplete" type="password" id="password_check"
value="<%= @web.password %>" name="password_check" />
</div>
<h2 style="margin-bottom: 3px">Publish read-only version of this web (<%= @web.name %>)</h2>
<div class="help">
You can turn on a read-only version of this web that's accessible even when the regular web
is password protected.
The published version is accessible through URLs like /wiki/published/HomePage.
</div>
<div class="inputBox">
<input type="checkbox" name="published" <%= 'checked="on"' if @web.published %> /> Publish this web
</div>
<p align="right">
<small>
Enter system password
<input type="password" class="disableAutoComplete" id="system_password" name="system_password" />
and
<input type="submit" value="Update Web" />
<br/><br/>
...or forget changes and <a href="/new_web/">create a new web</a>
</small>
</p>
</form>
<br/>
<h1>Other administrative tasks</h1>
<form action="../remove_orphaned_pages" id="remove_orphaned_pages" method="post">
<p align="right">
<small>
Clean up by entering system password
<input type="password" id="system_password" name="system_password" />
and
<input type="submit" value="Delete Orphan Pages" />
</small>
</p>
</form>
<script type="text/javascript" src="/javascripts/edit_web.js" />
<script type="text/javascript">overrideAutocomplete()</script>
<% @title = "Edit Web" %>
<form action="../update_web" id="setup" method="post" onSubmit="cleanAddress(); return validateSetup()">
<h2 style="margin-bottom: 3px">Name and address</h2>
<div class="help">
The name of the web is included in the title on all pages.
The address is the base path that all pages within the web live beneath.
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
</div>
<div class="inputBox, disableAutoComplete">
Name: <input type="text" id="name" name="name" value="<%= @web.name %>"
onChange="proposeAddress();" /> &nbsp;&nbsp;
Address: <input type="text" id="address" name="address" value="<%= @web.address %>"
onChange="cleanAddress();" />
<i>(Letters and digits only)</i>
</div>
<h2 style="margin-bottom: 3px">Specialize</h2>
<div class="help">
Turning safe mode on will strip HTML tags and stylesheet options from the content of all pages.
Turning on "brackets only" will require all wiki words to be as [[wiki word]] and WikiWord
won't work.
Turning "allow uploads" on will let wiki users to upload pictures and other files to the wiki
and include them on wiki pages.
Additions to the stylesheet take precedence over the existing styles.
<i>Hint:</i> View source on a page you want to style to find ID names on individual tags.
<a href="#" onClick="document.getElementById('additionalStyle').style.display='block';return false;">
See styles &gt;&gt;
</a>
</div>
<div class="inputBox, disableAutoComplete">
Markup:
<select name="markup">
<%= html_options({"Textile" => :textile, "Markdown" => :markdown, "RDoc" => :rdoc },
@web.markup) %>
</select>
&nbsp;&nbsp;
Color:
<select name="color">
<%= html_options({ "Green" => "008B26", "Purple" => "504685", "Red" => "DA0006",
"Orange" => "FA6F00", "Grey" => "8BA2B0" }, @web.color) %>
</select>
&nbsp;&nbsp;
<small>
<input type="checkbox" name="safe_mode" <%= 'checked="on"' if @web.safe_mode %> /> Safe mode
&nbsp;&nbsp;
<input type="checkbox" name="brackets_only" <%= 'checked="on"' if @web.brackets_only %> />
Brackets only
&nbsp;&nbsp;
<input type="checkbox" name="count_pages" <%= 'checked="on"' if @web.count_pages %> /> Count pages
&nbsp;&nbsp;
<input type="checkbox" name="allow_uploads" <%= 'checked="on"' if @web.allow_uploads %> /> Allow uploads
</small>
<textarea id="additionalStyle"
style="display: none; margin-top: 10px; margin-bottom: 5px; width: 560px; height: 200px"
name="additional_style"><%= @web.additional_style %>
</textarea>
</div>
<h2 style="margin-bottom: 3px">Password protection for this web (<%= @web.name %>)</h2>
<div class="help">
This is the password that visitors need to view and edit this web.
Setting the password to nothing will remove the password protection.
</div>
<div class="inputBox">
Password: <input class="disableAutoComplete" type="password" id="password"
name="password" value="<%= @web.password %>" />
&nbsp;&nbsp;
Verify: <input class="disableAutoComplete" type="password" id="password_check"
value="<%= @web.password %>" name="password_check" />
</div>
<h2 style="margin-bottom: 3px">Publish read-only version of this web (<%= @web.name %>)</h2>
<div class="help">
You can turn on a read-only version of this web that's accessible even when the regular web
is password protected.
The published version is accessible through URLs like /wiki/published/HomePage.
</div>
<div class="inputBox">
<input type="checkbox" name="published" <%= 'checked="on"' if @web.published %> /> Publish this web
</div>
<p align="right">
<small>
Enter system password
<input type="password" class="disableAutoComplete" id="system_password" name="system_password" />
and
<input type="submit" value="Update Web" />
<br/><br/>
...or forget changes and <a href="/new_web/">create a new web</a>
</small>
</p>
</form>
<br/>
<h1>Other administrative tasks</h1>
<form action="../remove_orphaned_pages" id="remove_orphaned_pages" method="post">
<p align="right">
<small>
Clean up by entering system password
<input type="password" id="system_password" name="system_password" />
and
<input type="submit" value="Delete Orphan Pages" />
</small>
</p>
</form>
<script type="text/javascript" src="/javascripts/edit_web.js" />
<script type="text/javascript">overrideAutocomplete()</script>

24
app/views/wiki/export.rhtml Executable file → Normal file
View file

@ -1,12 +1,12 @@
<% @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>
<ul id="feedsList">
<li><a href="../export_html">HTML</a>
<li><a href="../export_markup">Markup (<%= @web.markup %>)</a>
<% if OPTIONS[:pdflatex] && @web.markup == :textile %>
<li><a href="../export_tex">TeX</a>
<li><a href="../export_pdf">PDF</a>
<% end %>
</ul>
<% @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>
<ul id="feedsList">
<li><a href="../export_html">HTML</a>
<li><a href="../export_markup">Markup (<%= @web.markup %>)</a>
<% if OPTIONS[:pdflatex] && @web.markup == :textile %>
<li><a href="../export_tex">TeX</a>
<li><a href="../export_pdf">PDF</a>
<% end %>
</ul>

16
app/views/wiki/feeds.rhtml Executable file → Normal file
View file

@ -1,8 +1,8 @@
<% @title = "Feeds" %>
<p>You can subscribe to this wiki by RSS and get either just the headlines of the pages that change or the entire page.</p>
<ul id="feedsList">
<li><a href="../rss_with_content<%= "?password=#{web.password}" if @web.password %>">Full content (RSS 2.0)</a>
<li><a href="../rss_with_headlines<%= "?password=#{web.password}" if @web.password %>">Headlines (RSS 2.0)</a>
</ul>
<% @title = "Feeds" %>
<p>You can subscribe to this wiki by RSS and get either just the headlines of the pages that change or the entire page.</p>
<ul id="feedsList">
<li><a href="../rss_with_content<%= "?password=#{web.password}" if @web.password %>">Full content (RSS 2.0)</a>
<li><a href="../rss_with_headlines<%= "?password=#{web.password}" if @web.password %>">Headlines (RSS 2.0)</a>
</ul>

114
app/views/wiki/list.rhtml Executable file → Normal file
View file

@ -1,57 +1,57 @@
<% @title = "All Pages" %>
<% unless @categories.empty? %>
<div id="categories">
<strong>Categories</strong>:
[<a href=".">Any</a>]
<%= @category_links.join(', ') %>
</div>
<% end %>
<div id="allPages" style="float: left; width: 280px; margin-right: 30px">
<% unless @pages_that_are_orphaned.empty? && @page_names_that_are_wanted.empty? %>
<h2>
All Pages
<br/><small style="font-size: 12px"><i>All pages in <%= @set_name %> listed alphabetically</i></small>
</h2>
<% end %>
<ul><% for page in @pages_by_name %>
<li><a href="../show/<%= page.name %>"><%= truncate(page.plain_name, 35) %></a></li>
<% end %></ul>
<% if @web.count_pages %>
<% total_chars = @pages_in_category.characters %>
<p><small>All content: <%= total_chars %> chars / <%= sprintf("%-.1f", (total_chars / 2275 )) %> pages</small></p>
<% end %>
</div>
<div style="float: left; width: 280px">
<% unless @page_names_that_are_wanted.empty? %>
<h2>
Wanted Pages
<br/><small style="font-size: 12px"><i>Unexisting pages that other pages in <%= @set_name %> reference</i></small>
</h2>
<ul style="margin-bottom: 10px">
<% for page_name in @page_names_that_are_wanted %>
<li>
<a href="../show/<%= page_name %>"><%= truncate(WikiWords.separate(page_name), 35) %></a>
wanted by
<%= @web.select.pages_that_reference(page_name).collect { |page| page.link }.join(", ") %>
</li>
<% end %>
</ul>
<% end %>
<% unless @pages_that_are_orphaned.empty? %>
<h2>
Orphaned Pages
<br/><small style="font-size: 12px"><i>Pages in <%= @set_name %> that no other page reference</i></small>
</h2>
<ul style="margin-bottom: 35px">
<% for page in @pages_that_are_orphaned %><li><a href="../show/<%= page.name %>"><%= truncate(page.plain_name, 35) %></a></li><% end %>
</ul>
<% end %>
</div>
<% @title = "All Pages" %>
<% unless @categories.empty? %>
<div id="categories">
<strong>Categories</strong>:
[<a href=".">Any</a>]
<%= @category_links.join(', ') %>
</div>
<% end %>
<div id="allPages" style="float: left; width: 280px; margin-right: 30px">
<% unless @pages_that_are_orphaned.empty? && @page_names_that_are_wanted.empty? %>
<h2>
All Pages
<br/><small style="font-size: 12px"><i>All pages in <%= @set_name %> listed alphabetically</i></small>
</h2>
<% end %>
<ul><% for page in @pages_by_name %>
<li><a href="../show/<%= page.name %>"><%= truncate(page.plain_name, 35) %></a></li>
<% end %></ul>
<% if @web.count_pages %>
<% total_chars = @pages_in_category.characters %>
<p><small>All content: <%= total_chars %> chars / <%= sprintf("%-.1f", (total_chars / 2275 )) %> pages</small></p>
<% end %>
</div>
<div style="float: left; width: 280px">
<% unless @page_names_that_are_wanted.empty? %>
<h2>
Wanted Pages
<br/><small style="font-size: 12px"><i>Unexisting pages that other pages in <%= @set_name %> reference</i></small>
</h2>
<ul style="margin-bottom: 10px">
<% for page_name in @page_names_that_are_wanted %>
<li>
<a href="../show/<%= page_name %>"><%= truncate(WikiWords.separate(page_name), 35) %></a>
wanted by
<%= @web.select.pages_that_reference(page_name).collect { |page| page.link }.join(", ") %>
</li>
<% end %>
</ul>
<% end %>
<% unless @pages_that_are_orphaned.empty? %>
<h2>
Orphaned Pages
<br/><small style="font-size: 12px"><i>Pages in <%= @set_name %> that no other page reference</i></small>
</h2>
<ul style="margin-bottom: 35px">
<% for page in @pages_that_are_orphaned %><li><a href="../show/<%= page.name %>"><%= truncate(page.plain_name, 35) %></a></li><% end %>
</ul>
<% end %>
</div>

40
app/views/wiki/locked.rhtml Executable file → Normal file
View file

@ -1,20 +1,20 @@
<% @title = "#{@page.plain_name} is locked" %>
<% if @page.lock_duration(Time.now) == 0 %>
<p><%= @page.locked_by_link %> just started editing this page.</p>
<% else %>
<p><%= @page.locked_by_link %> has been editing this page for <%= @page.lock_duration(Time.now) %> minutes.</p>
<% end %>
<p>
<%= link_to 'Edit the page anyway',
{:web => @web_name, :action => 'edit', :id => @page.name, :params => {'break_lock' => '1'} },
{:accesskey => 'E'}
%>
<%= link_to 'Cancel',
{:web => @web_name, :action => 'show', :id => @page.name},
{:accesskey => 'C'}
%>
</p>
<% @title = "#{@page.plain_name} is locked" %>
<% if @page.lock_duration(Time.now) == 0 %>
<p><%= @page.locked_by_link %> just started editing this page.</p>
<% else %>
<p><%= @page.locked_by_link %> has been editing this page for <%= @page.lock_duration(Time.now) %> minutes.</p>
<% end %>
<p>
<%= link_to 'Edit the page anyway',
{:web => @web_name, :action => 'edit', :id => @page.name, :params => {'break_lock' => '1'} },
{:accesskey => 'E'}
%>
<%= link_to 'Cancel',
{:web => @web_name, :action => 'show', :id => @page.name},
{:accesskey => 'C'}
%>
</p>

16
app/views/wiki/login.rhtml Executable file → Normal file
View file

@ -1,8 +1,8 @@
<% @title = "#{@web_name} Login" %><% @hide_navigation = true %>
<form action="authenticate" method="post">
<p>
<b>Password</b><br />
<input type="password" name="password" />
</p>
</form>
<% @title = "#{@web_name} Login" %><% @hide_navigation = true %>
<form action="authenticate" method="post">
<p>
<b>Password</b><br />
<input type="password" name="password" />
</p>
</form>

50
app/views/wiki/new.rhtml Executable file → Normal file
View file

@ -1,25 +1,25 @@
<%
@title = "Creating #{WikiWords.separate(CGI.unescape(@page_name))}"
@content_width = 720
@hide_navigation = true
%>
<%= render("#{@web.markup}_help") if @web %>
<form action="../save/<%= @page_name %>" method="post" onSubmit="cleanAuthorName();">
<p>
<textarea name="content" style="width: 450px; height: 500px"></textarea>
</p>
<p>
<input type="submit" value="Create" /> as
<input type="text" name="author" id="authorName" value="<%= @author %>" onClick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
</p>
</form>
<script language="JavaScript1.2">
function cleanAuthorName() {
if (document.getElementById('authorName').value == "") {
document.getElementById('authorName').value = 'AnonymousCoward';
}
}
</script>
<%
@title = "Creating #{WikiWords.separate(CGI.unescape(@page_name))}"
@content_width = 720
@hide_navigation = true
%>
<%= render("#{@web.markup}_help") if @web %>
<form action="../save/<%= @page_name %>" method="post" onSubmit="cleanAuthorName();">
<p>
<textarea name="content" style="width: 450px; height: 500px"></textarea>
</p>
<p>
<input type="submit" value="Create" /> as
<input type="text" name="author" id="authorName" value="<%= @author %>" onClick="this.value == 'AnonymousCoward' ? this.value = '' : true" />
</p>
</form>
<script language="JavaScript1.2">
function cleanAuthorName() {
if (document.getElementById('authorName').value == "") {
document.getElementById('authorName').value = 'AnonymousCoward';
}
}
</script>

166
app/views/wiki/new_system.rhtml Executable file → Normal file
View file

@ -1,83 +1,83 @@
<% @title = "Instiki Setup"; @content_width = 500 %>
<p>
Congratulations on succesfully installing and starting Instiki.
Since this is the first time Instiki has been run on this port,
you'll need to do a brief one-time setup.
</p>
<form action="../create_system" id="setup" method="post" onSubmit="return validateSetup()">
<ol class="setup">
<li>
<h2 style="margin-bottom: 3px">Name and address for your first web</h2>
<div class="help">
The name of the web is included in the title on all pages.
The address is the base path that all pages within the web live beneath.
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
The address can only consist of letters and digits.
</div>
<div class="inputBox">
Name: <input type="text" id="web_name" name="web_name" value="Wiki"
onChange="proposeAddress();" onClick="this.value == 'Wiki' ? this.value = '' : true" />
&nbsp;&nbsp;
Address: <input type="text" id="web_address" name="web_address" onChange="cleanAddress();"
value="wiki" />
</div>
</li>
<li>
<h2 style="margin-bottom: 3px">Password for creating and changing webs</h2>
<div class="help">
Administrative access allows you to make new webs and change existing ones.<br/>
Everyone with this password will be able to do this, so pick it carefully.
</div>
<div class="inputBox">
Password: <input type="password" id="password" name="password" />
&nbsp;&nbsp;
Verify: <input type="password" id="password_check" name="password_check" />
</div>
</li>
</ol>
<p align="right">
<input type="submit" value="Setup" style="margin-left: 40px" />
</p>
</form>
<script>
function proposeAddress() {
document.getElementById('web_address').value =
document.getElementById('web_name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
}
function cleanAddress() {
document.getElementById('web_address').value =
document.getElementById('web_address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
}
function validateSetup() {
if (document.getElementById('web_name').value == "") {
alert("You must pick a name for the first web");
return false;
}
if (document.getElementById('web_address').value == "") {
alert("You must pick an address for the first web");
return false;
}
if (document.getElementById('password').value == "") {
alert("You must pick a system password");
return false;
}
if (document.getElementById('password_check').value == "" ||
document.getElementById('password').value != document.getElementById('password_check').value) {
alert("The password and its verification doesn't match");
return false;
}
return true;
}
</script>
<% @title = "Instiki Setup"; @content_width = 500 %>
<p>
Congratulations on succesfully installing and starting Instiki.
Since this is the first time Instiki has been run on this port,
you'll need to do a brief one-time setup.
</p>
<form action="../create_system" id="setup" method="post" onSubmit="return validateSetup()">
<ol class="setup">
<li>
<h2 style="margin-bottom: 3px">Name and address for your first web</h2>
<div class="help">
The name of the web is included in the title on all pages.
The address is the base path that all pages within the web live beneath.
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
The address can only consist of letters and digits.
</div>
<div class="inputBox">
Name: <input type="text" id="web_name" name="web_name" value="Wiki"
onChange="proposeAddress();" onClick="this.value == 'Wiki' ? this.value = '' : true" />
&nbsp;&nbsp;
Address: <input type="text" id="web_address" name="web_address" onChange="cleanAddress();"
value="wiki" />
</div>
</li>
<li>
<h2 style="margin-bottom: 3px">Password for creating and changing webs</h2>
<div class="help">
Administrative access allows you to make new webs and change existing ones.<br/>
Everyone with this password will be able to do this, so pick it carefully.
</div>
<div class="inputBox">
Password: <input type="password" id="password" name="password" />
&nbsp;&nbsp;
Verify: <input type="password" id="password_check" name="password_check" />
</div>
</li>
</ol>
<p align="right">
<input type="submit" value="Setup" style="margin-left: 40px" />
</p>
</form>
<script>
function proposeAddress() {
document.getElementById('web_address').value =
document.getElementById('web_name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
}
function cleanAddress() {
document.getElementById('web_address').value =
document.getElementById('web_address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
}
function validateSetup() {
if (document.getElementById('web_name').value == "") {
alert("You must pick a name for the first web");
return false;
}
if (document.getElementById('web_address').value == "") {
alert("You must pick an address for the first web");
return false;
}
if (document.getElementById('password').value == "") {
alert("You must pick a system password");
return false;
}
if (document.getElementById('password_check').value == "" ||
document.getElementById('password').value != document.getElementById('password_check').value) {
alert("The password and its verification doesn't match");
return false;
}
return true;
}
</script>

138
app/views/wiki/new_web.rhtml Executable file → Normal file
View file

@ -1,69 +1,69 @@
<% @title = "New Wiki Web"; @content_width = 500 %>
<p>
Each web serves as an isolated name space for wiki pages,
so different subjects or projects can write about different <i>MuppetShows</i>.
</p>
<form action="../create_web" id="setup" method="post" onSubmit="cleanAddress();
return validateSetup()">
<ol class="setup">
<li>
<h2 style="margin-bottom: 3px">Name and address for your new web</h2>
<div class="help">
The name of the web is included in the title on all pages.
The address is the base path that all pages within the web live beneath.
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
The address can only consist of letters and digits.
</div>
<div class="inputBox">
Name: <input type="text" id="web_name" name="name" onChange="proposeAddress();" />
&nbsp;&nbsp;
Address: <input type="text" id="web_address" name="address" onChange="cleanAddress();" />
</div>
</li>
</ol>
<p align="right">
<small>
Enter system password
<input type="password" id="system_password" name="system_password" />
and
<input type="submit" value="Create Web" />
</small>
</p>
</form>
<script>
function proposeAddress() {
document.getElementById('web_address').value =
document.getElementById('web_name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
}
function cleanAddress() {
document.getElementById('web_address').value =
document.getElementById('web_address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
}
function validateSetup() {
if (document.getElementById('web_name').value == "") {
alert("You must pick a name for the new web");
return false;
}
if (document.getElementById('web_address').value == "") {
alert("You must pick an address for the new web");
return false;
}
if (document.getElementById('system_password').value == "") {
alert("You must enter the system password");
return false;
}
return true;
}
</script>
<% @title = "New Wiki Web"; @content_width = 500 %>
<p>
Each web serves as an isolated name space for wiki pages,
so different subjects or projects can write about different <i>MuppetShows</i>.
</p>
<form action="../create_web" id="setup" method="post" onSubmit="cleanAddress();
return validateSetup()">
<ol class="setup">
<li>
<h2 style="margin-bottom: 3px">Name and address for your new web</h2>
<div class="help">
The name of the web is included in the title on all pages.
The address is the base path that all pages within the web live beneath.
Ex: the address "rails" gives URLs like <i>/rails/show/HomePage</i>.
The address can only consist of letters and digits.
</div>
<div class="inputBox">
Name: <input type="text" id="web_name" name="name" onChange="proposeAddress();" />
&nbsp;&nbsp;
Address: <input type="text" id="web_address" name="address" onChange="cleanAddress();" />
</div>
</li>
</ol>
<p align="right">
<small>
Enter system password
<input type="password" id="system_password" name="system_password" />
and
<input type="submit" value="Create Web" />
</small>
</p>
</form>
<script>
function proposeAddress() {
document.getElementById('web_address').value =
document.getElementById('web_name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
}
function cleanAddress() {
document.getElementById('web_address').value =
document.getElementById('web_address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
}
function validateSetup() {
if (document.getElementById('web_name').value == "") {
alert("You must pick a name for the new web");
return false;
}
if (document.getElementById('web_address').value == "") {
alert("You must pick an address for the new web");
return false;
}
if (document.getElementById('system_password').value == "") {
alert("You must enter the system password");
return false;
}
return true;
}
</script>

156
app/views/wiki/page.rhtml Executable file → Normal file
View file

@ -1,78 +1,78 @@
<% @title = @page.plain_name %>
<div id="revision">
<%= @page.display_content %>
</div>
<div id="changes" style="display: none">
<p style="background: #eee; padding: 3px; border: 1px solid silver">
<small>
Showing changes from revision #<%= @page.number - 1 %> to #<%= @page.number %>:
<ins class="diffins">Added</ins> | <del class="diffdel">Removed</del>
</small>
</p>
<%= @page.display_diff %>
</div>
<div class="byline">
<%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %>
by <%= @page.author_link %>
<%= "(#{@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">
<% if @page.name == "HomePage" %>
<a href="../edit/<%= @page.name %>" class="navlink" accesskey="E">Edit Page</a>
| <a href="../edit_web/" class="navlink">Edit Web</a>
<% else %>
<a href="../edit/<%= @page.name %>" class="navlink" accesskey="E">Edit</a>
<% end %>
<% if @page.revisions.length > 1 %>
| <a href="../revision/<%= @page.name %>?rev=<%= @page.revisions.length - 2 %>" class="navlink" accesskey="R">Back in time</a>
<small>(<%= @page.revisions.length - 1 %> revisions)</small>
<% end %>
<% if @page.revisions.length > 1 %>
<span id="show_changes">
| <a href="#" onClick="toggleChanges(); return false;">See changes</a>
</span>
<span id="hide_changes" style="display: none">
| <a href="#" onClick="toggleChanges(); return false;">Hide changes</a>
</span>
<% end %>
<small>
| Views: <a href="../print/<%= @page.name %>">Print</a>
<% if defined? RedClothForTex and RedClothForTex.available? and @web.markup == :textile %>
| <a href="../tex/<%= @page.name %>">TeX</a> | <a href="../pdf/<%= @page.name %>">PDF</a>
<% end %>
</small>
<% if @page.references.length > 0 %>
<small>
| Linked from: <%= @page.references.collect { |ref| ref.link }.join(", ") %>
</small>
<% end %>
</div>
<script language="Javascript">
function toggleChanges() {
if (document.getElementById("changes").style.display == "none") {
document.getElementById("changes").style.display = "block";
document.getElementById("revision").style.display = "none";
document.getElementById("show_changes").style.display = "none";
document.getElementById("hide_changes").style.display = "inline";
} else {
document.getElementById("changes").style.display = "none";
document.getElementById("revision").style.display = "block";
document.getElementById("show_changes").style.display = "inline";
document.getElementById("hide_changes").style.display = "none";
}
}
</script>
<% @title = @page.plain_name %>
<div id="revision">
<%= @page.display_content %>
</div>
<div id="changes" style="display: none">
<p style="background: #eee; padding: 3px; border: 1px solid silver">
<small>
Showing changes from revision #<%= @page.number - 1 %> to #<%= @page.number %>:
<ins class="diffins">Added</ins> | <del class="diffdel">Removed</del>
</small>
</p>
<%= @page.display_diff %>
</div>
<div class="byline">
<%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %>
by <%= @page.author_link %>
<%= "(#{@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">
<% if @page.name == "HomePage" %>
<a href="../edit/<%= @page.name %>" class="navlink" accesskey="E">Edit Page</a>
| <a href="../edit_web/" class="navlink">Edit Web</a>
<% else %>
<a href="../edit/<%= @page.name %>" class="navlink" accesskey="E">Edit</a>
<% end %>
<% if @page.revisions.length > 1 %>
| <a href="../revision/<%= @page.name %>?rev=<%= @page.revisions.length - 2 %>" class="navlink" accesskey="R">Back in time</a>
<small>(<%= @page.revisions.length - 1 %> revisions)</small>
<% end %>
<% if @page.revisions.length > 1 %>
<span id="show_changes">
| <a href="#" onClick="toggleChanges(); return false;">See changes</a>
</span>
<span id="hide_changes" style="display: none">
| <a href="#" onClick="toggleChanges(); return false;">Hide changes</a>
</span>
<% end %>
<small>
| Views: <a href="../print/<%= @page.name %>">Print</a>
<% if defined? RedClothForTex and RedClothForTex.available? and @web.markup == :textile %>
| <a href="../tex/<%= @page.name %>">TeX</a> | <a href="../pdf/<%= @page.name %>">PDF</a>
<% end %>
</small>
<% if @page.references.length > 0 %>
<small>
| Linked from: <%= @page.references.collect { |ref| ref.link }.join(", ") %>
</small>
<% end %>
</div>
<script language="Javascript">
function toggleChanges() {
if (document.getElementById("changes").style.display == "none") {
document.getElementById("changes").style.display = "block";
document.getElementById("revision").style.display = "none";
document.getElementById("show_changes").style.display = "none";
document.getElementById("hide_changes").style.display = "inline";
} else {
document.getElementById("changes").style.display = "none";
document.getElementById("revision").style.display = "block";
document.getElementById("show_changes").style.display = "inline";
document.getElementById("hide_changes").style.display = "none";
}
}
</script>

28
app/views/wiki/print.rhtml Executable file → Normal file
View file

@ -1,14 +1,14 @@
<%
@title = @page.plain_name
@hide_navigation = true
@style_additions = ".newWikiWord { background-color: white; font-style: italic; }"
@inline_style = true
%>
<%= @page.display_content_for_export %>
<div class="byline">
<%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %>
by
<%= @page.author_link({ :mode => :export }) %>
</div>
<%
@title = @page.plain_name
@hide_navigation = true
@style_additions = ".newWikiWord { background-color: white; font-style: italic; }"
@inline_style = true
%>
<%= @page.display_content_for_export %>
<div class="byline">
<%= @page.revisions? ? "Revised" : "Created" %> on <%= @page.pretty_created_at %>
by
<%= @page.author_link({ :mode => :export }) %>
</div>

16
app/views/wiki/published.rhtml Executable file → Normal file
View file

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

64
app/views/wiki/recently_revised.rhtml Executable file → Normal file
View file

@ -1,32 +1,32 @@
<% @title = "Recently Revised" %>
<% unless @categories.empty? %>
<div id="categories">
<strong>Categories</strong>:
[<a href=".">Any</a>]
<%= @category_links.join(', ') %>
</div>
<% end %>
<% unless @pages_by_revision.empty? %>
<% revision_date = @pages_by_revision.first.revised_on %>
<h3><%= revision_date.strftime('%B %e, %Y') %></h3>
<ul>
<% for page in @pages_by_revision %>
<% if page.revised_on < revision_date %>
<% revision_date = page.revised_on %>
</ul>
<h3><%= revision_date.strftime('%B %e, %Y') %></h3>
<ul>
<% end %>
<li>
<a href="../show/<%= page.name %>"><%= page.plain_name %></a>
<div class="byline" style="margin-bottom: 0px">
by <%= page.author_link %>
at <%= page.created_at.strftime "%H:%M" %>
<%= "from #{page.author.ip}" if page.author.respond_to?(:ip) %>
</div>
</li>
<% end %>
</ul>
<% end %>
<% @title = "Recently Revised" %>
<% unless @categories.empty? %>
<div id="categories">
<strong>Categories</strong>:
[<a href=".">Any</a>]
<%= @category_links.join(', ') %>
</div>
<% end %>
<% unless @pages_by_revision.empty? %>
<% revision_date = @pages_by_revision.first.revised_on %>
<h3><%= revision_date.strftime('%B %e, %Y') %></h3>
<ul>
<% for page in @pages_by_revision %>
<% if page.revised_on < revision_date %>
<% revision_date = page.revised_on %>
</ul>
<h3><%= revision_date.strftime('%B %e, %Y') %></h3>
<ul>
<% end %>
<li>
<a href="../show/<%= page.name %>"><%= page.plain_name %></a>
<div class="byline" style="margin-bottom: 0px">
by <%= page.author_link %>
at <%= page.created_at.strftime "%H:%M" %>
<%= "from #{page.author.ip}" if page.author.respond_to?(:ip) %>
</div>
</li>
<% end %>
</ul>
<% end %>

158
app/views/wiki/revision.rhtml Executable file → Normal file
View file

@ -1,79 +1,79 @@
<% @title = "#{@page.plain_name} (Rev ##{@revision.number})" %>
<div id="revision">
<%= @revision.display_content %>
</div>
<div id="changes" style="display: none">
<p style="background: #eee; padding: 3px; border: 1px solid silver">
<small>
Showing changes from revision #<%= @revision.number - 1 %> to #<%= @revision.number %>:
<ins class="diffins">Added</ins> | <del class="diffdel">Removed</del>
</small>
</p>
<%= @revision.display_diff %>
</div>
<div class="byline">
<%= "Revision from #{@revision.pretty_created_at} by" %>
<%= @page.web.make_link(@revision.author) %>
</div>
<div class="navigation">
<% if @revision.next_revision %>
<% if @revision.next_revision.number < (@page.revisions.length - 1) %>
<a href="../revision/<%= @page.name %>?rev=<%= @revision.next_revision.number %>" class="navlink">
<% else %>
<a href="../show/<%= @page.name %>" class="navlink">
<% end %>
Forward in time</a>
(<%= @revision.page.revisions.length - @revision.next_revision.number %> more)
<% end %>
<% if @revision.next_revision && @revision.previous_revision %>
|
<% end %>
<% if @revision.previous_revision %>
<a href="../revision/<%= @page.name %>?rev=<%= @revision.previous_revision.number %>" class="navlink">Back in time</a>
(<%= @revision.previous_revision.number + 1 %> more)
<% end %>
| <a href="../show/<%= @page.name %>" class="navlink">See current</a>
<% if @revision.previous_revision %>
<span id="show_changes">
| <a href="#" onClick="toggleChanges(); return false;">See changes</a>
</span>
<span id="hide_changes" style="display: none">
| <a href="#" onClick="toggleChanges(); return false;">Hide changes</a>
</span>
<% end %>
| <a href="../rollback/<%= @page.name %>?rev=<%= @revision.number %>" class="navlink">Rollback</a>
<% if @page.references.length > 0 %>
<small>
| Linked from: <%= @page.references.collect { |ref| "<a href='#{ref.name}'>#{ref.name}</a>" }.join(", ") %>
</small>
<% end %>
</div>
<script language="Javascript">
function toggleChanges() {
if (document.getElementById("changes").style.display == "none") {
document.getElementById("changes").style.display = "block";
document.getElementById("revision").style.display = "none";
document.getElementById("show_changes").style.display = "none";
document.getElementById("hide_changes").style.display = "inline";
} else {
document.getElementById("changes").style.display = "none";
document.getElementById("revision").style.display = "block";
document.getElementById("show_changes").style.display = "inline";
document.getElementById("hide_changes").style.display = "none";
}
}
</script>
<% @title = "#{@page.plain_name} (Rev ##{@revision.number})" %>
<div id="revision">
<%= @revision.display_content %>
</div>
<div id="changes" style="display: none">
<p style="background: #eee; padding: 3px; border: 1px solid silver">
<small>
Showing changes from revision #<%= @revision.number - 1 %> to #<%= @revision.number %>:
<ins class="diffins">Added</ins> | <del class="diffdel">Removed</del>
</small>
</p>
<%= @revision.display_diff %>
</div>
<div class="byline">
<%= "Revision from #{@revision.pretty_created_at} by" %>
<%= @page.web.make_link(@revision.author) %>
</div>
<div class="navigation">
<% if @revision.next_revision %>
<% if @revision.next_revision.number < (@page.revisions.length - 1) %>
<a href="../revision/<%= @page.name %>?rev=<%= @revision.next_revision.number %>" class="navlink">
<% else %>
<a href="../show/<%= @page.name %>" class="navlink">
<% end %>
Forward in time</a>
(<%= @revision.page.revisions.length - @revision.next_revision.number %> more)
<% end %>
<% if @revision.next_revision && @revision.previous_revision %>
|
<% end %>
<% if @revision.previous_revision %>
<a href="../revision/<%= @page.name %>?rev=<%= @revision.previous_revision.number %>" class="navlink">Back in time</a>
(<%= @revision.previous_revision.number + 1 %> more)
<% end %>
| <a href="../show/<%= @page.name %>" class="navlink">See current</a>
<% if @revision.previous_revision %>
<span id="show_changes">
| <a href="#" onClick="toggleChanges(); return false;">See changes</a>
</span>
<span id="hide_changes" style="display: none">
| <a href="#" onClick="toggleChanges(); return false;">Hide changes</a>
</span>
<% end %>
| <a href="../rollback/<%= @page.name %>?rev=<%= @revision.number %>" class="navlink">Rollback</a>
<% if @page.references.length > 0 %>
<small>
| Linked from: <%= @page.references.collect { |ref| "<a href='#{ref.name}'>#{ref.name}</a>" }.join(", ") %>
</small>
<% end %>
</div>
<script language="Javascript">
function toggleChanges() {
if (document.getElementById("changes").style.display == "none") {
document.getElementById("changes").style.display = "block";
document.getElementById("revision").style.display = "none";
document.getElementById("show_changes").style.display = "none";
document.getElementById("hide_changes").style.display = "inline";
} else {
document.getElementById("changes").style.display = "none";
document.getElementById("revision").style.display = "block";
document.getElementById("show_changes").style.display = "inline";
document.getElementById("hide_changes").style.display = "none";
}
}
</script>

0
app/views/wiki/rollback.rhtml Executable file → Normal file
View file

44
app/views/wiki/rss_feed.rhtml Executable file → Normal file
View file

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title><%= @web.name %></title>
<link><%= url_for :only_path => false, :web => @web_name, :action => 'show', :id => 'HomePage' %></link>
<description>An Instiki wiki</description>
<language>en-us</language>
<ttl>40</ttl>
<% for page in @pages_by_revision %>
<item>
<title><%= page.plain_name %></title>
<% unless @hide_description %>
<description><%= CGI.escapeHTML(page.display_content) %></description>
<% end %>
<pubDate><%= page.created_at.strftime "%a, %e %b %Y %H:%M:%S %Z" %></pubDate>
<guid><%= url_for :only_path => false, :web => @web_name, :action => 'show', :id => page.name %></guid>
<link><%= url_for :only_path => false, :web => @web_name, :action => 'show', :id => page.name %></link>
<dc:creator><%= WikiWords.separate(page.author) %></dc:creator>
</item>
<% end %>
</channel>
</rss>
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title><%= @web.name %></title>
<link><%= url_for :only_path => false, :web => @web_name, :action => 'show', :id => 'HomePage' %></link>
<description>An Instiki wiki</description>
<language>en-us</language>
<ttl>40</ttl>
<% for page in @pages_by_revision %>
<item>
<title><%= page.plain_name %></title>
<% unless @hide_description %>
<description><%= CGI.escapeHTML(page.display_content) %></description>
<% end %>
<pubDate><%= page.created_at.strftime "%a, %e %b %Y %H:%M:%S %Z" %></pubDate>
<guid><%= url_for :only_path => false, :web => @web_name, :action => 'show', :id => page.name %></guid>
<link><%= url_for :only_path => false, :web => @web_name, :action => 'show', :id => page.name %></link>
<dc:creator><%= WikiWords.separate(page.author) %></dc:creator>
</item>
<% end %>
</channel>
</rss>

26
app/views/wiki/search.rhtml Executable file → Normal file
View file

@ -1,13 +1,13 @@
<% @title = @results.length > 0 ? "#{@results.length} pages contains \"#{@params["query"]}\"" : "No pages contains \"#{@query}\"" %>
<% if @results.length > 0 %>
<ul>
<% for page in @results %>
<li><a href="../show/<%= page.name %>"><%= page.plain_name %></a></li>
<% end %>
</ul>
<% else %>
<p>Perhaps you should try expanding your query. Remember that Instiki searches for entire phrases, so if you search for "all that jazz" it will not match pages that contain these words in separation&mdash;only as a sentence fragment.</p>
<p>If you're a high-tech computer wizard, you might even want try constructing a regular expression. That's actually what Instiki uses, so go right ahead and flex your "[a-z]*Leet?RegExpSkill(s|z)"</p>
<% end %>
<% @title = @results.length > 0 ? "#{@results.length} pages contains \"#{@params["query"]}\"" : "No pages contains \"#{@query}\"" %>
<% if @results.length > 0 %>
<ul>
<% for page in @results %>
<li><a href="../show/<%= page.name %>"><%= page.plain_name %></a></li>
<% end %>
</ul>
<% else %>
<p>Perhaps you should try expanding your query. Remember that Instiki searches for entire phrases, so if you search for "all that jazz" it will not match pages that contain these words in separation&mdash;only as a sentence fragment.</p>
<p>If you're a high-tech computer wizard, you might even want try constructing a regular expression. That's actually what Instiki uses, so go right ahead and flex your "[a-z]*Leet?RegExpSkill(s|z)"</p>
<% end %>

44
app/views/wiki/tex.rhtml Executable file → Normal file
View file

@ -1,23 +1,23 @@
\documentclass[12pt,titlepage]{article}
\usepackage[danish]{babel} %danske tekster
\usepackage[OT1]{fontenc} %rigtige danske bogstaver...
\usepackage{a4}
\usepackage{graphicx}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\input epsf
%-------------------------------------------------------------------
\begin{document}
\sloppy
%-------------------------------------------------------------------
\section*{<%= @page.name %>}
<%= @tex_content %>
\documentclass[12pt,titlepage]{article}
\usepackage[danish]{babel} %danske tekster
\usepackage[OT1]{fontenc} %rigtige danske bogstaver...
\usepackage{a4}
\usepackage{graphicx}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\input epsf
%-------------------------------------------------------------------
\begin{document}
\sloppy
%-------------------------------------------------------------------
\section*{<%= @page.name %>}
<%= @tex_content %>
\end{document}

68
app/views/wiki/tex_web.rhtml Executable file → Normal file
View file

@ -1,35 +1,35 @@
\documentclass[12pt,titlepage]{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE,RO]{}
\fancyhead[LO,RE]{\nouppercase{\bfseries \leftmark}}
\fancyfoot[C]{\thepage}
\usepackage[danish]{babel} %danske tekster
\usepackage{a4}
\usepackage{graphicx}
\usepackage{ucs}
\usepackage[utf8]{inputenc}
\input epsf
%-------------------------------------------------------------------
\title{<%= @web_name %>}
\begin{document}
\maketitle
\tableofcontents
\pagebreak
\sloppy
%-------------------------------------------------------------------
<%= @tex_content %>
\documentclass[12pt,titlepage]{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE,RO]{}
\fancyhead[LO,RE]{\nouppercase{\bfseries \leftmark}}
\fancyfoot[C]{\thepage}
\usepackage[danish]{babel} %danske tekster
\usepackage{a4}
\usepackage{graphicx}
\usepackage{ucs}
\usepackage[utf8]{inputenc}
\input epsf
%-------------------------------------------------------------------
\title{<%= @web_name %>}
\begin{document}
\maketitle
\tableofcontents
\pagebreak
\sloppy
%-------------------------------------------------------------------
<%= @tex_content %>
\end{document}

36
app/views/wiki/web_list.rhtml Executable file → Normal file
View file

@ -1,18 +1,18 @@
<% @title = "Wiki webs" %>
<ul>
<% for web in @webs %>
<li>
<% if web.published %>
<%= web.make_link 'HomePage', web.name, :mode => :publish %> (read-only) /
<%= web.make_link 'HomePage', 'editable version', :mode => :edit %> (requires login)
<% else %>
<%= web.make_link 'HomePage', nil, :mode => :edit %>
<% end %>
<div class="byline" style="margin-bottom: 0px">
<%= web.pages.length %> pages by <%= web.authors.length %> authors
</div>
</li>
<% end %>
</ul>
<% @title = "Wiki webs" %>
<ul>
<% for web in @webs %>
<li>
<% if web.published %>
<%= web.make_link 'HomePage', web.name, :mode => :publish %> (read-only) /
<%= web.make_link 'HomePage', 'editable version', :mode => :edit %> (requires login)
<% else %>
<%= web.make_link 'HomePage', nil, :mode => :edit %>
<% end %>
<div class="byline" style="margin-bottom: 0px">
<%= web.pages.length %> pages by <%= web.authors.length %> authors
</div>
</li>
<% end %>
</ul>

18
app/views/wiki_words_help.rhtml Executable file → Normal file
View file

@ -1,9 +1,9 @@
<h3>Wiki words</h3>
<p style="border-top: 1px dotted #ccc; margin-top: 0px">
Two or more uppercase words stuck together (camel case) or any phrase surrounded by double
brackets is a wiki word. A camel-case wiki word can be escaped by putting \ in front of it.
</p>
<p>
Wiki words: <i>HomePage, ThreeWordsTogether, [[C++]], [[Let's play again!]]</i><br/>
Not wiki words: <i>IBM, School</i>
</p>
<h3>Wiki words</h3>
<p style="border-top: 1px dotted #ccc; margin-top: 0px">
Two or more uppercase words stuck together (camel case) or any phrase surrounded by double
brackets is a wiki word. A camel-case wiki word can be escaped by putting \ in front of it.
</p>
<p>
Wiki words: <i>HomePage, ThreeWordsTogether, [[C++]], [[Let's play again!]]</i><br/>
Not wiki words: <i>IBM, School</i>
</p>