Skip to content

Commit 3a8f1f0

Browse files
committed
Merge branch 'feature/early_inclusion_dialogue' into develop
2 parents 3f41094 + c0380d0 commit 3a8f1f0

File tree

8 files changed

+38
-5
lines changed

8 files changed

+38
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Versioning](https://semver.org/spec/v2.0.0.html).
1616
* Add promoted content feature
1717
* Updated Drupal core 10.5.2 => 10.5.6
1818
* Updated accessibility
19+
* Add breadcrumb to dialogue
1920

2021
* [PR-555](https://github.com/itk-dev/deltag.aarhus.dk/pull/555)
2122
* Add underline to active navigation.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
}
2323
}
2424

25+
.proposal-form-wrapper {
26+
padding-top: 3rem;
27+
}
28+
2529
.node-dialogue-proposal-form {
2630
.fieldset-legend {
2731
font-size: 1rem;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@
2525
.proposal-count {
2626
font-size: 3rem;
2727
}
28+
29+
.create-proposal-dialogue {
30+
.proposal-form-wrapper {
31+
padding-top: 0;
32+
}
33+
}

web/themes/custom/hoeringsportal/hoeringsportal.theme

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ function hoeringsportal_theme_suggestions_input_alter(array &$suggestions, array
174174
* Implements hook_theme_suggestions_HOOK_alter().
175175
*/
176176
function hoeringsportal_theme_suggestions_form_alter(array &$suggestions, array $variables) {
177+
178+
if (!empty($variables['element']['#form_id'])) {
179+
$suggestions[] = 'form__' . str_replace('-', '_', $variables['element']['#form_id']);
180+
}
177181
if (!empty($variables['element']['#id'])) {
178182
$suggestions[] = 'form__' . str_replace('-', '_', $variables['element']['#id']);
179183
}

web/themes/custom/hoeringsportal/templates/comment/comment.html.twig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@
6868
* @ingroup themeable
6969
*/
7070
#}
71+
72+
{% set dialog_options = {
73+
width: 400,
74+
classes: {
75+
'ui-dialog': 'create-comment-form',
76+
}
77+
} %}
78+
7179
<article{{ attributes.addClass('js-comment mb-3') }}>
7280
<mark class="hidden" data-comment-timestamp="{{ new_indicator_timestamp }}"></mark>
7381
<div{{ content_attributes }}>
@@ -78,7 +86,7 @@
7886
</div>
7987
<div class="d-flex mb-2">
8088
<div class="flag-wrapper me-3">{{ content.flag_support_comment }}</div>
81-
<div class="comment-reply"><a class="use-ajax text-secondary" data-dialog-options="{&quot;width&quot;:400}" data-dialog-type="modal" href="{{ path('comment.reply', {entity_type: 'node', entity: comment.entity_id.value[0].target_id, field_name: 'field_comments', pid: comment.cid.value}) }}">{{ include('themes/custom/hoeringsportal/templates/animated-svg/icon-deltag-reply.svg.html.twig') }}{{ 'Reply'|t({}, {context: 'Comment reply '}) }}</a></div>
89+
<div class="comment-reply"><a class="use-ajax text-secondary" data-dialog-options="{{ dialog_options|json_encode }}" data-dialog-type="modal" href="{{ path('comment.reply', {entity_type: 'node', entity: comment.entity_id.value[0].target_id, field_name: 'field_comments', pid: comment.cid.value}) }}">{{ include('themes/custom/hoeringsportal/templates/animated-svg/icon-deltag-reply.svg.html.twig') }}{{ 'Reply'|t({}, {context: 'Comment reply '}) }}</a></div>
8290
</div>
8391
{% endif %}
8492
</div>

web/themes/custom/hoeringsportal/templates/components/promoted-content-dialogue-right.html.twig

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
{% set dialog_options = {
2+
width: 800,
3+
title: '',
4+
classes: {
5+
'ui-dialog': 'create-proposal-dialogue',
6+
},
7+
dialogueId: elements['#node'].id,
8+
originalPath: path('<current>')
9+
} %}
10+
111
<div class="text-align-center">
212
<div class="proposal-count fw-bold mb-3">
313
{{ dialogue_helper.getProposalCount(elements['#node']) }}
@@ -6,7 +16,7 @@
616
{{ 'Proposals received'|t }}
717
</div>
818
<div class="mb-4">
9-
<a data-dialog-options="{&quot;width&quot;:800, &quot;dialogueId&quot;:{{ elements['#node'].id }}, &quot;originalPath&quot;:&quot;{{ path('<current>') }}&quot;}" data-dialog-type="modal" href="{{ path('node.add', {node_type: 'dialogue_proposal', dialogue: elements['#node'].id}) }}" class="use-ajax btn btn-primary text-white rounded">{{ 'Participate with your proposal'|t }}</a>
19+
<a data-dialog-options="{{ dialog_options|json_encode }}" data-dialog-type="modal" href="{{ path('node.add', {node_type: 'dialogue_proposal', dialogue: elements['#node'].id}) }}" class="use-ajax btn btn-primary text-white rounded">{{ 'Participate with your proposal'|t }}</a>
1020
</div>
1121
<div class="mb-4">
1222
<a href="{{ path('entity.node.canonical', {node: elements['#node'].id}) }}#proposals" class="btn btn-transparent rounded">{{ 'View all proposals'|t }}</a>

web/themes/custom/hoeringsportal/templates/components/promoted-dialogue.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<h4 class="px-3">{{ left.leftLabel }}:</h4>
66
<div class="container">
77
<div class="row">
8-
<div class="col-6">
8+
<div class="col-lg-6">
99
{% if left.promoted.id %}
1010
{{ drupal_entity('node', left.promoted.id, left.promoted.display_mode) }}
1111
{% else %}
@@ -19,7 +19,7 @@
1919
{% endif %}
2020
</div>
2121
{% if right %}
22-
<div class="col-6">
22+
<div class="col-lg-6">
2323
<div class="p-3">
2424
{{ include(directory ~ '/templates/components/promoted-content-dialogue-right.html.twig', {}) }}
2525
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{{ include((directory ~ '/templates/misc/status-messages.html.twig'), {message_list: {warning: ['No parent exists for this dialogue proposal! You should add a proposal from the appropriate dialogue page.'|t]}, status_headings: {warning: 'warning'}}) }}
1818
</div>
1919
{% endif %}
20-
<div class="row justify-content-center pt-5">
20+
<div class="proposal-form-wrapper row justify-content-center">
2121
<div class="proposal-layout">
2222
<div class="breadcrumb mb-3">
2323
<span class="me-2"><a href="/tidlig-inddragelse">{{ 'Early inclusion'|t }}</a></span>

0 commit comments

Comments
 (0)