patch: community-map

This commit is contained in:
gaelle morin
2021-04-07 23:21:50 +02:00
parent 64a3219aba
commit 1d10f797a2
33 changed files with 309 additions and 92 deletions

View File

@ -1,42 +1,34 @@
div.padding-small.whitespace-normal.sm-padding-none.sm-padding-top-large.sm-padding-bottom-large
h2.margin-top-xxsmall.margin-left-xsmall.margin-bottom-medium.sm-margin-none.sm-margin-right-xsmall.sm-margin-bottom-large.sm-margin-left-xsmall.text-xlarge.text-bold.text-color-heading.text-uppercase(data-trans='communities.list.title')
div.padding-top-xxsmall.margin-left-xsmall.sm-padding-none.sm-margin-none.sm-margin-right-xsmall.sm-margin-left-xsmall
div.segment.half.sm-full
solid-form-search.form.search-form.search-button(
id=`communities-filter-${page}`
fields='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"
submit-button=""
submit-widget="button"
data-trans='placeholder-name=communities.list.searchBy;submit-button=communities.list.searchButton'
)
div.segment.half.sm-full.text-right
solid-link.segment.children-link-rounded.children-icon-map.children-link-reversed.color-secondary.bordered
span
div.segment.full.padding-top-xsmall.sm-padding-xsmall.whitespace-normal
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'
data-src='https://api.test3.startinblox.com/communities/'
fields='segment1(segment2(logo), segment3(name, profile.shortDescription, counter))'
filtered-by=`communities-filter-${page}`
order-by='name'
paginate-by='20'
loader-id=`loader-communities-${page}`
class-segment1='segment hover bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal'
class-segment2='segment block padding-xlarge text-center'
class-segment3='segment full padding-xlarge padding-top-medium 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-bottom-large whitespace-normal'
widget-logo='hubl-communities-logo'
action-counter="counter"
widget-counter='hubl-communities-counter-alternate'
next=""
)
div.communities-directory
solid-router(default-route=`${component.route}-directory` hidden)
solid-route(name=`${component.route}-directory`)
solid-route(name=`${component.route}-map`)
solid-route(name=`${component.route}-profile` use-id)
solid-route(name=`${component.route}-edit` use-id)
div(
id=`${component.route}-directory`
hidden
data-view=`${component.route}-directory`
no-render
)
include partials/communities/page-community-directory.pug
div(
id=`${component.route}-map`
hidden
data-view=`${component.route}-map`
no-render
)
include partials/communities/page-community-map.pug
div(
id=`${component.route}-profile`
hidden
data-view=`${component.route}-profile`
no-render
)
include partials/communities/page-community-profile.pug
div(
id=`${component.route}-edit`
hidden
data-view=`${component.route}-edit`
no-render
)
include partials/communities/page-community-edit.pug

View File

