Shared Templates. In Progress.

Part 3:
- Template container titles "Card/List/Board Templates" automatically
  translated.

Thanks to xet7 !

Related #3313
This commit is contained in:
Lauri Ojansivu 2021-06-16 19:59:59 +03:00
parent 2dca6e8e7c
commit 7f17bc9fb0
3 changed files with 22 additions and 8 deletions

View file

@ -1,6 +1,9 @@
template(name="boardHeaderBar")
h1.header-board-menu
with currentBoard
if $eq title 'Templates'
| {{_ 'templates'}}
else
+viewer
= title

View file

@ -225,7 +225,8 @@ const CreateBoard = BlazeComponent.extendComponent({
this.boardId.set(
Boards.insert({
title: TAPi18n.__('templates'),
// title: TAPi18n.__('templates'),
title: title,
permission: 'private',
type: 'template-container',
}),
@ -233,7 +234,8 @@ const CreateBoard = BlazeComponent.extendComponent({
// Insert the card templates swimlane
Swimlanes.insert({
title: TAPi18n.__('card-templates-swimlane'),
// title: TAPi18n.__('card-templates-swimlane'),
title: 'Card Templates',
boardId: this.boardId.get(),
sort: 1,
type: 'template-container',
@ -242,7 +244,8 @@ const CreateBoard = BlazeComponent.extendComponent({
// Insert the list templates swimlane
Swimlanes.insert(
{
title: TAPi18n.__('list-templates-swimlane'),
// title: TAPi18n.__('list-templates-swimlane'),
title: 'List Templates',
boardId: this.boardId.get(),
sort: 2,
type: 'template-container',
@ -252,7 +255,8 @@ const CreateBoard = BlazeComponent.extendComponent({
// Insert the board templates swimlane
Swimlanes.insert(
{
title: TAPi18n.__('board-templates-swimlane'),
//title: TAPi18n.__('board-templates-swimlane'),
title: 'Board Templates',
boardId: this.boardId.get(),
sort: 3,
type: 'template-container',

View file

@ -11,6 +11,13 @@ template(name="swimlaneHeader")
template(name="swimlaneFixedHeader")
.swimlane-header(
class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
if $eq title 'Card Templates'
| {{_ 'card-templates-swimlane'}}
else if $eq title 'List Templates'
| {{_ 'list-templates-swimlane'}}
else if $eq title 'Board Templates'
| {{_ 'board-templates-swimlane'}}
else
+viewer
= title
.swimlane-header-menu