Revision 49153
Added by Argiro Kokogiannaki over 6 years ago
linkingGeneric.component.ts | ||
---|---|---|
10 | 10 |
|
11 | 11 |
@Component({ |
12 | 12 |
selector: 'linking-generic', |
13 |
template: ` |
|
14 |
<div id="tm-main" class=" uk-section uk-margin-small-top tm-middle" > |
|
15 |
<div uk-grid uk-grid> |
|
16 |
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first "> |
|
13 |
templateUrl: 'linkingGeneric.component.html' |
|
17 | 14 |
|
18 |
<div class="uk-container uk-margin-top"> |
|
19 |
<div class="uk-article-title"> |
|
20 |
Link |
|
21 |
</div> |
|
22 |
|
|
23 |
<div class="uk-width-1-1"> |
|
24 |
<helper position="top"></helper> |
|
25 |
</div> |
|
26 |
<div class="uk-grid helper-grid"> |
|
27 |
<helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper> |
|
28 |
<div class="uk-width-expand"> |
|
29 |
|
|
30 |
<ul class="uk-breadcrumb"> |
|
31 |
<li [class]="(step==1)?'uk-active':''" ><a (click)="step=1;"><span class="step uk-text-large">1</span> Select Projects <span >or Communities <span ></span></span></a></li> |
|
32 |
<li [class]="(step==2)?'uk-active':''" ><a (click)="step=2;"><span class="step uk-text-large">2</span> Select Research Results <span ></span></a></li> |
|
33 |
<li [class]="(step==3)?'uk-active':''" (click)="step=3;"><a [class]="(results.length == 0)?'uk-disabled':''" (click)="show='claim';" ><span class="step uk-text-large">3</span> Review metadata</a></li> |
|
34 |
</ul> |
|
35 |
<!--start-over [results]="results" [contexts]="contexts" [projects]="projects" ></start-over--> |
|
36 |
<div class="uk-clearfix"> |
|
37 |
<a class="uk-float-right" uk-toggle="target: #selected; animation: uk-animation-fade"> |
|
38 |
<span class="uk-icon"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="my-box" x="0px" y="0px" width="28px" height="28px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"><g> <path d="M480,320v128H32V320h78.859l64.016,96h162.25l64-96H480 M384,32H128L0,288v192h512V288L384,32L384,32z M35.781,288l112-224 h216.438l112,224H384l-64,96H192l-64.016-96H35.781L35.781,288z" fill="#b5b5b5"/></g> |
|
39 |
</svg> |
|
40 |
</span> |
|
41 |
|
|
42 |
</a> |
|
43 |
</div> |
|
44 |
<div id="selected" class="uk-card uk-card-default uk-card-body uk-margin-small" hidden> |
|
45 |
<!--Close Button --> |
|
46 |
<!--div class="uk-clearfix"> |
|
47 |
<a uk-toggle="target: #selected; animation: uk-animation-fade" class="uk-float-right"> |
|
48 |
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="1"><path fill="none" stroke="#000" stroke-width="1.06" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.06" d="M16,4 L4,16"></path></svg> |
|
49 |
</span></a> |
|
50 |
</div--> |
|
51 |
|
|
52 |
|
|
53 |
<claim-selected-projects title="link Projects" [projects]="projects" [show]="show" [linkType]=linkType |
|
54 |
(showChange)="showChange($event)" > </claim-selected-projects> |
|
55 |
|
|
56 |
<claim-selected-contexts title="link Communities" [contexts]="contexts" [projects]="projects" [results]="results" [inlineEntity] = "inlineResult" [show]="show" [linkType]=linkType |
|
57 |
(showChange)="showChange($event)" > </claim-selected-contexts> |
|
58 |
<claim-selected-results *ngIf="step!=3" title= "Selected Research Results" [results]="results" [bulkMode]="bulkMode" showSearch=false showAccessRights=false> |
|
59 |
</claim-selected-results> |
|
60 |
</div> |
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
<!--ul class="uk-pagination uk-margin-remove-bottom"> |
|
65 |
<li *ngIf="show != 'result' " (click)="prev()"><a><span class="uk-margin-small-right" uk-pagination-previous></span> Previous</a></li> |
|
66 |
<li *ngIf="show != 'claim' " (click)="next()" class="uk-margin-auto-left"><a>Next <span class="uk-margin-small-left" uk-pagination-next></span></a></li> |
|
67 |
<li *ngIf="show == 'claim' " (click)="next()" class="uk-margin-auto-left"> |
|
68 |
<claim-insert [contexts]="contexts" [results]="results" [projects]="projects" [show] = "show" |
|
69 |
(showChange)="showChange($event)" ></claim-insert> |
|
70 |
|
|
71 |
</li> |
|
72 |
</ul--> |
|
73 |
|
|
74 |
<!-- link with Projects & Contexts --> |
|
75 |
<!--div class="uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-grid"> |
|
76 |
<div class="uk-width-1-1@s uk-width-1-2@m uk-width-1-2@l uk-width-1-2@xl "--> |
|
77 |
<div *ngIf="step==1"> |
|
78 |
<ul class=" uk-tab " uk-tab="connect: #tabs; animation: uk-animation-fade"> |
|
79 |
<li> |
|
80 |
<a>Projects ({{projects.length}})</a> |
|
81 |
</li> |
|
82 |
<li> |
|
83 |
<a>Communities ({{contexts.length}})</a> |
|
84 |
</li> |
|
85 |
</ul> |
|
86 |
<ul id="tabs" class="uk-switcher uk-margin-left uk-width-1-1"> |
|
87 |
<li> |
|
88 |
<!--claim-selected-projects title="link Projects" [projects]="projects" [show]="show" [linkType]=linkType |
|
89 |
(showChange)="showChange($event)" > </claim-selected-projects--> |
|
90 |
<claim-projects-search-form [(selectedProjects)]="projects" > </claim-projects-search-form> |
|
91 |
</li> |
|
92 |
<li> |
|
93 |
<!--claim-selected-contexts title="link Communities" [contexts]="contexts" [projects]="projects" [results]="results" [inlineEntity] = "inlineResult" [show]="show" [linkType]=linkType |
|
94 |
(showChange)="showChange($event)" > </claim-selected-contexts--> |
|
95 |
<claim-contexts-search-form [(selectedList)]="contexts" [projects]="projects" [results]="results" [inlineEntity]="inlineResult" > </claim-contexts-search-form> |
|
96 |
</li> |
|
97 |
<!--/div> |
|
98 |
<div class="uk-width-1-1@s uk-width-1-2@m uk-width-1-2@l uk-width-1-2@xl "--> |
|
99 |
|
|
100 |
</ul> |
|
101 |
</div> |
|
102 |
<!--/div--> |
|
103 |
<!--/div--> |
|
104 |
<!--hr--> |
|
105 |
<!-- Research Results --> |
|
106 |
|
|
107 |
<div *ngIf="step==2 "> |
|
108 |
<div class="uk-width-1-1 "> |
|
109 |
<div class=" uk-padding-small uk-padding-remove-bottom uk-panel uk-background-muted "> |
|
110 |
<span *ngIf="bulkMode" class=" uk-animation uk-float-right"> |
|
111 |
<span title= "Bulk mode"><i class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="upload" ratio="1"><polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 "></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4"></line></svg></i></span> |
|
112 |
<a title= "Switch to Search mode" (click)="bulkMode = !bulkMode;"> <span class="uk-icon"> |
|
113 |
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg> |
|
114 |
</span></a> |
|
115 |
</span> |
|
116 |
<span *ngIf="!bulkMode" class=" uk-animation uk-float-right"> |
|
117 |
<a title= "Switch to Bulk mode" (click)="bulkMode = !bulkMode;"><i class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="upload" ratio="1"><polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 "></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4"></line></svg></i></a> |
|
118 |
<span title= "Search mode"> <span class="uk-icon"> |
|
119 |
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg> |
|
120 |
</span></span> |
|
121 |
</span> |
|
122 |
</div> |
|
123 |
<claim-result-search-form *ngIf="!bulkMode" [selectedResults]="results" > </claim-result-search-form> |
|
124 |
<bulk-claim *ngIf="bulkMode" [results]="results" > </bulk-claim> |
|
125 |
</div> |
|
126 |
</div> |
|
127 |
<div *ngIf="step==3" class="uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l"> |
|
128 |
<claim-selected-results title= "Selected Research Results" [results]="results" [bulkMode]="bulkMode" showSearch = false showAccessRights = true> |
|
129 |
</claim-selected-results> |
|
130 |
</div> |
|
131 |
|
|
132 |
|
|
133 |
|
|
134 |
<ul class="uk-pagination"> |
|
135 |
<li *ngIf="step !=1 " (click)="step=step-1;"><a><span class="uk-margin-small-right" uk-pagination-previous></span> Previous</a></li> |
|
136 |
<!--li *ngIf="show != 'claim' && this.results.length > 0 " (click)="canProceedToMetadata()" class="uk-margin-auto-left"><a> Review Metadata <span class="uk-margin-small-left" uk-pagination-next></span></a></li--> |
|
137 |
<li *ngIf="step !=3 " (click)="step=step + 1;" class="uk-margin-auto-left"> |
|
138 |
<a>Next <span class="uk-margin-small-left" uk-pagination-next></span></a> |
|
139 |
</li> |
|
140 |
<li *ngIf=" step == 3 " (click)="next()" class="uk-margin-auto-left uk-width-1-1"> |
|
141 |
<claim-insert [contexts]="contexts" [results]="results" [projects]="projects" [show] = "show" |
|
142 |
(showChange)="showChange($event)" ></claim-insert> |
|
143 |
|
|
144 |
</li> |
|
145 |
</ul> |
|
146 |
</div> |
|
147 |
<helper position="right" styleName=" uk-width-1-5"></helper> |
|
148 |
</div> |
|
149 |
<helper position="bottom"></helper> |
|
150 |
|
|
151 |
|
|
152 |
|
|
153 |
</div> |
|
154 |
|
|
155 |
</div> |
|
156 |
</div> |
|
157 |
</div> |
|
158 |
` |
|
159 |
|
|
160 | 15 |
}) |
161 | 16 |
export class LinkingGenericComponent { |
162 | 17 |
|
Also available in: Unified diff
Direct Linking use the same look and feel with linking | add seperate template files for linking generic and direct linking components | login components redirects in case user is logged in