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

Last change on this file was 17263, checked in by Cinc-th, 5 years ago

PeerReviewPlugin: allow resubmitting of reviews only for managers. This feature is seldomly used so removal for standard users will unclutter the UI.
Hide ticket preview and creation button on View Review page. Can be shown again by setting show_ticket = 1 in trac.ini.
Some minor CSS changes.

File size: 11.7 KB
Line 
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>Code Review Details - ${review['name']}</title>
10    </head>
11    <xi:include href="peer_functions.html"/>
12    <body>
13        <div id="content" class="peerreview-content">
14            <h1>Code Review Details - ${review['name']}</h1>
15            <div py:if="is_finished" class="notice system-message">
16                <p>
17                    This review is finished. A code review manager may reopen it.
18                </p>
19            </div>
20            <div py:if="review_locked and not is_finished" class="notice system-message">
21                <p>
22                    This review is marked as <strong>reviewed</strong> and can't be changed. The author of the code review may change the current status.
23                </p>
24            </div>
25            <div py:if="review_done and not is_finished and not review_locked" class="notice system-message">
26                <p>
27                    This review is marked as <strong>reviewed</strong>. Reviewers can't change it anymore. As author you have to set the final status now.
28                </p>
29            </div>
30            <div py:if="parent_review">
31                <table class="review-table">
32                    <thead>
33                        <tr>
34                            <th>Review Information</th>
35                            <th>Followup from</th>
36                        </tr>
37                    </thead>
38                    <tbody>
39                        <tr>
40                            <td>${review_info(review)}</td>
41                            <td>${review_info(parent_review)}</td>
42                        </tr>
43                    </tbody>
44                </table>
45            </div>
46            <div py:if="not parent_review">
47                <table class="review-table">
48                    <thead>
49                        <tr>
50                            <th>Review Information</th>
51                        </tr>
52                    </thead>
53                    <tbody>
54                    <tr>
55                        <td>${review_info(review)}</td>
56                    </tr>
57                    </tbody>
58                </table>
59            </div>
60
61            <h2>Files associated with this code review</h2>
62            <p py:if="parent_review">The files will be compared with those from review
63                <a href="peerReviewView?Review=${parent_review['review_id']}">#${parent_review['review_id']}</a>.
64            </p>
65            <table class="listing" id="filelist">
66                <thead>
67                <tr>
68                    <th>File ID</th>
69                    <th>Filename</th>
70                    <th>Repository</th>
71                    <th>File Revision</th>
72                    <th>Repo Revision</th>
73                    <th py:if="parent_review">Previous File Revision</th>
74                    <th py:if="parent_review">Previous Repo Revision</th>
75                    <th>Line Numbers</th>
76                    <th># of Comments</th>
77                    <th># Not Read</th>
78                    <th>Status</th>
79                </tr>
80                </thead>
81                <tbody py:with="cls=cycle(('odd', 'even'))">
82                <tr py:if="not review_files" class="even" colspan="8">
83                    <td>There are no files included in this code review.</td>
84                </tr>
85                <tr py:for="item in review_files" class="${cls.next()}" id="$item['file_id']">
86                    <td><a href="${href.peerReviewPerform()}?IDFile=${item['file_id']}">${item['file_id']}</a></td>
87                    <td><a href="${href.peerReviewPerform()}?IDFile=${item['file_id']}">${item['path']}</a></td>
88                    <td>${item['repo'] if item['repo'] else '(default)'}</td>
89                    <td>${item['changerevision']}</td>
90                    <td>${item['revision']}</td>
91                    <td py:if="parent_review">${file_map[item['file_id']]['changerevision']}</td>
92                    <td py:if="parent_review">${file_map[item['file_id']]['revision']}</td>
93                    <td py:if="item['line_start'] != 0">${item['line_start']} -
94                        ${item['line_end']}</td>
95                    <td py:if="item['line_start'] == 0">1 - End of file
96                    </td>
97                    <td>${item.num_comments}</td>
98                    <td py:attrs="{'class': 'comment-notread'} if item.num_notread else None">${item.num_notread}</td>
99                    <td>${item['status']}</td>
100                </tr>
101                </tbody>
102            </table>
103            <p class="help">The status of the listed files will be set when the review author sets the final status
104                of the review.</p>
105            <h2>Users assigned to this code review</h2>
106
107            <table py:if="review['owner'] == req.authname or manager" class="listing dirlist" id="userlist">
108                <thead>
109                    <tr>
110                        <th style="width:90%">User name</th>
111                        <th>Status</th>
112                    </tr>
113                </thead>
114                <tbody py:with="cls=cycle(('odd', 'even'))">
115                    <tr py:if="not reviewer" class="even">
116                        <td>There are no users included in this code review.</td>
117                    </tr>
118                    <tr py:if="reviewer" py:for="item in reviewer" class="${cls.next()}">
119                        <td>${item['reviewer']}</td>
120                        <td>${item['status']}</td>
121                    </tr>
122                </tbody>
123            </table>
124
125            <table py:if="review['owner'] != req.authname and not manager" class="listing dirlist" id="userlist">
126                <thead>
127                    <tr>
128                        <th>User name</th>
129                    </tr>
130                </thead>
131                <tbody py:with="cls=cycle(('odd', 'even'))">
132                    <tr py:if="not reviewer" class="even">
133                        <td>There are no users included in this code review.</td>
134                    </tr>
135                    <tr py:if="reviewer" py:for="item in reviewer" class="${cls.next()}">
136                        <td>${item['reviewer']}</td>
137                    </tr>
138                </tbody>
139            </table>
140
141            <!--! Ticket creation in Trac -->
142            <py:if test="(manager or review['owner'] == req.authname) and review_done and show_ticket">
143                <h2>Prepare ticket</h2>
144                <form class="workflow-actions" action="${req.href.newticket()}" method="post" target="_blank" id="prepare-ticket">
145                    <input type="hidden" name="preview" value="" />
146                    <input type="hidden" name="field_project" value="${review['project']}" />
147                    <input type="hidden" name="field_summary" value="$ticket_summary"/>
148                    <input type="hidden" name="field_description" value="$ticket_desc" />
149                    <fieldset>
150                        <table class="ticket-table">
151                            <tr>
152                                <th>Summary:</th>
153                                <td>$ticket_summary</td>
154                            </tr>
155                            <tr>
156                                <th>Description:</th>
157                                <td>
158                                    <div id="ticket" class="trac-content ticketdraft">
159                                        <div class="description">
160                                            <h3>Description</h3>
161                                        ${ticket_desc_wiki}
162                                        </div>
163                                    </div>
164                                    <p class="help">This is a preview. You may change summary and description on the ticket page which
165                                        opens in a new window or tab.</p>
166                                </td>
167                            </tr>
168                    </table>
169                    <div class="buttons">
170                        <input type="submit" value="Prepare Ticket"/>
171                    </div>
172                    </fieldset>
173                </form>
174                <p class="help">
175                     Clicking <strong>Prepare Ticket</strong> will open a <strong>New Ticket</strong> page where you may
176                    modify all settings.
177                </p>
178            </py:if>
179
180            <py:if test="canivote">
181                <h2>Workflow actions for reviewer</h2>
182
183                $reviewer_workflow
184
185                <p py:if="not is_finished"
186                   class="help">Setting the correct state helps the review author to track progress.</p>
187            </py:if>
188
189            <py:if test="manager or review['owner'] == req.authname">
190                <py:if test="not is_finished">
191                    <h2 py:if="not manager">Workflow actions for author</h2>
192                    <h2 py:if="manager">Workflow actions for author or manager</h2>
193                    $workflow
194                    <p class="help">
195                        Closing a review means it is marked as obsolete and <strong>all associated data will be unavailable</strong>.
196                    </p>
197                </py:if>
198                <py:if test="is_finished and manager">
199                    <h2 py:if="manager">Workflow actions for manager</h2>
200                    $workflow
201                </py:if>
202                <hr />
203                <form class="workflow-actions" action="" method="post">
204                    <fieldset>
205                        <div class="buttons">
206                            <input type="hidden" value="${review['review_id']}" name="Review"/>
207                            <input py:if="manager" type="submit" value="Resubmit For Review" name="resubmit"/>
208                            <input py:if="review['status'] != 'closed'" type="submit"
209                                   value="Followup Review" name="followup"
210                                   py:attrs="{'disabled': 'disabled'} if not is_finished else {'disabled': None}"/>
211                            <input py:if="not is_finished or manager" type="submit"
212                                   value="Modify" name="modify"/>
213                        </div>
214                    </fieldset>
215                </form>
216                <p py:if="manager" class="help">When resubmitting all the data of this review will be used for prefilling the fields of
217                    a new code review.
218                    Comments will not be copied. When the new review is created <strong>this one will be closed
219                    automatically</strong> which means it will be practically discarded.
220                </p>
221                <p py:if="review['status'] != 'closed'" class="help">
222                    When creating a <strong>Followup Review</strong> all the data of this review will be
223                    used for prefilling the fields of a new code review. Comments will not be copied. During
224                    the new review it is possible to view the changes between file data at different revisions.
225                </p>
226                <p py:if="review['status'] != 'closed' and not is_finished" class="help">
227                    A followup review can't be created at the moment because this review is not in a
228                    terminal state. Terminal states are: <strong>$finished_states_str</strong>.
229                </p>
230            </py:if>
231        </div>
232    </body>
233</html>
Note: See TracBrowser for help on using the repository browser.