| 1 | <!DOCTYPE html |
|---|
| 2 | PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
|---|
| 3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|---|
| 4 | <html xmlns="http://www.w3.org/1999/xhtml" |
|---|
| 5 | xmlns:py="http://genshi.edgewall.org/" |
|---|
| 6 | xmlns:xi="http://www.w3.org/2001/XInclude"> |
|---|
| 7 | <xi:include href="layout.html" /> |
|---|
| 8 | <head> |
|---|
| 9 | <title>Search Code Reviews</title> |
|---|
| 10 | </head> |
|---|
| 11 | <body> |
|---|
| 12 | <div id="content"> |
|---|
| 13 | <h1>Code Review Search</h1> |
|---|
| 14 | |
|---|
| 15 | <form id="searchReview" action="${href.peerReviewSearch()}" method="post"> |
|---|
| 16 | <fieldset> |
|---|
| 17 | <div> |
|---|
| 18 | <label>Code Review Name: |
|---|
| 19 | <input id="name" name="CodeReviewName" size="25" value="" type="text" /> |
|---|
| 20 | </label> |
|---|
| 21 | </div> |
|---|
| 22 | <div> |
|---|
| 23 | <label>Reviews after date - |
|---|
| 24 | <select size="1" name="DateMonth" id="Month" |
|---|
| 25 | onchange="resetDays(document.getElementById('Month').options[document.getElementById('Month').selectedIndex].value, |
|---|
| 26 | document.getElementById('Year').options[document.getElementById('Year').selectedIndex].value)"> |
|---|
| 27 | <option value="0">Select...</option> |
|---|
| 28 | <option value="01">January</option> |
|---|
| 29 | <option value="02">February</option> |
|---|
| 30 | <option value="03">March</option> |
|---|
| 31 | <option value="04">April</option> |
|---|
| 32 | <option value="05">May</option> |
|---|
| 33 | <option value="06">June</option> |
|---|
| 34 | <option value="07">July</option> |
|---|
| 35 | <option value="08">August</option> |
|---|
| 36 | <option value="09">September</option> |
|---|
| 37 | <option value="10">October</option> |
|---|
| 38 | <option value="11">November</option> |
|---|
| 39 | <option value="12">December</option> |
|---|
| 40 | </select> |
|---|
| 41 | <span id="DaySpan"> |
|---|
| 42 | <select size="1" name="DateDay1" id="Day" onchange="setDateIndex();"> |
|---|
| 43 | <option value="0" selected="selected">Select...</option> |
|---|
| 44 | </select> |
|---|
| 45 | </span> |
|---|
| 46 | <select size="1" name="DateYear" id="Year" |
|---|
| 47 | onchange="resetDays(document.getElementById('Month').options[document.getElementById('Month').selectedIndex].value, |
|---|
| 48 | document.getElementById('Year').options[document.getElementById('Year').selectedIndex].value)"> |
|---|
| 49 | <option selected="selected" value="0">Select...</option> |
|---|
| 50 | <option py:for="item in years" value="${item}">${item}</option> |
|---|
| 51 | </select> |
|---|
| 52 | </label> |
|---|
| 53 | </div> |
|---|
| 54 | |
|---|
| 55 | <div> |
|---|
| 56 | <label> |
|---|
| 57 | Status - |
|---|
| 58 | <select size="1" name="Status" id="status"> |
|---|
| 59 | <option value="Select...">Select...</option> |
|---|
| 60 | <option value="new">Open for review (new)</option> |
|---|
| 61 | <option value="reviewed">Reviewed</option> |
|---|
| 62 | <option value="approved">Approved</option> |
|---|
| 63 | <option value="disapproved">Disapproved</option> |
|---|
| 64 | <option value="Closed">Closed (obsolete)</option> |
|---|
| 65 | </select> |
|---|
| 66 | </label> |
|---|
| 67 | </div> |
|---|
| 68 | |
|---|
| 69 | <div> |
|---|
| 70 | <label> |
|---|
| 71 | Author - |
|---|
| 72 | <select size="1" name="Author" id="author"> |
|---|
| 73 | <option>Select...</option> |
|---|
| 74 | <option py:for="item in users" value="${item}">${item}</option> |
|---|
| 75 | </select> |
|---|
| 76 | </label> |
|---|
| 77 | </div> |
|---|
| 78 | |
|---|
| 79 | <div class="buttons"> |
|---|
| 80 | <input type="hidden" name="doSearch" value="yes" /> |
|---|
| 81 | <!-- used by javascript to get the current day selected --> |
|---|
| 82 | <input type="hidden" name="DateDay" value="0" id="dayHolder" /> |
|---|
| 83 | <input value="Search" type="submit" /> |
|---|
| 84 | </div> |
|---|
| 85 | </fieldset> |
|---|
| 86 | </form> |
|---|
| 87 | <py:if test="doSearch == 'yes'"> |
|---|
| 88 | <h2>Search Results</h2> |
|---|
| 89 | <table class="listing" id="myreviewlist"> |
|---|
| 90 | <thead> |
|---|
| 91 | <tr> |
|---|
| 92 | <th>Review</th> |
|---|
| 93 | <th>Author</th> |
|---|
| 94 | <th>Status</th> |
|---|
| 95 | <th>Name</th> |
|---|
| 96 | <th>Date Opened</th> |
|---|
| 97 | <th>Date Finished</th> |
|---|
| 98 | </tr> |
|---|
| 99 | </thead> |
|---|
| 100 | <tbody py:with="cls=cycle(('odd', 'even'))" id = "myfilebody"> |
|---|
| 101 | <py:for each="item in results"> |
|---|
| 102 | <tr py:if="item[2] != ''" class="${cls.next()}"> |
|---|
| 103 | <td><a href="${href.peerReviewView()}?Review=${item[0]}">${item[0]}</a></td> |
|---|
| 104 | <td><a href="${href.peerReviewView()}?Review=${item[0]}">${item[1]}</a></td> |
|---|
| 105 | <td><a href="${href.peerReviewView()}?Review=${item[0]}">${item[2]}</a></td> |
|---|
| 106 | <td><a href="${href.peerReviewView()}?Review=${item[0]}">${item[4]}</a></td> |
|---|
| 107 | <td><a href="${href.peerReviewView()}?Review=${item[0]}">${item[3]}</a></td> |
|---|
| 108 | <td><a href="${href.peerReviewView()}?Review=${item[0]}">${item[5]}</a></td> |
|---|
| 109 | </tr> |
|---|
| 110 | <tr py:if="item[2] == ''"> |
|---|
| 111 | <td>${item[0]}</td> |
|---|
| 112 | <td>${item[1]}</td> |
|---|
| 113 | <td>${item[2]}</td> |
|---|
| 114 | <td>${item[4]}</td> |
|---|
| 115 | <td>${item[3]}</td> |
|---|
| 116 | <td>${item[5]}</td> |
|---|
| 117 | </tr> |
|---|
| 118 | </py:for> |
|---|
| 119 | </tbody> |
|---|
| 120 | </table> |
|---|
| 121 | </py:if> |
|---|
| 122 | </div> |
|---|
| 123 | </body> |
|---|
| 124 | </html> |
|---|