web-apps/apps/common/main/lib/template/CommentsPopover.template

110 lines
5.2 KiB
Plaintext
Raw Normal View History

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 -->
<div class="user-name">
2021-07-06 20:24:44 +00:00
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(parsedName) %>
</div>
2016-03-11 00:48:53 +00:00
<div class="user-date"><%=date%></div>
<% if (!editTextInPopover || hint || scope.viewmode) { %>
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">
<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">
<div class="user-name">
2021-07-06 20:24:44 +00:00
<div class="color" style="display: inline-block; background-color: <% if (item.get("usercolor")!==null) { %><%=item.get("usercolor")%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(item.get("parsedName")) %>
</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>
<% if (!hint && !scope.viewmode) { %>
2016-03-11 00:48:53 +00:00
<div class="btns-reply-ct">
<% if (item.get("editable")) { %>
<div class="btn-edit img-commonctrl" data-value="<%=item.get("id")%>"></div>
<%}%>
<% if (item.get("removable")) { %>
<div class="btn-delete img-commonctrl" data-value="<%=item.get("id")%>"></div>
<%}%>
2016-03-11 00:48:53 +00:00
</div>
<%}%>
<% } else { %>
<div class="inner-edit-ct">
<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 && !scope.viewmode) { %>
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 -->
2021-09-02 12:44:11 +00:00
<% if (!editTextInPopover && !lock) { %>
2016-03-11 00:48:53 +00:00
<div class="edit-ct">
<% if (!hint && !scope.viewmode) { %>
2021-09-02 12:44:11 +00:00
<% if (editable) { %>
<div class="btn-edit img-commonctrl"></div>
<% } %>
<% if (removable) { %>
<div class="btn-delete img-commonctrl"></div>
<% } %>
<% } %>
<% if (editable && !hint && !scope.viewmode) { %>
2021-09-02 12:44:11 +00:00
<div class="btn-resolve <% if (resolved) print('comment-resolved') %>" data-toggle="tooltip"></div>
<% } else if (!hint && (!editable || scope.viewmode) && resolved) { %>
<div class="icon-resolve i-comment-resolved" data-toggle="tooltip"></div>
<% } %>
2016-03-11 00:48:53 +00:00
</div>
<% } %>
<!-- reply -->
<% if (showReplyInPopover) { %>
<div class="reply-ct">
<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>
<% } %>