mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Keep the flat table as the default and let each user persist an optional grouped mode. Group cards in board swimlane order, preserve the selected column sort inside each lane, and insert section rows after pagination so headers never consume card slots. Add user-isolation, empty-state, section-boundary and browser persistence coverage. Thanks to rmb82 and xet7 ! Fixes #6634,
132 lines
6.3 KiB
Plaintext
132 lines
6.3 KiB
Plaintext
template(name="tableView")
|
|
if currentBoard
|
|
.wrapper
|
|
.table-view-controls
|
|
.table-view-search-box
|
|
input.js-table-view-search(type="text" placeholder="{{_ 'search'}}" aria-label="{{_ 'search'}}")
|
|
button.js-table-view-search-button(type="button")
|
|
i.fa.fa-search
|
|
| {{_ 'search'}}
|
|
.table-view-pagination
|
|
button.js-table-view-prev-page(type="button" class="{{#unless hasPrevPage}}disabled{{/unless}}" aria-label="{{_ 'previous'}}")
|
|
i.fa.fa-chevron-left
|
|
span.table-view-page-info {{currentPage}} / {{totalPages}}
|
|
button.js-table-view-next-page(type="button" class="{{#unless hasNextPage}}disabled{{/unless}}" aria-label="{{_ 'next'}}")
|
|
i.fa.fa-chevron-right
|
|
button.js-table-view-toggle-card-title-wrap(type="button" class="{{#if wrapCardTitles}}active{{/if}}" title="{{_ 'card'}}" aria-label="{{_ 'card'}}" aria-pressed="{{wrapCardTitles}}")
|
|
i.fa(class="{{#if wrapCardTitles}}fa-align-left{{else}}fa-ellipsis-h{{/if}}")
|
|
button.js-table-view-toggle-swimlane-groups(type="button" class="{{#if groupBySwimlane}}active{{/if}}" title="{{_ 'swimlane'}}" aria-label="{{_ 'swimlane'}}" aria-pressed="{{groupBySwimlane}}")
|
|
i.fa(class="{{#if groupBySwimlane}}fa-object-group{{else}}fa-list{{/if}}")
|
|
table.my-cards-board-table.table-view-table(class="{{#if wrapCardTitles}}table-view-wrap-card-titles{{else}}table-view-ellipsis-card-titles{{/if}}")
|
|
caption.sr-only {{currentBoard.title}}
|
|
thead
|
|
tr
|
|
th(scope="col")
|
|
th(scope="col")
|
|
button.js-table-view-sort(type="button" data-field="title")
|
|
| {{_ "card"}}
|
|
i.fa(class="{{sortIcon 'title'}}")
|
|
th(scope="col")
|
|
button.js-table-view-sort(type="button" data-field="listTitle")
|
|
| {{_ "list"}}
|
|
i.fa(class="{{sortIcon 'listTitle'}}")
|
|
th(scope="col")
|
|
button.js-table-view-sort(type="button" data-field="swimlaneTitle")
|
|
| {{_ "swimlane"}}
|
|
i.fa(class="{{sortIcon 'swimlaneTitle'}}")
|
|
unless isMiniScreen
|
|
th(scope="col")
|
|
button.js-table-view-sort(type="button" data-field="assigneesKey") {{_ "assignees"}}
|
|
th(scope="col")
|
|
button.js-table-view-sort(type="button" data-field="membersKey") {{_ "members"}}
|
|
th(scope="col")
|
|
button.js-table-view-sort(type="button" data-field="labelsKey") {{_ "labels"}}
|
|
if showReceivedColumn
|
|
th(scope="col")
|
|
button.js-table-view-sort(type="button" data-field="receivedAt") {{_ "card-received"}}
|
|
if showStartColumn
|
|
th(scope="col")
|
|
button.js-table-view-sort(type="button" data-field="startAt") {{_ "card-start"}}
|
|
if showDueColumn
|
|
th(scope="col")
|
|
button.js-table-view-sort(type="button" data-field="dueAt") {{_ "card-due"}}
|
|
if showEndColumn
|
|
th(scope="col")
|
|
button.js-table-view-sort(type="button" data-field="endAt") {{_ "card-end"}}
|
|
tbody
|
|
each row in rows
|
|
if row.isGroupHeader
|
|
tr.table-view-swimlane-group
|
|
th(colspan="11" scope="rowgroup")= row.swimlaneTitle
|
|
else
|
|
tr
|
|
td.table-view-cell-edit
|
|
a.edit-card.js-table-view-edit-card(href=row.card.originRelativeUrl data-card-id=row.card._id title="{{_ 'edit'}}")
|
|
i.fa.fa-pencil-square-o
|
|
| {{_ 'edit'}}
|
|
td.table-view-cell-wrap.table-view-cell-card-title(title=row.title)
|
|
unless isMiniScreen
|
|
.my-cards-board-badge(class=row.colorClass)
|
|
.my-cards-card-title-table
|
|
+viewer
|
|
= row.title
|
|
td.table-view-cell-wrap
|
|
+viewer
|
|
= row.listTitle
|
|
td.table-view-cell-wrap
|
|
+viewer
|
|
= row.swimlaneTitle
|
|
unless isMiniScreen
|
|
td
|
|
.div
|
|
each assignee in row.card.getAssignees
|
|
a.name
|
|
+userAvatar(userId=assignee noRemove=true)
|
|
td
|
|
.div
|
|
each member in row.card.getMembers
|
|
a.name
|
|
+userAvatar(userId=member noRemove=true)
|
|
td.table-view-cell-labels
|
|
.div
|
|
each label in row.labels
|
|
span.card-label(class="{{labelColorClass label.color}}" style="{{labelColorStyle label.color}}" title="{{label.name}}")
|
|
+viewer
|
|
= label.name
|
|
if showReceivedColumn
|
|
td.table-view-cell-date
|
|
with row.card
|
|
if getReceived
|
|
+cardReceivedDate
|
|
else
|
|
if canModifyCard
|
|
a.card-label.add-label.js-received-date(title="{{_ 'card-received'}}")
|
|
i.fa.fa-plus
|
|
if showStartColumn
|
|
td.table-view-cell-date
|
|
with row.card
|
|
if getStart
|
|
+cardStartDate
|
|
else
|
|
if canModifyCard
|
|
a.card-label.add-label.js-start-date(title="{{_ 'card-start'}}")
|
|
i.fa.fa-plus
|
|
if showDueColumn
|
|
td.table-view-cell-date
|
|
with row.card
|
|
if getDue
|
|
+cardDueDate
|
|
else
|
|
if canModifyCard
|
|
a.card-label.add-label.js-due-date(title="{{_ 'card-due'}}")
|
|
i.fa.fa-plus
|
|
if showEndColumn
|
|
td.table-view-cell-date
|
|
with row.card
|
|
if getEnd
|
|
+cardEndDate
|
|
else
|
|
if canModifyCard
|
|
a.card-label.add-label.js-end-date(title="{{_ 'card-end'}}")
|
|
i.fa.fa-plus
|