@eeacms/volto-clms-theme 1.1.101 → 1.1.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,11 +4,18 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
- ### [1.1.101](https://github.com/eea/volto-clms-theme/compare/1.1.100...1.1.101) - 10 January 2024
7
+ ### [1.1.103](https://github.com/eea/volto-clms-theme/compare/1.1.102...1.1.103) - 17 January 2024
8
8
 
9
- #### :bug: Bug Fixes
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - temporary comment of Sonarqube report [Mikel Larreategi - [`0fc3508`](https://github.com/eea/volto-clms-theme/commit/0fc350843b2496dea201cd5fcd35b85be72220ca)]
12
+ - text change on meeting view [Unai - [`d7a6c09`](https://github.com/eea/volto-clms-theme/commit/d7a6c09541078770c8af73fcf0ca025ffaff0e9a)]
13
+ ### [1.1.102](https://github.com/eea/volto-clms-theme/compare/1.1.101...1.1.102) - 16 January 2024
10
14
 
11
- - fix:CLMS-2967 original projection shown in the cart [Unai - [`54ee33f`](https://github.com/eea/volto-clms-theme/commit/54ee33f8ea86f5a2e936da4068e09f0412b70420)]
15
+ #### :hammer_and_wrench: Others
16
+
17
+ - event view fixes [Unai - [`a17c48a`](https://github.com/eea/volto-clms-theme/commit/a17c48abee94afc78da21b2c0b67a0b33cb59de4)]
18
+ ### [1.1.101](https://github.com/eea/volto-clms-theme/compare/1.1.100...1.1.101) - 10 January 2024
12
19
 
13
20
  ### [1.1.100](https://github.com/eea/volto-clms-theme/compare/1.1.99...1.1.100) - 21 December 2023
14
21
 
package/Jenkinsfile CHANGED
@@ -215,66 +215,66 @@ pipeline {
215
215
  }
216
216
  }
217
217
 
218
- stage('Report to SonarQube') {
219
- when {
220
- anyOf {
221
- allOf {
222
- not { environment name: 'CHANGE_ID', value: '' }
223
- environment name: 'CHANGE_TARGET', value: 'develop'
224
- }
225
- allOf {
226
- environment name: 'CHANGE_ID', value: ''
227
- anyOf {
228
- allOf {
229
- branch 'develop'
230
- not { changelog '.*^Automated release [0-9\\.]+$' }
231
- }
232
- branch 'master'
233
- }
234
- }
235
- }
236
- }
237
- steps {
238
- script {
239
- def scannerHome = tool 'SonarQubeScanner'
240
- def nodeJS = tool 'NodeJS'
241
- withSonarQubeEnv('Sonarqube') {
242
- sh '''sed -i "s#/app/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
243
- sh '''sed -i "s#src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
244
- // sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
245
- sh '''try=5; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 15; try=\$(( \$try - 1 )); fi; done'''
246
- }
247
- }
248
- }
249
- }
218
+ // stage('Report to SonarQube') {
219
+ // when {
220
+ // anyOf {
221
+ // allOf {
222
+ // not { environment name: 'CHANGE_ID', value: '' }
223
+ // environment name: 'CHANGE_TARGET', value: 'develop'
224
+ // }
225
+ // allOf {
226
+ // environment name: 'CHANGE_ID', value: ''
227
+ // anyOf {
228
+ // allOf {
229
+ // branch 'develop'
230
+ // not { changelog '.*^Automated release [0-9\\.]+$' }
231
+ // }
232
+ // branch 'master'
233
+ // }
234
+ // }
235
+ // }
236
+ // }
237
+ // steps {
238
+ // script {
239
+ // def scannerHome = tool 'SonarQubeScanner'
240
+ // def nodeJS = tool 'NodeJS'
241
+ // withSonarQubeEnv('Sonarqube') {
242
+ // sh '''sed -i "s#/app/src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
243
+ // sh '''sed -i "s#src/addons/${GIT_NAME}/##g" xunit-reports/coverage/lcov.info'''
244
+ // // sh "export PATH=${scannerHome}/bin:${nodeJS}/bin:$PATH; sonar-scanner -Dsonar.javascript.lcov.reportPaths=./xunit-reports/coverage/lcov.info,./cypress-coverage/coverage/lcov.info -Dsonar.sources=./src -Dsonar.projectKey=$GIT_NAME-$BRANCH_NAME -Dsonar.projectVersion=$BRANCH_NAME-$BUILD_NUMBER"
245
+ // sh '''try=5; while [ \$try -gt 0 ]; do curl -s -XPOST -u "${SONAR_AUTH_TOKEN}:" "${SONAR_HOST_URL}api/project_tags/set?project=${GIT_NAME}-${BRANCH_NAME}&tags=${SONARQUBE_TAGS},${BRANCH_NAME}" > set_tags_result; if [ \$(grep -ic error set_tags_result ) -eq 0 ]; then try=0; else cat set_tags_result; echo "... Will retry"; sleep 15; try=\$(( \$try - 1 )); fi; done'''
246
+ // }
247
+ // }
248
+ // }
249
+ // }
250
250
 
251
- stage('SonarQube compare to master') {
252
- when {
253
- anyOf {
254
- allOf {
255
- not { environment name: 'CHANGE_ID', value: '' }
256
- environment name: 'CHANGE_TARGET', value: 'develop'
257
- }
258
- allOf {
259
- environment name: 'CHANGE_ID', value: ''
260
- branch 'develop'
261
- not { changelog '.*^Automated release [0-9\\.]+$' }
262
- }
263
- }
264
- }
265
- steps {
266
- script {
267
- sh '''echo "Error" > checkresult.txt'''
268
- catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
269
- sh '''set -o pipefail; docker run -i --rm --pull always --name="$IMAGE_NAME-gitflow-sn" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" eeacms/gitflow /checkSonarqubemaster.sh | grep -v "Found script" | tee checkresult.txt'''
270
- }
251
+ // stage('SonarQube compare to master') {
252
+ // when {
253
+ // anyOf {
254
+ // allOf {
255
+ // not { environment name: 'CHANGE_ID', value: '' }
256
+ // environment name: 'CHANGE_TARGET', value: 'develop'
257
+ // }
258
+ // allOf {
259
+ // environment name: 'CHANGE_ID', value: ''
260
+ // branch 'develop'
261
+ // not { changelog '.*^Automated release [0-9\\.]+$' }
262
+ // }
263
+ // }
264
+ // }
265
+ // steps {
266
+ // script {
267
+ // sh '''echo "Error" > checkresult.txt'''
268
+ // catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
269
+ // sh '''set -o pipefail; docker run -i --rm --pull always --name="$IMAGE_NAME-gitflow-sn" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" eeacms/gitflow /checkSonarqubemaster.sh | grep -v "Found script" | tee checkresult.txt'''
270
+ // }
271
271
 
272
- publishChecks name: 'SonarQube', title: 'Sonarqube Code Quality Check', summary: 'Quality check on the SonarQube metrics from branch develop, comparing it with the ones from master branch. No bugs are allowed',
273
- text: readFile(file: 'checkresult.txt'), conclusion: "${currentBuild.currentResult}",
274
- detailsURL: "${env.BUILD_URL}display/redirect"
275
- }
276
- }
277
- }
272
+ // publishChecks name: 'SonarQube', title: 'Sonarqube Code Quality Check', summary: 'Quality check on the SonarQube metrics from branch develop, comparing it with the ones from master branch. No bugs are allowed',
273
+ // text: readFile(file: 'checkresult.txt'), conclusion: "${currentBuild.currentResult}",
274
+ // detailsURL: "${env.BUILD_URL}display/redirect"
275
+ // }
276
+ // }
277
+ // }
278
278
 
279
279
  stage('Pull Request') {
280
280
  when {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-clms-theme",
3
- "version": "1.1.101",
3
+ "version": "1.1.103",
4
4
  "description": "volto-clms-theme: Volto theme for CLMS site",
5
5
  "main": "src/index.js",
6
6
  "author": "CodeSyntax for the European Environment Agency",
@@ -1,31 +1,31 @@
1
- import { flattenToAppURL } from '@plone/volto/helpers';
2
- import { Redirect } from 'react-router-dom';
3
- import { useSelector } from 'react-redux';
1
+ // import { flattenToAppURL } from '@plone/volto/helpers';
2
+ // import { Redirect } from 'react-router-dom';
3
+ // import { useSelector } from 'react-redux';
4
4
  import DefaultView from '@plone/volto/components/theme/View/DefaultView';
5
5
 
6
6
  const CLMSDataSetAccordionView = (props) => {
7
- const { content } = props;
8
- const parent_url = content?.parent?.['@id'];
9
- const userSession = useSelector((state) => state.userSession);
10
- const isLoggedIn = userSession?.token;
7
+ // const { content } = props;
8
+ // const parent_url = content?.parent?.['@id'];
9
+ // const userSession = useSelector((state) => state.userSession);
10
+ // const isLoggedIn = userSession?.token;
11
11
 
12
12
  // if (!__SERVER__) {
13
13
  // window.location.href = flattenToAppURL(parent_url);
14
14
  // }
15
15
 
16
- if (isLoggedIn) {
17
- return (
18
- <DefaultView
19
- key={props.content['@id']}
20
- content={props.content}
21
- location={props.location}
22
- token={props.token}
23
- history={props.history}
24
- />
25
- );
26
- } else {
27
- return <Redirect to={flattenToAppURL(parent_url)} />;
28
- }
16
+ // if (isLoggedIn) {
17
+ return (
18
+ <DefaultView
19
+ key={props.content['@id']}
20
+ content={props.content}
21
+ location={props.location}
22
+ token={props.token}
23
+ history={props.history}
24
+ />
25
+ );
26
+ // } else {
27
+ // return <Redirect to={flattenToAppURL(parent_url)} />;
28
+ // }
29
29
  };
30
30
 
31
31
  export default CLMSDataSetAccordionView;
@@ -31,7 +31,7 @@ export const TimeseriesPicker = (props) => {
31
31
  /* Calculate if the difference in days is smaller than the allowed limit */
32
32
  const oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds
33
33
  const diffDays = Math.round(Math.abs((start - end) / oneDay));
34
- return diffDays <= limit;
34
+ return diffDays < limit;
35
35
  };
36
36
 
37
37
  return (
@@ -13,21 +13,22 @@ import {
13
13
  Recurrence,
14
14
  // When,
15
15
  } from '@plone/volto/components/theme/View/EventDatesInfo';
16
- import { When } from '@eeacms/volto-clms-theme/components/CclWhen/CclWhen';
17
-
16
+ import { expandToBackendURL } from '@plone/volto/helpers';
17
+ import calendarSVG from '@plone/volto/icons/calendar.svg';
18
18
  import checkSVG from '@plone/volto/icons/check.svg';
19
19
  import config from '@plone/volto/registry';
20
20
  import CclListingCards from '@eeacms/volto-clms-theme/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingCards';
21
21
  import CclButton from '@eeacms/volto-clms-theme/components/CclButton/CclButton';
22
22
  import { StringToHTML } from '@eeacms/volto-clms-theme/components/CclUtils';
23
+ import { When } from '@eeacms/volto-clms-theme/components/CclWhen/CclWhen';
23
24
 
24
25
  import { postMeetingRegister } from '../../actions';
26
+ import CclCard from '../CclCard/CclCard';
25
27
  import { CLMSRelatedItems } from '../CLMSRelatedItems';
26
28
  import { LightGalleryListing } from './CclLightGallery';
27
29
  import { RegisterButtonReasons } from './utils';
28
30
 
29
31
  import jwtDecode from 'jwt-decode';
30
- import CclCard from '../CclCard/CclCard';
31
32
 
32
33
  export const CLMSMeetingView = (props) => {
33
34
  const { content, intl } = props;
@@ -113,6 +114,10 @@ export const CLMSMeetingView = (props) => {
113
114
  id: 'agreePrivacyPolicyLinkText',
114
115
  defaultMessage: 'privacy policy.',
115
116
  },
117
+ addEventToCalendar: {
118
+ id: 'Add event to calendar',
119
+ defineMessages: 'Add event to calendar',
120
+ },
116
121
  });
117
122
 
118
123
  function createForm() {
@@ -262,7 +267,12 @@ export const CLMSMeetingView = (props) => {
262
267
  (content.allow_register && content.subscribers_link)) && (
263
268
  <Segment.Group compact horizontal>
264
269
  {content.allow_anonymous_registration && (
265
- <Segment padded={'very'} color={'olive'} circular>
270
+ <Segment
271
+ className={'event-segment'}
272
+ padded={'very'}
273
+ color={'olive'}
274
+ circular
275
+ >
266
276
  <strong>
267
277
  <FormattedMessage
268
278
  id="Anonymous registration form"
@@ -305,10 +315,26 @@ export const CLMSMeetingView = (props) => {
305
315
  ></Message>
306
316
  </p>
307
317
  )}
318
+ <div className="download-event">
319
+ <Icon name={calendarSVG} />
320
+ <a
321
+ className="ics-download"
322
+ target="_blank"
323
+ rel="noreferrer"
324
+ href={`${expandToBackendURL(content['@id'])}/ics_view`}
325
+ >
326
+ {intl.formatMessage(messages.addEventToCalendar)}
327
+ </a>
328
+ </div>
308
329
  </Segment>
309
330
  )}
310
331
  {content.allow_register && content.subscribers_link && (
311
- <Segment padded={'very'} color={'olive'} circular>
332
+ <Segment
333
+ className={'event-segment'}
334
+ padded={'very'}
335
+ color={'olive'}
336
+ circular
337
+ >
312
338
  <strong>
313
339
  <FormattedMessage
314
340
  id="Meeting register information"
@@ -335,12 +361,24 @@ export const CLMSMeetingView = (props) => {
335
361
  defaultMessage="Mail archive"
336
362
  />
337
363
  </CclButton>
364
+ <div className="download-event">
365
+ <Icon name={calendarSVG} />
366
+ <a
367
+ className="ics-download"
368
+ target="_blank"
369
+ rel="noreferrer"
370
+ href={`${expandToBackendURL(content['@id'])}/ics_view`}
371
+ >
372
+ {intl.formatMessage(messages.addEventToCalendar)}
373
+ </a>
374
+ </div>
338
375
  </Segment>
339
376
  )}
340
377
  </Segment.Group>
341
378
  )}
342
379
  {content.description}
343
380
  <Segment
381
+ className={'event-segment'}
344
382
  compact
345
383
  padded={'small'}
346
384
  color={'olive'}
@@ -355,7 +393,7 @@ export const CLMSMeetingView = (props) => {
355
393
  {content.whole_day ? (
356
394
  <When
357
395
  start={content.start}
358
- end={content.start}
396
+ end={content.end}
359
397
  whole_day={content.whole_day}
360
398
  br_in_timezone={true}
361
399
  />
@@ -476,6 +514,17 @@ export const CLMSMeetingView = (props) => {
476
514
  </div>
477
515
  </div>
478
516
  )}
517
+ <div className="download-event">
518
+ <Icon name={calendarSVG} />
519
+ <a
520
+ className="ics-download"
521
+ target="_blank"
522
+ rel="noreferrer"
523
+ href={`${expandToBackendURL(content['@id'])}/ics_view`}
524
+ >
525
+ {intl.formatMessage(messages.addEventToCalendar)}
526
+ </a>
527
+ </div>
479
528
  </Segment>
480
529
  <Segment basic>
481
530
  {content?.image && (
@@ -42,3 +42,12 @@ body {
42
42
  justify-content: center;
43
43
  }
44
44
  }
45
+
46
+ .event-segment {
47
+ max-width: 444px;
48
+ }
49
+
50
+ .download-event {
51
+ display: flex;
52
+ align-items: center;
53
+ }