feature - project pages cleaned

This commit is contained in:
Alexandre Bourlier 2018-07-11 23:37:22 +02:00
parent ae0ab04570
commit 4aa04f762d
15 changed files with 84 additions and 85 deletions

View File

@ -30,9 +30,7 @@
<?php require_once('src/html/members.html'); ?> <?php require_once('src/html/members.html'); ?>
<?php require_once('src/html/member.php'); ?> <?php require_once('src/html/member.php'); ?>
<?php require_once('src/html/projects.html'); ?> <?php require_once('src/html/projects.html'); ?>
<?php require_once('src/html/project.html'); ?> <?php require_once('src/html/project.php'); ?>
<?php require_once('src/html/project-creation.html'); ?>
<?php require_once('src/html/project-edition.html'); ?>
<?php require_once('src/html/client-creation.html'); ?> <?php require_once('src/html/client-creation.html'); ?>
<?php require_once('src/html/channels.html'); ?> <?php require_once('src/html/channels.html'); ?>
<?php require_once('src/html/channel.html'); ?> <?php require_once('src/html/channel.html'); ?>

View File

@ -1,5 +1,4 @@
<div id="new-client" style="display: none"> <div id="new-client" style="display: none">
<h1>NEW CLIENT</h1>
<sib-form <sib-form
data-src="http://localhost:8000/clients/" data-src="http://localhost:8000/clients/"
data-fields="name, address, logo" data-fields="name, address, logo"

View File

@ -5,7 +5,7 @@
data-authentication="login" data-authentication="login"
data-auto-login="true" data-auto-login="true"
data-bosh-service-url="http://jabber.happy-dev.fr/http-bind/" data-bosh-service-url="http://jabber.happy-dev.fr/http-bind/"
data-debug="true" data-debug="false"
data-locales-url="node_modules/converse.js/locale/{{{locale}}}/LC_MESSAGES/converse.json" data-locales-url="node_modules/converse.js/locale/{{{locale}}}/LC_MESSAGES/converse.json"
bind-resources> bind-resources>
</sib-chat> </sib-chat>

View File

@ -16,7 +16,7 @@
//widget-avatar="ldp-form-img-upload" //widget-avatar="ldp-form-img-upload"
</script> </script>
<div id="member-edit-profile" style="display: none"> <div id="member-edit" style="display: none">
<label for="avatar-input" class="d-none"> <label for="avatar-input" class="d-none">
<img id="avatar-preview" src="http://cdn.local/hdapp/members/alexandre-bourlier.jpg" style="width: 100%;"/> <img id="avatar-preview" src="http://cdn.local/hdapp/members/alexandre-bourlier.jpg" style="width: 100%;"/>
</label> </label>

View File

@ -1,21 +1,19 @@
<div id="member" style="display: none"> <div id="member" style="display: none">
<div class="section info"> <sib-router id="member-router" default-route="member-profile">
<sib-router id="member-router" default-route="member-profile"> <sib-route name="member-chat">
<sib-route name="member-chat"> <button>Chat</button>
<button>Chat</button> </sib-route>
</sib-route> <sib-route name="member-profile">
<sib-route name="member-profile"> <button>Voir</button>
<button>Voir</button> </sib-route>
</sib-route> <sib-route name="member-edit">
<sib-route name="member-edit-profile"> <button>Éditer</button>
<button>Éditer</button> </sib-route>
</sib-route> </sib-router>
</sib-router>
<div id="member-views-container"> <div id="member-views-container">
<?php require_once('member-chat.html'); ?> <?php require_once('member-chat.html'); ?>
<?php require_once('member-profile.html'); ?> <?php require_once('member-profile.html'); ?>
<?php require_once('member-edit-profile.html'); ?> <?php require_once('member-edit.html'); ?>
</div>
</div> </div>
</div> </div>

View File

@ -16,9 +16,8 @@
<i class="fa fa-tasks" aria-hidden="true"></i> <i class="fa fa-tasks" aria-hidden="true"></i>
<span class="d-none d-md-inline"> Projets</span> <span class="d-none d-md-inline"> Projets</span>
</sib-route> </sib-route>
<sib-route name="new-project">New project</sib-route>
<sib-route name="new-client">New client</sib-route>
<sib-route class="d-none" name="project" id-prefix="<?php echo $sdn; ?>/projects/"></sib-route> <sib-route class="d-none" name="project" id-prefix="<?php echo $sdn; ?>/projects/"></sib-route>
<sib-route name="new-client">New client</sib-route>
<sib-route class="d-none" name="project-edition" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route> <sib-route class="d-none" name="project-edition" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route>
<sib-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">

View File

@ -0,0 +1,3 @@
<div id="project-chat" style="display: none">
<i>Chat coming soon...</i>
</div>

