Allow filtering by category in by category display.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1344 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: bycategory.java,v 1.2 2003/12/10 20:33:42 mdb Exp $
|
||||
// $Id: bycategory.java,v 1.3 2003/12/10 21:57:31 mdb Exp $
|
||||
|
||||
package com.samskivert.twodue.logic;
|
||||
|
||||
@@ -37,6 +37,9 @@ public class bycategory extends UserLogic
|
||||
ctx.put("error", msg);
|
||||
}
|
||||
|
||||
// put any filter into the context
|
||||
ctx.put("filter", ParameterUtil.getParameter(req, "filter", false));
|
||||
|
||||
ArrayList tasks = null;
|
||||
String query = ParameterUtil.getParameter(req, "query", false);
|
||||
if (StringUtil.blank(query)) {
|
||||
|
||||
@@ -20,10 +20,54 @@
|
||||
#if ($query)
|
||||
Tasks matching '$query':
|
||||
#else
|
||||
Outstanding tasks:
|
||||
Outstanding tasks:
|
||||
#end
|
||||
</b>
|
||||
|
||||
#if ($filter != "")
|
||||
<a href="bycategory.wm">all</a>
|
||||
#foreach ($xtask in $xtasks)
|
||||
<a href="bycategory.wm?filter=$xtask.name">$xtask.name</a>
|
||||
#end
|
||||
|
||||
#foreach ($xtask in $xtasks)
|
||||
#if ($filter == $xtask.name)
|
||||
<p>
|
||||
<table cellpadding="2" cellspacing="0" border="0" width="100%">
|
||||
<tr style="color: $fcolor" bgcolor="$scolor"><td colspan="2" align="left">
|
||||
<a href="bycategory.wm?filter=$xtask.name">$xtask.name</a>
|
||||
($xtask.tasks.size())</td>
|
||||
<td colspan="2"> </td></tr>
|
||||
|
||||
$xcats.clear()
|
||||
#foreach ($task in $xtask.tasks)
|
||||
#if ($xcats.checkCategory($task.complexity))
|
||||
<tr><td colspan="4" class="small" style="border-bottom: 1px solid"><i>$task.complexity</i></td></tr>
|
||||
#set ($border = "")
|
||||
#else
|
||||
#set ($border = 'style="border-top: 1px solid"')
|
||||
#end
|
||||
|
||||
<tr>
|
||||
<td><a href="index.wm?action=claim&task=$task.taskId">
|
||||
<img src="images/claim.png" border="0" alt="Claim this task"></a></td>
|
||||
<td $border>$task.summary
|
||||
<span class="small">[$task.creator]</span>
|
||||
#if (!$string.blank($task.notes))
|
||||
<a href="detail.wm?task=$task.taskId">[...]</a>
|
||||
#end
|
||||
</td>
|
||||
<td valign="top" $border>$task.getPriorityName()</td>
|
||||
<td valign="top" $border><a href="edit.wm?task=$task.taskId">
|
||||
<img src="images/edit.png" border="0" alt="Edit this task"></a></td>
|
||||
</tr>
|
||||
#end
|
||||
</table>
|
||||
<p><center>
|
||||
#end
|
||||
#end
|
||||
|
||||
#else
|
||||
<table><tr><td valign="top"> <!-- two column table -->
|
||||
|
||||
<table cellpadding="2" cellspacing="0" border="0" width="100%">
|
||||
@@ -37,7 +81,9 @@ Outstanding tasks:
|
||||
<tr><td colspan="4"> </td></tr>
|
||||
#end
|
||||
#end
|
||||
<tr style="color: $fcolor" bgcolor="$scolor"><td colspan="2" align="left">$xtask.name</td>
|
||||
<tr style="color: $fcolor" bgcolor="$scolor"><td colspan="2" align="left">
|
||||
<a href="bycategory.wm?filter=$xtask.name">$xtask.name</a>
|
||||
($xtask.tasks.size())</td>
|
||||
<td colspan="2"> </td></tr>
|
||||
|
||||
$xcats.clear()
|
||||
@@ -67,5 +113,6 @@ $xcats.clear()
|
||||
#end
|
||||
</table>
|
||||
</table>
|
||||
#end
|
||||
|
||||
#import ("/footer.wm")
|
||||
|
||||
Reference in New Issue
Block a user