Skip to content

Commit 91b7523

Browse files
authored
Merge pull request #630 from itk-dev/hotfix/minor-stuff-and-accessibility
Updated accessibility and added back button
2 parents eae6f33 + 897c571 commit 91b7523

12 files changed

Lines changed: 92 additions & 27 deletions

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
88

9-
## [4.15.2] - 2026-02-26
10-
9+
* [PR-630](https://github.com/itk-dev/deltag.aarhus.dk/pull/630)
10+
* Updated accessibility
11+
* Added back to dialogue buttons.
1112

13+
## [4.15.2] - 2026-02-26
1214

1315
## [4.15.1] - 2026-02-25
1416

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"itk-dev/itk_siteimprove": "^1.2",
8585
"itk-dev/itk_video": "^1.0",
8686
"itk-dev/serviceplatformen": "^1.5",
87-
"itk-dev/web_accessibility_statement": "^1.0",
87+
"itk-dev/web_accessibility_statement": "^1.3",
8888
"onelogin/php-saml": "^4.0",
8989
"oomphinc/composer-installers-extender": "^2.0",
9090
"vlucas/phpdotenv": "^2.4",

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
url: 'https://was.digst.dk/deltag-aarhus-dk'

web/modules/custom/hoeringsportal_dialogue/src/Helper/DialogueHelper.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Drupal\Core\Routing\RouteMatchInterface;
1212
use Drupal\Core\Session\AccountInterface;
1313
use Drupal\Core\StringTranslation\StringTranslationTrait;
14+
use Drupal\Core\Url;
1415
use Drupal\node\Entity\Node;
1516
use Drupal\node\NodeForm;
1617
use Drupal\node\NodeInterface;
@@ -246,6 +247,14 @@ public function dialogueProposalFormAlter(array &$form, FormStateInterface $form
246247
$parentLocationSelection = $parent->get('field_dialogue_proposal_location')->getValue();
247248
$parentMapConfig = json_decode($parentLocationSelection[0]['map_config'] ?? '');
248249
$form['field_location']['widget'][0]['map_config']['#default_value'] = json_encode($parentMapConfig);
250+
251+
$form['actions']['back'] = [
252+
'#url' => Url::fromRoute('entity.node.canonical', ['node' => $parent->id()]),
253+
'#type' => 'link',
254+
'#title' => $this->t('Back to dialogue'),
255+
'#attributes' => ['class' => ['btn', 'btn-secondary', 'mb-2', 'border-0']],
256+
'#weight' => 10,
257+
];
249258
}
250259

251260
if ($parent) {

web/modules/custom/hoeringsportal_dialogue/translations/hoeringsportal_dialogue.da.po

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
msgid ""
44
msgstr ""
55
"Project-Id-Version: PROJECT VERSION\n"
6-
"POT-Creation-Date: 2026-01-07 12:56+0100\n"
7-
"PO-Revision-Date: 2026-01-07 12:56+0100\n"
6+
"POT-Creation-Date: 2026-02-05 08:47+0100\n"
7+
"PO-Revision-Date: 2026-02-05 08:47+0100\n"
88
"Last-Translator: NAME <EMAIL@ADDRESS>\n"
99
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
1010
"MIME-Version: 1.0\n"
@@ -43,6 +43,9 @@ msgstr "@size begrænsning."
4343
msgid "Add new comment"
4444
msgstr "Tilføj ny kommentar"
4545

46+
msgid "Back to dialogue"
47+
msgstr "Tilbage til dialog"
48+
4649
msgid "Comment @commentId and it's children have been unpublished."
4750
msgstr ""
4851
"Kommentaren @commentId og dens underkommentarer er blevet "

web/themes/custom/hoeringsportal/assets/css/module/_dialogue.scss

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
flex-basis: 50%;
6363
}
6464

65+
.button.upload,
6566
.file--image {
6667
display: none;
6768
}
@@ -105,6 +106,16 @@
105106
order: 1;
106107
}
107108
}
109+
110+
.form-actions {
111+
margin-top: 1rem;
112+
padding-top: 1rem;
113+
border-top: 1px solid var(--primitive-gray-500);
114+
115+
.btn {
116+
margin-right: 1rem;
117+
}
118+
}
108119
}
109120

