app/views/wiki/list.rhtml in Pimki-1.7.092 vs app/views/wiki/list.rhtml in Pimki-1.8.092
- old
+ new
@@ -1,175 +1,176 @@
-<% @title = "All Pages" %>
-<%= sub_template "top" %>
+<% @title = "All Pages" %>
+<%= sub_template "top" %>
+
+<!-- Categories Menu -->
+<% unless @categories.empty? %>
+<div id="categories">
+ <p><strong>Categories</strong>:
+
+ <% if @params["category"].nil? %>
+ [<span class='selected'>Any</span>]
+ <% else %>
+ <a href=".">Any</a>
+ <% end %>
+
+ <% if @params["category"] == 'none' %>
+ [<span class='selected'>None</span>]
+ <% else %>
+ <a href="?category=none">None</a>
+ <% end %>
+
+ <%= @category_links.join(', ') %>
+ </p>
+</div>
+<% end %>
+
+<!-- Main Page List -->
+<div id="listsContainer" style="float: left; width: 300px;">
+ <% 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.sort_by { |p| p.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 %>
+
+
+<!-- Missing Pages -->
+ <% 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.sort_by { |pname| pname } %>
+ <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 %>
+
+<!-- Orphaned Pages -->
+ <% 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.sort_by { |p| p.name } %><li><a href="../show/<%= page.name %>"><%= truncate(page.plain_name, 35) %></a></li><% end %>
+ </ul>
+ <% end %>
+</div>
+<!-- Page Administration -->
+<div id="pageAdmin" style="float: right; width: 280px; vertical-align: top;">
+ <script language="JavaScript1.2">
+ function validateSelection(fieldID) {
+ var selection = document.getElementById(fieldID).value;
+ if (selection == "noselect") {
+ alert("Please make a selection");
+ return false;
+ }
+ return true;
+ }
+ function validatePageName(fieldID) {
+ if (/^([A-Z]+[a-z]+[A-Z]\w+)$/.test(document.getElementById(fieldID).value)) {
+ return true;
+ } else {
+ alert('You wrote "' + document.getElementById(fieldID).value + '" as a page name, but it needs to be a wiki word.');
+ return false;
+ }
+ }
+ function verifyDelete() {
+ var del = confirm("Are you sure you want to delete " + document.getElementById('sel_delete').value + "?")
+ return del;
+ }
+ function verifyRename() {
+ if (!validatePageName('ren_newpage')) {
+ return false;
+ }
+ var ren = confirm("Are you sure you want to rename '" + document.getElementById('sel_rename').value +
+ "' to '" + document.getElementById('ren_newpage').value +
+ "'?\nNOTE: Links in other pages will have to be manually translated!")
+ return ren;
+ }
+ </script>
+
+ <!-- hr -->
+ <h2>Page Administration</h2>
+
+ <table border="0" style="font-size:10px">
+ <form class="navigation" action="." method="post">
+ <% if @web.check_pass_on_edit %>
+ <tr>
+ <td colspan="2">Enter edit Password <input type="password" name="password" id="password" size="11"> and...</td>
+ </tr>
+ <% end %>
+ <!-- Delete Page -->
+ <tr>
+ <td>Delete page:</td>
+ <td><select id="del_sel_page_name" name="del_sel_page_name" size="1" style="width:195">
+ <option value="noselect">------------</option>
+ <% for page in @pages_by_name %>
+ <option value="<%= page.name %>"><%= page.name %></option>
+ <% end %>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td align="right">
+ <input type="submit" name="Action" value="Delete" onClick="return validateSelection('sel_delete') && verifyDelete();">
+ </td>
+ </tr>
+ <!-- Rename Page -->
+ <tr>
+ <td>Rename:</td>
+ <td><select id="ren_sel_page_name" name="ren_sel_page_name" size="1" style="width:195">
+ <option value="noselect">------------</option>
+ <% for page in @pages_by_name %>
+ <option value="<%= page.name %>"><%= page.name %></option>
+ <% end %>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td align="center">To:</td>
+ <td>
+ <input type="text" name="ren_newpage" id="ren_newpage" size="28">
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td align="right">
+ <input type="submit" name="Action" value="Rename" onClick="return validateSelection('sel_rename') && verifyRename() && validatePageName('ren_newpage');">
+ </td>
+ </tr>
+ <!-- Create Page -->
+ <tr>
+ <td>Create New Page:</td>
+ <td>
+ <input type="text" name="newpage" id="newpage" size="28">
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td align="right">
+ <input type="submit" name="Action" value="Create" onClick="return validatePageName('newpage');">
+ </td>
+ </td>
+ </tr>
+ </form>
+ </table>
+</div>
+
+<%= sub_template "bottom" %>
-<!-- Categories Menu -->
-<% unless @categories.empty? %>
-<div id="categories">
- <p><strong>Categories</strong>:
-
- <% if @params["category"].nil? %>
- [<span class='selected'>Any</span>]
- <% else %>
- <a href=".">Any</a>
- <% end %>
-
- <% if @params["category"] == 'none' %>
- [<span class='selected'>None</span>]
- <% else %>
- <a href="?category=none">None</a>
- <% end %>
-
- <%= @category_links.join(', ') %>
- </p>
-</div>
-<% end %>
-
-<!-- Main Page List -->
-<div id="listsContainer" style="float: left; width: 300px;">
- <% 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.sort_by { |p| p.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 %>
-
-
-<!-- Missing Pages -->
- <% 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.sort_by { |pname| pname } %>
- <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 %>
-
-<!-- Orphaned Pages -->
- <% 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.sort_by { |p| p.name } %><li><a href="../show/<%= page.name %>"><%= truncate(page.plain_name, 35) %></a></li><% end %>
- </ul>
- <% end %>
-</div>
-<!-- Page Administration -->
-<div id="pageAdmin"style="float: right; width: 280px; vertical-align: top;">
- <script language="JavaScript1.2">
- function validateSelection(fieldID) {
- var selection = document.getElementById(fieldID).value;
- if (selection == "noselect") {
- alert("Please make a selection");
- return false;
- }
- return true;
- }
- function validatePageName(fieldID) {
- if (/^([A-Z]+[a-z]+[A-Z]\w+)$/.test(document.getElementById(fieldID).value)) {
- return true;
- } else {
- alert('You wrote "' + document.getElementById(fieldID).value + '" as a page name, but it needs to be a wiki word.');
- return false;
- }
- }
- function verifyDelete() {
- var del = confirm("Are you sure you want to delete " + document.getElementById('sel_delete').value + "?")
- return del;
- }
- function verifyRename() {
- if (!validatePageName('ren_newpage')) {
- return false;
- }
- var ren = confirm("Are you sure you want to rename '" + document.getElementById('sel_rename').value +
- "' to '" + document.getElementById('ren_newpage').value +
- "'?\nNOTE: Links in other pages will have to be manually translated!")
- return ren;
- }
- </script>
-
- <!-- hr -->
- <h2>Page Administration</h2>
-
- <table border="0" style="font-size:10px">
- <form class="navigation" action="list/" action="get">
- <% if @web.check_pass_on_edit %>
- <tr>
- <td colspan="2">Enter edit Password <input type="password" name="password" id="password" size="11"> and...</td>
- </tr>
- <% end %>
- <!-- Delete Page -->
- <tr>
- <td>Delete page:</td>
- <td><select id="del_sel_page_name" name="del_sel_page_name" size="1" style="width:195">
- <option value="noselect">------------</option>
- <% for page in @pages_by_name %>
- <option value="<%= page.name %>"><%= page.name %></option>
- <% end %>
- </select>
- </td>
- </tr>
- <tr>
- <td> </td>
- <td align="right">
- <input type="submit" name="Action" value="Delete" onClick="return validateSelection('sel_delete') && verifyDelete();">
- </td>
- </tr>
- <!-- Rename Page -->
- <tr>
- <td>Rename:</td>
- <td><select id="ren_sel_page_name" name="ren_sel_page_name" size="1" style="width:195">
- <option value="noselect">------------</option>
- <% for page in @pages_by_name %>
- <option value="<%= page.name %>"><%= page.name %></option>
- <% end %>
- </select>
- </td>
- </tr>
- <tr>
- <td align="center">To:</td>
- <td>
- <input type="text" name="newpage" id="ren_newpage" size="28">
- </td>
- </tr>
- <tr>
- <td> </td>
- <td align="right">
- <input type="submit" name="Action" value="Rename" onClick="return validateSelection('sel_rename') && verifyRename() && validatePageName('ren_newpage');">
- </td>
- </tr>
- <!-- Create Page -->
- <tr>
- <td>Create New Page:</td>
- <td>
- <input type="text" name="newpage" id="newpage" size="28">
- </td>
- </tr>
- <tr>
- <td> </td>
- <td align="right">
- <input type="submit" name="Action" value="Create" onClick="return validatePageName('newpage');">
- </td>
- </td>
- </tr>
- </form>
- </table>
-</div>
-
-<%= sub_template "bottom" %>