source: peerreviewplugin/tags/0.12/3.1/codereview/templates/peerReviewCommentCallback.html

Last change on this file was 15517, checked in by Cinc-th, 7 years ago

PeerReviewPlugin: follow up to [15516].

  • commenting is now also blocked for diff view in followup reviews
  • replying is blocked for users not allowed to do so
  • added general check in process_request() to prevent adding a comment if not allowed
File size: 2.9 KB
Line 
1    <div xmlns:py="http://genshi.edgewall.org/">
2        <py:choose test="invalid">
3          <div py:when="0" id="${fileID+'_'+lineNum}" class="comment-tree-div">
4              ${commentHTML}
5              <div py:if="not is_finished and not review_locked and not not_allowed" class="buttons">
6                  <input type="button" name="addcomment" value="Add New Comment"
7                         id="${'addcomment-view'+lineNum}"/>
8                  <input type="hidden" name="fileid" value="" id="${'comment-fileid-view'+lineNum}"/>
9                  <input type="hidden" name="line" value="" id="${'comment-line-view'+lineNum}" />
10              </div>
11              <p py:if="is_finished or review_locked or not_allowed" class="help">
12                  This review is locked or you are not allowed to add any comments.
13              </p>
14          </div>
15
16          <span py:when="1">Invalid Parameters</span>
17          <span py:when="2">Comment Text Blank</span>
18          <span py:when="3">Invalid Action Type</span>
19          <span py:when="4">Invalid Permission</span>
20          <span py:when="closed">Review already closed</span>
21          <div py:when="5" id="${fileID+'_'+lineNum}">
22                <table width="100%" id="addCommentTable">
23                  <tr>
24                    <td align="center">
25                      <textarea cols="31" rows="6" id="addCommentText"></textarea>
26                    </td>
27                  </tr>
28                  <tr height="3px">
29                    <td> </td>
30                  </tr>
31                  <tr>
32                    <td>&nbsp;&nbsp;Attach Code Sample <input type="checkbox" onclick="showHideAttachFile();" value="Attach Code Sample" id="attachFileCheckbox" /></td>
33                  </tr>
34                  <tr height="5px">
35                    <td> </td>
36                  </tr>
37                  <tr>
38                    <td align="right">
39                <form action="${href.peerReviewCommentCallback()}" method="post" id="HiddenCommentForm" name="HiddenCommentForm" enctype="multipart/form-data">
40                  <input type="hidden" value="addComment" id="actionType" name="actionType" />
41                  <input type="hidden" value="" id="IDFile" name="IDFile" />
42                  <input type="hidden" value="" id="LineNum" name="LineNum" />
43                  <input type="hidden" value="" id="IDParent" name="IDParent" />
44                  <input type="hidden" value="" id="Text" name="Text" />
45                  <input size="25" type="file" value="" id="FileUp" name="FileUp" style="display:none;" />
46                  <span id="FileUpCompanion" style="display:none;">&nbsp;</span>
47                </form>
48                    </td>
49                  </tr>
50                  <tr>
51                    <td align="right" colspan="2" id="AddCommentButtonArea" />
52                  </tr>
53                </table>
54          </div>
55        </py:choose>
56    </div>
57
Note: See TracBrowser for help on using the repository browser.