major: startinblox-feature-requests#181

This commit is contained in:
Jean-Baptiste Pasquier 2021-02-22 21:27:58 +01:00
parent 5cc3e9b7f4
commit e28af8a048
97 changed files with 2166 additions and 1625 deletions

574
README.md
View File

@ -4,7 +4,7 @@
<br> <br>
</h1> </h1>
<h4 align="center">A magic tool that allows the Freelance Network to thrive in a decentralized way, built on top of <a href="https://startinblox.com/" target="_blank">Startin'blox</a>.</h4> <h4 align="center">A magic orchestrator that allows the Freelance Network to thrive in a decentralized way, built on top of <a href="https://startinblox.com/" target="_blank">Startin'blox</a>.</h4>
<hr> <hr>
@ -22,24 +22,20 @@ These instructions will get you a copy of the project up and running on your loc
To install Hubl, you'll need: To install Hubl, you'll need:
* A [Hubl Server](https://git.startinblox.com/djangoldp-packages/server-manager/) (djangoldp>1) * A [Hubl Server](https://git.startinblox.com/djangoldp-packages/server-manager/) (djangoldp>2)
* A [Prosody Server](https://prosody.im/) (with [appropriate modules](https://git.startinblox.com/infra/prosody-modules/)) * A [Prosody Server](https://prosody.im/) (with [appropriate modules](https://git.startinblox.com/infra/prosody-modules/)) (optional)
* A SMTP Server (optional) * A SMTP Server (optional)
* NodeJS on your machine * NodeJS on your machine
Before diving in you have to check your Hubl Server supports the following LDP packages: Before diving in you have to check your Hubl Server supports the following LDP packages:
* djangoldp_account * djangoldp_account
* djangoldp_community
* djangoldp_notification
* djangoldp_profile
* djangoldp_skill
* djangoldp_uploader * djangoldp_uploader
* oidc_provider: django-webidoidc-provider * an oidc_provider (eg: [django-webidoidc-provider](https://git.startinblox.com/djangoldp-packages/django-webidoidc-provider))
Those packages are given with the last stable version tested. Those packages are given with the last stable version tested.
Refer to the [documentation to install a Hubl Server](https://docs.startinblox.com/import_documentation/install-sib-server.html) with this configuration. Refer to the [documentation to install a Hubl Server](https://docs.startinblox.com/import_documentation/install-djangoldp-server.html) with this configuration.
## Build the application ## Build the application
@ -71,6 +67,8 @@ Serve, watch files & rebuild on change with this command:
npm run watch npm run watch
``` ```
Notice that you may have to restart the watcher for the config.json and for locales files.
### Multiple config.json ### Multiple config.json
You can have as many `config.*.json` as you need. You can have as many `config.*.json` as you need.
@ -87,114 +85,208 @@ Build with a custom config file:
CONFIG_PATH='config.customName.json' npm run build CONFIG_PATH='config.customName.json' npm run build
``` ```
### Theme checker
The [Hubl theme manager](https://cdn.startinblox.com/hubl/theme/) is very handy for customer to easily customize the main colors they want to use.
But developers should verify that their development use those colors to fit the customer wishes. The theme checker make this task easier :
just add `"themeChecker": true` to the config.json to display the color picker tool in the header bar. Changing the color will set them on the
whole app so that you can verify that your development take them into account correctly.
## Mandatory modules ## Mandatory modules
By default, a Hubl includes only individual chat modules. By default, a Hubl includes only individual chat modules.
On Server: `djangoldp_account`, `djangoldp_profile`, `djangoldp_notification`, `djangoldp_skill`, `djangoldp_upload`, `oidc_provider` packages On Server: `djangoldp_account`, `djangoldp_upload`, `django-webidoidc-provider` packages
On `config.json`: On `config.json`:
```json ```json
{ {
"xmppWebsocket": "wss://jabber.happy-dev.fr/xmpp-websocket", "client": {
"clientName": "My local Hubl", "name": "Localhost",
"clientLogo": "/images/logo.webp", "logo": "/images/logo.webp"
"authority": "http://localhost:8000/",
"endpoints": {
"get": {
"communities": "http://server.url/open-communities/",
"skills": "http://server.url/skills/",
"users": "http://server.url/users/"
},
"post": {
"uploads": "http://server.url/upload/"
}
} }
"components": []
} }
``` ```
Where: Where:
* `clientName` is the name of your Hubl * `client.name` is the name of your Hubl
* `clientLogo` is an URL to an image file * `client.logo` is an URL to an image file
* `xmppWebsocket` is your [Prosody](https://prosody.im/) with [appropriate modules](https://git.startinblox.com/infra/prosody-modules/) configured on. * `components` is your modules declaration registry
* `authority` is the OpenID Provider. Usually, if you use `djangoldp-account` it's the same as your djangoldp server.
* `endpoints.*.communities` is the API endpoints for Open Communities on your djangoldp server. (djangoldp-community)
* `endpoints.*.users` is the API endpoints for Users on your djangoldp server. (djangoldp-account)
* `endpoints.*.skills` is the API endpoints for Skills on your djangoldp server. (djangoldp-skill)
* `endpoints.*.uploads` is the API endpoints for Uploads on your djangoldp server. (djangoldp-upload)
### Communities
Communities are mandatory to have an Hubl. If you're upgrading an existion Hubl, you can assign all your local users to a community this way:
```bash
./manage.py create_community --name="My community"
```
Don't forget to set some users as admin from the Django Admin if you want to allow them to create new users from app.
If you set `allow_self_registration` on your community, it'll disable the auto-login feature of Hubl and allow your users to self register on your application.
### Optional personalisation ### Optional personalisation
On `config.json`: On `config.json`:
```json ```json
"clientFavicon": "/images/favicon.webp", {
"clientLogoHeight": "32px", "client": {
"clientCSS": "/path/to/custom.css", "favicon": "/images/favicon.webp",
"authorityName": "djangoldp-server-name" "css": "/path/to/custom.css",
}
}
``` ```
Where: Where:
* `clientFavicon` is an URL to a distant favicon * `client.avicon` is an URL to a distant favicon
* `clientLogoHeight` allow a quick fix to manage different height logos * `client.css` is an URL to a distant CSS that'll be the last one loaded by the Hubl
* `clientCSS` is an URL to a distant CSS that'll be the last one loaded by the Hubl
* `authorityName` is a visual name of your OpenID Provider ### Allow to login to your application
Most of other modules will need to have an user logged in, if you want to use communities, then scroll back to the User Registration module, else you'll need to activate the Auto Login module:
```json
{
"type": "autoLogin",
"parameters": {
"authority": "http://server.url/"
}
}
```
Where:
* `authority` is the OpenID Provider. Usually, if you use `djangoldp_account` it's the same as your djangoldp server.
## Optional modules ## Optional modules
### Adding modules
You can append any module listed bellow to your `components` entry on your `config.json`
Eg. to add the `notification` module:
```json
{
"components": [
{
"type": "notification",
"route": false
}
]
}
```
### About
About is a short page about the technology behind Hubl.
To activate about on Hubl, add this module declaration your `config.json`:
```json
{
"type": "about",
"route": false
}
```
### Administration
Administration is a minimal modulable admin module for all other ones.
To activate administration on Hubl, add this module declaration your `config.json`:
```json
{
"type": "admin",
"route": false
}
```
### Analytics ### Analytics
Hubl support Google or Matomo as analytics trackers. To use them, add to your `config.json`: Hubl support Google or Matomo as analytics trackers. To use them, add to your `config.json`:
```json ```json
"analytics": [
{ {
"type": "matomo", //Or "google" "type": "analytics",
"url": "https://my-personal.matomo.cloud/", "parameters": {
"id": "1" "type": "matomo",
"url": "https://my-personal.matomo.cloud/",
"id": "1"
},
"route": false
} }
]
``` ```
### Circles ### Circles
Circles are a public group chat. To activate them, you need: Circles define group of users that can chat & share documents togethers.
On Server: `djangoldp_circle` packages Community module is mandatory.
On `config.json`: To activate them, you need:
On Server: `djangoldp_circle`, `djangoldp_communities`, `djangoldp_notifications` packages
Module declaration, on `config.json`:
```json ```json
"endpoints": { {
"get": { "type": "circles",
"circle": "http://server.url/circles/" "endpoints": {
}, "get": "http://server.url/circles/",
"post": { "post": "http://server.url/circles/",
"circle": "http://server.url/circles/" "owners": "http://server.url/users/",
}, "users": "http://server.url/users/",
} "xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
}
}
```
Where:
* `owners`: is your users container which contains valid owners
* `users`: is your users container
* `xmpp` is your [Prosody](https://prosody.im/) with [appropriate modules](https://git.startinblox.com/infra/prosody-modules/) configured on.
#### Circles extensions
You can extend circles with other components, the same way you would add them to your modules.
Actually it support: Events, Resources & Polls.
Eg.:
```json
{
"type": "circles",
"endpoints": {
"get": "http://server.url/circles/",
"post": "http://server.url/circles/",
"owners": "http://server.url/users/",
"users": "http://server.url/users/",
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
},
"extensions": [
{
"type": "events",
"endpoints": {
"get": "http://server.url/events/",
"post": "http://server.url/events/",
"typeevents": "http://server.url/typeevents/",
"postTypeevents": "http://server.url/typeevents/"
}
}
]
}
```
### Communities
Communities are an optional layer to add on an Hubl. They add a SOLID representation of one to many group of users on your data server.
If you're upgrading an existion Hubl, you can assign all your local users to a community this way:
```bash
./manage.py create_community --name="My community"
```
Don't forget to set some users as admin of the community from the Django Admin if you want to allow them to create new users from app.
To activate community on Hubl, add this module declaration your `config.json`:
```json
{
"type": "communities",
"route": false
}
``` ```
### Dashboard ### Dashboard
@ -203,168 +295,274 @@ Dashboard includes card generation from HTML. To activate them, you need:
On Server: `djangoldp_dashboard` packages On Server: `djangoldp_dashboard` packages
On `config.json`: Module declaration, on `config.json`:
```json ```json
"endpoints": { {
"get": { "type": "dashboard",
"dashboard": "http://server.url/dashboard/" "endpoints": {
"get": "http://server.url/dashboards/"
}
} }
}
``` ```
A [sample fixture](https://git.startinblox.com/djangoldp-packages/djangoldp-dashboard/blob/master/djangoldp_dashboard/fixtures/sample.json) can be loaded with `./manage.py loaddata sample`. A [sample fixture](https://git.startinblox.com/djangoldp-packages/djangoldp-dashboard/blob/master/djangoldp_dashboard/fixtures/sample.json) can be loaded with `./manage.py loaddata sample`.
You can have multiple dashboard module, see the [related documentation](https://git.startinblox.com/components/solid-dashboard#having-multiple-dashboard).
### Events
The events module includes a listing of upcoming events and the capability to create new ones.
To activate it, you need:
On Server: `djangoldp_event` packages
Module declaration, on `config.json`:
```json
{
"type": "events",
"endpoints": {
"get": "http://server.url/events/",
"post": "http://server.url/events/",
"typeevents": "http://server.url/typeevents/",
"postTypeevents": "http://server.url/typeevents/"
}
}
```
You can get only future events by using:
```json
"get": "http://server.url/events/future/",
```
### Job Offers ### Job Offers
Job Offers includes a job board with conversation. To activate them, you need: Job Offers includes a job board with conversation. To activate them
Community module is mandatory.
You'll need:
On Server: `djangoldp_joboffer`, `djangoldp_skill`, `djangoldp_upload`, `djangoldp_conversation` packages On Server: `djangoldp_joboffer`, `djangoldp_skill`, `djangoldp_upload`, `djangoldp_conversation` packages
Module declaration, on `config.json`:
```json
{
"type": "jobBoard",
"endpoints": {
"get": "http://server.url/job-offers/",
"post": "http://server.url/job-offers/",
"skills": "http://server.url/skills/"
}
}
```
### Notifications
The notification module adds a bell with user's notification list and a badge on each menus with how much notifications are related to this resource. You'll need:
On Server: `djangoldp_notifications` packages
On `config.json`: On `config.json`:
```json ```json
"endpoints": { {
"get": { "type": "notification",
"joboffers": "http://server.url/job-offers/" "route": false
}
```
### One-to-one chat
One-to-one chat allow your users to chat together on a private channel.
Community & User Directory modules are mandatory.
You'll need:
Module declaration, on `config.json`:
```json
{
"type": "chat",
"endpoints": {
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
}
}
```
Where:
* `xmpp` is your [Prosody](https://prosody.im/) with [appropriate modules](https://git.startinblox.com/infra/prosody-modules/) configured on.
### Polls
The polls module allows user to create polls. To activate it, you need:
On Server: `djangoldp_polls`, `djangoldp_conversation` packages
On `config.json`:
```json
{
"type": "polls",
"endpoints": {
"get": "http://server.url/polls/",
"post": "http://server.url/polls/"
}
} }
}
``` ```
### Project ### Project
Project are a private group chat including Customer and Business Provider management. To activate them, you need: Project are a private group chat including Customer and Business Provider management.
Community module is mandatory.
To activate them, you need:
On Server: `djangoldp_project` packages On Server: `djangoldp_project` packages
On `config.json`: Module declaration, on `config.json`:
```json ```json
"endpoints": { {
"get": { "type": "projects",
"projects": "http://server.url/projects/" "endpoints": {
}, "get": "http://server.url/projects/",
"post": { "post": "http://server.url/projects/",
"projects": "http://server.url/projects/" "captains": "http://server.url/users/",
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
}
} }
}
``` ```
Where:
* `captains`: is your users container which contains valid captains
* `xmpp` is your [Prosody](https://prosody.im/) with [appropriate modules](https://git.startinblox.com/infra/prosody-modules/) configured on.
### Resources
The resources module includes a listing of indexed resources and the capability to index new ones.
To activate it, you need:
On Server: `djangoldp_resource`, `djangoldp_conversation` packages
Module declaration, on `config.json`:
```json
{
"type": "events",
"endpoints": {
"get": "http://server.url/resources/",
"post": "http://server.url/resources/",
"types": "http://server.url/keywords/",
"keywords": "http://server.url/types/",
"postTypes": "http://server.url/keywords/",
"postKeywords": "http://server.url/types/"
}
}
```
### User registration
The user registration module allows users to self-register.
Community module is mandatory.
If you set `allow_self_registration` on a community, it'll disable the auto-login feature of Hubl and allow your users to self register on your application.
To activate it, you need:
Module declaration, on `config.json`:
```json
{
"type": "registering",
"parameters": {
"authority": "http://server.url/",
"authorityName": "your-authority-indentifier"
},
"endpoints": {
"get": "http://server.url/open-communities/"
}
}
```
Where:
* `authority` is the OpenID Provider. Usually, if you use `djangoldp_account` it's the same as your djangoldp server.
* `authorityName` is a visual name of your OpenID Provider
### Theme checker
The [Hubl theme manager](https://cdn.startinblox.com/hubl/theme/) is very handy for customer to easily customize the main colors they want to use.
But developers should verify that their development use those colors to fit the customer wishes.
Module declaration, on `config.json`:
```json
{
"type": "themeChecker",
"route": false
}
```
Then you'll find the color picker tool in the header bar.
Changing the color will set them on the whole app so that you can verify that your development take them into account correctly.
### Users Directory ### Users Directory
Directory includes a listing of each users of your app and editable individual profile. To activate them, you need: Directory includes a listing of each users of your app and editable individual profile. To activate them, you need:
On Server: `djangoldp_skill`, `djangoldp_upload` packages On Server: `djangoldp_skill` packages
On `config.json`: Community module is mandatory.
Module declaration, on `config.json`:
```json ```json
"publicDirectory": true {
``` "type": "profileDirectory",
"endpoints": {
## Optional community modules "get": "http://server.url/users/",
"skills": "http://server.url/skills/",
### Events "uploads": "http://server.url/upload/"
}
The events module includes a listing of upcoming events and the capability to create new ones.
This module will also work inside the circles.
To activate it, you need:
On Server: `djangoldp_event`, `djangoldp_upload` packages
On `config.json`:
```json
"endpoints": {
"get": {
"events":"http://server.url/events/",
"typeevents":"http://server.url/typeevents/"
},
"post": {
"events":"http://server.url/events/",
"typeevents":"http://server.url/typeevents/"
}
}
```
You can get only future events by using
```json
"get": {
"events":"http://server.url/events/future/",
} }
``` ```
### Resources ### Route generation
The resources module includes a listing of indexed resources and the capability to index new ones. Hubl will, by default, generate an unique route for every of your module. You can customize this route by setting a `route` attribute on your module declaration.
This module will also work inside the circles.
To activate it, you need:
On Server: `djangoldp_resource`, `djangoldp_upload`, `djangoldp_conversation` packages Eg. for the Users Directory:
On `config.json`:
```json ```json
"endpoints": { {
"get": { "type": "profileDirectory",
"resources":"http://server.url/resources/", "endpoints": {
"resourceskeywords":"http://server.url/keywords/", "get": "http://server.url/users/",
"resourcestypes":"http://server.url/types/" "skills": "http://server.url/skills/",
}, "uploads": "http://server.url/upload/"
"post": { },
"resources":"http://server.url/resources/", "route": "directory"
"resourceskeywords":"http://server.url/keywords/",
"resourcestypes":"http://server.url/types/"
} }
}
``` ```
### Polls Will lead to `http://client.url/directory` as URL to reach the module instead of the default `http://client.url/profileDirectory`.
The polls module allows user to create polls related (or not) to circles. To activate it, you need: If you provide no `route`, then Hubl will use the `type` as route view name. If two modules share the same `route`, they'll get suffixed with a random unique id.
On Server: `djangoldp_polls`, `djangoldp_upload`, `djangoldp_conversation` packages Some module don't need any route to be active, set `route` to `false` so.
On `config.json`: Components can get the route of a module with `window.hubl.getRoute('componentName')`.
```json
"endpoints": {
"get": {
"polls":"http://server.url/polls/"
},
"post": {
"polls":"http://server.url/polls/"
}
}
```
## Use with docker
### Multi services
Run with a local binding on localhost:
```bash
docker-compose build
docker-compose up -d client server
```
Use in CI context:
```bash
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml up -d client server
docker-compose -f docker-compose.yml run --rm e2e
```
Build and push the server to registry:
```bash
docker build -f docker/djangoldp.docker --build-arg serve="http://localhost:8000" -t registry.startinblox.com/applications/hubl/server:0.1 .
docker push registry.startinblox.com/applications/hubl/server:0.1
```
Note: within a Kubernetes pod all services are bound to `localhost`.
## Troubleshooting ## Troubleshooting

View File

@ -1,18 +1,93 @@
{ {
"xmppWebsocket": "wss://jabber.happy-dev.fr/xmpp-websocket", "client": {
"clientName": "My local Hubl", "name": "Sample of a functional Hubl",
"clientLogo": "/images/logo.webp", "logo": "https://cdn.startinblox.com/logos/webp/hubl.webp"
"authority": "http://localhost:8000/", },
"endpoints": { "components": [{
"get": { "type": "registering",
"communities": "http://localhost:8000/open-communities/", "parameters": {
"skills": "http://localhost:8000/skills/", "authority": "http://localhost:8000/",
"users": "http://localhost:8000/users/" "authorityName": "dataserver"
},
"endpoints": {
"get": "http://localhost:8000/open-communities/"
},
"route": false
}, },
"post": { {
"communities": "http://localhost:8000/communities/", "type": "notification",
"users": "http://localhost:8000/users/", "route": false
"upload": "http://localhost:8000/upload/" },
{
"type": "admin",
"route": false
},
{
"type": "about"
},
{
"type": "communities",
"route": false
},
{
"type": "dashboard",
"endpoints": {
"get": "http://localhost:8000/dashboards/"
}
},
{
"type": "profileDirectory",
"endpoints": {
"get": "http://localhost:8000/users/",
"skills": "http://localhost:8000/skills/",
"uploads": "http://localhost:8000/upload/"
},
"route": "members"
},
{
"type": "jobBoard",
"endpoints": {
"get": "http://localhost:8000/job-offers/",
"post": "http://localhost:8000/job-offers/",
"skills": "http://localhost:8000/skills/"
},
"route": "job-offers"
},
{
"type": "projects",
"endpoints": {
"get": "http://localhost:8000/projects/",
"post": "http://localhost:8000/projects/",
"captains": "http://localhost:8000/users/",
"users": "http://localhost:8000/users/",
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
}
},
{
"type": "circles",
"endpoints": {
"get": "http://localhost:8000/circles/",
"post": "http://localhost:8000/circles/",
"owners": "http://localhost:8000/users/",
"users": "http://localhost:8000/users/",
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
}
},
{
"type": "chat",
"endpoints": {
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
},
"route": "messages"
},
{
"type": "analytics",
"parameters": {
"type": "matomo",
"url": "https://matomo.startinblox.com/",
"id": "2"
},
"route": false
} }
} ]
} }

View File

@ -33,9 +33,9 @@ context('Delete Channel Browser Testing', () => {
cy.get(menuQuery.join(' ')) cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src') .invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => { .then(url => cy.encodeUrl(url).then(id => {
cy.visit('/circle/@' + id + '/circle-information'); cy.visit('/circles/@' + id + '/circles-information');
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/circle/@' + id + '/circle-information'); expect(loc.pathname).to.eq('/circles/@' + id + '/circles-information');
}); });
})); }));
}); });
@ -43,18 +43,18 @@ context('Delete Channel Browser Testing', () => {
cy.get(menuCountQuery.join(' ')).its('length').then(length => channelsLength = length); cy.get(menuCountQuery.join(' ')).its('length').then(length => channelsLength = length);
}); });
it('should click button to retire the channel', () => { it('should click button to retire the channel', () => {
cy.get('#circle-profile solid-delete[data-label="Supprimer le canal"] button').click(); cy.get('#circles-profile solid-delete[data-label="Supprimer le canal"] button').click();
}); });
it('should stay on channel edit screen', () => { it('should stay on channel edit screen', () => {
cy.get(menuQuery.join(' ')) cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src') .invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => { .then(url => cy.encodeUrl(url).then(id => {
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/circle/@' + id + '/circle-information'); expect(loc.pathname).to.eq('/circles/@' + id + '/circles-information');
}); });
})); }));
}); });
it('should check if chennel was retired', () => { it('should check if channel was retired', () => {
cy.get(menuCountQuery.join(' ')).its('length').should(length => { cy.get(menuCountQuery.join(' ')).its('length').should(length => {
expect(length).to.eq(channelsLength - 1); expect(length).to.eq(channelsLength - 1);
}); });

View File

@ -33,27 +33,27 @@ context('Edit Channel Browser Testing', () => {
cy.get(menuQuery.join(' ')) cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src') .invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => { .then(url => cy.encodeUrl(url).then(id => {
cy.visit('/circle/@' + id + '/circle-information/circle-edit'); cy.visit('/circles/@' + id + '/circles-information/circles-edit');
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/circle/@' + id + '/circle-information/circle-edit'); expect(loc.pathname).to.eq('/circles/@' + id + '/circles-information/circles-edit');
}); });
})); }));
}); });
it('should enter new channel data', () => { it('should enter new channel data', () => {
cy.get('#circle-edit input[name="name"]').clear().type(channelName); cy.get('#circles-edit input[name="name"]').clear().type(channelName);
cy.get('#circle-edit input[name="name"]').should('have.value', channelName); cy.get('#circles-edit input[name="name"]').should('have.value', channelName);
cy.get('#circle-edit input[name="description"]').clear().type(description); cy.get('#circles-edit input[name="description"]').clear().type(description);
cy.get('#circle-edit input[name="description"]').should('have.value', description); cy.get('#circles-edit input[name="description"]').should('have.value', description);
}); });
it('should click button to save the channel', () => { it('should click button to save the channel', () => {
cy.get('#circle-edit input[value="Enregistrer"]').click(); cy.get('#circles-edit input[value="Enregistrer"]').click();
}); });
it('should land on channel information screen', () => { it('should land on channel information screen', () => {
cy.get(menuQuery.join(' ')) cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src') .invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => { .then(url => cy.encodeUrl(url).then(id => {
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/circle/@' + id + '/circle-information'); expect(loc.pathname).to.eq('/circles/@' + id + '/circles-information');
}); });
})); }));
}); });

