Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
c77ce5f
feat: add event-planner widget
Badmuts Jun 8, 2021
6942697
production install
Badmuts Jun 8, 2021
e2f386f
chore: upgrade @savvycodes/event-planner-widgets
Badmuts Jun 8, 2021
b2c2c0b
enable event-planner for all websites
Badmuts Jun 8, 2021
5fac174
setup basic integration step
Badmuts Jun 8, 2021
5a52caf
add mongo service
Badmuts Jun 8, 2021
0a73605
create assets folder
Badmuts Jun 8, 2021
2f45cd6
set missing environment variables
Badmuts Jun 9, 2021
c4191bd
create sha_short from github.sha
Badmuts Jun 9, 2021
afbc865
Merge pull request #1 from savvycodes/feat/setup-github-actions
Badmuts Jun 9, 2021
879fce6
Merge branch 'master' of https://github.com/savvycodes/openstad-front…
Badmuts Jun 9, 2021
ef7fcf7
update event-planner-widgets
Badmuts Jun 9, 2021
0cd29b0
upgrade event-planner widget
Badmuts Jun 10, 2021
00dd9d7
upgrade event-planner widget
Badmuts Jun 10, 2021
4f23ef9
upgrade event-planner widget
Badmuts Jun 11, 2021
3b97992
feat: add image url to widget config
Badmuts Jun 11, 2021
a691766
chore: bump openstad-event-planner-widget version
Badmuts Jun 11, 2021
e5cfc65
chore: bump openstad-event-planner-widget version
Badmuts Jun 12, 2021
2615e94
chore: bump openstad-event-planner-widget version
Badmuts Jun 14, 2021
8157679
feat: add event-browser
Badmuts Jun 15, 2021
910e4ac
chore: bump openstad-event-planner-widget version
Badmuts Jun 15, 2021
56a86d0
chore: bump openstad-event-planner-widget version
Badmuts Jun 16, 2021
a325224
chore: bump openstad-event-planner-widget version
Badmuts Jun 16, 2021
c3e3a4d
chore: bump openstad-event-planner-widget version
Badmuts Jun 17, 2021
bdf1b7f
chore: bump openstad-event-planner-widget version
Badmuts Jun 18, 2021
15aa92d
chore: bump openstad-event-planner-widget version
Badmuts Jun 24, 2021
0896e7f
chore: bump openstad-event-planner-widget version
Badmuts Jun 24, 2021
7e0ae12
chore: bump openstad-event-planner-widget version
Badmuts Jun 24, 2021
99543de
chore: bump openstad-event-planner-widget version
Badmuts Jun 25, 2021
6d4bf44
chore: bump openstad-event-planner-widget version
Badmuts Jun 25, 2021
e2877c9
chore: bump openstad-event-planner-widget version
Badmuts Jun 25, 2021
7fbd3b5
chore: bump openstad-event-planner-widget version
Badmuts Jun 28, 2021
6bba4ae
chore: bump openstad-event-planner-widget version
Badmuts Jun 28, 2021
0cad071
chore: bump openstad-event-planner-widget version
Badmuts Jun 29, 2021
0c1decf
chore: bump openstad-event-planner-widget version
Badmuts Jun 30, 2021
e1f9dab
chore: bump openstad-event-planner-widget version
Badmuts Jul 1, 2021
0da4863
chore: bump openstad-event-planner-widget version
Badmuts Jul 2, 2021
785e70e
chore: bump openstad-event-planner-widget version
Badmuts Jul 2, 2021
505bb47
chore: bump openstad-event-planner-widget version
Badmuts Jul 5, 2021
24d98c4
chore: bump openstad-event-planner-widget version
Badmuts Jul 5, 2021
f25a6a3
chore: bump openstad-event-planner-widget version
Badmuts Jul 6, 2021
f6b6dbf
chore: bump openstad-event-planner-widget version
Badmuts Jul 6, 2021
451d418
chore: bump openstad-event-planner-widget version
Badmuts Jul 6, 2021
f96ff13
chore: bump openstad-event-planner-widget version
Badmuts Jul 7, 2021
feed68f
chore: bump openstad-event-planner-widget version
Badmuts Jul 7, 2021
ba9a44b
Merge branch 'Amsterdam:master' into master
Badmuts Aug 17, 2021
3310472
chore: bump lock file
Badmuts Aug 17, 2021
1001ee5
chore: bump lock file
Badmuts Aug 17, 2021
d6d749f
chore: bump lock file
Badmuts Aug 17, 2021
06e9333
Merge branch 'master' of https://github.com/savvycodes/openstad-front…
Badmuts Aug 18, 2021
c362442
fix: merge conflict
Badmuts Aug 23, 2021
7afdb9a
chore: bump openstad-event-planner-widget version
Badmuts Aug 24, 2021
3edceb7
Merge pull request #2 from savvycodes/feat/event-planner
Badmuts Aug 27, 2021
57a9f8c
feat: add decision tree widget
Badmuts Sep 3, 2021
df672ce
feat: update schema with required fields
Badmuts Sep 3, 2021
0c5f43e
Merge pull request #3 from savvycodes/feat/decision-tree
Badmuts Sep 3, 2021
3772f34
feat(resource-overview/form): add target audience to form field and f…
Badmuts Sep 6, 2021
55b94cd
feat(target-audinece): enable target audience in admin panel
Badmuts Sep 6, 2021
b03cd4a
Merge pull request #4 from savvycodes/feat/target-audience
Badmuts Sep 6, 2021
7176450
feat(grants): add grants type to resource form and add grant filter
Badmuts Sep 7, 2021
85633c8
feat(grants): include grants when fetching resource
Badmuts Sep 7, 2021
24ebc25
feat(ideas): include description field in search query
Badmuts Sep 7, 2021
1056df4
Merge pull request #5 from savvycodes/feat/grants
Badmuts Sep 7, 2021
8ed72ce
feat(idea): add filter for archived ideas. add archive function to id…
Badmuts Sep 8, 2021
6777a0c
Merge pull request #6 from savvycodes/feat/idea-archive
Badmuts Sep 8, 2021
a8b09f1
added tag titles
Sijmenjeromkok Sep 8, 2021
421d251
Merge pull request #7 from savvycodes/feat/tag-titles
Badmuts Sep 8, 2021
05b3a8c
change text archive
Sijmenjeromkok Sep 9, 2021
ca5d8f9
Merge pull request #8 from savvycodes/fix/archive-text
Badmuts Sep 9, 2021
016f6b5
fix: default to not showing archive
Badmuts Sep 16, 2021
0a43d2d
feat: set checkbox checked if item is in resource
Badmuts Sep 20, 2021
81ab10f
Merge pull request #9 from savvycodes/fix/resource-form-autoselect-ch…
Badmuts Sep 20, 2021
bebb12c
Fix typo
Badmuts Sep 23, 2021
a0902a0
Merge pull request #10 from savvycodes/fix/typo
Badmuts Sep 23, 2021
d3ebd84
chore: update event-planner
Badmuts Oct 14, 2021
1ed52a4
Merge pull request #11 from savvycodes/chore/update-event-planner
Badmuts Oct 14, 2021
66d94fa
Merge branch 'master' of https://github.com/Amsterdam/openstad-fronte…
Badmuts Oct 18, 2021
07e66c4
Merge branch 'Amsterdam-master'
Badmuts Oct 18, 2021
b69e111
feat: add apostrophe-forms and smtp config to frontend
Badmuts Oct 19, 2021
46ce29d
feat: add custom prefix
Badmuts Oct 19, 2021
6bdbe95
Merge pull request #13 from savvycodes/feat/apostrophe-forms
Badmuts Oct 20, 2021
694951b
feat: add event favorites widget
Badmuts Oct 21, 2021
607f287
chore: version bump
Badmuts Oct 21, 2021
d00bba0
chore: version bump
Badmuts Oct 21, 2021
f07bbda
Merge pull request #14 from savvycodes/feat/event-favorites
Badmuts Oct 21, 2021
e84966f
Merge branch 'master' of github.com:openstad/openstad-frontend into c…
Badmuts May 2, 2022
6aa2be5
fix: unresolved merge conflicts
Badmuts May 2, 2022
a999c0a
fix: unresolved merge conflicts
Badmuts May 2, 2022
5c903e4
feat: add event to resource page
Badmuts May 30, 2022
cfc99d9
feat: add global settings module
Badmuts Jun 3, 2022
5315d37
feat: add global settings module
Badmuts Jun 3, 2022
282ff96
feat: add openstad-event-global-settings module
Badmuts Jun 3, 2022
3ad2ef7
fix: move new resources to toplevel cms
Badmuts Jun 3, 2022
510d3c5
fix: move new resources to toplevel cms
Badmuts Jun 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Integration
on:
pull_request:
branches: [master]

