fix: community directory

This commit is contained in:
Jean-Baptiste Pasquier 2021-04-13 13:31:07 +02:00
parent 65a523578c
commit 8b6ae44abd
6 changed files with 32 additions and 13 deletions

View File

@ -650,6 +650,29 @@ Some module don't need any route to be active, set `route` to `false` so.
Components can get the route of a module with `window.hubl.getRoute('componentName')`.
#### Change the default route
By default, Hubl will take a Dashboard as a default route.
You can enforce a component to be the default one by adding `defaultRoute` to its parameters.
Eg.:
```json
{
"type": "profileDirectory",
"endpoints": {
"get": "http://server.url/users/",
"skills": "http://server.url/skills/",
"uploads": "http://server.url/upload/"
},
"route": "directory",
"defaultRoute": true
}
```
If there is more than one component with this parameter, it'll be ignored.
## Troubleshooting
### Circles or Projects are missing the @user list

View File

@ -108,7 +108,7 @@ div.bg-color-white
submit-button=""
submit-widget="button"
data-trans="label-addresses.address_line1=communities.edit.labelAddressLine1;label-addresses.address_line2=communities.edit.labelAddressLine2"
data-trans="label-address_line1=communities.edit.labelAddressLine1;label-address_line2=communities.edit.labelAddressLine2"
)
solid-ac-checker(no-permission="acl:Write", bind-resources)

View File

@ -13,7 +13,7 @@
submit-button=""
submit-widget="button"
data-trans='placeholder-name=communities.list.searchBy;submit-button=communities.list.searchButton'
data-trans='placeholder-filter=communities.list.searchBy;submit-button=communities.list.searchButton'
)
div.segment.quarter.sm-full.text-right
solid-link.segment.children-link-rounded.children-icon-grid.children-link-reversed.color-secondary.bordered(next=`${component.route}-directory`)
@ -26,11 +26,11 @@
class-segment1="segment block margin-medium"
class-segment2="segment full padding-top-xlarge padding-right-large padding-left-large sm-padding-medium border-top border-color-grey text-center whitespace-normal"
class-community.name="title segment block margin-bottom-xsmall text-color-heading text-xlarge text-bold"
class-community.name="segment block margin-bottom-xsmall text-color-heading text-xlarge text-bold"
class-community.profile.shortDescription="segment block description text-medium whitespace-normal two-lines-ellipsis"
action-circle.name=`${getRoute(`community`, true)}-profile`
widget-circle.name='hubl-communities-map-fix-url-name'
action-community.name=`${component.route}-profile`
widget-community.name='hubl-communities-map-fix-url-name'
widget-community.logo='hubl-admin-community-logo'
widget-community.members="hubl-communities-profile-members-counter"

View File

@ -63,7 +63,7 @@ div.community-profile.padding-medium.sm-padding-none
action-edit="edit"
widget-edit="hubl-communities-edit-button"
multiple-addresses
multiple-addresses-fields="adress_line1, address_line2"
multiple-addresses-fields="address_line1, address_line2"
bind-resources
)

View File

@ -13,7 +13,7 @@ solid-form-search.icon.children-icon-magnifier(
submit-widget="button"
)
div.divider
solid-router#navbar-router(default-route='dashboard')
solid-router#navbar-router(default-route=defaultRoute)
for component of components
if component.route
if component.type == "about"

View File

@ -2,13 +2,9 @@ if componentSet.has('communities')
solid-widget(name='hubl-communities-name')
template
solid-link(
data-src="${src || value}"
data-src="${value}"
next=`${getRoute(`communities`, true)}-profile`
)
solid-display(
data-src="${src || value}"
fields="name"
)
) ${await value.name}
solid-widget(name='hubl-communities-map-fix-url-name')
template