2008-12-15 20:19:22 +01:00
|
|
|
<%- @title = "All Pages" -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
|
|
|
|
<%= categories_menu unless @categories.empty? %>
|
|
|
|
|
2007-02-18 08:48:32 +01:00
|
|
|
<div id="allPages">
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- unless @pages_that_are_orphaned.empty? && @page_names_that_are_wanted.empty? -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
<h2>
|
|
|
|
All Pages
|
2010-05-27 07:27:49 +02:00
|
|
|
<br/><span class="pageType">All pages in <%= raw @set_name %> listed alphabetically</span>
|
2007-01-22 14:43:50 +01:00
|
|
|
</h2>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- end -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
|
2010-10-09 09:57:37 +02:00
|
|
|
<% if [:markdownMML, :markdownPNG, :markdown].include?(@web.markup) -%>
|
|
|
|
<% form_tag({ :controller => 'wiki', :action => 'tex_list', :web => @web.address },
|
|
|
|
{'method' => 'post', 'accept-charset' => 'utf-8' }) do
|
|
|
|
%>
|
|
|
|
<div>
|
|
|
|
<% if params['category'] -%>
|
|
|
|
<input type="hidden" name="category" value="<%= params['category'] %>"/>
|
|
|
|
<%- end -%>
|
2010-10-09 22:41:25 +02:00
|
|
|
<ul id="sortable_pages">
|
2010-10-09 18:21:41 +02:00
|
|
|
<% @pages_in_category.each do |page| %>
|
2010-10-09 17:33:11 +02:00
|
|
|
<% content_tag_for :li, page do %>
|
2010-10-09 18:21:41 +02:00
|
|
|
|
|
|
|
<input type="checkbox" name="<%= page.name %>" value="tex"/>
|
2010-10-09 09:57:37 +02:00
|
|
|
<%= link_to_existing_page page, truncate(page.plain_name, :length => 35) %>
|
2010-10-09 17:33:11 +02:00
|
|
|
<% end %>
|
2010-10-09 18:21:41 +02:00
|
|
|
|
|
|
|
<% end %>
|
2010-10-09 09:57:37 +02:00
|
|
|
</ul>
|
2010-10-11 17:57:26 +02:00
|
|
|
<%= sortable_element('sortable_pages', {:onUpdate => 'function(){}'}) %>
|
2010-10-09 21:42:01 +02:00
|
|
|
<label for="commit"> Export selected pages (drag to re-order them) to a LaTeX file.</label>
|
2010-10-09 09:57:37 +02:00
|
|
|
<%= submit_tag("Export") %>
|
|
|
|
</div>
|
|
|
|
<%- end -%>
|
|
|
|
<%- else -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
<ul>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- @pages_in_category.each do |page| -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
<li>
|
2009-12-15 00:41:28 +01:00
|
|
|
<%= link_to_existing_page page, truncate(page.plain_name, :length => 35) %>
|
2007-01-22 14:43:50 +01:00
|
|
|
</li>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- end -%>
|
|
|
|
</ul>
|
2010-10-09 09:57:37 +02:00
|
|
|
<%- end -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- if @web.count_pages? -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
<% total_chars = @pages_in_category.characters %>
|
2007-02-18 08:48:32 +01:00
|
|
|
<p class="pageStats">All content: <%= total_chars %> chars / approx. <%= sprintf("%-.1f", (total_chars / 2275 )) %> printed pages</p>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- end -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
</div>
|
|
|
|
|
2007-02-18 08:48:32 +01:00
|
|
|
<div id="wantedPages">
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- unless @page_names_that_are_wanted.empty? -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
<h2>
|
|
|
|
Wanted Pages
|
|
|
|
<br/>
|
2007-02-18 08:48:32 +01:00
|
|
|
<span class="pageType">
|
2010-05-27 07:27:49 +02:00
|
|
|
Nonexistent pages that other pages in <%= raw @set_name %> reference
|
2007-02-18 08:48:32 +01:00
|
|
|
</span>
|
2007-01-22 14:43:50 +01:00
|
|
|
</h2>
|
|
|
|
|
|
|
|
<ul style="margin-bottom: 10px">
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- @page_names_that_are_wanted.each do |wanted_page_name| -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
<li>
|
2009-12-15 00:41:28 +01:00
|
|
|
<%= link_to_page(wanted_page_name, @web, truncate(WikiWords.separate(wanted_page_name), :length => 35)) %>
|
2007-01-22 14:43:50 +01:00
|
|
|
wanted by
|
|
|
|
<%= @web.select.pages_that_reference(wanted_page_name).collect { |referring_page|
|
|
|
|
link_to_existing_page referring_page
|
2010-05-26 07:27:49 +02:00
|
|
|
}.join(", ").html_safe
|
2007-01-22 14:43:50 +01:00
|
|
|
%>
|
|
|
|
</li>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- end -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
</ul>
|
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
|
|
|
<%- unless @pages_that_are_orphaned.empty? -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
<h2>
|
|
|
|
Orphaned Pages
|
2010-05-27 07:27:49 +02:00
|
|
|
<br/><span class="pageType">Pages in <%= raw @set_name %> that no other page reference</span>
|
2007-01-22 14:43:50 +01:00
|
|
|
</h2>
|
|
|
|
|
|
|
|
<ul style="margin-bottom: 35px">
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- @pages_that_are_orphaned.each do |orphan_page| -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
<li>
|
2009-12-15 00:41:28 +01:00
|
|
|
<%= link_to_existing_page orphan_page, truncate(orphan_page.plain_name, :length => 35) %>
|
2007-01-22 14:43:50 +01:00
|
|
|
</li>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- end -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
</ul>
|
2008-12-15 20:19:22 +01:00
|
|
|
<%- end -%>
|
2007-01-22 14:43:50 +01:00
|
|
|
</div>
|