jobs:
# Build job creates a docker image and publishes it to the registry
build:
runs-on: ubuntu-latest
env:
DOCKER_PUBLIC_USERNAME: savvycodes
DOCKER_IMAGE_NAME: openstad-frontend
FRONTEND_MONGO_SCHEME: mongodb://mongo
FRONTEND_MONGO_DB_HOST: mongo
FRONTEND_MONGO_PORT: 27017
DEFAULT_HOST: localhost:4444
APP_URL: http://localhost:4444
FRONTED_PORT: 4444
COOKIE_SECURE_OFF: yes
API: http://localhost:8111
IMAGE_API_URL: http://localhost:3333
IMAGE_API_ACCESS_TOKEN: xxxx
SITE_API_KEY: xxxx

# Setup docker and mongodb services
services:
docker:
image: docker
mongodb:
image: mongo:4
ports:
- 27017:27017

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(echo ${{ github.sha }} | cut -c1-7)"
echo "::set-output name=branch::$(echo ${{github.event.pull_request.head.ref}} | sed 's/\//-/g')"

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Install node_modules
run: npm ci

# We skip tests for now

- name: Generate and bundle assets
run: |
mongo default --eval 'db.createUser({user:"ci",pwd:"test",roles:["readWrite"]});'
mkdir -p assets
NODE_ENV=production APOS_MINIFY=1 APOS_WORKFLOW=ON APOS_BUNDLE=assets MINIFY_JS='ON' node apostrophe.js apostrophe:generation --create-bundle assets

