Skip to content

Commit

Permalink
feat: Add redirect button pointing to Micka for compositions
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipLeitner authored and raitisbe committed Apr 21, 2021
1 parent 74e957e commit bad97df
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 11 deletions.
4 changes: 4 additions & 0 deletions projects/hslayers-server/src/layman.js
Expand Up @@ -112,6 +112,10 @@ app.use(`/geoserver`,
}),
);

app.use(`/micka`, createProxyMiddleware({
target: process.env.LAYMAN_BASEURL, changeOrigin: true,
}))

app.get('/', (req, res) => {
if (req.session.passport && req.session.passport.user && req.session.passport.user.authenticated) {
authnUtil.checkTokenExpiration(req, strategy.name);
Expand Down
Expand Up @@ -30,7 +30,7 @@ <h4 class="modal-title">
<div class="col-md-3"><b>{{'COMMON.thumbnail' | translate}}</b></div>
<div class="col-md-9"><img src="{{data.info.thumbnail}}"></div>
</div>
<div class="row" *ngIf="data.info.url">
<div class="row" *ngIf="data.info.url && data.info">
<div class="col-md-3"><b>{{'COMMON.url' | translate}}</b></div>
<div class="col-md-9">{{data.info.url}}</div>
</div>
Expand All @@ -49,22 +49,22 @@ <h4 class="modal-title">
<div class="col-md-9">{{layer.title}}</div>
</div>
<div class="row" *ngIf="!first">
<div class="col-md-offset-3 col-md-9">{{layer.title}}</div>
<div class="offset-md-3 col-md-9">{{layer.title}}</div>
</div>
</div>
<br>
</div>
<div *ngIf="data.info.metadata">
<!-- <div *ngIf="data.info.metadata">
<div class="row">
<div class="col"><b>{{'COMPOSITIONS.dialogInfo.metadataAboutMetadata' | translate}}</b></div>
</div>
<div *ngFor="let metadata of data.info.metadata | keyvalue">
<div class="row" *ngIf="metadata.value">
<div class="col-md-3"><b>{{HsCompositionsService.translateString('COMPOSITIONS.dialogInfo.metadata', metadata.key)}}</b></div>
<div class="col-md-9">{{metadata.value}}</div>
<div class="col-md-9" style="overflow-wrap: break-word">{{metadata.value}}</div>
</div>
</div>
</div>
</div> -->
<div class="row" *ngIf="data.info.contactAddress || data.info.contactPersonPrimary">
<div class="col"><b>{{'COMMON.contactInformation' | translate}}</b></div>
</div>
Expand All @@ -86,9 +86,10 @@ <h4 class="modal-title">
</div>
</div>
<div class="modal-footer">
<a target="_blank" [href]="data.info.metadata.record_url" class="btn btn-primary" (click)="close()">See full metadata record <i class="icon icon-opennewwindow" ></i></a>
<button type="button" class="btn btn-secondary" (click)="close()"
data-dismiss="modal">{{'COMMON.close' | translate}}</button>
</div>
</div>
</div>
</div>
</div>
Expand Up @@ -2,17 +2,17 @@ import {Component, ViewRef} from '@angular/core';
import {HsCompositionsService} from '../compositions.service';
import {HsDialogComponent} from '../../layout/dialogs/dialog-component.interface';
import {HsDialogContainerService} from '../../layout/dialogs/dialog-container.service';

@Component({
selector: 'hs-compositions-info-dialog',
templateUrl: './dialog_info.html',
})
export class HsCompositionsInfoDialogComponent implements HsDialogComponent {
viewRef: ViewRef;
data: any;

constructor(
public HsDialogContainerService: HsDialogContainerService,
public HsCompositionsService: HsCompositionsService
public HsCompositionsService: HsCompositionsService,
) {}

close(): void {
Expand Down
Expand Up @@ -93,6 +93,11 @@ export class HsCompositionsStatusManagerMickaJointService {
info = await this.HsCompositionsParserService.loadInfo(url);
//TODO: find out if this is even available
// info.thumbnail = this.HsUtilsService.proxify(composition.thumbnail);
info.metadata = {
record_url:
composition.endpoint.url.replace('csw', 'record/basic/') +
composition.id,
};
return info;
} catch (e) {
this.HsToastService.createToastPopupMessage(
Expand Down
3 changes: 2 additions & 1 deletion projects/hslayers/src/css/subset-font.sh
Expand Up @@ -80,5 +80,6 @@
# icon-sun-day U+f206
# icon-timeline U+f253
# icon-uploadalt U+f11b
pyftsubset whhg-font/font/webhostinghub-glyphs.ttf --unicodes="U+F1CA,U+f4c2,U+f315,U+f209,U+f00b,U+f000,U+002b,U+f022,U+f2b4,U+f078,U+f488,U+f489,U+f48b,U+f47a,U+f4c9,U+f47c,U+f0ce,U+f16a,U+f140,U+f165,U+f47b,U+f20a,U+f397,U+f1bf,U+f772,U+f1b7,U+00d7,U+f487,U+f19b,U+f23a,U+f36c,U+f316,U+f127,U+f0c5,U+f1b8,U+f1ed,U+f319,U+f692,U+f01b,U+f187,U+f0d2,U+f0c8,U+f571,U+f572,U+f782,U+f53d,U+f249,U+f109,U+f125,U+f309,U+f4d2,U+f30c,U+2212,U+f16c,U+f21e,U+f21f,U+f269,U+f470,U+f310,U+f307,U+f7ac,U+f210,U+f5d5,U+f0a3,U+f4d0,U+f09e,U+f6ec,U+f0dc,U+f301,U+f2fe,U+f675,U+f207,U+f206,U+f253,U+f11b" --output-file="whhg-font/font/subset.ttf"
# icon-opennewwindow U+f332
pyftsubset whhg-font/font/webhostinghub-glyphs.ttf --unicodes="U+F1CA,U+f4c2,U+f315,U+f209,U+f00b,U+f000,U+002b,U+f022,U+f2b4,U+f078,U+f488,U+f489,U+f48b,U+f47a,U+f4c9,U+f47c,U+f0ce,U+f16a,U+f140,U+f165,U+f47b,U+f20a,U+f397,U+f1bf,U+f772,U+f1b7,U+00d7,U+f487,U+f19b,U+f23a,U+f36c,U+f316,U+f127,U+f0c5,U+f1b8,U+f1ed,U+f319,U+f692,U+f01b,U+f187,U+f0d2,U+f0c8,U+f571,U+f572,U+f782,U+f53d,U+f249,U+f109,U+f125,U+f309,U+f4d2,U+f30c,U+2212,U+f16c,U+f21e,U+f21f,U+f269,U+f470,U+f310,U+f307,U+f7ac,U+f210,U+f5d5,U+f0a3,U+f4d0,U+f09e,U+f6ec,U+f0dc,U+f301,U+f2fe,U+f675,U+f207,U+f206,U+f253,U+f11b,U+f332" --output-file="whhg-font/font/subset.ttf"
ttf2eot whhg-font/font/subset.ttf whhg-font/font/subset.eot
5 changes: 3 additions & 2 deletions projects/hslayers/src/css/whhg-font/css/whhg.css

Large diffs are not rendered by default.

Binary file modified projects/hslayers/src/css/whhg-font/font/subset.eot
Binary file not shown.
Binary file modified projects/hslayers/src/css/whhg-font/font/subset.ttf
Binary file not shown.

0 comments on commit bad97df

Please sign in to comment.