feature - project creation started

This commit is contained in:
Alexandre Bourlier 2018-07-07 17:52:41 +02:00
parent b9108c7448
commit 67f9a2f02f
5 changed files with 34 additions and 33 deletions

View File

@ -32,6 +32,7 @@
<?php require_once('src/html/edit-profile.html'); ?>
<?php require_once('src/html/projects.html'); ?>
<?php require_once('src/html/project.html'); ?>
<?php require_once('src/html/project-creation.html'); ?>
<?php require_once('src/html/project-edition.html'); ?>
<?php require_once('src/html/channels.html'); ?>
<?php require_once('src/html/channel.html'); ?>
@ -40,14 +41,14 @@
</main>
<!-- This is a hack : https://git.happy-dev.fr/happy-dev/xmpp-chat-component/issues/24 -->
<sib-chat
<!--sib-chat
data-src="https://djangoldp.happy-dev.fr/users/1"
data-authentication="login"
data-auto-login="true"
data-bosh-service-url="http://jabber.happy-dev.fr/http-bind/" // FIXME: make HTTPS
data-debug="false"
data-locales-url="node_modules/converse.js/locale/{{{locale}}}/LC_MESSAGES/converse.json">
</sib-chat>
</sib-chat-->
<script>
// Store url on load

View File

@ -1,32 +1,19 @@
<div id="member" class="view-with-vertical-menu" style="display: none">
<sib-router id="member-page-router" class="vertical-menu border-left" default-route="member-chat">
<sib-route name="member-chat">
<i class="fa fa-comment" aria-hidden="true"></i>
</sib-route>
<sib-route name="member-detail">
<i class="fa fa-user" aria-hidden="true"></i>
</sib-route>
</sib-router>
<div class="section info">
<i class="fa fa-pencil" aria-hidden="true"></i>
<i class="name fa fa-pencil" aria-hidden="true"></i>
<div id="member-chat" class="chat-wrapper"></div>
<div id="member-detail" style="display: none">
<div class="section info">
<i class="fa fa-pencil" aria-hidden="true"></i>
<i class="name fa fa-pencil" aria-hidden="true"></i>
<sib-display
id="member-info"
data-fields="avatar, user, before-pseudo, pseudo, bio, cell, number, roles, website, skills"
widget-avatar="sib-display-img"
widget-user="hdapp-userinfo"
widget-cell="hdapp-usercell"
widget-number="sib-display-tel"
widget-roles="sib-display-lookuplist"
widget-skills="sib-display-lookuplist"
bind-resources
></sib-display>
</div>
<sib-display
id="member-info"
data-fields="avatar, user, before-pseudo, pseudo, bio, cell, number, roles, website, skills"
widget-avatar="sib-display-img"
widget-user="hdapp-userinfo"
widget-cell="hdapp-usercell"
widget-number="sib-display-tel"
widget-roles="sib-display-lookuplist"
widget-skills="sib-display-lookuplist"
bind-resources
></sib-display>
</div>
</div>

View File

@ -17,6 +17,7 @@
<i class="fa fa-tasks" aria-hidden="true"></i>
<span class="d-none d-md-inline"> Projets</span>
</sib-route>
<sib-route name="new-project">New project</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>

View File

@ -0,0 +1,8 @@
<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

@ -12,18 +12,22 @@
});
}
}
customElements.define("ldp-display-client", LDPDisplayClient);
customElements.define("sib-display-client", LDPDisplayClient);
});
</script>
<div id="projects" style="display: none">
<ldp-display
<sib-router route-prefix="projects">
<sib-route name="new-project">New project</sib-route>
<sib-router>
<sib-display
id="projects-list"
data-src="<?php echo $sdn; ?>/projects/"
data-fields="number, client, name"
widget-client="ldp-display-client"
widget-client="sib-display-client"
search-fields="number, name"
next="project"
></ldp-display>
></sib-display>
</div>