- name: Build container
run: docker build -t ${DOCKER_PUBLIC_USERNAME}/${DOCKER_IMAGE_NAME}:${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.sha_short }} .

- name: Login to Docker Hub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}

- name: Publish container
run: docker push ${DOCKER_PUBLIC_USERNAME}/${DOCKER_IMAGE_NAME}:${{ steps.vars.outputs.branch }}-${{ steps.vars.outputs.sha_short }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,5 @@ fabric.properties

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

assets/
159 changes: 34 additions & 125 deletions config/contentWidgets.js
Original file line number Diff line number Diff line change
@@ -1,78 +1,17 @@
const contentWidgets = {
'admin': {
adminOnly: true
},
'resource-overview': {
adminOnly: true
},
'resource-form': {
adminOnly: true
},
'resource-representation': {
adminOnly: true
},
'agenda': {},
'accordeon': {},
'arguments-block': {
adminOnly: true
},
'arguments-form': {
'@savvycodes/openstad-event-planner': {
adminOnly: true,
deprecated: true
},
'arguments': {
'@savvycodes/openstad-event-browser': {
adminOnly: true,
deprecated: true
},
'section': {
addLabel: 'Columns',
controls: {
movable: true,
removable: true,
position: 'bottom-left'
},
},
'slider': {
},
'counter': {
addLabel: 'Counter',
},
'cookie-warning': {
adminOnly: true
},
'date-bar': {},
'idea-form': {
adminOnly: true
},
'idea-map': {
adminOnly: true
},
'idea-overview': {},
'idea-single': {
adminOnly: false
},
'ideas-on-map': {
addLabel: 'Ideeen op een kaart',
adminOnly: true
},
'previous-next-button-block': {
addLabel: 'Vorige volgende knoppen',
},
'iframe': {
adminOnly: true
},
'image': {},
'info-bar': {},
'link': {},
'list': {},
'begroot': {
addLabel: 'Begroot (deprecated, please use Participatory budgetting)',
'decision-tree': {
adminOnly: true,
readOnly: true,
},
'participatory-budgeting': {
addLabel: 'Participatory budgetting',
adminOnly: true
adminOnly: true,
},
'choices-guide': {
addLabel: 'Keuzewijzer',
Expand All @@ -81,91 +20,61 @@ const contentWidgets = {
addLabel: 'Keuzewijzer resultaten',
},
'main-image': {
adminOnly: true
adminOnly: true,
},
'apostrophe-rich-text': {
toolbar: ['Styles', 'Bold', 'Italic', 'Link', 'Unlink', 'BulletedList', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-',],
styles: [
{name: 'Paragraph', element: 'p'}
toolbar: [
'Styles',
'Bold',
'Italic',
'Link',
'Unlink',
'BulletedList',
'-',
'JustifyLeft',
'JustifyCenter',
'JustifyRight',
'JustifyBlock',
'-',
],
styles: [{ name: 'Paragraph', element: 'p' }],
controls: {
movable: true,
removable: true,
position: 'top-left'
}
position: 'top-left',
},
},
'speech-bubble': {
controls: {
position: 'top-left'
position: 'top-left',
},
},
'title': {},
title: {},
'user-form': {
adminOnly: true
adminOnly: true,
},
'local-video': {
addLabel: 'Video (upload)',
},
'apostrophe-video': {
addLabel: 'Video (3d party, youtube, vimeo, etc.)',
},
'location': {
adminOnly: true
location: {
adminOnly: true,
},
'share': {
adminOnly: true
share: {
adminOnly: true,
},
'recource-raw': {
adminOnly: true
adminOnly: true,
},
'recource-image': {
adminOnly: true
adminOnly: true,
},
'recource-like': {
adminOnly: true
adminOnly: true,
},
'apostrophe-forms': {
forceDisplay: true,
},
'resource-admin': {
adminOnly: true
}
};

exports.getAdminWidgets = () => {
const filteredContentWidgets = {};

Object.keys(contentWidgets).forEach(function(key) {
filteredContentWidgets[key] = contentWidgets[key];

/**
* Edit the settings for admin, so they can edit all modules.
*/
if (filteredContentWidgets[key].adminOnly) {
//readonly = false shows the module from the menu
filteredContentWidgets[key].readOnly = false;
filteredContentWidgets[key].edit = true;
}

});

return filteredContentWidgets;
}

exports.getEditorWidgets = () => {
const filteredContentWidgets = {};

Object.keys(contentWidgets).forEach(function(key) {
filteredContentWidgets[key] = contentWidgets[key];

/**
* Edit the settings for editors, so they can only edit specific modules.
*/
if (filteredContentWidgets[key].adminOnly) {
//readonly hides the module from the menu
filteredContentWidgets[key].readOnly = true;
//setting edit to false removes the edit controls for this module
filteredContentWidgets[key].edit = false;
}

});

return filteredContentWidgets;
}
16 changes: 16 additions & 0 deletions config/resources.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = [
{
label: 'Event',
value: 'event',
resourceEndPoint: 'event',
//config is used in API config
configKey: 'events',
},
{
label: 'Organisation',
value: 'organisation',
resourceEndPoint: 'organisation',
//config is used in API config
configKey: 'organisations',
},
];
11 changes: 11 additions & 0 deletions config/smtp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require('dotenv').config();

module.exports = {
port: process.env.SMTP_PORT || 1025,
host: process.env.SMTP_HOST ||'127.0.0.1',
auth: {
user: process.env.SMTP_USER || 'user',
pass: process.env.SMTP_PASS ||'pass'
},
secure: process.env.SMTP_SECURE && process.env.SMTP_SECURE === 'true' ? true : false
}
42 changes: 40 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,50 @@
require('dotenv').config();
const openstadCms = require('@openstad/cms');

require('dotenv').config();
const contentWidgets = require('./config/contentWidgets')
const smtp = require('./config/smtp')
const resources = require('./config/resources')

var apos = openstadCms.site({
bundles: ['@openstad/cms'],
// See lib/modules for basic project-level configuration of our modules
// responsible for serving static assets, managing page templates and
// configuring user accounts.

modules: { }
modules: {
'resource-pages': {
resources: resources,
},
'resource-representation-widgets': {
resources: resources,
},
'resource-overview-widgets': {
resources: resources,
},
'resource-form-widgets': {
resources: resources,
},
'@savvycodes/openstad-event-global-settings': {},
'@savvycodes/openstad-event-planner-widgets': {},
'@savvycodes/openstad-event-browser-widgets': {},
'@savvycodes/openstad-event-favorites-widgets': {},
'apostrophe-forms': {
// Best practice: set to first or last so that inputs are nested in labels
// and easier to style
optionLabelPosition: 'last',
classPrefix: 'os-form',
},
'apostrophe-forms-widgets': {},
// Enable only the field widgets that your application needs to make it
// easier for application/website managers.
'apostrophe-forms-text-field-widgets': {},
'apostrophe-forms-textarea-field-widgets': {},
'apostrophe-forms-select-field-widgets': {},
'apostrophe-email': {
nodemailer: smtp,
},
settings: {
contentWidgets: contentWidgets,
},
},
});
3 changes: 2 additions & 1 deletion locales/default-draft.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"Control of this document has been taken by another user.": "Control of this document has been taken by another user.",
"You are now editing this document in another tab or window.": "You are now editing this document in another tab or window.",
"Legacy Trash": "Legacy Trash",
"That document may be being edited by %s (%s).\nIf you take control, they could lose unsaved work.\nDo you want to take control?": "That document may be being edited by %s (%s).\nIf you take control, they could lose unsaved work.\nDo you want to take control?"
"That document may be being edited by %s (%s).\nIf you take control, they could lose unsaved work.\nDo you want to take control?": "That document may be being edited by %s (%s).\nIf you take control, they could lose unsaved work.\nDo you want to take control?",
"Select all %s item(s) that match this search": "Select all %s item(s) that match this search"
}
Loading