Merge branch 'master' of git.happy-dev.fr:startinblox/applications/sib-app into gm-job-offers

This commit is contained in:
Gaelle Morin 2018-12-12 17:59:37 +01:00
commit fb494307b0
13 changed files with 39 additions and 75 deletions

View File

@ -16,8 +16,8 @@ details
include page-notifications.pug
sib-display#profile(
data-fields='first_name,member.avatar',
widget-member.avatar='sib-display-img',
data-fields='first_name,profile.picture',
widget-profile.picture='sib-display-img',
bind-user
)

View File

@ -8,8 +8,8 @@
sib-display(
id-suffix='members',
data-fields='user-thumb',
set-user-thumb='member.avatar, first_name, last_name',
widget-member.avatar='sib-display-img',
set-user-thumb='profile.picture, first_name, last_name',
widget-profile.picture='sib-display-img',
bind-resources
)
@ -28,7 +28,7 @@
sib-display(
data-fields='title, label-description, description, client',
set-title='number, client.name, name',
set-title='phone, client.name, name',
set-client='label-client, client.name, client.logo, client.address',
value-label-description="Description:"
value-label-client="Client:"

View File

@ -4,7 +4,7 @@ div
.form-view
sib-form.block(
data-src=`${sdn}/job-offers/`,
data-fields="author, description, skills",
data-fields="description, skills",
widget-author='sib-form-dropdown',
widget-skills='sib-form-multiple-dropdown',
range-skills= `${sdn}/skills/`,
)

View File

@ -4,10 +4,10 @@ div.grid-layer
span Here you can find and post offers
sib-display#offers-list(
data-src=`${sdn}/job-offers/`,
data-fields='date, user-thumb, title, description, roles, skills',
data-fields='date, user-thumb, title, description, skills',
widget-skills='sib-display-lookuplist',
set-user-thumb='author.member.avatar, author.first_name, author.last_name, author.groups',
widget-author.member.avatar='sib-display-img',
set-user-thumb='author.profile.picture, author.first_name, author.last_name',
widget-author.profile.picture='sib-display-img',
set-date='closingDate, creationDate',
set-creation='creationDate',
widget-closingDate='hdapp-closing-date',

View File

@ -1,14 +1,6 @@
.form-view
label.d-none(for='avatar-input')
img#avatar-preview(src='', style='width: 100%;')
input#avatar-input.d-none(
type='file',
accept='image/*',
name='avatar',
value='',
)
sib-form.block(
data-fields='user, avatar, bio, cell, jabberID, number, pseudo, skills, website',
data-fields='user, picture, bio, cell, jabberID, phone, pseudo, skills, website',
widget-user='hdapp-usereditinfo',
range-cell=`${sdn}/cells/`, widget-skills='sib-form-multiple-dropdown',
range-skills=`${sdn}/skills/`,

View File

@ -1,22 +1,21 @@
template#chat-link
sib-link(next="member-chat") ${value}
sib-display#member-info(
data-fields='available, header, name, pseudonym, infos, skills',
set-header='avatar',
set-infos='cell, roles,send, user.email, number, foaf:homepage',
data-fields='available, header, name, pseudonym, infos, user.skills',
set-header='picture',
set-infos='city, country, user.roles, user.email, send, phone, foaf:homepage, ',
set-name='user.first_name, user.last_name',
set-pseudonym='before-pseudo, pseudo',
value-before-pseudo='@',
value-send='SEND A MESSAGE',
template-send='chat-link',
widget-available='hdapp-available',
widget-avatar='sib-display-img',
widget-picture='sib-display-img',
widget-user='hdapp-userinfo',
widget-cell='hdapp-usercell',
widget-number='sib-display-tel',
widget-phone='sib-display-tel',
widget-foaf:homepage='hdapp-hyperlink',
widget-user.email='sib-display-mailto',
widget-roles='sib-display-lookuplist',
widget-skills='sib-display-lookuplist',
widget-user.roles='sib-display-lookuplist',
widget-user.skills='sib-display-lookuplist',
bind-resources
)

View File

