| 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 | xmlns:i18n="http://genshi.edgewall.org/i18n"> |
|---|
| 8 | <xi:include href="layout.html"/> |
|---|
| 9 | <head> |
|---|
| 10 | <title>Review File - $review_file['name']</title> |
|---|
| 11 | </head> |
|---|
| 12 | |
|---|
| 13 | <xi:include href="peer_functions.html"/> |
|---|
| 14 | |
|---|
| 15 | <body> |
|---|
| 16 | <div id="content"> |
|---|
| 17 | <div py:if="is_finished" class="notice system-message"> |
|---|
| 18 | <p> |
|---|
| 19 | This review is finished. A code review manager may reopen it. |
|---|
| 20 | </p> |
|---|
| 21 | </div> |
|---|
| 22 | <div py:if="review_locked and not is_finished" class="notice system-message"> |
|---|
| 23 | <p> |
|---|
| 24 | This review is marked as <strong>reviewed</strong> and can't be changed. The author of the code review may change the current status. |
|---|
| 25 | </p> |
|---|
| 26 | </div> |
|---|
| 27 | |
|---|
| 28 | <py:if test="parent_review"> |
|---|
| 29 | <form id="prefs" action=""> |
|---|
| 30 | <div> |
|---|
| 31 | <input type="hidden" name="IDFile" value="$file_id"/> |
|---|
| 32 | <py:if test="not changeset"> |
|---|
| 33 | <!--! <input type="hidden" name="old_path" value="${'/' + pathjoin(reponame, old_path)}" /> |
|---|
| 34 | <input type="hidden" name="new_path" value="${'/' + pathjoin(reponame, new_path)}" /> |
|---|
| 35 | <input type="hidden" name="old" value="$old_rev" /> |
|---|
| 36 | <input type="hidden" name="new" value="$new_rev" /> |
|---|
| 37 | --></py:if> |
|---|
| 38 | <xi:include href="diff_options.html"/> |
|---|
| 39 | </div> |
|---|
| 40 | </form> |
|---|
| 41 | </py:if> |
|---|
| 42 | |
|---|
| 43 | <div py:if="parent_review" id="review-info"> |
|---|
| 44 | <table class="review-table"> |
|---|
| 45 | <thead> |
|---|
| 46 | <tr> |
|---|
| 47 | <th>Review Information</th> |
|---|
| 48 | <th>Followup from</th> |
|---|
| 49 | </tr> |
|---|
| 50 | </thead> |
|---|
| 51 | <tbody> |
|---|
| 52 | <tr> |
|---|
| 53 | <td>${review_info(review)}</td> |
|---|
| 54 | <td>${review_info(parent_review)}</td> |
|---|
| 55 | </tr> |
|---|
| 56 | </tbody> |
|---|
| 57 | </table> |
|---|
| 58 | </div> |
|---|
| 59 | <div py:if="not parent_review"> |
|---|
| 60 | <table class="review-table"> |
|---|
| 61 | <thead> |
|---|
| 62 | <tr> |
|---|
| 63 | <th>Review Information</th> |
|---|
| 64 | </tr> |
|---|
| 65 | </thead> |
|---|
| 66 | <tbody> |
|---|
| 67 | <tr> |
|---|
| 68 | <td>${review_info(review)}</td> |
|---|
| 69 | </tr> |
|---|
| 70 | </tbody> |
|---|
| 71 | </table> |
|---|
| 72 | </div> |
|---|
| 73 | |
|---|
| 74 | <h3>File Information</h3> |
|---|
| 75 | <dl class="overview" id="file-info"> |
|---|
| 76 | <dt>Path:</dt> |
|---|
| 77 | <dd>${review_file['path']}</dd> |
|---|
| 78 | <dt>Repository:</dt> |
|---|
| 79 | <dd>${review_file['repo'] if review_file['repo'] else '(default)'}</dd> |
|---|
| 80 | <dt>Revision:</dt> |
|---|
| 81 | <dd>${review_file['revision']}</dd> |
|---|
| 82 | <dt>File Revision:</dt> |
|---|
| 83 | <dd>${review_file['changerevision']}</dd> |
|---|
| 84 | <dt>Start Line:</dt> |
|---|
| 85 | <dd>${review_file['line_start']}<br/></dd> |
|---|
| 86 | <dt>End Line:</dt> |
|---|
| 87 | <dd>${review_file['line_end']}<br/></dd> |
|---|
| 88 | </dl> |
|---|
| 89 | |
|---|
| 90 | <py:if test="parent_review"> |
|---|
| 91 | <h3>Followup from file:</h3> |
|---|
| 92 | <dl class="overview" id="parent-info"> |
|---|
| 93 | <dt>Path:</dt> |
|---|
| 94 | <dd>${par_file['path']}</dd> |
|---|
| 95 | <dt>Repo Revision:</dt> |
|---|
| 96 | <dd>${par_file['revision']}</dd> |
|---|
| 97 | <dt>File Revision:</dt> |
|---|
| 98 | <dd>${par_file['changerevision']}</dd> |
|---|
| 99 | <dt>Comments:</dt> |
|---|
| 100 | <dd py:if="diff.options.contextall"> |
|---|
| 101 | <py:for each="idx, line in enumerate(par_file.comments)"> |
|---|
| 102 | <py:with vars="last = idx == len(par_file.comments) - 1"> |
|---|
| 103 | <a href="#P$line">Line $line</a><span py:if="not last">, </span> |
|---|
| 104 | </py:with> |
|---|
| 105 | </py:for> |
|---|
| 106 | <py:if test="not par_file.comments">No comments</py:if> |
|---|
| 107 | </dd> |
|---|
| 108 | <dd py:if="not diff.options.contextall"> |
|---|
| 109 | <py:for each="idx, line in enumerate(par_file.comments)"> |
|---|
| 110 | <py:with vars="last = idx == len(par_file.comments) - 1"> |
|---|
| 111 | Line $line<span py:if="not last">, </span> |
|---|
| 112 | </py:with> |
|---|
| 113 | </py:for> |
|---|
| 114 | <p class="help" py:if="par_file.comments">Some comments may be hidden. Select |
|---|
| 115 | <strong>Show changes in full context</strong> to show the whole file.</p> |
|---|
| 116 | <py:if test="not par_file.comments">No comments</py:if> |
|---|
| 117 | </dd> |
|---|
| 118 | </dl> |
|---|
| 119 | </py:if> |
|---|
| 120 | |
|---|
| 121 | <p>Back to the <a href="${href.peerReviewView()}?Review=${review_file['review_id']}"> Code Review Details</a> page.</p> |
|---|
| 122 | |
|---|
| 123 | |
|---|
| 124 | <label><input type="checkbox" id="inline-comments" />Show comments inline.</label> |
|---|
| 125 | |
|---|
| 126 | <table py:if="diffs or not parent_review" border="0" width="100%" style="border-collapse: collapse" id="table1"> |
|---|
| 127 | <tr> |
|---|
| 128 | <td align="left"> |
|---|
| 129 | <p class="help">Click line number to Add/View comments</p> |
|---|
| 130 | </td> |
|---|
| 131 | <td py:if="not fullrange" align="right"> |
|---|
| 132 | <p>View <input type="text" id="SelectRangeTextBox" |
|---|
| 133 | size="1" value="3" |
|---|
| 134 | onKeyDown="if(event.keyCode == 13 || event.keyCode == 3){resetLines();}" |
|---|
| 135 | style="text-align: center"/> lines on either side of selection.</p> |
|---|
| 136 | </td> |
|---|
| 137 | </tr> |
|---|
| 138 | </table> |
|---|
| 139 | <py:if test="parent_review"> |
|---|
| 140 | <xi:include href="diff.html"/> |
|---|
| 141 | <div py:if="nochanges"> |
|---|
| 142 | <div class="notice system-message"> |
|---|
| 143 | <p>The files are identical.</p> |
|---|
| 144 | <p py:if="not diff.options.contextall">Show the file in full context to add comments to the revision '${review_file['revision']}'.</p> |
|---|
| 145 | </div> |
|---|
| 146 | </div> |
|---|
| 147 | </py:if> |
|---|
| 148 | <!--! displays the contents of the file being reviewed --> |
|---|
| 149 | |
|---|
| 150 | <div id="FilePreview">$file_rendered</div> |
|---|
| 151 | |
|---|
| 152 | <py:if test="preview"> |
|---|
| 153 | <!--! This is taken from preview_file.html with addition of system message div --> |
|---|
| 154 | <py:choose> |
|---|
| 155 | <p py:when="preview.size == 0"> |
|---|
| 156 | <strong>(The file is empty)</strong> |
|---|
| 157 | </p> |
|---|
| 158 | <p py:when="not preview.rendered"> |
|---|
| 159 | <py:choose> |
|---|
| 160 | <py:when test="preview.max_file_size_reached"> |
|---|
| 161 | <div class="warning system-message"> |
|---|
| 162 | <i18n:msg params="size"> |
|---|
| 163 | <strong>HTML preview not available</strong>, since the file size exceeds $preview.max_file_size bytes. |
|---|
| 164 | </i18n:msg> |
|---|
| 165 | </div> |
|---|
| 166 | </py:when> |
|---|
| 167 | <py:otherwise><div class="warning system-message"><i18n:msg> |
|---|
| 168 | <strong>HTML preview not available</strong>, since no preview renderer could handle it. |
|---|
| 169 | </i18n:msg></div></py:otherwise> |
|---|
| 170 | </py:choose> |
|---|
| 171 | </p> |
|---|
| 172 | </py:choose> |
|---|
| 173 | <!--! End of taken from preview_file.html --> |
|---|
| 174 | </py:if> |
|---|
| 175 | |
|---|
| 176 | <p>Back to the <a href="${href.peerReviewView()}?Review=${review_file['review_id']}"> Code Review Details</a> page.</p> |
|---|
| 177 | |
|---|
| 178 | <div id="add-comment-dlg"> |
|---|
| 179 | <form action="peerReviewCommentCallback" method="POST" id="add-comment-form"> |
|---|
| 180 | <div> |
|---|
| 181 | <textarea rows="6" id="comment-txt" name="comment"></textarea> |
|---|
| 182 | <div id="commentchange" class="ticketdraft" style="display: none"> |
|---|
| 183 | <p class="help">Preview:</p> |
|---|
| 184 | <div class="notes-preview comment searchable"> |
|---|
| 185 | |
|---|
| 186 | </div> |
|---|
| 187 | </div> |
|---|
| 188 | </div> |
|---|
| 189 | <div class="buttons"> |
|---|
| 190 | <input type="hidden" name="fileid" value="-1" id="comment-fileid"/> |
|---|
| 191 | <input type="hidden" name="parentid" value="-1" id="comment-parentid"/> |
|---|
| 192 | <input type="hidden" name="line" value="" id="comment-line" /> |
|---|
| 193 | <input type="hidden" name="addcomment" value="Add Comment"/> |
|---|
| 194 | <input type="submit" name="addcomment" value="Add Comment" id="addcomment"/> |
|---|
| 195 | </div> |
|---|
| 196 | </form> |
|---|
| 197 | </div> |
|---|
| 198 | |
|---|
| 199 | <div id="view-comment-dlg"> |
|---|
| 200 | <p id="refresh"><a id="comment-refresh" href="">Refresh</a></p> |
|---|
| 201 | <div id="comment-tree"> </div> |
|---|
| 202 | <p id="comment-loading">Loading...</p> |
|---|
| 203 | <div class="buttons"> |
|---|
| 204 | <input type="hidden" name="fileid" value="-1" id="comment-fileid-view"/> |
|---|
| 205 | <input type="hidden" name="line" value="" id="comment-line-view" /> |
|---|
| 206 | <input type="hidden" name="addcomment" value="Add Comment"/> |
|---|
| 207 | </div> |
|---|
| 208 | </div> |
|---|
| 209 | |
|---|
| 210 | <script type="text/javascript"> |
|---|
| 211 | var baseUrl = "${href.peerReviewCommentCallback()}"; |
|---|
| 212 | var tacUrl = "${href.chrome('/hw/images/thumbtac11x11.gif')}"; |
|---|
| 213 | var lineStart = ${review_file['line_start']}; |
|---|
| 214 | var lineEnd = ${review_file['line_end']}; |
|---|
| 215 | </script> |
|---|
| 216 | |
|---|
| 217 | </div> |
|---|
| 218 | </body> |
|---|
| 219 | </html> |
|---|