Skip to content

Commit

Permalink
EWPP-3721: CircaBC integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
upchuk committed Dec 13, 2023
1 parent 1f645be commit ba0b088
Show file tree
Hide file tree
Showing 37 changed files with 2,554 additions and 55 deletions.
6 changes: 2 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ pipeline:

matrix:
include:
- CORE_VERSION: 9.4.0
PHP_VERSION: 8.0
- CORE_VERSION: 9.4.0
PHP_VERSION: 8.1
- CORE_VERSION: 10.0
PHP_VERSION: 8.1
- CORE_VERSION: 10.1
PHP_VERSION: 8.1
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"psr-4": {
"Drupal\\Tests\\oe_media\\": "./tests/src",
"Drupal\\Tests\\oe_media_embed\\": "./modules/oe_media_embed/tests/src",
"Drupal\\Tests\\oe_media_circabc\\": "./modules/oe_media_circabc/tests/src",
"Drupal\\Tests\\oe_link_lists\\": "./build/modules/contrib/oe_link_lists/tests/src",
"Drupal\\Tests\\oe_link_lists_manual_source\\": "./build/modules/contrib/oe_link_lists/modules/oe_link_lists_manual_source/tests/src"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bundle: document
mode: default
content:
oe_media_file_type:
weight: 1
weight: 0
settings: { }
third_party_settings: { }
type: options_select
Expand All @@ -30,7 +30,7 @@ content:
region: content
name:
type: string_textfield
weight: 0
weight: 1
region: content
settings:
size: 60
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ services:
image: selenium/standalone-chrome-debug:3.141.59-oxygen
environment:
- DISPLAY=:99
- SE_OPTS=-debug
- SCREEN_WIDTH=1280
- SCREEN_HEIGHT=800
- VNC_NO_PASSWORD=1
Expand Down
18 changes: 18 additions & 0 deletions modules/oe_media_circabc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Open Europa Media CircaBC

This module integrates with CircaBC to create Document media based on CircaBC
documents. It does so by adding a third option to the Document media file type field, next to Local and Remote.

## Installation

* Install the module
* Add the settings configuration that contains the URL of the CircaBC instance. For example:

```
$settings['circabc'] = [
'url' => 'https://webgate.acceptance.ec.europa.eu/circabc-ewpp',
];
```

* Add the CircaBC ID field to the Document media form display. It will not be visible, but it's required on the form.
* Move the `File type` field to the top on the Document media form display.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
langcode: en
status: true
dependencies:
config:
- field.storage.media.oe_media_circabc_reference
- media.type.document
module:
- oe_media_circabc
id: media.document.oe_media_circabc_reference
field_name: oe_media_circabc_reference
entity_type: media
bundle: document
label: 'CircaBC Reference'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: oe_media_circabc_circabc_reference
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
langcode: en
status: true
dependencies:
module:
- media
- oe_media_circabc
id: media.oe_media_circabc_reference
field_name: oe_media_circabc_reference
entity_type: media
type: oe_media_circabc_circabc_reference
settings: { }
module: oe_media_circabc
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
19 changes: 19 additions & 0 deletions modules/oe_media_circabc/config/schema/oe_media_circabc.schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
field.value.oe_media_circabc_circabc_reference:
type: mapping
label: Default value
mapping:
uuid:
type: uuid
label: UUID
size:
type: integer
label: Size
mime:
type: string
label: Mime type
filename:
type: string
label: File name

field.widget.settings.oe_media_circabc_default_widget:
type: field.widget.settings.string_textfield
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"id": "5d634abd-fec1-452a-ae0b-62e4cf080506",
"name": "sample_pdf_FR.pdf",
"type": "{http://www.alfresco.org/model/content/1.0}content",
"service": "library",
"parentId": "de048a2c-b350-45eb-a8aa-c5e5d4ba8335",
"properties": {
"modifier": "test_user",
"initialVersion": "true",
"expiration_date": "",
"title": "",
"locale": "fr",
"content": "contentUrl=store://2023/10/25/7/55/8424044c-2e13-454c-b6bf-9eeb4a921511.bin|mimetype=null|size=3028|encoding=UTF-8|locale=en_GB_|id=3759",
"reference": "",
"issue_date": "2023-12-06T19:04Z",
"security_ranking": "NORMAL",
"translations": "2",
"modified": "2023-12-07T08:50Z",
"locked": "false",
"store-identifier": "SpacesStore",
"multilingual": "true",
"creator": "test_user",
"autoVersion": "true",
"node-uuid": "5d634abd-fec1-452a-ae0b-62e4cf080506",
"created": "2023-10-25T05:55Z",
"author": "",
"autoVersionOnUpdateProps": "false",
"isVersion": "false",
"workingCopy": "false",
"encoding": "UTF-8",
"store-protocol": "workspace",
"currentUserHasAccess": "true",
"versionLabel": "1.5",
"originalContainerId": "de048a2c-b350-45eb-a8aa-c5e5d4ba8335",
"size": "3028",
"name": "sample_pdf_FR.pdf",
"mimetype": "application/pdf",
"mimetypeName": "",
"status": "DRAFT",
"node-dbid": "4641"
},
"title": {
"de": "",
"fi": "",
"pt": "",
"bg": "",
"lt": "",
"lv": "",
"hr": "",
"fr": "Test sample file FR",
"hu": "",
"sk": "",
"sl": "",
"ga": "",
"sv": "",
"mt": "",
"el": "",
"en": "",
"it": "",
"es": "",
"et": "",
"cs": "",
"pl": "",
"da": "",
"ro": "",
"nl": ""
},
"description": {},
"permissions": {
"LibAccess": "ALLOWED"
},
"notifications": "inherit",
"favourite": false,
"hasSubFolders": false,
"hasGuestAccess": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"id": "e74e3bc0-a639-4e04-a839-3bbd60ed5688",
"name": "sample_pdf.pdf",
"type": "{http://www.alfresco.org/model/content/1.0}content",
"service": "library",
"parentId": "de048a2c-b350-45eb-a8aa-c5e5d4ba8335",
"properties": {
"modifier": "test_user",
"initialVersion": "true",
"title": "",
"locale": "en",
"content": "contentUrl=store://2023/10/25/7/55/b8524c7c-3dea-4a62-a038-69f0ebf6c39b.bin|mimetype=application/pdf|size=3028|encoding=UTF-8|locale=en_GB_|id=2895",
"security_ranking": "PUBLIC",
"translations": "2",
"modified": "2023-10-25T05:55Z",
"keyword": "[]",
"locked": "false",
"store-identifier": "SpacesStore",
"multilingual": "true",
"owner": "test_user",
"creator": "test_user",
"autoVersion": "true",
"node-uuid": "e74e3bc0-a639-4e04-a839-3bbd60ed5688",
"created": "2023-10-25T05:55Z",
"author": "",
"autoVersionOnUpdateProps": "false",
"isVersion": "false",
"workingCopy": "false",
"encoding": "UTF-8",
"store-protocol": "workspace",
"currentUserHasAccess": "true",
"versionLabel": "1.0",
"originalContainerId": "de048a2c-b350-45eb-a8aa-c5e5d4ba8335",
"size": "3028",
"name": "sample_pdf.pdf",
"mimetype": "application/pdf",
"mimetypeName": "Adobe PDF Document",
"status": "FINAL",
"node-dbid": "4630"
},
"title": {
"de": "",
"fi": "",
"pt": "",
"bg": "",
"lt": "",
"lv": "",
"hr": "",
"fr": "",
"hu": "",
"sk": "",
"sl": "",
"ga": "",
"sv": "",
"mt": "",
"el": "",
"en": "Test sample file",
"it": "",
"es": "",
"et": "",
"cs": "",
"pl": "",
"da": "",
"ro": "",
"nl": ""
},
"description": {},
"permissions": {
"LibAccess": "ALLOWED"
},
"notifications": "inherit",
"favourite": false,
"hasSubFolders": false,
"hasGuestAccess": true
}
Loading

0 comments on commit ba0b088

Please sign in to comment.