|
|
|
@ -170,7 +170,7 @@ export class BoardVersionActionService implements BoardActionService { |
|
|
|
|
return [ |
|
|
|
|
{ |
|
|
|
|
// Lock version
|
|
|
|
|
hidden: !version.isOpen(), |
|
|
|
|
hidden: !version.isOpen() || (version.isLocked() && !version.$links.update), |
|
|
|
|
linkText: this.I18n.t('js.boards.version.lock_version'), |
|
|
|
|
onClick: () => { |
|
|
|
|
this.patchVersionStatus(version, 'locked'); |
|
|
|
@ -179,7 +179,7 @@ export class BoardVersionActionService implements BoardActionService { |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
// Unlock version
|
|
|
|
|
hidden: !version.isLocked(), |
|
|
|
|
hidden: !version.isLocked() || (version.isOpen() && !version.$links.update), |
|
|
|
|
linkText: this.I18n.t('js.boards.version.unlock_version'), |
|
|
|
|
onClick: () => { |
|
|
|
|
this.patchVersionStatus(version, 'open'); |
|
|
|
@ -188,7 +188,7 @@ export class BoardVersionActionService implements BoardActionService { |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
// Close version
|
|
|
|
|
hidden: version.isClosed(), |
|
|
|
|
hidden: version.isClosed() || (!version.isClosed() && !version.$links.update), |
|
|
|
|
linkText: this.I18n.t('js.boards.version.close_version'), |
|
|
|
|
onClick: () => { |
|
|
|
|
this.patchVersionStatus(version, 'closed'); |
|
|
|
@ -197,13 +197,26 @@ export class BoardVersionActionService implements BoardActionService { |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
// Open version
|
|
|
|
|
hidden: !version.isClosed(), |
|
|
|
|
hidden: !version.isClosed() || (version.isClosed() && !version.$links.update), |
|
|
|
|
linkText: this.I18n.t('js.boards.version.open_version'), |
|
|
|
|
onClick: () => { |
|
|
|
|
this.patchVersionStatus(version, 'open'); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
// Show link
|
|
|
|
|
linkText: this.I18n.t('js.boards.version.show_version'), |
|
|
|
|
href: this.pathHelper.versionShowPath(id), |
|
|
|
|
onClick: (evt:JQuery.Event) => { |
|
|
|
|
if (!LinkHandling.isClickedWithModifier(evt)) { |
|
|
|
|
window.open(this.pathHelper.versionShowPath(id), '_blank'); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
// Edit link
|
|
|
|
|
hidden: !version.$links.update, |
|
|
|
|