Skip to content

Commit

Permalink
Merge pull request #228 from UN-OCHA/release-versions/v3.5.2
Browse files Browse the repository at this point in the history
release versions/v3.5.2
  • Loading branch information
berliner authored Jun 25, 2024
2 parents f5a7890 + 836a013 commit c073f80
Show file tree
Hide file tree
Showing 7 changed files with 403 additions and 357 deletions.
682 changes: 346 additions & 336 deletions composer.lock

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions composer.patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
"drupal/csp": {
"Simplify log format": "./patches/csp-log-format.patch"
},
"drupal/diff": {
"Issue #3183380: Add 'compare revisions' button on top for long form.": "https://www.drupal.org/files/issues/2024-04-25/3183380-add-compare-revisions-8.x-1.3.patch"
},
"drupal/entity_browser": {
"Issue #3056057: Position the main form actions to the bottom of IFrame": "https://www.drupal.org/files/issues/2019-05-23/position-main-form-actins-on-bottom-3056057-10.patch"
},
Expand All @@ -23,13 +20,6 @@
"drupal/entity_reference_revisions": {
"Issue #2799479: Views doesn't recognize relationship to host": "https://www.drupal.org/files/issues/2022-06-01/entity_reference_revisions-relationship_host_id-2799479-176.patch"
},
"drupal/gin": {
"Issue #3342513: Ajax behaviour on entity edit form action buttons can break": "https://www.drupal.org/files/issues/2024-02-02/3342513-entity-edit-form-update-ajax-ids-12.patch"
},
"drupal/layout_paragraphs": {
"Issue #3265794: Modal form actions broken if subform has validation errors or certain AJAX callbacks": "https://git.drupalcode.org/project/layout_paragraphs/-/commit/9e6ce29756e7a44d1644f77a9606d3b598f67b5d.patch",
"Issue #3442062: Make selector less greedy, only look at the form actions": "https://git.drupalcode.org/project/layout_paragraphs/-/merge_requests/160.patch"
},
"drupal/paragraphs_viewmode": {
"Issue #3345123: entityViewModeAlter throws an exception in php 8.2": "https://www.drupal.org/files/issues/2023-03-01/paragraphs_viewmode-remove-context-parameter-3345123-2.patch"
},
Expand Down
12 changes: 10 additions & 2 deletions html/modules/custom/ncms_ui/css/ncms_gin.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ table {
background-color: white;
}

[dir="ltr"] .gin-layer-wrapper:has(> .gin--sticky-table-header)::before,
[dir="ltr"] .gin-layer-wrapper:has(> .gin--sticky-table-header)::after {
background: none !important;
}

/* Improvements for the ui dialog (modal). */
.ui-dialog.lpb-dialog {
width: auto !important;
Expand All @@ -135,6 +140,9 @@ table {
}

/* Improvements for the horizontal form tabs. */
.horizontal-tabs ul.horizontal-tabs-list li.horizontal-tab-button a {
.ui-dialog .horizontal-tabs ul.horizontal-tabs-list li.horizontal-tab-button a {
padding: var(--gin-spacing-m) !important;
}
}
.ui-dialog .horizontal-tabs ul.horizontal-tabs-list li.horizontal-tab-button a:focus {
box-shadow: none;
}
4 changes: 4 additions & 0 deletions html/modules/custom/ncms_ui/src/Form/ContentBaseFormAlter.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public function alterForm(&$form, FormStateInterface $form_state) {
'@type' => strtolower($entity->type->entity->label()),
]),
],
'#gin_action_item' => TRUE,
'#submit' => [],
];
break;
Expand All @@ -172,6 +173,7 @@ public function alterForm(&$form, FormStateInterface $form_state) {
'#ajax' => $ajax_confirm + [
'confirm_question' => $this->t('This will publish these changes as a correction to the currently published version, which will be entirely replaced. Are you sure?'),
],
'#gin_action_item' => TRUE,
'#submit' => [],
];
$form['actions']['publish_revision'] = [
Expand All @@ -181,6 +183,7 @@ public function alterForm(&$form, FormStateInterface $form_state) {
'#ajax' => $ajax_confirm + [
'confirm_question' => $this->t('This will publish these changes as a new revision to the currently published version, which will remain publicly available as an earlier or original version. Are you sure?'),
],
'#gin_action_item' => TRUE,
'#submit' => [],
];
break;
Expand All @@ -191,6 +194,7 @@ public function alterForm(&$form, FormStateInterface $form_state) {
'#name' => 'save_draft',
'#value' => $this->t('Save as draft'),
'#ajax' => $ajax_confirm,
'#gin_action_item' => TRUE,
'#submit' => [],
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,20 @@ public function query() {
* {@inheritdoc}
*/
public function render(ResultRow $row) {
$build = $row->_entity instanceof ContentInterface ? $row->_entity->getContentStatusLabel() : NULL;
if (!$row->_entity instanceof ContentInterface) {
return NULL;
}
$build = [
'#type' => 'html_tag',
'#tag' => 'span',
'#value' => $row->_entity->getContentStatusLabel(),
'#attributes' => [
'class' => array_filter([
'marker',
$row->_entity->isPublished() ? 'marker--published' : NULL,
]),
],
];
return $build;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,20 @@ public function render(ResultRow $row) {
'node' => $revision->id(),
'node_revision' => $revision->getRevisionId(),
]),
'#title' => new FormattableMarkup('#@version (@moderation_status)', [
'@version' => $revision instanceof ContentVersionInterface ? $revision->getVersionId() : $revision->getRevisionId(),
'@moderation_status' => $revision instanceof ContentVersionInterface ? $revision->getVersionStatusLabel() : ($revision->isPublished() ? $this->t('Published') : $this->t('Unpublished')),
]),
'#title' => [
'#type' => 'html_tag',
'#tag' => 'span',
'#value' => new FormattableMarkup('#@version (@moderation_status)', [
'@version' => $revision instanceof ContentVersionInterface ? $revision->getVersionId() : $revision->getRevisionId(),
'@moderation_status' => $revision instanceof ContentVersionInterface ? $revision->getVersionStatusLabel() : ($revision->isPublished() ? $this->t('Published') : $this->t('Unpublished')),
]),
'#attributes' => [
'class' => array_filter([
'marker',
$revision->isPublished() ? 'marker--published' : NULL,
]),
],
],
];
return $build;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,21 @@ public function render(ResultRow $row) {
'node' => $revision->id(),
'node_revision' => $revision->getRevisionId(),
]),
'#title' => new FormattableMarkup('#@version (@moderation_status)', [
'@version' => $revision instanceof ContentVersionInterface ? $revision->getVersionId() : $revision->getRevisionId(),
'@moderation_status' => $revision instanceof ContentVersionInterface ? $revision->getVersionStatusLabel() : ($revision->isPublished() ? $this->t('Published') : $this->t('Unpublished')),
]),
'#title' => [
'#type' => 'html_tag',
'#tag' => 'span',
'#value' => new FormattableMarkup('#@version (@moderation_status)', [
'@version' => $revision instanceof ContentVersionInterface ? $revision->getVersionId() : $revision->getRevisionId(),
'@moderation_status' => $revision instanceof ContentVersionInterface ? $revision->getVersionStatusLabel() : ($revision->isPublished() ? $this->t('Published') : $this->t('Unpublished')),
]),
'#attributes' => [
'class' => array_filter([
'marker',
$revision->isPublished() ? 'marker--published' : NULL,
]),
],
],

];
return $build;
}
Expand Down

0 comments on commit c073f80

Please sign in to comment.