Skip to content
Snippets Groups Projects
Commit 6a1cb16d authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Merge branch 'master' of gitlab.tugraz.at:VPU/WebComponents/PersonProfile

parent 3cb63e5e
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,6 @@
<body>
<vpu-person-profile-demo lang="de"></vpu-person-profile-demo>
<vpu-person-profile-demo id="vpu-person-profile-src" lang="de"></vpu-person-profile-demo>
</body>
</html>
......@@ -8,6 +8,7 @@
"role": "Rolle",
"none-selected": "Keine Person ausgewählt",
"staff": "Mitarbeiter/in",
"alumni": "Absolvent/in"
"alumni": "Absolvent/in",
"unknown": "unbekannt"
}
}
{
"person-profile": {
"profile-caption": "Profile for",
"given-name": "given name",
"family-name": "family name",
"email": "email",
"telephone": "telephone",
"role": "role",
"given-name": "Given name",
"family-name": "Family name",
"email": "Email",
"telephone": "Telephone",
"role": "Role",
"none-selected": "No person selected",
"staff": "staff",
"alumni": "alumni"
"alumni": "alumni",
"unknown": "unknown"
}
}
......@@ -4,7 +4,6 @@ import VPULitElement from 'vpu-common/vpu-lit-element';
import './person-profile.js';
import * as commonUtils from 'vpu-common/utils';
import bulmaCSSPath from "bulma/css/bulma.min.css";
import {getAssetURL} from "./utils";
import $ from 'jquery';
import 'vpu-person-select';
......@@ -63,7 +62,8 @@ class PersonProfileDemo extends VPULitElement {
}
render() {
const bulmaCSS = getAssetURL(bulmaCSSPath);
commonUtils.initAssetBaseURL('vpu-person-profile-src');
const bulmaCSS = commonUtils.getAssetURL(bulmaCSSPath);
return html`
<link rel="stylesheet" href="${bulmaCSS}">
......
import {getAssetURL} from './utils.js';
import JSONLD from 'vpu-common/jsonld';
import {html} from 'lit-element';
import {i18n} from './i18n.js';
......@@ -71,7 +71,7 @@ class PersonProfile extends VPULitElement {
}
render() {
let role = 'unbekannt';
let role = i18n.t('person-profile.unknown');
if (this.person !== null && this.person.roles !== undefined) {
// roles are only defined for self-disclosure
if (this.person.roles.indexOf('ROLE_STAFF') > -1) {
......@@ -80,7 +80,8 @@ class PersonProfile extends VPULitElement {
role = i18n.t('person-profile.alumni');
}
}
const bulmaCSS = getAssetURL(bulmaCSSPath);
commonUtils.initAssetBaseURL('vpu-person-profile-src');
const bulmaCSS = commonUtils.getAssetURL(bulmaCSSPath);
return html`
<link rel="stylesheet" href="${bulmaCSS}">
<style>
......
export const getAssetURL = (path) => {
const elm = document.getElementById('vpu-library-shelving-wc-src');
if (!elm)
return path;
const url = elm.src;
// newer browsers only
//var url = import.meta.url;
return new URL(path, url).href;
};
common @ c15bde62
Subproject commit d99ddf4deb91f0710d3f2f87ed3157c74dbcb8c6
Subproject commit c15bde62fbf022d666378e115d24b6c0b0bfad20
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment