From b8d7badae4606f3299bc5f12baa213fd0af925f1 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Tue, 26 May 2020 12:29:08 +0200 Subject: [PATCH] fix: sib-profile --- README.md | 6 +++++- styling.md => STYLING.md | 0 src/dependencies.pug | 18 +++++++++--------- src/header.pug | 4 +--- src/index.pug | 2 +- src/menu-left.pug | 7 ++----- 6 files changed, 18 insertions(+), 19 deletions(-) rename styling.md => STYLING.md (100%) diff --git a/README.md b/README.md index 6cbf8f0..b002528 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,9 @@ On `config.json`: "xmpp": "https://jabber.happy-dev.fr/http-bind/", "authority": "http://localhost:8000/", "endpoints": { - "users": "http://server.url/users/" + "skills": "http://server.url/skills/", + "users": "http://server.url/users/", + "uploads": "http://server.url/upload/" } } ``` @@ -155,6 +157,8 @@ On `config.json`: } ``` +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 path/to/djangoldp_dashboard/fixtures/sample.json`. + ### Events Events allow to create and manage instance-level evenement. To activate them, you need: diff --git a/styling.md b/STYLING.md similarity index 100% rename from styling.md rename to STYLING.md diff --git a/src/dependencies.pug b/src/dependencies.pug index be5b0d4..5de986a 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -8,28 +8,28 @@ script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8" defer) //- script(type="module" src="/lib/sib-oidc/index.js" defer) script(type="module" src="https://unpkg.com/@startinblox/router@0.7" 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://unpkg.com/@startinblox/component-notifications@0.3" defer) -//- script(type="module" src="/lib/sib-notifications/index.js" defer) + //- script(type="module" src="/lib/sib-notifications/index.js" defer) if endpoints.events || (endpoints.get && endpoints.get.events) script(type="module" src="https://unpkg.com/@startinblox/component-event@0.1" defer) -//- script(type="module" src="/lib/sib-event/sib-event.js" defer) + //- script(type="module" src="/lib/sib-event/sib-event.js" defer) if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers) script(type="module" src="https://unpkg.com/@startinblox/component-job-board@0.3" defer) script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.3" defer) -//- script(type="module" src="/lib/sib-job-board/sib-job-board.js" defer) -//- script(type="module" src="/lib/sib-conversation/sib-conversation.js" defer) + //- script(type="module" src="/lib/sib-job-board/sib-job-board.js" defer) + //- script(type="module" src="/lib/sib-conversation/sib-conversation.js" defer) -if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users)) - script(type="module" src="/lib/sib-directory/index.js" defer) -//- script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.3" defer) +if (endpoints.uploads || (endpoints.get && endpoints.get.uploads)) && (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.users || (endpoints.get && endpoints.get.users)) + script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.3" defer) + //- script(type="module" src="/lib/sib-directory/index.js" defer) if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) script(type="module" src="https://unpkg.com/@startinblox/component-dashboard@0.1" defer) -//- script(type="module" src="/lib/sib-dashboard/sib-dashboard.js" defer) + //- script(type="module" src="/lib/sib-dashboard/sib-dashboard.js" defer) if endpoints.users || (endpoints.get && endpoints.get.users) script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.6" defer) diff --git a/src/header.pug b/src/header.pug index 3260f08..7184052 100644 --- a/src/header.pug +++ b/src/header.pug @@ -24,11 +24,9 @@ details#user-controls.notLoggedIn #user-controls__panel nav(role="user's functionalities menu") ul - if publicDirectory && (endpoints.users || (endpoints.get && endpoints.get.users)) + if (endpoints.uploads || (endpoints.get && endpoints.get.uploads)) && (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.users || (endpoints.get && endpoints.get.users)) li sib-link(next='profile') Mon profil - //-li - sib-link(next='user-settings') Settings li sib-link(next='admin') Administration button(role='log out' onclick="document.querySelector('sib-auth').logout();") Se déconnecter diff --git a/src/index.pug b/src/index.pug index e47be56..dd21d1d 100644 --- a/src/index.pug +++ b/src/index.pug @@ -52,7 +52,7 @@ html(lang="en") #admin(hidden).with-sidebar include page-admin.pug - if (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.uploads || (endpoints.post && endpoints.post.uploads)) + if (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.uploads || (endpoints.post && endpoints.post.uploads)) && (endpoints.users || (endpoints.post && endpoints.post.users)) #profile(hidden).no-sidebar include page-profile.pug diff --git a/src/menu-left.pug b/src/menu-left.pug index 10cba84..0d69f2c 100644 --- a/src/menu-left.pug +++ b/src/menu-left.pug @@ -84,7 +84,7 @@ nav#main__menu.jsLeftMenu nested-field='projects' fields='project' empty-widget='hubl-create' - empty-value='project' + empty-value='projet' widget-project='hubl-menu-fix-url-project' order-by='project.customer.name' next='project' @@ -105,7 +105,7 @@ nav#main__menu.jsLeftMenu nested-field='circles' fields='circle' empty-widget='hubl-create' - empty-value='circle' + empty-value='cercle' widget-circle='hubl-menu-fix-url-circle' order-by='circle.name' next='circle' @@ -138,6 +138,3 @@ nav#main__menu.jsLeftMenu sib-route(name='admin', hidden) sib-route.menu(name='profile', hidden) - //- div.divider - //- sib-route.menu(hidden, name='my-profile', rdf-type='foaf:user', use-id='') -