View File

@ -35,29 +35,29 @@ context('Edit Project Browser Testing', () => {
cy.get(menuQuery.join(' ')) cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src') .invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => { .then(url => cy.encodeUrl(url).then(id => {
cy.visit('/project/@' + id + '/project-information/project-edit'); cy.visit('/projects/@' + id + '/projects-information/projects-edit');
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/project/@' + id + '/project-information/project-edit'); expect(loc.pathname).to.eq('/projects/@' + id + '/projects-information/projects-edit');
}); });
})); }));
}); });
it('should enter new project data', () => { it('should enter new project data', () => {
cy.get('#project-edit input[name="customer.name"]').clear().type(customerName); cy.get('#projects-edit input[name="customer.name"]').clear().type(customerName);
cy.get('#project-edit input[name="customer.name"]').should('have.value', customerName); cy.get('#projects-edit input[name="customer.name"]').should('have.value', customerName);
cy.get('#project-edit input[name="name"]').clear().type(projectName); cy.get('#projects-edit input[name="name"]').clear().type(projectName);
cy.get('#project-edit input[name="name"]').should('have.value', projectName); cy.get('#projects-edit input[name="name"]').should('have.value', projectName);
cy.get('#project-edit textarea[name="description"]').clear().type(description); cy.get('#projects-edit textarea[name="description"]').clear().type(description);
cy.get('#project-edit textarea[name="description"]').should('have.value', description); cy.get('#projects-edit textarea[name="description"]').should('have.value', description);
}); });
it('should click button to save the project', () => { it('should click button to save the project', () => {
cy.get('#project-edit input[value="Enregistrer"]').click(); cy.get('#projects-edit input[value="Enregistrer"]').click();
}); });
it('should land on project information screen', () => { it('should land on project information screen', () => {
cy.get(menuQuery.join(' ')) cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src') .invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => { .then(url => cy.encodeUrl(url).then(id => {
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/project/@' + id + '/project-information'); expect(loc.pathname).to.eq('/projects/@' + id + '/projects-information');
}); });
})); }));
}); });

View File

@ -27,38 +27,38 @@ context('Edit User Browser Testing', () => {
it('should login', () => cy.login()); it('should login', () => cy.login());
describe('User Edition process', () => { describe('User Edition process', () => {
it('should visit the user edit screen', () => { it('should visit the user edit screen', () => {
cy.visit('/profile/solid-profile-edit-profile'); cy.visit('/members/members-edit-profile');
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/profile/solid-profile-edit-profile'); expect(loc.pathname).to.eq('/members/members-edit-profile');
}); });
}); });
/// Workaround - Routing bug - user won't land on edit profile screen /// Workaround - Routing bug - user won't land on edit profile screen
it('should navigate to user edit screen', () => { it('should navigate to user edit screen', () => {
cy.get('#solid-profile-my-profile solid-link[next="solid-profile-edit-profile"]').click(); cy.get('#members-my-profile solid-link[next="members-edit-profile"]').click();
}); });
/// End workaround /// End workaround
it('should enter new user data', () => { it('should enter new user data', () => {
cy.get('#solid-profile-edit-profile input[name="first_name"]').clear().type(userFirstName); cy.get('#members-edit-profile input[name="first_name"]').clear().type(userFirstName);
cy.get('#solid-profile-edit-profile input[name="first_name"]').should('have.value', userFirstName); cy.get('#members-edit-profile input[name="first_name"]').should('have.value', userFirstName);
cy.get('#solid-profile-edit-profile input[name="last_name"]').clear().type(userLastName); cy.get('#members-edit-profile input[name="last_name"]').clear().type(userLastName);
cy.get('#solid-profile-edit-profile input[name="last_name"]').should('have.value', userLastName); cy.get('#members-edit-profile input[name="last_name"]').should('have.value', userLastName);
cy.get('#solid-profile-edit-profile textarea[name="profile.job"]').clear().type(jobDescription); cy.get('#members-edit-profile textarea[name="profile.job"]').clear().type(jobDescription);
cy.get('#solid-profile-edit-profile textarea[name="profile.job"]').should('have.value', jobDescription); cy.get('#members-edit-profile textarea[name="profile.job"]').should('have.value', jobDescription);
cy.get('#solid-profile-edit-profile input[name="profile.city"]').clear().type(city); cy.get('#members-edit-profile input[name="profile.city"]').clear().type(city);
cy.get('#solid-profile-edit-profile input[name="profile.city"]').should('have.value', city); cy.get('#members-edit-profile input[name="profile.city"]').should('have.value', city);
cy.get('#solid-profile-edit-profile input[name="profile.phone"]').clear().type(phone); cy.get('#members-edit-profile input[name="profile.phone"]').clear().type(phone);
cy.get('#solid-profile-edit-profile input[name="profile.phone"]').should('have.value', phone); cy.get('#members-edit-profile input[name="profile.phone"]').should('have.value', phone);
cy.get('#solid-profile-edit-profile input[name="profile.website"]').clear().type(website); cy.get('#members-edit-profile input[name="profile.website"]').clear().type(website);
cy.get('#solid-profile-edit-profile input[name="profile.website"]').should('have.value', website); cy.get('#members-edit-profile input[name="profile.website"]').should('have.value', website);
}); });
it('should click button to save the user', () => { it('should click button to save the user', () => {
cy.get('#solid-profile-edit-profile input[value="ENREGISTRER"]').click(); cy.get('#members-edit-profile input[value="ENREGISTRER"]').click();
}); });
it('should land on user information screen', () => { it('should land on user information screen', () => {
cy.location().should(location => { cy.location().should(location => {
/// Workaround - Routing bug - route pathname won't be /profile as it should /// Workaround - Routing bug - route pathname won't be /profile as it should
expect(location.pathname).to.eq('/'); expect(location.pathname).to.eq('/');
// expect(location.pathname).to.eq('/profile'); // expect(location.pathname).to.eq('/members');
/// End workaround /// End workaround
}); });
}); });

View File

@ -33,7 +33,7 @@ context('Leave Channel Browser Testing', () => {
cy.get(tableListQuery.join(' ')).its('length').as('channelsLength'); cy.get(tableListQuery.join(' ')).its('length').as('channelsLength');
cy.get(tableQuery.join(' ')).click(); cy.get(tableQuery.join(' ')).click();
}); });
it('should check if chennel was left', () => { it('should check if channel was left', () => {
cy.get(tableListQuery.join(' ')).its('length').should(length => { cy.get(tableListQuery.join(' ')).its('length').should(length => {
expect(length).to.eq(this.channelsLength - 1); expect(length).to.eq(this.channelsLength - 1);
}); });

View File

@ -33,9 +33,9 @@ context('Retire Channel Browser Testing', () => {
cy.get(menuQuery.join(' ')) cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src') .invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => { .then(url => cy.encodeUrl(url).then(id => {
cy.visit('/circle/@' + id + '/circle-information/circle-edit'); cy.visit('/circles/@' + id + '/circles-information/circles-edit');
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/circle/@' + id + '/circle-information/circle-edit'); expect(loc.pathname).to.eq('/circles/@' + id + '/circles-information/circles-edit');
}); });
})); }));
}); });
@ -50,11 +50,11 @@ context('Retire Channel Browser Testing', () => {
.invoke('attr', 'data-src') .invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => { .then(url => cy.encodeUrl(url).then(id => {
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/circle/@' + id + '/circle-information/circle-edit'); expect(loc.pathname).to.eq('/circles/@' + id + '/circles-information/circles-edit');
}); });
})); }));
}); });
it('should check if chennel was retired', () => { it('should check if channel was retired', () => {
cy.get(menuCountQuery.join(' ')).its('length').should(length => { cy.get(menuCountQuery.join(' ')).its('length').should(length => {
expect(length).to.eq(channelsLength - 1); expect(length).to.eq(channelsLength - 1);
}); });

View File

@ -33,9 +33,9 @@ context('Retire Project Browser Testing', () => {
cy.get(menuQuery.join(' ')) cy.get(menuQuery.join(' '))
.invoke('attr', 'data-src') .invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => { .then(url => cy.encodeUrl(url).then(id => {
cy.visit('/project/@' + id + '/project-information/project-edit'); cy.visit('/projects/@' + id + '/projects-information/projects-edit');
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/project/@' + id + '/project-information/project-edit'); expect(loc.pathname).to.eq('/projects/@' + id + '/projects-information/projects-edit');
}); });
})); }));
}); });
@ -50,7 +50,7 @@ context('Retire Project Browser Testing', () => {
.invoke('attr', 'data-src') .invoke('attr', 'data-src')
.then(url => cy.encodeUrl(url).then(id => { .then(url => cy.encodeUrl(url).then(id => {
cy.location().should((loc) => { cy.location().should((loc) => {
expect(loc.pathname).to.eq('/project/@' + id + '/project-information/project-edit'); expect(loc.pathname).to.eq('/projects/@' + id + '/projects-information/projects-edit');
}); });
})); }));
}); });

View File

