Skip to content

Commit 7d6d7ff

Browse files
Merge pull request #11 from AndreasEngelmark/development
Merge prior to deploy on 2022-05-19
2 parents 42ccf1b + 494b951 commit 7d6d7ff

File tree

8 files changed

+63
-49
lines changed

8 files changed

+63
-49
lines changed

config/sync/core.entity_view_display.comment.os2loop_post_comment.default.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,38 @@ targetEntityType: comment
1515
bundle: os2loop_post_comment
1616
mode: default
1717
content:
18-
flag_os2loop_upvote_upvote_button:
18+
flag_os2loop_upvote_correct_answer:
1919
weight: 0
2020
region: content
2121
settings: { }
2222
third_party_settings: { }
23-
links:
23+
flag_os2loop_upvote_upvote_button:
2424
weight: 1
2525
region: content
2626
settings: { }
2727
third_party_settings: { }
28+
links:
29+
weight: 2
30+
region: content
31+
settings: { }
32+
third_party_settings: { }
2833
os2loop_comment_anonymous_author:
2934
type: list_default
30-
weight: 2
35+
weight: 3
3136
region: content
3237
label: hidden
3338
settings: { }
3439
third_party_settings: { }
3540
os2loop_post_comment:
36-
weight: 3
41+
weight: 4
3742
label: hidden
3843
settings: { }
3944
third_party_settings: { }
4045
type: text_default
4146
region: content
4247
os2loop_post_comment_media:
4348
type: entity_reference_entity_id
44-
weight: 4
49+
weight: 5
4550
region: content
4651
label: above
4752
settings: { }
@@ -50,6 +55,5 @@ hidden:
5055
entity_print_view_epub: true
5156
entity_print_view_pdf: true
5257
entity_print_view_word_docx: true
53-
flag_os2loop_upvote_correct_answer: true
5458
langcode: true
5559
search_api_excerpt: true

config/sync/core.entity_view_display.comment.os2loop_post_comment.list_display.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,25 @@ dependencies:
99
- field.field.comment.os2loop_post_comment.os2loop_post_comment
1010
- field.field.comment.os2loop_post_comment.os2loop_post_comment_media
1111
module:
12-
- options
1312
- text
1413
id: comment.os2loop_post_comment.list_display
1514
targetEntityType: comment
1615
bundle: os2loop_post_comment
1716
mode: list_display
1817
content:
19-
flag_os2loop_upvote_upvote_button:
20-
weight: 0
18+
flag_os2loop_upvote_correct_answer:
19+
weight: 1
2120
region: content
2221
settings: { }
2322
third_party_settings: { }
24-
links:
25-
weight: 1
23+
flag_os2loop_upvote_upvote_button:
24+
weight: 0
2625
region: content
2726
settings: { }
2827
third_party_settings: { }
29-
os2loop_comment_anonymous_author:
30-
type: list_default
28+
links:
3129
weight: 2
3230
region: content
33-
label: hidden
3431
settings: { }
3532
third_party_settings: { }
3633
os2loop_post_comment:
@@ -40,17 +37,11 @@ content:
4037
third_party_settings: { }
4138
type: text_default
4239
region: content
43-
os2loop_post_comment_media:
44-
type: entity_reference_entity_id
45-
weight: 4
46-
region: content
47-
label: above
48-
settings: { }
49-
third_party_settings: { }
5040
hidden:
5141
entity_print_view_epub: true
5242
entity_print_view_pdf: true
5343
entity_print_view_word_docx: true
54-
flag_os2loop_upvote_correct_answer: true
5544
langcode: true
56-
search_api_excerpt: true
45+
os2loop_comment_anonymous_author: true
46+
os2loop_post_comment_media: true
47+
search_api_excerpt: true

web/profiles/custom/os2loop/modules/os2loop_subscriptions/templates/os2loop-subscriptions-user.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{{ drupal_view('os2loop_subscriptions_node', 'block_1') }}
1010
</div>
1111

12-
<h2 class="h4 my-30">{{ 'Taxonomy term subscriptions'|t }}</h2>
12+
<h2 class="h4 mt-60 mb-30">{{ 'Taxonomy term subscriptions'|t }}</h2>
1313
<div class="os2loop-subscription-term">
1414
{{ drupal_view('os2loop_subscription_term', 'block_1') }}
1515
</div>

web/profiles/custom/os2loop/themes/os2loop_theme/assets/signifly-custom/custom-index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@
5252

