|
|
@ -170,7 +170,7 @@ export class BoardVersionActionService implements BoardActionService { |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Lock version
|
|
|
|
// Lock version
|
|
|
|
hidden: !version.isOpen(), |
|
|
|
hidden: !version.isOpen() || (version.isLocked() && !version.$links.update), |
|
|
|
linkText: this.I18n.t('js.boards.version.lock_version'), |
|
|
|
linkText: this.I18n.t('js.boards.version.lock_version'), |
|
|
|
onClick: () => { |
|
|
|
onClick: () => { |
|
|
|
this.patchVersionStatus(version, 'locked'); |
|
|
|
this.patchVersionStatus(version, 'locked'); |
|
|
@ -179,7 +179,7 @@ export class BoardVersionActionService implements BoardActionService { |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Unlock version
|
|
|
|
// Unlock version
|
|
|
|
hidden: !version.isLocked(), |
|
|
|
hidden: !version.isLocked() || (version.isOpen() && !version.$links.update), |
|
|
|
linkText: this.I18n.t('js.boards.version.unlock_version'), |
|
|
|
linkText: this.I18n.t('js.boards.version.unlock_version'), |
|
|
|
onClick: () => { |
|
|
|
onClick: () => { |
|
|
|
this.patchVersionStatus(version, 'open'); |
|
|
|
this.patchVersionStatus(version, 'open'); |
|
|
@ -188,7 +188,7 @@ export class BoardVersionActionService implements BoardActionService { |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Close version
|
|
|
|
// Close version
|
|
|
|
hidden: version.isClosed(), |
|
|
|
hidden: version.isClosed() || (!version.isClosed() && !version.$links.update), |
|
|
|
linkText: this.I18n.t('js.boards.version.close_version'), |
|
|
|
linkText: this.I18n.t('js.boards.version.close_version'), |
|
|
|
onClick: () => { |
|
|
|
onClick: () => { |
|
|
|
this.patchVersionStatus(version, 'closed'); |
|
|
|
this.patchVersionStatus(version, 'closed'); |
|
|
@ -197,13 +197,26 @@ export class BoardVersionActionService implements BoardActionService { |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Open version
|
|
|
|
// Open version
|
|
|
|
hidden: !version.isClosed(), |
|
|
|
hidden: !version.isClosed() || (version.isClosed() && !version.$links.update), |
|
|
|
linkText: this.I18n.t('js.boards.version.open_version'), |
|
|
|
linkText: this.I18n.t('js.boards.version.open_version'), |
|
|
|
onClick: () => { |
|
|
|
onClick: () => { |
|
|
|
this.patchVersionStatus(version, 'open'); |
|
|
|
this.patchVersionStatus(version, 'open'); |
|
|
|
return true; |
|
|
|
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
|
|
|
|
// Edit link
|
|
|
|
hidden: !version.$links.update, |
|
|
|
hidden: !version.$links.update, |
|
|
|