2021-03-17 17:08:47 +00:00
|
|
|
<% if (!hide) { %>
|
2016-03-11 00:48:53 +00:00
|
|
|
<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>
|
|
|
|
<% if (!editTextInPopover || hint) { %>
|
2018-05-08 08:14:43 +00:00
|
|
|
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(comment)%></div>
|
2016-03-11 00:48:53 +00:00
|
|
|
<% } else { %>
|
|
|
|
<div class="inner-edit-ct">
|
2019-06-26 11:04:02 +00:00
|
|
|
<textarea class="msg-reply user-select" maxlength="maxCommLength" spellcheck="false" <% if (!!dummy) { %> placeholder="textMention"<% } %>><%=comment%></textarea>
|
2016-03-11 00:48:53 +00:00
|
|
|
<% if (hideAddReply) { %>
|
|
|
|
<button class="btn normal dlg-btn primary btn-inner-edit" id="id-comments-change-popover">textAdd</button>
|
|
|
|
<% } else { %>
|
|
|
|
<button class="btn normal dlg-btn primary btn-inner-edit" id="id-comments-change-popover">textEdit</button>
|
|
|
|
<% } %>
|
|
|
|
<button class="btn normal dlg-btn btn-inner-close">textCancel</button>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<!-- replys elements -->
|
|
|
|
|
2021-03-17 17:08:47 +00:00
|
|
|
<% var add_arrow = true; %>
|
2016-03-11 00:48:53 +00:00
|
|
|
<% if (replys.length) { %>
|
|
|
|
<% _.each(replys, function (item) { %>
|
2021-03-17 17:08:47 +00:00
|
|
|
<% if (!item.get("hide")) { %>
|
|
|
|
<% if (add_arrow) { add_arrow = false; %>
|
|
|
|
<div class="reply-arrow img-commonctrl"></div>
|
|
|
|
<% } %>
|
2016-03-11 00:48:53 +00:00
|
|
|
<div class="reply-item-ct">
|
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("editTextInPopover")) { %>
|
2018-05-08 08:14:43 +00:00
|
|
|
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(item.get("reply"))%></div>
|
2016-03-11 00:48:53 +00:00
|
|
|
<% if (!hint) { %>
|
|
|
|
<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>
|
2021-02-04 09:39:56 +00:00
|
|
|
<%}%>
|
|
|
|
<% if (item.get("removable")) { %>
|
|
|
|
<div class="btn-delete img-commonctrl" data-value="<%=item.get("id")%>"></div>
|
2017-04-11 13:43:31 +00:00
|
|
|
<%}%>
|
2016-03-11 00:48:53 +00:00
|
|
|
</div>
|
|
|
|
<%}%>
|
|
|
|
<% } else { %>
|
|
|
|
<div class="inner-edit-ct">
|
2019-03-21 08:39:32 +00:00
|
|
|
<textarea class="msg-reply textarea-fix user-select" maxlength="maxCommLength" spellcheck="false"><%=item.get("reply")%></textarea>
|
2016-03-11 00:48:53 +00:00
|
|
|
<button class="btn normal dlg-btn primary btn-inner-edit btn-fix" id="id-comments-change-popover">textEdit</button>
|
|
|
|
<button class="btn normal dlg-btn btn-inner-close">textClose</button>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
2021-03-17 17:08:47 +00:00
|
|
|
</div>
|
|
|
|
<% } %>
|
2016-03-11 00:48:53 +00:00
|
|
|
<% }); %>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<!-- add reply button -->
|
|
|
|
|
|
|
|
<% if (!showReplyInPopover && !hideAddReply && !hint) { %>
|
2021-03-17 17:08:47 +00:00
|
|
|
<% if (replys.length && !add_arrow) { %>
|
2016-03-11 00:48:53 +00:00
|
|
|
<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 -->
|
|
|
|
|
|
|
|
<% if (!editTextInPopover && !lock && !hint) { %>
|
|
|
|
<div class="edit-ct">
|
2017-04-11 13:43:31 +00:00
|
|
|
<% if (editable) { %>
|
|
|
|
<div class="btn-edit img-commonctrl"></div>
|
2021-02-04 09:39:56 +00:00
|
|
|
<% } %>
|
|
|
|
<% if (removable) { %>
|
2019-03-18 11:09:16 +00:00
|
|
|
<div class="btn-delete img-commonctrl"></div>
|
2017-04-11 13:43:31 +00:00
|
|
|
<% } %>
|
2021-03-17 09:02:06 +00:00
|
|
|
<% if (editable) { %>
|
2021-01-06 15:49:55 +00:00
|
|
|
<div class="btn-resolve <% if (resolved) print('comment-resolved') %>" data-toggle="tooltip"></div>
|
2021-03-17 09:02:06 +00:00
|
|
|
<% } %>
|
2016-03-11 00:48:53 +00:00
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<!-- reply -->
|
|
|
|
|
|
|
|
<% if (showReplyInPopover) { %>
|
|
|
|
<div class="reply-ct">
|
2019-03-21 08:39:32 +00:00
|
|
|
<textarea class="msg-reply user-select" placeholder="textAddReply" maxlength="maxCommLength" spellcheck="false"></textarea>
|
2016-03-11 00:48:53 +00:00
|
|
|
<button class="btn normal dlg-btn primary btn-reply" id="id-comments-change-popover">textReply</button>
|
|
|
|
<button class="btn normal dlg-btn btn-close">textClose</button>
|
|
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
|
|
|
|
<!-- locked user -->
|
|
|
|
|
|
|
|
<% if (lock) { %>
|
|
|
|
<div class="lock-area" style="cursor: default;"></div>
|
|
|
|
<div class="lock-author" style="cursor: default;"><%=lockuserid%></div>
|
|
|
|
<% } %>
|
|
|
|
|
2021-03-17 17:08:47 +00:00
|
|
|
</div>
|
|
|
|
<% } %>
|