import("./utils.js").then((utils) => { import(utils.coreVersion()).then((core) => { customElements.define( "solid-tzcld", class extends core.SolidTemplateElement { constructor() { super(); this.setTranslationsPath(`${utils.path()}/locales`); utils.setupOrbit(this); } static get propsDefinition() { return { //uniqCommunity: "uniq-community", parts: "parts", partsPoints: "parts-points", pointAnswers: "point-answers", followParts: "follow-parts", followPartsPoints: "follow-parts-points", followPointAnswers: "follow-point-answers", communities: "communities", myCommunities: "my-communities", territoriesTrainingCourses: "training-courses", territoriesTrainingPromotions: "training-promotions", regions: "regions", kinds: "kinds", territoriesStepStates: "territories-step-states", territoriesOriginsMobilisation: "territories-origins-mobilisation", teamUserStates: "team-user-states", apiUrl: "api-url", rangeUser: "range-user", uploads: "uploads" }; } routeurs() { let render = ` <solid-router default-route="${utils.TZCLD_URLS.my_territories}" route-prefix="tzcld"> <solid-route name="${utils.TZCLD_URLS.my_territories}"></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_space}" use-id></solid-route> </solid-router> `; return render; } viewRightMenu(default_root) { let render = ` <nav class="jsRightMenu segment sm-hidden text-disable-selection sidebar whitespace-normal" role="navigation"> <solid-router class="segment whitespace-normal text-color-heading text-bold" default-route="${utils.TZCLD_URLS.my_territory_infos}"> <ul> <li class="segment full sm-hidden padding-small text-normal jsOffsiteToggle"> <span class="icon icon-arrow-left icon-xsmall margin-left-xxsmall text-left"></span> <span class="segment full text-right" hidden=""> <span class="icon icon-arrow-right icon-xsmall margin-right-xxsmall"></span> <a data-trans="territory.menuRight.fold" class="whitespace-normal">Replier le menu</a> </span> </li> <solid-route class="segment full" name="${utils.TZCLD_URLS.my_territory_infos}" use-id=""> <li class="segment full padding-medium"> <span class="tz2icon-ion_earth-outline icon-xlarge margin-right-medium"></span> <a data-trans="territory.menuRight.presentation" class="whitespace-normal text-top padding-top-xxsmall">Présentation</a> </li> </solid-route> <solid-ac-checker permission="acl:Write" nested-field="tzcld_profile_identity" bind-resources> <solid-route class="segment full" name="${utils.TZCLD_URLS.my_territory_exchanges}" use-id="" > <li class="segment full padding-medium"> <span class="icon ci-chat icon-xlarge margin-right-medium"></span> <a data-trans="territory.menuRight.echanges" class="whitespace-normal text-top">Échanges avec mes référent-es</a> </li> </solid-route> </solid-ac-checker> <solid-ac-checker permission="acl:Write" nested-field="tzcld_profile_identity" bind-resources> <solid-route class="segment full" name="${utils.TZCLD_URLS.my_territory_auto_eval}" use-id="" > <li class="segment full padding-medium"> <span class="tz2icon-carbon_chart-evaluation icon-xlarge margin-right-medium"></span> <a data-trans="territory.menuRight.autoevaluation" class="whitespace-normal text-top padding-top-xxsmall">Auto-évaluation</a> </li> </solid-route> </solid-ac-checker> <solid-ac-checker permission="acl:Write" nested-field="tzcld_community_synthesis_followed" bind-resources> <solid-route class="segment full" name="${utils.TZCLD_URLS.my_territory_follow}" use-id="" > <li class="segment full padding-medium"> <span class="tz2icon-info icon-xlarge margin-right-medium"></span> <a data-trans="territory.menuRight.follow" class="whitespace-normal text-top padding-top-xxsmall">Suivi interne</a> </li> </solid-route> </solid-ac-checker> <solid-route name="${utils.TZCLD_URLS.my_territory_all_exchanges}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_add_exchange}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_exchange_space}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_ref_all_exchanges}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_ref_add_exchange}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_ref_exchange_space}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_follow_request_space}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_follow_requests_all}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_follow_request_add}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_shared_files_space}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_shared_files_all}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_shared_file_add}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_grappe_shared_files_space}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_grappe_shared_files_all}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_grappe_shared_file_add}" use-id></solid-route> </ul> </solid-router> </nav>`; return render; } viewWidgets() { let render = ` <solid-widget name="tzcld-orbit-shared-note-actions"> <template> <solid-ac-checker permission="acl:Write" data-src="\${value}"> <solid-link class="icon icon-pencil" data-src="\${value}" next="${utils.TZCLD_URLS.my_territory_edit_exchange}"></solid-link> </solid-ac-checker> </template> </solid-widget> <solid-widget name="tzcld-orbit-shared-note-actions-ref"> <template> <solid-ac-checker permission="acl:Write" data-src="\${value}"> <solid-link class="icon icon-pencil" data-src="\${value}" next="${utils.TZCLD_URLS.my_territory_ref_edit_exchange}"></solid-link> </solid-ac-checker> </template> </solid-widget> <solid-widget name="tzcld-orbit-folow-request-actions"> <template> <solid-ac-checker permission="acl:Write" data-src="\${value}"> <solid-link class="icon icon-pencil" data-src="\${value}" next="${utils.TZCLD_URLS.my_territory_follow_request_edit}"></solid-link> </solid-ac-checker> </template> </solid-widget> <solid-widget name="tzcld-exchanges-conversations-counter"> <template> <div class="text-right"> <span class="link margin-right-small"><solid-display fields="" data-src="\${src || value}" nested-field="conversations" counter-template="\\\${counter}"></solid-display> <span class="">Commentaires</span> </span> <solid-link class="icon icon-speech link" data-src="\${src || value}" next="${utils.TZCLD_URLS.my_territory_exchange}"> Commenter</solid-link> </div> </template> </solid-widget> <solid-widget name="tzcld-exchanges-conversations-counter-ref"> <template> <div class="text-right"> <span class="link margin-right-small"><solid-display fields="" data-src="\${src || value}" nested-field="conversations" counter-template="\\\${counter}"></solid-display> <span class="">Commentaires</span> </span> <solid-link class="icon icon-speech link" data-src="\${src || value}" next="${utils.TZCLD_URLS.my_territory_ref_exchange}"> Commenter</solid-link> </div> </template> </solid-widget> <solid-widget name="tzcld-format-date-1"> <template> <span class="">\${moment(await value.toString()).locale('fr').format('Do/MM/YY')}</span> </template> </solid-widget> <solid-widget name="tzcld-widget-ittle-accordion"> <template> <div class="tab"> <input type="checkbox" name="accordion-1" id="cb1"> <label for="cb1" class="tab__label">Checkbox</label> <div class="tab__content"> <p>Pure CSS accordion based on the "input:checked + label" style trick.</p> </div> </div> </template> </solid-widget> <solid-widget name="tzcld-format-date-1"> <template> <span class="">\${moment(await value.toString()).locale('fr').format('Do/MM/YY')}</span> </template> </solid-widget> <solid-widget name='tzcld-regions-referent-jobs'> <template> <solid-display solid-resource="" data-src="\${src || value}" fields="segment1(segment2(member-picture(account.picture)), segment3(name, segment5(tzcld_profile.jobs)), @id)" class="segment full children children-full children-margin-bottom-medium whitespace-normal" class-segment1="segment bg-color-white shadow full text-top whitespace-normal" class-segment2="segment quarter padding-medium text-center whitespace-normal" class-segment3="segment three-quarter padding-top-xxsmall padding-right-small padding-bottom-small whitespace-normal text-top" class-segment5="segment full padding-none padding-top-xsmall text-left whitespace-normal" class-member-picture="segment avatar-wrapper" class-account.picture="avatar medium" class-name="block margin-top-xlarge margin-bottom-xxsmall text-xlarge text-bold text-color-heading whitespace-normal" class-id="user-actions" widget-tzcld_profile.jobs="customtzcld-display-user-profile-first-job-referent-short" widget-account.picture="orbit-user-avatar" widget-name="h3" widget-id="tzcld-orbit-territory-team-contact-actions" next="members-member-profile" paginate-by="20" empty-value="Aucun référent désigné" empty-widget="tzcld-generic-no-result-info" ></solid-display> </span> </template> </solid-widget> <solid-widget name="tzcld-exchanges-conversations-feed"> <template> <h3 class="text-color-heading text-semibold text-letter-spacing-large">Commentaires</h3> <solid-conversation data-src="\${value}" send-button-text="Ajouter le commentaire" solid-resource="" > </solid-conversation> </template> </solid-widget> <solid-widget name="tzcld-shared-files-author-input"> <template> <label>Auteur *</label> <input type="text" value="\${value}" disabled> </template> </solid-widget> `; return render; } viewMyCommunity() { let render = ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall whitespace-normal"> <div class="loader" id="loader-${this.route}-my-community"> <div></div> <div></div> <div></div> <div></div> </div> <solid-display class="segment block whitespace-normal" fields="edit, tzcld_profile.community" loader-id="loader-${this.route}-my-community" action-edit="edit" widget-edit="communities-edit-button-${utils.community_uniq()}" bind-resources="" class-edit="segment block text-right" widget-tzcld_profile.community="customtzcld-display-territory-profile-widget" solid-resource="" `; render += `> </solid-display>`; render += ` </div>`; return render; } viewExchanges() { let render = ` <h2 class="text-color-heading text-bold text-xxxlarge text-letter-spacing-large margin-top-none padding-left-xsmall">Échanges avec mes référent-es</h2> <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall md-whitespace-normal sm-whitespace-normal"> <div class="segment two-third md-full sm-full padding-xsmall whitespace-normal last-note"> <h2 class="tzcld-h2">Notes partagées</h2> <div class="loader" id="loader-${this.route}-tzcld-exchanges"> <div></div> <div></div> <div></div> <div></div> </div> <solid-display fields="segment1(segment2( segmentProfile(memberPicture(author.account.picture), twoLinesTitle(div1(author.name), div2(title(title_prefix, date))))), longdesc, segment3(counter)), @id" class-memberPicture="segment margin-right-xsmall" class-twoLinesTitle="segment" class-author.account.picture="avatar xsmall" class-author.name="segment text-small color-fourth" class-segmentProfile="labelled-avatar two-lines xsmall" widget-author.account.picture="orbit-user-avatar" widget-segmentProfile="div" empty-value="Aucune note partagée" empty-widget="tzcld-generic-no-result-info" class="segment block whitespace-normal" class-segment1="segment hover bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal cursor-pointer" class-segment2="segment block padding-xlarge padding-bottom-small text-left" class-segment3="segment block padding-none sm-padding-medium border-top border-color-grey whitespace-normal" class-longdesc="padding-left-avatar-small padding-bottom-small" widget-title="h2" class-title="text-color-heading text-xxlarge margin-none" widget-title_prefix="span" widget-date="tzcld-format-date-1" widget-longdesc="solid-display-value-markdown" value-title_prefix="Note du " label-author.name="De " loader-id="loader-${this.route}-tzcld-exchanges" widget-id="tzcld-orbit-shared-note-actions" class-id="view-display children-link-rounded children-link-reversed color-primary bordered" bind-resources="" nested-field="tzcld_profile_identity.tzcld_admins_community_shared_notes" action-counter="counter" widget-counter="tzcld-exchanges-conversations-counter" solid-resource="" order-desc="@id" paginate-by="1" next="${utils.TZCLD_URLS.my_territory_exchange}" > </solid-display> <p class="text-right padding-right-xxlarge"><solid-link class="segment margin-top-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="${utils.TZCLD_URLS.my_territory_all_exchanges}">Voir toutes les notes</solid-link> <solid-link class="segment margin-top-xxlarge margin-left-xxlarge margin-right-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="${utils.TZCLD_URLS.my_territory_add_exchange}">Ajouter une note</solid-link></p> </div> <div class="segment third md-full sm-full padding-xsmall whitespace-normal list-referents"> <h2 class="tzcld-h2">Mes référent-es</h2> <solid-display bind-resources="" nested-field="tzcld_profile.regions" fields="referents" widget-referents="tzcld-regions-referent-jobs" > </solid-display> </div> </div>`; /* Shared files */ render += ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall md-whitespace-normal sm-whitespace-normal"> <div class="segment two-third md-full sm-full padding-xsmall whitespace-normal last-note"> <h2 class="tzcld-h2">Fichiers de suivi</h2> <div class="loader" id="loader-${this.route}-tzcld-exchanges-files"> <div></div> <div></div> <div></div> <div></div> </div> <tzcld-shared-files-display bind-resources="" nested-field="tzcld_profile_identity.tzcld_admins_community_shared_files" solid-resource="" order-desc="date" paginate-by="8" loader-id="loader-${this.route}-tzcld-exchanges-files" route-suffix="${utils.TZCLD_URLS.my_territory_shared_files_edit}" item-width="half" > </tzcld-shared-files-display> <p class="text-right padding-right-xxlarge"><solid-link class="segment margin-top-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="${utils.TZCLD_URLS.my_territory_shared_file_add}">Ajouter un fichier</solid-link></p> </div> <!-- <div class="segment third md-full sm-full padding-xsmall whitespace-normal list-files-bordered"> <h2 class="tzcld-h2">Partagés avec la grappe</h2> <div class="loader" id="loader-${this.route}-tzcld-exchanges-ref-files"> <div></div> <div></div> <div></div> <div></div> </div> <tzcld-shared-files-display bind-resources="" nested-field="tzcld_community_synthesis_followed.tzcld_referents_community_shared_files" solid-resource="" order-desc="date" paginate-by="4" loader-id="loader-${this.route}-tzcld-exchanges-ref-files" route-suffix="${utils.TZCLD_URLS.my_territory_grappe_shared_files_edit}" item-width="full" > </tzcld-shared-files-display> <p class="text-right padding-right-xxlarge"><solid-link class="segment margin-top-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="${utils.TZCLD_URLS.my_territory_grappe_shared_file_add}">Ajouter un fichier</solid-link></p> </div> --> </div> `; return render; } viewAllExchanges(suffixe ='') { let visible_note = 'admins' ; let nested_entity = 'tzcld_profile_identity.tzcld_admins_community_shared_notes' ; if (suffixe != '') { visible_note = 'referents' ; nested_entity = 'tzcld_community_synthesis_followed.tzcld_referents_community_shared_notes' ; } let render = ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall"> <div class="segment block sm-hidden text-left"> <a class="backlink text-xlarge line-xlarge margin-right-xxsmall" href="javascript:history.back();">Retour</a> </div> <p class="text-right padding-xsmall"><solid-link class="segment margin-top-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="${utils.TZCLD_URLS.my_territory_add_exchange}${suffixe}">Ajouter une note</solid-link></p> <div class="segment block padding-xsmall whitespace-normal"> <div class="loader" id="loader-${this.route}-tzcld-all-exchanges${suffixe}"> <div></div> <div></div> <div></div> <div></div> </div> <solid-display fields="segment1(segment2( segmentProfile(memberPicture(author.account.picture), twoLinesTitle(div1(author.name), div2(title(title_prefix, date))))), longdesc, segment3(counter)), @id" class-memberPicture="segment margin-right-xsmall" class-twoLinesTitle="segment" class-author.account.picture="avatar xsmall" class-author.name="segment text-small color-fourth" class-segmentProfile="labelled-avatar two-lines xsmall" widget-author.account.picture="orbit-user-avatar" widget-segmentProfile="div" empty-value="Aucune note partagée" empty-widget="tzcld-generic-no-result-info" class="segment block whitespace-normal all-exchanges-list" class-segment1="segment hover bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal cursor-pointer margin-bottom-large" class-segment2="segment block padding-xlarge padding-bottom-small text-left" class-segment3="segment block padding-none sm-padding-medium border-top border-color-grey whitespace-normal" class-longdesc="padding-left-avatar-small padding-bottom-small" widget-title="h2" class-title="text-color-heading text-xxlarge margin-none" widget-title_prefix="span" widget-date="tzcld-format-date-1" widget-longdesc="solid-display-value-markdown" value-title_prefix="Note du " label-author.name="De " loader-id="loader-${this.route}-tzcld-all-exchanges${suffixe}" widget-id="tzcld-orbit-shared-note-actions" class-id="view-display children-link-rounded children-link-reversed color-primary bordered" bind-resources="" nested-field="${nested_entity}" action-counter="counter" widget-counter="tzcld-exchanges-conversations-counter${suffixe}" solid-resource="" order-desc="@id" paginate-by="10" next="${utils.TZCLD_URLS.my_territory_exchange}${suffixe}" > </solid-display> </div> `; render += ` </div>`; return render; } viewAddExchange(suffixe ='') { let visible_note = 'admins' ; let nested_entity = 'tzcld_profile_identity.tzcld_admins_community_shared_notes' ; if (suffixe != '') { visible_note = 'referents' ; nested_entity = 'tzcld_community_synthesis_followed.tzcld_referents_community_shared_notes' ; } let render = ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall"> <div class="segment block sm-hidden text-left"> <a class="backlink text-xlarge line-xlarge margin-right-xxsmall" href="javascript:history.back();">Retour</a> </div> <div class="segment full padding-xsmall whitespace-normal"> <div class="loader" id="loader-${this.route}-tzcld-add-exchange${suffixe}"> <div></div> <div></div> <div></div> <div></div> </div> <solid-form onsubmit="javascript:history.back();" fields="segment1(segment2(title(title_prefix), longdesc))" class="segment block whitespace-normal form" class-segment1="segment bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal" class-segment2="segment block padding-xlarge text-left" class-segment3="segment block padding-xlarge sm-padding-medium border-top border-color-grey text-center whitespace-normal" widget-title="h2" class-title="margin-bottom-large margin-top-none margin-left-none text-xlarge text-xbold text-color-heading text-color-dark-blue" widget-title_prefix="span" value-title_prefix="Nouvelle note" label-longdesc="Contenu de la note :" class-longdesc="segment margin-bottom-medium full sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" widget-longdesc="solid-form-richtext-label" loader-id="loader-${this.route}-tzcld-add-exchange${suffixe}" bind-resources="" nested-field="${nested_entity}" solid-resource="" patrtial submit-button="Enregistrer" submit-widget="button" class-submit-button="submit-button segment sm-full margin-top-xsmall text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-reversed color-secondary bordered children-button-icon children-icon-rocket children-icon-small children-icon-margin-right-xsmall" > </solid-form> </div> `; render += ` </div>`; return render; } viewEditExchange(suffixe ='') { let render = ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall"> <div class="segment block sm-hidden text-left"> <a class="backlink text-xlarge line-xlarge margin-right-xxsmall" href="javascript:history.back();">Retour</a> </div> <div class="segment full padding-xsmall whitespace-normal"> <div class="loader" id="loader-${this.route}-tzcld-edit-exchange${suffixe}"> <div></div> <div></div> <div></div> <div></div> </div> <solid-form onsubmit="javascript:history.back();" fields="segment1(segment2(title(title_prefix), longdesc))" class="segment block whitespace-normal form" class-segment1="segment bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal" class-segment2="segment block padding-xlarge text-left" class-segment3="segment block padding-xlarge sm-padding-medium border-top border-color-grey text-center whitespace-normal" widget-title="h2" widget-title_prefix="span" value-title_prefix="Modification de la note" class-title="margin-bottom-large margin-top-none margin-left-none text-xlarge text-xbold text-color-heading text-color-dark-blue" label-longdesc="Contenu de la note :" widget-longdesc-old="solid-form-textarea-label" class-longdesc="segment margin-bottom-medium full sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" widget-longdesc="solid-form-richtext-label" loader-id="loader-${this.route}-tzcld-edit-exchange${suffixe}" bind-resources="" solid-resource="" patrtial submit-button="Enregistrer" submit-widget="button" class-submit-button="submit-button segment sm-full margin-top-xsmall text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-reversed color-secondary bordered children-button-icon children-icon-rocket children-icon-small children-icon-margin-right-xsmall" > </solid-form> </div> `; render += ` </div>`; return render; } viewExchange(suffixe ='') { let visible_note = 'admins' ; if (suffixe != '') { visible_note = 'referents' ; } let render = ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall"> <div class="segment block sm-hidden text-left"> <a class="backlink text-xlarge line-xlarge margin-right-xxsmall" href="javascript:history.back();">Retour</a> </div> <div class="segment block padding-xsmall whitespace-normal"> <div class="loader" id="loader-${this.route}-tzcld-exchange${suffixe}"> <div></div> <div></div> <div></div> <div></div> </div> <solid-display fields="segment1(segment2( segmentProfile(memberPicture(author.account.picture), twoLinesTitle(div1(author.name), div2(title(title_prefix, date))))), longdesc, segment3(counter)), @id" class-memberPicture="segment margin-right-xsmall" class-twoLinesTitle="segment" class-author.account.picture="avatar xsmall" class-author.name="segment text-small color-fourth" class-segmentProfile="labelled-avatar two-lines xsmall" widget-author.account.picture="orbit-user-avatar" widget-segmentProfile="div" empty-value="Aucune note partagée" empty-widget="tzcld-generic-no-result-info" class="segment block whitespace-normal" class-segment1="segment hover bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal" class-segment2="segment block padding-xlarge padding-bottom-small text-left" class-segment3="segment block padding-none sm-padding-medium border-top border-color-grey whitespace-normal" class-longdesc="padding-left-avatar-small padding-bottom-small" widget-title="h2" class-title="text-color-heading text-xxlarge margin-none" widget-title_prefix="span" widget-date="tzcld-format-date-1" widget-longdesc="solid-display-value-markdown" value-title_prefix="Note du " label-author.name="De " loader-id="loader-${this.route}-tzcld-exchange${suffixe}" widget-id="tzcld-orbit-shared-note-actions${suffixe}" class-id="view-display children-link-rounded children-link-reversed color-primary bordered" bind-resources="" solid-resource="" > </solid-display> </div> <!-- <div class="segment block padding-xsmall sm-padding-xsmall sm-padding-top-normal whitespace-normal bg-color-grey wrapper-resource-comments"> <div class="segment full sm-full"> <div class="loader" id="loader-${this.route}-tzcld-exchange-conversations-feed${suffixe}"> <div></div> <div></div> <div></div> <div></div> </div> <solid-display fields="conversations" class="segment block whitespace-normal" widget-conversations="tzcld-exchanges-conversations-feed" loader-id="loader-${this.route}-tzcld-exchange-conversations-feed${suffixe}" bind-resources="" solid-resource="" > </solid-display> </div> </div> --> `; render += ` </div>`; return render; } viewMyCommunities() { let render = ` <div id="${utils.TZCLD_URLS.my_territories}" data-view="${utils.TZCLD_URLS.my_territories}" class="tzcld-my-communities"> <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-xlarge sm-padding-xsmall whitespace-normal"> <h2 class="margin-top-xxsmall margin-left-xsmall margin-bottom-medium sm-margin-none sm-margin-right-xsmall sm-margin-bottom-small sm-margin-left-xsmall text-xlarge text-bold text-color-heading text-uppercase">Mes territoires</h2> <solid-form-search class="form search-form sm-whitespace-normal" id="my-communities-filter" fields="name, segment1(tzcld_profile.regions, tzcld_profile.kind, tzcld_profile.step_state, tzcld_profile.visible)" value-tzcld_profile.visible=true class-tzcld_profile.visible="hidden" class-name="segment margin-bottom-small full sm-full padding-right-xsmall padding-left-xsmall sm-padding-none input-shadow input-bg-white icon icon-magnify text-xlarge text-semibold text-color-heading" submit-button="Rechercher" submit-widget="button" class-submit-button="search-button segment sm-full text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered children-button-icon children-icon-arrow-right-circle children-icon-small children-icon-margin-right-xsmall text-right block padding-right-xsmall padding-left-xsmall " class-segment1="segment full padding-right-xsmall padding-left-xsmall rowClear" range-tzcld_profile.regions="${this.regions}" widget-tzcld_profile.regions="solid-form-multipleselect-autocompletion-label" class-tzcld_profile.regions="segment margin-bottom-medium third sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading" range-tzcld_profile.kind="${this.kinds}" widget-tzcld_profile.kind="solid-form-multipleselect-autocompletion-label" class-tzcld_profile.kind="segment margin-bottom-medium third sm-full padding-left-small sm-padding-none text-xlarge text-semibold text-color-heading" range-tzcld_profile.step_state="${this.territoriesStepStates}" widget-tzcld_profile.step_state="solid-form-multipleselect-autocompletion-label" class-tzcld_profile.step_state="segment margin-bottom-medium third sm-full padding-left-small sm-padding-none text-xlarge text-semibold text-color-heading" label-name="Nom du territoire" label-tzcld_profile.kind="Type de territoire" label-tzcld_profile.regions="Régions" label-tzcld_profile.step_state="Etat d'avancement" order-asc-tzcld_profile.regions="name" order-asc-tzcld_profile.kind="name" order-asc-tzcld_profile.step_state="name" naked=""> </solid-form-search> <solid-display solid-resource loader-id="loader-${this.route}-my-communities" data-src ="${this.myCommunities}" next="${utils.TZCLD_URLS.my_territory_infos}" class="segment full children children-quarter sm-children-full children-margin-bottom-medium sm-children-margin-bottom-xsmall children-padding-right-xsmall children-padding-left-xsmall sm-children-padding-none sm-whitespace-normal masonry pagination text-disable-selection" fields="segment1(segment2(logo), segment3(name, tzcld_profile.regions, tzcld_profile.kind, tzcld_profile.step_state, counter))" filtered-by="my-communities-filter" order-by="name" paginate-by="20" class-segment1="segment hover bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal cursor-pointer" class-segment2="segment block padding-xlarge text-center" class-segment3="segment full padding-large padding-top-xlarge sm-padding-medium border-top border-color-grey text-center whitespace-normal" class-name="segment block one-line-ellipsis text-xlarge text-bold text-color-heading margin-bottom-xsmall" class-profile.shortdescription="segment two-lines-ellipsis margin-bottom-xlarge sm-margin-bottom-medium whitespace-normal circle-subtitle-custom" class-counter="segment block margin-top-large whitespace-normal" widget-logo="tzcld-communities-logo" action-counter="counter" widget-counter="tzcld-communities-counter-alternate" order-asc="name" widget-tzcld_profile.regions="customtzcld-list-territory-regions" widget-tzcld_profile.kind="customtzcld-list-territory-kind" widget-tzcld_profile.step_state="customtzcld-list-territory-step-state" > </solid-display> <div class="loader" id="loader-${this.route}-my-communities"> <div></div> <div></div> <div></div> <div></div> </div>`; render += ` </div> </div>`; return render; } viewCommunityAnswers() { let render = ` <solid-widget name="customtzcld-form-territory-political-deputy"> <template> <solid-form class="d-block rowClear form-hide-submit" data-src="\${value}" data-holder partial fields="segment1(deputy, circonscription)" class-segment1="segment full sm-full rowClear" class-deputy="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" class-circonscription="segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" label-deputy="Député-e *" label-circonscription="Circonscription" widget-circonscription="solid-form-dropdown-label" order-asc-circonscription="name" range-circonscription="${this.apiUrl}tzcld-circonscriptions/" required-deputy ></solid-form> </template> </solid-widget> <solid-widget name="customtzcld-form-territory-political-senator"> <template> <solid-form class="d-block rowClear form-hide-submit" data-src="\${value}" data-holder partial fields="segment1(senator, circonscription)" class-segment1="segment full sm-full rowClear" class-senator="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" class-circonscription="segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" label-senator="Sénateur-ice *" label-circonscription="Circonscription" widget-circonscription="solid-form-dropdown-label" order-asc-circonscription="name" range-circonscription="${this.apiUrl}tzcld-departments/" required-senator ></solid-form> </template> </solid-widget> <solid-widget name="customtzcld-form-territory-project-team-memeber"> <template> <solid-form class="d-block rowClear form-hide-submit" data-src="\${value}" data-holder partial solid-form-dropdown-autocompletion-label fields="segment1(user, user_state, attachment_structure, etp)" class-segment1="segment full sm-full rowClear" class-user="segment margin-bottom-medium quarter md-half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" class-user_state="segment margin-bottom-medium quarter md-half sm-full padding-left-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" class-attachment_structure="segment margin-bottom-medium quarter md-half sm-full padding-left-small md-padding-left-none md-padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" class-etp="segment margin-bottom-medium quarter md-half sm-full padding-left-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" label-user="Prénom et nom *" label-user_state="Statut de la personne *" label-etp="ETP consacré au projet" label-attachment_structure="Structure de rattachement" required-user required-user_state widget-user="solid-form-dropdown-autocompletion-label" range-user="${this.rangeUser}" order-asc-user="name" widget-user_state="solid-form-dropdown-label" range-user_state="${this.teamUserStates}" order-asc-user_state="order" ></solid-form> </template> </solid-widget> <solid-widget name="customtzcld-form-territory-training"> <template> <solid-form class="d-block rowClear form-hide-submit" data-src="\${value}" data-holder partial fields="segment1(training_course, training_promotion, training_person)" class-segment1="segment full sm-full rowClear" class-training_course="segment margin-bottom-medium third md-half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" class-training_promotion="segment margin-bottom-medium third md-half sm-full padding-left-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" class-training_person="segment margin-bottom-medium third md-half sm-full padding-left-small md-padding-left-none md-padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading whitespace-normal" label-training_course="Choix du parcours suivi *" label-training_promotion="Numéro de promotion *" required-training_course required-training_promotion label-training_person="Personne ayant suivi la formation" range-training_course="${this.territoriesTrainingCourses}" order-asc-training_course="name" range-training_promotion="${this.territoriesTrainingPromotions}" order-asc-training_promotion="name" widget-training_course="solid-form-dropdown-label" widget-training_promotion="solid-form-dropdown-label" ></solid-form> </template> </solid-widget> <h2 class="margin-none margin-bottom-medium sm-margin-none sm-margin-right-xsmall sm-margin-bottom-small sm-margin-left-xsmall text-color-heading text-bold text-xxxlarge text-letter-spacing-large">Etat d'avancement</h2> <solid-display bind-resources solid-resource fields="tzcld_profile" widget-tzcld_profile="autoeval-graph" ></solid-display> <div class="segment full shadow bg-color-white margin-bottom-large padding-large padding-left-small whitespace-normal child-accordion"> <h2 class="margin-none margin-top-none margin-left-none text-xlarge text-xbold text-color-heading text-color-dark-blue">Carte d’identité du territoire</h2> <solid-form class="form hidden segment block margin-top-large whitespace-normal padding-left-large padding-right-small" bind-resources solid-resource partial autosave nested-field="tzcld_profile_identity" loader-id="loader-${this.route}-general-answer" fields="segment(birth_date, origin_mobilization), segment1(emergence_date, habilitation_date), territories_political_landscape_deputies_title, territories_political_landscape_deputies, territories_political_landscape_senators, territories_project_team_memebers_title, territories_project_team_memebers, territories_trainings_title, territories_trainings, spacer" label-segment="Panorama du territoire" label-segment1="" widget-birth_date="solid-form-text-label" widget-territories_political_landscape_deputies_title="h3" value-territories_political_landscape_deputies_title="Paysage politique / institutionnel" widget-territories_project_team_memebers_title="h3" value-territories_project_team_memebers_title="Equipe projet" widget-territories_trainings_title="h3" value-territories_trainings_title="Participation aux formations TZCLD" label-segment2="Portage de la demande de reconnaissance" class-segment="segment full sm-whitespace-normal" class-segment1="segment full sm-whitespace-normal" class-segment2="segment full sm-whitespace-normal" label-birth_date="Année de naissance du projet" label-origin_mobilization="Origine de la mobilisation" label-emergence_date="Date de reconnaissance en tant que projet émergent" label-habilitation_date="Date d’habilitation" class-birth_date="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge form" class-origin_mobilization="segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" class-emergence_date="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" class-habilitation_date="segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" widget-origin_mobilization="solid-form-dropdown-label" range-origin_mobilization="${this.territoriesOriginsMobilisation}" order-asc-origin_mobilization="name" widget-emergence_date="solid-form-date-label" widget-habilitation_date="solid-form-date-label" multiple-territories_political_landscape_deputies widget-territories_political_landscape_deputies="customtzcld-form-territory-political-deputy" multiple-territories_political_landscape_deputies-add-label= "Ajouter un-e député-e" multiple-territories_political_landscape_deputies-remove-label= "Supprimer" multiple-territories_political_landscape_senators widget-territories_political_landscape_senators="customtzcld-form-territory-political-senator" multiple-territories_political_landscape_senators-add-label= "Ajouter un-e sénateur-ice" multiple-territories_political_landscape_senators-remove-label= "Supprimer" multiple-territories_project_team_memebers widget-territories_project_team_memebers="customtzcld-form-territory-project-team-memeber" multiple-territories_project_team_memebers-add-label= "Ajouter une personne" multiple-territories_project_team_memebers-remove-label= "Supprimer" multiple-territories_trainings widget-territories_trainings="customtzcld-form-territory-training" multiple-territories_trainings-add-label= "Ajouter une personne" multiple-territories_trainings-remove-label= "Supprimer" class-spacer="segment third sm-hidden" order-asc-tzcld_profile.step_state="name" order-asc-tzcld_profile.kind="name" order-asc-tzcld_profile.regions="name" order-asc-tzcld_profile.departments="name" widget-spacer="span"> </solid-form> <div class="loader" id="loader-${this.route}-general-answer"> <div></div> <div></div> <div></div> <div></div> </div> </div> <div class="segment block shadow bg-color-white sm-margin-none"> <div class="loader" id="loader-${this.route}-auto-answer"> <div></div> <div></div> <div></div> <div></div> </div> <tzcld-autoeval class="tzcld-autoeval" bind-resources="" loader-id="loader-${this.route}-auto-answer" parts ="${this.parts}" parts-points ="${this.partsPoints}" point-answers ="${this.pointAnswers}" api-url ="${this.apiUrl}" solid-resource `; render += `> </tzcld-autoeval>`; render += ` </div>`; return render; } viewCommunityFollow() { let render = ` <h2 class="margin-left-xsmall margin-none sm-margin-none sm-margin-right-xsmall sm-margin-bottom-small sm-margin-left-xsmall text-color-heading text-bold text-xxxlarge text-letter-spacing-largee">Suivi interne</h2> <div class="padding-bottom-none community-exchanges home"> <h2 class="tzcld-h2">Notes partagées</h2> <div class="loader" id="loader-${this.route}-tzcld-exchanges-ref"> <div></div> <div></div> <div></div> <div></div> </div> <solid-display fields="segment1(segment2( segmentProfile(memberPicture(author.account.picture), twoLinesTitle(div1(author.name), div2(title(title_prefix, date))))), longdesc, segment3(counter)), @id" class-memberPicture="segment margin-right-xsmall" class-twoLinesTitle="segment" class-author.account.picture="avatar xsmall" class-author.name="segment text-small color-fourth" class-segmentProfile="labelled-avatar two-lines xsmall" widget-author.account.picture="orbit-user-avatar" widget-segmentProfile="div" empty-value="Aucune note partagée" empty-widget="tzcld-generic-no-result-info" class="segment block whitespace-normal" class-segment1="segment hover bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal cursor-pointer" class-segment2="segment block padding-xlarge padding-bottom-small text-left" class-segment3="segment block padding-none sm-padding-medium border-top border-color-grey whitespace-normal" class-longdesc="padding-left-avatar-small padding-bottom-small" widget-title="h2" class-title="text-color-heading text-xxlarge margin-none" widget-title_prefix="span" widget-date="tzcld-format-date-1" widget-longdesc="solid-display-value-markdown" value-title_prefix="Note du " label-user.name="De " loader-id="loader-${this.route}-tzcld-exchanges-ref" widget-id="tzcld-orbit-shared-note-actions-ref" class-id="view-display children-link-rounded children-link-reversed color-primary bordered" bind-resources="" nested-field="tzcld_community_synthesis_followed.tzcld_referents_community_shared_notes" action-counter="counter" widget-counter="tzcld-exchanges-conversations-counter-ref" solid-resource="" order-desc="@id" paginate-by="1" next="${utils.TZCLD_URLS.my_territory_ref_exchange}" > </solid-display> <p class="text-right"><solid-link class="segment margin-top-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="${utils.TZCLD_URLS.my_territory_ref_all_exchanges}">Voir toutes les notes</solid-link> <solid-link class="segment margin-top-xxlarge margin-left-xxlarge margin-right-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="${utils.TZCLD_URLS.my_territory_ref_add_exchange}">Ajouter une note</solid-link></p> </div> <div class="padding-bottom-none"> <h2 class="margin-none margin-bottom-xsmall tzcld-h2">Historique des échanges</h2> <div class="segment table-wrapper"> <div class="table"> <solid-form-search id="tzcld-history-request-sorter" class="hidden" fields="field, order" enum-field="date" class-field="hidden" value-field="date" value-order="desc" enum-order="asc = asc, desc = desc" ></solid-form-search> <solid-table header class="table-requests block shadow bg-color-white pagination" bind-resources="" nested-field="tzcld_community_requests" fields="date, contactType, user.name, subject, @id" label-date="Date" class-label-date="Date" label-contactType="Type de contact" label-user.name="Interlocuteur" label-subject="Sujet/demande" label-@id=" " class-date="text-center whitespace-normal" class-contactType="whitespace-normal" class-user.name="" class-subject="whitespace-normal" widget-date="tzcld-format-date-1" widget-id="tzcld-orbit-folow-request-actions" sorted-by="tzcld-history-request-sorter" paginate-by="5" > </solid-table> </div> <p class="text-right"><solid-link class="segment margin-top-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="${utils.TZCLD_URLS.my_territory_follow_requests_all}">Voir tout</solid-link> <solid-link class="segment margin-top-xxlarge margin-left-xxlarge margin-right-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="${utils.TZCLD_URLS.my_territory_follow_request_add}">Ajouter</solid-link></p> </div> </div> <div class="segment block sm-margin-none padding-bottom-none"> <div class="segment full shadow bg-color-white padding-large padding-left-small sm-padding-none whitespace-normal child-accordion"> <h2 class="margin-none text-xlarge text-xbold text-color-heading">Synthèse</h2> <solid-form class="form hidden segment block margin-top-large whitespace-normal padding-left-large padding-right-small" bind-resources solid-resource partial autosave nested-field="tzcld_profile_identity" loader-id="loader-${this.route}-general-follow" fields="segment(context, strongPoints), segment1(questions, needs), segment2(targetdate), spacer" class-segment="segment full" class-segment1="segment full" class-segment2="segment full" label-context="Contexte" label-strongPoints="Points forts" label-questions="Interrogations / Risques / Difficultés" label-needs="Besoins d'accompagnement / Actions à suivre" label-targetdate="Date souhaitée de dépôt de candidature" class-context="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" class-strongPoints="segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" class-questions="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" class-needs="segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" class-targetdate="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" widget-context="solid-form-textarea-label" widget-strongPoints="solid-form-textarea-label" widget-questions="solid-form-textarea-label" widget-needs="solid-form-textarea-label" widget-targetdate="solid-form-date-label" class-spacer="segment third sm-hidden" widget-spacer="span"> </solid-form> <div class="loader" id="loader-${this.route}-general-follow"> <div></div> <div></div> <div></div> <div></div> </div> </div> </div> <div class="segment block sm-margin-none"> <div class="loader" id="loader-${this.route}-follow-answer"> <div></div> <div></div> <div></div> <div></div> </div> <tzcld-follow class="tzcld-follow" bind-resources="" loader-id="loader-${this.route}-follow-answer" parts ="${this.followParts}" parts-points ="${this.followPartsPoints}" point-answers ="${this.followPointAnswers}" solid-resource `; render += `> </tzcld-follow>`; render += ` </div>`; return render; } viewCommunityFollowRequestsAll() { let render = ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall"> <div class="segment block sm-hidden text-left"> <a class="backlink text-xlarge line-xlarge margin-right-xxsmall" href="javascript:history.back();">Retour</a> </div> <h2 class="margin-top-xxsmall margin-left-xsmall margin-bottom-medium sm-margin-none sm-margin-right-xsmall sm-margin-bottom-small sm-margin-left-xsmall text-xlarge text-bold text-color-heading text-uppercase">Suivi interne - échanges</h2> <p class="text-right padding-none margin-none"><solid-link class="segment margin-top-xxlarge sm-full button text-xsmall text-bold text-uppercase text-center color-secondary bordered button-icon icon icon-square-edit icon-margin-right-xsmall" bind-resources next="${utils.TZCLD_URLS.my_territory_follow_request_add}">Ajouter un échange</solid-link></p> <div class="margin-bottom-large"> <h2 class="margin-none margin-bottom-xsmall text-xlarge text-xbold text-color-heading">Historique des échanges</h2> <div class="segment block"> <div class=""> <solid-form-search id="tzcld-history-all-requests-sorter" class="hidden" fields="field, order" enum-field="date" class-field="hidden" value-field="date" value-order="desc" enum-order="asc = asc, desc = desc" ></solid-form-search> <solid-table header class="table-requests block shadow bg-color-white pagination" bind-resources="" nested-field="tzcld_community_requests" fields="date, contactType, user.name, subject, @id" label-date="Date" class-label-date="Date" label-contactType="Type de contact" label-user.name="Interlocuteur" label-subject="Sujet/demande" label-@id=" " class-date="text-center whitespace-normal" class-contactType="whitespace-normal" class-user.name="" class-subject="whitespace-normal" widget-date="tzcld-format-date-1" widget-id="tzcld-orbit-folow-request-actions" sorted-by="tzcld-history-all-requests-sorter" paginate-by="20" > </solid-table> </div> </div> </div> `; render += ` </div>`; return render; } viewCommunityFollowRequestAdd() { let render = ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall"> <div class="segment block sm-hidden text-left"> <a class="backlink text-xlarge line-xlarge margin-right-xxsmall" href="javascript:history.back();">Retour</a> </div> <div class="segment full padding-xsmall whitespace-normal"> <div class="loader" id="loader-${this.route}-${utils.TZCLD_URLS.my_territory_follow_request_add}"> <div></div> <div></div> <div></div> <div></div> </div> <solid-form onsubmit="javascript:history.back();" fields="segment1(segment2(title(title_prefix), segment3(date, contactType), segment4(user, subject)))" class="segment block whitespace-normal form" class-visible="hidden" value-visible="admins" class-segment1="segment bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal" class-segment2="segment block padding-xlarge text-left" class-segment3="segment block" class-segment4="segment block" class-date="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" class-contactType="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading" class-user="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading text-top" class-subject="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" widget-title="h2" class-title="margin-bottom-large margin-top-none margin-left-none text-xlarge text-xbold text-color-heading text-color-dark-blue" widget-title_prefix="span" value-title_prefix="Ajout d'un échange" label-date="Date *" label-contactType="Type de contact" label-subject="Sujet/demande" label-user="Interlocuteur" widget-date="solid-form-date-label" widget-subject="solid-form-textarea-label" widget-user="solid-form-dropdown-autocompletion-label" order-asc-user="name" range-user="${this.rangeUser}" loader-id="loader-${this.route}-${utils.TZCLD_URLS.my_territory_follow_request_add}" bind-resources="" nested-field="tzcld_community_requests" solid-resource="" patrtial submit-button="Enregistrer" submit-widget="button" class-submit-button="submit-button segment sm-full margin-top-xsmall text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-reversed color-secondary bordered children-button-icon children-icon-rocket children-icon-small children-icon-margin-right-xsmall" required-date > </solid-form> </div> `; render += ` </div>`; return render; } viewCommunityFollowRequestEdit() { let render = ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall"> <div class="segment block sm-hidden text-left"> <a class="backlink text-xlarge line-xlarge margin-right-xxsmall" href="javascript:history.back();">Retour</a> </div> <div class="segment full padding-xsmall whitespace-normal"> <div class="loader" id="loader-${this.route}-${utils.TZCLD_URLS.my_territory_follow_request_edit}"> <div></div> <div></div> <div></div> <div></div> </div> <solid-form onsubmit="javascript:history.back();" fields="segment1(segment2(title(title_prefix), segment3(date, contactType), segment4(user, subject)))" class="segment block whitespace-normal form" class-visible="hidden" value-visible="admins" class-segment1="segment bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal" class-segment2="segment block padding-xlarge text-left" class-segment3="segment block" class-segment4="segment block" class-date="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" class-contactType="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading" class-user="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading text-top" class-subject="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" widget-title="h2" class-title="margin-bottom-large margin-top-none margin-left-none text-xlarge text-xbold text-color-heading text-color-dark-blue" widget-title_prefix="span" value-title_prefix="Modifier un échange" label-date="Date *" label-contactType="Type de contact" label-subject="Sujet/demande" label-user="Interlocuteur" widget-date="solid-form-date-label" widget-subject="solid-form-textarea-label" widget-user="solid-form-dropdown-label" order-asc-user="name" range-user="${this.rangeUser}" loader-id="loader-${this.route}-${utils.TZCLD_URLS.my_territory_follow_request_edit}" bind-resources="" solid-resource="" patrtial submit-button="Enregistrer" submit-widget="button" class-submit-button="submit-button segment sm-full margin-top-xsmall text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-reversed color-secondary bordered children-button-icon children-icon-rocket children-icon-small children-icon-margin-right-xsmall" required-date > </solid-form> </div> `; render += ` </div>`; return render; } viewCommunitySharedFileEdit(nested = false) { let nested_value = 'tzcld_profile_identity.tzcld_admins_community_shared_files' ; if (nested) { nested_value = nested ; } let render = ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall"> <div class="segment block sm-hidden text-left"> <a class="backlink text-xlarge line-xlarge margin-right-xxsmall" href="javascript:history.back();">Retour</a> </div> <div class="segment full padding-xsmall whitespace-normal"> <div class="loader" id="loader-${this.route}-${utils.TZCLD_URLS.my_territory_shared_files_edit}-${nested}"> <div></div> <div></div> <div></div> <div></div> </div> <solid-form onsubmit="javascript:history.back();" fields="segment1(segment2(title(title_prefix), segment3(name, document), segment4(author.name)))" class="segment block whitespace-normal form" class-visible="hidden" value-visible="admins" class-segment1="segment bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal" class-segment2="segment block padding-xlarge text-left" class-segment3="segment block" class-segment4="segment block" class-date="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" class-document="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading text-top" class-author.name="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading text-top" class-name="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge text-top" widget-title="h2" class-title="margin-bottom-large margin-top-none margin-left-none text-xlarge text-xbold text-color-heading text-color-dark-blue" widget-title_prefix="span" value-title_prefix="Editer le document" upload-url-document="${this.uploads}" widget-document="solid-form-file-label" label-name="Titre *" label-document="Document *" widget-date="solid-form-date-label" widget-subject="solid-form-textarea-label" widget-author.name="tzcld-shared-files-author-input" loader-id="loader-${this.route}-${utils.TZCLD_URLS.my_territory_shared_files_edit}-${nested}" bind-resources="" solid-resource="" patrtial submit-button="Enregistrer" submit-widget="button" class-submit-button="submit-button segment sm-full margin-top-xsmall text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-reversed color-secondary bordered children-button-icon children-icon-rocket children-icon-small children-icon-margin-right-xsmall" required-document required-name > </solid-form> </div> `; render += ` </div>`; return render; } viewCommunitySharedFileAdd(nested = false) { let nested_value = 'tzcld_profile_identity.tzcld_admins_community_shared_files' ; if (nested) { nested_value = nested ; } let render = ` <div class="segment block margin-right-xxsmall margin-left-xxsmall sm-margin-none padding-top-none sm-padding-xsmall"> <div class="segment block sm-hidden text-left"> <a class="backlink text-xlarge line-xlarge margin-right-xxsmall" href="javascript:history.back();">Retour</a> </div> <div class="segment full padding-xsmall whitespace-normal"> <div class="loader" id="loader-${this.route}-${utils.TZCLD_URLS.my_territory_shared_file_add}-${nested}"> <div></div> <div></div> <div></div> <div></div> </div> <solid-form onsubmit="javascript:history.back();" fields="segment1(segment2(title(title_prefix), segment3(name, document)))" class="segment block whitespace-normal form" class-segment1="segment bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal" class-segment2="segment block padding-xlarge text-left" class-segment3="segment block" class-date="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge" class-document="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading text-top" class-author="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-xlarge text-semibold text-color-heading text-top" class-name="segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-color-heading whitespace-normal text-xlarge text-top" widget-title="h2" class-title="margin-bottom-large margin-top-none margin-left-none text-xlarge text-xbold text-color-heading text-color-dark-blue" widget-title_prefix="span" value-title_prefix="Nouveau document" upload-url-document="${this.uploads}" widget-document="solid-form-file-label" label-document="Document *" label-name="Titre du document *" loader-id="loader-${this.route}-${utils.TZCLD_URLS.my_territory_shared_file_add}-${nested}" bind-resources="" nested-field="${nested_value}" solid-resource="" patrtial submit-button="Enregistrer" submit-widget="button" class-submit-button="submit-button segment sm-full margin-top-xsmall text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-reversed color-secondary bordered children-button-icon children-icon-rocket children-icon-small children-icon-margin-right-xsmall" required-document required-name > </solid-form> </div> `; render += ` </div>`; return render; } tzcldBreadcrum(subNext= false, subText= false, nested= false) { let nestedField = '' ; if (nested) { nestedField = ` nested-field="${nested}"` ; } let render = `<div class="tzcld-breadcrum"> <customtzcld-display-breadcrum-my-territory bind-resources soid-resource${nestedField}></customtzcld-display-breadcrum-my-territory>` ; if (subNext && subText) { render += ` > <solid-link next="${subNext}" link-text="">${subText}</solid-link> `; } render += ` </div>`; return render ; } template(props) { this.uniq = props.uniq || utils.uniq(); this.parts = props.parts; this.partsPoints = props.partsPoints; this.pointAnswers = props.pointAnswers; this.followParts = props.followParts; this.followPartsPoints = props.followPartsPoints; this.followPointAnswers = props.followPointAnswers; this.communities = props.communities ; this.myCommunities = props.myCommunities ; this.territoriesTrainingCourses = props.territoriesTrainingCourses ; this.territoriesTrainingPromotions = props.territoriesTrainingPromotions ; this.regions = props.regions ; this.kinds = props.kinds ; this.territoriesStepStates = props.territoriesStapeStates ; this.territoriesOriginsMobilisation = props.territoriesOriginsMobilisation ; this.teamUserStates = props.teamUserStates ; this.apiUrl = props.apiUrl ; this.rangeUser = props.rangeUser ; this.uploads = props.uploads ; //console.table(props); this.route = this.getRoute(this.uniq); let nested_shared_ref_value = 'tzcld_community_synthesis_followed.tzcld_referents_community_shared_files' ; let render = ` ${this.routeurs()} ${this.viewWidgets()} ${this.viewMyCommunities()} <div id="${utils.TZCLD_URLS.my_territory_space}" data-view="${utils.TZCLD_URLS.my_territory_space}" hidden> <div class="with-sidebar whitespace-normal jsMobileContentSidebarControl"> <div class="scrollbar-content views-container padding-top-xlarge padding-right-small sidebar-is-closed"> <div id="${utils.TZCLD_URLS.my_territory_infos}" data-view="${utils.TZCLD_URLS.my_territory_infos}" class="community-my-community community-profile" hidden> ${this.tzcldBreadcrum()} ${this.viewMyCommunity()} </div> <div id="${utils.TZCLD_URLS.my_territory_exchanges}" data-view="${utils.TZCLD_URLS.my_territory_exchanges}" class="community-exchanges home" hidden> ${this.tzcldBreadcrum()} ${this.viewExchanges()} </div> <div id="${utils.TZCLD_URLS.my_territory_add_exchange}" data-view="${utils.TZCLD_URLS.my_territory_add_exchange}" class="community-exchanges add" hidden> ${this.tzcldBreadcrum(utils.TZCLD_URLS.my_territory_exchanges, 'Échanges avec mes référent-es')} ${this.viewAddExchange()} </div> <div id="${utils.TZCLD_URLS.my_territory_all_exchanges}" data-view="${utils.TZCLD_URLS.my_territory_all_exchanges}" class="community-exchanges all" hidden> ${this.tzcldBreadcrum(utils.TZCLD_URLS.my_territory_exchanges, 'Échanges avec mes référent-es')} ${this.viewAllExchanges()} </div> <div id="${utils.TZCLD_URLS.my_territory_exchange_space}" data-view="${utils.TZCLD_URLS.my_territory_exchange_space}" class="community-exchanges one" hidden> ${this.tzcldBreadcrum(utils.TZCLD_URLS.my_territory_exchanges, 'Échanges avec mes référent-es')} <solid-router default-route="my_territory_all_exchanges_empty" route-prefix=""> <solid-route name="my_territory_all_exchanges_empty" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_exchange}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_edit_exchange}" use-id></solid-route> </solid-router> <div id="my_territory_all_exchanges_empty" data-view="my_territory_all_exchanges_empty" class="community-exchanges one" hidden> </div> <div id="${utils.TZCLD_URLS.my_territory_exchange}" data-view="${utils.TZCLD_URLS.my_territory_exchange}" class="community-exchanges one" hidden> ${this.viewExchange()} </div> <div id="${utils.TZCLD_URLS.my_territory_edit_exchange}" data-view="${utils.TZCLD_URLS.my_territory_edit_exchange}" class="community-exchanges edit" hidden> ${this.viewEditExchange()} </div> </div> <div id="${utils.TZCLD_URLS.my_territory_ref_add_exchange}" data-view="${utils.TZCLD_URLS.my_territory_ref_add_exchange}" class="community-exchanges add blue-body" hidden> ${this.viewAddExchange('-ref')} </div> <div id="${utils.TZCLD_URLS.my_territory_ref_all_exchanges}" data-view="${utils.TZCLD_URLS.my_territory_ref_all_exchanges}" class="community-exchanges all blue-body" hidden> ${this.viewAllExchanges('-ref')} </div> <div id="${utils.TZCLD_URLS.my_territory_ref_exchange_space}" data-view="${utils.TZCLD_URLS.my_territory_ref_exchange_space}" class="community-exchanges one blue-body" hidden> <solid-router default-route="my_territory_ref_all_exchanges_empty" route-prefix=""> <solid-route name="my_territory_ref_all_exchanges_empty" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_ref_exchange}" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_ref_edit_exchange}" use-id></solid-route> </solid-router> <div id="my_territory_ref_all_exchanges_empty" data-view="my_territory_ref_all_exchanges_empty" class="community-exchanges one" hidden> </div> <div id="${utils.TZCLD_URLS.my_territory_ref_exchange}" data-view="${utils.TZCLD_URLS.my_territory_ref_exchange}" class="community-exchanges one" hidden> ${this.viewExchange('-ref')} </div> <div id="${utils.TZCLD_URLS.my_territory_ref_edit_exchange}" data-view="${utils.TZCLD_URLS.my_territory_ref_edit_exchange}" class="community-exchanges edit" hidden> ${this.viewEditExchange('-ref')} </div> </div> <div id="${utils.TZCLD_URLS.my_territory_follow_request_space}" data-view="${utils.TZCLD_URLS.my_territory_follow_request_space}" class="community-folow-request one" hidden> ${this.tzcldBreadcrum(utils.TZCLD_URLS.my_territory_follow, 'Suivi interne', 'community')} <solid-router default-route="my_territory_follow_request_empty" route-prefix=""> <solid-route name="my_territory_follow_request_empty" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_follow_request_edit}" use-id></solid-route> </solid-router> <div id="my_territory_follow_request_empty" data-view="my_territory_follow_request_empty" class="community-exchanges one" hidden> </div> <div id="${utils.TZCLD_URLS.my_territory_follow_request_edit}" data-view="${utils.TZCLD_URLS.my_territory_follow_request_edit}" class="community-folow-request-edit one" hidden> ${this.viewCommunityFollowRequestEdit()} </div> </div> <div id="${utils.TZCLD_URLS.my_territory_auto_eval}" data-view="${utils.TZCLD_URLS.my_territory_auto_eval}" class="community-answers" hidden> ${this.tzcldBreadcrum()} ${this.viewCommunityAnswers()} </div> <div id="${utils.TZCLD_URLS.my_territory_follow}" data-view="${utils.TZCLD_URLS.my_territory_follow}" class="community-answers padding-top-xlarge" hidden> ${this.tzcldBreadcrum()} ${this.viewCommunityFollow()} </div> <div id="${utils.TZCLD_URLS.my_territory_follow_requests_all}" data-view="${utils.TZCLD_URLS.my_territory_follow_requests_all}" class="community-answers" hidden> ${this.tzcldBreadcrum(utils.TZCLD_URLS.my_territory_follow, 'Suivi interne')} ${this.viewCommunityFollowRequestsAll()} </div> <div id="${utils.TZCLD_URLS.my_territory_follow_request_add}" data-view="${utils.TZCLD_URLS.my_territory_follow_request_add}" class="community-answers" hidden> ${this.tzcldBreadcrum(utils.TZCLD_URLS.my_territory_follow, 'Suivi interne')} ${this.viewCommunityFollowRequestAdd()} </div> <div id="${utils.TZCLD_URLS.my_territory_shared_files_space}" data-view="${utils.TZCLD_URLS.my_territory_shared_files_space}" class="community-files one" hidden> <solid-router default-route="my_territory_shared_file_empty" route-prefix=""> <solid-route name="my_territory_shared_file_empty" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_shared_files_edit}" use-id></solid-route> </solid-router> <div id="my_territory_shared_file_empty" data-view="my_territory_shared_file_empty" class="files one" hidden> </div> <div id="${utils.TZCLD_URLS.my_territory_shared_files_edit}" data-view="${utils.TZCLD_URLS.my_territory_shared_files_edit}" class="community-files-edit one" hidden> ${this.viewCommunitySharedFileEdit(false, utils.TZCLD_URLS.my_territory_exchanges)} </div> </div> <div id="${utils.TZCLD_URLS.my_territory_shared_files_all}" data-view="${utils.TZCLD_URLS.my_territory_shared_files_all}" class="community-files" hidden> </div> <div id="${utils.TZCLD_URLS.my_territory_shared_file_add}" data-view="${utils.TZCLD_URLS.my_territory_shared_file_add}" class="community-files-add" hidden> ${this.viewCommunitySharedFileAdd(false, utils.TZCLD_URLS.my_territory_exchanges)} </div> <div id="${utils.TZCLD_URLS.my_territory_grappe_shared_files_space}" data-view="${utils.TZCLD_URLS.my_territory_grappe_shared_files_space}" class="community-files one" hidden> <solid-router default-route="my_territory_shared_file_empty" route-prefix=""> <solid-route name="my_territory_grappe_shared_file_empty" use-id></solid-route> <solid-route name="${utils.TZCLD_URLS.my_territory_grappe_shared_files_edit}" use-id></solid-route> </solid-router> <div id="my_territory_grappe_shared_file_empty" data-view="my_territory_grappe_shared_file_empty" class="files one" hidden> </div> <div id="${utils.TZCLD_URLS.my_territory_grappe_shared_files_edit}" data-view="${utils.TZCLD_URLS.my_territory_grappe_shared_files_edit}" class="community-files-edit one" hidden> ${this.viewCommunitySharedFileEdit(nested_shared_ref_value, utils.TZCLD_URLS.my_territory_exchanges)} </div> </div> <div id="${utils.TZCLD_URLS.my_territory_grappe_shared_files_all}" data-view="${utils.TZCLD_URLS.my_territory_grappe_shared_files_all}" class="community-files" hidden> </div> <div id="${utils.TZCLD_URLS.my_territory_grappe_shared_file_add}" data-view="${utils.TZCLD_URLS.my_territory_grappe_shared_file_add}" class="community-files-add" hidden> ${this.viewCommunitySharedFileAdd(nested_shared_ref_value, utils.TZCLD_URLS.my_territory_exchanges)} </div> </div> ${this.viewRightMenu()} </div>`; utils.live('click', '.child-accordion h2', function(e){ e.target.classList.toggle("open") ; e.target.nextElementSibling.classList.toggle("hidden") ; }); utils.live('click', '.table-requests th:first-child', function(e){ e.target.classList.toggle("asc") ; let table = utils.findAncestor (e.target, 'table-requests'); let formFilterId = table.getAttribute('sorted-by') ; let selectFilter = document.querySelector('#'+formFilterId+' select[name="order"]') ; if (selectFilter.value == 'asc') { selectFilter.value = 'desc' ; } else { selectFilter.value = 'asc' ; } selectFilter.closest("solid-form-search")._component.change(); }); return render; } _camelize(str) { return str.replace(/[-]+(.)/g, (match, chr) => chr.toUpperCase()); } _uncamelize(str) { return str.replace( /[A-Z]+/g, (match, chr) => "-" + match.toLowerCase() ); } } ); }); });