2016-03-11 00:48:53 +00:00
|
|
|
<% if (!hide) { %>
|
|
|
|
<div id="<%= id %>" class="user-comment-item">
|
|
|
|
|
|
|
|
<!-- comment block -->
|
|
|
|
|
2018-06-04 11:45:22 +00:00
|
|
|
<div class="user-name">
|
|
|
|
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(username) %>
|
|
|
|
</div>
|
2016-03-11 00:48:53 +00:00
|
|
|
<div class="user-date"><%=date%></div>
|
2017-08-10 13:50:50 +00:00
|
|
|
<% if (quote!==null && quote!=='') { %>
|
2016-03-11 00:48:53 +00:00
|
|
|
<div class="user-quote"><%=scope.getFixedQuote(quote)%></div>
|
|
|
|
<% } %>
|
2019-01-14 13:51:23 +00:00
|
|
|
<% if (!editText || scope.viewmode) { %>
|
2016-03-25 07:38:34 +00:00
|
|
|
<div class="user-message" data-can-copy="true"><%=scope.pickLink(comment)%></div>
|
2016-03-11 00:48:53 +00:00
|
|
|
<% } else { %>
|
|
|
|
<div class="inner-edit-ct">
|
|
|
|
<textarea class="msg-reply user-select" maxlength="maxCommLength"><%=comment%></textarea>
|
|
|
|
<button class="btn normal dlg-btn primary btn-inner-edit" id="id-comments-change">textEdit</button>
|
|
|
|
<button class="btn normal dlg-btn btn-inner-close">textCancel</button>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<!-- replys elements -->
|
|
|
|
|
|
|
|
<% if (replys.length) { %>
|
|
|
|
<div class="reply-arrow img-commonctrl"></div>
|
2018-12-17 08:37:43 +00:00
|
|
|
<% _.each(replys, function (item, index) { %>
|
2019-01-14 13:51:23 +00:00
|
|
|
<div class="reply-item-ct" <% if (scope.viewmode && index==replys.length-1) { %>style="padding-bottom: 0;" <% } %>;>
|
2018-06-04 11:45:22 +00:00
|
|
|
<div class="user-name">
|
|
|
|
<div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getUserName(item.get("username")) %>
|
|
|
|
</div>
|
2016-03-11 00:48:53 +00:00
|
|
|
<div class="user-date"><%=item.get("date")%></div>
|
|
|
|
<% if (!item.get("editText")) { %>
|
2016-03-25 07:38:34 +00:00
|
|
|
<div class="user-message" data-can-copy="true"><%=scope.pickLink(item.get("reply"))%></div>
|
2019-01-14 13:51:23 +00:00
|
|
|
<% if (!scope.viewmode) { %>
|
2016-03-11 00:48:53 +00:00
|
|
|
<div class="btns-reply-ct">
|
2017-04-11 13:43:31 +00:00
|
|
|
<% if (item.get("editable")) { %>
|
|
|
|
<div class="btn-edit img-commonctrl" data-value="<%=item.get("id")%>"></div>
|
2019-03-18 11:09:16 +00:00
|
|
|
<div class="btn-delete img-commonctrl" data-value="<%=item.get("id")%>"></div>
|
2017-04-11 13:43:31 +00:00
|
|
|
<% } %>
|
2018-12-17 08:37:43 +00:00
|
|
|
</div>
|
|
|
|
<%}%>
|
2016-03-11 00:48:53 +00:00
|
|
|
<% } else { %>
|
|
|
|
<div class="inner-edit-ct">
|
|
|
|
<textarea class="msg-reply textarea-fix user-select" maxlength="maxCommLength"><%=item.get("reply")%></textarea>
|
|
|
|
<button class="btn normal dlg-btn primary btn-inner-edit btn-fix" id="id-comments-change">textEdit</button>
|
|
|
|
<button class="btn normal dlg-btn btn-inner-close">textClose</button>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
</div>
|
|
|
|
<% }); %>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<!-- add reply button -->
|
|
|
|
|
2019-01-14 13:51:23 +00:00
|
|
|
<% if (!showReply && !scope.viewmode) { %>
|
2016-03-11 00:48:53 +00:00
|
|
|
<% if (replys.length) { %>
|
|
|
|
<label class="user-reply" style="margin-left: 20px; margin-top: 5px;" role="presentation" tabindex="-1">textAddReply</label>
|
|
|
|
<% } else { %>
|
|
|
|
<label class="user-reply" role="presentation" tabindex="-1">textAddReply</label>
|
|
|
|
<% } %>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<!-- edit buttons -->
|
|
|
|
|
2019-01-14 13:51:23 +00:00
|
|
|
<% if (!editText && !lock && !scope.viewmode) { %>
|
2016-03-11 00:48:53 +00:00
|
|
|
<div class="edit-ct">
|
2017-04-11 13:43:31 +00:00
|
|
|
<% if (editable) { %>
|
|
|
|
<div class="btn-edit img-commonctrl"></div>
|
2019-03-18 11:09:16 +00:00
|
|
|
<div class="btn-delete img-commonctrl"></div>
|
2017-04-11 13:43:31 +00:00
|
|
|
<% } %>
|
2016-03-11 00:48:53 +00:00
|
|
|
<% if (resolved) { %>
|
|
|
|
<div class="btn-resolve-check img-commonctrl" data-toggle="tooltip"></div>
|
|
|
|
<% } else { %>
|
|
|
|
<div class="btn-resolve img-commonctrl" data-toggle="tooltip"></div>
|
|
|
|
<% } %>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<!-- reply -->
|
|
|
|
|
|
|
|
<% if (showReply) { %>
|
|
|
|
<div class="reply-ct">
|
|
|
|
<textarea class="msg-reply user-select" placeholder="textAddReply" maxlength="maxCommLength"></textarea>
|
|
|
|
<button class="btn normal dlg-btn primary btn-reply" id="id-comments-change">textReply</button>
|
|
|
|
<button class="btn normal dlg-btn btn-close">textClose</button>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
<% if (lock) { %>
|
|
|
|
<div class="lock-area"></div>
|
|
|
|
<div class="lock-author"><%=lockuserid%></div>
|
|
|
|
<% } %>
|
|
|
|
<% if (!last) { %>
|
|
|
|
<div class="separator-cmt"></div>
|
|
|
|
<% } %>
|
|
|
|
</div>
|
|
|
|
<% } %>
|