Skip to content

Commit 66ebbe5

Browse files
committed
Allow hiding complete task checkbox
1 parent 62966db commit 66ebbe5

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

src/Resources/views/macros.html.twig

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -979,18 +979,30 @@
979979
<div class="entity-profile-frame-title-box-container">
980980
<div class="entity-profile-frame-title-box">
981981
{% if links.complete_toggle|default(false) %}
982-
<div class="entity-profile-frame-complete-toggle task-check-box checkbox">
983-
<label class="task-check-box-container <% if (isComplete) { %>is-completed<% } %>">
984-
<input type="checkbox" value="<%- id %>" class="checkbox-input js-complete-item" <% if (isComplete) { %>checked="checked"<% } %> data-endpoint="{{ links.complete_toggle|replace({'__ID__': '<%- id %>', '__RID__': '<%- relatedId %>'})|raw }}" />
985-
<span class="task-check-box-checkbox">
986-
<i class="ledger-icons ledger-icon-check-circle checked"></i>
987-
<i class="ledger-icons ledger-icon-circle-o unchecked"></i>
988-
</span>
989-
<div class="task-check-box-activity-icon">
990-
<i class="ledger-icons ledger-icon-check-circle"></i>
991-
</div>
992-
</label>
993-
</div>
982+
<% if (!hideComplete) { %>
983+
<div class="entity-profile-frame-complete-toggle task-check-box checkbox">
984+
<label class="task-check-box-container <% if (isComplete) { %>is-completed<% } %>">
985+
<input type="checkbox" value="<%- id %>" class="checkbox-input js-complete-item" <% if (isComplete) { %>checked="checked"<% } %> data-endpoint="{{ links.complete_toggle|replace({'__ID__': '<%- id %>', '__RID__': '<%- relatedId %>'})|raw }}" />
986+
<span class="task-check-box-checkbox">
987+
<i class="ledger-icons ledger-icon-check-circle checked"></i>
988+
<i class="ledger-icons ledger-icon-circle-o unchecked"></i>
989+
</span>
990+
<div class="task-check-box-activity-icon">
991+
<i class="ledger-icons ledger-icon-check-circle"></i>
992+
</div>
993+
</label>
994+
</div>
995+
<% } else { %>
996+
<div class="entity-profile-frame-title-icon">
997+
<% if (photo) { %>
998+
{{ UI.profileImageComponentImage('__PHOTO__')|replace({'/__PHOTO__': '<%- photo %>'})|raw }}
999+
<% } else if (initials) { %>
1000+
{{ UI.profileImageComponentInitials('__INITIALS__')|replace({'__INITIALS__': '<%- initials %>'})|raw }}
1001+
<% } else { %>
1002+
{{ UI.profileImageComponentIcon('__ICON__')|replace({'__ICON__': '<%- icon %>'})|raw }}
1003+
<% } %>
1004+
</div>
1005+
<% } %>
9941006
{% else %}
9951007
<div class="entity-profile-frame-title-icon">
9961008
{% if links.update_photo|default(false) %}

0 commit comments

Comments
 (0)