View File

@ -0,0 +1,8 @@
<div id="project-create" style="display: none">
<sib-form
data-src="http://localhost:8000/projects/"
range-client="<?php echo $sdn; ?>/clients/"
widget-team="sib-form-multiple-dropdown"
range-team="<?php echo $sdn; ?>/team/"
></sib-form>
</div>

View File

@ -1,8 +0,0 @@
<div id="new-project" style="display: none">
<h1>NEW PROJECT</h1>
<sib-form
data-src="http://localhost:8000/projects/"
data-fields="name, number, client"
range-client="http://localhost:8000/clients/"
></sib-form>
</div>

View File

@ -0,0 +1,9 @@
<div id="project-edit" style="display: none">
<sib-form
range-client="<?php echo $sdn; ?>/clients/"
widget-team="sib-form-multiple-dropdown"
range-team="<?php echo $sdn; ?>/team/"
bind-resources
></sib-form>
</div>

View File

@ -1,8 +0,0 @@
<div id="project-edition" style="display: none">
<ldp-form
class="edit-form"
data-src="<?php echo $sdn; ?>/projects/1/"
bind-resources
></ldp-form>
</div>

View File

@ -0,0 +1,19 @@
<div id="project-profile" style="display: none">
<sib-display
data-fields="name, number, client"
widget-client="hdapp-client"
bind-resources
></sib-display>
<h2>Team</h2>
<sib-display
class="members-list-condensed"
id-suffix="team"
data-fields="avatar, user"
widget-avatar="sib-display-img"
widget-user="hdapp-userinfo"
next="member"
bind-resources
></sib-display>
</div>

View File

@ -1,36 +0,0 @@
<div id="project" class="view-with-vertical-menu" style="display: none">
<ldp-router id="project-page-router" class="vertical-menu border-left" default-route="profile-chat">
<ldp-route name="project-chat">
<i class="fa fa-comment" aria-hidden="true"></i>
</ldp-route>
<ldp-route name="project-detail">
<i class="fa fa-user" aria-hidden="true"></i>
</ldp-route>
</ldp-router>
<div id="project-chat" class="chat-wrapper"></div>
<div id="project-detail" style="display: none">
<ldp-display
id="project-info"
set-label="name, before-num, number, after-num"
value-before-num="&nbsp;(n°"
value-after-num=")"
data-fields="label, client"
widget-client="ldp-display-client"
bind-resources
></ldp-display>
<h2 class="section team">L'équipe</h2>
<ldp-display
id="project-team"
class="members-list-condensed"
id-suffix="team"
set-name="firstname, name-separator, lastname"
value-name-separator="&nbsp;"
data-fields="avatar, name"
widget-avatar="ldp-display-img"
bind-resources
></ldp-display>
</div>
</div>

23
src/html/project.php Normal file
View File

@ -0,0 +1,23 @@
<div id="project" style="display: none">
<sib-router id="project-router" default-route="project-profile">
<sib-route name="project-chat">
<button>Chat</button>
</sib-route>
<sib-route name="project-profile">
<button>Voir</button>
</sib-route>
<sib-route name="project-edit">
<button>Éditer</button>
</sib-route>
<sib-route name="project-create">
<button>Nouveau</button>
</sib-route>
</sib-router>
<div id="project-views-container">
<?php require_once('project-chat.html'); ?>
<?php require_once('project-profile.html'); ?>
<?php require_once('project-edit.html'); ?>
<?php require_once('project-create.html'); ?>
</div>
</div>

View File

@ -1,6 +1,6 @@
<script> <script>
document.addEventListener("WebComponentsReady", function(event) { document.addEventListener("WebComponentsReady", function(event) {
class LDPDisplayClient extends SIBWidget { class HDAppClient extends SIBWidget {
get template() { get template() {
return `<img name="${this.name}" src="${this.value.logo}"/>`; return `<img name="${this.name}" src="${this.value.logo}"/>`;
} }
@ -12,20 +12,15 @@
}); });
} }
} }
customElements.define("sib-display-client", LDPDisplayClient); customElements.define("hdapp-client", HDAppClient);
}); });
</script> </script>
<div id="projects" style="display: none"> <div id="projects" style="display: none">
<sib-router route-prefix="projects">
<sib-route name="new-project">New project</sib-route>
<sib-router>
<sib-display <sib-display
id="projects-list"
data-src="<?php echo $sdn; ?>/projects/" data-src="<?php echo $sdn; ?>/projects/"
data-fields="number, client, name" data-fields="number, client, name"
widget-client="sib-display-client" widget-client="hdapp-client"
search-fields="number, name" search-fields="number, name"
next="project" next="project"
></sib-display> ></sib-display>