Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/datastore/datastore.module
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function datastore_theme($existing, $type, $theme, $path) {
'uuid' => NULL,
'title' => NULL,
'url' => NULL,
'node_id' => NULL,
],
],
'datastore_dashboard_revision_cell' => [
Expand Down
2 changes: 2 additions & 0 deletions modules/datastore/src/Form/DashboardForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ protected function buildRevisionRow(array $rev, int $resourceCount, string $harv
if ($moderation_class == 'hidden') {
$moderation_class = 'published-hidden';
}

return [
[
'rowspan' => $resourceCount,
Expand All @@ -510,6 +511,7 @@ protected function buildRevisionRow(array $rev, int $resourceCount, string $harv
'#uuid' => $rev['uuid'],
'#title' => $rev['title'],
'#url' => Url::fromUri("internal:/dataset/$rev[uuid]"),
'#node_id' => $rev['node_id'],
],
],
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
<div class="datastore-status-dataset-uuid">{{ uuid }}</div>
<div class="datastore-status-dataset-link">{{ link(title, url) }}</div>
<div class="datastore-status-dataset-link">
{{title}} <a href="{{ path('entity.node.canonical', {'node': node_id}) }}" aria-label="{{ 'admin'|t }}: {{title}}">{{ 'admin'|t }}</a>
{% if url is not empty %}
{% set link_attributes = create_attribute({'aria-label': 'view: @title'|t({'@title': title})}) %}
| {{ link('view', url, {'attributes': link_attributes}) }}
{% endif %}
</div>
<div class="datastore-status-dataset-uuid">{{ uuid }}</div>
8 changes: 8 additions & 0 deletions modules/datastore/tests/src/Unit/Form/DashboardFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public function testBuildTableRowsWithHarvestIdFilter() {
'moderation_state' => 'published',
'modified_date_metadata' => '2020-01-15',
'modified_date_dkan' => '2021-02-11',
'node_id' => 1,
];
$distribution = [
'distribution_uuid' => 'dist-1',
Expand Down Expand Up @@ -167,6 +168,7 @@ public function testBuildTableRowsWithDatasetTitleFilter() {
'moderation_state' => 'published',
'modified_date_metadata' => '2020-01-15',
'modified_date_dkan' => '2021-02-11',
'node_id' => 2,
];
$distribution = [
'distribution_uuid' => 'dist-1',
Expand Down Expand Up @@ -235,6 +237,7 @@ public function testBuildTableRowsWithUuidFilter() {
'moderation_state' => 'published',
'modified_date_metadata' => '2020-01-15',
'modified_date_dkan' => '2021-02-11',
'node_id' => 3,
];
$distribution = [
'distribution_uuid' => 'dist-1',
Expand Down Expand Up @@ -295,6 +298,7 @@ public function testBuildTableRowsWithAllDatasets() {
'title' => 'Dataset 1',
'modified_date_metadata' => '2019-08-12',
'modified_date_dkan' => '2021-07-08',
'node_id' => 3,
'distributions' => [
[
'distribution_uuid' => 'dist-1',
Expand All @@ -320,6 +324,7 @@ public function testBuildTableRowsWithAllDatasets() {
'title' => 'Non-Harvest Dataset',
'modified_date_metadata' => '2019-08-12',
'modified_date_dkan' => '2021-07-08',
'node_id' => 3,
'distributions' => [
[
'distribution_uuid' => 'dist-2',
Expand Down Expand Up @@ -395,6 +400,7 @@ public function testBuildTableRowsDatasetWithNoDistribution() {
'modified_date_metadata' => '2019-08-12',
'modified_date_dkan' => '2021-07-08',
'distributions' => ['Not found'],
'node_id' => 1,
],
];

Expand All @@ -421,6 +427,7 @@ public function testBuildTableRowsWithUnsupportedResourceTypes() {
'title' => 'Dataset 1',
'modified_date_metadata' => '2019-08-12',
'modified_date_dkan' => '2021-07-08',
'node_id' => 5,
'distributions' => [
[
'distribution_uuid' => 'dist-1',
Expand Down Expand Up @@ -524,6 +531,7 @@ public function testBuildTableRowsDatasetMultipleDistribution() {
'title' => 'Dataset 1',
'modified_date_metadata' => '2019-08-12',
'modified_date_dkan' => '2021-07-08',
'node_id' => 7,
'distributions' => [
[
'distribution_uuid' => 'dist-1',
Expand Down