Popravi cas revizije pri novem predlogu, popravki view zadnje spremembe,
moderation info formpull/60/head
parent
5c6ad30005
commit
f87710cecf
|
@ -73,3 +73,11 @@ V modulu [yufu_concept](web/modules/custom/yufu_concept/yufu_concept.info.yml "y
|
||||||
- ob novi publishani revizijami se poslje mail uporabniku, ki jo je naredil.
|
- ob novi publishani revizijami se poslje mail uporabniku, ki jo je naredil.
|
||||||
|
|
||||||
Funkcionalnost se nahaja v yufu_admin modulu.
|
Funkcionalnost se nahaja v yufu_admin modulu.
|
||||||
|
|
||||||
|
# Debugging
|
||||||
|
|
||||||
|
Razvojne kontejnerja lahko zlistamo z ukazom `ddev status`
|
||||||
|
|
||||||
|
## Mejli
|
||||||
|
|
||||||
|
Mailhog za debagiranje vklopimo, kot priporoči zgornji ukaz: `ddev launch -m`
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
"drupal/cer": "^5.0@beta",
|
"drupal/cer": "^5.0@beta",
|
||||||
"drupal/config_ignore": "^3.1",
|
"drupal/config_ignore": "^3.1",
|
||||||
"drupal/content_as_config": "^1.0",
|
"drupal/content_as_config": "^1.0",
|
||||||
|
"drupal/content_moderation_info_block": "^2.0@beta",
|
||||||
"drupal/content_moderation_notifications": "^3.6",
|
"drupal/content_moderation_notifications": "^3.6",
|
||||||
"drupal/core-composer-scaffold": "^10.0",
|
"drupal/core-composer-scaffold": "^10.0",
|
||||||
"drupal/core-project-message": "^10.0",
|
"drupal/core-project-message": "^10.0",
|
||||||
|
@ -55,6 +56,9 @@
|
||||||
"patches": {
|
"patches": {
|
||||||
"drupal/restui": {
|
"drupal/restui": {
|
||||||
"#3337894: Get class methods wrong argument.": "https://www.drupal.org/files/issues/2023-06-23/type-error-class-3337894-10.patch"
|
"#3337894: Get class methods wrong argument.": "https://www.drupal.org/files/issues/2023-06-23/type-error-class-3337894-10.patch"
|
||||||
|
},
|
||||||
|
"drupal/content_moderation_info_block": {
|
||||||
|
"#3185894: State Form Error": "https://www.drupal.org/files/issues/2023-10-11/3185894-state-form-error-12.patch"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"drupal-scaffold": {
|
"drupal-scaffold": {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "6fdae41d9930b076d636c871454e056b",
|
"content-hash": "6467965d60acc01165ed81a57e9cf9e9",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "asm89/stack-cors",
|
"name": "asm89/stack-cors",
|
||||||
|
@ -1726,6 +1726,50 @@
|
||||||
"issues": "https://www.drupal.org/project/issues/content_as_config"
|
"issues": "https://www.drupal.org/project/issues/content_as_config"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "drupal/content_moderation_info_block",
|
||||||
|
"version": "2.0.0-beta1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.drupalcode.org/project/content_moderation_info_block.git",
|
||||||
|
"reference": "2.0.0-beta1"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://ftp.drupal.org/files/projects/content_moderation_info_block-2.0.0-beta1.zip",
|
||||||
|
"reference": "2.0.0-beta1",
|
||||||
|
"shasum": "ffa5c2bf822414fe5c2287f49b1014861d6effc4"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"drupal/core": "^9 || ^10"
|
||||||
|
},
|
||||||
|
"type": "drupal-module",
|
||||||
|
"extra": {
|
||||||
|
"drupal": {
|
||||||
|
"version": "2.0.0-beta1",
|
||||||
|
"datestamp": "1695972016",
|
||||||
|
"security-coverage": {
|
||||||
|
"status": "not-covered",
|
||||||
|
"message": "Project has not opted into security advisory coverage!"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packages.drupal.org/8/downloads",
|
||||||
|
"license": [
|
||||||
|
"GPL-2.0-or-later"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "rp7",
|
||||||
|
"homepage": "https://www.drupal.org/user/219330"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Provides a block that displays content moderation related info.",
|
||||||
|
"homepage": "https://www.drupal.org/project/content_moderation_info_block",
|
||||||
|
"support": {
|
||||||
|
"source": "https://git.drupalcode.org/project/content_moderation_info_block"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "drupal/content_moderation_notifications",
|
"name": "drupal/content_moderation_notifications",
|
||||||
"version": "3.6.0",
|
"version": "3.6.0",
|
||||||
|
@ -7486,6 +7530,7 @@
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"stability-flags": {
|
"stability-flags": {
|
||||||
"drupal/cer": 10,
|
"drupal/cer": 10,
|
||||||
|
"drupal/content_moderation_info_block": 10,
|
||||||
"drupal/gin": 5,
|
"drupal/gin": 5,
|
||||||
"drupal/gin_toolbar": 5,
|
"drupal/gin_toolbar": 5,
|
||||||
"drupal/yaml_content": 20
|
"drupal/yaml_content": 20
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
uuid: 882a1fb8-dba5-4370-b1c4-fb8b5d46db4c
|
||||||
|
langcode: en
|
||||||
|
status: true
|
||||||
|
dependencies:
|
||||||
|
module:
|
||||||
|
- content_moderation_info_block
|
||||||
|
theme:
|
||||||
|
- olivero
|
||||||
|
id: olivero_moderationinfocontent
|
||||||
|
theme: olivero
|
||||||
|
region: content
|
||||||
|
weight: 0
|
||||||
|
provider: null
|
||||||
|
plugin: 'content_moderation_info_block:node'
|
||||||
|
settings:
|
||||||
|
id: 'content_moderation_info_block:node'
|
||||||
|
label: 'Moderation info (Content)'
|
||||||
|
label_display: visible
|
||||||
|
provider: content_moderation_info_block
|
||||||
|
context_mapping:
|
||||||
|
entity: '@node.node_route_context:node'
|
||||||
|
changed_date_display: true
|
||||||
|
author_display: true
|
||||||
|
latest_revision_display: true
|
||||||
|
current_state_display: true
|
||||||
|
change_state_display: true
|
||||||
|
revision_log_message_input_display: false
|
||||||
|
visibility: { }
|
|
@ -11,7 +11,7 @@ roles:
|
||||||
author: true
|
author: true
|
||||||
site_mail: false
|
site_mail: false
|
||||||
emails: ''
|
emails: ''
|
||||||
subject: '[YUFU] Changes approved'
|
subject: '[YUFU] Changes approved: [node:title]'
|
||||||
body:
|
body:
|
||||||
value: 'Proposed changes to [node:title] ([node:url]) by [node:author:mail] were approved.'
|
value: 'Proposed changes to [node:title] ([node:url]) by [node:author:mail] were approved.'
|
||||||
format: plain_text
|
format: plain_text
|
||||||
|
|
|
@ -14,6 +14,7 @@ module:
|
||||||
config_translation: 0
|
config_translation: 0
|
||||||
content_as_config: 0
|
content_as_config: 0
|
||||||
content_moderation: 0
|
content_moderation: 0
|
||||||
|
content_moderation_info_block: 0
|
||||||
content_moderation_notifications: 0
|
content_moderation_notifications: 0
|
||||||
contextual: 0
|
contextual: 0
|
||||||
datetime: 0
|
datetime: 0
|
||||||
|
|
|
@ -24,17 +24,17 @@ display:
|
||||||
display_options:
|
display_options:
|
||||||
title: 'Zadnje spremembe'
|
title: 'Zadnje spremembe'
|
||||||
fields:
|
fields:
|
||||||
changed:
|
title:
|
||||||
id: changed
|
id: title
|
||||||
table: node_field_revision
|
table: node_field_revision
|
||||||
field: changed
|
field: title
|
||||||
relationship: none
|
relationship: none
|
||||||
group_type: group
|
group_type: group
|
||||||
admin_label: ''
|
admin_label: ''
|
||||||
entity_type: node
|
entity_type: node
|
||||||
entity_field: changed
|
entity_field: title
|
||||||
plugin_id: field
|
plugin_id: field
|
||||||
label: Čas
|
label: Pojem
|
||||||
exclude: false
|
exclude: false
|
||||||
alter:
|
alter:
|
||||||
alter_text: false
|
alter_text: false
|
||||||
|
@ -76,21 +76,9 @@ display:
|
||||||
empty_zero: false
|
empty_zero: false
|
||||||
hide_alter_empty: true
|
hide_alter_empty: true
|
||||||
click_sort_column: value
|
click_sort_column: value
|
||||||
type: timestamp
|
type: string
|
||||||
settings:
|
settings:
|
||||||
date_format: medium
|
link_to_entity: true
|
||||||
custom_date_format: ''
|
|
||||||
timezone: ''
|
|
||||||
tooltip:
|
|
||||||
date_format: ''
|
|
||||||
custom_date_format: ''
|
|
||||||
time_diff:
|
|
||||||
enabled: false
|
|
||||||
future_format: '@interval hence'
|
|
||||||
past_format: '@interval ago'
|
|
||||||
granularity: 2
|
|
||||||
refresh: 60
|
|
||||||
description: ''
|
|
||||||
group_column: value
|
group_column: value
|
||||||
group_columns: { }
|
group_columns: { }
|
||||||
group_rows: true
|
group_rows: true
|
||||||
|
@ -164,71 +152,6 @@ display:
|
||||||
multi_type: separator
|
multi_type: separator
|
||||||
separator: ', '
|
separator: ', '
|
||||||
field_api_classes: false
|
field_api_classes: false
|
||||||
title:
|
|
||||||
id: title
|
|
||||||
table: node_field_revision
|
|
||||||
field: title
|
|
||||||
relationship: none
|
|
||||||
group_type: group
|
|
||||||
admin_label: ''
|
|
||||||
entity_type: node
|
|
||||||
entity_field: title
|
|
||||||
plugin_id: field
|
|
||||||
label: Pojem
|
|
||||||
exclude: false
|
|
||||||
alter:
|
|
||||||
alter_text: false
|
|
||||||
text: ''
|
|
||||||
make_link: false
|
|
||||||
path: ''
|
|
||||||
absolute: false
|
|
||||||
external: false
|
|
||||||
replace_spaces: false
|
|
||||||
path_case: none
|
|
||||||
trim_whitespace: false
|
|
||||||
alt: ''
|
|
||||||
rel: ''
|
|
||||||
link_class: ''
|
|
||||||
prefix: ''
|
|
||||||
suffix: ''
|
|
||||||
target: ''
|
|
||||||
nl2br: false
|
|
||||||
max_length: 0
|
|
||||||
word_boundary: false
|
|
||||||
ellipsis: false
|
|
||||||
more_link: false
|
|
||||||
more_link_text: ''
|
|
||||||
more_link_path: ''
|
|
||||||
strip_tags: false
|
|
||||||
trim: false
|
|
||||||
preserve_tags: ''
|
|
||||||
html: false
|
|
||||||
element_type: ''
|
|
||||||
element_class: ''
|
|
||||||
element_label_type: ''
|
|
||||||
element_label_class: ''
|
|
||||||
element_label_colon: true
|
|
||||||
element_wrapper_type: ''
|
|
||||||
element_wrapper_class: ''
|
|
||||||
element_default_classes: true
|
|
||||||
empty: ''
|
|
||||||
hide_empty: false
|
|
||||||
empty_zero: false
|
|
||||||
hide_alter_empty: true
|
|
||||||
click_sort_column: value
|
|
||||||
type: string
|
|
||||||
settings:
|
|
||||||
link_to_entity: false
|
|
||||||
group_column: value
|
|
||||||
group_columns: { }
|
|
||||||
group_rows: true
|
|
||||||
delta_limit: 0
|
|
||||||
delta_offset: 0
|
|
||||||
delta_reversed: false
|
|
||||||
delta_first_last: false
|
|
||||||
multi_type: separator
|
|
||||||
separator: ', '
|
|
||||||
field_api_classes: false
|
|
||||||
revision_uid:
|
revision_uid:
|
||||||
id: revision_uid
|
id: revision_uid
|
||||||
table: node_revision
|
table: node_revision
|
||||||
|
@ -294,6 +217,215 @@ display:
|
||||||
multi_type: separator
|
multi_type: separator
|
||||||
separator: ', '
|
separator: ', '
|
||||||
field_api_classes: false
|
field_api_classes: false
|
||||||
|
revision_timestamp:
|
||||||
|
id: revision_timestamp
|
||||||
|
table: node_revision
|
||||||
|
field: revision_timestamp
|
||||||
|
relationship: none
|
||||||
|
group_type: group
|
||||||
|
admin_label: ''
|
||||||
|
entity_type: node
|
||||||
|
entity_field: revision_timestamp
|
||||||
|
plugin_id: field
|
||||||
|
label: 'Revision create time'
|
||||||
|
exclude: false
|
||||||
|
alter:
|
||||||
|
alter_text: false
|
||||||
|
text: ''
|
||||||
|
make_link: false
|
||||||
|
path: ''
|
||||||
|
absolute: false
|
||||||
|
external: false
|
||||||
|
replace_spaces: false
|
||||||
|
path_case: none
|
||||||
|
trim_whitespace: false
|
||||||
|
alt: ''
|
||||||
|
rel: ''
|
||||||
|
link_class: ''
|
||||||
|
prefix: ''
|
||||||
|
suffix: ''
|
||||||
|
target: ''
|
||||||
|
nl2br: false
|
||||||
|
max_length: 0
|
||||||
|
word_boundary: true
|
||||||
|
ellipsis: true
|
||||||
|
more_link: false
|
||||||
|
more_link_text: ''
|
||||||
|
more_link_path: ''
|
||||||
|
strip_tags: false
|
||||||
|
trim: false
|
||||||
|
preserve_tags: ''
|
||||||
|
html: false
|
||||||
|
element_type: ''
|
||||||
|
element_class: ''
|
||||||
|
element_label_type: ''
|
||||||
|
element_label_class: ''
|
||||||
|
element_label_colon: true
|
||||||
|
element_wrapper_type: ''
|
||||||
|
element_wrapper_class: ''
|
||||||
|
element_default_classes: true
|
||||||
|
empty: ''
|
||||||
|
hide_empty: false
|
||||||
|
empty_zero: false
|
||||||
|
hide_alter_empty: true
|
||||||
|
click_sort_column: value
|
||||||
|
type: timestamp
|
||||||
|
settings:
|
||||||
|
date_format: short
|
||||||
|
custom_date_format: ''
|
||||||
|
timezone: ''
|
||||||
|
tooltip:
|
||||||
|
date_format: long
|
||||||
|
custom_date_format: ''
|
||||||
|
time_diff:
|
||||||
|
enabled: false
|
||||||
|
future_format: '@interval hence'
|
||||||
|
past_format: '@interval ago'
|
||||||
|
granularity: 2
|
||||||
|
refresh: 60
|
||||||
|
description: ''
|
||||||
|
group_column: value
|
||||||
|
group_columns: { }
|
||||||
|
group_rows: true
|
||||||
|
delta_limit: 0
|
||||||
|
delta_offset: 0
|
||||||
|
delta_reversed: false
|
||||||
|
delta_first_last: false
|
||||||
|
multi_type: separator
|
||||||
|
separator: ', '
|
||||||
|
field_api_classes: false
|
||||||
|
vid_1:
|
||||||
|
id: vid_1
|
||||||
|
table: node_field_revision
|
||||||
|
field: vid
|
||||||
|
relationship: none
|
||||||
|
group_type: group
|
||||||
|
admin_label: ''
|
||||||
|
entity_type: node
|
||||||
|
entity_field: vid
|
||||||
|
plugin_id: field
|
||||||
|
label: rID
|
||||||
|
exclude: false
|
||||||
|
alter:
|
||||||
|
alter_text: false
|
||||||
|
text: ''
|
||||||
|
make_link: false
|
||||||
|
path: ''
|
||||||
|
absolute: false
|
||||||
|
external: false
|
||||||
|
replace_spaces: false
|
||||||
|
path_case: none
|
||||||
|
trim_whitespace: false
|
||||||
|
alt: ''
|
||||||
|
rel: ''
|
||||||
|
link_class: ''
|
||||||
|
prefix: ''
|
||||||
|
suffix: ''
|
||||||
|
target: ''
|
||||||
|
nl2br: false
|
||||||
|
max_length: 0
|
||||||
|
word_boundary: true
|
||||||
|
ellipsis: true
|
||||||
|
more_link: false
|
||||||
|
more_link_text: ''
|
||||||
|
more_link_path: ''
|
||||||
|
strip_tags: false
|
||||||
|
trim: false
|
||||||
|
preserve_tags: ''
|
||||||
|
html: false
|
||||||
|
element_type: ''
|
||||||
|
element_class: ''
|
||||||
|
element_label_type: ''
|
||||||
|
element_label_class: ''
|
||||||
|
element_label_colon: true
|
||||||
|
element_wrapper_type: ''
|
||||||
|
element_wrapper_class: ''
|
||||||
|
element_default_classes: true
|
||||||
|
empty: ''
|
||||||
|
hide_empty: false
|
||||||
|
empty_zero: false
|
||||||
|
hide_alter_empty: true
|
||||||
|
click_sort_column: value
|
||||||
|
type: number_integer
|
||||||
|
settings:
|
||||||
|
thousand_separator: ''
|
||||||
|
prefix_suffix: true
|
||||||
|
group_column: value
|
||||||
|
group_columns: { }
|
||||||
|
group_rows: true
|
||||||
|
delta_limit: 0
|
||||||
|
delta_offset: 0
|
||||||
|
delta_reversed: false
|
||||||
|
delta_first_last: false
|
||||||
|
multi_type: separator
|
||||||
|
separator: ', '
|
||||||
|
field_api_classes: false
|
||||||
|
nid:
|
||||||
|
id: nid
|
||||||
|
table: node_field_revision
|
||||||
|
field: nid
|
||||||
|
relationship: none
|
||||||
|
group_type: group
|
||||||
|
admin_label: ''
|
||||||
|
entity_type: node
|
||||||
|
entity_field: nid
|
||||||
|
plugin_id: field
|
||||||
|
label: nID
|
||||||
|
exclude: false
|
||||||
|
alter:
|
||||||
|
alter_text: false
|
||||||
|
text: ''
|
||||||
|
make_link: false
|
||||||
|
path: ''
|
||||||
|
absolute: false
|
||||||
|
external: false
|
||||||
|
replace_spaces: false
|
||||||
|
path_case: none
|
||||||
|
trim_whitespace: false
|
||||||
|
alt: ''
|
||||||
|
rel: ''
|
||||||
|
link_class: ''
|
||||||
|
prefix: ''
|
||||||
|
suffix: ''
|
||||||
|
target: ''
|
||||||
|
nl2br: false
|
||||||
|
max_length: 0
|
||||||
|
word_boundary: true
|
||||||
|
ellipsis: true
|
||||||
|
more_link: false
|
||||||
|
more_link_text: ''
|
||||||
|
more_link_path: ''
|
||||||
|
strip_tags: false
|
||||||
|
trim: false
|
||||||
|
preserve_tags: ''
|
||||||
|
html: false
|
||||||
|
element_type: ''
|
||||||
|
element_class: ''
|
||||||
|
element_label_type: ''
|
||||||
|
element_label_class: ''
|
||||||
|
element_label_colon: true
|
||||||
|
element_wrapper_type: ''
|
||||||
|
element_wrapper_class: ''
|
||||||
|
element_default_classes: true
|
||||||
|
empty: ''
|
||||||
|
hide_empty: false
|
||||||
|
empty_zero: false
|
||||||
|
hide_alter_empty: true
|
||||||
|
click_sort_column: value
|
||||||
|
type: number_integer
|
||||||
|
settings:
|
||||||
|
thousand_separator: ''
|
||||||
|
prefix_suffix: true
|
||||||
|
group_column: value
|
||||||
|
group_columns: { }
|
||||||
|
group_rows: true
|
||||||
|
delta_limit: 0
|
||||||
|
delta_offset: 0
|
||||||
|
delta_reversed: false
|
||||||
|
delta_first_last: false
|
||||||
|
multi_type: separator
|
||||||
|
separator: ', '
|
||||||
|
field_api_classes: false
|
||||||
pager:
|
pager:
|
||||||
type: mini
|
type: mini
|
||||||
options:
|
options:
|
||||||
|
@ -331,15 +463,15 @@ display:
|
||||||
options: { }
|
options: { }
|
||||||
empty: { }
|
empty: { }
|
||||||
sorts:
|
sorts:
|
||||||
changed:
|
revision_timestamp:
|
||||||
id: changed
|
id: revision_timestamp
|
||||||
table: node_field_revision
|
table: node_revision
|
||||||
field: changed
|
field: revision_timestamp
|
||||||
relationship: none
|
relationship: none
|
||||||
group_type: group
|
group_type: group
|
||||||
admin_label: ''
|
admin_label: ''
|
||||||
entity_type: node
|
entity_type: node
|
||||||
entity_field: changed
|
entity_field: revision_timestamp
|
||||||
plugin_id: date
|
plugin_id: date
|
||||||
order: DESC
|
order: DESC
|
||||||
expose:
|
expose:
|
||||||
|
|
|
@ -121,6 +121,7 @@ class AddConcept extends ResourceBase {
|
||||||
// Concept exists - create a new revision.
|
// Concept exists - create a new revision.
|
||||||
$concept->setNewRevision(TRUE);
|
$concept->setNewRevision(TRUE);
|
||||||
$concept->setRevisionUserId($uid);
|
$concept->setRevisionUserId($uid);
|
||||||
|
$concept->setRevisionCreationTime(\Drupal::time()->getRequestTime());
|
||||||
$concept->set('title', $data['title']);
|
$concept->set('title', $data['title']);
|
||||||
$concept->set('body', $data['text'] ?? $concept->body->value);
|
$concept->set('body', $data['text'] ?? $concept->body->value);
|
||||||
if ($uid) {
|
if ($uid) {
|
||||||
|
|
Loading…
Reference in New Issue