section.history
    ul.history-tabs
        li
            a(href="#", class="active", data-section-class="history-comments")
                span.icon.icon-comment
                span.tab-title(translate="COMMENTS.TITLE")
        li
            a(href="#", data-section-class="history-activity")
                span.icon.icon-issues
                span.tab-title(translate="ACTIVITY.TITLE")
    section.history-comments
        .comments-list
        div(tg-check-permission!="modify_<%- type %>", tg-toggle-comment, class="add-comment")
            textarea(ng-attr-placeholder="{{'COMMENTS.TYPE_NEW_COMMENT' | translate}}", ng-model!="<%- ngmodel %>.comment", tg-markitup="tg-markitup")
            <% if (mode !== "edit") { %>
            a(class="help-markdown", href="https://taiga.io/support/taiga-markdown-syntax/", target="_blank", title="{{'COMMON.WYSIWYG.MARKDOWN_HELP' | translate}}")
                span.icon.icon-help
                span(translate="COMMON.WYSIWYG.MARKDOWN_HELP")
            button(type="button", ng-disabled!="!<%- ngmodel %>.comment.length" title="{{'COMMENTS.COMMENT' | translate}}", translate="COMMENTS.COMMENT", class="button button-green save-comment")
            <% } %>
    section.history-activity.hidden
        .changes-list

section.history(tg-check-permission!="modify_<%- type %>")
    ul.history-tabs
        li
            a(href="#", class="active", data-section-class="history-comments")
                span.icon.icon-comment
                span.tab-title(translate="COMMENTS.TITLE")
        li
            a(href="#", data-section-class="history-activity")
                span.icon.icon-issues
                span.tab-title(translate="ACTIVITY.TITLE")
    section.history-comments
        .comments-list
        div(tg-toggle-comment, class="add-comment")
            textarea(ng-attr-placeholder="{{'COMMENTS.TYPE_NEW_COMMENT' | translate}}", ng-model!="<%- ngmodel %>.comment", tg-markitup="tg-markitup")
            <% if (mode !== "edit") { %>
            a(class="help-markdown", href="https://taiga.io/support/taiga-markdown-syntax/", target="_blank", title="{{'COMMON.WYSIWYG.MARKDOWN_HELP' | translate}}")
                span.icon.icon-help
                span(translate="COMMON.WYSIWYG.MARKDOWN_HELP")
            button(type="button", ng-disabled!="!<%- ngmodel %>.comment.length" title="{{'COMMENTS.COMMENT' | translate}}", translate="COMMENTS.COMMENT", class="button button-green save-comment")
            <% } %>
    section.history-activity.hidden
        .changes-list

Hide history and comments if user has no permissions
Hide history and comments if user has no permissions
