templates.html
293 lines
| 9.1 KiB
| text/html
|
HtmlLexer
r2484 | <%text> | |||
<div style="display: none"> | ||||
r4482 | <script> | |||
var CG = new ColorGenerator(); | ||||
</script> | ||||
r2484 | <script id="ejs_gravatarWithUser" type="text/template" class="ejsTemplate"> | |||
<% | ||||
if (size > 16) { | ||||
var gravatar_class = 'gravatar gravatar-large'; | ||||
} else { | ||||
var gravatar_class = 'gravatar'; | ||||
} | ||||
r4026 | ||||
if (tooltip) { | ||||
var gravatar_class = gravatar_class + ' tooltip-hovercard'; | ||||
} | ||||
var data_hovercard_alt = username; | ||||
r2484 | %> | |||
<% | ||||
if (show_disabled) { | ||||
var user_cls = 'user user-disabled'; | ||||
} else { | ||||
var user_cls = 'user'; | ||||
} | ||||
r4026 | var data_hovercard_url = pyroutes.url('hovercard_user', {"user_id": user_id}) | |||
r2484 | %> | |||
<div class="rc-user"> | ||||
r4026 | <img class="<%= gravatar_class %>" height="<%= size %>" width="<%= size %>" data-hovercard-url="<%= data_hovercard_url %>" data-hovercard-alt="<%= data_hovercard_alt %>" src="<%- gravatar_url -%>"> | |||
r2484 | <span class="<%= user_cls %>"> <%- user_link -%> </span> | |||
</div> | ||||
</script> | ||||
<script id="ejs_reviewMemberEntry" type="text/template" class="ejsTemplate"> | ||||
r4481 | <% | |||
if (create) { | ||||
var edit_visibility = 'visible'; | ||||
} else { | ||||
var edit_visibility = 'hidden'; | ||||
} | ||||
r2485 | ||||
r4481 | if (member.user_group && member.user_group.vote_rule) { | |||
r4482 | var reviewGroup = '<i class="icon-user-group"></i>'; | |||
var reviewGroupColor = CG.asRGB(CG.getColor(member.user_group.vote_rule)); | ||||
r4481 | } else { | |||
r4482 | var reviewGroup = null; | |||
var reviewGroupColor = 'transparent'; | ||||
r4481 | } | |||
r4485 | var rule_show = rule_show || false; | |||
if (rule_show) { | ||||
var rule_visibility = 'table-cell'; | ||||
} else { | ||||
var rule_visibility = 'none'; | ||||
} | ||||
r4481 | %> | |||
r2485 | ||||
r4482 | <tr id="reviewer_<%= member.user_id %>" class="reviewer_entry" tooltip="Review Group" data-reviewer-user-id="<%= member.user_id %>"> | |||
r4481 | ||||
r4589 | <% if (create) { %> | |||
r4590 | <td style="width: 1px"></td> | |||
r4589 | <% } else { %> | |||
r4482 | <td style="width: 20px"> | |||
r4500 | <div class="tooltip presence-state" style="display: none; position: absolute; left: 2px" title="This users is currently at this page"> | |||
<i class="icon-eye" style="color: #0ac878"></i> | ||||
</div> | ||||
<% if (role === 'reviewer') { %> | ||||
r2484 | <div class="reviewer_status tooltip" title="<%= review_status_label %>"> | |||
r3939 | <i class="icon-circle review-status-<%= review_status %>"></i> | |||
r4482 | </div> | |||
r4500 | <% } else if (role === 'observer') { %> | |||
<div class="tooltip" title="Observer without voting right."> | ||||
<i class="icon-circle-thin"></i> | ||||
</div> | ||||
<% } %> | ||||
r4482 | </td> | |||
r4577 | <% } %> | |||
r4589 | ||||
r4577 | <% if (mandatory) { %> | |||
<td style="text-align: right;width: 10px;"> | ||||
<div class="reviewer_member_mandatory tooltip" title="Mandatory reviewer"> | ||||
<i class="icon-lock"></i> | ||||
</div> | ||||
</td> | ||||
<% } else { %> | ||||
<td style="text-align: right;width: 10px;"> | ||||
<% if (allowed_to_update) { %> | ||||
<div class="<%=role %>_member_remove" onclick="reviewersController.removeMember(<%= member.user_id %>, true)" style="visibility: <%= edit_visibility %>;"> | ||||
<i class="icon-remove" style="color: #e85e4d;"></i> | ||||
</div> | ||||
<% } %> | ||||
</td> | ||||
<% } %> | ||||
r4481 | ||||
r4482 | <td> | |||
r2484 | <div id="reviewer_<%= member.user_id %>_name" class="reviewer_name"> | |||
<%- | ||||
renderTemplate('gravatarWithUser', { | ||||
'size': 16, | ||||
'show_disabled': false, | ||||
r4026 | 'tooltip': true, | |||
'username': member.username, | ||||
'user_id': member.user_id, | ||||
r2484 | 'user_link': member.user_link, | |||
'gravatar_url': member.gravatar_link | ||||
}) | ||||
%> | ||||
</div> | ||||
r4482 | <% if (reviewGroup !== null) { %> | |||
<span class="tooltip" title="Member of review group from rule: `<%= member.user_group.name %>`" style="color: <%= reviewGroupColor %>"> | ||||
<%- reviewGroup %> | ||||
</span> | ||||
<% } %> | ||||
</td> | ||||
</tr> | ||||
r4500 | <tr id="reviewer_<%= member.user_id %>_rules"> | |||
r4485 | <td colspan="4" style="display: <%= rule_visibility %>" class="pr-user-rule-container"> | |||
r2484 | <input type="hidden" name="__start__" value="reviewer:mapping"> | |||
r4482 | <%if (member.user_group && member.user_group.vote_rule) { %> | |||
r2485 | <div class="reviewer_reason"> | |||
<%if (member.user_group.vote_rule == -1) {%> | ||||
- group votes required: ALL | ||||
<%} else {%> | ||||
- group votes required: <%= member.user_group.vote_rule %> | ||||
<%}%> | ||||
</div> | ||||
r4482 | <%} %> | |||
r2485 | ||||
r2484 | <input type="hidden" name="__start__" value="reasons:sequence"> | |||
<% for (var i = 0; i < reasons.length; i++) { %> | ||||
<% var reason = reasons[i] %> | ||||
<div class="reviewer_reason">- <%= reason %></div> | ||||
<input type="hidden" name="reason" value="<%= reason %>"> | ||||
<% } %> | ||||
r4482 | <input type="hidden" name="__end__" value="reasons:sequence"> | |||
r2484 | ||||
r4482 | <input type="hidden" name="__start__" value="rules:sequence"> | |||
r2484 | <% for (var i = 0; i < member.rules.length; i++) { %> | |||
<% var rule = member.rules[i] %> | ||||
<input type="hidden" name="rule_id" value="<%= rule %>"> | ||||
<% } %> | ||||
r4482 | <input type="hidden" name="__end__" value="rules:sequence"> | |||
r2484 | ||||
r4482 | <input id="reviewer_<%= member.user_id %>_input" type="hidden" value="<%= member.user_id %>" name="user_id" /> | |||
<input type="hidden" name="mandatory" value="<%= mandatory %>"/> | ||||
r4500 | <input type="hidden" name="role" value="<%= role %>"/> | |||
r2484 | ||||
<input type="hidden" name="__end__" value="reviewer:mapping"> | ||||
r4482 | </td> | |||
</tr> | ||||
r2484 | ||||
</script> | ||||
r4408 | <script id="ejs_commentVersion" type="text/template" class="ejsTemplate"> | |||
<% | ||||
if (size > 16) { | ||||
var gravatar_class = 'gravatar gravatar-large'; | ||||
} else { | ||||
var gravatar_class = 'gravatar'; | ||||
} | ||||
%> | ||||
<% | ||||
if (show_disabled) { | ||||
var user_cls = 'user user-disabled'; | ||||
} else { | ||||
var user_cls = 'user'; | ||||
} | ||||
%> | ||||
<div style='line-height: 20px'> | ||||
<img style="margin: -3px 0" class="<%= gravatar_class %>" height="<%= size %>" width="<%= size %>" src="<%- gravatar_url -%>"> | ||||
<strong><%- user_name -%></strong>, <code>v<%- version -%></code> edited <%- timeago_component -%> | ||||
</div> | ||||
</script> | ||||
r4488 | ||||
<script id="ejs_sideBarCommentHovercard" type="text/template" class="ejsTemplate"> | ||||
<div> | ||||
r4588 | ||||
r4488 | <% if (is_todo) { %> | |||
<% if (inline) { %> | ||||
r4588 | <strong>Inline</strong> TODO (<code>#<%- comment_id -%></code>) on line: <%= line_no %> | |||
r4488 | <% if (version_info) { %> | |||
<%= version_info %> | ||||
<% } %> | ||||
<br/> | ||||
File: <code><%- file_name -%></code> | ||||
<% } else { %> | ||||
r4490 | <% if (review_status) { %> | |||
<i class="icon-circle review-status-<%= review_status %>"></i> | ||||
<% } %> | ||||
r4588 | <strong>General</strong> TODO (<code>#<%- comment_id -%></code>) | |||
r4488 | <% if (version_info) { %> | |||
<%= version_info %> | ||||
<% } %> | ||||
<% } %> | ||||
<% } else { %> | ||||
<% if (inline) { %> | ||||
r4588 | <strong>Inline</strong> comment (<code>#<%- comment_id -%></code>) on line: <%= line_no %> | |||
r4488 | <% if (version_info) { %> | |||
<%= version_info %> | ||||
<% } %> | ||||
<br/> | ||||
r4652 | File: <code><%= file_name -%></code> | |||
r4488 | <% } else { %> | |||
r4490 | <% if (review_status) { %> | |||
<i class="icon-circle review-status-<%= review_status %>"></i> | ||||
<% } %> | ||||
r4588 | <strong>General</strong> comment (<code>#<%- comment_id -%></code>) | |||
r4488 | <% if (version_info) { %> | |||
<%= version_info %> | ||||
<% } %> | ||||
<% } %> | ||||
<% } %> | ||||
<br/> | ||||
Created: | ||||
<time class="timeago" title="<%= created_on %>" datetime="<%= datetime %>"><%= $.timeago(datetime) %></time> | ||||
r4633 | <% if (is_todo) { %> | |||
r4746 | <div style="text-align: left; padding-top: 5px"> | |||
r4633 | <a class="btn btn-sm" href="#resolveTodo<%- comment_id -%>" onclick="Rhodecode.comments.resolveTodo(this, '<%- comment_id -%>'); return false"> | |||
<strong>Resolve TODO</strong> | ||||
</a> | ||||
</div> | ||||
<% } %> | ||||
r2484 | </div> | |||
r4488 | </script> | |||
r4543 | <script id="ejs_commentHelpHovercard" type="text/template" class="ejsTemplate"> | |||
<div> | ||||
Use <strong>@username</strong> mention syntax to send direct notification to this RhodeCode user.<br/> | ||||
Typing / starts autocomplete for certain action, e.g set review status, or comment type. <br/> | ||||
<br/> | ||||
Use <strong>Cmd/ctrl+enter</strong> to submit comment, or <strong>Shift+Cmd/ctrl+enter</strong> to submit a draft.<br/> | ||||
<br/> | ||||
<strong>Draft comments</strong> are private to the author, and trigger no notification to others.<br/> | ||||
They are permanent until deleted, or converted to regular comments.<br/> | ||||
<br/> | ||||
<br/> | ||||
</div> | ||||
</script> | ||||
r5261 | <script id="ejs_submoduleHovercard" type="text/template" class="ejsTemplate"> | |||
<strong>Submodule Node</strong><br/> | ||||
<pre><%= submodule_url %></pre> | ||||
</script> | ||||
r4543 | ||||
r5362 | <script id="ejs_recoveryCodes" type="text/template" class="ejsTemplate"> | |||
<code> | ||||
<ol> | ||||
<% for (var i = 0; i < recoveryCodes.length; i++) { %> | ||||
<% var code = recoveryCodes[i] %> | ||||
<li><%= code %></li> | ||||
<% } %> | ||||
</ol> | ||||
</code> | ||||
<i class="icon-clipboard clipboard-action" data-clipboard-text="<%= recoveryCodes %>" >Copy All</i> | ||||
</script> | ||||
r4488 | ##// END OF EJS Templates | |||
</div> | ||||
r2484 | <script> | |||
// registers the templates into global cache | ||||
registerTemplates(); | ||||
</script> | ||||
r2485 | </%text> | |||