From 42205d90cd571a09afb1fe6b0cf7c9823d476afa Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Fri, 9 Apr 2021 13:28:39 +0200 Subject: [PATCH] fix: various fixes on community directory --- README.md | 18 ++ src/locales/en.json | 3 +- src/locales/es.json | 3 +- src/locales/fr.json | 3 +- src/styles/admin-circles/_index.scss | 30 ++- .../communities/page-community-directory.pug | 2 +- .../communities/page-community-edit.pug | 184 ++++++++++-------- .../communities/page-community-map.pug | 14 +- .../communities/page-community-profile.pug | 16 +- src/views/partials/widgets.pug | 1 + .../widgets/hubl-communities-edit-button.pug | 13 ++ .../widgets/hubl-communities-edit-email.pug | 2 +- .../widgets/hubl-communities-edit-website.pug | 2 +- .../widgets/hubl-communities-logo.pug | 2 +- .../hubl-communities-profile-address.pug | 4 +- .../hubl-communities-profile-email.pug | 4 +- .../hubl-communities-profile-facebook.pug | 4 +- .../hubl-communities-profile-instagram.pug | 4 +- .../hubl-communities-profile-linkedin.pug | 4 +- .../widgets/hubl-communities-profile-logo.pug | 4 +- ...bl-communities-profile-members-counter.pug | 2 +- .../hubl-communities-profile-phone.pug | 4 +- .../hubl-communities-profile-picture.pug | 2 +- .../hubl-communities-profile-twitter.pug | 4 +- .../hubl-communities-profile-website.pug | 4 +- 25 files changed, 200 insertions(+), 133 deletions(-) create mode 100644 src/views/partials/widgets/hubl-communities-edit-button.pug diff --git a/README.md b/README.md index 5ab7d75..5d2b182 100644 --- a/README.md +++ b/README.md @@ -295,6 +295,24 @@ To activate community on Hubl, add this module declaration your `config.json`: } ``` +#### Activate the community directory + +When you work with a federated application, you may want a directory for communities. + +You can activate it by changing the route to anything else than false. Some endpoints will also get needed: + +```json + { + "type": "communities", + "endpoints": { + "get": "http://server/communities/", + "addresses": "http://server/community-addresses/", + "uploads": "http://server/upload/" + }, + "route": "communities" + } +``` + ### Dashboard Dashboard includes card generation from HTML. To activate them, you need: diff --git a/src/locales/en.json b/src/locales/en.json index 287d396..c5bcfda 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -179,7 +179,8 @@ "labelLogo": "Community Logo", "subTitle": "Pictures", "subTitle1": "Address", - "buttonSubmit": "Save" + "buttonSubmit": "Save", + "noPermission": "You don't have access to this page" } }, "project": { diff --git a/src/locales/es.json b/src/locales/es.json index 8671867..514088f 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -179,7 +179,8 @@ "labelLogo": "", "subTitle": "", "subTitle1": "", - "buttonSubmit": "Guardar" + "buttonSubmit": "Guardar", + "noPermission": "" } }, "project": { diff --git a/src/locales/fr.json b/src/locales/fr.json index 6f1eab1..83c5dfa 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -177,7 +177,8 @@ "labelLogo": "Logo de la communauté", "subTitle": "Photos", "subTitle1": "Adresse", - "buttonSubmit": "Enregistrer" + "buttonSubmit": "Enregistrer", + "noPermission": "Vous n'avez pas la permission" } }, "project": { diff --git a/src/styles/admin-circles/_index.scss b/src/styles/admin-circles/_index.scss index 84ad1df..3644506 100644 --- a/src/styles/admin-circles/_index.scss +++ b/src/styles/admin-circles/_index.scss @@ -7,7 +7,7 @@ /* And no I can't add that stupid icon because it'a an input. */ /* But now, with 0.16, it's a button and you can :D */ .join-button { - + input, button { padding: 9px 20px; @@ -19,7 +19,7 @@ background-color: var(--color-secondary); color: white; border: 1px solid var(--color-secondary); - + &:before { font-size: 15px; margin-right: 6px; @@ -38,17 +38,17 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } - + &:hover { background: white; color: var(--color-secondary); } } - + @media (max-width: 768px) { - + &.sm-full { - + input, button { width: 100%; @@ -58,10 +58,15 @@ } .form.search-button :not(.add-member)+button[type=submit] { - background-color: #E9F2FF; - border: none; + background-color: transparent; + border: 1px solid var(--color-secondary); color: var(--color-secondary); + &:hover { + background-color: var(--color-secondary); + color: #fff; + } + &:before { font-size: 15px; margin-right: 6px; @@ -76,11 +81,11 @@ text-align: center; font-variant: normal; text-transform: none; - line-height: 1em; + line-height: 13px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } - } + } .masonry>div:nth-child(1) { /* change from directory (nth-child(2))*/ @@ -96,6 +101,7 @@ .segment.hover:hover { box-shadow: 0 0 16px 0 rgba(46, 63, 88, 0.34); bottom: 2px; + cursor: pointer; } hubl-admin-circle-name:hover { @@ -106,6 +112,7 @@ height: 76px; width: 100%; display: block; + div { display: block; width: 100%; @@ -242,4 +249,7 @@ } } } + .flex { + display: flex; + } } \ No newline at end of file diff --git a/src/views/partials/communities/page-community-directory.pug b/src/views/partials/communities/page-community-directory.pug index e615b49..bc323e6 100644 --- a/src/views/partials/communities/page-community-directory.pug +++ b/src/views/partials/communities/page-community-directory.pug @@ -24,7 +24,7 @@ div div solid-display( - 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' + 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' data-src=`${component.endpoints.get}` loader-id=`loader-${component.route}-directory` fields='segment1(segment2(logo), segment3(name, profile.shortDescription, counter))' diff --git a/src/views/partials/communities/page-community-edit.pug b/src/views/partials/communities/page-community-edit.pug index 2aee307..fcc9aac 100644 --- a/src/views/partials/communities/page-community-edit.pug +++ b/src/views/partials/communities/page-community-edit.pug @@ -1,114 +1,138 @@ div.bg-color-white - solid-ac-checker(permission='acl:Read', bind-resources) + solid-ac-checker(permission="acl:Read", bind-resources) div.segment.full.padding-large.border-bottom.border-color-grey div.segment.half.sm-full solid-display.text-color-heading.text-bold.text-xxlarge.text-letter-spacing-large( bind-resources - fields='name' + fields="name" ) div.segment.half.sm-hidden.text-right solid-link(class="backlink", bind-resources, next=`${component.route}-profile` data-trans="communities.back") div.segment.full.padding-large.whitespace-normal - solid-ac-checker(permission='acl:Write', bind-resources) - div.loader.loader-top(id=`loader-${component.route}-edit`) - div - div - div - div - - solid-form.form( - bind-resources + //- solid-ac-checker(permission="acl:Write", bind-resources) + div.loader.loader-top(id=`loader-${component.route}-edit`) + div + div + div + div - fields='profile.shortDescription, profile.description, segment(logo), profile.website, profile.email, profile.phone, profile.tweeter, profile.facebook, profile.linkedin, segment1(profile.instagram)' + solid-form.form( + bind-resources + loader-id=`loader-${component.route}-edit` - label-profile.shortDescription='' - label-profile.description='' - label-logo='' - label-profile.website='' - label-profile.email='' - label-profile.phone='' - label-profile.tweeter='' - label-profile.facebook='' - label-profile.linkedin='' - label-profile.instagram='' + fields="profile.shortDescription, profile.description, segment(logo), profile.website, profile.email, profile.phone, profile.tweeter, profile.facebook, profile.linkedin, segment1(profile.instagram)" - class-profile.shortDescription='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' - class-profile.description='segment margin-bottom-medium full text-small text-semibold text-uppercase text-color-heading' + label-profile.shortDescription="" + label-profile.description="" + label-logo="" + label-profile.website="" + label-profile.email="" + label-profile.phone="" + label-profile.tweeter="" + label-profile.facebook="" + label-profile.linkedin="" + label-profile.instagram="" - class-segment='segment full' - class-logo='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' - class-profile.website='segment margin-bottom-medium third sm-full padding-right-small sm-padding-none' - class-profile.email='segment margin-bottom-medium third sm-full padding-right-small padding-left-small sm-padding-none' - class-profile.phone='segment margin-bottom-medium third sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' + class-profile.shortDescription="segment margin-bottom-medium full sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-profile.description="segment margin-bottom-medium full text-small text-semibold text-uppercase text-color-heading" - class-profile.tweeter='segment margin-bottom-medium third sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' - class-profile.facebook='segment margin-bottom-medium third sm-full padding-right-small padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' - class-profile.linkedin='segment margin-bottom-medium third sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' - class-segment1='segment full' - class-profile.instagram='segment margin-bottom-medium third sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' - - widget-profile.description='solid-form-richtext-label' - widget-profile.email='hubl-communities-edit-email' - widget-profile.website='hubl-communities-edit-website' - upload-url-logo + class-segment="segment full" + class-logo="segment margin-bottom-medium full sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-profile.website="segment margin-bottom-medium third sm-full padding-right-small sm-padding-none" + class-profile.email="segment margin-bottom-medium third sm-full padding-right-small padding-left-small sm-padding-none" + class-profile.phone="segment margin-bottom-medium third sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" - submit-button='' - submit-widget="button" - next=`${component.route}-profile` + class-profile.tweeter="segment margin-bottom-medium third sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-profile.facebook="segment margin-bottom-medium third sm-full padding-right-small padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-profile.linkedin="segment margin-bottom-medium third sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-segment1="segment full" + class-profile.instagram="segment margin-bottom-medium third sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" - data-trans='label-logo=communities.edit.labelLogo;label-profile.shortDescription=communities.edit.labelShortDescription;label-profile.description=communities.edit.labelDescription;label-profile.phone=communities.edit.labelPhone;label-profile.tweeter=communities.edit.labelTwitter;label-profile.facebook=communities.edit.labelFacebook;label-profile.linkedin=communities.edit.labelLinkedin;label-profile.instagram=communities.edit.labelInstagram;submit-button=communities.edit.buttonSubmit' - ) + widget-profile.description="solid-form-richtext-label" + widget-profile.email="hubl-communities-edit-email" + widget-profile.website="hubl-communities-edit-website" + upload-url-logo=component.endpoints.uploads + widget-logo="solid-form-image-label" - h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='communities.edit.subTitle') + submit-button="" + submit-widget="button" - solid-form.form( - bind-resources + data-trans="label-logo=communities.edit.labelLogo;label-profile.shortDescription=communities.edit.labelShortDescription;label-profile.description=communities.edit.labelDescription;label-profile.phone=communities.edit.labelPhone;label-profile.tweeter=communities.edit.labelTwitter;label-profile.facebook=communities.edit.labelFacebook;label-profile.linkedin=communities.edit.labelLinkedin;label-profile.instagram=communities.edit.labelInstagram;submit-button=communities.edit.buttonSubmit" + ) - fields='profile.picture1, profile.picture2, profile.picture3' + h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans="communities.edit.subTitle") - upload-url-profile.picture1 - upload-url-profile.picture2 - upload-url-profile.picture3 + solid-form.form( + bind-resources - label-profile.picture1='' - label-profile.picture2='' - label-profile.picture3='' + fields="profile.picture1, profile.picture2, profile.picture3" - class-profile.picture1='segment margin-bottom-medium third sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' - class-profile.picture2='segment margin-bottom-medium third sm-full padding-right-small padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' - class-profile.picture3='segment margin-bottom-medium third sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' + upload-url-profile.picture1=component.endpoints.uploads + upload-url-profile.picture2=component.endpoints.uploads + upload-url-profile.picture3=component.endpoints.uploads - submit-button='' - submit-widget="button" - next=`${component.route}-profile` + widget-profile.picture1="solid-form-image-label" + widget-profile.picture2="solid-form-image-label" + widget-profile.picture3="solid-form-image-label" - data-trans='label-profile.picture1=communities.edit.labelPicture1;label-profile.picture2=communities.edit.labelPicture2;label-profile.picture3=communities.edit.labelPicture3;submit-button=communities.edit.buttonSubmit' - ) + label-profile.picture1="" + label-profile.picture2="" + label-profile.picture3="" - h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='communities.edit.subTitle1') + class-profile.picture1="segment margin-bottom-medium third sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-profile.picture2="segment margin-bottom-medium third sm-full padding-right-small padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-profile.picture3="segment margin-bottom-medium third sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" - solid-table.form( - bind-resources - nested-fields='addresses' - fields='address_line1, address_line2' + submit-button="" + submit-widget="button" - editable-address_line1 - editable-address_line2 + data-trans="label-profile.picture1=communities.edit.labelPicture1;label-profile.picture2=communities.edit.labelPicture2;label-profile.picture3=communities.edit.labelPicture3;submit-button=communities.edit.buttonSubmit" + ) - label-address_line1='' - label-address_line2='' + h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans="communities.edit.subTitle1") - widget-address_line1='solid-form-label-text' - widget-address_line2='solid-form-label-text' + solid-form.form( + bind-resources + nested-field="addresses" + fields="address_line1, address_line2" - class-address_line1='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' - class-address_line2='segment margin-bottom-medium half sm-full padding-right-small padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' + label-address_line1="" + label-address_line2="" - submit-button='' - submit-widget="button" - next=`${component.route}-profile` + widget-community="solid-form-hidden" + widget-address_line1="solid-form-label-text" + widget-address_line2="solid-form-label-text" - data-trans='label-addresses.address_line1=communities.edit.labelAddressLine1;label-addresses.address_line2=communities.edit.labelAddressLine2' - ) + submit-button="" + submit-widget="button" + + data-trans="label-addresses.address_line1=communities.edit.labelAddressLine1;label-addresses.address_line2=communities.edit.labelAddressLine2" + ) + + solid-table.form( + selectable + header + bind-resources + nested-fields='addresses' + fields='address_line1, address_line2' + + editable-address_line1 + editable-address_line2 + + label-address_line1='' + label-address_line2='' + + widget-address_line1='solid-form-label-text' + widget-address_line2='solid-form-label-text' + + submit-button='' + submit-widget="button" + next=`${component.route}-profile` + + data-trans='label-addresses.address_line1=communities.edit.labelAddressLine1;label-addresses.address_line2=communities.edit.labelAddressLine2' + ) + + //- solid-ac-checker(no-permission="acl:Write", bind-resources) + //- span(data-trans="communities.edit.noPermission") diff --git a/src/views/partials/communities/page-community-map.pug b/src/views/partials/communities/page-community-map.pug index bdaa8de..da0ccb0 100644 --- a/src/views/partials/communities/page-community-map.pug +++ b/src/views/partials/communities/page-community-map.pug @@ -5,11 +5,11 @@ div.segment.half.sm-full solid-form-search.form.search-form.search-button( id=`communities-filter-map` - fields='name' - search-name='community.name' - placeholder-name='' - widget-name='solid-form-placeholder-text' - class-name="segment margin-bottom-medium sm-margin-bottom-none three-quarter sm-full padding-right-small sm-padding-none text-small input-bg-white children-shadow" + fields='filter' + search-filter='community.name, address_line1, address_line2' + placeholder-filter='' + widget-filter='solid-form-placeholder-text' + class-filter="segment margin-bottom-medium sm-margin-bottom-none three-quarter sm-full padding-right-small sm-padding-none text-small input-bg-white children-shadow" submit-button="" submit-widget="button" @@ -20,10 +20,10 @@ span solid-map.communities-map.margin-right-xsmall.margin-left-xsmall.sm-margin-none.shadow( - data-src=`${component.endpoints.get}` + data-src=`${component.endpoints.addresses}` loader-id=`loader-${component.route}-map` - nested-field="addresses" fields="position(community.name, community.profile.shortDescription, address_line1, address_line2)" + class-position="segment" clustering="" filtered-by=`communities-filter-map` style="display:block;height:698px;" diff --git a/src/views/partials/communities/page-community-profile.pug b/src/views/partials/communities/page-community-profile.pug index 62cc4bc..af313fa 100644 --- a/src/views/partials/communities/page-community-profile.pug +++ b/src/views/partials/communities/page-community-profile.pug @@ -15,11 +15,11 @@ div.community-profile.padding-medium.sm-padding-none loader-id=`loader-${component.route}-profile` class-segment0="segment full padding-xlarge sm-padding-none whitespace-normal" - class-segment1="community-profile-logo segment third sm-full margin-top-medium padding-top-medium padding-right-medium sm-margin-top-xsmall sm-padding-medium text-center" + class-segment1="community-profile-logo segment quarter sm-full margin-top-medium padding-top-medium padding-right-medium sm-margin-top-xsmall sm-padding-medium text-center" - class-segment2="segment two-third sm-full sm-padding-top-medium sm-padding-right-xsmall sm-padding-bottom-medium sm-padding-left-xsmall text-top sm-text-center whitespace-normal" + class-segment2="segment three-quarter sm-full sm-padding-top-medium sm-padding-right-xsmall sm-padding-bottom-medium sm-padding-left-xsmall text-top sm-text-center whitespace-normal" - class-segment3="segment full sm-two-third text-center" + class-segment3="segment full sm-two-third" class-segment4="segment half sm-two-third padding-top-xsmall" class-name="segment block text-color-heading text-xxlarge text-bold sm-text-center margin-bottom-xxsmall whitespace-normal" class-segment5="segment half text-right sm-hidden" @@ -35,18 +35,14 @@ div.community-profile.padding-medium.sm-padding-none class-profile.description="segment full whitespace-normal" class-segment10="segment full text-right margin-top-xxlarge" - action-edit=`${component.route}-edit` - class-edit="segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil" - value-edit="" - data-trans='value-edit=communities.profile.edit' - class-segment11="segment full whitespace-normal" + class-segment11="segment full whitespace-normal flex" class-profile.picture1="communities-profile-picture segment third" class-profile.picture2="communities-profile-picture segment third" class-profile.picture3="communities-profile-picture segment third" widget-logo="hubl-communities-profile-logo" - widget-profile.description="solid-display-richtext-label" + widget-profile.description="solid-display-value-markdown" widget-profile.tweeter="hubl-communities-profile-twitter" widget-profile.facebook="hubl-communities-profile-facebook" widget-profile.linkedin="hubl-communities-profile-linkedin" @@ -59,6 +55,8 @@ div.community-profile.padding-medium.sm-padding-none widget-profile.picture1="hubl-communities-profile-picture" widget-profile.picture2="hubl-communities-profile-picture" widget-profile.picture3="hubl-communities-profile-picture" + action-edit="edit" + widget-edit="hubl-communities-edit-button" bind-resources ) diff --git a/src/views/partials/widgets.pug b/src/views/partials/widgets.pug index 9ae42b0..e1d488b 100644 --- a/src/views/partials/widgets.pug +++ b/src/views/partials/widgets.pug @@ -21,6 +21,7 @@ include widgets/hubl-circle-owner.pug include widgets/hubl-circle-team-contact.pug include widgets/hubl-circle-user-admin.pug include widgets/hubl-communities-counter-alternate.pug +include widgets/hubl-communities-edit-button.pug include widgets/hubl-communities-edit-email.pug include widgets/hubl-communities-edit-website.pug include widgets/hubl-communities-logo.pug diff --git a/src/views/partials/widgets/hubl-communities-edit-button.pug b/src/views/partials/widgets/hubl-communities-edit-button.pug new file mode 100644 index 0000000..f05dc5a --- /dev/null +++ b/src/views/partials/widgets/hubl-communities-edit-button.pug @@ -0,0 +1,13 @@ +if componentSet.has('communities') && getRoute('communities') + solid-widget(name='hubl-communities-edit-button') + template + solid-ac-checker( + no-permission='acl:Control' + data-src="${src}" + ) + solid-link( + class="segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil" + data-trans="communities.profile.edit" + data-src="${src}" + next=`${getRoute('communities', true)}-edit` + ) \ No newline at end of file diff --git a/src/views/partials/widgets/hubl-communities-edit-email.pug b/src/views/partials/widgets/hubl-communities-edit-email.pug index 529157a..bb778c4 100644 --- a/src/views/partials/widgets/hubl-communities-edit-email.pug +++ b/src/views/partials/widgets/hubl-communities-edit-email.pug @@ -1,4 +1,4 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-edit-email') template label(class="text-small text-semibold text-uppercase text-color-heading" data-trans="communities.edit.labelEmail") diff --git a/src/views/partials/widgets/hubl-communities-edit-website.pug b/src/views/partials/widgets/hubl-communities-edit-website.pug index f7edbc1..c38c68f 100644 --- a/src/views/partials/widgets/hubl-communities-edit-website.pug +++ b/src/views/partials/widgets/hubl-communities-edit-website.pug @@ -1,4 +1,4 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-edit-website') template label(class="text-small text-semibold text-uppercase text-color-heading" data-trans='communities.edit.labelWebsite') diff --git a/src/views/partials/widgets/hubl-communities-logo.pug b/src/views/partials/widgets/hubl-communities-logo.pug index 17cea6c..c1735f6 100644 --- a/src/views/partials/widgets/hubl-communities-logo.pug +++ b/src/views/partials/widgets/hubl-communities-logo.pug @@ -1,3 +1,3 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-logo') template ${value != "" ? `
` : `
`} diff --git a/src/views/partials/widgets/hubl-communities-profile-address.pug b/src/views/partials/widgets/hubl-communities-profile-address.pug index b59b961..fc237e3 100644 --- a/src/views/partials/widgets/hubl-communities-profile-address.pug +++ b/src/views/partials/widgets/hubl-communities-profile-address.pug @@ -1,4 +1,4 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-address') template - | ${await value != "" ? `\${await value.adress_line1}
\${await value.adress_line2}
` : ``} + | ${await value.adress_line1 != "" ? `\${await value.adress_line1}
\${await value.adress_line2 || ""}
` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-email.pug b/src/views/partials/widgets/hubl-communities-profile-email.pug index c9b0876..c8cb2c6 100644 --- a/src/views/partials/widgets/hubl-communities-profile-email.pug +++ b/src/views/partials/widgets/hubl-communities-profile-email.pug @@ -1,3 +1,3 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-email') - template ${value != "" ? `\$value` : ``} + template ${value != "" ? `${value}` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-facebook.pug b/src/views/partials/widgets/hubl-communities-profile-facebook.pug index 11716b0..917fbc9 100644 --- a/src/views/partials/widgets/hubl-communities-profile-facebook.pug +++ b/src/views/partials/widgets/hubl-communities-profile-facebook.pug @@ -1,3 +1,3 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-facebook') - template ${value != "" ? `` : ``} + template ${value != "" ? `` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-instagram.pug b/src/views/partials/widgets/hubl-communities-profile-instagram.pug index 34d5c6f..5bf7b15 100644 --- a/src/views/partials/widgets/hubl-communities-profile-instagram.pug +++ b/src/views/partials/widgets/hubl-communities-profile-instagram.pug @@ -1,3 +1,3 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-instagram') - template ${value != "" ? `` : ``} + template ${value != "" ? `` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-linkedin.pug b/src/views/partials/widgets/hubl-communities-profile-linkedin.pug index c3801f8..64a2b7b 100644 --- a/src/views/partials/widgets/hubl-communities-profile-linkedin.pug +++ b/src/views/partials/widgets/hubl-communities-profile-linkedin.pug @@ -1,3 +1,3 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-linkedin') - template ${value != "" ? `` : ``} + template ${value != "" ? `` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-logo.pug b/src/views/partials/widgets/hubl-communities-profile-logo.pug index a58adb6..8231316 100644 --- a/src/views/partials/widgets/hubl-communities-profile-logo.pug +++ b/src/views/partials/widgets/hubl-communities-profile-logo.pug @@ -1,3 +1,3 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-logo') - template ${value != "" ? `
` : `
`} \ No newline at end of file + template ${value != "" ? `
` : ""} \ No newline at end of file diff --git a/src/views/partials/widgets/hubl-communities-profile-members-counter.pug b/src/views/partials/widgets/hubl-communities-profile-members-counter.pug index 0ce0538..4e78753 100644 --- a/src/views/partials/widgets/hubl-communities-profile-members-counter.pug +++ b/src/views/partials/widgets/hubl-communities-profile-members-counter.pug @@ -1,4 +1,4 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-members-counter') template p diff --git a/src/views/partials/widgets/hubl-communities-profile-phone.pug b/src/views/partials/widgets/hubl-communities-profile-phone.pug index 183befb..3b6f0ea 100644 --- a/src/views/partials/widgets/hubl-communities-profile-phone.pug +++ b/src/views/partials/widgets/hubl-communities-profile-phone.pug @@ -1,3 +1,3 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-phone') - template ${value != "" ? `\$value` : ``} + template ${value != "" ? `${value}` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-picture.pug b/src/views/partials/widgets/hubl-communities-profile-picture.pug index 37caa95..a120663 100644 --- a/src/views/partials/widgets/hubl-communities-profile-picture.pug +++ b/src/views/partials/widgets/hubl-communities-profile-picture.pug @@ -1,3 +1,3 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-picture') template ${value != "" ? `
` : `
`} diff --git a/src/views/partials/widgets/hubl-communities-profile-twitter.pug b/src/views/partials/widgets/hubl-communities-profile-twitter.pug index 364c07e..5861742 100644 --- a/src/views/partials/widgets/hubl-communities-profile-twitter.pug +++ b/src/views/partials/widgets/hubl-communities-profile-twitter.pug @@ -1,3 +1,3 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-twitter') - template ${value != "" ? `` : ``} + template ${value != "" ? `` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-website.pug b/src/views/partials/widgets/hubl-communities-profile-website.pug index 41eaf9c..ea5c8b2 100644 --- a/src/views/partials/widgets/hubl-communities-profile-website.pug +++ b/src/views/partials/widgets/hubl-communities-profile-website.pug @@ -1,3 +1,3 @@ -if componentSet.has('communities') +if componentSet.has('communities') && getRoute('communities') solid-widget(name='hubl-communities-profile-website') - template ${value != "" ? `$value` : ``} + template ${value != "" ? `${value}` : ""}