110121
.dialogue-proposals {
@@ -147,6 +158,28 @@
147158
border-left: 2px dashed var(--primitive-gray-600);
148159
padding-left: 2em;
149160
}
161+
162+
.comment-form {
163+
.form-submit {
164+
@extend .btn;
165+
@extend .btn-primary;
166+
167+
padding: 0.25rem 0.5rem;
168+
font-size: 0.875rem;
169+
border-radius: 0.2rem;
170+
position: inherit;
171+
172+
&:after {
173+
display: none;
174+
}
175+
}
176+
}
177+
178+
.action-container {
179+
margin-top: 1rem;
180+
padding-top: 1rem;
181+
border-top: 1px solid var(--primitive-gray-500);
182+
}
150183
}
151184

152185
/* Target the full page (the body element) rather than `.dialogue-proposal` to also affect elements in modals. */

web/themes/custom/hoeringsportal/templates/content/node--dialogue-proposal--full.html.twig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@
8282
{{ content.field_comments }}
8383
</div>
8484
</div>
85+
86+
<div class="action-container mb-3">
87+
<a class="btn btn-secondary mb-2 border-0" href="{{ path('entity.node.canonical', {node: node.field_dialogue.entity.id}) }}">{{ 'Back to dialogue'|t }}</a>
88+
</div>
8589
</div>
8690
</div>
8791
</div>

web/themes/custom/hoeringsportal/templates/content/node--dialogue-proposal--list-display.html.twig

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,24 +69,26 @@
6969
#}
7070

7171
<div class="card">
72-
<div class="card-body container">
73-
<h3 class="card-title h2 fw-normal"><a href="{{ url }}">{{ label }}</a></h3>
74-
<div class="row mb-3 pb-3">
75-
<div class="card-text col-12">
76-
{{ content.field_dialogue_proposal_descr }}
72+
<div class="card-body container p-0">
73+
<a href="{{ url }}">
74+
<h3 class="card-title h2 fw-normal pt-4 px-3 m-0">{{ label }}</h3>
75+
<div class="row mb-3 pb-3 pt-3 px-3">
76+
<div class="card-text col-12">
77+
{{ content.field_dialogue_proposal_descr }}
78+
</div>
7779
</div>
78-
</div>
79-
<div class="row mb-3 border-bottom pb-3 container-fluid mx-0 px-0">
80+
</a>
81+
<div class="row mb-3 border-bottom pb-3 container-fluid mx-0 px-3">
8082
<div class="d-flex flex-wrap px-0 justify-content-between">
81-
<div class="">
83+
<div>
8284
<span class="me-2"><i class="me-2 fa-solid fa-comments"></i>{{ node.field_comments.comment_count }}</span><span>{{ 'Comments'|t }}</span>
8385
</div>
84-
<div class="">
85-
<!--<span class="flag-wrapper">{{ content.flag_support_proposal }}</span>-->
86+
<div>
87+
<span class="flag-wrapper">{{ content.flag_support_proposal }}</span>
8688
</div>
8789
</div>
8890
</div>
89-
<div class="row">
91+
<div class="row px-3">
9092
{{ content.field_dialogue_proposal_category }}
9193
</div>
9294
</div>

web/themes/custom/hoeringsportal/templates/field/field--field-dialogue-proposal-category--full.html.twig

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@
3737
*/
3838
#}
3939

40-
<div class="proposal-category-items">
40+
<label class="visually-hidden" for="proposal-categories">
41+
{{ 'Proposal categories'|t }}
42+
</label>
43+
<ul class="proposal-category-items" id="proposal-categories">
4144
{% for item in items %}
42-
<span class="badge rounded-pill">{{ item.content }}</span>
45+
<li class="badge rounded-pill">{{ item.content }}</li>
4346
{% endfor %}
44-
</div>
47+
</ul>

0 commit comments

Comments
 (0)