mirror of
https://github.com/wekan/wekan.git
synced 2026-02-03 15:11:48 +01:00
Merge pull request #3635 from Majed6/originRelativeUrl
Fixed Bug: inconsistent use of relative/absolute URLs
This commit is contained in:
commit
e7d7ddd698
10 changed files with 30 additions and 15 deletions
|
|
@ -777,6 +777,9 @@ Boards.helpers({
|
|||
absoluteUrl() {
|
||||
return FlowRouter.url('board', { id: this._id, slug: this.slug });
|
||||
},
|
||||
originRelativeUrl() {
|
||||
return FlowRouter.path('board', { id: this._id, slug: this.slug });
|
||||
},
|
||||
|
||||
colorClass() {
|
||||
return `board-color-${this.color}`;
|
||||
|
|
|
|||
|
|
@ -758,6 +758,14 @@ Cards.helpers({
|
|||
cardId: this._id,
|
||||
});
|
||||
},
|
||||
originRelativeUrl() {
|
||||
const board = this.board();
|
||||
return FlowRouter.path('card', {
|
||||
boardId: board._id,
|
||||
slug: board.slug,
|
||||
cardId: this._id,
|
||||
});
|
||||
},
|
||||
|
||||
canBeRestored() {
|
||||
const list = Lists.findOne({
|
||||
|
|
|
|||
|
|
@ -280,6 +280,10 @@ Lists.helpers({
|
|||
const card = Cards.findOne({ listId: this._id });
|
||||
return card && card.absoluteUrl();
|
||||
},
|
||||
originRelativeUrl() {
|
||||
const card = Cards.findOne({ listId: this._id });
|
||||
return card && card.originRelativeUrl();
|
||||
},
|
||||
remove() {
|
||||
Lists.remove({ _id: this._id });
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue