diff --git a/README.md b/README.md index 5d2b182ff57b9ce9c9444b1b5a0f87c254ad0782..1b59afca026fc04b614bebcc926345367acafe49 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/views/partials/communities/page-community-edit.pug b/src/views/partials/communities/page-community-edit.pug index 8aa9e59aa73c08628dafcfb8c2eb1c8a93ea707c..01337ed8b79a56d3bae9931c867e8dc8cafbe41e 100644 --- a/src/views/partials/communities/page-community-edit.pug +++ b/src/views/partials/communities/page-community-edit.pug @@ -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) diff --git a/src/views/partials/communities/page-community-map.pug b/src/views/partials/communities/page-community-map.pug index 36d9f62f32e707a66f31b1f9d66d62e497f8eafb..e931c69246c3551d4b1033ec484f4c34867fa6a1 100644 --- a/src/views/partials/communities/page-community-map.pug +++ b/src/views/partials/communities/page-community-map.pug @@ -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" diff --git a/src/views/partials/communities/page-community-profile.pug b/src/views/partials/communities/page-community-profile.pug index 6944bb71a57e8a3e8a99a919fde9beb76fb77a35..6ff9400b537f807746bbb8670279d56f1d4b41df 100644 --- a/src/views/partials/communities/page-community-profile.pug +++ b/src/views/partials/communities/page-community-profile.pug @@ -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 ) diff --git a/src/views/partials/menu-left.pug b/src/views/partials/menu-left.pug index 862bc3e360ee0bf686150b584ac587ad0f80b6cc..b16a1d8328a32fe260a4662ead5ed179c34114cc 100644 --- a/src/views/partials/menu-left.pug +++ b/src/views/partials/menu-left.pug @@ -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" diff --git a/src/views/partials/widgets/hubl-communities-map-fix-url-name.pug b/src/views/partials/widgets/hubl-communities-map-fix-url-name.pug index d5a41abd07aad4980745836477a95c31e3006784..f46b938c88d4c44ad0d2d332e1a364543e55061a 100644 --- a/src/views/partials/widgets/hubl-communities-map-fix-url-name.pug +++ b/src/views/partials/widgets/hubl-communities-map-fix-url-name.pug @@ -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