-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable Rapido 'not found' links (#6)
Conditionally hide the Rapido search results banner so that it does not display links to the resource sharing request form.
- Loading branch information
Showing
5 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./ngrs.module"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { PrmNgrsResultsButtonAfterComponent } from "./prm-ngrs-results-button-after.component"; | ||
|
||
export const NgrsModule = angular | ||
.module("ngrs", []) | ||
.component( | ||
"prmNgrsResultsButtonAfter", | ||
PrmNgrsResultsButtonAfterComponent | ||
).name; |
22 changes: 22 additions & 0 deletions
22
src/shared/components/search/full-view/ngrs/prm-ngrs-results-button-after.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
class PrmNgrsResultsButtonAfterController implements ng.IController { | ||
private parentCtrl: ng.IController; | ||
|
||
$onInit(): void { | ||
this.disableStillNotFoundLink(); | ||
} | ||
|
||
/** | ||
* By default, Rapido will display a link to a blank resource sharing | ||
* request form. This disables the link. | ||
*/ | ||
private disableStillNotFoundLink(): void { | ||
if (this.parentCtrl.isStillNotFoundRequired()) { | ||
this.parentCtrl.isRapidoLinksTileRequired = () => false; | ||
} | ||
} | ||
} | ||
|
||
export const PrmNgrsResultsButtonAfterComponent: ng.IComponentOptions = { | ||
controller: PrmNgrsResultsButtonAfterController, | ||
bindings: { parentCtrl: "<" }, | ||
}; |