Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dspace7 Angular
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vtechworks
Dspace7 Angular
Commits
7914e1cf
Commit
7914e1cf
authored
6 years ago
by
Kristof De Langhe
Browse files
Options
Downloads
Patches
Plain Diff
56434: docs for entity-type-switcher
parent
29e60f2b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/shared/entities/switcher/entity-type-switcher.component.ts
+18
-0
18 additions, 0 deletions
...hared/entities/switcher/entity-type-switcher.component.ts
with
18 additions
and
0 deletions
src/app/shared/entities/switcher/entity-type-switcher.component.ts
+
18
−
0
View file @
7914e1cf
...
...
@@ -13,9 +13,23 @@ export const ITEM: InjectionToken<string> = new InjectionToken<string>('item');
styleUrls
:
[
'
./entity-type-switcher.component.scss
'
],
templateUrl
:
'
./entity-type-switcher.component.html
'
})
/**
* Component for determining what component to use depending on the item's relationship type (relationship.type)
*/
export
class
EntityTypeSwitcherComponent
implements
OnInit
{
/**
* The item to determine the component for
*/
@
Input
()
object
:
Item
|
SearchResult
<
Item
>
;
/**
* The preferred view-mode to display
*/
@
Input
()
viewMode
:
ElementViewMode
;
/**
* The object injector used to inject the item into the child component
*/
objectInjector
:
Injector
;
constructor
(
private
injector
:
Injector
)
{
...
...
@@ -29,6 +43,10 @@ export class EntityTypeSwitcherComponent implements OnInit {
}
/**
* Fetch the component depending on the item's relationship type
* @returns {string}
*/
getComponent
():
string
{
let
item
:
Item
;
if
(
hasValue
((
this
.
object
as
any
).
dspaceObject
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment