Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • applications/knowledge-base/knowledgebase-front
  • HannaP/knowledgebase-front
  • novalore/knowledgebase-front
3 results
Show changes
Commits on Source (8)
...@@ -153,17 +153,40 @@ sib-widget(name="fake-dislike") ...@@ -153,17 +153,40 @@ sib-widget(name="fake-dislike")
template template
p 18 <i class="fas fa-thumbs-down"></i> p 18 <i class="fas fa-thumbs-down"></i>
sib-widget(name="accordion-request-resource" ) sib-widget(name="accordion-request-resource")
template template
div div
h2 ${value} h2 ${value}
sib-widget(name="cs-form-file-custom" ) sib-widget(name="cs-form-file-custom")
template template
label(for="preview_image") label(for="preview_image")
sib-form-file(upload-url=`${sdn}upload/` name="preview_image") div Picture
sib-form-file(label="" upload-url=`${sdn}upload/` name="preview_image")
sib-widget(name="cs-form-profile-picture")
template
label(for="account.picture")
div Picture
sib-form-file(label="" upload-url=`${sdn}upload/` name="account.picture")
sib-widget(name="cs-display-twitter-button")
template
a.twitter-share-button(
href=`https://twitter.com/intent/tweet?text=Check%20this%20resource%20from%20Coopstarter%20:%20\${value}`
data-size="large"
target='blank'
)
i.fab.fa-twitter
sib-widget(name="cs-display-email-button")
template
a.email-share-button(
href=`mailto:?subject=Coopstarter%20shared%20resource
&body=I%20share%20you%20this%20resource%20from%20Coopstarter%20:%20\${value}`
)
i.far.fa-envelope
sib-widget(name="iframe-video-resource" ) sib-widget(name="iframe-video-resource")
template template
div ${value} div ${value}
\ No newline at end of file
...@@ -24,7 +24,7 @@ sib-form#entrepreneur_profile_creation.block_log.block_creat_count( ...@@ -24,7 +24,7 @@ sib-form#entrepreneur_profile_creation.block_log.block_creat_count(
widget-username='sib-form-hidden' widget-username='sib-form-hidden'
upload-url-account.picture=`${sdn}upload/` upload-url-account.picture=`${sdn}upload/`
widget-account.picture='cs-form-file-custom' widget-account.picture='cs-form-profile-picture'
class-account.picture='input_photo w_25' class-account.picture='input_photo w_25'
submit-button=`${data.CompleteYourAccount}` submit-button=`${data.CompleteYourAccount}`
......
...@@ -20,7 +20,7 @@ sib-form#entrepreneur_profile_edition.block_log.block_creat_count( ...@@ -20,7 +20,7 @@ sib-form#entrepreneur_profile_edition.block_log.block_creat_count(
widget-entrepreneurProfile.organisation='sib-form-auto-completion' widget-entrepreneurProfile.organisation='sib-form-auto-completion'
upload-url-account.picture=`${sdn}upload/` upload-url-account.picture=`${sdn}upload/`
widget-account.picture='cs-form-file-custom' widget-account.picture='cs-form-profile-picture'
class-account.picture='input_photo w_25' class-account.picture='input_photo w_25'
submit-button=`${data.SaveModification}` submit-button=`${data.SaveModification}`
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
bind-resources bind-resources
fields="" fields=""
nested-field="conversations" nested-field="conversations"
counter-template=`<p>${data.Comments} (${counter})</p>` counter-template=`<p>${data.Comments} (\${counter})</p>`
) )
sib-conversation( sib-conversation(
......
...@@ -14,7 +14,7 @@ sib-form#mentor_profile_creation.block_log.block_creat_count( ...@@ -14,7 +14,7 @@ sib-form#mentor_profile_creation.block_log.block_creat_count(
mentorProfile.phone, mentorProfile.languages, mentorProfile.fields),\ mentorProfile.phone, mentorProfile.languages, mentorProfile.fields),\
about_you(header_about_you, account.picture, mentorProfile.headline, mentorProfile.city, mentorProfile.country,\ about_you(header_about_you, account.picture, mentorProfile.headline, mentorProfile.city, mentorProfile.country,\
mentorProfile.biography, mentorProfile.skills),\ mentorProfile.biography, mentorProfile.skills),\
social_media(header_social_media, mentorProfile.linkedin, mentorProfile.twitter), username" social_media(header_social_media, mentorProfile.linkedin, mentorProfile.twitter), username, account.slug"
range-mentorProfile.fields=`${endpoints.fields}` range-mentorProfile.fields=`${endpoints.fields}`
range-mentorProfile.organisation=`${endpoints.organisations}` range-mentorProfile.organisation=`${endpoints.organisations}`
...@@ -46,6 +46,8 @@ sib-form#mentor_profile_creation.block_log.block_creat_count( ...@@ -46,6 +46,8 @@ sib-form#mentor_profile_creation.block_log.block_creat_count(
widget-mentorProfile.skills="sib-form-textarea" widget-mentorProfile.skills="sib-form-textarea"
widget-mentorProfile.biography="sib-form-textarea" widget-mentorProfile.biography="sib-form-textarea"
widget-username="sib-form-hidden" widget-username="sib-form-hidden"
widget-account.slug="sib-form-hidden"
value-account.slug=""
class-mentorProfile.organisation='form-label is-dark' class-mentorProfile.organisation='form-label is-dark'
widget-mentorProfile.organisation='sib-form-auto-completion' widget-mentorProfile.organisation='sib-form-auto-completion'
...@@ -60,7 +62,7 @@ sib-form#mentor_profile_creation.block_log.block_creat_count( ...@@ -60,7 +62,7 @@ sib-form#mentor_profile_creation.block_log.block_creat_count(
widget-mentorProfile.fields='sib-form-auto-completion' widget-mentorProfile.fields='sib-form-auto-completion'
upload-url-account.picture=`${sdn}upload/` upload-url-account.picture=`${sdn}upload/`
widget-account.picture='cs-form-file-custom' widget-account.picture='cs-form-profile-picture'
class-account.picture='input_photo w_25' class-account.picture='input_photo w_25'
class-headline='w_75' class-headline='w_75'
......
...@@ -39,7 +39,7 @@ div.block_list.flex ...@@ -39,7 +39,7 @@ div.block_list.flex
sib-display.bold( sib-display.bold(
fields="" fields=""
nested-field="resources" nested-field="resources"
counter-template=`<p>${counter} ${data.resourcesUploadedHere}</p>` counter-template=`<p>\${counter} ${data.resourcesUploadedHere}</p>`
bind-user bind-user
) )
......
...@@ -5,12 +5,13 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( ...@@ -5,12 +5,13 @@ sib-form#mentor_profile_edition.block_log.block_creat_count(
fields="account_information(last_name, first_name, mentorProfile.organisation,\ fields="account_information(last_name, first_name, mentorProfile.organisation,\
mentorProfile.phone, mentorProfile.languages, mentorProfile.fields),\ mentorProfile.phone, mentorProfile.languages, mentorProfile.fields),\
about_you(header_about_you, account.picture, mentorProfile.headline, mentorProfile.city, mentorProfile.country,\ about_you(header_about_you, account.picture, mentorProfile.headline, mentorProfile.city, mentorProfile.country,\
mentorProfile.biography, mentorProfile.skills, resources),\ mentorProfile.biography, mentorProfile.skills),\
social_media(header_social_media, mentorProfile.linkedin, mentorProfile.twitter), username" social_media(header_social_media, mentorProfile.linkedin, mentorProfile.twitter), username"
range-mentorProfile.fields=`${endpoints.fields}` range-mentorProfile.fields=`${endpoints.fields}`
range-mentorProfile.organisation=`${endpoints.organisations}` range-mentorProfile.organisation=`${endpoints.organisations}`
range-mentorProfile.languages=`${endpoints.languages}` range-mentorProfile.languages=`${endpoints.languages}`
range-mentorProfile.country=`${endpoints.countries}`
label-header_about_you=`${data.AboutYou}` label-header_about_you=`${data.AboutYou}`
label-header_social_media=`${data.AboutYou}` label-header_social_media=`${data.AboutYou}`
...@@ -37,7 +38,9 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( ...@@ -37,7 +38,9 @@ sib-form#mentor_profile_edition.block_log.block_creat_count(
widget-mentorProfile.skills="sib-form-textarea" widget-mentorProfile.skills="sib-form-textarea"
widget-mentorProfile.biography="sib-form-textarea" widget-mentorProfile.biography="sib-form-textarea"
widget-username="sib-form-hidden" widget-username="sib-form-hidden"
widget-resources="hidden-widget"
class-mentorProfile.country='form-label is-dark'
widget-mentorProfile.country='sib-form-auto-completion'
class-mentorProfile.organisation='form-label is-dark' class-mentorProfile.organisation='form-label is-dark'
widget-mentorProfile.organisation='sib-form-auto-completion' widget-mentorProfile.organisation='sib-form-auto-completion'
...@@ -51,7 +54,7 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( ...@@ -51,7 +54,7 @@ sib-form#mentor_profile_edition.block_log.block_creat_count(
widget-mentorProfile.fields='sib-form-auto-completion' widget-mentorProfile.fields='sib-form-auto-completion'
upload-url-account.picture=`${sdn}upload/` upload-url-account.picture=`${sdn}upload/`
widget-account.picture='cs-form-file-custom' widget-account.picture='cs-form-profile-picture'
class-account.picture='input_photo w_25' class-account.picture='input_photo w_25'
class-headline='w_75' class-headline='w_75'
......
...@@ -58,7 +58,7 @@ script(type='module'). ...@@ -58,7 +58,7 @@ script(type='module').
); );
} }
user = await store.get(user); user = await store.get(user);
console.log("Current user", user);
if (user && user.mentor_profile) { if (user && user.mentor_profile) {
window.dispatchEvent( window.dispatchEvent(
new CustomEvent('requestNavigation', { detail: { route: 'mentor-dashboard' } }) new CustomEvent('requestNavigation', { detail: { route: 'mentor-dashboard' } })
......
...@@ -89,10 +89,13 @@ function linkDatasetToField(element, targetFormName, inputName) { ...@@ -89,10 +89,13 @@ function linkDatasetToField(element, targetFormName, inputName) {
* @param {String} formId - Id of the sumitted form * @param {String} formId - Id of the sumitted form
* @param {String} listId - Id of the list to refresh * @param {String} listId - Id of the list to refresh
*/ */
function refreshList(formId, listId) { async function refreshList(formId, listId) {
let form = document.getElementById(formId); let form = document.getElementById(formId);
form.addEventListener("save", event => { form.addEventListener("save", async function() {
let list = document.getElementById(listId); let list = document.getElementById(listId);
console.log(list, list.component);
let listProxy = await list.component.resource
listProxy.clearCache();
list.dataset.src = list.dataset.src; list.dataset.src = list.dataset.src;
}); });
} }
...@@ -582,13 +585,15 @@ jQuery(document).ready(function($) { ...@@ -582,13 +585,15 @@ jQuery(document).ready(function($) {
//Retrieve the current user //Retrieve the current user
let userAccountDataSrc = document.getElementById("user-account-picture"); let userAccountDataSrc = document.getElementById("user-account-picture");
//Add the current user as reviewer. if (userAccountDataSrc) {
linkDatasetToField(userAccountDataSrc, "validation-form", "reviewer"); //Add the current user as reviewer.
linkDatasetToField(userAccountDataSrc, "improvement-dialog-form", "reviewer"); linkDatasetToField(userAccountDataSrc, "validation-form", "reviewer");
linkDatasetToField(userAccountDataSrc, "refusal-dialog-form", "reviewer"); linkDatasetToField(userAccountDataSrc, "improvement-dialog-form", "reviewer");
linkDatasetToField(userAccountDataSrc, "change_status_request", "reviewer"); linkDatasetToField(userAccountDataSrc, "refusal-dialog-form", "reviewer");
// linkDatasetToField(userAccountDataSrc, "add-like", "sender"); linkDatasetToField(userAccountDataSrc, "change_status_request", "reviewer");
// linkDatasetToField(userAccountDataSrc, "add-dislike", "sender"); // linkDatasetToField(userAccountDataSrc, "add-like", "sender");
// linkDatasetToField(userAccountDataSrc, "add-dislike", "sender");
}
//On form submission, we sometime have to refresh a list. //On form submission, we sometime have to refresh a list.
refreshList("resource-creation-form", "resources-history"); refreshList("resource-creation-form", "resources-history");
...@@ -601,14 +606,14 @@ jQuery(document).ready(function($) { ...@@ -601,14 +606,14 @@ jQuery(document).ready(function($) {
refreshList("mentor_profile_creation", "mentor_info"); refreshList("mentor_profile_creation", "mentor_info");
refreshList("mentor_profile_creation", "mentor_complementary"); refreshList("mentor_profile_creation", "mentor_complementary");
refreshList("mentor_profile_creation", "mentor_contact"); refreshList("mentor_profile_creation", "mentor_contact");
refreshList("mentor_profile_creation", "mentor-account-picture"); refreshList("mentor_profile_creation", "user-account-picture");
refreshList("entrepreneur_profile_edition", "entrepreneur_info"); refreshList("entrepreneur_profile_edition", "entrepreneur_info");
refreshList("entrepreneur_profile_edition", "entrepreneur_contact"); refreshList("entrepreneur_profile_edition", "entrepreneur_contact");
refreshList("entrepreneur_profile_edition", "entrepreneur-account-picture"); refreshList("entrepreneur_profile_edition", "entrepreneur-account-picture");
refreshList("mentor_profile_edition", "mentor_info"); refreshList("mentor_profile_edition", "mentor_info");
refreshList("mentor_profile_edition", "mentor_complementary"); refreshList("mentor_profile_edition", "mentor_complementary");
refreshList("mentor_profile_edition", "mentor_contact"); refreshList("mentor_profile_edition", "mentor_contact");
refreshList("mentor_profile_edition", "mentor-account-picture"); refreshList("mentor_profile_edition", "user-account-picture");
refreshList("change_status_request", "request-list"); refreshList("change_status_request", "request-list");
addProperFilterToSearchComponents("entrepreneur-resource-list"); addProperFilterToSearchComponents("entrepreneur-resource-list");
...@@ -648,40 +653,40 @@ jQuery(document).ready(function($) { ...@@ -648,40 +653,40 @@ jQuery(document).ready(function($) {
var formBrokenLink = document.getElementById("report-broken-link-mentor"); var formBrokenLink = document.getElementById("report-broken-link-mentor");
fillReportBrokenLinkForm(event, userWhoSubmitReport, formBrokenLink); fillReportBrokenLinkForm(event, userWhoSubmitReport, formBrokenLink);
// Fill the hidden like-form // // Fill the hidden like-form
document.querySelector('sib-auth').getUser().then(data=> { // document.querySelector('sib-auth').getUser().then(data=> {
let targetFormLike = document.getElementById('add-like'); // let targetFormLike = document.getElementById('add-like');
targetFormLike.addEventListener("populate", event => { // targetFormLike.addEventListener("populate", event => {
let resourceField = targetFormLike.querySelector(`input[name="sender"]`); // let resourceField = targetFormLike.querySelector(`input[name="sender"]`);
if (resourceField) { // if (resourceField) {
resourceField.value = JSON.stringify(data); // resourceField.value = JSON.stringify(data);
resourceField.setAttribute( // resourceField.setAttribute(
"value", // "value",
JSON.stringify(data) // JSON.stringify(data)
); // );
} // }
}); // });
let targetFormDislike = document.getElementById('add-dislike'); // let targetFormDislike = document.getElementById('add-dislike');
targetFormDislike.addEventListener("populate", event => { // targetFormDislike.addEventListener("populate", event => {
let resourceField = targetFormDislike.querySelector(`input[name="sender"]`); // let resourceField = targetFormDislike.querySelector(`input[name="sender"]`);
if (resourceField) { // if (resourceField) {
resourceField.value = JSON.stringify(data); // resourceField.value = JSON.stringify(data);
resourceField.setAttribute( // resourceField.setAttribute(
"value", // "value",
JSON.stringify(data) // JSON.stringify(data)
); // );
} // }
}); // });
}) // })
}); });
//Init the form file behaviour //Init the form file behaviour
initFileUpload() initFileUpload();
//Manage the accordion in request mentor dashboard. //Manage the accordion in request mentor dashboard.
manageAccordionForRequest() manageAccordionForRequest();
//Refresh data list on delete resources //Refresh data list on delete resources
const deleteButton = document.querySelectorAll("sib-delete"); const deleteButton = document.querySelectorAll("sib-delete");
......
...@@ -593,11 +593,11 @@ div#mentor-resource-validate cs-display-property[name="name"] p, div#entrepreneu ...@@ -593,11 +593,11 @@ div#mentor-resource-validate cs-display-property[name="name"] p, div#entrepreneu
} }
.input_photo label div{ .input_photo label div{
position: absolute; // position: absolute;
left: 25%; left: 25%;
margin-top: 3rem; // margin-top: 3rem;
} }
.input_photo label>input:first-of-type{ .input_photo input:first-of-type{
width: 10rem; width: 10rem;
height: 10rem; height: 10rem;
border-radius: 50%; border-radius: 50%;
...@@ -606,10 +606,11 @@ div#mentor-resource-validate cs-display-property[name="name"] p, div#entrepreneu ...@@ -606,10 +606,11 @@ div#mentor-resource-validate cs-display-property[name="name"] p, div#entrepreneu
cursor: pointer; cursor: pointer;
} }
.input_photo label>input[type="file"]{ .input_photo input[type="file"]{
position: absolute; position: absolute;
left: 0; left: 0;
height: 100px; width: 10rem;
height: 10rem;
opacity: 0; opacity: 0;
cursor: pointer; cursor: pointer;
} }
......
...@@ -76,10 +76,10 @@ ConfirmSendBrokenLink : The submitter of the resource will be advised that this ...@@ -76,10 +76,10 @@ ConfirmSendBrokenLink : The submitter of the resource will be advised that this
YouRequestHasBeenSubmitted : Your request has been submitted YouRequestHasBeenSubmitted : Your request has been submitted
WhatValidationProcess : What is a validation process ? WhatValidationProcess : What is a validation process ?
MentorUploadResourceToDatabase: Mentor upload a resource to the database MentorUploadResourceToDatabase: Mentor upload a resource to the database
ResourceSentToQualifiedPeersForValidation : Resource is sent to qualified peers for validation ResourceSentToQualifiedPeersForValidation: Resource is sent to qualified peers for validation
ResourceBecomesAvailableInDatabase: Resource is validated and becomes available in the database ResourceBecomesAvailableInDatabase: Resource is validated and becomes available in the database
ResourceIsNotValidated: Resource is not validated and improvement is siggested. You get a list of improvement, can edit ans re-load the resource. It goes to validation process again. ResourceIsNotValidated: Resource is not validated and improvement is suggested. You get a list of improvement, can edit and re-load the resource. It goes to validation process again.
ResourceReportedInapropriate: Resource is reported inapropriate. You get a notification with a message from your peer explaning why. ResourceReportedInapropriate: Resource is reported inappropriate. You get a notification with a message from your peer explaning why.
DeleteResource: Delete a resource DeleteResource: Delete a resource
AreYouSureDelete: Are you sure you want to delete this resource ? AreYouSureDelete: Are you sure you want to delete this resource ?
YesSureDelete : Yes I am sure, delete YesSureDelete : Yes I am sure, delete
...@@ -109,7 +109,7 @@ Send: Send -> ...@@ -109,7 +109,7 @@ Send: Send ->
SuggestImprovement: Suggest improvement SuggestImprovement: Suggest improvement
ExplainImprovementRequired: Explain improvement required* ExplainImprovementRequired: Explain improvement required*
ThanksForReview: Thanks for your review ThanksForReview: Thanks for your review
SubmitterWillReceiveReview.: The submitter of the resource will now receive a notification of your review. SubmitterWillReceiveReview: The submitter of the resource will now receive a notification of your review.
HeWillPatch : He will then be able to patch and send back the resource to validation HeWillPatch : He will then be able to patch and send back the resource to validation
ExplainReasonsRefusal: Explain reasons of refusal* ExplainReasonsRefusal: Explain reasons of refusal*
IAmMentor: I am a mentor IAmMentor: I am a mentor
......
...@@ -103,7 +103,7 @@ Send: Envoyer -> ...@@ -103,7 +103,7 @@ Send: Envoyer ->
SuggestImprovement: Suggérer des améliorations SuggestImprovement: Suggérer des améliorations
ExplainImprovementRequired: Expliquez les améliorations nécessaires*. ExplainImprovementRequired: Expliquez les améliorations nécessaires*.
ThanksForReview: Merci pour votre avis ThanksForReview: Merci pour votre avis
SubmitterWillReceiveReview.: L'auteur de la ressource recevra maintenant un avis de votre examen. SubmitterWillReceiveReview: L'auteur de la ressource recevra maintenant un avis de votre examen.
HeWillPatch : Il pourra alors corriger et renvoyer la ressource à la validation. HeWillPatch : Il pourra alors corriger et renvoyer la ressource à la validation.
ExplainReasonsRefusal: Expliquez les raisons du refus*. ExplainReasonsRefusal: Expliquez les raisons du refus*.
IAmMentor: Je suis un mentor IAmMentor: Je suis un mentor
......