2008-12-15 20:19:22 +01:00
|
|
|
<%- @title = "Edit Web" -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
|
2007-05-11 18:47:38 +02:00
|
|
|
<% form_tag({ :controller => 'admin', :action => 'edit_web', :web => @web.address },
|
2007-01-22 14:43:50 +01:00
|
|
|
{ 'id' => 'setup', 'method' => 'post',
|
2007-01-22 15:36:51 +01:00
|
|
|
'onsubmit' => 'cleanAddress(); return validateSetup()',
|
2007-05-11 18:47:38 +02:00
|
|
|
'accept-charset' => 'utf-8' }) do
|
2007-01-22 14:43:50 +01:00
|
|
|
%>
|
|
|
|
|
|
|
|
<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">
|
2007-02-19 00:27:36 +01:00
|
|
|
<label for ="name">Name:</label> <input type="text" id="name" name="name" class="disableAutoComplete" value="<%= @web.name %>"
|
|
|
|
onchange="proposeAddress();" />   
|
|
|
|
<label for="address">Address:</label> <input type="text" class="disableAutoComplete" id="address" name="address" value="<%= @web.address %>"
|
2007-01-22 15:36:51 +01:00
|
|
|
onchange="cleanAddress();" />
|
2007-01-22 14:43:50 +01:00
|
|
|
<small><em>(Letters and digits only)</em></small>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h2 style="margin-bottom: 3px">Specialize</h2>
|
|
|
|
<div class="inputBox">
|
2007-02-19 00:27:36 +01:00
|
|
|
<label for="markup">Markup:</label>
|
|
|
|
<select id="markup" name="markup">
|
2008-12-18 06:42:28 +01:00
|
|
|
<%= html_options({'Textile' => :textile, 'Markdown' => :markdown, 'Markdown+itex2MML' => :markdownMML, 'Markdown+blahtex/PNG' => :markdownPNG,
|
|
|
|
'Mixed' => :mixed, 'RDoc' => :rdoc }, @web.markup) %>
|
2007-01-22 14:43:50 +01:00
|
|
|
</select>
|
|
|
|
|
2007-02-19 00:27:36 +01:00
|
|
|
  
|
2007-01-22 14:43:50 +01:00
|
|
|
|
2007-02-19 00:27:36 +01:00
|
|
|
<label for="color">Color:</label>
|
|
|
|
<select id="color" name="color">
|
2007-01-22 14:43:50 +01:00
|
|
|
<%= html_options({ 'Green' => '008B26', 'Purple' => '504685', 'Red' => 'DA0006',
|
2008-01-17 10:20:19 +01:00
|
|
|
'Orange' => 'C50', 'Grey' => '8BA2B0' }, @web.color) %>
|
2007-01-22 14:43:50 +01:00
|
|
|
</select>
|
|
|
|
<p>
|
2007-02-19 00:27:36 +01:00
|
|
|
<input type="checkbox" class="disableAutoComplete" id="safe_mode" name="safe_mode" <%= 'checked="checked"' if @web.safe_mode? %> />
|
|
|
|
<label for="safe_mode">Safe mode
|
|
|
|
<em>- strip HTML tags and stylesheet options from the content of all pages</em></label>
|
2007-01-22 14:43:50 +01:00
|
|
|
<br/>
|
2007-02-19 00:27:36 +01:00
|
|
|
<input type="checkbox" class="disableAutoComplete" id="brackets_only" name="brackets_only" <%= 'checked="checked"' if @web.brackets_only? %> />
|
|
|
|
<label for="brackets_only">Brackets only
|
|
|
|
<em>- require all wiki words to be as [[wiki word]], WikiWord links won't be created</em></label>
|
2007-01-22 14:43:50 +01:00
|
|
|
<br/>
|
2007-02-19 00:27:36 +01:00
|
|
|
<input type="checkbox" class="disableAutoComplete" id="count_pages" name="count_pages" <%= 'checked="checked"' if @web.count_pages? %> />
|
|
|
|
<label for="count_pages">Count pages</label>
|
2007-01-22 14:43:50 +01:00
|
|
|
<br/>
|
2007-02-19 00:27:36 +01:00
|
|
|
<input type="checkbox" class="disableAutoComplete" name="allow_uploads" <%= 'checked="checked"' if @web.allow_uploads? %> />
|
2007-01-22 14:43:50 +01:00
|
|
|
Allow uploads of no more than
|
|
|
|
<input type="text" class="disableAutoComplete" name="max_upload_size" value="<%= @web.max_upload_size %>"
|
2007-02-19 00:27:36 +01:00
|
|
|
size="20" />
|
2007-01-22 14:43:50 +01:00
|
|
|
kbytes
|
|
|
|
<em>-
|
|
|
|
allow users to upload pictures and other files and include them on wiki pages
|
|
|
|
</em>
|
|
|
|
</p>
|
|
|
|
|
2007-03-09 05:35:49 +01:00
|
|
|
<a href="#" onclick="toggleView('additionalStyle');return false;">
|
2007-01-22 14:43:50 +01:00
|
|
|
Stylesheet tweaks >></a>
|
2007-02-19 00:27:36 +01:00
|
|
|
<em>
|
2007-01-22 14:43:50 +01:00
|
|
|
- add or change styles used by this web; styles defined here take precedence over
|
|
|
|
instiki.css. Hint: View HTML source of a page you want to style to find ID names on individual
|
2007-02-19 00:27:36 +01:00
|
|
|
tags.</em>
|
2007-01-22 14:43:50 +01:00
|
|
|
<br/>
|
2007-02-19 00:27:36 +01:00
|
|
|
<textarea id="additionalStyle" class="disableAutoComplete" cols="50" rows="20"
|
2008-02-29 09:40:22 +01:00
|
|
|
style="display:none" name="additional_style"><%= h(@web.additional_style) %>
|
2007-01-22 14:43:50 +01:00
|
|
|
</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">
|
2007-02-19 00:27:36 +01:00
|
|
|
<label for="password">Password:</label> <input class="disableAutoComplete" type="password" id="password"
|
2007-01-22 14:43:50 +01:00
|
|
|
name="password" value="<%= @web.password %>" />
|
2007-02-19 00:27:36 +01:00
|
|
|
  
