synthax : members page : updating names from ldp to sib

This commit is contained in:
Alexandre Bourlier 2018-06-21 14:33:57 +02:00
parent 63084c571d
commit c1b8980db8
4 changed files with 22 additions and 29 deletions

2
dist/lib/sib-core vendored

@ -1 +1 @@
Subproject commit 444d258357cc525300c291e45f7be7f920f972e1
Subproject commit cbba4db47150bcac8e86a364e2a4b20ad27fb387

2
dist/lib/sib-router vendored

@ -1 +1 @@
Subproject commit e374dc48aed24e62096a9ca6c15e5f78833c35ca
Subproject commit 488ca64e9aafd20bbdb15c2d087f4771d135d681

View File

@ -1,30 +1,23 @@
<script>
class LDPDisplayCell extends LDPWidget {
class LDPDisplayCell extends SIBDisplayLookupList {
get template() {
return `<div name="${this.name}">${this.value.city} - ${this.value.country}</div>`;
}
render() {
store.get(this.value).then( (value) => {
this._value = value;
this.innerHTML = this.template;
});
}
}
customElements.define("ldp-display-cell", LDPDisplayCell);
</script>
<div id="members" class="view" style="display: none">
<ldp-display
<sib-display
id="profiles-list"
data-src="<?php echo $sdn; ?>/members/"
set-name="firstname, name-separator, lastname"
value-name-separator="&nbsp;"
value-city-separator=",&nbsp;"
data-fields="avatar, name, cell"
widget-avatar="ldp-display-img"
widget-avatar="sib-display-img"
widget-cell="ldp-display-cell"
search-fields="firstname, lastname"
next="member"
></ldp-display>
></sib-display>
</div>

View File

@ -1,35 +1,35 @@
<nav class="navbar bg-white fixed-top border-bottom pb-0 d-md-flex" id="navbar">
<ldp-router id="navbar-router" class="navbar-nav" default-route="members">
<ldp-route id="menu-title" class="nav-item" name="dashboard">
<sib-router id="navbar-router" class="navbar-nav" default-route="members">
<sib-route id="menu-title" class="nav-item" name="dashboard">
HAPPY DEV
</ldp-route>
</sib-route>
<div id="menu-items" class="col-7 col-md-7">
<ldp-route class="nav-item pb-2 active align-self-stretch text-center text-md-left" name="members">
<sib-route class="nav-item pb-2 active align-self-stretch text-center text-md-left" name="members">
<i class="fa fa-users" aria-hidden="true"></i>
<span class="d-none d-md-inline"> Membres</span>
</ldp-route>
<ldp-route class="d-none" name="member" id-prefix="<?php echo $sdn; ?>/members/"></ldp-route>
<ldp-route class="d-none" name="edit-profile" id-prefix="<?php echo $sdn; ?>/members/"></ldp-route>
</sib-route>
<sib-route class="d-none" name="member" id-prefix="<?php echo $sdn; ?>/members/"></sib-route>
<sib-route class="d-none" name="edit-profile" id-prefix="<?php echo $sdn; ?>/members/"></sib-route>
<ldp-route class="nav-item pb-2 align-self-stretch text-center text-md-left" name="projects">
<sib-route class="nav-item pb-2 align-self-stretch text-center text-md-left" name="projects">
<i class="fa fa-tasks" aria-hidden="true"></i>
<span class="d-none d-md-inline"> Projets</span>
</ldp-route>
<ldp-route class="d-none" name="project" id-prefix="<?php echo $sdn; ?>/projects/"></ldp-route>
<ldp-route class="d-none" name="project-edition" id-prefix="<?php echo $sdn; ?>/channels/"></ldp-route>
</sib-route>
<sib-route class="d-none" name="project" id-prefix="<?php echo $sdn; ?>/projects/"></sib-route>
<sib-route class="d-none" name="project-edition" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route>
<ldp-route class="nav-item pb-2 align-self-stretch text-center text-md-left" name="channels">
<sib-route class="nav-item pb-2 align-self-stretch text-center text-md-left" name="channels">
<i class="fa fa-comments" aria-hidden="true"></i>
<span class="d-none d-md-inline"> Channels</span>
</ldp-route>
<ldp-route class="d-none" name="channel" id-prefix="<?php echo $sdn; ?>/channels/"></ldp-route>
<ldp-route class="d-none" name="channel-edition" id-prefix="<?php echo $sdn; ?>/channels/"></ldp-route>
</sib-route>
<sib-route class="d-none" name="channel" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route>
<sib-route class="d-none" name="channel-edition" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route>
</div>
<div class="col-2 col-md-1"></div>
</ldp-router>
</sib-router>
<div id="search-bar">
<input id="search-input" class="form-control" type="search" placeholder="ctrl + k"/>