5353
@import "pages/user-questions.scss";
5454
@import "pages/user-subscriptions.scss";
55+
@import "pages/user-replies.scss";
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.user-replies {
2+
.content-wrapper {
3+
@extend .block-primary-white, .p-30;
4+
5+
.views-rows-container {
6+
@extend .block-primary-gray, .p-30, .mt-30;
7+
}
8+
9+
.views-row {
10+
@extend .block-secondary-white, .py-20, .px-30;
11+
12+
+ .views-row {
13+
@extend .mt-20;
14+
}
15+
16+
// TODO: move this to bootstrap-custom
17+
.list-group-item {
18+
@extend .p-0;
19+
}
20+
}
21+
}
22+
}

web/profiles/custom/os2loop/themes/os2loop_theme/templates/content-entities/comment--list-display.html.twig

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,34 +67,30 @@
6767
*/
6868
#}
6969

70-
{% set node_value = commented_entity.os2loop_question_content.value is defined ? commented_entity.os2loop_question_content.value : commented_entity.os2loop_post_content.value %}
70+
{% set comment_title = commented_entity.label %}
7171
{% set comment_value = elements['#comment'].os2loop_question_answer.value is defined ? elements['#comment'].os2loop_question_answer.value : elements['#comment'].os2loop_post_comment.value %}
72-
{% set node_value_truncated = node_value|length > 200 ? true : false %}
72+
{% set comment_title_truncated = comment_title|length > 90 ? true : false %}
7373
{% set comment_value_truncated = comment_value|length > 200 ? true : false %}
7474
<div class="list-group">
75-
<article class="list-group-item mb-2 bg-light border-top">
75+
<article class="list-group-item">
7676
<div class="small">
7777
<span>{{ 'Created'|t }}</span>: {{ created }}
7878
</div>
79-
<div>
80-
{% if node_value_truncated %}
81-
{{ node_value|truncate(200, true)|raw }}
82-
<span>...</span>
79+
<div class="h5 mt-10 mb-0">
80+
{% if comment_title_truncated %}
81+
{{ comment_title|truncate(90, true, '...')|raw }}
8382
{% else %}
84-
{{ node_value|raw }}
83+
{{ comment_title|raw }}
8584
{% endif %}
8685
</div>
87-
<div class="d-flex">
88-
<h3 class="h6">
89-
<a href="{{ path('entity.comment.canonical', {'comment': comment.id}) }}#comment-{{ comment.id }}">
90-
{% if comment_value_truncated %}
91-
{{ comment_value|truncate(200, true)|raw }}
92-
<span>...</span>
93-
{% else %}
94-
{{ comment_value|raw }}
95-
{% endif %}
96-
</a>
97-
</h3>
86+
<div class="d-flex mt-10 mb-0">
87+
<a href="{{ path('entity.comment.canonical', {'comment': comment.id}) }}#comment-{{ comment.id }}" class="link-unstyled">
88+
{% if comment_value_truncated %}
89+
{{ comment_value|truncate(200, true, '...')|raw }}
90+
{% else %}
91+
{{ comment_value|raw }}
92+
{% endif %}
93+
</a>
9894
</div>
9995
</article>
10096
</div>

web/profiles/custom/os2loop/themes/os2loop_theme/templates/views/views-view-field--os2loop-user-answers--comment-type.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
{% set comment_type = row._entity.comment_type.target_id %}
2525

2626
{% if comment_type == 'os2loop_question_answer' %}
27-
{{ 'My answers on questions'|t }}
27+
{{ 'Answers to questions'|t }}
2828
{% else %}
29-
{{ 'My comments to posts'|t }}
29+
{{ 'Comments to posts'|t }}
3030
{% endif %}
3131

web/profiles/custom/os2loop/translations/translations.da.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28932,11 +28932,11 @@ msgid_plural "@count media items remaining."
2893228932
msgstr[0] "Maks. 1 fil kan vedhæftes"
2893328933
msgstr[1] "Maks. @count filer kan vedhæftes"
2893428934

28935-
msgid "My answers on questions"
28936-
msgstr "Mine svar på spørgsmål"
28935+
msgid "Answers to questions"
28936+
msgstr "Svar på spørgsmål"
2893728937

28938-
msgid "My comments to posts"
28939-
msgstr "Mine kommentarer på indlæg"
28938+
msgid "Comments to posts"
28939+
msgstr "Kommentarer på indlæg"
2894028940

2894128941
msgid "contact editorial office"
2894228942
msgstr "Kontakt redaktionen"

0 commit comments

Comments
 (0)