Revision 59451
Added by Konstantina Galouni over 3 years ago
modules/uoa-admin-portal/branches/use-UoaAdminToolsLibrary/src/app/pages/divhelpcontent/div-help-content-form.component.html | ||
---|---|---|
16 | 16 |
<div *ngIf="showPageSelect && !editMode" class="form-group"> |
17 | 17 |
<label for="pageTag">Select Page</label> |
18 | 18 |
<select id="pageTag" (change)="pageSelected($event)" [value]="pageId ? pageId : ''"> |
19 |
<!-- <option *ngIf="!pageId">No page selected</option>-->
|
|
19 |
<option *ngIf="!pageId"></option>
|
|
20 | 20 |
<option *ngFor="let page of availablePages" [value]="page._id">{{page.name}}</option> |
21 | 21 |
</select> |
22 | 22 |
</div> |
modules/uoa-admin-portal/branches/use-UoaAdminToolsLibrary/src/app/pages/divhelpcontent/div-help-content-form.component.ts | ||
---|---|---|
116 | 116 |
//this.showLoading = true; |
117 | 117 |
this.errorMessage = ''; |
118 | 118 |
|
119 |
this._helpContentService.getDivIdsFullByPageAndPortal(pageId, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
|
119 |
this._helpContentService.getDivIdsFullByPortal(pageId, this.properties.adminToolsAPIURL, this.communityPid).subscribe( |
|
120 | 120 |
divs => { |
121 | 121 |
this.availableDivs = divs; |
122 | 122 |
this.pageId = pageId; |
modules/uoa-admin-portal/branches/use-UoaAdminToolsLibrary/src/app/pages/affiliations/affiliations.component.html | ||
---|---|---|
1 | 1 |
<ng-template #card let-organization="organization"> |
2 | 2 |
<div class="uk-card-media-top affiliation-logo uk-padding-small"> |
3 | 3 |
<img *ngIf= "organization.logo_url != null && organization.logo_url != '' " class="uk-text-center" |
4 |
src="{{organization.logo_url}}" alt="{{(organization.name)?organization.name:''}} logo"> |
|
4 |
src="{{urlPrefix(organization.logo_url) + organization.logo_url}}" alt="{{(organization.name)?organization.name:''}} logo">
|
|
5 | 5 |
<span *ngIf= "organization.logo_url == null || organization.logo_url == '' "class="uk-icon uk-padding-small"> |
6 | 6 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" icon="image" ratio="2.5"><circle cx="16.1" cy="6.1" r="1.1"></circle><rect fill="none" stroke="#000" x="0.5" y="2.5" width="19" height="15"></rect><polyline fill="none" stroke="#000" stroke-width="1.01" points="4,13 8,9 13,14"></polyline><polyline fill="none" stroke="#000" stroke-width="1.01" points="11,12 12.5,10.5 16,14"></polyline></svg> |
7 | 7 |
</span> |
modules/uoa-admin-portal/branches/use-UoaAdminToolsLibrary/src/app/pages/affiliations/affiliations.component.ts | ||
---|---|---|
96 | 96 |
|
97 | 97 |
getOrganizationsPageId() { |
98 | 98 |
this._helpContentService.getCommunityPageByRoute("/organizations", this.properties.adminToolsAPIURL, this.communityId).subscribe( |
99 |
pages => {
|
|
100 |
if(pages && pages[0]) {
|
|
101 |
this.organizationsPageId = pages[0]._id;
|
|
99 |
page => { |
|
100 |
if(page) { |
|
101 |
this.organizationsPageId = page._id; |
|
102 | 102 |
} |
103 | 103 |
this.showLoading = false; |
104 | 104 |
}, |
modules/uoa-admin-portal/branches/use-UoaAdminToolsLibrary/src/app/services/help-content.service.ts | ||
---|---|---|
111 | 111 |
.pipe(catchError(this.handleError)); |
112 | 112 |
} |
113 | 113 |
|
114 |
getDivIdsFullByPageAndPortal(page_id: string, helpContentUrl:string, pid: string) {
|
|
115 |
let parameters: string = "?&page="+page_id;
|
|
114 |
getDivIdsFullByPortal(page_id: string, helpContentUrl:string, pid: string) { |
|
115 |
let parameters: string = page_id ? "?&page="+page_id : "";
|
|
116 | 116 |
|
117 | 117 |
return this.http.get<Array<DivId>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid + '/div/full'+parameters) |
118 | 118 |
.pipe(catchError(this.handleError)); |
Also available in: Unified diff
[use-UoaAdminToolsLibrary | Admin]:
1. affiliations.component.html: Add "urlPrefix" for logo url in src of an image (add "//" prefix, when url does not start with protocol (http, https, //)).
2. affiliations.component.ts: In "getOrganizationsPageId()", "getCommunityPageByRoute()" returns one Page instance, not array of <Page>.
3. div-help-content-form.component.html: Add empty <option> in <select> of pages, when no page is selected.
4. div-help-content-form.component.ts & help-content.service.ts: Rename "getDivIdsFullByPageAndPortal()" to "getDivIdsFullByPortal()" | Add param "page" when it is available, to specify page too.