@ -22,18 +22,11 @@ div.segment.full.padding-large.padding-top-medium.padding-bottom-xsmall.sm-paddi
solid-form-search.form.search-form.search-button(
id=`admin-circle-filter-${page}`
<<<<<<< HEAD
fields='name'
label-name=''
widget-name='solid-form-label-text'
class-name="segment margin-bottom-medium sm-margin-bottom-none third sm-full padding-right-small sm-padding-none text-small"
=======
fields='searchname'
search-searchname='name, circle.name'
label-searchname=''
widget-searchname='solid-form-label-text'
class-searchname="segment margin-bottom-medium sm-margin-bottom-none third sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading"
>>>>>>> b9a8c8ba4de7985088e46bda8c024cf121439ff8
submit-button=""
submit-widget="button"
data-trans='label-searchname=circle.list.searchBy;submit-button=circle.list.searchButton'

View File

@ -1,7 +1,7 @@
.padding-small.sm-padding-none.sm-padding-top-large.sm-padding-bottom-large
h2.margin-top-xxsmall.margin-left-xsmall.margin-bottom-medium.sm-margin-none.sm-margin-right-xsmall.sm-margin-bottom-large.sm-margin-left-xsmall.text-xlarge.text-bold.text-color-heading.text-uppercase(data-trans='communities.list.title')
.padding-small.sm-padding-none.sm-padding-top-medium.sm-padding-bottom-medium
h2.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(data-trans='communities.list.title')
div.padding-top-xxsmall.margin-left-xsmall.sm-padding-none.sm-margin-none.sm-margin-right-xsmall.sm-margin-left-xsmall
div.padding-top-xxsmall.margin-left-xsmall.margin-right-xsmall.sm-padding-none.sm-margin-none.sm-margin-right-xsmall.sm-margin-left-xsmall
div.segment.half.sm-full
solid-form-search.form.search-form.search-button(
id=`communities-filter`
@ -34,10 +34,10 @@
class-segment1='segment hover bg-color-white shadow border-rounded-xxsmall full text-top whitespace-normal'
class-segment2='segment block padding-xlarge text-center'
class-segment3='segment full padding-xlarge padding-top-medium sm-padding-medium border-top border-color-grey text-center whitespace-normal'
class-segment3='segment full padding-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-bottom-large whitespace-normal'
class-counter='segment block whitespace-normal'
widget-logo='hubl-admin-community-logo'
action-counter="counter"

View File

@ -1,18 +1,30 @@
.padding-small.sm-padding-none.sm-padding-top-large.sm-padding-bottom-large
h2.margin-top-xxsmall.margin-left-xsmall.margin-bottom-medium.sm-margin-none.sm-margin-right-xsmall.sm-margin-bottom-large.sm-margin-left-xsmall.text-xlarge.text-bold.text-color-heading.text-uppercase(data-trans='communities.list.title')
.padding-small.sm-padding-none
h2.segment.sm-hidden.margin-top-xxsmall.margin-left-xsmall.margin-bottom-medium.sm-margin-none.sm-margin-right-xsmall.sm-margin-bottom-large.sm-margin-left-xsmall.text-xlarge.text-bold.text-color-heading.text-uppercase(data-trans='communities.list.title')
div.padding-top-xxsmall.margin-left-xsmall.sm-padding-none.sm-margin-none.sm-margin-right-xsmall.sm-margin-left-xsmall
div.mobile-map-search-field.padding-top-xxsmall.margin-left-xsmall.margin-right-xsmall.sm-padding-none.sm-margin-none.sm-margin-right-xsmall.sm-margin-left-xsmall
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"
submit-button=""
submit-widget="button"
data-trans='placeholder-name=communities.list.searchBy;submit-button=communities.list.searchButton'
)
div.segment.half.sm-full.text-right
solid-link.segment.children-link-rounded.children-icon-map.children-link-reversed.color-secondary.bordered(next=`${component.route}-directory`)
span
solid-link.segment.children-link-rounded.children-icon-grid.children-link-reversed.color-secondary.bordered(next=`${component.route}-directory`)
span
solid-map.communities-map.margin-right-xsmall.margin-left-xsmall.sm-margin-none.shadow(
data-src=`${component.endpoints.get}`
loader-id=`loader-${component.route}-map`
nested-field="addresses"
fields="position(community.name, community.profile.shortDescription, address_line1, address_line2)"
clustering=""
filtered-by=`communities-filter-map`
style="display:block;height:698px;"
)

View File

@ -0,0 +1,74 @@
div.community-profile.padding-medium.sm-padding-none
div.segment.full.sm-hidden.text-right
solid-link.backlink.text-xlarge.line-xlarge.margin-right-xxsmall(next=`${component.route}-directory` data-trans="communities.profile.back")
div.segment.block.shadow.bg-color-white.margin-right-xxsmall.margin-top-large.margin-left-xxsmall.sm-margin-none
div.loader(id=`loader-${component.route}-profile`)
div
div
div
div
solid-display.segment.block.whitespace-normal(
fields="segment0(segment1(community-picture(logo)), segment2(segment3(segment4(name),segment5(profile.tweeter, profile.facebook, profile.linkedin, profile.instagram)), segment6(profile.shortDescription), segment7(profile.tweeter, profile.facebook, profile.linkedin, profile.instagram), segment8(addresses.adress_line1, addresses.address_line2, members, profile.website, profile.email, profile.phone), segment9(profile.description), segment10(edit))), segment11(profile.picture1, profile.picture2, profile.picture3)"
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-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-segment3="segment full sm-two-third text-center"
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"
class-segment6="segment two-third sm-full padding-top-xsmall sm-text-center"
class-profile.shortDescription="segment block sm-text-center margin-bottom-large whitespace-normal"
class-segment7="segment lg-hidden sm-full"
class-segment8="segment two-third sm-full padding-bottom-large padding-bottom-xxsmall sm-text-left"
class-segment9="segment full"
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-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.tweeter="hubl-communities-profile-twitter"
widget-profile.facebook="hubl-communities-profile-facebook"
widget-profile.linkedin="hubl-communities-profile-linkedin"
widget-profile.instagram="hubl-communities-profile-instagram"
widget-addresses="hubl-communities-profile-address"
widget-members="hubl-communities-profile-members-counter"
widget-profile.website="hubl-communities-profile-website"
widget-profile.email="hubl-communities-profile-email"
widget-profile.phone="hubl-communities-profile-phone"
widget-profile.picture1="hubl-communities-profile-picture"
widget-profile.picture2="hubl-communities-profile-picture"
widget-profile.picture3="hubl-communities-profile-picture"
bind-resources
)
solid-map.communities-profile-map(
bind-resources
nested-field="addresses"
fields="position(community.name, address_line1, address_line2)"
class-community-name="segment block margin bottom-xsmall text-color-heading text-xlarge text-bold"
class-address_line1="segment block"
class-address_line2="segment block"
clustering=""
style="display:block;height:450px;"
)

View File

@ -99,7 +99,7 @@ div
if componentSet.has("communities")
solid-link.text-hover(next=`admin-${getRoute("chat", true)}`)
li.segment.padding-top-small.sm-padding-top-medium
a.icon.icon-people.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.community')
a.icon.icon-grid.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.community')
if componentSet.has("circles")
solid-link.text-hover(next=`admin-${getRoute("circles", true)}`)
li.segment.padding-top-small.sm-padding-top-medium

View File

@ -28,6 +28,7 @@ solid-router#navbar-router(default-route='dashboard')
div.segment.margin-right-xxsmall
div.segment.icon.icon-small.icon-grid
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.communities")
solid-route(name=`${component.route}-profile`)
div.divider
if component.type == "circles"

View File

@ -22,6 +22,17 @@ 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-logo.pug
include widgets/hubl-communities-profile-address.pug
include widgets/hubl-communities-profile-email.pug
include widgets/hubl-communities-profile-facebook.pug
include widgets/hubl-communities-profile-instagram.pug
include widgets/hubl-communities-profile-linkedin.pug
include widgets/hubl-communities-profile-logo.pug
include widgets/hubl-communities-profile-members-counter.pug
include widgets/hubl-communities-profile-phone.pug
include widgets/hubl-communities-profile-picture.pug
include widgets/hubl-communities-profile-twitter.pug
include widgets/hubl-communities-profile-website.pug
include widgets/hubl-counter.pug
include widgets/hubl-email-field.pug
include widgets/hubl-menu-empty.pug

View File

@ -1,3 +1,3 @@
if componentSet.has('admin') && componentSet.has('circles')
if (componentSet.has('admin') && componentSet.has('circles')) || componentSet.has('communities')
solid-widget(name='hubl-admin-community-logo')
template ${value != "" ? `<div \style="background-image:url(${value});" />` : `<div></div>`}

View File

@ -1,4 +1,4 @@
if componentSet.has('admin') && componentSet.has('communities')
if componentSet.has('communities')
solid-widget(name='hubl-communities-counter-alternate')
template
div
@ -9,4 +9,4 @@ if componentSet.has('admin') && componentSet.has('communities')
nested-field="members"
counter-template="\\\${counter}"
)
span members
span(data-trans="communities.list.members")

