Commit Graph
2 Commits
Author SHA1 Message Date
Lauri Ojansivu 65621f44cc Card actions menu in the maintainer's order; Card Settings: Time under Date, Edit voting and Edit Planning Poker in the Voting pane, Select all centred under Draggable.
- The opened card's actions menu is one list, in this order: Move Card,
  Copy Card, Save as Template, Copy Template to Many Cards, Card
  recurrence, Move to Top, Move to Bottom, Watch, Star | Set color,
  Drawing | Copy link to clipboard, Link to board, QR code, History,
  Export, Import, Move Card to Archive, More. Each item keeps the
  permission it had; the two copies of the menu for the two kinds of
  member are one list (cardMenuWrites). tests/cardActionsOrder.test.cjs.
- Card Settings: Time is under Date in the left menu.
- Card Settings / Voting: Edit voting and Edit Planning Poker are the forms
  themselves, under the pane's title; saved there, Card Settings stays
  open, saved in their own popup (the section hamburgers) they step back.
- Select all / Unselect all are centred under their Draggable heading.

Thanks to xet7 !
2026-10-25 17:13:36 +02:00
Lauri Ojansivu bc25eee1ba Add "Save as Template" card action, and extract the shared Templates board
creation it reuses.

#2209 (a 2019 follow-up to #2165's template-feature checklist) asked for
"create template from element" - creating a template directly from an
existing board/list/card, rather than only from scratch. WeKan's own
"insert a card FROM a template" flow (searchElementPopup) already existed,
but nothing did the reverse: turning an existing card INTO a template.

The card menu now offers "Save as Template" beside "Copy Card". It posts
to a new saveCardAsTemplate server method that copies the card into the
user's own "Card Templates" swimlane (creating the personal Templates
board on first use, exactly as the existing default-board-template flow
already does), marking the copy type: 'template-card' so it behaves as a
template rather than an ordinary card.

The lazy per-user Templates board creation used to live only inline in
the ensureTemplatesBoard Meteor method; it is now exported as
ensureTemplatesBoardForUserId (server/models/users.js) so this new method
can call it directly server-side instead of duplicating the board/
swimlane setup.

#2209's other two sub-items were checked and are already handled:
"cards don't appear in swimlanes if the general swimlane is deleted"
(#1959) already has thorough startup-rescue coverage in
server/lib/schemaUpgradeSteps.js (the "swimlane-structure" step) plus
regression tests in tests/schemaUpgradeSteps.test.cjs, and "templated
users" was explicitly out of scope per the issue's own text.

Thanks to andresmanelli and xet7 !
2026-09-10 20:54:01 +03:00