|
|
|
|
<label for="password_check">Verify:</label> <input class="disableAutoComplete" type="password" id="password_check"
|
2007-01-22 14:43:50 +01:00
|
|
|
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">
|
2007-02-19 00:27:36 +01:00
|
|
|
<input type="checkbox" id="published" name="published" class="disableAutoComplete" <%= 'checked="checked"' if @web.published? %> />
|
|
|
|
<label for="published">Publish this web</label>
|
2007-01-22 14:43:50 +01:00
|
|
|
</div>
|
|
|
|
|
2007-02-19 00:27:36 +01:00
|
|
|
<p style="text-align:right;font-size:.85em;">
|
|
|
|
<label for="system_password">Enter system password</label>
|
2007-01-22 14:43:50 +01:00
|
|
|
<input type="password" class="disableAutoComplete" id="system_password"
|
|
|
|
name="system_password" />
|
|
|
|
and
|
|
|
|
<input type="submit" value="Update Web" />
|
|
|
|
<br/><br/>
|
|
|
|
...or forget changes and <%= link_to 'create a new web', :action => 'create_web' %>
|
|
|
|
</p>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- end %>
|
2007-01-22 14:43:50 +01:00
|
|
|
|
|
|
|
<h1>Other administrative tasks</h1>
|
|
|
|
|
2007-05-11 18:47:38 +02:00
|
|
|
<% form_tag({:controller => 'admin', :web => @web.address, :action => 'remove_orphaned_pages'},
|
2007-01-22 14:43:50 +01:00
|
|
|
{ :id => 'remove_orphaned_pages',
|
2007-01-22 15:36:51 +01:00
|
|
|
:onsubmit => "return checkSystemPassword(document.getElementById('system_password_orphaned').value)",
|
2007-05-11 18:47:38 +02:00
|
|
|
'accept-charset' => 'utf-8' }) do
|
2007-01-22 14:43:50 +01:00
|
|
|
%>
|
2008-12-31 10:54:23 +01:00
|
|
|
<div class="inputBox">
|
|
|
|
<%= link_to ' Manage uploaded files',
|
|
|
|
{:controller => 'wiki', :web => @web.address, :action => 'file_list'}, :style => 'font-weight:bold' %>
|
|
|
|
for this web (<%= @web.name %>)
|
|
|
|
</div>
|
2007-02-19 00:27:36 +01:00
|
|
|
<p style="text-align:right;font-size:.85em;">
|
2008-12-07 07:24:25 +01:00
|
|
|
Clean up this web (<%= @web.name %>) by entering the system password
|
2007-01-22 14:43:50 +01:00
|
|
|
<input type="password" id="system_password_orphaned" class="disableAutoComplete" name="system_password_orphaned" />
|
|
|
|
and
|
|
|
|
<input type="submit" value="Delete Orphan Pages" />
|
|
|
|
</p>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- end -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- categories = WikiReference.list_categories(@web).sort
|
|
|
|
if categories.length > 0 -%>
|
2008-12-06 23:11:47 +01:00
|
|
|
<% 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)",
|
|
|
|
'accept-charset' => 'utf-8' }) do
|
|
|
|
%>
|
|
|
|
<p style="text-align:right;font-size:.85em;">
|
|
|
|
Clean up selected category:
|
|
|
|
<select id="category" name="category">
|
|
|
|
<%= html_options(categories) %>
|
|
|
|
</select>
|
|
|
|
Enter system password
|
|
|
|
<input type="password" id="system_password_orphaned_in_category" class="disableAutoComplete" name="system_password_orphaned_in_category" />
|
|
|
|
and
|
|
|
|
<input type="submit" value="Delete Orphan Pages in Category" />
|
|
|
|
</p>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
2008-12-06 23:11:47 +01:00
|
|
|
|
|
|
|
<div class="inputBox">
|
2008-12-06 13:06:46 +01:00
|
|
|
<% form_tag({:controller => 'admin', :web => @web.address, :action => 'delete_web'},
|
|
|
|
{ :id => 'delete_web',
|
|
|
|
:onsubmit => "return checkSystemPassword(document.getElementById('system_password_delete_web').value)",
|
|
|
|
'accept-charset' => 'utf-8' }) do
|
|
|
|
%>
|
2008-12-06 23:11:47 +01:00
|
|
|
<p style="text-align:right;">
|
2008-12-07 07:24:25 +01:00
|
|
|
Delete this web (<%= @web.name %>), and all its pages. Enter system password
|
2008-12-06 13:06:46 +01:00
|
|
|
<input type="password" id="system_password_delete_web" class="disableAutoComplete" name="system_password_delete_web" />
|
|
|
|
and
|
|
|
|
<input type="submit" value="Delete Web" />
|
|
|
|
</p>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- end %>
|
2008-12-06 23:11:47 +01:00
|
|
|
</div>
|
2008-12-06 13:06:46 +01:00
|
|
|
|
2007-01-22 14:43:50 +01:00
|
|
|
<%= javascript_include_tag 'edit_web' %>
|