cubear / cwd_events
A Drupal 9 module to embed Localist events in a block.
Installs: 1 289
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 21
Forks: 2
Language:HTML
Type:drupal-custom-module
- dev-main
- 9.3.x-dev
- v9.1.0
- v9.0.0
- 8.8.1
- 8.8.0
- 8.7.0
- 8.6.0
- 8.5.0
- 8.4.x-dev
- 8.4.0
- 3.1.2
- v3.1.1
- v3.1.0
- v3.0.2
- v3.0.1
- v3.0.0
- v2.0.0
- v2.0-alpha
- v1.1.51
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- v1.0
- dev-dependabot/npm_and_yarn/src/app/postcss-8.4.31
- dev-dependabot/npm_and_yarn/src/app/word-wrap-1.2.4
- dev-dependabot/npm_and_yarn/src/app/semver-5.7.2
- dev-dependabot/npm_and_yarn/src/app/minimist-1.2.8
- dev-dependabot/npm_and_yarn/src/app/cookiejar-2.1.4
- dev-dependabot/npm_and_yarn/src/app/json5-1.0.2
- dev-dependabot/npm_and_yarn/src/app/express-4.18.2
- dev-dependabot/npm_and_yarn/src/app/qs-6.5.3
- dev-dependabot/npm_and_yarn/src/app/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/src/app/terser-4.8.1
- dev-dependabot/npm_and_yarn/src/app/moment-2.29.4
- dev-dependabot/npm_and_yarn/src/app/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/src/app/follow-redirects-1.14.8
- dev-d10prep
- dev-d8-conflict
- dev-hr-site
This package is auto-updated.
Last update: 2024-10-14 05:27:50 UTC
README
rename your branch to main
git branch -m master main git fetch origin git branch -u origin/main main git remote set-head origin -a
A light weight Drupal module to pull localist and render in a cwd_events block. With six options for built in views.
Interactive Demo Page (Deprecated)
Component Demo Page
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Prerequisites
This module is made for use with a Drupal websites. Development requires Node and NPM.
Installing
with composer
composer require cubear/cwd_events
or download directly from Github Repo.
cd modules/custom && git clone https://github.com/CU-CommunityApps/CD_cwd_events
Development to compile sass and javascript.
cd ./src/app
npm install
npm run watch
Running the tests
start a local server in the /dev folder using http-server
npm install -global http-server
then run
npm run test
check for test coverage:
npm run coverage
view browser tests Demo Page
Break down into end to end tests
Test are loocated in the dev/test folder and test for:
-
localist main function
-
localist connector
-
all templates
-
all helper functions
button click events are not currently tested and must be done manually using the demo page.
And coding style tests
This module follows drupal code standards for phpcs and linting.
- see the
.eslintrc.json
file for linting details. - see squizlabs/PHP_CodeSniffer for more details.
production builds npm prod
require all linting tests to pass before the build can finish with success.
Deployment
enable the module with drush
drush en cwd_events
add a Events block and configure block settings.
This is an example of the block output:
<section> <h2>Block Name</h2> <a class="cwd_events_readmore" href="/events">Read More</a> <div id="events-listing-UUID" class="drupal-events-listing cwd-events-style" data-target="standard" data-depts="0" data-entries="4" data-format="standard" data-group="0" data-keyword="Sustainability" data-heading="Test" data-calendarurl= "../test/testData.json" data-apikey= 'KLhy2GtuSAGirYGY' data-filterby= 'group' data-addcal= "true" data-pagination="true" ></div> </section>
To use the Drupal API enable install and enable the Drupal Graphql Modules
drush en graphql drush en graphql_core
Set the Graphql permissions for anonymous users.
-
Bypass field security (optional)
-
Execute arbitrary GraphQL requests
-
Execute persisted GraphQL requests
More about the Localist API
The localist api docs https://developer.localist.com/doc/api#usage
API query Filters
READ the API DOCS! In many cases just play around with the demo, until you get the results you need.
The module builds a query that is made to to the localist api
The localist api returns results with the three parameters Anded together:
Departments are (OR) keywords (AND) Group_id (integer)
Currently the Drupal module does not support multiple keywords. The API does support multiple keywords but they would be ORed together and in most cases the resulting query is very small. If you have a project that requires multiple keywords put in a issue for it.
Built With
- laravel mix - The babel and sass transpiller
Versioning
For the versions available, see the tags on this repository.
Authors
- Richard Marisa - Druapl Work - richmarisa
- Phil Williammee - Javascript Work - philwilliammee
See also the list of contributors who participated in this project.
License
This project is licensed under the GNU General Public License v2.0 - see the LICENSE.md file for details
Acknowledgments
- Hat tip to Anthony M. Adinolfi for his work on localist event in Cornell Base theme.