app/views/wiki/list.rhtml in instiki-0.9.2 vs app/views/wiki/list.rhtml in instiki-0.10.0
- old
+ new
@@ -1,57 +1,64 @@
-<% @title = "All Pages" %><%= sub_template "top" %>
-
-<% 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>
-
-<%= sub_template "bottom" %>
+<% @title = "All Pages" %>
+
+<%= categories_menu unless @categories.empty? %>
+
+<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>
+ <% @pages_by_name.each do |page| %>
+ <li>
+ <%= link_to_existing_page page, truncate(page.plain_name, 35) %>
+ </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">
+ <% @page_names_that_are_wanted.each do |wanted_page_name| %>
+ <li>
+ <%= link_to_page(wanted_page_name, @web, truncate(WikiWords.separate(wanted_page_name), 35)) %>
+ wanted by
+ <%= @web.select.pages_that_reference(wanted_page_name).collect { |referring_page|
+ link_to_existing_page referring_page
+ }.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">
+ <% @pages_that_are_orphaned.each do |orphan_page| %>
+ <li>
+ <%= link_to_existing_page orphan_page %>
+ </li>
+ <% end %>
+ </ul>
+<% end %>
+</div>