View File

@ -1,3 +1,3 @@
if componentSet.has('admin') && componentSet.has('communities')
if componentSet.has('communities')
solid-widget(name='hubl-communities-logo')
template ${value != "" ? `<div \style="background-image:url(${value});" />` : `<div></div>`}
template ${value != "" ? `<div \style="background-image:url(${value});" />` : `<div></div>`}

View File

@ -0,0 +1,4 @@
if componentSet.has('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>`}

View File

@ -0,0 +1,3 @@
if componentSet.has('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>`}

View File

@ -0,0 +1,3 @@
if componentSet.has('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>`}

View File

@ -0,0 +1,3 @@
if componentSet.has('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>`}

View File

@ -0,0 +1,3 @@
if componentSet.has('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>`}

View File

@ -1,3 +1,3 @@
if componentSet.has('admin') && componentSet.has('communities')
if componentSet.has('communities')
solid-widget(name='hubl-communities-profile-logo')
template ${value != "" ? `<div \style="background-image:url(${value});" />` : `<div></div>`}

View File

@ -1,4 +1,4 @@
if componentSet.has('admin') && componentSet.has('communities')
if componentSet.has('communities')
solid-widget(name='hubl-communities-profile-members-counter')
template
p
@ -8,4 +8,4 @@ if componentSet.has('admin') && componentSet.has('communities')
fields=''
counter-template="\\\${counter}"
)
span members
span(data-trans="communities.profile.members")

View File

@ -0,0 +1,3 @@
if componentSet.has('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>`}

View File

@ -0,0 +1,3 @@
if componentSet.has('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>`}

View File

@ -1,6 +0,0 @@
if componentSet.has('admin') && componentSet.has('communities')
solid-widget(name='hubl-communities-profile-profile')
template
| ${value.website != "" ? `<a class="link margin-bottom-xsmall icon mdi-link-variant icon-third icon-large icon-margin-right-xsmall" href="tel:\${value.website}" target="_blank">\$value.website</a>` : `<div></div>`}
| ${value.email != "" ? `<a class="link margin-bottom-xsmall icon mdi-email-outline icon-third icon-large icon-margin-right-xsmall" href="mailto:\${value.email}">\$value.email</a>` : `<div></div>`}
| ${value.phone != "" ? `<a class="link margin-bottom-xsmall icon mdi-cellphone-iphone icon-third icon-large icon-margin-right-xsmall" href="tel:\${value.phone}">\$value.phone</a>` : `<div></div>`}

View File

@ -0,0 +1,3 @@
if componentSet.has('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>`}

View File

@ -0,0 +1,3 @@
if componentSet.has('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>`}