@ -78,7 +78,7 @@ context('Browser testing', () => {
// it('should open the circle information page', () => { // it('should open the circle information page', () => {
// cy.screenshot(); // cy.screenshot();
// cy.get('#navbar-router').contains(name).click(); // cy.get('#navbar-router').contains(name).click();
// cy.get('[name="circle-information"] > li').click(); // cy.get('[name="circles-information"] > li').click();
// }); // });
// it('should delete the circle', () => { // it('should delete the circle', () => {
// cy.get('.box-button > solid-ac-checker > .button').click(); // cy.get('.box-button > solid-ac-checker > .button').click();

View File

@ -32,17 +32,14 @@ const options = {
let config = JSON.parse(fs.readFileSync(configPath)); let config = JSON.parse(fs.readFileSync(configPath));
if(!config.clientName) throw `[Error] (Mandatory) Missing clientName on ${configPath}`;
if(!config.clientLogo) throw `[Error] (Mandatory) Missing clientLogo on ${configPath}`;
let manifest = { let manifest = {
"lang": "fr", "lang": "fr",
"dir": "ltr", "dir": "ltr",
"name": config.clientName, "name": config.client.name || "My Personal Hubl",
"description": `Hubl of ${config.clientName}`, "description": `Hubl of ${config.client.name || "My Personal Hubl"}`,
"short_name": config.clientName, "short_name": config.client.name || "My Personal Hubl",
"icons": [{ "icons": [{
"src": config.clientLogo, "src": config.client.logo || '/images/logo.webp',
"purpose": "any" "purpose": "any"
}, { }, {
"src": "/images/hubl-icon-192.png", "src": "/images/hubl-icon-192.png",
@ -61,7 +58,7 @@ const options = {
} }
await fse.writeJSON('./src/manifest.webmanifest', manifest) await fse.writeJSON('./src/manifest.webmanifest', manifest)
console.log(`Created manifest for ${config.clientName}`); console.log(`Created manifest for ${config.client.name || "My Personal Hubl"}`);
await fse.copy("./src/locales", "./dist/locales") await fse.copy("./src/locales", "./dist/locales")
console.log(`Copied locales to dist folder`); console.log(`Copied locales to dist folder`);

View File

@ -0,0 +1,14 @@
window.hubl.getRoute = (type, returnFirst = false) => {
let availables = window.hubl.components.filter(c => c.type == type);
if (availables.length > 1) {
if (returnFirst) {
return availables[0].route;
} else {
console.error(`Too much components availables for route ${type}`);
}
} else if (availables.length < 1) {
console.error(`No component found for route ${type}`);
} else {
return availables[0].route;
}
}

View File

@ -1,15 +1,17 @@
import { Sib } from 'https://cdn.skypack.dev/@startinblox/core@0.15'; import {
Sib
} from 'https://cdn.skypack.dev/@startinblox/core@0.15';
export const HublAutoLogin = { export const HublAutoLogin = {
name: 'hubl-auto-login', name: 'hubl-auto-login',
created() { created() {
document document
.querySelectorAll(".loggedIn-loader") .querySelectorAll(".loggedIn-loader")
.forEach(el => (el.style.display = "flex")); .forEach(el => (el.style.display = "flex"));
window.dispatchEvent( window.dispatchEvent(
new CustomEvent('requestNavigation', { new CustomEvent('requestNavigation', {
detail: { detail: {
route: "dashboard" route: window.hubl.getRoute("dashboard", true)
} }
}), }),
); );

View File

@ -1,4 +1,8 @@
import { store, Sib, StoreMixin } from 'https://cdn.skypack.dev/@startinblox/core@0.15'; import {
store,
Sib,
StoreMixin
} from 'https://cdn.skypack.dev/@startinblox/core@0.15';
export const HublReactivity = { export const HublReactivity = {
name: 'hubl-reactivity', name: 'hubl-reactivity',

View File

@ -1,4 +1,6 @@
import { widgetFactory } from 'https://cdn.skypack.dev/@startinblox/core@0.15'; import {
widgetFactory
} from 'https://cdn.skypack.dev/@startinblox/core@0.15';
const HublSearchUsers = widgetFactory( const HublSearchUsers = widgetFactory(
'hubl-search-users', 'hubl-search-users',
@ -12,4 +14,6 @@ const HublSearchUsers = widgetFactory(
>` >`
); );
export { HublSearchUsers } export {
HublSearchUsers
}

View File

@ -1,4 +1,7 @@
import { widgetFactory, Helpers } from 'https://cdn.skypack.dev/@startinblox/core@0.15'; import {
widgetFactory,
Helpers
} from 'https://cdn.skypack.dev/@startinblox/core@0.15';
import SlimSelect from 'https://cdn.skypack.dev/slim-select@1.23'; import SlimSelect from 'https://cdn.skypack.dev/slim-select@1.23';
const HublStatus = widgetFactory( const HublStatus = widgetFactory(
@ -18,10 +21,14 @@ const HublStatus = widgetFactory(
formWidget => { formWidget => {
let select = formWidget.querySelector('select'); let select = formWidget.querySelector('select');
if (!select) return; if (!select) return;
const slimSelect = new SlimSelect({select: select}); const slimSelect = new SlimSelect({
select: select
});
Helpers.importCSS('https://dev.jspm.io/slim-select/dist/slimselect.min.css'); Helpers.importCSS('https://dev.jspm.io/slim-select/dist/slimselect.min.css');
select.addEventListener('change', () => slimSelect.render()); select.addEventListener('change', () => slimSelect.render());
}, },
); );
export { HublStatus } export {
HublStatus
}

View File

@ -1,4 +1,4 @@
if(typeof Sentry !== 'undefined') { if (typeof Sentry !== 'undefined') {
Sentry.init({ Sentry.init({
dsn: 'https://b4b29557689049a39168599577adb940@sentry.startinblox.com/4', dsn: 'https://b4b29557689049a39168599577adb940@sentry.startinblox.com/4',
integrations: [new Sentry.Integrations.BrowserTracing()], integrations: [new Sentry.Integrations.BrowserTracing()],

View File

@ -1,9 +1,10 @@
-
const context = JSON.stringify({
"inbox": "http://happy-dev.fr/owl/#inbox",
"object": "http://happy-dev.fr/owl/#object",
"author": "http://happy-dev.fr/owl/#author",
"account": "http://happy-dev.fr/owl/#account",
"jabberID": "foaf:jabberID"
})
//- Context - Fix for default context //- Context - Fix for default context
script(data-default-context, type="application/ld+json") script(data-default-context, type="application/ld+json")!=context
| {
| "inbox": "http://happy-dev.fr/owl/#inbox",
| "object": "http://happy-dev.fr/owl/#object",
| "author": "http://happy-dev.fr/owl/#author",
| "account": "http://happy-dev.fr/owl/#account",
| "jabberID": "foaf:jabberID"
| }

View File

@ -1,49 +1,52 @@
script(type="module" src="https://cdn.skypack.dev/@startinblox/core@0.15" defer) script(type="module" src="https://cdn.skypack.dev/@startinblox/core@0.15" defer)
//- script(type="module" src="/lib/sib-core/dist/index.js" defer) //- script(type="module" src="/lib/sib-core/dist/index.js" defer)
script(type="module" src="https://cdn.skypack.dev/@startinblox/oidc@0.13" defer)
//- script(type="module" src="/lib/sib-auth/index.js" defer)
script(type="module" src="https://cdn.skypack.dev/@startinblox/router@0.11" defer) script(type="module" src="https://cdn.skypack.dev/@startinblox/router@0.11" defer)
//- script(type="module" src="/lib/sib-router/src/index.js" defer) //- script(type="module" src="/lib/sib-router/src/index.js" defer)
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-notifications@0.11" defer) - const componentSet = new Set(components.map(c=>c.type));
//- script(type="module" src="/lib/sib-notifications/index.js" defer)
if themeChecker if componentSet.has("autoLogin") || componentSet.has("registering")
script(src="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js") script(type="module" src="https://cdn.skypack.dev/@startinblox/oidc@0.13" defer)
link(rel='stylesheet', href='https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css') //- script(type="module" src="/lib/sib-auth/index.js" defer)
if endpoints.get if componentSet.has("chat") || componentSet.has("circles") || componentSet.has("projects")
if endpoints.get.events && endpoints.get.typeevents script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@4.1" defer)
script(type="module", src="https://cdn.skypack.dev/@startinblox/component-event@2.1", defer) //- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer)
//- script(type="module", src="/lib/solid-event/solid-event.js", defer)
//- Disabled - Not in core@0.15 if componentSet.has("dashboard")
//- if endpoints.get.resources && endpoints.get.resourceskeywords && endpoints.get.resourcestypes script(type="module" src="https://cdn.skypack.dev/@startinblox/component-dashboard@3.0" defer)
//- script(type="module" src="https://cdn.skypack.dev/@startinblox/component-resource@1.2" defer) //- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer)
//- script(type="module" src="/lib/sib-resource/sib-resource.js" defer)
if endpoints.get.joboffers if componentSet.has("events")
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-job-board@3.1" defer) script(type="module", src="https://cdn.skypack.dev/@startinblox/component-event@2.1", defer)
//- script(type="module" src="/lib/solid-job-board/dist/index.js" defer) //- script(type="module", src="/lib/solid-event/solid-event.js", defer)
if endpoints.get.uploads && endpoints.get.skills && endpoints.get.users if componentSet.has("events") || componentSet.has("polls") || componentSet.has("resources")
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-directory@3.3" defer) script(type="module" src="https://cdn.skypack.dev/@startinblox/component-conversation@0.9" defer)
//- script(type="module" src="/lib/solid-directory/dist/index.js" defer)
if endpoints.get.dashboards if componentSet.has("jobBoard")
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-dashboard@2.0" defer) script(type="module" src="https://cdn.skypack.dev/@startinblox/component-job-board@4.0" defer)
//- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer) //- script(type="module" src="/lib/solid-job-board/dist/index.js" defer)
if endpoints.get.users if componentSet.has("notification")
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@4.1" defer) script(type="module" src="https://cdn.skypack.dev/@startinblox/component-notifications@0.11" defer)
//- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer) //- script(type="module" src="/lib/sib-notifications/index.js" defer)
//- Disabled - Not in core@0.15 //- Disabled - Not in core@0.15
//- if endpoints.get.polls //- if componentSet.has("polls")
//- script(type="module" src="https://cdn.skypack.dev/@startinblox/component-poll@1.2" defer) //- script(type="module" src="https://cdn.skypack.dev/@startinblox/component-poll@1.2" defer)
//- script(type="module" src="/lib/sib-polls-component/index.js" defer) //- //- script(type="module" src="/lib/sib-polls-component/index.js" defer)
if endpoints.get.polls || endpoints.get.events || endpoints.get.resources //- Disabled - Not in core@0.15
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-conversation@0.9" defer) //- if componentSet.has("resources")
//- script(type="module" src="https://cdn.skypack.dev/@startinblox/component-resource@1.2" defer)
//- //- script(type="module" src="/lib/sib-resource/sib-resource.js" defer)
if componentSet.has("themeChecker")
script(src="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js" defer)
link(rel='stylesheet', href='https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css')
if componentSet.has("profileDirectory")
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-directory@4.0" defer)
//- script(type="module" src="/lib/solid-directory/dist/index.js" defer)

56
src/hubl-router.pug Normal file
View File

@ -0,0 +1,56 @@
//-
Hubl router declaration for latter generation
Create a window.hubl.components, accessible by all components with the route declaration.
Components can also get benefits from the `getRoute` function
Eg.
```
window.hubl.getRoute('chat', true)
```
will return the route of the first chat component, if exists, or triggers an error.
-
let routes = new Set();
const getRoute = (type, returnFirst = false) => {
let availables = components.filter(c=>c.type==type);
if(availables.length > 1) {
if(returnFirst) {
return availables[0].route;
} else {
console.error(`Too much components availables for route ${type}`);
}
} else if(availables.length < 1) {
console.error(`No component found for route ${type}`);
} else {
return availables[0].route;
}
}
const getComponent = (type, returnFirst = false) => {
let availables = components.filter(c=>c.type==type);
if(availables.length > 1) {
if(returnFirst) {
return availables[0];
} else {
console.error(`Too much components availables for type ${type}`);
}
} else if(availables.length < 1) {
console.error(`No component found for type ${type}`);
} else {
return availables[0];
}
}
for component of components
-
if(typeof component.route === 'undefined') {
component.route = component.type;
}
if(component.route) {
component.uniq = Math.random().toString(16).slice(2);
let route = component.route;
if (routes.has(component.route)) {
route += "-" + component.uniq;
}
routes.add(route);
component.route = route;
}
- const hublComponents = `window.hubl={};window.hubl.components = ${JSON.stringify(components)};`;
script!=hublComponents

View File

@ -3,13 +3,13 @@ html(lang="en")
head head
meta(charset="UTF-8") meta(charset="UTF-8")
title #{clientName || "My Personal Hubl"} title #{client.name || "My Personal Hubl"}
meta(name="viewport", content="width=device-width, initial-scale=1.0") meta(name="viewport", content="width=device-width, initial-scale=1.0")
meta(http-equiv="X-UA-Compatible", content="ie=edge") meta(http-equiv="X-UA-Compatible", content="ie=edge")
if clientFavicon if client.favicon
link(rel="icon" type="image/png" href=`${clientFavicon}`) link(rel="icon" type="image/png" href=`${client.favicon}`)
else else
link(rel="icon" type="image/webp" href="./images/favicon.webp") link(rel="icon" type="image/webp" href="./images/favicon.webp")
@ -18,13 +18,16 @@ html(lang="en")
link(rel='stylesheet', href='/styles/index.scss') link(rel='stylesheet', href='/styles/index.scss')
if clientCSS if client.css
link(rel='stylesheet', href=`${clientCSS}`) link(rel='stylesheet', href=`${client.css}`)
link(rel="manifest" href="/manifest.webmanifest") link(rel="manifest" href="/manifest.webmanifest")
script(src="https://browser.sentry-cdn.com/5.25.0/bundle.tracing.min.js" defer) script(src="https://browser.sentry-cdn.com/5.25.0/bundle.tracing.min.js" defer)
include hubl-router.pug
script(type="module" src="/components/getRoute.js" defer)
script(type="module" src="/components/sentry.js" defer) script(type="module" src="/components/sentry.js" defer)
script(type="module" src="/components/hubl-auto-login.js" defer) script(type="module" src="/components/hubl-auto-login.js" defer)
script(type="module" src="/components/hubl-search-users.js" defer) script(type="module" src="/components/hubl-search-users.js" defer)
@ -40,235 +43,152 @@ html(lang="en")
script(src="index.js" defer) script(src="index.js" defer)
body.bg-color-grey body.bg-color-grey
if endpoints.get && endpoints.post
.notLoggedIn(style='visibility:hidden;')
sib-auth(style='display:none!important')
sib-auth-provider(
data-authority=`${authority}`
data-id=`${authorityName || "authority"}`
data-client-name=`${clientName || "Hubl"}`
)
include views/partials/notifications.pug if componentSet.has("autoLogin") || componentSet.has("registering")
for component of components
if component.type == "autoLogin" || component.type == "registering"
if component.parameters
if component.parameters.authority
sib-auth(style='display:none!important')
sib-auth-provider(
data-authority=`${component.parameters.authority}`
data-id=`${component.parameters.authorityName || "authority"}`
data-client-name=`${client.name || "My Personal Hubl"}`
)
if componentSet.has("registering")
include views/page-registering.pug
.notLoggedIn(style='visibility:hidden;')
header#header.segment.full.padding-left-large.padding-right-large.sm-padding-right-xsmall.sm-padding-left-small.shadow-small.text-disable-selection.bg-color-white
include views/partials/header.pug
nav#main__menu.scrollbar-nav.segment.bg-color-heading.text-top.quarter.text-disable-selection.jsLeftMenu
include views/partials/menu-left.pug
main#content.segment.three-quarter.sm-full.text-top
include views/partials/widgets.pug include views/partials/widgets.pug
header#header.segment.full.padding-left-large.padding-right-large.sm-padding-right-xsmall.sm-padding-left-small.shadow-small.text-disable-selection.bg-color-white for component of components
include views/partials/header.pug
nav#main__menu.scrollbar-nav.segment.bg-color-heading.text-top.quarter.text-disable-selection.jsLeftMenu if component.route
include views/partials/menu-left.pug //- Components declaration with route (no `route` attribute or `route`="something")
div(
id=component.route
data-view=component.route
hidden
)&attributes({"no-render": component.noRender})
main#content.segment.three-quarter.sm-full.text-top if component.type == "about"
include views/page-about.pug
if endpoints.get.dashboards if component.type == "chat"
#dashboard(hidden, data-view="dashboard").scrollbar-content .whitespace-normal
include views/page-dashboard.pug hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.contacts")
include views/page-messages.pug
if publicDirectory && endpoints.get.users if component.type == "circles"
#members(hidden, data-view="members", no-render).scrollbar-content .with-sidebar.whitespace-normal
hubl-reactivity(bind-user nested-field="profile" target-src="store://user") hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.circles")
hubl-reactivity(bind-user nested-field="account" target-src="store://user") hubl-reactivity(bind-user nested-field="circles" target-src="store://user")
include views/page-directory.pug hubl-reactivity(data-src=`${component.endpoints.get}joinable/` target-src=`${component.endpoints.get}`)
hubl-reactivity(data-src=`${component.endpoints.post}` target-src=`${component.endpoints.get}`)
if endpoints.get.projects hubl-reactivity(bind-user nested-field="circles" target-src=`${component.endpoints.post}`)
#project(hidden, data-view="project").with-sidebar.whitespace-normal hubl-reactivity(bind-user nested-field="circles" target-src=`${component.endpoints.post}joinable/`)
hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.projects") hubl-reactivity(data-src=`${component.endpoints.get}joinable/` target-src=`${component.endpoints.get}`)
hubl-reactivity(bind-user nested-field="projects" target-src="store://user") hubl-reactivity(bind-user nested-field="circles" target-src=`${component.endpoints.get}`)
hubl-reactivity(data-src=`${endpoints.post.projects}joinable/` target-src=`${endpoints.get.projects}`) hubl-reactivity(bind-user nested-field="circles" target-src=`${component.endpoints.get}joinable/`)
hubl-reactivity(data-src=`${endpoints.post.projects}` target-src=`${endpoints.get.projects}`) include views/page-circle.pug
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.post.projects}`)
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.post.projects}joinable/`)
hubl-reactivity(data-src=`${endpoints.get.projects}joinable/` target-src=`${endpoints.get.projects}`)
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.get.projects}`)
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.get.projects}joinable/`)
include views/page-project.pug
if endpoints.get.circles if component.type == "dashboard"
#circle(hidden, data-view="circle").with-sidebar.whitespace-normal .scrollbar-content
hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.circles") include views/page-dashboard.pug
hubl-reactivity(bind-user nested-field="circles" target-src="store://user")
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src=`${endpoints.get.circles}`)
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src=`${endpoints.get.circles}`)
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.post.circles}`)
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.post.circles}joinable/`)
hubl-reactivity(data-src=`${endpoints.get.circles}joinable/` target-src=`${endpoints.get.circles}`)
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.get.circles}`)
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.get.circles}joinable/`)
include views/page-circle.pug
if endpoints.get.users if component.type == "events"
#messages(hidden, data-view="messages", no-render).whitespace-normal .scrollbar-content.bg-color-white
hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.contacts") include views/page-events.pug
include views/page-messages.pug
if endpoints.get.polls if component.type == "jobBoard"
#polls(hidden, data-view="polls").with-sidebar .scrollbar-content
include views/page-polls.pug hubl-reactivity(data-src=`${component.endpoints.post}current/` target-src=`${component.endpoints.get}`)
hubl-reactivity(data-src=`${component.endpoints.post}expired/` target-src=`${component.endpoints.get}`)
hubl-reactivity(data-src=`${component.endpoints.post}` target-src=`${component.endpoints.get}`)
hubl-reactivity(data-src=`${component.endpoints.get}current/` target-src=`${component.endpoints.get}`)
hubl-reactivity(data-src=`${component.endpoints.get}current/` target-src=`${component.endpoints.get}expired/`)
hubl-reactivity(data-src=`${component.endpoints.get}expired/` target-src=`${component.endpoints.get}`)
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${component.endpoints.get}expired/`)
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${component.endpoints.get}`)
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${component.endpoints.get}current/`)
include views/page-job-board.pug
if endpoints.get.events if component.type == "polls"
#events(hidden, data-view="events").scrollbar-content.bg-color-white .with-sidebar
include views/page-events.pug include views/page-polls.pug
if endpoints.get.resources if component.type == "projects"
#resources(hidden, data-view="resources") .with-sidebar.whitespace-normal
include views/page-resources.pug hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.projects")
hubl-reactivity(bind-user nested-field="projects" target-src="store://user")
hubl-reactivity(data-src=`${component.endpoints.post}joinable/` target-src=`${component.endpoints.get}`)
hubl-reactivity(data-src=`${component.endpoints.post}` target-src=`${component.endpoints.get}`)
hubl-reactivity(bind-user nested-field="projects" target-src=`${component.endpoints.post}`)
hubl-reactivity(bind-user nested-field="projects" target-src=`${component.endpoints.post}joinable/`)
hubl-reactivity(data-src=`${component.endpoints.get}joinable/` target-src=`${component.endpoints.get}`)
hubl-reactivity(bind-user nested-field="projects" target-src=`${component.endpoints.get}`)
hubl-reactivity(bind-user nested-field="projects" target-src=`${component.endpoints.get}joinable/`)
include views/page-project.pug
#admin if component.type == "resources"
include views/page-admin.pug #resources(hidden, data-view="resources")
include views/page-resources.pug
#about(hidden, data-view="about", no-render) if component.type == "profileDirectory"
include views/page-about.pug .scrollbar-content
hubl-reactivity(bind-user nested-field="profile" target-src="store://user")
if endpoints.get.skills && endpoints.post.uploads && endpoints.post.users hubl-reactivity(bind-user nested-field="account" target-src="store://user")
#profile(hidden, data-view="profile", no-render).scrollbar-content include views/page-directory.pug
include views/page-profile.pug else
//- Components declaration without any route (`route`="false") but that need some code declaration
if endpoints.get.joboffers
#job-offers(hidden, data-view="job-offers", no-render).scrollbar-content
hubl-reactivity(data-src=`${endpoints.post.joboffers}current/` target-src=`${endpoints.get.joboffers}`)
hubl-reactivity(data-src=`${endpoints.post.joboffers}expired/` target-src=`${endpoints.get.joboffers}`)
hubl-reactivity(data-src=`${endpoints.post.joboffers}` target-src=`${endpoints.get.joboffers}`)
hubl-reactivity(data-src=`${endpoints.get.joboffers}current/` target-src=`${endpoints.get.joboffers}`)
hubl-reactivity(data-src=`${endpoints.get.joboffers}current/` target-src=`${endpoints.get.joboffers}expired/`)
hubl-reactivity(data-src=`${endpoints.get.joboffers}expired/` target-src=`${endpoints.get.joboffers}`)
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.get.joboffers}expired/`)
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.get.joboffers}`)
hubl-reactivity(bind-user nested-field="joboffers" target-src=`${endpoints.get.joboffers}current/`)
include views/page-job-offers.pug
#login(data-view="login", hidden).segment.full.bg-color-secondary.text-center.index-community.loggedIn if component.type == "admin"
.segment.half.sm-full.bg-color-white.text-center include views/page-admin.pug
.segment.half.sm-full
div.community-logo if component.type == "analytics"
img(src=clientLogo style='max-width:100%;max-height:100%;') if component.parameters
p.text-xlarge.text-semibold.margin-top-xxlarge.line-xlarge(data-trans="communities.index.youKnow") if component.parameters.type && component.parameters.url && component.parameters.url
button.segment.full.sm-three-quarter.button.text-xsmall.text-bold.text-uppercase.color-secondary.bordered.padding-bottom.xlarge.padding-top.xlarge.community-button#loginButton( solid-analytics(
data-trans="communities.index.login" type=`${component.parameters.type}`
) url=`${component.parameters.url}`
p.text-xlarge.text-semibold.margin-top-xxlarge.line-xlarge(data-trans="communities.index.newUser") id=`${component.parameters.id}`
solid-widget(name='hubl-index-community-logo')
template ${value != "" ? `<div class="community-button-flexed"><img src="${value}" style="max-width:100%;max-height:80px" class="padding-xsmall" /></div>` : ""}
solid-widget(name='hubl-index-community-text')
template
.community-button-flexed-large.whitespace-normal
span(data-trans="communities.index.createAccount")
span &nbsp;
span ${value}
solid-widget(name='hubl-index-select-community')
template
solid-link.segment.full.sm-three-quarter.button.text-xsmall.text-bold.text-uppercase.color-secondary.bordered.padding-bottom.xlarge.padding-top.xlarge.margin-top-xsmall.community-button.community-button-flex-container(
next='join-community'
data-src='${src}'
)
solid-display(
data-src='${src}'
fields='logo, name'
widget-logo='hubl-index-community-logo'
widget-name='hubl-index-community-text'
) )
if endpoints.get.communities
div.loader#hubl-index-community-selector-loader
div
div
div
div
solid-display.community-flex-container(
data-src=`${endpoints.get.communities}`
fields='action'
action-action='action'
widget-action='hubl-index-select-community'
loader-id='hubl-index-community-selector-loader'
order-asc='name'
empty-widget='hubl-auto-login'
id='hubl-index-community-selector'
)
#join-community(data-view="join-community", hidden, no-render).segment.full.bg-color-secondary.text-center.index-community.loggedIn if component.type == "notification"
.segment.half.sm-full.bg-color-white.text-center include views/partials/notifications.pug
.segment.half.sm-full
solid-widget(name="hubl-index-community-join-logo")
template
img(src="${value}" style="max-width:100%;max-height:100%;")
solid-display(
bind-resources
fields="logo"
widget-logo="hubl-index-community-join-logo"
class-logo='community-logo'
default-logo=clientLogo
)
solid-widget(name='hubl-input-type-password')
template
label ${label}
input(
type="password"
name="user.password"
required
data-holder
)
solid-widget(name='hubl-input-type-email')
template
label ${label}
input(
type="email"
name="user.email"
required
data-holder
)
solid-form.segment.full.padding-top-xlarge.padding-very-xxlarge.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal.form(
bind-resources
nested-field='members'
fields='user.first_name, user.last_name, user.email, user.username, user.password'
label-user.first_name='Prénom*'
label-user.last_name='Nom*'
label-user.email='E-mail*'
label-user.password='Mot de passe*'
data-trans='label-user.password=communities.index.password;label-user.email=communities.index.email;label-user.last_name=communities.index.last_name;label-user.first_name=communities.index.first_name;submit-button=communities.index.formCreateAccount'
widget-user.first_name='solid-form-text-label'
widget-user.last_name='solid-form-text-label'
widget-user.email='hubl-input-type-email'
widget-user.password='hubl-input-type-password'
widget-user.username='solid-form-hidden'
class-user.first_name='segment margin-bottom-medium full padding-left-small sm-padding-none text-large text-left'
class-user.last_name='segment margin-bottom-medium full padding-left-small sm-padding-none text-large text-left'
class-user.email='segment margin-bottom-medium full padding-left-small sm-padding-none text-large text-left'
class-user.password='segment margin-bottom-medium full padding-left-small sm-padding-none text-large text-left'
required-user.first_name
required-user.last_name
required-user.email
required-user.password
pattern-user.first_name='.+'
pattern-user.last_name='.+'
value-user.username='generate-an-username'
submit-button=''
id='user-creation-form'
next='dashboard'
)
.loggedIn-loader.bg-color-grey(style='position:fixed;width:100%;height:100%;;z-index:999999;top:0;left:0;display:flex;align-items:center;justify-content:center;') if componentSet.has('profileDirectory')
div .scrollbar-content(
div.loader id=`${getRoute("profileDirectory", true)}-profile`
div hidden
div data-view=`${getRoute("profileDirectory", true)}-profile`
div no-render
div )
div#something-goes-wrong(hidden) include views/page-profile.pug
br
span(data-trans="errors.somethingGoesWrong")
span &nbsp;
a(data-trans='errors.reload' href='/')
div( .loggedIn-loader.bg-color-grey.global-loader
id="swal-content-text" div
hidden div.loader
data-trans="success") div
div
div
div
div#something-goes-wrong(hidden)
br
span(data-trans="errors.somethingGoesWrong")
span &nbsp;
a(data-trans='errors.reload' href='/')
if analytics div(
each provider in analytics id="swal-content-text"
if provider.type && provider.url && provider.url hidden
solid-analytics( data-trans="success")
type=`${provider.type}`
url=`${provider.url}`
id=`${provider.id}`
)
else
h1(style='color:red') Invalid config.json (missing `endpoints.get` or `endpoints.post`)

View File

@ -1,60 +0,0 @@
// document.addEventListener("DOMContentLoaded", () => {
// const resizeChat = () => {
// let isMobile = window.innerWidth < 993;
// let isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
// let isFirefoxMobile = navigator.platform.toLowerCase().indexOf("mobile") > -1 || navigator.platform.toLowerCase().indexOf("tablet") > -1;
// let chatBox = Array.from(document.querySelectorAll("solid-xmpp-chat"))
// .map((el) => el.shadowRoot ? el.shadowRoot.getElementById("conversejs") : false)
// .filter((el) => el)
// .pop();
// if (chatBox) {
// let chatTextArea = chatBox.querySelector(".message-form-container");
// let ischatTextArea = setInterval(() => {
// chatTextArea = chatBox.querySelector(".message-form-container");
// if (chatTextArea) {
// clearInterval(ischatTextArea);
// if (
// chatBox.getBoundingClientRect().height -
// chatTextArea.getBoundingClientRect().height !=
// chatTextArea.offsetTop
// ) {
// let viewportChat = Array.from(
// document.querySelectorAll("#viewport .chat-view")
// );
// viewportChat.forEach(
// (c) => (c.style.height = isMobile ? (isFirefox && isFirefoxMobile) ? "calc(100vh - 106px - 57px)" : "calc(100vh - 106px)" : "calc(100vh - 64px - 83px)")
// );
// }
// }
// }, 15);
// }
// };
// resizeChat();
// let isbody = setInterval(() => {
// if (document.body) {
// clearInterval(isbody);
// resizeChat();
// }
// }, 50);
// window.addEventListener("load", () => {
// setTimeout(() => {
// resizeChat();
// }, 0);
// });
// let windowResizing;
// window.addEventListener("resize", () => {
// windowResizing = setTimeout(() => {
// clearInterval(windowResizing);
// resizeChat();
// }, 50);
// });
// document.addEventListener("navigate", () => {
// setTimeout(() => {
// resizeChat();
// }, 0);
// });
// });

View File

@ -41,8 +41,8 @@ class JsI18n {
} else { } else {
// https://git.startinblox.com/framework/sib-core/issues/733 // https://git.startinblox.com/framework/sib-core/issues/733
if (attr.startsWith('label-')) { if (attr.startsWith('label-')) {
let label = node.querySelector('[name="'+attr.replace("label-", "")+'"] > label'); let label = node.querySelector('[name="' + attr.replace("label-", "") + '"] > label');
if(label != null) { if (label != null) {
this.translateNodeContent(label, k); this.translateNodeContent(label, k);
} }
} }
@ -61,14 +61,14 @@ class JsI18n {
if (node != null && translation != undefined) { if (node != null && translation != undefined) {
if (node.nodeType == 1) { //Element if (node.nodeType == 1) { //Element
try { try {
if(node.innerHTML != translation) if (node.innerHTML != translation)
node.innerHTML = translation; node.innerHTML = translation;
} catch (e) { } catch (e) {
if(node.text != translation) if (node.text != translation)
node.text = translation; node.text = translation;
} }
} else if (node.nodeType == 2) { //Attribute } else if (node.nodeType == 2) { //Attribute
if(node.value != translation) if (node.value != translation)
node.value = translation; node.value = translation;
} }
} }
@ -185,7 +185,7 @@ document.addEventListener("DOMContentLoaded", () => {
let timer; let timer;
(new MutationObserver((mutations) => { (new MutationObserver((mutations) => {
mutations.forEach(mutation => { mutations.forEach(mutation => {
if(mutation.target.attributes["data-trans"] != null) { if (mutation.target.attributes["data-trans"] != null) {
// Render the target of the mutation instantly // Render the target of the mutation instantly
jsI18n.processNode(mutation.target); jsI18n.processNode(mutation.target);
// Then wait one arbitrary second to re-render the whole document in case a widget re-rendered // Then wait one arbitrary second to re-render the whole document in case a widget re-rendered

View File

@ -1,55 +1,59 @@
window.requestLogin = false; window.requestLogin = false;
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
document const sibAuth = document.querySelector("sib-auth");
.querySelector("sib-auth") if (sibAuth) {
.getUser() sibAuth.getUser()
.then(user => { .then(user => {
if (user !== null) { if (user !== null) {
document document
.querySelectorAll(".notLoggedIn") .querySelectorAll(".notLoggedIn")
.forEach(el => (el.style.visibility = "visible")); .forEach(el => (el.style.visibility = "visible"));
document document
.querySelectorAll(".loggedIn") .querySelectorAll(".loggedIn")
.forEach(el => (el.style.display = "none")); .forEach(el => (el.style.display = "none"));
document document
.querySelectorAll(".loggedIn-loader") .querySelectorAll(".loggedIn-loader")
.forEach(el => (el.style.display = "none")); .forEach(el => (el.style.display = "none"));
} else { } else {
window.requestLogin = true; window.requestLogin = true;
window.dispatchEvent( window.dispatchEvent(
new CustomEvent('requestNavigation', { new CustomEvent('requestNavigation', {
detail: { detail: {
route: "login", route: "login",
wanted: true wanted: true
} }
}), }),
); );
document document
.querySelectorAll(".loggedIn-loader") .querySelectorAll(".loggedIn-loader")
.forEach(el => (el.style.display = "none")); .forEach(el => (el.style.display = "none"));
} }
}); });
}
}); });
window.addEventListener("navigate", e => { window.addEventListener("navigate", e => {
if (e.detail.route == "login" && !window.requestLogin) { if (e.detail.route == "login" && !window.requestLogin) {
window.dispatchEvent( window.dispatchEvent(
new CustomEvent('requestNavigation', { new CustomEvent('requestNavigation', {
detail: { detail: {
route: "dashboard" route: window.hubl.getRoute("dashboard", true)
} }
}), }),
); );
} }
}); });
document.querySelector('#loginButton').addEventListener('click', () => { const loginButton = document.querySelector('#loginButton');
document if (loginButton) {
.querySelectorAll(".loggedIn") loginButton.addEventListener('click', () => {
.forEach(el => (el.style.display = "none")); document
document .querySelectorAll(".loggedIn")
.querySelectorAll(".loggedIn-loader") .forEach(el => (el.style.display = "none"));
.forEach(el => (el.style.display = "flex")); document
setTimeout(() => { .querySelectorAll(".loggedIn-loader")
document.querySelector('#something-goes-wrong').removeAttribute('hidden'); .forEach(el => (el.style.display = "flex"));
}, 5000); setTimeout(() => {
document.querySelector('sib-auth').login(); document.querySelector('#something-goes-wrong').removeAttribute('hidden');
}); }, 5000);
document.querySelector('sib-auth').login();
});
}

View File

@ -1,120 +1,136 @@
// auxiliary function closes the user profile menu // auxiliary function closes the user profile menu
function closeUserControls() { function closeUserControls() {
let userControls = Array.from(document.querySelectorAll(".user-controls")); let userControls = Array.from(document.querySelectorAll(".user-controls"));
userControls.forEach(e => e.removeAttribute("open")); userControls.forEach(e => e.removeAttribute("open"));
} }
function closeLeftMenu() { function closeLeftMenu() {
let leftMenu = document.querySelector("#main__menu"); let leftMenu = document.querySelector("#main__menu");
if (leftMenu) leftMenu.removeAttribute("open"); if (leftMenu) leftMenu.removeAttribute("open");
} }
function closeRightMenu() { function closeRightMenu() {
let rightMenu = document.querySelectorAll(".jsRightMenu"); let rightMenu = document.querySelectorAll(".jsRightMenu");
if (Array.from(rightMenu).filter(el => el.hasAttribute("open")).length > 0) { if (Array.from(rightMenu).filter(el => el.hasAttribute("open")).length > 0) {
Array.from(document.querySelectorAll(".views-container")).forEach(vC =>
vC.classList.toggle("sidebar-is-closed")
);
Array.from(document.querySelectorAll(".jsOffsiteToggle")).forEach(el => {
el.querySelector('.text-right').setAttribute('hidden', '');
el.querySelector('.text-left').removeAttribute('hidden');
});
Array.from(rightMenu).forEach(el => el.removeAttribute("open"));
}
}
function openRightMenu() {
let rightMenu = document.querySelectorAll(".jsRightMenu");
Array.from(rightMenu).forEach(el => el.setAttribute("open", ""));
Array.from(document.querySelectorAll(".jsOffsiteToggle")).forEach(el => {
el.querySelector('.text-left').setAttribute('hidden', '');
el.querySelector('.text-right').removeAttribute('hidden');
});
Array.from(document.querySelectorAll(".views-container")).forEach(vC => Array.from(document.querySelectorAll(".views-container")).forEach(vC =>
vC.classList.toggle("sidebar-is-closed") vC.classList.toggle("sidebar-is-closed")
); );
Array.from(document.querySelectorAll(".jsOffsiteToggle")).forEach(el => {
el.querySelector('.text-right').setAttribute('hidden', '');
el.querySelector('.text-left').removeAttribute('hidden');
});
Array.from(rightMenu).forEach(el => el.removeAttribute("open"));
}
}
function openRightMenu() {
let rightMenu = document.querySelectorAll(".jsRightMenu");
Array.from(rightMenu).forEach(el => el.setAttribute("open", ""));
Array.from(document.querySelectorAll(".jsOffsiteToggle")).forEach(el => {
el.querySelector('.text-left').setAttribute('hidden', '');
el.querySelector('.text-right').removeAttribute('hidden');
});
Array.from(document.querySelectorAll(".views-container")).forEach(vC =>
vC.classList.toggle("sidebar-is-closed")
);
}
document.addEventListener("DOMContentLoaded", function () {
const componentSet = new Set(window.hubl.components.map(c => c.type));
// Workaround - No "navigate" event after the login on `/login`
if (window.location.pathname == "/login") {
const sibAuth = document.querySelector("sib-auth");
if (sibAuth) {
sibAuth.getUser()
.then(user => {
if (user !== null) {
window.dispatchEvent(
new CustomEvent('requestNavigation', {
detail: {
route: window.hubl.getRoute("dashboard", true)
}
}),
);
}
});
}
} }
document.addEventListener("DOMContentLoaded", function() { //- View change event
window.addEventListener("navigate", e => {
//- View change event if (componentSet.has('admin')) {
window.addEventListener("navigate", e => { const onlyAdmin = document.querySelector('.only-on-admin');
if(e.detail.route.startsWith('admin-')) { if (onlyAdmin) {
document.querySelector('.only-on-admin').removeAttribute('hidden'); if (e.detail.route.startsWith('admin-')) {
} else { onlyAdmin.removeAttribute('hidden');
document.querySelector('.only-on-admin').setAttribute('hidden',''); } else {
onlyAdmin.setAttribute('hidden', '');
}
} }
if(e.detail.route.startsWith("admin-communities")) { for (component of window.hubl.components) {
document.querySelector('solid-route[name="admin-communities"]').setAttribute('active',''); let adminTarget = document.querySelector(`solid-route[name="admin-${component.route}"]`);
document.querySelector('.jsRightMenu solid-link[next="admin-communities"]').setAttribute('active',''); let adminTargetTwo = document.querySelector(`.jsRightMenu solid-link[next="admin-${component.route}"]`);
} else { if (e.detail.route.startsWith(`admin-${component.route}`)) {
document.querySelector('solid-route[name="admin-communities"]').removeAttribute('active'); if (adminTarget) adminTarget.setAttribute('active', '');
document.querySelector('.jsRightMenu solid-link[next="admin-communities"]').removeAttribute('active'); if (adminTargetTwo) adminTargetTwo.setAttribute('active', '');
} else {
if (adminTarget) adminTarget.removeAttribute('active');
if (adminTargetTwo) adminTargetTwo.removeAttribute('active');
}
} }
if(e.detail.route.startsWith("admin-circles")) { }
document.querySelector('solid-route[name="admin-circles"]').setAttribute('active',''); closeLeftMenu();
document.querySelector('.jsRightMenu solid-link[next="admin-circles"]').setAttribute('active',''); closeUserControls();
} else { if (e.detail.route.startsWith('login')) {
document.querySelector('solid-route[name="admin-circles"]').removeAttribute('active'); const sibAuth = document.querySelector("sib-auth");
document.querySelector('.jsRightMenu solid-link[next="admin-circles"]').removeAttribute('active'); if (sibAuth) {
} sibAuth.getUser()
if(e.detail.route.startsWith("admin-projects")) {
document.querySelector('solid-route[name="admin-projects"]').setAttribute('active','');
document.querySelector('.jsRightMenu solid-link[next="admin-projects"]').setAttribute('active','');
} else {
let adminProjects = document.querySelector('solid-route[name="admin-projects"]');
let rightMenu = document.querySelector('.jsRightMenu solid-link[next="admin-projects"]');
if( adminProjects ) adminProjects.removeAttribute('active');
if( rightMenu ) rightMenu.removeAttribute('active');
}
closeLeftMenu();
closeUserControls();
if(e.detail.route.startsWith('login')) {
document
.querySelector("sib-auth")
.getUser()
.then(user => { .then(user => {
if (user !== null) { if (user !== null) {
window.dispatchEvent( window.dispatchEvent(
new CustomEvent('requestNavigation', { new CustomEvent('requestNavigation', {
detail: { detail: {
route: "dashboard" route: window.hubl.getRoute("dashboard", true)
} }
}), }),
); );
} }
}); });
} }
}); }
// Document -> close menu });
document.addEventListener("click", event => { // Document -> close menu
if (!event.target.closest(".user-controls")) { document.addEventListener("click", event => {
closeUserControls(); if (!event.target.closest(".user-controls")) {
} closeUserControls();
if ( }
!event.target.closest("#main__menu") && if (
event.target.id != "toggleMainMenu" !event.target.closest("#main__menu") &&
) { event.target.id != "toggleMainMenu"
closeLeftMenu(); ) {
} closeLeftMenu();
if ( }
!event.target.closest(".jsOffsiteToggle") if (
) { !event.target.closest(".jsOffsiteToggle")
closeRightMenu(); ) {
} closeRightMenu();
}); }
});
// listen for keypress // listen for keypress
document.onkeydown = e => { document.onkeydown = e => {
e = e || window.event; e = e || window.event;
if (e.key === "Escape" || e.key === "Esc") { if (e.key === "Escape" || e.key === "Esc") {
closeUserControls(); closeUserControls();
closeLeftMenu(); closeLeftMenu();
closeRightMenu(); closeRightMenu();
} }
}; };
document.querySelector("#toggleMainMenu").addEventListener("click", () => { const toggleMainMenu = document.querySelector("#toggleMainMenu")
if (toggleMainMenu) {
toggleMainMenu.addEventListener("click", () => {
let leftMenu = document.querySelector("#main__menu"); let leftMenu = document.querySelector("#main__menu");
if (leftMenu.hasAttribute("open")) { if (leftMenu.hasAttribute("open")) {
closeLeftMenu(); closeLeftMenu();
@ -122,24 +138,25 @@ document.addEventListener("DOMContentLoaded", function() {
leftMenu.setAttribute("open", ""); leftMenu.setAttribute("open", "");
} }
}); });
}
const rightMenus = Array.from(document.querySelectorAll("nav.jsRightMenu")); const rightMenus = Array.from(document.querySelectorAll("nav.jsRightMenu"));
rightMenus.forEach(rightMenu => { rightMenus.forEach(rightMenu => {
const btnRightMenu = rightMenu.querySelector("li.jsOffsiteToggle"); const btnRightMenu = rightMenu.querySelector("li.jsOffsiteToggle");
btnRightMenu.addEventListener("click", () => { btnRightMenu.addEventListener("click", () => {
if (rightMenu.hasAttribute("open")) { if (rightMenu.hasAttribute("open")) {
closeRightMenu(); closeRightMenu();
} else { } else {
openRightMenu(); openRightMenu();
}
});
});
Array.from(document.querySelectorAll(".jsMobileSidebarOpenButton")).forEach(
el => {
el.addEventListener("click", () => {
openRightMenu();
});
} }
); });
}); });
Array.from(document.querySelectorAll(".jsMobileSidebarOpenButton")).forEach(
el => {
el.addEventListener("click", () => {
openRightMenu();
});
}
);
});

View File

@ -1,11 +1,11 @@
if('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
var refreshing; var refreshing;
navigator.serviceWorker.addEventListener('controllerchange', () => { navigator.serviceWorker.addEventListener('controllerchange', () => {
if (refreshing) { if (refreshing) {
return; return;
} }
refreshing = true; refreshing = true;
window.location.reload(); window.location.reload();
}); });
navigator.serviceWorker.register('/sw.js'); navigator.serviceWorker.register('/sw.js');
} }

View File

@ -1,6 +1,5 @@
document.addEventListener("DOMContentLoaded", () => { document.addEventListener("DOMContentLoaded", () => {
if (!document.querySelector('.input-color')) return
if( !document.querySelector('.input-color') ) return
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);
const currentPrimary = getComputedStyle(document.documentElement).getPropertyValue('--color-primary') const currentPrimary = getComputedStyle(document.documentElement).getPropertyValue('--color-primary')
const defaultPrimary = params.has('p') ? "#" + params.get('p') : currentPrimary ? currentPrimary.trim() : "#FF0055"; const defaultPrimary = params.has('p') ? "#" + params.get('p') : currentPrimary ? currentPrimary.trim() : "#FF0055";
@ -94,4 +93,4 @@ document.addEventListener("DOMContentLoaded", () => {
params.set('cd', String(color.toHEXA()).substr(1)); params.set('cd', String(color.toHEXA()).substr(1));
cCd.applyColor(); cCd.applyColor();
}); });
}); });

View File

@ -1,5 +1,11 @@
setTimeout(() => { setTimeout(() => {
if(document.querySelector('.loggedIn-loader').style.display != 'none') { const loggedinLoader = document.querySelector('.loggedIn-loader');
document.querySelector('#something-goes-wrong').removeAttribute('hidden') if (loggedinLoader) {
if (loggedinLoader.style.display != 'none') {
const somethingGoesWrong = document.querySelector('#something-goes-wrong');
if (somethingGoesWrong) {
somethingGoesWrong.removeAttribute('hidden');
}
}
} }
}, 10000); }, 10000);

View File

@ -1,7 +1,10 @@
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
document.querySelector('#user-creation-form').addEventListener('save', event => { const userCreationForm = document.querySelector('#user-creation-form');
if(event.originalTarget.id == 'user-creation-form') { if (userCreationForm) {
document.querySelector("sib-auth").login(); userCreationForm.addEventListener('save', event => {
} if (event.originalTarget.id == 'user-creation-form') {
}); document.querySelector("sib-auth").login();
}
});
}
}); });

View File

@ -38,7 +38,6 @@ solid-display>div {
@import 'content'; @import 'content';
@import 'about'; @import 'about';
@import 'members'; @import 'members';
@import 'profile';
@import 'job-offers'; @import 'job-offers';
@import 'chat'; @import 'chat';
@import 'forms'; @import 'forms';
@ -67,17 +66,21 @@ main#content {
} }
} }
hubl-create + hubl-create { hubl-menu-create+hubl-menu-create {
display: none; /* Duplicate widget generation? */ display: none;
/* Duplicate widget generation? */
} }
hubl-create-contact + hubl-create-contact { hubl-create-contact+hubl-create-contact {
display: none; /* Duplicate widget generation? */ display: none;
/* Duplicate widget generation? */
} }
hubl-create, hubl-create-contact { hubl-menu-create,
hubl-create-contact {
solid-link { solid-link {
text-decoration: underline; text-decoration: underline;
&:hover { &:hover {
text-decoration: none; text-decoration: none;
} }
@ -85,14 +88,25 @@ hubl-create, hubl-create-contact {
} }
.swal2-container { .swal2-container {
z-index: 50000!important; z-index: 50000 !important;
}
.global-loader {
position: fixed;
width: 100%;
height: 100%;
z-index: 999999;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
} }
/* Fix on Join button in admin (circles + projects) */ /* Fix on Join button in admin (circles + projects) */
/* Styles on buttons and .children-link don't work because this input is inside too many elements. */ /* Styles on buttons and .children-link don't work because this input is inside too many elements. */
/* And no I can't add that stupid icon because it'a an input. */ /* And no I can't add that stupid icon because it'a an input. */
.join-button { .join-button {
input { input {
padding: 9px 20px; padding: 9px 20px;
border-radius: 16.5px; border-radius: 16.5px;

View File

@ -1,7 +0,0 @@
#profile>div:first-of-type {
min-height: calc(100vh - 72px);
@media (max-width: 768px) {
min-height: calc(100vh - 50px);
}
}

View File

@ -1,24 +1,66 @@
.with-sidebar.whitespace-normal.bg-color-white.only-on-admin(hidden) .with-sidebar.whitespace-normal.bg-color-white.only-on-admin(hidden)
.scrollbar-content.views-container.sidebar-is-closed .scrollbar-content.views-container.sidebar-is-closed
if endpoints.circles || (endpoints.get && endpoints.get.circles) for component of components
#admin-circles(hidden, data-view="admin-circles", no-render) if component.type == "circles"
include partials/admin/page-admin-circles.pug div(
#circle-left(hidden, data-view="circle-left", no-render) id=`admin-${component.route}`
include partials/circle/page-circle-left.pug hidden
#admin-circles-create(hidden, data-view="admin-circles-create", no-render) data-view=`admin-${component.route}`
include partials/admin/page-admin-circles-create.pug no-render
if endpoints.projects || (endpoints.get && endpoints.get.projects) )
#admin-projects(hidden, data-view="admin-projects", no-render) include partials/admin/page-admin-circles.pug
include partials/admin/page-admin-projects.pug div(
#admin-projects-create(hidden, data-view="admin-projects-create", no-render) id=`${component.route}-left`
include partials/admin/page-admin-projects-create.pug hidden
#project-left(hidden, data-view="project-left", no-render) data-view=`${component.route}-left`
include partials/project/page-project-left.pug no-render
if (endpoints.users || (endpoints.get && endpoints.get.users)) )
#admin-communities(hidden, data-view="admin-communities") include partials/circle/page-circle-left.pug
include partials/admin/page-admin-communities.pug div(
#admin-users-create(hidden, data-view="admin-users-create", no-render) id=`admin-${component.route}-create`
include partials/admin/page-admin-users-create.pug hidden
data-view=`admin-${component.route}-create`
no-render
)
include partials/admin/page-admin-circles-create.pug
if component.type == "projects"
div(
id=`admin-${component.route}`
hidden
data-view=`admin-${component.route}`
no-render
)
include partials/admin/page-admin-projects.pug
div(
id=`${component.route}-left`
hidden
data-view=`${component.route}-left`
no-render
)
include partials/project/page-project-left.pug
div(
id=`admin-${component.route}-create`
hidden
data-view=`admin-${component.route}-create`
no-render
)
include partials/admin/page-admin-projects-create.pug
if component.type == "chat" && componentSet.has('communities')
div(
id=`admin-${component.route}`
hidden
data-view=`admin-${component.route}`
no-render
)
include partials/admin/page-admin-chat.pug
div(
id=`admin-${component.route}-create`
hidden
data-view=`admin-${component.route}-create`
no-render
)
include partials/admin/page-admin-chat-create.pug
nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation') nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation')
.segment.whitespace-normal.text-color-heading.text-bold .segment.whitespace-normal.text-color-heading.text-bold
ul ul
@ -27,18 +69,19 @@
span.segment.full.text-right(hidden) span.segment.full.text-right(hidden)
span.icon.icon-arrow-right.icon-xsmall.margin-right-xxsmall span.icon.icon-arrow-right.icon-xsmall.margin-right-xxsmall
a(data-trans='admin.menuRight.fold') a(data-trans='admin.menuRight.fold')
if (endpoints.users || (endpoints.get && endpoints.get.users)) for component of components
solid-link.segment.full(next='admin-communities') if component.type == "circles"
li.segment.full.padding-medium solid-link.segment.full(next=`admin-${component.route}`)
span.icon.ci-networking.icon-xlarge.margin-right-medium li.segment.full.padding-medium
a(data-trans='admin.menuRight.community') span.icon.ci-bubble-add.icon-xlarge.margin-right-medium
if endpoints.circles || (endpoints.get && endpoints.get.circles) a(data-trans='admin.menuRight.circles')
solid-link.segment.full(next='admin-circles') if component.type == "projects"
li.segment.full.padding-medium solid-link.segment.full(next=`admin-${component.route}`)
span.icon.ci-bubble-add.icon-xlarge.margin-right-medium li.segment.full.padding-medium
a(data-trans='admin.menuRight.circles') span.icon.ci-add.icon-xlarge.margin-right-medium
if endpoints.projects || (endpoints.get && endpoints.get.projects) a(data-trans='admin.menuRight.projects')
solid-link.segment.full(next='admin-projects') if component.type == "chat"
li.segment.full.padding-medium solid-link.segment.full(next=`admin-${component.route}`)
span.icon.ci-add.icon-xlarge.margin-right-medium li.segment.full.padding-medium
a(data-trans='admin.menuRight.projects') span.icon.ci-networking.icon-xlarge.margin-right-medium
a(data-trans='admin.menuRight.community')

View File

@ -1,44 +1,92 @@
.scrollbar-content.views-container.sidebar-is-closed.bg-color-white .scrollbar-content.views-container.sidebar-is-closed.bg-color-white
solid-ac-checker(permission='acl:Read', bind-resources) solid-ac-checker(permission='acl:Read', bind-resources)
#circle-chat(hidden, data-view="circle-chat", no-render) div(
id=`${component.route}-chat`
hidden
data-view=`${component.route}-chat`
no-render
)
include partials/circle/page-circle-chat.pug include partials/circle/page-circle-chat.pug
#circle-information(hidden, data-view="circle-information", no-render) div(
id=`${component.route}-information`
hidden
data-view=`${component.route}-information`
no-render
)
include partials/circle/page-circle-profile.pug include partials/circle/page-circle-profile.pug
#circle-events(hidden, data-view="circle-events", no-render) //- Note:
include partials/circle/page-circle-events.pug Instead of using flat events/resources or polls components, you
#circle-resources(hidden, data-view="circle-resources", no-render) may you to expend the way circle work to handle events & cie.
include partials/circle/page-circle-resources.pug Like:
#circle-polls(hidden, data-view="circle-polls", no-render) {
include partials/circle/page-circle-polls.pug "type": "circles",
...
"extensions": [
{
"type": "events",
"endpoints": {...},
...
}
]
}
-
let extensions = new Set();
if(component.extensions) {
extensions = new Set(component.extensions.map(c=>c.type));
}
if extensions.has('events')
div(
id=`${component.route}-events`
hidden
data-view=`${component.route}-events`
no-render
)
include partials/circle/page-circle-events.pug
if extensions.has('resources')
div(
id=`${component.route}-resources`
hidden
data-view=`${component.route}-resources`
no-render
)
include partials/circle/page-circle-resources.pug
if extensions.has('polls')
div(
id=`${component.route}-polls`
hidden
data-view=`${component.route}-polls`
no-render
)
include partials/circle/page-circle-polls.pug
nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation') nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation')
solid-router.segment.whitespace-normal.text-color-heading.text-bold(default-route='circle-chat') solid-router.segment.whitespace-normal.text-color-heading.text-bold(default-route=`${component.route}-chat`)
ul ul
li.segment.full.padding-small.text-normal.jsOffsiteToggle li.segment.full.padding-small.text-normal.jsOffsiteToggle
span.icon.icon-arrow-left.icon-xsmall.margin-left-xxsmall.text-left span.icon.icon-arrow-left.icon-xsmall.margin-left-xxsmall.text-left
span.segment.full.text-right(hidden) span.segment.full.text-right(hidden)
span.icon.icon-arrow-right.icon-xsmall.margin-right-xxsmall span.icon.icon-arrow-right.icon-xsmall.margin-right-xxsmall
a(data-trans='circle.menuRight.fold') a(data-trans='circle.menuRight.fold')
solid-route.segment.full(name='circle-chat') solid-route.segment.full(name=`${component.route}-chat` use-id)
li.segment.full.padding-medium li.segment.full.padding-medium
span.icon.ci-chat.icon-xlarge.margin-right-medium span.icon.ci-chat.icon-xlarge.margin-right-medium
a(data-trans='circle.menuRight.chat') a(data-trans='circle.menuRight.chat')
solid-route.segment.full(name='circle-information') solid-route.segment.full(name=`${component.route}-information` use-id)
li.segment.full.padding-medium li.segment.full.padding-medium
span.icon.ci-information.icon-xlarge.margin-right-medium span.icon.ci-information.icon-xlarge.margin-right-medium
a(data-trans='circle.menuRight.information') a(data-trans='circle.menuRight.information')
if (endpoints.resources || (endpoints.get && endpoints.get.resources)) && (endpoints.resourceskeywords || (endpoints.get && endpoints.get.resourceskeywords)) && (endpoints.resourcestypes || (endpoints.get && endpoints.get.resourcestypes)) if extensions.has('resources')
solid-route.segment.full(name='circle-resources' use-id) solid-route.segment.full(name=`${component.route}-resources` use-id)
li.segment.full.padding-medium li.segment.full.padding-medium
span.icon.ci-networking.icon-xlarge.margin-right-medium span.icon.ci-networking.icon-xlarge.margin-right-medium
a(data-trans='circle.menuRight.resources') a(data-trans='circle.menuRight.resources')
if (endpoints.events || (endpoints.get && endpoints.get.events)) && (endpoints.typeevents || (endpoints.get && endpoints.get.typeevents)) if extensions.has('events')
solid-route.segment.full(name='circle-events' use-id) solid-route.segment.full(name=`${component.route}-events` use-id)
li.segment.full.padding-medium li.segment.full.padding-medium
span.icon.ci-networking.icon-xlarge.margin-right-medium span.icon.ci-networking.icon-xlarge.margin-right-medium
a(data-trans='circle.menuRight.events') a(data-trans='circle.menuRight.events')
if endpoints.polls || (endpoints.get && endpoints.get.polls) if extensions.has('polls')
solid-route.segment.full(name='circle-polls' use-id) solid-route.segment.full(name=`${component.route}-polls` use-id)
li.segment.full.padding-medium li.segment.full.padding-medium
span.icon.ci-networking.icon-xlarge.margin-right-medium span.icon.ci-networking.icon-xlarge.margin-right-medium
a(data-trans='circle.menuRight.polls') a(data-trans='circle.menuRight.polls')

View File

@ -1,4 +1,4 @@
div.padding-top-xlarge.padding-right-xsmall.padding-bottom-xlarge.padding-left-xsmall.sm-padding-top-medium.bg-color-grey.whitespace-normal div.padding-top-xlarge.padding-right-xsmall.padding-bottom-xlarge.padding-left-xsmall.sm-padding-top-medium.bg-color-grey.whitespace-normal
solid-dashboard( solid-dashboard(
data-src=`${endpoints.dashboards || endpoints.get.dashboards}` data-src=`${component.endpoints.get}`
) )

View File

@ -1,6 +1,6 @@
div.bg-color-grey.padding-top-xlarge.padding-right-small.padding-bottom-xlarge.padding-left-small.whitespace-normal div.bg-color-grey.padding-top-xlarge.padding-right-small.padding-bottom-xlarge.padding-left-small.whitespace-normal
solid-directory( solid-directory(
data-src=`${endpoints.users || endpoints.get.users}` data-src=`${component.endpoints.get}`
range-skills=`${endpoints.skills || endpoints.get.skills}` range-skills=`${component.endpoints.skills}`
paginate-by="30" paginate-by="30"
) )

View File

@ -1,7 +1,7 @@
div.whitespace-normal div.whitespace-normal
solid-event(data-src=`${endpoints.events || endpoints.get.events}` solid-event(data-src=`${component.endpoints.events}`
range-event-type=`${endpoints.typeevents || endpoints.get.typeevents}` range-event-type=`${component.endpoints.typeevents}`
range-event-circle=`${endpoints.circles || endpoints.get.circles}` range-event-circle=`${component.endpoints.circles}`
upload-dir=`${endpoints.uploads || endpoints.get.uploads}` upload-dir=`${component.endpoints.uploads}`
id-prefix='default' id-prefix='default'
) )

View File

@ -0,0 +1,5 @@
solid-job-board(
data-src=`${component.endpoints.get}`,
post-data-src=`${component.endpoints.post}`,
range-skills=`${component.endpoints.skills}`
)

View File

@ -1,5 +0,0 @@
solid-job-board(
data-src=`${endpoints.joboffers || endpoints.get.joboffers}`,
post-data-src=`${endpoints.joboffers || endpoints.post.joboffers}`,
range-skills=`${endpoints.skills || endpoints.get.skills}`
)

View File

@ -18,14 +18,14 @@ div.segment.full.padding-top-small.padding-right-large.padding-bottom-small.padd
solid-link.icon.icon-info.icon-secondary.hover( solid-link.icon.icon-info.icon-secondary.hover(
bind-resources bind-resources
next="member-profile" next=`${getRoute('profileDirectory', true)}-member-profile`
) )
.chat-view.segment.full.whitespace-normal .chat-view.segment.full.whitespace-normal
solid-xmpp-chat( solid-xmpp-chat(
data-authentication='login', data-authentication='login',
data-auto-login='true', data-auto-login='true',
data-websocket-url=`${xmppWebsocket || 'wss://jabber.happy-dev.fr/xmpp-websocket'}`, data-websocket-url=`${component.endpoints.xmpp}`,
data-i18n='en', data-i18n='en',
bind-resources bind-resources
) )

View File

@ -1,7 +1,7 @@
.views-container .views-container
solid-poll( solid-poll(
data-src=`${endpoints.polls || (endpoints.get && endpoints.get.polls)}` data-src=`${component.endpoints.get}`
range-base-polls=`${endpoints.pollRangeBase || (endpoints.get && endpoints.get.pollRangeBase)}` range-base-polls=`${component.endpoints.pollRangeBase}`
upload-dir=`${endpoints.uploads || (endpoints.get && endpoints.get.uploads)}` upload-dir=`${component.endpoints.uploads}`
id-prefix='default' id-prefix='default'
) )

View File

@ -1,5 +1,5 @@
solid-profile( solid-profile(
bind-user bind-user
upload-src=`${endpoints.uploads || endpoints.post.uploads}` upload-src=`${getComponent('profileDirectory', true).endpoints.uploads}`
range-skills=`${endpoints.skills || endpoints.get.skills}` range-skills=`${getComponent('profileDirectory', true).endpoints.skills}`
) )

View File

@ -1,26 +1,41 @@
.scrollbar-content.views-container.sidebar-is-closed.bg-color-white .scrollbar-content.views-container.sidebar-is-closed.bg-color-white
solid-ac-checker(permission='acl:Read', bind-resources) solid-ac-checker(permission='acl:Read', bind-resources)
#project-chat(hidden, data-view="project-chat", no-render) div(
id=`${component.route}-chat`
hidden
data-view=`${component.route}-chat`
no-render
)
include partials/project/page-project-chat.pug include partials/project/page-project-chat.pug
#project-information(hidden, data-view="project-information", no-render) div(
id=`${component.route}-information`
hidden
data-view=`${component.route}-information`
no-render
)
include partials/project/page-project-profile.pug include partials/project/page-project-profile.pug
#project-picture(hidden, data-view="project-picture", no-render) div(
id=`${component.route}-picture`
hidden
data-view=`${component.route}-picture`
no-render
)
include partials/project/page-project-picture.pug include partials/project/page-project-picture.pug
nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation') nav.jsRightMenu.text-disable-selection.sidebar.whitespace-normal(role='navigation')
solid-router.segment.whitespace-normal.text-color-heading.text-bold(default-route='project-chat') solid-router.segment.whitespace-normal.text-color-heading.text-bold(default-route=`${component.route}-chat`)
ul ul
li.segment.full.padding-small.text-normal.jsOffsiteToggle li.segment.full.padding-small.text-normal.jsOffsiteToggle
span.icon.icon-arrow-left.icon-xsmall.margin-left-xxsmall.text-left span.icon.icon-arrow-left.icon-xsmall.margin-left-xxsmall.text-left
span.segment.full.text-right(hidden) span.segment.full.text-right(hidden)
span.icon.icon-arrow-right.icon-xsmall.margin-right-xxsmall span.icon.icon-arrow-right.icon-xsmall.margin-right-xxsmall
a(data-trans='project.menuRight.fold') a(data-trans='project.menuRight.fold')
solid-route.segment.full(name='project-chat') solid-route.segment.full(name=`${component.route}-chat` use-id)
li.segment.full.padding-medium li.segment.full.padding-medium
span.icon.ci-chat.icon-xlarge.margin-right-medium span.icon.ci-chat.icon-xlarge.margin-right-medium
a(data-trans='project.menuRight.chat') a(data-trans='project.menuRight.chat')
solid-route.segment.full(name='project-information') solid-route.segment.full(name=`${component.route}-information` use-id)
li.segment.full.padding-medium li.segment.full.padding-medium
span.icon.ci-information.icon-xlarge.margin-right-medium span.icon.ci-information.icon-xlarge.margin-right-medium
a(data-trans='project.menuRight.information') a(data-trans='project.menuRight.information')
solid-route(name='project-picture' use-id) solid-route(name=`${component.route}-picture` use-id)

View File

@ -0,0 +1,107 @@
#login(data-view="login", hidden).segment.full.bg-color-secondary.text-center.index-community.loggedIn
.segment.half.sm-full.bg-color-white.text-center
.segment.half.sm-full
div.community-logo
img(src=`${client.logo || '/images/logo.webp'}` style='max-width:100%;max-height:100%;')
p.text-xlarge.text-semibold.margin-top-xxlarge.line-xlarge(data-trans="communities.index.youKnow")
button.segment.full.sm-three-quarter.button.text-xsmall.text-bold.text-uppercase.color-secondary.bordered.padding-bottom.xlarge.padding-top.xlarge.community-button#loginButton(
data-trans="communities.index.login"
)
p.text-xlarge.text-semibold.margin-top-xxlarge.line-xlarge(data-trans="communities.index.newUser")
solid-widget(name='hubl-index-community-logo')
template ${value != "" ? `<div class="community-button-flexed"><img src="${value}" style="max-width:100%;max-height:80px" class="padding-xsmall" /></div>` : ""}
solid-widget(name='hubl-index-community-text')
template
.community-button-flexed-large.whitespace-normal
span(data-trans="communities.index.createAccount")
span &nbsp;
span ${value}
solid-widget(name='hubl-index-select-community')
template
solid-link.segment.full.sm-three-quarter.button.text-xsmall.text-bold.text-uppercase.color-secondary.bordered.padding-bottom.xlarge.padding-top.xlarge.margin-top-xsmall.community-button.community-button-flex-container(
next='join-community'
data-src='${src}'
)
solid-display(
data-src='${src}'
fields='logo, name'
widget-logo='hubl-index-community-logo'
widget-name='hubl-index-community-text'
)
if getComponent('registering').endpoints.get
div.loader#hubl-index-community-selector-loader
div
div
div
div
solid-display.community-flex-container(
data-src=`${getComponent('registering').endpoints.get}`
fields='action'
action-action='action'
widget-action='hubl-index-select-community'
loader-id='hubl-index-community-selector-loader'
order-asc='name'
empty-widget='hubl-auto-login'
id='hubl-index-community-selector'
)
#join-community(data-view="join-community", hidden, no-render).segment.full.bg-color-secondary.text-center.index-community.loggedIn
.segment.half.sm-full.bg-color-white.text-center
.segment.half.sm-full
solid-widget(name="hubl-index-community-join-logo")
template
img(src="${value}" style="max-width:100%;max-height:100%;")
solid-display(
bind-resources
fields="logo"
widget-logo="hubl-index-community-join-logo"
class-logo='community-logo'
default-logo=`${client.logo || '/images/logo.webp'}`
)
solid-widget(name='hubl-input-type-password')
template
label ${label}
input(
type="password"
name="user.password"
required
data-holder
)
solid-widget(name='hubl-input-type-email')
template
label ${label}
input(
type="email"
name="user.email"
required
data-holder
)
solid-form.segment.full.padding-top-xlarge.padding-very-xxlarge.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal.form(
bind-resources
nested-field='members'
fields='user.first_name, user.last_name, user.email, user.username, user.password'
label-user.first_name='Prénom*'
label-user.last_name='Nom*'
label-user.email='E-mail*'
label-user.password='Mot de passe*'
data-trans='label-user.password=communities.index.password;label-user.email=communities.index.email;label-user.last_name=communities.index.last_name;label-user.first_name=communities.index.first_name;submit-button=communities.index.formCreateAccount'
widget-user.first_name='solid-form-text-label'
widget-user.last_name='solid-form-text-label'
widget-user.email='hubl-input-type-email'
widget-user.password='hubl-input-type-password'
widget-user.username='solid-form-hidden'
class-user.first_name='segment margin-bottom-medium full padding-left-small sm-padding-none text-large text-left'
class-user.last_name='segment margin-bottom-medium full padding-left-small sm-padding-none text-large text-left'
class-user.email='segment margin-bottom-medium full padding-left-small sm-padding-none text-large text-left'
class-user.password='segment margin-bottom-medium full padding-left-small sm-padding-none text-large text-left'
required-user.first_name
required-user.last_name
required-user.email
required-user.password
pattern-user.first_name='.+'
pattern-user.last_name='.+'
value-user.username='generate-an-username'
submit-button=''
id='user-creation-form'
next=getRoute('dashboard', true)
)

View File

@ -1,8 +1,8 @@
.views-container .views-container
solid-resource(data-src=`${endpoints.resources || (endpoints.get && endpoints.get.resources)}` solid-resource(data-src=`${component.endpoints.resources}`
range-resource-type=`${endpoints.resourcestypes || (endpoints.get && endpoints.get.resourcestypes)}` range-resource-type=`${component.endpoints.resourcestypes}`
range-resource-keyword=`${endpoints.resourceskeywords || (endpoints.get && endpoints.get.resourceskeywords)}` range-resource-keyword=`${component.endpoints.resourceskeywords}`
range-resource-circle=`${endpoints.circles || (endpoints.get && endpoints.get.circles)}` range-resource-circle=`${component.endpoints.circles}`
upload-dir=`${endpoints.uploads || (endpoints.get && endpoints.get.uploads)}` upload-dir=`${component.endpoints.uploads}`
id-prefix='default' id-prefix='default'
) )

View File

@ -2,8 +2,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p
div.segment.half.sm-full div.segment.half.sm-full
h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='communities.title') h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='communities.title')
div.segment.half.sm-hidden.text-right div.segment.half.sm-hidden.text-right
solid-link(class="backlink", bind-resources, next='admin-communities' data-trans='circle.create.backlink') solid-link(class="backlink", next=`admin-${getRoute('chat', true)}` data-trans='circle.create.backlink')
div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal
div#loader-users-title.loader.loader div#loader-users-title.loader.loader
@ -18,17 +17,6 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
div div
div div
solid-widget(name='hubl-username-field')
template
label ${label}
input(type="text" title='' pattern="[a-zA-Z0-9]+" label="${label}" data-trans='title=user.create.labelUsernameTitle' name="username" required value="\${value}" data-holder)
solid-widget(name='hubl-email-field')
template
div.segment.margin-bottom-medium.half.sm-full.padding-left-small.sm-padding-none.text-small.text-semibold.text-uppercase.text-color-heading
label ${label}
input(type="email" label='${label}' name="email" required value="\${value}" data-holder)
div.segment.margin-bottom-medium div.segment.margin-bottom-medium
div.segment div.segment
solid-display.text-color-heading.text-semibold.text-xlarge.text-letter-spacing-large( solid-display.text-color-heading.text-semibold.text-xlarge.text-letter-spacing-large(
@ -38,7 +26,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
data-trans='value-text=user.create.title' data-trans='value-text=user.create.title'
loader-id='loader-users-title' loader-id='loader-users-title'
) )
solid-form.form#selected-community( solid-form.form#selected-community(
bind-resources bind-resources
nested-field='members' nested-field='members'
@ -65,7 +53,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
widget-user.username='hubl-username-field' widget-user.username='hubl-username-field'
widget-user.email='hubl-email-field' widget-user.email='hubl-email-field'
next='admin-communities' next=`admin-${getRoute('chat', true)}`
submit-button='' submit-button=''
data-trans='label-user.first_name=user.create.labelFirstname;label-user.last_name=user.create.labelLastname;label-user.username=user.create.labelUsername;label-user.email=user.create.labelEmail;submit-button=user.create.buttonSubmit' data-trans='label-user.first_name=user.create.labelFirstname;label-user.last_name=user.create.labelLastname;label-user.username=user.create.labelUsername;label-user.email=user.create.labelEmail;submit-button=user.create.buttonSubmit'

View File

@ -1,15 +1,3 @@
solid-widget(name='hubl-action-community')
template
solid-ac-checker(data-src="${value}", nested-field="members", permission='acl:Append')
solid-link(
class='button text-small text-bold text-uppercase reversed color-secondary bordered icon icon-plus'
data-src="${value}"
next="admin-users-create"
data-trans='communities.linkInvite'
)
solid-ac-checker(data-src="${value}", nested-field="members", no-permission='acl:Append')
div.button.button-disabled(data-trans='communities.noPermission')
div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal
h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='communities.title') h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='communities.title')
@ -18,17 +6,6 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
div.segment.full.margin-bottom-xlarge div.segment.full.margin-bottom-xlarge
h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='communities.subTitle') h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='communities.subTitle')
solid-widget(name='hubl-admin-community-counter')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="community.members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall
solid-form-search.form.search-form( solid-form-search.form.search-form(
id="admin-community-filter" id="admin-community-filter"
fields='cell1' fields='cell1'
@ -44,7 +21,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
div.table-header.bg-color-third.text-color-heading div.table-header.bg-color-third.text-color-heading
div.segment.table-cell.table-cell.half(data-trans='communities.tableHeader1') div.segment.table-cell.table-cell.half(data-trans='communities.tableHeader1')
div.segment.table-cell.table-cell.half(data-trans='communities.tableHeader2') div.segment.table-cell.table-cell.half(data-trans='communities.tableHeader2')
solid-display( solid-display(
class='table-body' class='table-body'
filtered-by='admin-community-filter' filtered-by='admin-community-filter'

View File

@ -2,23 +2,23 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p
div.segment.half.sm-full div.segment.half.sm-full
h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.create.title') h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.create.title')
div.segment.half.sm-hidden.text-right div.segment.half.sm-hidden.text-right
solid-link(class="backlink", bind-resources, next='admin-circles' data-trans='circle.create.backlink') solid-link(class="backlink", next=`admin-${getRoute('circles', true)}` data-trans='circle.create.backlink')
div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal
div#loader-circles-create.loader.loader-top div.loader.loader-top(id=`loader-admin-${getComponent('circles').uniq}`)
div div
div div
div div
div div
solid-form.form( solid-form.form(
data-src=`${endpoints.circles || endpoints.post.circles}` data-src=`${getComponent('circles').endpoints.post}`
fields='status, linebreak, name, subtitle, description, help' fields='status, linebreak, name, subtitle, description, help'
required-status required-status
required-name required-name
required-subtitle required-subtitle
loader-id='loader-circles-create' loader-id=`loader-admin-${getComponent('circles').uniq}`
class-status='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' class-status='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal'
class-linebreak='segment half sm-hidden' class-linebreak='segment half sm-hidden'
@ -36,13 +36,13 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
widget-status='hubl-status' widget-status='hubl-status'
widget-linebreak='solid-form-hidden' widget-linebreak='solid-form-hidden'
widget-description='solid-form-richtext-label' widget-description='solid-form-richtext-label'
widget-help='solid-form-hidden-label' widget-help='solid-form-hidden-label'
next='circle' next=getRoute('circles', true)
submit-button='' submit-button=''
data-trans='label-status=circle.create.labelStatus;label-name=circle.create.labelName;label-description=circle.create.labelDescription;submit-button=circle.create.buttonSubmit;label-subtitle=circle.create.labelSubtitle;label-help=circle.create.descriptionHelp' data-trans='label-status=circle.create.labelStatus;label-name=circle.create.labelName;label-description=circle.create.labelDescription;submit-button=circle.create.buttonSubmit;label-subtitle=circle.create.labelSubtitle;label-help=circle.create.descriptionHelp'
) )

View File

@ -1,22 +1,3 @@
solid-widget(name='hubl-circle-owner')
template
solid-display.segment.block.margin-top-xxsmall.margin-bottom-xxsmall.labelled-avatar.two-lines(
data-src='${await value}'
fields='segment1(account.picture), segment2(line1(name), line2(at, username))'
class-segment1='segment'
class-account.picture='avatar'
class-segment2='segment three-quarter margin-left-xsmall'
class-line1='segment block'
class-name='text-small text-semibold text-color-heading text-sub'
class-line2='segment block text-xsmall'
widget-account.picture='hubl-user-avatar'
value-at='@'
)
div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal
h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.list.title') h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.list.title')
@ -32,57 +13,13 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
div.segment.half.sm-full div.segment.half.sm-full
h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='circle.list.subTitle') h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='circle.list.subTitle')
div.segment.half.sm-full.text-right div.segment.half.sm-full.text-right
solid-ac-checker(data-src=`${endpoints.circles || (endpoints.post && endpoints.post.circles)}`, permission='acl:Append') solid-ac-checker(data-src=`${getComponent('circles').endpoints.post}`, permission='acl:Append')
solid-link( solid-link(
class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-plus' class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-plus'
next='admin-circles-create' next=`admin-${getRoute('circles', true)}-create`
data-trans='circle.list.buttonCreate' data-trans='circle.list.buttonCreate'
) )
solid-widget(name='hubl-admin-circle-counter')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall
solid-widget(name='hubl-admin-circle-counter-alternate')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="circle.members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall
solid-widget(name='admin-circle-link')
template
solid-link(
data-src='${src}'
next='circle-information'
)
solid-display(
data-src='${src}'
fields='name'
)
solid-widget(name='admin-circle-link-alternate')
template
solid-display(
data-src='${src}'
nested-field='circle'
fields='name'
class-name='segment block margin-bottom-xxsmall text-xlarge text-color-heading text-semibold text-letter-spacing-large text-underline text-ellipsis admin-name-ellipsis'
action-name='name'
widget-name='admin-circle-link'
)
solid-form-search.form.search-form( solid-form-search.form.search-form(
id="admin-circle-filter" id="admin-circle-filter"
fields='name' fields='name'
@ -101,16 +38,15 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
div.segment.table-cell.third(data-trans='circle.list.tableHeader2') div.segment.table-cell.third(data-trans='circle.list.tableHeader2')
div.segment.table-cell.third(data-trans='circle.list.tableHeader3') div.segment.table-cell.third(data-trans='circle.list.tableHeader3')
solid-widget(name="leave-circle-reactivity") solid-widget(name=`leave-circle-reactivity-${component.uniq}`)
template template
hubl-reactivity(data-src=`${endpoints.get.circles}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.get.circles}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${value}')
hubl-reactivity(bind-user nested-field="circles" target-src='${value}') hubl-reactivity(bind-user nested-field="circles" target-src='${value}')
solid-widget(name=`hubl-admin-circle-leave-button-${component.uniq}`)
solid-widget(name='hubl-admin-circle-leave-button')
template template
solid-delete( solid-delete(
class='segment text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered' class='segment text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered'
@ -118,15 +54,15 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
data-label='' data-label=''
data-trans='data-label=circle.list.buttonQuit' data-trans='data-label=circle.list.buttonQuit'
) )
hubl-reactivity(data-src=`${endpoints.get.circles}` target-src='${src}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${src}')
hubl-reactivity(data-src=`${endpoints.get.circles}joinable/` target-src='${src}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${src}')
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src='${src}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${src}')
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src='${src}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${src}')
hubl-reactivity(bind-user nested-field="circles" target-src='${src}') hubl-reactivity(bind-user nested-field="circles" target-src='${src}')
solid-display( solid-display(
data-src="${src}" data-src="${src}"
fields="circle" fields="circle"
widget-circle='leave-circle-reactivity' widget-circle=`leave-circle-reactivity-${component.uniq}`
hidden hidden
) )
@ -143,11 +79,11 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
class-cell3='segment table-cell third text-center' class-cell3='segment table-cell third text-center'
action-circle.name='circle.name' action-circle.name='circle.name'
widget-circle.name='admin-circle-link-alternate' widget-circle.name='hubl-admin-circle-link-alternate'
class-circle.subtitle='segment full text-ellipsis' class-circle.subtitle='segment full text-ellipsis'
action-leaveButton="joinButton" action-leaveButton="joinButton"
widget-leaveButton="hubl-admin-circle-leave-button" widget-leaveButton=`hubl-admin-circle-leave-button-${component.uniq}`
widget-circle.owner='hubl-circle-owner' widget-circle.owner='hubl-circle-owner'
action-counter="counter" action-counter="counter"
widget-counter="hubl-admin-circle-counter-alternate" widget-counter="hubl-admin-circle-counter-alternate"
@ -155,7 +91,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
order-by="circle.name" order-by="circle.name"
) )
solid-widget(name='hubl-admin-circle-join-button') solid-widget(name=`hubl-admin-circle-join-button-${component.uniq}`)
template template
solid-form( solid-form(
class='join-button text-xsmall' class='join-button text-xsmall'
@ -168,17 +104,17 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
submit-button='' submit-button=''
data-trans='submit-button=circle.list.buttonJoin' data-trans='submit-button=circle.list.buttonJoin'
) )
hubl-reactivity(data-src=`${endpoints.get.circles}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.get.circles}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${value}')
hubl-reactivity(bind-user nested-field="circles" target-src='${value}') hubl-reactivity(bind-user nested-field="circles" target-src='${value}')
solid-display( solid-display(
class='table-body' class='table-body'
filtered-by="admin-circle-filter" filtered-by="admin-circle-filter"
data-src=`${endpoints.circles || endpoints.get.circles}joinable/` data-src=`${getComponent('circles').endpoints.get}joinable/`
fields='cell1(name, counter, subtitle), cell2(owner), cell3(members)' fields='cell1(name, counter, subtitle), cell2(owner), cell3(members)'
loader-id='loader-admin-circles' loader-id='loader-admin-circles'
@ -188,11 +124,11 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-normal.whitespac
class-name='segment block margin-bottom-xxsmall text-xlarge text-color-heading text-semibold text-letter-spacing-large text-underline text-ellipsis admin-name-ellipsis' class-name='segment block margin-bottom-xxsmall text-xlarge text-color-heading text-semibold text-letter-spacing-large text-underline text-ellipsis admin-name-ellipsis'
action-name='name' action-name='name'
widget-name='admin-circle-link' widget-name='hubl-admin-circle-link'
class-subtitle='segment full text-ellipsis' class-subtitle='segment full text-ellipsis'
widget-owner='hubl-circle-owner' widget-owner='hubl-circle-owner'
widget-members="hubl-admin-circle-join-button" widget-members=`hubl-admin-circle-join-button-${component.uniq}`
action-counter="counter" action-counter="counter"
widget-counter="hubl-admin-circle-counter" widget-counter="hubl-admin-circle-counter"

View File

@ -2,26 +2,26 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p
div.segment.half.sm-full div.segment.half.sm-full
h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='project.create.title') h2.margin-none.text-color-heading.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='project.create.title')
div.segment.half.sm-hidden.text-right div.segment.half.sm-hidden.text-right
solid-link(class="backlink right", next='admin-projects' data-trans='project.create.backlink') solid-link(class="backlink", next=`admin-${getRoute('projects', true)}` data-trans='project.create.backlink')
div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespace-normal
div#loader-projects-create.loader.loader-top div.loader.loader-top(id=`loader-admin-${getComponent('circles').uniq}`)
div div
div div
div div
div div
solid-form.form( solid-form.form(
data-src=`${endpoints.projects || endpoints.post.projects}` data-src=`${getComponent('projects').endpoints.post}`
fields='status, customer.name, name, description, help, captain, linebreak' fields='status, customer.name, name, description, help, captain, linebreak'
range-captain=`${endpoints.users || endpoints.get.users}` range-captain=`${getComponent('projects').endpoints.captains}`
required-status required-status
required-customer.name required-customer.name
required-name required-name
required-captain required-captain
loader-id='loader-projects-create' loader-id=`loader-admin-${getComponent('circles').uniq}`
label-status='' label-status=''
label-customer.name='' label-customer.name=''
@ -45,7 +45,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
widget-linebreak='solid-form-hidden' widget-linebreak='solid-form-hidden'
submit-button='' submit-button=''
next='project' next=getRoute('projects', true)
data-trans='label-status=project.create.labelStatus;label-customer.name=project.create.labelCustomer;label-name=project.create.labelName;label-description=project.create.labelDescription;label-captain=project.create.labelCaptain;label-help=project.create.descriptionHelp;submit-button=project.create.buttonSubmit' data-trans='label-status=project.create.labelStatus;label-customer.name=project.create.labelCustomer;label-name=project.create.labelName;label-description=project.create.labelDescription;label-captain=project.create.labelCaptain;label-help=project.create.descriptionHelp;submit-button=project.create.buttonSubmit'
) )

View File

@ -7,57 +7,13 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
div.segment.half.sm-full div.segment.half.sm-full
h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='project.list.subTitle') h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='project.list.subTitle')
div.segment.half.sm-full.text-right div.segment.half.sm-full.text-right
solid-ac-checker(data-src=`${endpoints.projects || (endpoints.post && endpoints.post.projects)}`, permission='acl:Append') solid-ac-checker(data-src=`${getComponent('projects').endpoints.post}`, permission='acl:Append')
solid-link( solid-link(
class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-plus' class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-plus'
next='admin-projects-create' next='admin-projects-create'
data-trans='project.list.buttonCreate' data-trans='project.list.buttonCreate'
) )
solid-widget(name='hubl-admin-project-counter')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall
solid-widget(name='hubl-admin-project-counter-alternate')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="project.members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall
solid-widget(name='admin-project-link')
template
solid-link(
data-src='${src}'
next='project-information'
)
solid-display(
data-src='${src}'
fields='customer.name'
)
solid-widget(name='admin-project-link-alternate')
template
solid-display(
data-src='${src}'
nested-field='project'
fields='name'
class-name='segment block margin-bottom-xxsmall text-xlarge text-color-heading text-semibold text-letter-spacing-large text-underline text-ellipsis admin-name-ellipsis'
action-name='name'
widget-name='admin-project-link'
)
solid-form-search.form.search-form( solid-form-search.form.search-form(
id="admin-project-filter" id="admin-project-filter"
fields='cell1' fields='cell1'
@ -77,15 +33,15 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
div.segment.table-cell.quarter(data-trans='project.list.tableHeader3') div.segment.table-cell.quarter(data-trans='project.list.tableHeader3')
div.segment.table-cell.quarter(data-trans='project.list.tableHeader4') div.segment.table-cell.quarter(data-trans='project.list.tableHeader4')
solid-widget(name="leave-project-reactivity") solid-widget(name=`leave-project-reactivity-${component.uniq}`)
template template
hubl-reactivity(data-src=`${endpoints.get.projects}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.get.projects}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.post.projects}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.post.projects}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${value}')
hubl-reactivity(bind-user nested-field="projects" target-src='${value}') hubl-reactivity(bind-user nested-field="projects" target-src='${value}')
solid-widget(name="hubl-admin-project-leave-button") solid-widget(name=`hubl-admin-project-leave-button-${component.uniq}`)
template template
solid-delete( solid-delete(
class='segment text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered' class='segment text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered'
@ -93,37 +49,18 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
data-label='' data-label=''
data-trans='data-label=project.list.buttonQuit' data-trans='data-label=project.list.buttonQuit'
) )
hubl-reactivity(data-src=`${endpoints.get.projects}` target-src='${src}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${src}')
hubl-reactivity(data-src=`${endpoints.get.projects}joinable/` target-src='${src}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${src}')
hubl-reactivity(data-src=`${endpoints.post.projects}` target-src='${src}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${src}')
hubl-reactivity(data-src=`${endpoints.post.projects}joinable/` target-src='${src}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${src}')
hubl-reactivity(bind-user nested-field="projects" target-src='${src}') hubl-reactivity(bind-user nested-field="projects" target-src='${src}')
solid-display( solid-display(
data-src="${src}" data-src="${src}"
fields="project" fields="project"
widget-project='leave-project-reactivity' widget-project=`leave-project-reactivity-${component.uniq}`
hidden hidden
) )
solid-widget(name='hubl-project-captain')
template
solid-display.segment.margin-top-xxsmall.margin-bottom-xxsmall.labelled-avatar.two-lines.block(
data-src='${await value}'
fields='segment1(account.picture), segment2(line1(name), line2(at, username))'
class-segment1='segment'
class-account.picture='avatar'
class-segment2='segment three-quarter margin-left-xsmall'
class-line1='segment block'
class-name='text-small text-semibold text-color-heading text-sub'
class-line2='segment block text-xsmall'
widget-account.picture='hubl-user-avatar'
value-at='@'
)
solid-form-search( solid-form-search(
id="hubl_project_is_admin" id="hubl_project_is_admin"
fields="is_admin" fields="is_admin"
@ -132,15 +69,6 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
hidden hidden
) )
solid-widget(name='hubl-project-admins')
template
solid-display(
data-src='${value}'
fields='user'
filtered-by='hubl_project_is_admin'
widget-user='hubl-project-captain'
)
solid-display( solid-display(
class='table-body' class='table-body'
filtered-by="admin-project-filter" filtered-by="admin-project-filter"
@ -156,11 +84,11 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
class-cell4='segment table-cell quarter text-center' class-cell4='segment table-cell quarter text-center'
action-project.customer.name='project.customer.name' action-project.customer.name='project.customer.name'
widget-project.customer.name='admin-project-link-alternate' widget-project.customer.name='hubl-admin-project-link-alternate'
class-project.name='segment full' class-project.name='segment full'
action-leaveButton="joinButton" action-leaveButton="joinButton"
widget-leaveButton="hubl-admin-project-leave-button" widget-leaveButton=`hubl-admin-project-leave-button-${component.uniq}`
widget-project.captain='hubl-project-captain' widget-project.captain='hubl-project-captain'
widget-project.members='hubl-project-admins' widget-project.members='hubl-project-admins'
@ -170,7 +98,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
order-by="project.name" order-by="project.name"
) )
solid-widget(name='hubl-admin-project-join-button') solid-widget(name=`hubl-admin-project-join-button-${component.uniq}`)
template template
solid-form( solid-form(
class='button text-xsmall text-bold text-uppercase reversed color-secondary bordered icon icon-arrow-right-circle' class='button text-xsmall text-bold text-uppercase reversed color-secondary bordered icon icon-arrow-right-circle'
@ -184,17 +112,17 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
submit-button='' submit-button=''
data-trans='submit-button=project.list.buttonJoin' data-trans='submit-button=project.list.buttonJoin'
) )
hubl-reactivity(data-src=`${endpoints.get.projects}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.get.projects}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.post.projects}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.post.projects}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${value}')
hubl-reactivity(bind-user nested-field="projects" target-src='${value}') hubl-reactivity(bind-user nested-field="projects" target-src='${value}')
solid-display( solid-display(
class='table-body' class='table-body'
filtered-by="admin-project-filter" filtered-by="admin-project-filter"
data-src=`${endpoints.projects || endpoints.get.projects}joinable/` data-src=`${getComponent('projects').endpoints.get}joinable/`
fields='cell1(customer.name, counter, name), cell2(members), cell3(captain), cell4(joinButton)' fields='cell1(customer.name, counter, name), cell2(members), cell3(captain), cell4(joinButton)'
loader-id='loader-admin-projects' loader-id='loader-admin-projects'
@ -204,11 +132,11 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
class-cell4='segment table-cell quarter text-center' class-cell4='segment table-cell quarter text-center'
action-project.customer.name='project.customer.name' action-project.customer.name='project.customer.name'
widget-project.customer.name='admin-project-link' widget-project.customer.name='hubl-admin-project-link'
class-name='segment full' class-name='segment full'
action-joinButton="joinButton" action-joinButton="joinButton"
widget-joinButton="hubl-admin-project-join-button" widget-joinButton=`hubl-admin-project-join-button-${component.uniq}`
widget-captain='hubl-project-captain' widget-captain='hubl-project-captain'
widget-members='hubl-project-admins' widget-members='hubl-project-admins'

View File

@ -13,7 +13,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p
solid-xmpp-chat( solid-xmpp-chat(
data-authentication='login', data-authentication='login',
data-auto-login='true', data-auto-login='true',
data-websocket-url=`${xmppWebsocket || 'wss://jabber.happy-dev.fr/xmpp-websocket'}`, data-websocket-url=`${component.endpoints.xmpp}`,
data-i18n='en', data-i18n='en',
bind-resources bind-resources
) )

View File

@ -11,25 +11,12 @@ solid-ac-checker(permission='acl:Read', bind-resources)
class-dash='text-color-heading text-bold' class-dash='text-color-heading text-bold'
) )
div.segment.half.sm-hidden.text-right div.segment.half.sm-hidden.text-right
solid-link(class="backlink", bind-resources, next='circle-profile' data-trans='circle.edit.backlink') solid-link(class="backlink", bind-resources, next=`${component.route}-profile` data-trans='circle.edit.backlink')
div.segment.full.padding-large.whitespace-normal div.segment.full.padding-large.whitespace-normal
solid-widget(name="circle-edit-members-delete")
template
solid-ac-checker(permission="acl:Delete", data-src="${src}")
solid-delete(
class='segment text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered'
data-src="${src}"
data-label=''
data-trans='data-label=circle.edit.buttonDelete'
)
solid-widget(name='hubl-circle-edit-admin')
template ${value == "true" ? "Administrateur" : ""}
solid-ac-checker(permission='acl:Write', bind-resources) solid-ac-checker(permission='acl:Write', bind-resources)
div#loader-circle-edit.loader.loader-top div.loader.loader-top(id=`loader-${component.route}-edit`)
div div
div div
div div
@ -43,7 +30,7 @@ div.segment.full.padding-large.whitespace-normal
required-name required-name
required-owner required-owner
required-subtitle required-subtitle
range-owner=`${endpoints.users || endpoints.get.users}` range-owner=`${component.endpoints.owners}`
label-name='' label-name=''
label-owner='' label-owner=''
@ -67,7 +54,7 @@ div.segment.full.padding-large.whitespace-normal
partial='' partial=''
submit-button='Enregistrer' submit-button='Enregistrer'
next='circle-information' next=`${component.route}-information`
data-trans='label-status=circle.edit.labelStatus;label-name=circle.edit.labelName;label-owner=circle.edit.labelOwner;label-description=circle.edit.labelDescription;submit-button=circle.edit.buttonSubmit;label-subtitle=circle.edit.labelSubtitle;label-help=circle.edit.descriptionHelp' data-trans='label-status=circle.edit.labelStatus;label-name=circle.edit.labelName;label-owner=circle.edit.labelOwner;label-description=circle.edit.labelDescription;submit-button=circle.edit.buttonSubmit;label-subtitle=circle.edit.labelSubtitle;label-help=circle.edit.descriptionHelp'
) )
@ -79,7 +66,7 @@ div.segment.full.padding-large.whitespace-normal
bind-resources bind-resources
nested-field='members' nested-field='members'
fields='user' fields='user'
range-user=`${endpoints.users || endpoints.get.users}` range-user=`${component.endpoints.users}`
class-user='add-member' class-user='add-member'
widget-user='solid-form-dropdown-autocompletion' widget-user='solid-form-dropdown-autocompletion'
@ -99,7 +86,7 @@ div.segment.full.padding-large.whitespace-normal
bind-resources bind-resources
nested-field='members' nested-field='members'
fields='cell(segment1(user.account.picture), segment2(line1(user.name, is_admin), line2(atom, user.communities))), self' fields='cell(segment1(user.account.picture), segment2(line1(user.name, is_admin), line2(atom, user.communities))), self'
loader-id='loader-circle-edit' loader-id=`loader-${component.route}-edit`
class-cell='segment table-cell half labelled-avatar two-lines text-left' class-cell='segment table-cell half labelled-avatar two-lines text-left'
class-self='segment table-cell half text-center' class-self='segment table-cell half text-center'
@ -122,7 +109,7 @@ div.segment.full.padding-large.whitespace-normal
widget-is_admin='hubl-circle-edit-admin' widget-is_admin='hubl-circle-edit-admin'
action-self='self' action-self='self'
widget-self='circle-edit-members-delete' widget-self='hubl-circle-edit-members-delete'
) )
//- Only to show the table grid //- Only to show the table grid

View File

@ -1,10 +1,9 @@
#circle-listevents solid-event(
solid-event( class='w700'
class='w700' bind-resources
bind-resources nested-field="events"
nested-field="events" range-event-type=`${component.get('events').endpoints.typeevents}`
range-event-type=`${endpoints.typeevents || (endpoints.get && endpoints.get.typeevents)}` range-event-circle=`${component.endpoints.get}`
range-event-circle=`${endpoints.circles || (endpoints.get && endpoints.get.circles)}` upload-dir=`${component.get('events').endpoints.uploads}`
upload-dir=`${endpoints.uploads || (endpoints.get && endpoints.get.uploads)}` id-prefix='circles'
id-prefix='circles' )
)

View File

@ -1,11 +1,10 @@
div.text-center div.text-center
div.segment.margin-top-small div.segment.margin-top-small
div.segment.shadow.padding-xlarge.text-xlarge.text-left.whitespace-normal div.segment.shadow.padding-xlarge.text-xlarge.text-left.whitespace-normal
p(data-trans='circle.left.paragraphQuit') p(data-trans='circle.left.paragraphQuit')
p p
span(data-trans='circle.left.paragraphJoin') span(data-trans='circle.left.paragraphJoin')
span &nbsp; span &nbsp;
solid-link.link(next="admin-circles" data-trans='circle.left.admin') solid-link.link(next=`admin-${getRoute('circles', true)}` data-trans='circle.left.admin')
span &nbsp; span &nbsp;
span(data-trans='circle.left.paragraphContact') span(data-trans='circle.left.paragraphContact')

View File

@ -1,9 +1,8 @@
#circle-polls solid-poll(
solid-poll( class='w700'
class='w700' id-prefix='circles'
id-prefix='circles' bind-resources
bind-resources nested-field="polls"
nested-field="polls" range-base-polls=`${component.get('polls').endpoints.pollRangeBase}`
range-base-polls=`${endpoints.pollRangeBase || (endpoints.get && endpoints.get.pollRangeBase)}` upload-dir=`${component.get('polls').endpoints.uploads}`
upload-dir=`${endpoints.uploads || (endpoints.get && endpoints.get.uploads)}` )
)

View File

@ -1,8 +1,12 @@
solid-router(default-route='circle-profile', hidden) solid-router(default-route=`${component.route}-profile`, hidden)
solid-route(name='circle-profile') solid-route(name=`${component.route}-profile`)
solid-route(name='circle-edit') solid-route(name=`${component.route}-edit`)
#circle-profile(hidden, data-view="circle-profile") div(
id=`${component.route}-profile`
hidden
data-view=`${component.route}-profile`
)
solid-ac-checker.segment.block(permission='acl:Read', bind-resources) solid-ac-checker.segment.block(permission='acl:Read', bind-resources)
div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal
solid-display.text-xxlarge.text-letter-spacing-large( solid-display.text-xxlarge.text-letter-spacing-large(
@ -14,39 +18,9 @@ solid-router(default-route='circle-profile', hidden)
class-name='text-color-heading text-bold' class-name='text-color-heading text-bold'
class-dash='text-color-heading text-bold' class-dash='text-color-heading text-bold'
) )
solid-widget(name='hubl-circle-team-contact')
template
solid-link.icon.icon-secondary.hover.icon-speech.margin-left-xsmall.margin-right-medium(data-src='\${value}', next='messages')
solid-widget(name='hubl-circle-leave-button')
template
solid-ac-checker(no-permission='acl:Delete', data-src="${src}", nested-field="circle")
solid-delete(
class='button text-xsmall text-bold text-uppercase color-secondary bordered'
data-src="${src}"
data-label=''
data-trans='data-label=circle.profile.buttonQuit'
next='circle-left'
)
solid-widget(name='hubl-circle-join-button')
template
button.button.text-xsmall.text-bold.text-uppercase.reversed.color-secondary.bordered.icon.icon-arrow-right-circle
solid-form(
bind-resource
nested-field='members'
fields='user.username'
value-user.username='hubl-workaround-493'
widget-user.username='solid-form-hidden'
submit-button=''
data-trans='submit-button=circle.profile.buttonJoin'
)
div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-xlarge div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-xlarge
div#loader-circle-profile.loader div.loader(id=`loader-${component.route}-profile-1`)
div div
div div
div div
@ -56,7 +30,7 @@ solid-router(default-route='circle-profile', hidden)
solid-display.segment.half.sm-full.sm-margin-bottom-medium( solid-display.segment.half.sm-full.sm-margin-bottom-medium(
bind-resources bind-resources
fields='creationDateSet(title, creationDate)' fields='creationDateSet(title, creationDate)'
loader-id='loader-circle-profile' loader-id=`loader-${component.route}-profile-1`
value-title='' value-title=''
data-trans='value-title=circle.profile.creationDate' data-trans='value-title=circle.profile.creationDate'
@ -67,9 +41,20 @@ solid-router(default-route='circle-profile', hidden)
.segment.half.sm-full.text-right.margin-bottom-medium.sm-margin-bottom-small .segment.half.sm-full.text-right.margin-bottom-medium.sm-margin-bottom-small
solid-ac-checker(permission='acl:Append', bind-resources, nested-field='members') solid-ac-checker(permission='acl:Append', bind-resources, nested-field='members')
solid-ac-checker(permission='acl:Delete', bind-resources) solid-ac-checker(permission='acl:Delete', bind-resources)
solid-link(class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil' next='circle-edit' bind-resources data-trans='circle.profile.buttonModify') solid-link(class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil' next=`${component.route}-edit` bind-resources data-trans='circle.profile.buttonModify')
solid-ac-checker(no-permission='acl:Delete', bind-resources) solid-ac-checker(no-permission='acl:Delete', bind-resources)
solid-link(class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil' next='circle-edit' bind-resources data-trans='circle.profile.buttonAdd') solid-link(class='segment sm-full button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil' next=`${component.route}-edit` bind-resources data-trans='circle.profile.buttonAdd')
solid-widget(name=`hubl-circle-leave-button-${uniq}`)
template
solid-ac-checker(no-permission='acl:Delete', data-src="${src}", nested-field="circle")
solid-delete(
class='button text-xsmall text-bold text-uppercase color-secondary bordered'
data-src="${src}"
data-label=''
data-trans='data-label=circle.profile.buttonQuit'
next=`${component.route}-left`
)
.segment.full.text-right.margin-bottom-large.sm-margin-bottom-medium .segment.full.text-right.margin-bottom-large.sm-margin-bottom-medium
solid-display.segment( solid-display.segment(
@ -77,7 +62,7 @@ solid-router(default-route='circle-profile', hidden)
nested-field='members' nested-field='members'
fields='relation' fields='relation'
action-relation='relation' action-relation='relation'
widget-relation='hubl-circle-leave-button' widget-relation=`hubl-circle-leave-button-${uniq}`
search-fields='user' search-fields='user'
search-widget-user='solid-form-hidden' search-widget-user='solid-form-hidden'
search-value-user="store://user.@id" search-value-user="store://user.@id"
@ -89,7 +74,7 @@ solid-router(default-route='circle-profile', hidden)
bind-resources bind-resources
data-label='' data-label=''
data-trans='data-label=circle.profile.buttonDelete' data-trans='data-label=circle.profile.buttonDelete'
next='admin-circles' next=`admin-${component.route}`
) )
h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='circle.profile.description') h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='circle.profile.description')
@ -102,13 +87,16 @@ solid-router(default-route='circle-profile', hidden)
h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='circle.profile.subTitle') h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='circle.profile.subTitle')
solid-widget(name='hubl-circle-user-admin') div.loader(id=`loader-${component.route}-profile-2`)
template ${value == "true" ? "Administrateur" : ""} div
div
div
div
solid-display.segment.full.labelled-avatar.two-lines.whitespace-normal.children.children-full.sm-children-full.children-margin-bottom-medium( solid-display.segment.full.labelled-avatar.two-lines.whitespace-normal.children.children-full.sm-children-full.children-margin-bottom-medium(
bind-resources bind-resources
nested-field='members' nested-field='members'
loader-id='loader-circle-profile' loader-id=`loader-${component.route}-profile-2`
fields='segment1(user.account.picture), segment2(line1(user.name, user, is_admin), line2(atom, user.communities))' fields='segment1(user.account.picture), segment2(line1(user.name, user, is_admin), line2(atom, user.communities))'
class-segment1='segment' class-segment1='segment'
@ -131,5 +119,9 @@ solid-router(default-route='circle-profile', hidden)
widget-is_admin='hubl-circle-user-admin' widget-is_admin='hubl-circle-user-admin'
) )
#circle-edit(hidden, data-view="circle-edit") div(
id=`${component.route}-edit`
hidden
data-view=`${component.route}-edit`
)
include page-circle-edit.pug include page-circle-edit.pug

View File

@ -1,11 +1,10 @@
#circle-listresources solid-resource(
solid-resource( class='w700'
class='w700' bind-resources
bind-resources nested-field="resources"
nested-field="resources" range-resource-type=`${component.get('resources').endpoints.resourcestypes}`
range-resource-type=`${endpoints.resourcestypes || (endpoints.get && endpoints.get.resourcestypes)}` range-resource-keyword=`${component.get('resources').endpoints.resourceskeywords}`
range-resource-keyword=`${endpoints.resourceskeywords || (endpoints.get && endpoints.get.resourceskeywords)}` range-resource-circle=`${component.endpoints.get}`
range-resource-circle=`${endpoints.circles || (endpoints.get && endpoints.get.circles)}` upload-dir=`${component.get('resources').endpoints.uploads}`
upload-dir=`${endpoints.uploads || (endpoints.get && endpoints.get.uploads)}` id-prefix='circles'
id-prefix='circles' )
)

View File

@ -1,15 +1,13 @@
div div
solid-link.segment.sm-hidden(next='dashboard') solid-link.segment.sm-hidden(next=getRoute('dashboard', true))
img.logo(src=`${clientLogo || '/images/logo.webp'}`) img.logo(src=`${client.logo || '/images/logo.webp'}`)
button.segment.lg-hidden.icon-menu#toggleMainMenu button.segment.lg-hidden.icon-menu#toggleMainMenu
span.tag.reversed.text-semibold(data-trans='header.beta') span.tag.reversed.text-semibold(data-trans='header.beta')
div div
if themeChecker if componentSet.has("themeChecker")
div.selector.text-center div.selector.text-center
each val, index in ['primary', 'secondary', 'third', 'heading'] each val, index in ['primary', 'secondary', 'third', 'heading']
label.segment.margin-right-medium.margin-top-xsmall= 'Couleur ' + (index+1) label.segment.margin-right-medium.margin-top-xsmall= 'Couleur ' + (index+1)
@ -18,102 +16,108 @@ div
type="text" type="text"
) )
solid-notifications.segment.sm-margin-right-xlarge( if componentSet.has("notification")
nested-field="inbox" solid-notifications.segment.sm-margin-right-xlarge(
bind-user nested-field="inbox"
) bind-user
)
//- User menu visible on large screens if componentSet.has("autoLogin") || componentSet.has("registering")
details.segment.sm-hidden.user-controls //- User menu visible on large screens
summary.text-right details.segment.sm-hidden.user-controls
solid-display.labelled-avatar.padding-top-xsmall( summary.text-right
fields='segment1(account.picture), segment2(first_name), segment3(button)' solid-display.labelled-avatar.padding-top-xsmall(
class-segment1='segment' fields='segment1(account.picture), segment2(first_name), segment3(button)'
class-segment2='segment margin-left-small' class-segment1='segment'
class-segment3='segment margin-left-xxsmall' class-segment2='segment margin-left-small'
class-account.picture="avatar" class-segment3='segment margin-left-xxsmall'
class-first_name="text-semibold text-color-heading" class-account.picture="avatar"
class-button='icon icon-arrow-down' class-first_name="text-semibold text-color-heading"
widget-account.picture='hubl-user-avatar' class-button='icon icon-arrow-down'
bind-user widget-account.picture='hubl-user-avatar'
) bind-user
div.panel )
nav.bg-color-white.text-semibold.text-color-heading div.panel
ul nav.bg-color-white.text-semibold.text-color-heading
if (endpoints.uploads || (endpoints.get && endpoints.get.uploads)) && (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.users || (endpoints.get && endpoints.get.users)) ul
li.border-bottom.border-color-grey if componentSet.has("profileDirectory")
solid-link.segment.padding-small.text-hover(next='profile' data-trans='header.myProfile') li.border-bottom.border-color-grey
li.segment.padding-small.border-bottom.border-color-grey solid-link.segment.padding-small.text-hover(next=`${getRoute("profileDirectory", true)}-profile` data-trans='header.myProfile')
div(data-trans='header.admin') if componentSet.has("admin")
ul.text-normal li.segment.padding-small.border-bottom.border-color-grey
if endpoints.get.users div(data-trans='header.admin')
solid-link.text-hover(next='admin-communities') ul.text-normal
li.segment.padding-top-small if componentSet.has("communities")
a.icon.icon-people.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.community') solid-link.text-hover(next=`admin-${getRoute("chat", true)}`)
if endpoints.get.circles li.segment.padding-top-small
solid-link.text-hover(next='admin-circles') a.icon.icon-people.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.community')
li.segment.padding-top-small if componentSet.has("circles")
a.icon.icon-globe.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.circles') solid-link.text-hover(next=`admin-${getRoute("circles", true)}`)
if endpoints.get.projects li.segment.padding-top-small
solid-link.text-hover(next='admin-projects') a.icon.icon-globe.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.circles')
li.segment.padding-top-small if componentSet.has("projects")
a.icon.icon-folder-alt.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.projects') solid-link.text-hover(next=`admin-${getRoute("projects", true)}`)
li.border-bottom.border-color-grey li.segment.padding-top-small
solid-link.segment.padding-small.text-hover(next='about' data-trans='header.about') a.icon.icon-folder-alt.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.projects')
li if componentSet.has("about")
button.segment.padding-small.text-hover.text-semibold.text-color-heading(role='log out' onclick="document.querySelector('sib-auth').logout();" data-trans='header.logOut') li.border-bottom.border-color-grey
solid-link.segment.padding-small.text-hover(next=getRoute('about', true) data-trans='header.about')
li
button.segment.padding-small.text-hover.text-semibold.text-color-heading(role='log out' onclick="document.querySelector('sib-auth').logout();" data-trans='header.logOut')
button.segment.lg-hidden.icon-menu#toggleMainMenu
//- User menu visible on small screens
details.user-menu.segment.lg-hidden.user-controls
summary
solid-display.labelled-avatar(
fields='segment1(account.picture), segment3(button)'
class-segment1='segment'
class-segment3='segment sm-arrow-down'
class-account.picture="avatar"
class-button='icon icon-arrow-down'
widget-account.picture='hubl-user-avatar'
bind-user
)
solid-display.user-firstname(
fields='segment1(account.picture), segment2(first_name), segment3(button)'
class-segment1='segment'
class-segment2='segment margin-left-small'
class-segment3='segment'
class-account.picture="avatar"
class-first_name="text-semibold text-color-heading"
class-button='icon icon-arrow-down'
widget-account.picture='hubl-user-avatar'
bind-user
)
div.panel
nav.bg-color-white.text-semibold.text-color-heading
ul
if componentSet.has("profileDirectory")
li.border-bottom.border-color-grey
solid-link.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover(next=`${getRoute("profileDirectory", true)}-profile` data-trans='header.myProfile')
if componentSet.has("admin")
li.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.border-bottom.border-color-grey
div(data-trans='header.admin')
ul.text-normal
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')
if componentSet.has("circles")
solid-link.text-hover(next=`admin-${getRoute("circles", true)}`)
li.segment.padding-top-small.sm-padding-top-medium
a.icon.icon-globe.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.circles')
if componentSet.has("projects")
solid-link.text-hover(next=`admin-${getRoute("projects", true)}`)
li.segment.padding-top-small.sm-padding-top-medium
a.icon.icon-folder-alt.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.projects')
if componentSet.has("about")
li.border-bottom.border-color-grey
solid-link.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover(next=getRoute('about', true) data-trans='header.about')
li
button.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover.text-bold.text-color-heading(role='log out' onclick="document.querySelector('sib-auth').logout();" data-trans='header.logOut')
button.segment.lg-hidden.icon-menu#toggleMainMenu button.segment.lg-hidden.icon-menu#toggleMainMenu
//- User menu visible on small screens
details.user-menu.segment.lg-hidden.user-controls
summary
solid-display.labelled-avatar(
fields='segment1(account.picture), segment3(button)'
class-segment1='segment'
class-segment3='segment sm-arrow-down'
class-account.picture="avatar"
class-button='icon icon-arrow-down'
widget-account.picture='hubl-user-avatar'
bind-user
)
solid-display.user-firstname(
fields='segment1(account.picture), segment2(first_name), segment3(button)'
class-segment1='segment'
class-segment2='segment margin-left-small'
class-segment3='segment'
class-account.picture="avatar"
class-first_name="text-semibold text-color-heading"
class-button='icon icon-arrow-down'
widget-account.picture='hubl-user-avatar'
bind-user
)
div.panel
nav.bg-color-white.text-semibold.text-color-heading
ul
if (endpoints.uploads || (endpoints.get && endpoints.get.uploads)) && (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.users || (endpoints.get && endpoints.get.users))
li.border-bottom.border-color-grey
solid-link.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover(next='profile' data-trans='header.myProfile')
li.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.border-bottom.border-color-grey
div(data-trans='header.admin')
ul.text-normal
if endpoints.get.users
solid-link.text-hover(next='admin-communities')
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')
if endpoints.get.circles
solid-link.text-hover(next='admin-circles')
li.segment.padding-top-small.sm-padding-top-medium
a.icon.icon-globe.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.circles')
if endpoints.get.projects
solid-link.text-hover(next='admin-projects')
li.segment.padding-top-small.sm-padding-top-medium
a.icon.icon-folder-alt.icon-third.icon-small.icon-margin-right-xsmall(data-trans='admin.menuRight.projects')
li.border-bottom.border-color-grey
solid-link.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover(next='about' data-trans='header.about')
li
button.segment.padding-small.sm-padding-medium.sm-padding-left-xlarge.text-hover.text-bold.text-color-heading(role='log out' onclick="document.querySelector('sib-auth').logout();" data-trans='header.logOut')
button.segment.lg-hidden.icon-menu#toggleMainMenu

View File

@ -1,232 +1,151 @@
solid-widget(name='hubl-counter')
template
solid-badge(data-src="${value == 'badge' ? src : value}")
solid-widget(name='hubl-menu-jabberid')
template
div.hidden(
data-jabberID="${value}"
)
solid-widget(name='hubl-menu-publicprivate')
template
div(
class="${value == 'Public' ? 'text-simple-line-icons text-large': 'text-simple-line-icons text-xsmall'}"
) ${value == 'Public' ? '#' : ''}
solid-widget(name='hubl-create-contact')
template
p.segment.full.create.text-color-white.whitespace-normal(style='display:block!important')
span(data-trans="menuLeft.contact.create")
span &nbsp;
solid-link(next="members" data-trans="menuLeft.contact.profileDir")
span &nbsp;
span(data-trans="menuLeft.contact.create2")
solid-widget(name='hubl-create')
template
p.segment.full.create.text-color-white.whitespace-normal(style='display:block!important')
span(data-trans="menuLeft.emptyCircleProject.notPartOf")
span &nbsp;${value}.
span(data-trans="menuLeft.emptyCircleProject.createNew")
span &nbsp;
solid-link(next="${value.startsWith('proj') ? 'admin-projects' : 'admin-circles'}", data-trans="menuLeft.emptyCircleProject.adminPanel")
solid-widget(name='hubl-menu-fix-url-contact')
template
solid-link.segment.full(data-src="${value}" next="messages")
solid-display.segment.full.text-color-white.heading-active.bg-color-heading.hover.active(
data-src='${value}'
fields='segment(message(name, chatProfile.jabberID), badge)'
class-segment="segment full padding-top-xxsmall padding-bottom-xxsmall padding-right-small padding-left-medium"
class-message='segment three-quarter sub-menu-name'
class-badge='segment badge'
value-badge='${value}'
widget-badge='hubl-counter'
widget-chatProfile.jabberID='hubl-menu-jabberid'
widget-name='solid-display-div'
order-asc='username'
)
solid-widget(name='hubl-menu-fix-url-circle')
template
solid-link.segment.full(data-src="${value}" next="circle")
solid-display.segment.full.text-color-white.heading-active.bg-color-heading.hover.active(
data-src='${value}'
fields='segment(status, circle(name, jabberID), badge)'
class-segment="segment full padding-top-xxsmall padding-bottom-xxsmall padding-right-small padding-left-medium"
class-status='segment text-top sub-menu-icon'
class-circle='segment three-quarter sub-menu-name'
class-name='ellipsis-content'
class-badge='segment badge'
value-badge='${value}'
widget-status='hubl-menu-publicprivate'
widget-badge='hubl-counter'
widget-jabberID='hubl-menu-jabberid'
widget-name='solid-display-div'
order-asc="name"
)
solid-widget(name='hubl-menu-fix-url-project')
template
solid-link.segment.full(data-src="${value}" next="project")
solid-display.segment.full.text-color-white.heading-active.bg-color-heading.hover.active(
data-src='${value}'
fields='segment(status, project(customer.name, name, jabberID), badge)'
class-segment="segment full padding-top-xxsmall padding-bottom-xxsmall padding-right-small padding-left-medium"
class-status='segment text-top sub-menu-icon'
class-project='segment three-quarter sub-menu-name'
class-customer.name='ellipsis-content'
class-name='ellipsis-content'
class-badge='segment badge text-top'
value-badge='${value}'
widget-status='hubl-menu-publicprivate'
widget-jabberID='hubl-menu-jabberid'
widget-badge='hubl-counter'
widget-name='solid-display-div'
order-asc="customer.name"
)
solid-router#navbar-router(default-route='dashboard') solid-router#navbar-router(default-route='dashboard')
if endpoints.get.dashboards for component of components
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name='dashboard') if component.route
div.segment.margin-right-xxsmall if component.type == "about"
div.icon.icon-small.icon-home solid-route(name=component.route, hidden)
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.dashboard") if component.type == "dashboard"
div.divider solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name=component.route)
if publicDirectory && endpoints.get.users div.segment.margin-right-xxsmall
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name='members') div.icon.icon-small.icon-home
div.segment.margin-right-xxsmall div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.dashboard")
div.icon.icon-small.icon-people div.divider
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.profileDirectory") if component.type == "circles"
div.divider div.menu-wrapper
if endpoints.get.joboffers if componentSet.has("admin")
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name='job-offers', rdf-type='hd:joboffer') solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name=`admin-${component.route}`)
div.segment.margin-right-xxsmall div.segment.margin-right-xxsmall
div.segment.icon.icon-small.icon-briefcase div.segment.icon.icon-small.icon-folder-alt
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.jobBoard") div.segment.three-quarter.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.circles")
div.divider div.menu-chevron.segment
if endpoints.get.resources div.menu-icon.icon-arrow-right-circle
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name='resources') solid-route(name=`admin-${component.route}-create`)
div.segment.margin-right-xxsmall else
div.segment.icon.icon-small.icon-docs div.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.resources") div.segment.margin-right-xxsmall
div.divider div.segment.icon.icon-small.icon-folder-alt
if endpoints.get.polls div.segment.three-quarter.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.circles")
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name='polls') solid-route(name=component.route, rdf-type='hd:circle', use-id='', hidden)
div.segment.margin-right-xxsmall solid-route(name=`${component.route}-left`)
div.segment.icon.icon-small.icon-bubbles div.sub-menu.menu-notification
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.gov") div.loader.loader-menu(id=`loader-${component.route}`)
div.divider div
if endpoints.get.events div
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name='events') div
div.segment.margin-right-xxsmall div
div.segment.icon.icon-small.icon-calendar solid-display.ellipsis(
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.events") bind-user
div.divider nested-field='circles'
if endpoints.get.projects fields='circle'
div.menu-wrapper loader-id=`loader-${component.route}`
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name='admin-projects') empty-widget='hubl-menu-create'
div.segment.margin-right-xxsmall empty-value=''
div.segment.icon.icon-small.icon-folder-alt data-trans="empty-value=menuLeft.emptyCircleProject.circle"
div.segment.three-quarter.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.projects") widget-circle='hubl-menu-fix-url-circle'
div.menu-chevron.segment order-asc="circle.name"
div.icon-arrow-right-circle )
solid-route(name='project', rdf-type='hd:project', use-id='', hidden) div.divider
solid-route(name='admin-projects-create', hidden) if component.type == "chat"
solid-route(name='project-left', hidden) div.menu-wrapper
div.sub-menu.menu-notification if componentSet.has("admin")
div#loader-projects.loader.loader-menu solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name=`admin-${component.route}`)
div div.segment.margin-right-xxsmall
div div.segment.icon.icon-small.icon-folder-alt
div div.segment.three-quarter.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.messages")
div div.menu-chevron.segment
solid-display.ellipsis( div.menu-icon.icon-arrow-right-circle
bind-user solid-route(name=`admin-${component.route}-create`, use-id='', hidden)
nested-field='projects' else
fields='project' div.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading
loader-id='loader-projects' div.segment.margin-right-xxsmall
empty-widget='hubl-create' div.segment.icon.icon-small.icon-folder-alt
empty-value='' div.segment.three-quarter.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.messages")
data-trans="empty-value=menuLeft.emptyCircleProject.project" solid-route(name=component.route, rdf-type='foaf:user', use-id='', hidden)
widget-project='hubl-menu-fix-url-project' div.sub-menu.menu-notification
order-asc="project.customer.name" div.loader.loader-menu(id=`loader-${component.route}`)
) div
div.divider div
if endpoints.get.circles div
div.menu-wrapper div
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name='admin-circles') //- search-fields="contact.name"
div.segment.margin-right-xxsmall //- search-label-contact.name=""
div.segment.icon.icon-small.icon-folder-alt //- data-trans="search-label-contact.name=menuLeft.search"
div.segment.three-quarter.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.circles") //- search-widget-contact.name="hubl-search-users"
div.menu-chevron.segment solid-display.segment.full.whitespace-normal(
div.menu-icon.icon-arrow-right-circle bind-user
solid-route(name='circle', rdf-type='hd:circle', use-id='', hidden) nested-field='contacts'
solid-route(name='admin-circles-create') fields='contact'
solid-route(name='circle-left') loader-id=`loader-${component.route}`
div.sub-menu.menu-notification empty-widget='hubl-create-contact'
div#loader-circles.loader.loader-menu empty-value=''
div widget-contact='hubl-menu-fix-url-contact'
div order-asc="contact.username"
div )
div if component.type == "projects"
solid-display.ellipsis( div.menu-wrapper
bind-user if componentSet.has("admin")
nested-field='circles' solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name=`admin-${component.route}`)
fields='circle' div.segment.margin-right-xxsmall
loader-id='loader-circles' div.segment.icon.icon-small.icon-folder-alt
empty-widget='hubl-create' div.segment.three-quarter.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.projects")
empty-value='' div.menu-chevron.segment
data-trans="empty-value=menuLeft.emptyCircleProject.circle" div.icon-arrow-right-circle
widget-circle='hubl-menu-fix-url-circle' solid-route(name=`admin-${component.route}-create`, hidden)
order-asc="circle.name" else
) div.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading
div.divider div.segment.margin-right-xxsmall
div.menu-wrapper div.segment.icon.icon-small.icon-folder-alt
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name='admin-communities') div.segment.three-quarter.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.projects")
div.segment.margin-right-xxsmall solid-route(name=component.route, rdf-type='hd:project', use-id='', hidden)
div.segment.icon.icon-small.icon-folder-alt solid-route(name=`${component.route}-left`, hidden)
div.segment.three-quarter.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.messages") div.sub-menu.menu-notification
div.menu-chevron.segment div.loader.loader-menu(id=`loader-${component.route}`)
div.menu-icon.icon-arrow-right-circle div
solid-route(name='admin-users-create', use-id='', hidden) div
solid-route(name='messages', rdf-type='foaf:user', use-id='', hidden) div
div.sub-menu.menu-notification div
div#loader-messages.loader.loader-menu solid-display.ellipsis(
div bind-user
div nested-field='projects'
div fields='project'
div loader-id=`loader-${component.route}`
//- search-fields="contact.name" empty-widget='hubl-menu-create'
//- search-label-contact.name="" empty-value=''
//- data-trans="search-label-contact.name=menuLeft.search" data-trans="empty-value=menuLeft.emptyCircleProject.project"
//- search-widget-contact.name="hubl-search-users" widget-project='hubl-menu-fix-url-project'
solid-display.segment.full.whitespace-normal( order-asc="project.customer.name"
bind-user )
nested-field='contacts' div.divider
fields='contact' if component.type == "profileDirectory"
loader-id='loader-messages' solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name=component.route)
empty-widget='hubl-create-contact' div.segment.margin-right-xxsmall
empty-value='' div.icon.icon-small.icon-people
widget-contact='hubl-menu-fix-url-contact' div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.profileDirectory")
order-asc="contact.username" solid-route.menu(name=`${component.route}-profile`, hidden)
) div.divider
div.divider if component.type == "jobBoard"
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name=component.route, rdf-type='hd:joboffer')
solid-route.menu(name='profile', hidden) div.segment.margin-right-xxsmall
solid-route(name='about', hidden) div.segment.icon.icon-small.icon-briefcase
solid-route(name='join-community', use-id, hidden) div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.jobBoard")
solid-route(name='login', hidden) div.divider
if component.type == "resources"
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name=component.route)
div.segment.margin-right-xxsmall
div.segment.icon.icon-small.icon-docs
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.resources")
div.divider
if component.type == "polls"
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name=component.route)
div.segment.margin-right-xxsmall
div.segment.icon.icon-small.icon-bubbles
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.gov")
div.divider
if component.type == "events"
solid-route.menu.segment.full.padding-small.text-semibold.text-color-white.heading-active.bg-color-heading.hover.active(name=component.route)
div.segment.margin-right-xxsmall
div.segment.icon.icon-small.icon-calendar
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.events")
div.divider
if componentSet.has('registering')
solid-route(name='join-community', use-id, hidden)
solid-route(name='login', hidden)

View File

@ -17,7 +17,7 @@ div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-p
solid-xmpp-chat( solid-xmpp-chat(
data-authentication='login', data-authentication='login',
data-auto-login='true', data-auto-login='true',
data-websocket-url=`${xmppWebsocket || 'wss://jabber.happy-dev.fr/xmpp-websocket'}`, data-websocket-url=`${component.endpoints.xmpp}`,
data-i18n='en', data-i18n='en',
bind-resources bind-resources
) )

View File

@ -15,25 +15,12 @@ solid-ac-checker(permission='acl:Read', bind-resources)
value-dash=' - ' value-dash=' - '
) )
div.segment.half.sm-hidden.text-right div.segment.half.sm-hidden.text-right
solid-link(class='backlink', bind-resources, next='project-profile' data-trans='project.edit.backlink') solid-link(class='backlink', bind-resources, next=`${component.route}-profile` data-trans='project.edit.backlink')
div.segment.full.padding-large.whitespace-normal div.segment.full.padding-large.whitespace-normal
solid-widget(name="project-edit-members-delete")
template
solid-ac-checker(permission="acl:Delete", data-src="${src}")
solid-delete(
class='segment text-xsmall children-link-text-bold children-link-text-uppercase children-link-button children-link-color-secondary bordered'
data-src="${src}"
data-label=''
data-trans='data-label=project.edit.buttonDelete'
)
solid-widget(name='hubl-project-edit-admin')
template ${value == "true" ? "Administrateur" : ""}
solid-ac-checker(permission='acl:Write', bind-resources) solid-ac-checker(permission='acl:Write', bind-resources)
div#loader-project-edit.loader.loader-top div.loader.loader-top(id=`loader-${component.route}-edit`)
div div
div div
div div
@ -42,12 +29,12 @@ div.segment.full.padding-large.whitespace-normal
//- Add translation for description and captain in the translate file //- Add translation for description and captain in the translate file
solid-form.form( solid-form.form(
bind-resources bind-resources
fields='customer.name, name, description, help, captain, linebreak' fields='customer.name, name, description, help, captain, linebreak'
required-customer.name required-customer.name
required-name required-name
required-captain required-captain
range-captain=`${endpoints.users || endpoints.get.users}` range-captain=`${component.endpoints.captains}`
label-name='' label-name=''
label-customer.name='' label-customer.name=''
@ -66,12 +53,12 @@ div.segment.full.padding-large.whitespace-normal
widget-captain='solid-form-dropdown-autocompletion-label' widget-captain='solid-form-dropdown-autocompletion-label'
widget-linebreak='solid-form-hidden' widget-linebreak='solid-form-hidden'
widget-help='solid-form-hidden-label' widget-help='solid-form-hidden-label'
partial="" partial=""
submit-button='Enregistrer' submit-button='Enregistrer'
next='project-information' next=`${component.route}-information`
data-trans='label-name=project.edit.labelName;label-captain=project.edit.labelCaptain;label-customer.name=project.edit.labelCustomer;label-description=project.edit.labelDescription;label-help=project.edit.descriptionHelp;submit-button=project.edit.buttonSubmit' data-trans='label-name=project.edit.labelName;label-captain=project.edit.labelCaptain;label-customer.name=project.edit.labelCustomer;label-description=project.edit.labelDescription;label-help=project.edit.descriptionHelp;submit-button=project.edit.buttonSubmit'
) )
@ -82,7 +69,7 @@ div.segment.full.padding-large.whitespace-normal
bind-resources bind-resources
nested-field='members' nested-field='members'
fields='user' fields='user'
range-user=`${endpoints.users || endpoints.get.users}` range-user=`${component.endpoints.users}`
class-user='add-member whitespace-normal' class-user='add-member whitespace-normal'
label-user='' label-user=''
@ -98,13 +85,12 @@ div.segment.full.padding-large.whitespace-normal
div.segment.table-cell.half(data-trans='project.edit.tableHeader2') div.segment.table-cell.half(data-trans='project.edit.tableHeader2')
div.segment.table-cell.half(data-trans='project.edit.tableHeader1') div.segment.table-cell.half(data-trans='project.edit.tableHeader1')
//-class='table-body'
solid-display( solid-display(
class='table-body' class='table-body'
bind-resources bind-resources
nested-field='members' nested-field='members'
fields='cell(segment1(user.account.picture), segment2(line1(user.name, is_admin), line2(atom, user.communities))), self' fields='cell(segment1(user.account.picture), segment2(line1(user.name, is_admin), line2(atom, user.communities))), self'
loader-id='loader-project-edit' loader-id=`loader-${component.route}-edit`
class-cell='segment table-cell half labelled-avatar two-lines text-left' class-cell='segment table-cell half labelled-avatar two-lines text-left'
class-self='segment table-cell half text-center' class-self='segment table-cell half text-center'
@ -119,7 +105,7 @@ div.segment.full.padding-large.whitespace-normal
class-line2='segment block' class-line2='segment block'
class-atom='icon icon-large icon-third mdi-atom margin-right-xxsmall' class-atom='icon icon-large icon-third mdi-atom margin-right-xxsmall'
class-user.communities='full' class-user.communities='full'
multiple-user.communities multiple-user.communities
multiple-user.communities-fields="community.name" multiple-user.communities-fields="community.name"
@ -127,5 +113,5 @@ div.segment.full.padding-large.whitespace-normal
widget-is_admin='hubl-project-edit-admin' widget-is_admin='hubl-project-edit-admin'
action-self='self' action-self='self'
widget-self='project-edit-members-delete' widget-self='hubl-project-edit-members-delete'
) )

View File

@ -1,12 +1,10 @@
#project-left div.text-center
div.text-center div.segment.margin-top-small
div.segment.margin-top-small div.segment.shadow.padding-xlarge.text-xlarge.text-left.whitespace-normal
div.segment.shadow.padding-xlarge.text-xlarge.text-left.whitespace-normal p(data-trans='circle.left.paragraphQuit')
p
p(data-trans='circle.left.paragraphQuit') span(data-trans='project.left.paragraphJoin')
p span &nbsp;
span(data-trans='project.left.paragraphJoin') solid-link.link(next=`admin-${getRoute('projects', true)}` data-trans='project.left.admin')
span &nbsp; span &nbsp;
solid-link.link(next="admin-projects" data-trans='project.left.admin') span(data-trans='project.left.paragraphContact')
span &nbsp;
span(data-trans='project.left.paragraphContact')

View File

@ -1,15 +1,15 @@
div.content-box__info //- div.content-box__info
solid-link(class='backlink', bind-resources, next='project-edit' data-trans='project.modifyPicture.backlink')
h1(data-trans='project.modifyPicture.title') //- solid-link(class='backlink', bind-resources, next=`${component.route}-edit` data-trans='project.modifyPicture.backlink')
solid-picture.project-edit-picture( //- h1(data-trans='project.modifyPicture.title')
bind-resources
upload-src=`${endpoints.uploads || endpoints.post.uploads}` //- solid-picture.project-edit-picture(
upload-id="solid-project-edit-picture" //- bind-resources
nested-fields='customer' //- upload-src=`${component.endpoints.uploads}`
fields='logo' //- upload-id="solid-project-edit-picture"
next='project-edit' //- nested-fields='customer'
additional='name' //- fields='logo'
) //- next=`${component.route}-edit`
//- additional='name'
//- )

View File

@ -1,8 +1,12 @@
solid-router(default-route='project-profile', hidden) solid-router(default-route=`${component.route}-profile`, hidden)
solid-route(name='project-profile') solid-route(name=`${component.route}-profile`)
solid-route(name='project-edit') solid-route(name=`${component.route}-edit`)
#project-profile(hidden, data-view="project-profile") div(
id=`${component.route}-profile`
hidden
data-view=`${component.route}-profile`
)
solid-ac-checker.segment.block(permission='acl:Read', bind-resources) solid-ac-checker.segment.block(permission='acl:Read', bind-resources)
div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal div.segment.full.padding-large.sm-padding-top-small.sm-padding-right-xsmall.sm-padding-bottom-small.sm-padding-left-xsmall.border-bottom.border-color-grey.whitespace-normal
solid-display.text-xxlarge.text-letter-spacing-large( solid-display.text-xxlarge.text-letter-spacing-large(
@ -14,27 +18,23 @@ solid-router(default-route='project-profile', hidden)
class-customer.name='text-color-heading text-bold text-uppercase' class-customer.name='text-color-heading text-bold text-uppercase'
class-dash='text-color-heading text-bold text-xlarge' class-dash='text-color-heading text-bold text-xlarge'
class-name='' class-name=''
value-const-title1='N°' value-const-title1='N°'
value-dash=' - ' value-dash=' - '
) )
solid-widget(name='hubl-project-team-contact')
template
solid-link.icon.icon-secondary.hover.icon-speech.margin-left-xsmall.margin-right-medium(data-src='\${value}', next='messages')
div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-xlarge div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-xlarge
div#loader-project-profile.loader div.loader(id=`loader-${component.route}-profile`)
div div
div div
div div
div div
div.whitespace-normal div.whitespace-normal
solid-display.segment.half.sm-full.sm-margin-bottom-medium( solid-display.segment.half.sm-full.sm-margin-bottom-medium(
bind-resources bind-resources
fields='creationDateSet(title, creationDate)' fields='creationDateSet(title, creationDate)'
loader-id='loader-project-profile' loader-id=`loader-${component.route}-profile`
class-title='word-spacing-right' class-title='word-spacing-right'
@ -43,30 +43,30 @@ solid-router(default-route='project-profile', hidden)
widget-creationDate='solid-display-value-date' widget-creationDate='solid-display-value-date'
) )
solid-ac-checker.segment.half.sm-full.text-right(permission='acl:Append', bind-resources, nested-field='members') solid-ac-checker.segment.half.sm-full.text-right(permission='acl:Append', bind-resources, nested-field='members')
solid-ac-checker(permission='acl:Delete', bind-resources) solid-ac-checker(permission='acl:Delete', bind-resources)
solid-link(class='segment sm-full margin-bottom-large sm-margin-bottom-medium button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil' next='project-edit' bind-resources data-trans='project.profile.buttonModify') solid-link(class='segment sm-full margin-bottom-large sm-margin-bottom-medium button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil' next=`${component.route}-edit` bind-resources data-trans='project.profile.buttonModify')
solid-ac-checker(no-permission='acl:Delete', bind-resources) solid-ac-checker(no-permission='acl:Delete', bind-resources)
solid-link(class='segment sm-full margin-bottom-large sm-margin-bottom-medium button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil' next='project-edit' bind-resources data-trans='project.profile.buttonAdd') solid-link(class='segment sm-full margin-bottom-large sm-margin-bottom-medium button text-xsmall text-bold text-uppercase text-center reversed color-secondary bordered icon icon-pencil' next=`${component.route}-edit` bind-resources data-trans='project.profile.buttonAdd')
solid-ac-checker.segment.full.text-right.margin-bottom-large.sm-margin-bottom-medium(permission='acl:Delete', bind-resources) solid-ac-checker.segment.full.text-right.margin-bottom-large.sm-margin-bottom-medium(permission='acl:Delete', bind-resources)
solid-delete( solid-delete(
class='segment sm-full children-link-button text-xsmall text-center children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered' class='segment sm-full children-link-button text-xsmall text-center children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered'
bind-resources bind-resources
data-label='' data-label=''
data-trans='data-label=project.profile.buttonDelete' data-trans='data-label=project.profile.buttonDelete'
next='admin-projects' next=`admin-${component.route}`
) )
solid-widget(name='hubl-project-leave-button') solid-widget(name=`hubl-project-leave-button-${component.uniq}`)
template template
solid-delete( solid-delete(
class='button text-xsmall text-bold text-uppercase color-secondary bordered' class='button text-xsmall text-bold text-uppercase color-secondary bordered'
data-src="${src}" data-src="${src}"
data-label='' data-label=''
data-trans='data-label=project.profile.buttonQuit' data-trans='data-label=project.profile.buttonQuit'
next='project-left' next=`${component.route}-left`
) )
solid-ac-checker.segment.full.text-right.margin-bottom-large.sm-margin-bottom-medium(no-permission='acl:Delete', bind-resources) solid-ac-checker.segment.full.text-right.margin-bottom-large.sm-margin-bottom-medium(no-permission='acl:Delete', bind-resources)
@ -76,13 +76,13 @@ solid-router(default-route='project-profile', hidden)
fields='relation' fields='relation'
action-relation='relation' action-relation='relation'
widget-relation='hubl-project-leave-button' widget-relation=`hubl-project-leave-button-${component.uniq}`
search-fields='user' search-fields='user'
search-widget-user='solid-form-hidden' search-widget-user='solid-form-hidden'
search-value-user="store://user.@id" search-value-user="store://user.@id"
) )
h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.profile.captain') h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.profile.captain')
solid-display( solid-display(
@ -92,7 +92,7 @@ solid-router(default-route='project-profile', hidden)
) )
h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.profile.description') h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.profile.description')
solid-display.segment.block.sm-hidden.whitespace-normal( solid-display.segment.block.sm-hidden.whitespace-normal(
bind-resources bind-resources
fields='description' fields='description'
@ -124,5 +124,9 @@ solid-router(default-route='project-profile', hidden)
widget-user='hubl-project-team-contact' widget-user='hubl-project-team-contact'
) )
#project-edit(hidden, data-view="project-edit") div(
id=`${component.route}-edit`
hidden
data-view=`${component.route}-edit`
)
include page-project-edit.pug include page-project-edit.pug

View File

@ -1,4 +1,35 @@
//- Import your widgets from the `widget`folder here //- Import your widgets from the `widget`folder here
include widgets/hubl-action-community.pug
include widgets/hubl-admin-circle-counter-alternate.pug
include widgets/hubl-admin-circle-counter.pug
include widgets/hubl-admin-circle-link-alternate.pug
include widgets/hubl-admin-circle-link.pug
include widgets/hubl-admin-community-counter.pug
include widgets/hubl-admin-project-counter-alternate.pug
include widgets/hubl-admin-project-counter.pug
include widgets/hubl-admin-project-link-alternate.pug
include widgets/hubl-admin-project-link.pug
include widgets/hubl-captain.pug include widgets/hubl-captain.pug
include widgets/hubl-user-avatar.pug include widgets/hubl-circle-edit-admin.pug
include widgets/hubl-circle-edit-members-delete.pug
include widgets/hubl-circle-join-button.pug
include widgets/hubl-circle-owner.pug
include widgets/hubl-circle-team-contact.pug
include widgets/hubl-circle-user-admin.pug
include widgets/hubl-counter.pug
include widgets/hubl-create-contact.pug
include widgets/hubl-email-field.pug
include widgets/hubl-menu-create.pug
include widgets/hubl-menu-fix-url-circle.pug
include widgets/hubl-menu-fix-url-contact.pug
include widgets/hubl-menu-fix-url-project.pug
include widgets/hubl-menu-jabberid.pug
include widgets/hubl-menu-publicprivate.pug
include widgets/hubl-project-admins.pug
include widgets/hubl-project-captain.pug
include widgets/hubl-project-edit-admin.pug
include widgets/hubl-project-edit-members-delete.pug
include widgets/hubl-project-team-contact.pug
include widgets/hubl-user-avatar.pug
include widgets/hubl-username-field.pug

View File

@ -0,0 +1,12 @@
if componentSet.has('admin') && componentSet.has('chat')
solid-widget(name='hubl-action-community')
template
solid-ac-checker(data-src="${value}", nested-field="members", permission='acl:Append')
solid-link(
class='button text-small text-bold text-uppercase reversed color-secondary bordered icon icon-plus'
data-src="${value}"
next=`admin-${getRoute("chat", true)}-create`
data-trans='communities.linkInvite'
)
solid-ac-checker(data-src="${value}", nested-field="members", no-permission='acl:Append')
div.button.button-disabled(data-trans='communities.noPermission')

View File

@ -0,0 +1,11 @@
if componentSet.has('admin') && componentSet.has('circles')
solid-widget(name='hubl-admin-circle-counter-alternate')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="circle.members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall

View File

@ -0,0 +1,11 @@
if componentSet.has('admin') && componentSet.has('circles')
solid-widget(name='hubl-admin-circle-counter')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall

View File

@ -0,0 +1,11 @@
if componentSet.has('admin') && componentSet.has('circles')
solid-widget(name='hubl-admin-circle-link-alternate')
template
solid-display(
data-src='${src}'
nested-field='circle'
fields='name'
class-name='segment block margin-bottom-xxsmall text-xlarge text-color-heading text-semibold text-letter-spacing-large text-underline text-ellipsis admin-name-ellipsis'
action-name='name'
widget-name='hubl-admin-circle-link'
)

View File

@ -0,0 +1,11 @@
if componentSet.has('admin') && componentSet.has('circles')
solid-widget(name='hubl-admin-circle-link')
template
solid-link(
data-src='${src}'
next=`${getRoute('circles', true)}-information`
)
solid-display(
data-src='${src}'
fields='name'
)

View File

@ -0,0 +1,11 @@
if componentSet.has('admin') && componentSet.has('chat')
solid-widget(name='hubl-admin-community-counter')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="community.members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall

View File

@ -0,0 +1,11 @@
if componentSet.has('admin') && componentSet.has('projects')
solid-widget(name='hubl-admin-project-counter-alternate')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="project.members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall

View File

@ -0,0 +1,12 @@
if componentSet.has('admin') && componentSet.has('projects')
solid-widget(name='hubl-admin-project-counter')
template
div(style='float:right')
solid-display(
fields=''
data-src="${src}"
nested-field="members"
counter-template="\\\${counter}"
)
span.icon.icon-people.icon-xsmall.margin-right-xxsmall

View File

@ -0,0 +1,11 @@
if componentSet.has('admin') && componentSet.has('projects')
solid-widget(name='hubl-admin-project-link-alternate')
template
solid-display(
data-src='${src}'
nested-field='project'
fields='name'
class-name='segment block margin-bottom-xxsmall text-xlarge text-color-heading text-semibold text-letter-spacing-large text-underline text-ellipsis admin-name-ellipsis'
action-name='name'
widget-name='hubl-admin-project-link'
)

View File

@ -0,0 +1,11 @@
if componentSet.has('admin') && componentSet.has('projects')
solid-widget(name='hubl-admin-project-link')
template
solid-link(
data-src='${src}'
next=`${getRoute('projects')}-information`
)
solid-display(
data-src='${src}'
fields='customer.name'
)

View File

@ -1,31 +1,29 @@
solid-widget(name='hubl-captain-contact') if componentSet.has('projects')
solid-widget(name='hubl-captain-contact')
template template
solid-link.icon.icon-secondary.hover.icon-speech.margin-left-xsmall.margin-right-medium(data-src='\${value}', next='messages') solid-link.icon.icon-secondary.hover.icon-speech.margin-left-xsmall.margin-right-medium(data-src='\${value}', next=getRoute('chat', true))
solid-widget(name='hubl-captain') solid-widget(name='hubl-captain')
template template
solid-display.segment.full.margin-bottom-large.labelled-avatar.two-lines( solid-display.segment.full.margin-bottom-large.labelled-avatar.two-lines(
data-src="${value}" data-src="${value}"
fields='segment1(account.picture), segment2(line1(name, user), line2(atom, communities))' fields='segment1(account.picture), segment2(line1(name, user), line2(atom, communities))'
class-segment1='segment' class-segment1='segment'
class-account.picture='avatar' class-account.picture='avatar'
class-segment2='segment three-quarter margin-left-xsmall'
class-line1='segment block'
class-name='text-small text-semibold text-color-heading text-sub'
class-line2='segment block'
class-atom='icon icon-large icon-third mdi-atom margin-right-xxsmall'
class-communities='full'
value-user='${value}' class-segment2='segment three-quarter margin-left-xsmall'
class-line1='segment block'
class-name='text-small text-semibold text-color-heading text-sub'
class-line2='segment block'
class-atom='icon icon-large icon-third mdi-atom margin-right-xxsmall'
class-communities='full'
multiple-communities value-user='${value}'
multiple-communities-fields='community.name'
widget-account.picture='hubl-user-avatar' multiple-communities
widget-user='hubl-captain-contact' multiple-communities-fields='community.name'
)
widget-account.picture='hubl-user-avatar'
//- To remove from translate file : widget-user='hubl-captain-contact'
data-trans='value-is_lead=template-captain.isLead' )

View File

@ -0,0 +1,3 @@
if componentSet.has('circles')
solid-widget(name='hubl-circle-edit-admin')
template ${value == "true" ? "Administrateur" : ""}

View File

@ -0,0 +1,10 @@
if componentSet.has('circles')
solid-widget(name="hubl-circle-edit-members-delete")
template
solid-ac-checker(permission="acl:Delete", data-src="${src}")
solid-delete(
class='segment text-xsmall children-link-button children-link-text-bold children-link-text-uppercase children-link-color-secondary bordered'
data-src="${src}"
data-label=''
data-trans='data-label=circle.edit.buttonDelete'
)

View File

@ -0,0 +1,15 @@
if componentSet.has('circles')
solid-widget(name='hubl-circle-join-button')
template
button.button.text-xsmall.text-bold.text-uppercase.reversed.color-secondary.bordered.icon.icon-arrow-right-circle
solid-form(
bind-resource
nested-field='members'
fields='user.username'
value-user.username='hubl-workaround-493'
widget-user.username='solid-form-hidden'
submit-button=''
data-trans='submit-button=circle.profile.buttonJoin'
)

View File

@ -0,0 +1,19 @@
if componentSet.has('admin') && componentSet.has('circles')
solid-widget(name='hubl-circle-owner')
template
solid-display.segment.block.margin-top-xxsmall.margin-bottom-xxsmall.labelled-avatar.two-lines(
data-src='${await value}'
fields='segment1(account.picture), segment2(line1(name), line2(at, username))'
class-segment1='segment'
class-account.picture='avatar'
class-segment2='segment three-quarter margin-left-xsmall'
class-line1='segment block'
class-name='text-small text-semibold text-color-heading text-sub'
class-line2='segment block text-xsmall'
widget-account.picture='hubl-user-avatar'
value-at='@'
)

View File

@ -0,0 +1,4 @@
if componentSet.has('circles')
solid-widget(name='hubl-circle-team-contact')
template
solid-link.icon.icon-secondary.hover.icon-speech.margin-left-xsmall.margin-right-medium(data-src='\${value}', next=getRoute('chat', true))

View File

@ -0,0 +1,3 @@
if componentSet.has('circles')
solid-widget(name='hubl-circle-user-admin')
template ${value == "true" ? "Administrateur" : ""}

View File

@ -0,0 +1,7 @@
if componentSet.has('chat') || componentSet.has('circles') || componentSet.has('projects')
solid-widget(name='hubl-counter')
template
if componentSet.has('notification')
solid-badge(data-src="${value == 'badge' ? src : value}")
else
span

View File

@ -0,0 +1,9 @@
if componentSet.has('chat')
solid-widget(name='hubl-create-contact')
template
p.segment.full.create.text-color-white.whitespace-normal(style='display:block!important')
span(data-trans="menuLeft.contact.create")
span &nbsp;
solid-link(next=getRoute('profileDirectory', true) data-trans="menuLeft.contact.profileDir")
span &nbsp;
span(data-trans="menuLeft.contact.create2")

View File

@ -0,0 +1,6 @@
if componentSet.has('admin') && componentSet.has('chat')
solid-widget(name='hubl-email-field')
template
div.segment.margin-bottom-medium.half.sm-full.padding-left-small.sm-padding-none.text-small.text-semibold.text-uppercase.text-color-heading
label ${label}
input(type="email" label='${label}' name="email" required value="\${value}" data-holder)

View File

@ -0,0 +1,10 @@
if componentSet.has('circles') || componentSet.has('projects')
solid-widget(name='hubl-menu-create')
template
p.segment.full.create.text-color-white.whitespace-normal(style='display:block!important')
span(data-trans="menuLeft.emptyCircleProject.notPartOf")
span &nbsp;${value}.
if componentSet.has('admin')
span(data-trans="menuLeft.emptyCircleProject.createNew")
span &nbsp;
solid-link(next=`\${value.startsWith('proj') ? 'admin-${getRoute('projects', true)}' : 'admin-${getRoute('circles', true)}'}`, data-trans="menuLeft.emptyCircleProject.adminPanel")

View File

@ -0,0 +1,24 @@
if componentSet.has('circles')
solid-widget(name='hubl-menu-fix-url-circle')
template
solid-link.segment.full(data-src="${value}" next=getRoute('circles', true))
solid-display.segment.full.text-color-white.heading-active.bg-color-heading.hover.active(
data-src='${value}'
fields='segment(status, circle(name, jabberID), badge)'
class-segment="segment full padding-top-xxsmall padding-bottom-xxsmall padding-right-small padding-left-medium"
class-status='segment text-top sub-menu-icon'
class-circle='segment three-quarter sub-menu-name'
class-name='ellipsis-content'
class-badge='segment badge'
value-badge='${value}'
widget-status='hubl-menu-publicprivate'
widget-badge='hubl-counter'
widget-jabberID='hubl-menu-jabberid'
widget-name='solid-display-div'
order-asc="name"
)

View File

@ -0,0 +1,18 @@
if componentSet.has('chat')
solid-widget(name='hubl-menu-fix-url-contact')
template
solid-link.segment.full(data-src="${value}" next=getRoute('chat', true))
solid-display.segment.full.text-color-white.heading-active.bg-color-heading.hover.active(
data-src='${value}'
fields='segment(message(name, chatProfile.jabberID), badge)'
class-segment="segment full padding-top-xxsmall padding-bottom-xxsmall padding-right-small padding-left-medium"
class-message='segment three-quarter sub-menu-name'
class-badge='segment badge'
value-badge='${value}'
widget-badge='hubl-counter'
widget-chatProfile.jabberID='hubl-menu-jabberid'
widget-name='solid-display-div'
order-asc='username'
)

View File

@ -0,0 +1,25 @@
if componentSet.has('projects')
solid-widget(name='hubl-menu-fix-url-project')
template
solid-link.segment.full(data-src="${value}" next=getRoute('projects', true))
solid-display.segment.full.text-color-white.heading-active.bg-color-heading.hover.active(
data-src='${value}'
fields='segment(status, project(customer.name, name, jabberID), badge)'
class-segment="segment full padding-top-xxsmall padding-bottom-xxsmall padding-right-small padding-left-medium"
class-status='segment text-top sub-menu-icon'
class-project='segment three-quarter sub-menu-name'
class-customer.name='ellipsis-content'
class-name='ellipsis-content'
class-badge='segment badge text-top'
value-badge='${value}'
widget-status='hubl-menu-publicprivate'
widget-jabberID='hubl-menu-jabberid'
widget-badge='hubl-counter'
widget-name='solid-display-div'
order-asc="customer.name"
)

View File

@ -0,0 +1,6 @@
if componentSet.has('chat') || componentSet.has('circles') || componentSet.has('projects')
solid-widget(name='hubl-menu-jabberid')
template
div.hidden(
data-jabberID="${value}"
)

View File

@ -0,0 +1,6 @@
if componentSet.has('circles') || componentSet.has('projects')
solid-widget(name='hubl-menu-publicprivate')
template
div(
class="${value == 'Public' ? 'text-simple-line-icons text-large': 'text-simple-line-icons text-xsmall'}"
) ${value == 'Public' ? '#' : ''}

View File

@ -0,0 +1,9 @@
if componentSet.has('admin') && componentSet.has('projects')
solid-widget(name='hubl-project-admins')
template
solid-display(
data-src='${value}'
fields='user'
filtered-by='hubl_project_is_admin'
widget-user='hubl-project-captain'
)

View File

@ -0,0 +1,19 @@
if componentSet.has('admin') && componentSet.has('projects')
solid-widget(name='hubl-project-captain')
template
solid-display.segment.margin-top-xxsmall.margin-bottom-xxsmall.labelled-avatar.two-lines.block(
data-src='${await value}'
fields='segment1(account.picture), segment2(line1(name), line2(at, username))'
class-segment1='segment'
class-account.picture='avatar'
class-segment2='segment three-quarter margin-left-xsmall'
class-line1='segment block'
class-name='text-small text-semibold text-color-heading text-sub'
class-line2='segment block text-xsmall'
widget-account.picture='hubl-user-avatar'
value-at='@'
)

View File

@ -0,0 +1,3 @@
if componentSet.has('projects')
solid-widget(name='hubl-project-edit-admin')
template ${value == "true" ? "Administrateur" : ""}

View File

@ -0,0 +1,10 @@
if componentSet.has('projects')
solid-widget(name="hubl-project-edit-members-delete")
template
solid-ac-checker(permission="acl:Delete", data-src="${src}")
solid-delete(
class='segment text-xsmall children-link-text-bold children-link-text-uppercase children-link-button children-link-color-secondary bordered'
data-src="${src}"
data-label=''
data-trans='data-label=project.edit.buttonDelete'
)

View File

@ -0,0 +1,4 @@
if componentSet.has('projects')
solid-widget(name='hubl-project-team-contact')
template
solid-link.icon.icon-secondary.hover.icon-speech.margin-left-xsmall.margin-right-medium(data-src='\${value}', next=getRoute('chat', true))

View File

@ -0,0 +1,5 @@
if componentSet.has('admin') && componentSet.has('chat')
solid-widget(name='hubl-username-field')
template
label ${label}
input(type="text" title='' pattern="[a-zA-Z0-9]+" label="${label}" data-trans='title=user.create.labelUsernameTitle' name="username" required value="\${value}" data-holder)