app/views/wiki/bliki.rhtml in Pimki-1.3.092 vs app/views/wiki/bliki.rhtml in Pimki-1.4.092

- old
+ new

@@ -1,101 +1,101 @@ -<% @title = "Bliki" %> -<%= sub_template "top" %> - -<% if @req.query['authorname'] != 'noselect' and not @req.query['regexp'].nil? and not @req.query['regexp'].empty? %> - <p>You are filtering entries by author: <em><%= @req.query['authorname'] %></em> - containing: <em><%= @req.query['regexp'] %></em> - <br /><a href="../bliki/" class="navlink" accesskey="R">Remove Filter</a> -<% elsif not @req.query['authorname'].nil? and @req.query['authorname'] != 'noselect' %> - <p>You are filtering entries by: <em><%= @req.query['authorname'] %></em> - <br /><a href="../bliki/" class="navlink" accesskey="R">Remove Filter</a> -<% elsif not @req.query['regexp'].nil? %> - <p>You are filtering entries containing: <em><%= @req.query['regexp'] %></em> - <br /><a href="../bliki/" class="navlink" accesskey="R">Remove Filter</a> -<% end %> - -<p><a href="../bliki_new/" class="navlink" accesskey="E">New Entry</a></p> - -<% if @entries.length > 0 %> - <table width="100%"> - <% (@entries.length > 3 ? 3 : @entries.length).times do |idx| %> - <tr> - <td width="70%"><h3 style="color:<%= @color %>"><%= @entries[idx].plain_name %></h3></td> - </tr> - <tr> - <th align="left" style="font-size:10;color:<%= @color %>"><%= @entries[idx].revisions.first.created_at.strftime("%B %d, %Y") %> - <% if @entries[idx].revisions.first != @entries[idx].revisions.last %> - -- Last revised on: <%= @entries[idx].revisions.last.created_at.strftime("%B %d, %Y") %> - <% end %> - </th> - </tr> - <tr> - <td colspan="2"><%= @entries[idx].display_content %></td> - </tr> - <tr><td> - <div class="navigation"> - <a href="../bliki_edit/<%= @entries[idx].name %>" class="navlink" accesskey="E">Edit</a> - | <a href="../bliki_delete/<%= @entries[idx].name %>" class="navlink" onClick="return confirm('Are you sure you want delete this entry completely?')">Delete</a> - <% if @entries[idx].revisions.length > 1 %> - <small> - | <a href="../bliki_revision/<%= @entries[idx].name %>?rev=<%= @entries[idx].revisions.length - 1 %>" class="navlink" accesskey="R">Older Revisions</a> - (<%= @entries[idx].revisions.length - 1 %>) - </small> - <% end %> - <% if @entries[idx].references.length > 0 %> - <small> - | Referenced by: <%= @entries[idx].references.collect { |ref| ref.link }.join(", ") %> - </small> - <% end %> - </div> - </td> - <th align="right"><small><%= @entries[idx].author_link %></small></th> - </tr> - <tr><td colspan="2"><hr></td></tr> - <% end %> - </table> -<% else %> - <p><strong>No entries found.</strong></p> -<% end %> - -<h2>All Entries:</h2> -<ul> - <% @entries.each do |page| %> - <li><a href="../bliki_revision/<%= page.name %>?rev=<%= page.revisions.length - 1 %>" class="navlink" accesskey="R"><%= page.plain_name %></a> - <small>[<%= page.author_link %>, <%=page.revisions.first.created_at.strftime("%d-%b-%Y") %>, <%= page.revisions.length %> revision(s)]</small> - </li> - <% end %> -</ul> - -<script language="JavaScript1.2"> -function validateSelection() { - var selection = document.getElementById('sel_author').value; - var regex = document.getElementById('search_regex').value; - if (selection == "noselect" && regex == "") { - alert("Please make a selection and/or supply a rexex to search."); - return false; - } - return true; -} -</script> - -<h2>Apply filter:</h2> -<table><tr> - <td>Show only pages authored by:</td> - <form class="navigation" action="bliki" action="post" onSubmit="return validateSelection();"> - <td> - <select id="sel_author" name="authorname" size="1"> - <option value="noselect">------------ - <% for auth in @authors %> - <option value="<%= auth %>"><%= auth %> - <% end %> - </select> - </td> -</tr><tr> - <td>Regexp search on all entries:</td> - <td><input type="text" id="search_regex" name="regexp"></td> - <td><input type="submit" name="Search" value="Search"></td> - </form> -</tr></table> - -<%= sub_template "bottom" %> - +<% @title = "Bliki" %> +<%= sub_template "top" %> + +<% if @req.query['authorname'] != 'noselect' and not @req.query['regexp'].nil? and not @req.query['regexp'].empty? %> + <p>You are filtering entries by author: <em><%= @req.query['authorname'] %></em> + containing: <em><%= @req.query['regexp'] %></em> + <br /><a href="../bliki/" class="navlink" accesskey="R">Remove Filter</a> +<% elsif not @req.query['authorname'].nil? and @req.query['authorname'] != 'noselect' %> + <p>You are filtering entries by: <em><%= @req.query['authorname'] %></em> + <br /><a href="../bliki/" class="navlink" accesskey="R">Remove Filter</a> +<% elsif not @req.query['regexp'].nil? %> + <p>You are filtering entries containing: <em><%= @req.query['regexp'] %></em> + <br /><a href="../bliki/" class="navlink" accesskey="R">Remove Filter</a> +<% end %> + +<p><a href="../bliki_new/" class="navlink" accesskey="E">New Entry</a></p> + +<% if @entries.length > 0 %> + <table width="100%"> + <% (@entries.length > 3 ? 3 : @entries.length).times do |idx| %> + <tr> + <td width="70%"><h3 style="color:<%= @color %>"><%= @entries[idx].plain_name %></h3></td> + </tr> + <tr> + <th align="left" style="font-size:10;color:<%= @color %>"><%= @entries[idx].revisions.first.created_at.strftime("%B %d, %Y") %> + <% if @entries[idx].revisions.first != @entries[idx].revisions.last %> + -- Last revised on: <%= @entries[idx].revisions.last.created_at.strftime("%B %d, %Y") %> + <% end %> + </th> + </tr> + <tr> + <td colspan="2"><%= @entries[idx].display_content %></td> + </tr> + <tr><td> + <div class="navigation"> + <a href="../bliki_edit/<%= @entries[idx].name %>" class="navlink" accesskey="E">Edit</a> + | <a href="../bliki_delete/<%= @entries[idx].name %>" class="navlink" onClick="return confirm('Are you sure you want delete this entry completely?')">Delete</a> + <% if @entries[idx].revisions.length > 1 %> + <small> + | <a href="../bliki_revision/<%= @entries[idx].name %>?rev=<%= @entries[idx].revisions.length - 1 %>" class="navlink" accesskey="R">Older Revisions</a> + (<%= @entries[idx].revisions.length - 1 %>) + </small> + <% end %> + <% if @entries[idx].references.length > 0 %> + <small> + | Referenced by: <%= @entries[idx].references.collect { |ref| ref.link }.join(", ") %> + </small> + <% end %> + </div> + </td> + <th align="right"><small><%= @entries[idx].author_link %></small></th> + </tr> + <tr><td colspan="2"><hr></td></tr> + <% end %> + </table> +<% else %> + <p><strong>No entries found.</strong></p> +<% end %> + +<h2>All Entries:</h2> +<ul> + <% @entries.each do |page| %> + <li><a href="../bliki_revision/<%= page.name %>?rev=<%= page.revisions.length - 1 %>" class="navlink" accesskey="R"><%= page.plain_name %></a> + <small>[<%= page.author_link %>, <%=page.revisions.first.created_at.strftime("%d-%b-%Y") %>, <%= page.revisions.length %> revision(s)]</small> + </li> + <% end %> +</ul> + +<script language="JavaScript1.2"> +function validateSelection() { + var selection = document.getElementById('sel_author').value; + var regex = document.getElementById('search_regex').value; + if (selection == "noselect" && regex == "") { + alert("Please make a selection and/or supply a rexex to search."); + return false; + } + return true; +} +</script> + +<h2>Apply filter:</h2> +<table><tr> + <td>Show only pages authored by:</td> + <form class="navigation" action="bliki" action="post" onSubmit="return validateSelection();"> + <td> + <select id="sel_author" name="authorname" size="1"> + <option value="noselect">------------ + <% for auth in @authors %> + <option value="<%= auth %>"><%= auth %> + <% end %> + </select> + </td> +</tr><tr> + <td>Regexp search on all entries:</td> + <td><input type="text" id="search_regex" name="regexp"></td> + <td><input type="submit" name="Search" value="Search"></td> + </form> +</tr></table> + +<%= sub_template "bottom" %> +