@ -7,8 +7,8 @@ div.grid-layer
h1 Members
sib-display#profiles-list(
data-src=`${sdn}/members/`,
data-fields='header, infos, group, role, more',
set-header='avatar, user, pseudonym, bio, send',
data-fields='header, infos, groups, role, more',
set-header='picture, user, pseudonym, bio, send, city, country',
set-infos='cell, roles, user.email, foaf:homepage, skills',
set-pseudonym='before-pseudo,pseudo'
label-skills='skill',
@ -17,10 +17,9 @@ div.grid-layer
template-more='hdapp-link-more',
value-send='SEND A MESSAGE',
template-send='chat-link',
widget-avatar='sib-display-img',
widget-picture='sib-display-img',
widget-user='hdapp-userinfo',
widget-foaf:hompage='hdapp-hyperlink',
widget-cell='hdapp-usercell',
widget-roles='sib-display-lookuplist',
widget-skills='sib-display-lookuplist',
set-name='pseudo,user.first_name,user.last_name',

View File

@ -2,7 +2,7 @@ h1 New project
.form-view
sib-form.block(
data-src=`${sdn}/projects/`,
range-client=`${sdn}/clients/`,
range-customer=`${sdn}/customers/`,
widget-team='sib-form-multiple-dropdown',
range-team=`${sdn}/members/`
)

View File

@ -2,9 +2,9 @@ h1 Edit project
//- sib-display(data-fields="name" bind-resources)]
.form-view
sib-form(
range-client=`${sdn}/clients/`,
range-customer=`${sdn}/customers/`,
range-team=`${sdn}/members/`,
data-fields=`name, number, client, description, team, jabberRoom, foaf:jabberID`,
data-fields=`name, phone, customer, description, team, jabberRoom, foaf:jabberID`,
widget-jabberRoom='sib-form-checkbox',
widget-description='sib-form-textarea',
widget-team='hdapp-link-more',

View File

@ -1,5 +1,5 @@
.frame
template#client-template
template#customer-template
div#clientBox
div
h2 Client :
@ -13,13 +13,13 @@
h2 Contact :
sib-display(
data-fields='title, client.logo, label-description, description, client',
set-title='const-title1,number,client.name,const-title2, name',
widget-client.logo='sib-display-img',
template-client='client-template',
data-fields='title, customer.logo, label-description, description, customer',
set-title='const-title1,phone, customer.name,const-title2, name',
widget-customer.logo='sib-display-img',
template-customer='customer-template',
widget-team='sib-display-lookuplist',
value-label-description="Description:",
value-label-client="Client:",
value-label-customer="Client:",
value-const-title1="N°:",
value-const-title2="-",
bind-resources,
@ -29,10 +29,10 @@
div.containerH
sib-display.members-list-condensed(
id-suffix='team',
data-fields='member.avatar, member.user, member.roles',
widget-member.avatar='sib-display-img',
widget-member.user='hdapp-userinfo',
widget-member.roles='sib-display-lookuplist',
next='member',
data-fields='profile.picture, profile.user, groups',
widget-profile.picture='sib-display-img',
widget-profile.user='hdapp-userinfo',
widget-groups='sib-display-lookuplist',
next='profile',
bind-resources,
)

View File

@ -3,8 +3,8 @@ div
h1 Projects
sib-display(
data-src=`${sdn}/projects/`,
data-fields='number, client, name',
widget-client='hdapp-client',
search-fields='number, name',
data-fields='phone, customer, name',
widget-customer='hdapp-client',
search-fields='phone, name',
next='project'
)

View File

@ -27,32 +27,6 @@ document.addEventListener('WebComponentsReady', function(event) {
}
customElements.define('hdapp-userinfo', HDAppUserInfo);
class HDAppCell extends SIBDisplayLookupList {
get parentElement() {
return 'div';
}
getTemplate(value, index) {
var city, country;
if (typeof value == 'object')
if (Object.keys(value).length > 1) {
city = value.city;
country = value.country;
} else {
store.get(value).then(resource => {
this.value.push(resource);
this.render();
});
if (Array.isArray(this.value))
this.value.splice(this.value.indexOf(value), 1);
else this.value = [];
return '';
}
return `<span>${city} - ${country}</span>`;
}
}
customElements.define('hdapp-usercell', HDAppCell);
class HDAppMail extends SIBWidget {
get template() {
return `<a href="mailto:${this.value}"><div class="icon-envelope"></div><div>SEND A MESSAGE</div></a>`;

@ -1 +1 @@
Subproject commit e38ebf298b1e1e8f6961feb1163338fd61259312
Subproject commit 90d8772af806d1d2345272e4f309cd496c07d56f