Files
wekan/client/components/boards/columnSetsView.jade
T
Lauri Ojansivu 03d0144538 Column sets: the same cards in several named sets of columns.
A new board view, Column sets. A board keeps named column sets - say
Completion, Priority, Milestone - each with its own coloured columns, and
every card is in one column of each set, or "Not placed". Picking a set
shows its columns; dragging a card to another column changes only where
it is in that set - its list, swimlane, labels and members stay - and
each card shows, as coloured labels, its column in the other sets, as the
issue asked. Board admins make and delete sets and columns; moving cards
needs the right to edit a card. Clicking a title opens the card.

Registered like every view: the Board View menu (appended after Version
Control), the default order and VIEWS_ADDED_LATER, the user's boardView
values and the API description, and an instance feature group so the
Admin Panel can turn it off. models/lib/columnSets.js holds the logic;
tests/columnSets.test.cjs covers places, removed columns, the other
sets' badges, foreign columns, dotted keys and the bounds, and
boardViewMenu / boardViewSettings now expect the view last. A Meteor run
started with the new fields. Documented in
docs/Features/Board/Column-Sets.md. The new strings are English
placeholders until the next translation pass.

Thanks to kentonv and xet7 !

Fixes #211.
2026-10-14 15:48:42 +03:00

45 lines
2.1 KiB
Plaintext

//- #211: the same cards in several named column sets (models/lib/columnSets.js).
Pick a set; drag a card to another column to change its place in that set
only. Each card shows its column in the other sets.
template(name="columnSetsView")
.column-sets-view
.column-sets-toolbar
if columnSets.length
select.js-column-set-select(aria-label="{{_ 'column-sets'}}")
each columnSets
option(value=_id selected=isCurrentSet) {{name}}
if isBoardAdmin
form.js-add-column-set
input.js-column-set-name(type="text" maxlength="60" placeholder="{{_ 'column-set-new'}}" aria-label="{{_ 'column-set-new'}}")
button.js-add-column-set-button(type="submit") {{_ 'add'}}
if currentSet
form.js-add-column
input.js-column-title(type="text" maxlength="60" placeholder="{{_ 'column-new'}}" aria-label="{{_ 'column-new'}}")
select.js-column-color(aria-label="{{_ 'column-color'}}")
each colors
option(value=this) {{this}}
button.js-add-column-button(type="submit") {{_ 'add'}}
a.js-remove-column-set(title="{{_ 'column-set-remove'}}")
i.fa.fa-trash
if currentSet
.column-sets-columns
each columns
.column-sets-column.js-column-sets-drop(data-column-id=_id class="{{#if color}}card-label-{{color}}{{/if}}")
.column-sets-column-header
if title
| {{title}}
else
span.quiet {{_ 'column-not-placed'}}
span.quiet {{cards.length}}
if title
if isBoardAdmin
a.js-remove-column(data-column-id=_id title="{{_ 'column-remove'}}")
i.fa.fa-times
each cards
.column-sets-card.js-column-sets-card(draggable="{{#if canWrite}}true{{/if}}" data-card-id=_id)
a.js-column-sets-open-card(data-card-id=_id)= title
each otherBadges
span.card-label(class="card-label-{{color}}" title="{{setName}}") {{title}}
else
p.quiet {{_ 'column-sets-empty'}}