##// END OF EJS Templates
default-reviewers: fixed edit mode when creating new entries.
marcink -
r2504:dc37941f default
parent child Browse files
Show More
@@ -311,7 +311,8 b' ReviewersController = function () {'
311 'allowed_to_update': true,
311 'allowed_to_update': true,
312 'review_status': 'not_reviewed',
312 'review_status': 'not_reviewed',
313 'review_status_label': _gettext('Not Reviewed'),
313 'review_status_label': _gettext('Not Reviewed'),
314 'reasons': reasons
314 'reasons': reasons,
315 'create': true
315 });
316 });
316 }
317 }
317 }
318 }
@@ -34,13 +34,17 b' var CG = new ColorGenerator();'
34
34
35 <li id="reviewer_<%= member.user_id %>" class="reviewer_entry">
35 <li id="reviewer_<%= member.user_id %>" class="reviewer_entry">
36 <%
36 <%
37 if (create) {
38 var edit_visibility = 'visible';
39 } else {
40 var edit_visibility = 'hidden';
41 }
37
42
38 if (member.user_group && member.user_group.vote_rule) {
43 if (member.user_group && member.user_group.vote_rule) {
39 var groupStyle = 'border-left: 1px solid '+CG.asRGB(CG.getColor(member.user_group.vote_rule));
44 var groupStyle = 'border-left: 1px solid '+CG.asRGB(CG.getColor(member.user_group.vote_rule));
40 } else {
45 } else {
41 var groupStyle = 'border-left: 1px solid white';
46 var groupStyle = 'border-left: 1px solid white';
42 }
47 }
43
44 %>
48 %>
45
49
46 <div class="reviewers_member" style="<%= groupStyle%>" >
50 <div class="reviewers_member" style="<%= groupStyle%>" >
@@ -99,12 +103,12 b' var CG = new ColorGenerator();'
99 <input type="hidden" name="__end__" value="reviewer:mapping">
103 <input type="hidden" name="__end__" value="reviewer:mapping">
100
104
101 <% if (mandatory) { %>
105 <% if (mandatory) { %>
102 <div class="reviewer_member_mandatory_remove" style="visibility: hidden;">
106 <div class="reviewer_member_mandatory_remove" style="visibility: <%= edit_visibility %>;">
103 <i class="icon-remove-sign"></i>
107 <i class="icon-remove-sign"></i>
104 </div>
108 </div>
105 <% } else { %>
109 <% } else { %>
106 <% if (allowed_to_update) { %>
110 <% if (allowed_to_update) { %>
107 <div class="reviewer_member_remove action_button" onclick="reviewersController.removeReviewMember(<%= member.user_id %>, true)" style="visibility: hidden;">
111 <div class="reviewer_member_remove action_button" onclick="reviewersController.removeReviewMember(<%= member.user_id %>, true)" style="visibility: <%= edit_visibility %>;">
108 <i class="icon-remove-sign" ></i>
112 <i class="icon-remove-sign" ></i>
109 </div>
113 </div>
110 <% } %>
114 <% } %>
@@ -366,7 +366,8 b''
366 'allowed_to_update': allowed_to_update,
366 'allowed_to_update': allowed_to_update,
367 'review_status': status,
367 'review_status': status,
368 'review_status_label': status_lbl,
368 'review_status_label': status_lbl,
369 'user_group': member.user_group
369 'user_group': member.user_group,
370 'create': false
370 });
371 });
371 $('#review_members').append(entry)
372 $('#review_members').append(entry)
372 </script>
373 </script>
General Comments 0
You need to be logged in to leave comments. Login now