diff --git a/README.md b/README.md index 5ab7d7578e801c1bcfe854b8ba2869ed23d61dde..5d2b182ff57b9ce9c9444b1b5a0f87c254ad0782 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 287d39642055f5c59135182e259b66617460623c..c5bcfdac5fa755c6bcd0239095a5323c1ef2160f 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 8671867ec5dc716b19f9b33d90868504e56c3890..514088f25356cef0dc458090ccaee9ef30aa1212 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 6f1eab115e6ae384ce05fab34add852f4a95577f..83c5dfad284b71ea01a2a265f5c9e49231f18c73 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 84ad1df8edca567cd4895cdc0d42f1e3cd6b5db0..3644506b1bb2caf1cb94df7430c7cece127420fb 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 e615b499918b45f208afd3373c6e66f77173b9e6..bc323e636b1826edef3df53f5245a081cfe4296f 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 2aee30769576be32a542087488709badc967dea8..fcc9aaca269ff8c8fdf25b08d92fec3853d1749e 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 - - fields='profile.shortDescription, profile.description, segment(logo), profile.website, profile.email, profile.phone, profile.tweeter, profile.facebook, profile.linkedin, segment1(profile.instagram)' - - 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-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' - - 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.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 - - submit-button='' - submit-widget="button" - next=`${component.route}-profile` - - 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' - ) - - 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') - - solid-form.form( - bind-resources - - fields='profile.picture1, profile.picture2, profile.picture3' - - upload-url-profile.picture1 - upload-url-profile.picture2 - upload-url-profile.picture3 - - label-profile.picture1='' - label-profile.picture2='' - label-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' - - submit-button='' - submit-widget="button" - next=`${component.route}-profile` - - 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' - ) - - 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') - - solid-table.form( - 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' - - 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' - - 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(permission="acl:Write", bind-resources) + div.loader.loader-top(id=`loader-${component.route}-edit`) + div + div + div + div + + solid-form.form( + bind-resources + loader-id=`loader-${component.route}-edit` + + fields="profile.shortDescription, profile.description, segment(logo), profile.website, profile.email, profile.phone, profile.tweeter, profile.facebook, profile.linkedin, segment1(profile.instagram)" + + 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-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-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" + + 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=component.endpoints.uploads + widget-logo="solid-form-image-label" + + submit-button="" + submit-widget="button" + + 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" + ) + + 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") + + solid-form.form( + bind-resources + + fields="profile.picture1, profile.picture2, profile.picture3" + + upload-url-profile.picture1=component.endpoints.uploads + upload-url-profile.picture2=component.endpoints.uploads + upload-url-profile.picture3=component.endpoints.uploads + + widget-profile.picture1="solid-form-image-label" + widget-profile.picture2="solid-form-image-label" + widget-profile.picture3="solid-form-image-label" + + label-profile.picture1="" + label-profile.picture2="" + label-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" + + submit-button="" + submit-widget="button" + + 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" + ) + + 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") + + solid-form.form( + bind-resources + nested-field="addresses" + fields="address_line1, address_line2" + + label-address_line1="" + label-address_line2="" + + widget-community="solid-form-hidden" + widget-address_line1="solid-form-label-text" + widget-address_line2="solid-form-label-text" + + 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 bdaa8de0293afc667cd58454e9fac9a41dd06041..da0ccb0ebd1f921e4bc41d2e0d399a118dac717b 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 62cc4bc16a9c20123b7a1c9aed13bc0ad4b1b3d5..af313fa45bcb98da6e5468126639397955327ac0 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 9ae42b069b2a96d4dd74e1b6699a6496c6ef1539..e1d488ba8cf336d94644340f26fa5f6593e758fb 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 0000000000000000000000000000000000000000..f05dc5a1caa5689441dfd16076aa4183e7e1da16 --- /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 529157a37ae4dbf9855442e7e2c3062445a888b1..bb778c4a31a621b800e16817921dc890a373dcb8 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 f7edbc1b27b8c3f6009a5bcfc7c084287474d2bc..c38c68fef9ab85076acffe0654aa381da7072aab 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 17cea6c0c0d7397a2bccb40b9909637f5391ad68..c1735f688db9b026d3818fa0ef37afc17065c12a 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 != "" ? `<div \style="background-image:url(${value});" />` : `<div></div>`} diff --git a/src/views/partials/widgets/hubl-communities-profile-address.pug b/src/views/partials/widgets/hubl-communities-profile-address.pug index b59b961408c5d5ccfb25dfb56971e594b72e1be9..fc237e3f00c7fb2b63389c25fb9635a6a00c9986 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 != "" ? `<span class="icon mdi-map-marker icon-third icon-large icon-margin-right-xsmall">\${await value.adress_line1}<br>\${await value.adress_line2}</span>` : `<span></span>`} + | ${await value.adress_line1 != "" ? `<span class="icon mdi-map-marker icon-third icon-large icon-margin-right-xsmall">\${await value.adress_line1}<br>\${await value.adress_line2 || ""}</span>` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-email.pug b/src/views/partials/widgets/hubl-communities-profile-email.pug index c9b0876a67efc038cec121272110a85465012025..c8cb2c68c606f62498debfa449789f344fe332bb 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 != "" ? `<a class="link margin-bottom-xsmall icon mdi-email-outline icon-third icon-large icon-margin-right-xsmall" href="mailto:\${value}">\$value</a>` : `<span></span>`} + template ${value != "" ? `<a class="link margin-bottom-xsmall icon mdi-email-outline icon-third icon-large icon-margin-right-xsmall" href="mailto:\${value}">${value}</a>` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-facebook.pug b/src/views/partials/widgets/hubl-communities-profile-facebook.pug index 11716b0bca98c3910e0aedfb3696cdfe3ca6adad..917fbc976bfdb9625e782016f8185d5e3a231032 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 != "" ? `<a class="segment children-link-rounded children-icon-social-facebook children-link-reversed color-secondary bordered margin-right-medium" href="${value}" target="_blank"><span></span></a>` : `<span></span>`} + template ${value != "" ? `<a class="segment children-link-rounded children-icon-social-facebook children-link-reversed color-secondary bordered margin-right-medium" href="${value}" target="_blank"><span></span></a>` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-instagram.pug b/src/views/partials/widgets/hubl-communities-profile-instagram.pug index 34d5c6f62ab220351bb8e3c3e9ac0788e713cddd..5bf7b152d7a01cbe9fa7cf14d7ded94f64268a60 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 != "" ? `<a class="segment children-link-rounded children-icon-social-instagram children-link-reversed color-secondary bordered" href="${value}" target="_blank"><span></span></a>` : `<span></span>`} + template ${value != "" ? `<a class="segment children-link-rounded children-icon-social-instagram children-link-reversed color-secondary bordered" href="${value}" target="_blank"><span></span></a>` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-linkedin.pug b/src/views/partials/widgets/hubl-communities-profile-linkedin.pug index c3801f89b64320b927109ac3edf892f7aecf7ab3..64a2b7b25b4f7179ec6e8f85a63b5bc0c17a8c14 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 != "" ? `<a class="segment children-link-rounded children-icon-social-linkedin children-link-reversed color-secondary bordered margin-right-medium" href="${value}" target="_blank"><span></span></a>` : `<span></span>`} + template ${value != "" ? `<a class="segment children-link-rounded children-icon-social-linkedin children-link-reversed color-secondary bordered margin-right-medium" href="${value}" target="_blank"><span></span></a>` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-logo.pug b/src/views/partials/widgets/hubl-communities-profile-logo.pug index a58adb6ce7aa7fab892b3e7510b0ba373ceec3e2..82313168320475281707b0f55fe82815fff13b1e 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 != "" ? `<div \style="background-image:url(${value});" />` : `<div></div>`} \ No newline at end of file + template ${value != "" ? `<div \style="background-image:url(${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 0ce0538501ea330703909744cf8e6c28cc49245e..4e78753e53a429b88067a4bccd5f819af5846059 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 183befbe6019421851f16f4ad038536c51d15937..3b6f0ea61caba22d7c21f0fee029bed5036b892e 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 != "" ? `<a class="link margin-bottom-xsmall icon mdi-cellphone-iphone icon-third icon-large icon-margin-right-xsmall" href="tel:\${value}">\$value</a>` : `<span></span>`} + template ${value != "" ? `<a class="link margin-bottom-xsmall icon mdi-cellphone-iphone icon-third icon-large icon-margin-right-xsmall" href="tel:\${value}">${value}</a>` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-picture.pug b/src/views/partials/widgets/hubl-communities-profile-picture.pug index 37caa95efcfa24180366f59f3daa4448e562cd43..a12066333e9ea8e8fba5eeaa340250df88f5ec1d 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 != "" ? `<div \style="background-image:url(${value});" />` : `<div class="picture-empty"><object type="image/svg+xml" data="/images/photos.svg"></object></div>`} diff --git a/src/views/partials/widgets/hubl-communities-profile-twitter.pug b/src/views/partials/widgets/hubl-communities-profile-twitter.pug index 364c07ef688d4574ce8d3605dff55f4b3b2e935b..586174209ef3a00bece19a33a8bb493bb0f73ae3 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 != "" ? `<a class="segment children-link-rounded children-icon-social-twitter children-link-reversed color-secondary bordered margin-right-medium" href="${value}" target="_blank"><span></span></a>` : `<span></span>`} + template ${value != "" ? `<a class="segment children-link-rounded children-icon-social-twitter children-link-reversed color-secondary bordered margin-right-medium" href="${value}" target="_blank"><span></span></a>` : ""} diff --git a/src/views/partials/widgets/hubl-communities-profile-website.pug b/src/views/partials/widgets/hubl-communities-profile-website.pug index 41eaf9c9246c637fb8dab01f5abbcccf51073fb6..ea5c8b206969a7aea2dda8d7c530ceb36a4a96d8 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 != "" ? `<a class="link margin-bottom-xsmall icon mdi-link-variant icon-third icon-large icon-margin-right-xsmall" href="tel:\${value}" target="_blank">$value</a>` : `<span></span>`} + template ${value != "" ? `<a class="link margin-bottom-xsmall icon mdi-link-variant icon-third icon-large icon-margin-right-xsmall" href="tel:\${value}" target="_blank">${value}</a>` : ""}