app/views/wiki/edit_web.rhtml in Pimki-1.7.092 vs app/views/wiki/edit_web.rhtml in Pimki-1.8.092
- old
+ new
@@ -1,306 +1,304 @@
-<% @title = "Web Setup"
- @hide_menu = true
- @style_additions = "
- #Container { width: 600px; margin-left: 180px;}
- input { vertical-align: bottom }
- "
-%>
-<%= sub_template "top" %>
-
-<%= "<p style='font-size: 15px; font-variant: italic; color: red;'>#{@message}</span>" if @message %>
-
-<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">
- Name: <input type="text" id="name" name="name" value="<%= @web.name %>" onChange="proposeAddress();">
- Address: <input type="text" id="address" name="address" value="<%= @web.address %>" onChange="cleanAddress();">
- <i>(Letters & digits only)</i>
- </div>
-
- <h2 style="margin-bottom: 3px">Specialize</h2>
- <script>
- function see_styles() {
- document.getElementById('additionalStyle').style.display='block';
- document.getElementById('see_styles').style.display='none';
- document.getElementById('hide_styles').style.display='inline';
- return false;
- }
- function hide_styles() {
- document.getElementById('additionalStyle').style.display='none';
- document.getElementById('see_styles').style.display='inline';
- document.getElementById('hide_styles').style.display='none';
- return false;
- }
- </script>
- <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.
- 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.
-
- </div>
- <div class="inputBox">
- Markup:
- <select name="markup">
- <%= html_options({ "Textile" => :textile, "Markdown via RedCloth (experimental)" => :red_markdown, "Markdown via BlueCloth" => :blue_markdown, "RDoc" => :rdoc }, @web.markup) %>
- </select>
-
-
-
- Color:
- <select name="color">
- <%= html_options({ "Green" => "008B26", "Purple" => "504685", "Red" => "DA0006", "Orange" => "FA6F00", "Grey" => "8BA2B0" },
- @web.color) %>
- </select>
-
-
-
- <br />
-
- <small>
-
- <input type="checkbox" name="safe_mode"<%= " CHECKED" if @web.safe_mode %>> Safe mode
-
-
-
- <input type="checkbox" name="brackets_only"<%= " CHECKED" if @web.brackets_only %>> Brackets only
-
-
-
- <input type="checkbox" name="count_pages"<%= " CHECKED" if @web.count_pages %>> Count pages
-
- </small>
-
- <br />
- <a style='font-size:smaller;' id='see_styles' href="#" onClick="return see_styles();">See styles >></a>
- <a style='font-size:smaller; display:none;' id='hide_styles' href="#" onClick="return hide_styles();">Hide styles <<</a>
- <textarea id="additionalStyle" style="display: none; margin-top: 10px; margin-bottom: 5px; width: 100%; height: 200px" name="additional_style"><%= @web.additional_style %></textarea>
- </div>
-
- <h2 style="margin-bottom: 3px">Persistence Options (all webs)</h2>
- <div class="help">
- You can set how often to take snapshots of the web data. (All incremental changes are saved as command_logs; snapshots supercede those with the full data). Recommended values are 1-2 hours if you turn the web on and off often, or 24-48 hours if this is a long running service.<br />
- Snapshots will not be taken if there are no incremental changes (in the form of command_logs). You can always force a snapshot in the administrative tasks below.
- </div>
- <div class="inputBox">
- <input align='right' type="text" name="snapshots_interval" value='<%= @snapshot_interval %>' /> hour(s).
- </div>
-
- <h2 style="margin-bottom: 3px">Password protection for this PIM (<%= @web.name %>)</h2>
- <div class="help">
- This is the password that visitors need to login to view and edit this web. Setting the password to nothing will remove the password protection.
- </div>
- <div class="inputBox">
- Password: <input type="password" id="password" name="password" value="<%= @web.password %>">
- Verify: <input type="password" id="password_check" value="<%= @web.password %>" name="password_check"><br />
- <!--
- <input type="radio" id="check_pass_on_edit" name="check_pass_on_edit" value='each_edit' <%= 'checked' if @web.password && @web.check_pass_on_edit %>>Require password for each edit
- <input type="radio" id="check_pass_on_edit" name="check_pass_on_edit" value='login_only' <%= 'checked' if @web.password && !@web.check_pass_on_edit %>>Require password once on logon
- -->
- </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.<br /><br />
-
- Defaulting non-localhost requests to the 'published' version means that requests coming from other machines to the root (e.g. http://host:2500/) will be passed to /web/published and not /web/show.<br />
-
- Other machines can still explicitly request the /web/show versions, for which you need to set editing password etc. This is just to make referring colleagues to your PIM easier.
- </div>
- <div class="inputBox">
- <script>
- function checkPublished() {
- if (!document.getElementById("published").checked) {
- document.getElementById("default_to_published").checked = false;
- document.getElementById("default_to_published").disabled = true;
- } else {
- document.getElementById("default_to_published").disabled = false;
- }
- };
- function checkPublishedDefault() {
- if (document.getElementById("default_to_published").checked) {
- document.getElementById("published").checked = true;
- }
- };
- </script>
- <input type="checkbox" id="published" name="published" onClick='return checkPublished();' <%= "CHECKED" if @web.published %>> Publish this web
- <br />
- <input type="checkbox" id="default_to_published" name="default_to_published" onClick='return checkPublishedDefault();'
- <%= "disabled" unless @web.published %>
- <%= "checked" if @web.default_to_published %>> Default non-localhost requests to the 'published' version
- </div>
-
- <h2 style="margin-bottom: 3px">Customise this PIM</h2>
- <div class="help">
- Here are a few setting you can use to tweak the appearance and behaviour of your Pimki.
- </div>
- <div class="inputBox">
- <h4>Interface Options</h4>
-
- <input type="checkbox" name="enable_dclick_edit" <%= "checked" if @web.enable_dclick_edit %>> Edit page on double click.<br />
-
- <input type="checkbox" name="enable_menu" <%= "checked" if @web.enable_menu %>> Enable menu on left. Don't forget to <a href='../edit_menu'>set the menu contents</a>.
-
- <h4>Mind Map</h4>
- <i>Size</i>:<br />
- Limit the size of the Mind Map image. Format is "width,height" in inches. Leave blank for no size limit.<br />
- <input type="text" name="mind_map_size" id="mind_map_size" value="<%= web.mind_map_size %>">
- <table>
- <tr style="font-style:italic;">
- <td>Graph Type</td>
- <td style="width:200px">Layout Type</td>
- <td style="width:500px">Content Options</td>
- <td>Categories</td>
- </tr>
- <tr>
- <td style="vertical-align:top;" width="30%">
- <input type="radio" name="graph_type" value="normal" <%= 'checked' if @graph_type == 'normal' %>>Draw Normal Graph<br>
- <input type="radio" name="graph_type" value="author" <%= 'checked' if @graph_type == 'author' %>>Draw Authors Graph<br>
- <input type="radio" name="graph_type" value="category" <%= 'checked' if @graph_type == 'category' %>>Draw Category Graph<br>
- </td>
- <td width="100" style="vertical-align:top;" >
- <input type="radio" name="draw_type" value="neato" <% if @prog == 'neato' %> checked <% end %>>Neato<br>
- <input type="radio" name="draw_type" value="dot" <% if @prog == 'dot' %> checked <% end %>>Dot</br>
- <input type="radio" name="draw_type" value="circo" <% if @prog == 'circo' %> checked <% end %>>Circo</br>
- <input type="radio" name="draw_type" value="twopi" <% if @prog == 'twopi' %> checked <% end %>>Twopi</br>
- </td>
- <td style="vertical-align:top;width:400px;">
- <input type="checkbox" id="show_authors" name="show_authors" <%= 'checked' if @show_authors %>>Show author pages<br>
- <input type="checkbox" id="missing" name="missing" <%= 'checked' if @missing %>>Show missing pages<br>
- <input type="checkbox" id="show_leaves" name="show_leaves" <%= 'checked' if @show_leaves %>>Show leaf pages<br>
- </td>
- <td>
- <select id="selected_categs" name="selected_categs" size="4" style="width:120px;" multiple>
- <option value="all" <%= 'selected' if @selected_categories.empty? %>><all categories></option>
- <option value="none" <%= 'selected' if @selected_categories.include? 'none' %>><no categories></option>
- <% for category in @categories %>
- <option value="<%= category %>" <%= 'selected' if @selected_categories.include? category %>><%= category %></option>
- <% end %>
- </select>
- </td>
- </tr>
- </table>
-
-
- <!--
-
- <br /><br />
- <h4>Bliki Options</h4>
-
- <br /><br />
- <h4>Content & Symbols mapping</h4>
-
- Extra special symbols. The format of the map is: "code=text" on separate lines. This will map an element of <i><:code></i> to <i>text</i>, e.g. <:cbx> is mapped to <input type="checkbox" disabled /><br />
- <textarea name="symbols_map" id="symbols_map" style="width: 100%; height: 100px"></textarea>
-
- <br /><br />
-
- Extra special links. The format of the map is: "link_name=link_format" on separate lines. This will map an element of <i>[link_name[link_text]]</i> to your specified format. e.g. to use google's redirection enter: <pre>google=http://www.google.com/url?sa=D&q=#{link_text}</pre> and use as: <pre>[[!goggle http://pimki.rubyforge.org/]]</pre> to map to: <pre>http://www.google.com/url?sa=D&q=http://pimki.rubyforge.org/</pre><br />
- <textarea name="links_map" id="links_map" style="width: 100%; height: 100px"></textarea>
-
- -->
- </div>
-
- <p align="right">
- <small>
- Enter system password
- <input type="password" id="system_password" name="system_password">
- and
- <input type="submit" value="Update Web">
- </small>
- </p>
-</form>
-
-<p style='font-size: 10px; text-align: right;'>...or forget all your changes and <a href="/new_web/">create a new web</a>.<br />
-<% num_webs = WikiService.instance.webs.length %>
-(There <%= num_webs > 1 ? 'are' : 'is' %> currently <a href='/web_list/'><%= WikiService.instance.webs.length %> web<%= 's' if num_webs > 1 %></a>)</p>
-
-<hr />
-<br/>
-
-<h2>Other administrative tasks</h2>
-<form action="../administrate" id="administrate" method="post" class="inputBox">
- <p style="font-size: 10px;">
- Clean up by entering system password
- <input type="password" id="system_password" name="system_password">
- and...
- </p>
- <p align='right'>
- <input type="submit" name='action' value="Delete Orphan Pages"><br/>
- <input type="submit" name='action' value="Clear Render Cache"><br/>
- <input type="submit" name='action' value="Force Data Snapshot"><br/>
- <input type="submit" name='action' value="Clean Storage"><br/>
- <% if wiki.webs.size > 1 %>
- <input type="submit" name='action' value="Make This Web Default"><br/>
- <% end %>
- <br/>
- <input type="submit" name='action' value="Remove This Web" onClick="return confirm('Are you absolutely sure you want to delete the \'<%= web.name %>\' web?')"><br/>
- </p>
-</form>
-
-<hr />
-<br/>
-
-<h2>Stop Pimki</h2>
-<p style="color:red">Please note that stopping the server will stop all pimki webs running on this server!</p>
-<form action="../stop" id="stop" method="post">
- <p style="font-size: 10px;" class="inputBox">
- Enter system password
- <input type="password" id="system_password" name="system_password">
- and
- <input type="submit" name='stop' value="Stop Pimki">
- in
- <input type="text" name='seconds' value="3" size='5' style="text-align:right;">
- seconds.
- </p>
-</form>
-
-<script>
-function proposeAddress() {
- document.getElementById('address').value =
- document.getElementById('name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
-}
-
-function cleanAddress() {
- document.getElementById('address').value =
- document.getElementById('address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
-}
-
-function validateSetup() {
- if (document.getElementById('system_password').value == "") {
- alert("You must enter the system password");
- return false;
- }
-
- if (document.getElementById('name').value == "") {
- alert("You must pick a name for the web");
- return false;
- }
-
- if (document.getElementById('address').value == "") {
- alert("You must pick an address for the web");
- return false;
- }
-
- if (document.getElementById('password').value != "" &&
- document.getElementById('password').value != document.getElementById('password_check').value) {
- alert("The password and its verification doesn't match");
- return false;
- }
-
- if (document.getElementById('mind_map_size').value != "" &&
- !(/^\d+,\d+$/.test(document.getElementById('mind_map_size').value))) {
- alert("The Mind Map size must be in the format of 'digit(s),digit(s)'!");
- return false;
- }
-
- return true;
-}
-</script>
-
+<% @title = "Web Setup"
+ @hide_menu = true
+ @style_additions = "input { vertical-align: bottom }"
+ @style_additions += "#Container { margin-left: 180px; }" if web.enable_menu
+%>
+<%= sub_template "top" %>
+
+<%= "<p style='font-size: 15px; font-variant: italic; color: red;'>#{@message}</span>" if @message %>
+
+<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">
+ Name: <input type="text" id="name" name="name" value="<%= @web.name %>" onChange="proposeAddress();">
+ Address: <input type="text" id="address" name="address" value="<%= @web.address %>" onChange="cleanAddress();">
+ <i>(Letters & digits only)</i>
+ </div>
+
+ <h2 style="margin-bottom: 3px">Specialize</h2>
+ <script>
+ function see_styles() {
+ document.getElementById('additionalStyle').style.display='block';
+ document.getElementById('see_styles').style.display='none';
+ document.getElementById('hide_styles').style.display='inline';
+ return false;
+ }
+ function hide_styles() {
+ document.getElementById('additionalStyle').style.display='none';
+ document.getElementById('see_styles').style.display='inline';
+ document.getElementById('hide_styles').style.display='none';
+ return false;
+ }
+ </script>
+ <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.
+ 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.
+
+ </div>
+ <div class="inputBox">
+ Markup:
+ <select name="markup">
+ <%= html_options({ "Textile" => :textile, "Markdown via RedCloth (experimental)" => :red_markdown, "Markdown via BlueCloth" => :blue_markdown, "RDoc" => :rdoc }, @web.markup) %>
+ </select>
+
+
+
+ Color:
+ <select name="color">
+ <%= html_options({ "Green" => "008B26", "Purple" => "504685", "Red" => "DA0006", "Orange" => "FA6F00", "Grey" => "8BA2B0" },
+ @web.color) %>
+ </select>
+
+
+
+ <br />
+
+ <small>
+
+ <input type="checkbox" name="safe_mode"<%= " CHECKED" if @web.safe_mode %>> Safe mode
+
+
+
+ <input type="checkbox" name="brackets_only"<%= " CHECKED" if @web.brackets_only %>> Brackets only
+
+
+
+ <input type="checkbox" name="count_pages"<%= " CHECKED" if @web.count_pages %>> Count pages
+
+ </small>
+
+ <br />
+ <a style='font-size:smaller;' id='see_styles' href="#" onClick="return see_styles();">See styles >></a>
+ <a style='font-size:smaller; display:none;' id='hide_styles' href="#" onClick="return hide_styles();">Hide styles <<</a>
+ <textarea id="additionalStyle" style="display: none; margin-top: 10px; margin-bottom: 5px; width: 100%; height: 200px" name="additional_style"><%= @web.additional_style %></textarea>
+ </div>
+
+ <h2 style="margin-bottom: 3px">Persistence Options (all webs)</h2>
+ <div class="help">
+ You can set how often to take snapshots of the web data. (All incremental changes are saved as command_logs; snapshots supercede those with the full data). Recommended values are 1-2 hours if you turn the web on and off often, or 24-48 hours if this is a long running service.<br />
+ Snapshots will not be taken if there are no incremental changes (in the form of command_logs). You can always force a snapshot in the administrative tasks below.
+ </div>
+ <div class="inputBox">
+ <input align='right' type="text" name="snapshots_interval" value='<%= @snapshot_interval %>' /> hour(s).
+ </div>
+
+ <h2 style="margin-bottom: 3px">Password protection for this PIM (<%= @web.name %>)</h2>
+ <div class="help">
+ This is the password that visitors need to login to view and edit this web. Setting the password to nothing will remove the password protection.
+ </div>
+ <div class="inputBox">
+ Password: <input type="password" id="password" name="password" value="<%= @web.password %>">
+ Verify: <input type="password" id="password_check" value="<%= @web.password %>" name="password_check"><br />
+ <!--
+ <input type="radio" id="check_pass_on_edit" name="check_pass_on_edit" value='each_edit' <%= 'checked' if @web.password && @web.check_pass_on_edit %>>Require password for each edit
+ <input type="radio" id="check_pass_on_edit" name="check_pass_on_edit" value='login_only' <%= 'checked' if @web.password && !@web.check_pass_on_edit %>>Require password once on logon
+ -->
+ </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.<br /><br />
+
+ Defaulting non-localhost requests to the 'published' version means that requests coming from other machines to the root (e.g. http://host:2500/) will be passed to /web/published and not /web/show.<br />
+
+ Other machines can still explicitly request the /web/show versions, for which you need to set editing password etc. This is just to make referring colleagues to your PIM easier.
+ </div>
+ <div class="inputBox">
+ <script>
+ function checkPublished() {
+ if (!document.getElementById("published").checked) {
+ document.getElementById("default_to_published").checked = false;
+ document.getElementById("default_to_published").disabled = true;
+ } else {
+ document.getElementById("default_to_published").disabled = false;
+ }
+ };
+ function checkPublishedDefault() {
+ if (document.getElementById("default_to_published").checked) {
+ document.getElementById("published").checked = true;
+ }
+ };
+ </script>
+ <input type="checkbox" id="published" name="published" onClick='return checkPublished();' <%= "CHECKED" if @web.published %>> Publish this web
+ <br />
+ <input type="checkbox" id="default_to_published" name="default_to_published" onClick='return checkPublishedDefault();'
+ <%= "disabled" unless @web.published %>
+ <%= "checked" if @web.default_to_published %>> Default non-localhost requests to the 'published' version
+ </div>
+
+ <h2 style="margin-bottom: 3px">Customise this PIM</h2>
+ <div class="help">
+ Here are a few setting you can use to tweak the appearance and behaviour of your Pimki.
+ </div>
+ <div class="inputBox">
+ <h4>Interface Options</h4>
+
+ <input type="checkbox" name="enable_dclick_edit" <%= "checked" if @web.enable_dclick_edit %>> Edit page on double click.<br />
+
+ <input type="checkbox" name="enable_menu" <%= "checked" if @web.enable_menu %>> Enable menu on left. Don't forget to <a href='../edit_menu'>set the menu contents</a>.
+
+ <h4>Mind Map</h4>
+ <i>Size</i>:<br />
+ Limit the size of the Mind Map image. Format is "width,height" in inches. Leave blank for no size limit.<br />
+ <input type="text" name="mind_map_size" id="mind_map_size" value="<%= web.mind_map_size %>">
+ <table>
+ <tr style="font-style:italic;">
+ <td>Graph Type</td>
+ <td style="width:200px">Layout Type</td>
+ <td style="width:500px">Content Options</td>
+ <td>Categories</td>
+ </tr>
+ <tr>
+ <td style="vertical-align:top;" width="30%">
+ <input type="radio" name="graph_type" value="normal" <%= 'checked' if @graph_type == 'normal' %>>Draw Normal Graph<br>
+ <input type="radio" name="graph_type" value="author" <%= 'checked' if @graph_type == 'author' %>>Draw Authors Graph<br>
+ <input type="radio" name="graph_type" value="category" <%= 'checked' if @graph_type == 'category' %>>Draw Category Graph<br>
+ </td>
+ <td width="100" style="vertical-align:top;" >
+ <input type="radio" name="draw_type" value="neato" <% if @prog == 'neato' %> checked <% end %>>Neato<br>
+ <input type="radio" name="draw_type" value="dot" <% if @prog == 'dot' %> checked <% end %>>Dot</br>
+ <input type="radio" name="draw_type" value="circo" <% if @prog == 'circo' %> checked <% end %>>Circo</br>
+ <input type="radio" name="draw_type" value="twopi" <% if @prog == 'twopi' %> checked <% end %>>Twopi</br>
+ </td>
+ <td style="vertical-align:top;width:400px;">
+ <input type="checkbox" id="show_authors" name="show_authors" <%= 'checked' if @show_authors %>>Show author pages<br>
+ <input type="checkbox" id="missing" name="missing" <%= 'checked' if @missing %>>Show missing pages<br>
+ <input type="checkbox" id="show_leaves" name="show_leaves" <%= 'checked' if @show_leaves %>>Show leaf pages<br>
+ </td>
+ <td>
+ <select id="selected_categs" name="selected_categs" size="4" style="width:120px;" multiple>
+ <option value="all" <%= 'selected' if @selected_categories.empty? %>><all categories></option>
+ <option value="none" <%= 'selected' if @selected_categories.include? 'none' %>><no categories></option>
+ <% for category in @categories %>
+ <option value="<%= category %>" <%= 'selected' if @selected_categories.include? category %>><%= category %></option>
+ <% end %>
+ </select>
+ </td>
+ </tr>
+ </table>
+
+
+ <!--
+
+ <br /><br />
+ <h4>Bliki Options</h4>
+
+ <br /><br />
+ <h4>Content & Symbols mapping</h4>
+
+ Extra special symbols. The format of the map is: "code=text" on separate lines. This will map an element of <i><:code></i> to <i>text</i>, e.g. <:cbx> is mapped to <input type="checkbox" disabled /><br />
+ <textarea name="symbols_map" id="symbols_map" style="width: 100%; height: 100px"></textarea>
+
+ <br /><br />
+
+ Extra special links. The format of the map is: "link_name=link_format" on separate lines. This will map an element of <i>[link_name[link_text]]</i> to your specified format. e.g. to use google's redirection enter: <pre>google=http://www.google.com/url?sa=D&q=#{link_text}</pre> and use as: <pre>[[!goggle http://pimki.rubyforge.org/]]</pre> to map to: <pre>http://www.google.com/url?sa=D&q=http://pimki.rubyforge.org/</pre><br />
+ <textarea name="links_map" id="links_map" style="width: 100%; height: 100px"></textarea>
+
+ -->
+ </div>
+
+ <p align="right">
+ <small>
+ Enter system password
+ <input type="password" id="system_password" name="system_password">
+ and
+ <input type="submit" value="Update Web">
+ </small>
+ </p>
+</form>
+
+<p style='font-size: 10px; text-align: right;'>...or forget all your changes and <a href="/new_web/">create a new web</a>.<br />
+<% num_webs = WikiService.instance.webs.length %>
+(There <%= num_webs > 1 ? 'are' : 'is' %> currently <a href='/web_list/'><%= WikiService.instance.webs.length %> web<%= 's' if num_webs > 1 %></a>)</p>
+
+<hr />
+<br/>
+
+<h2>Other administrative tasks</h2>
+<form action="../administrate" id="administrate" method="post" class="inputBox">
+ <p style="font-size: 10px;">
+ Clean up by entering system password
+ <input type="password" id="system_password" name="system_password">
+ and...
+ </p>
+ <p align='right'>
+ <input type="submit" name='action' value="Delete Orphan Pages"><br/>
+ <input type="submit" name='action' value="Clear Render Cache"><br/>
+ <input type="submit" name='action' value="Force Data Snapshot"><br/>
+ <input type="submit" name='action' value="Clean Storage"><br/>
+ <% if wiki.webs.size > 1 %>
+ <input type="submit" name='action' value="Make This Web Default"><br/>
+ <% end %>
+ <br/>
+ <input type="submit" name='action' value="Remove This Web" onClick="return confirm('Are you absolutely sure you want to delete the \'<%= web.name %>\' web?')"><br/>
+ </p>
+</form>
+
+<hr />
+<br/>
+
+<h2>Stop Pimki</h2>
+<p style="color:red">Please note that stopping the server will stop all pimki webs running on this server!</p>
+<form action="../stop" id="stop" method="post">
+ <p style="font-size: 10px;" class="inputBox">
+ Enter system password
+ <input type="password" id="system_password" name="system_password">
+ and
+ <input type="submit" name='stop' value="Stop Pimki">
+ in
+ <input type="text" name='seconds' value="3" size='5' style="text-align:right;">
+ seconds.
+ </p>
+</form>
+
+<script>
+function proposeAddress() {
+ document.getElementById('address').value =
+ document.getElementById('name').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
+}
+
+function cleanAddress() {
+ document.getElementById('address').value =
+ document.getElementById('address').value.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
+}
+
+function validateSetup() {
+ if (document.getElementById('system_password').value == "") {
+ alert("You must enter the system password");
+ return false;
+ }
+
+ if (document.getElementById('name').value == "") {
+ alert("You must pick a name for the web");
+ return false;
+ }
+
+ if (document.getElementById('address').value == "") {
+ alert("You must pick an address for the web");
+ return false;
+ }
+
+ if (document.getElementById('password').value != "" &&
+ document.getElementById('password').value != document.getElementById('password_check').value) {
+ alert("The password and its verification doesn't match");
+ return false;
+ }
+
+ if (document.getElementById('mind_map_size').value != "" &&
+ !(/^\d+,\d+$/.test(document.getElementById('mind_map_size').value))) {
+ alert("The Mind Map size must be in the format of 'digit(s),digit(s)'!");
+ return false;
+ }
+
+ return true;
+}
+</script>
+
<%= sub_template "bottom" %>
\ No newline at end of file