Project list responsive
This commit is contained in:
@ -1,8 +1,25 @@
|
||||
<script>
|
||||
class LDPDisplayClient extends LDPWidget {
|
||||
get template() {
|
||||
return `<img name="${this.name}" src="${this.value.logo}"/>`;
|
||||
}
|
||||
|
||||
render() {
|
||||
store.get(this.value).then( (value) => {
|
||||
this._value = value;
|
||||
this.innerHTML = this.template;
|
||||
});
|
||||
}
|
||||
}
|
||||
customElements.define("ldp-display-client", LDPDisplayClient);
|
||||
</script>
|
||||
|
||||
<div id="projects" style="display: none">
|
||||
<ldp-display
|
||||
id="projects-list"
|
||||
data-src="http://localhost:8000/projects/"
|
||||
data-fields="number, name"
|
||||
data-fields="number, client, name"
|
||||
widget-client="ldp-display-client"
|
||||
search-fields="number, name"
|
||||
next="project"
|
||||
></ldp-display>
|
||||
|
Reference in New Issue
Block a user