wekan/client/components/main/myCards.jade
Majed6 b4e343369a
Fixed Bug: inconsistent use of relative/absolute URLs
Some pages use relative links such as boards link at the home page.
 Others use absolute url such as cards in boards' lists.
 This commits goal is to allow for consistent use of relative
  urls.

Origin relative URLs also helps decoupling Wekan from the infrastructure
 it's deployed on. i.e if it's being served, it should work.
2021-03-05 15:05:53 +03:00

73 lines
2.4 KiB
Text

template(name="myCardsHeaderBar")
if currentUser
h1
//a.back-btn(href="{{pathFor 'home'}}")
// i.fa.fa-chevron-left
i.fa.fa-list
| {{_ 'my-cards'}}
.board-header-btns.left
a.board-header-btn.js-toggle-my-cards-choose-sort(title="{{_ 'myCardsSortChange-title'}}")
i.fa.fa-caret-down
if $eq myCardsSort 'board'
i.fa.fa-th-large
| {{_ 'myCardsSortChange-choice-board'}}
if $eq myCardsSort 'dueAt'
i.fa.fa-calendar
| {{_ 'myCardsSortChange-choice-dueat'}}
template(name="myCardsModalTitle")
if currentUser
h2
i.fa.fa-keyboard-o
| {{_ 'my-cards'}}
template(name="myCards")
if currentUser
if isPageReady.get
.wrapper
if $eq myCardsSort 'board'
each board in myCardsList
.my-cards-board-wrapper
.my-cards-board-title(class=board.colorClass, id="header")
a(href=board.originRelativeUrl)
+viewer
= board.title
each swimlane in board.mySwimlanes
.my-cards-swimlane-title(class="{{#if swimlane.colorClass}}{{ swimlane.colorClass }}{{else}}swimlane-default-color{{/if}}")
+viewer
= swimlane.title
each list in swimlane.myLists
.my-cards-list-wrapper
.my-cards-list-title(class=list.colorClass)
+viewer
= list.title
each card in list.myCards
.my-cards-card-wrapper
a.minicard-wrapper(href=card.originRelativeUrl)
+minicard(card)
else
.my-cards-dueat-list-wrapper
each card in myDueCardsList
+resultCard(card)
else
+spinner
template(name="myCardsSortChangePopup")
if currentUser
ul.pop-over-list
li
with "my-cards-sort-board"
a.js-my-cards-sort-board
i.fa.fa-th-large.colorful
| {{_ 'myCardsSortChange-choice-board'}}
if $eq Utils.myCardsSort "board"
i.fa.fa-check
hr
li
with "my-cards-sort-dueat"
a.js-my-cards-sort-dueat
i.fa.fa-calendar.colorful
| {{_ 'myCardsSortChange-choice-dueat'}}
if $eq Utils.myCardsSort "dueAt"
i.fa.fa-check