Files
DocumentServer-v-9.2.0/web-apps/apps/common/main/lib/template/CommentsPopover.template
Yajbir Singh f1b860b25c
Some checks failed
check / markdownlint (push) Has been cancelled
check / spellchecker (push) Has been cancelled
updated
2025-12-11 19:03:17 +05:30

128 lines
6.3 KiB
Plaintext

<% if (!hide) { %>
<div id="<%=id%>" class="user-comment-item">
<!-- comment block -->
<div class="user-info">
<div class="color"
<% if (avatar) { %>
style="background-image: url(<%=avatar%>); <% if (usercolor!==null) { %> border-color:<%=usercolor%>; border-style:solid;<% }%>"
<% } else { %>
style="background-color: <% if (usercolor!==null) { %> <%=usercolor%> <% } else { %> #cfcfcf <% }%>;"
<% } %>
><% if (!avatar) { %><%-initials%><% } %></div>
<div class="user-info-text">
<div class="user-name"><%= scope.getEncodedName(parsedName) %></div>
<div class="user-date"><%=date%></div>
</div>
</div>
<% if (!editTextInPopover || (hint && !fullInfoInHint) || scope.viewmode) { %>
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(comment)%></div>
<% } else { %>
<div class="inner-edit-ct">
<textarea class="msg-reply user-select" maxlength="maxCommLength" spellcheck="false" <% if (!!dummy) { %> placeholder="textMentionComment"<% } %> aria-label="textComment"><%=comment%></textarea>
<% 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 -->
<% var add_arrow = true; %>
<% if (replys.length) { %>
<% _.each(replys, function (item) { %>
<% if (!item.get("hide")) { %>
<% if (add_arrow) { add_arrow = false; %>
<div class="reply-arrow img-commonctrl"></div>
<% } %>
<div class="reply-item-ct">
<div class="user-info">
<div class="color"
<% if (item.get("avatar")) { %>
style="background-image: url(<%=item.get('avatar')%>); <% if (item.get('usercolor')!==null) { %> border-color:<%=item.get('usercolor')%>; border-style:solid;<% }%>"
<% } else { %>
style="background-color: <% if (item.get('usercolor')!==null) { %> <%=item.get('usercolor')%> <% } else { %> #cfcfcf <% }%>;"
<% } %>
><% if (!item.get("avatar")) { %><%-item.get("initials")%><% } %></div>
<div class="user-info-text">
<div class="user-name"><%= scope.getEncodedName(item.get("parsedName")) %></div>
<div class="user-date"><%=item.get("date")%></div>
</div>
</div>
<% if (!item.get("editTextInPopover")) { %>
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(item.get("reply"))%></div>
<% if ((fullInfoInHint || !hint) && !scope.viewmode) { %>
<div class="btns-reply-ct">
<% if (item.get("editable")) { %>
<div class="btn-edit-common img-commonctrl" data-value="<%=item.get("id")%>"></div>
<%}%>
<% if (item.get("removable")) { %>
<div class="btn-delete img-commonctrl" data-value="<%=item.get("id")%>"></div>
<%}%>
</div>
<%}%>
<% } else { %>
<div class="inner-edit-ct">
<textarea class="msg-reply textarea-fix user-select" maxlength="maxCommLength" spellcheck="false" aria-label="textReply"><%=item.get("reply")%></textarea>
<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>
<% } %>
</div>
<% } %>
<% }); %>
<% } %>
<!-- add reply button -->
<% if (!showReplyInPopover && !hideAddReply && (fullInfoInHint || !hint) && !scope.viewmode) { %>
<% if (replys.length && !add_arrow) { %>
<label class="user-reply with-reply" role="presentation" tabindex="-1">textAddReply</label>
<% } else { %>
<label class="user-reply" role="presentation" tabindex="-1">textAddReply</label>
<% } %>
<% } %>
<!-- edit buttons -->
<% if (!editTextInPopover && !lock) { %>
<div class="edit-ct">
<% if ((fullInfoInHint || !hint) && !scope.viewmode) { %>
<% if (editable) { %>
<div class="btn-edit-common img-commonctrl"></div>
<% } %>
<% if (removable) { %>
<div class="btn-delete img-commonctrl"></div>
<% } %>
<% } %>
<% if (editable && (fullInfoInHint || !hint) && !scope.viewmode) { %>
<div class="btn-resolve <% if (resolved) print('img-commonctrl comment-resolved') %>" data-toggle="tooltip"></div>
<% } else if ((fullInfoInHint || !hint) && (!editable || scope.viewmode) && resolved) { %>
<div class="icon-resolve i-comment-resolved img-commonctrl" data-toggle="tooltip"></div>
<% } %>
</div>
<% } %>
<!-- reply -->
<% if (showReplyInPopover) { %>
<div class="reply-ct">
<textarea class="msg-reply user-select" placeholder="textMentionReply" maxlength="maxCommLength" spellcheck="false" aria-label="textReply"></textarea>
<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>
<% } %>
</div>
<% } %>