From d5e19c469ce1e9f2531ea24a1b1b15659768a657 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 3 Feb 2020 15:43:16 +0100 Subject: [PATCH] update: add events component --- README.md | 1 + config.sample.federated.json | 2 ++ config.sample.json | 1 + src/dependencies.pug | 2 ++ src/index.pug | 4 ++++ src/menu-left.pug | 5 +++++ src/page-events.pug | 2 ++ 7 files changed, 17 insertions(+) create mode 100644 src/page-events.pug diff --git a/README.md b/README.md index 6fc35fe..176c48e 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ Current Sib App capabilities: | Base | `djangoldp_account`, `djangoldp_profile`, `djangoldp_notification`, `oidc_provider` | `users` | | Circles | `djangoldp_circle` | `circles` | | Projects | `djangoldp_project` | `projects`, `customers` | +| Events | `djangoldp_event` | `events` | Federated Sib App needs to use `config.sample.federated.json` example. diff --git a/config.sample.federated.json b/config.sample.federated.json index 4587b87..9297558 100644 --- a/config.sample.federated.json +++ b/config.sample.federated.json @@ -11,12 +11,14 @@ "circles": "http://localhost:8000/circles/", "projects": "http://localhost:8000/projects/", "customers": "http://localhost:8000/customers/", + "events": "http://localhost:8000/events/", "users": "http://localhost:8000/users/" }, "post": { "circles": "http://localhost:8000/circles/", "projects": "http://localhost:8000/projects/", "customers": "http://localhost:8000/customers/", + "events": "http://localhost:8000/events/", "users": "http://localhost:8000/users/" } } diff --git a/config.sample.json b/config.sample.json index 916b99e..76cff70 100644 --- a/config.sample.json +++ b/config.sample.json @@ -10,6 +10,7 @@ "circles": "http://localhost:8000/circles/", "projects": "http://localhost:8000/projects/", "customers": "http://localhost:8000/customers/", + "events": "http://localhost:8000/events/", "users": "http://localhost:8000/users/" } } diff --git a/src/dependencies.pug b/src/dependencies.pug index 9768410..95d17f8 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -5,6 +5,7 @@ script(src="/scripts/index.js") //- script(type="module" src="/lib/sib-router/src/index.js") //- script(type="module" src="/lib/sib-chat/sib-chat.js") //- script(type="module" src="/lib/sib-notifications/sib-notifications.js") +//- script(type="module" src="/lib/sib-event/sib-event.js") //- script(type="module" src="/lib/sib-conversation/sib-conversation.js") //- script(type="module" src="/lib/sib-directory/sib-directory.js") //- script(type="module" src="/lib/sib-job-board/sib-job-board.js") @@ -14,6 +15,7 @@ script(type="module" src="https://unpkg.com/@startinblox/core@0.9") script(type="module" src="https://unpkg.com/@startinblox/router@0.7") script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.4") script(type="module" src="https://unpkg.com/@startinblox/component-notifications@0.3") +script(type="module" src="https://unpkg.com/@startinblox/component-event@0.1") //- script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.3") //- script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.3") //- script(type="module" src="https://unpkg.com/@startinblox/component-job-board@0.3") diff --git a/src/index.pug b/src/index.pug index adb0716..26454a2 100644 --- a/src/index.pug +++ b/src/index.pug @@ -43,6 +43,10 @@ html(lang="en") #messages(hidden).with-sidebar include page-messages.pug + if endpoints.events || (endpoints.get && endpoints.get.events) + #events(hidden) + include page-events.pug + #admin(hidden).with-sidebar include page-admin.pug diff --git a/src/menu-left.pug b/src/menu-left.pug index 5923acd..4b1ac41 100644 --- a/src/menu-left.pug +++ b/src/menu-left.pug @@ -19,6 +19,11 @@ nav#main__menu.jsLeftMenu //- sib-route(name='job-offer-create', hidden) //- sib-route(name='job-offer-edit', use-id, hidden) //- div.divider + if endpoints.events || (endpoints.get && endpoints.get.events) + sib-route.menu(name='events') + div.menu-label Events + div.menu-icon.icon-calendar + div.divider if endpoints.projects || (endpoints.get && endpoints.get.projects) div div.menu diff --git a/src/page-events.pug b/src/page-events.pug new file mode 100644 index 0000000..f92f8d8 --- /dev/null +++ b/src/page-events.pug @@ -0,0 +1,2 @@ +.views-container + sib-event(data-src=`${endpoints.events || (endpoints.get && endpoints.get.events)}`) \ No newline at end of file