From 7daa61500dfef604ef8ac6c33a6dccd97fe471eb Mon Sep 17 00:00:00 2001 From: Eliseu Amaro Date: Mon, 17 Jan 2022 02:51:20 +0000 Subject: [PATCH] [COMPONENTS][Collection] Notes collection template now has a default title [CARDS][Note] Removed note actions from minimal note block --- .../templates/collection/notes.html.twig | 78 ++++++++++--------- templates/cards/note/view.html.twig | 29 +++---- 2 files changed, 55 insertions(+), 52 deletions(-) diff --git a/components/Collection/templates/collection/notes.html.twig b/components/Collection/templates/collection/notes.html.twig index a227295318..7c6af08feb 100644 --- a/components/Collection/templates/collection/notes.html.twig +++ b/components/Collection/templates/collection/notes.html.twig @@ -13,45 +13,47 @@ {{ block | raw }} {% endfor %} -
- {% if page_title is defined %} -

{{ page_title | trans }}

- {% endif %} - -
+ {% if notes is defined %} +
+
+ {% if page_title is defined %} +

{{ page_title | trans }}

+ {% else %} +

{{ 'Notes' | trans }}

+ {% endif %} + +
- {# Backwards compatibility with hAtom 0.1 #} -
-
- {% if notes is defined and notes is not empty %} - {% for conversation in notes %} - {% block current_note %} - {% if conversation is instanceof('array') %} - {{ noteView.macro_note(conversation['note'], conversation['replies']) }} - {% else %} - {{ noteView.macro_note(conversation) }} - {% endif %} -
- {% endblock current_note %} - {% endfor %} - {% else %} -
- {{ icon('logo', 'icon feed-background') | raw }} + {% if notes is not empty %} + {# Backwards compatibility with hAtom 0.1 #} +
+
+ {% for conversation in notes %} + {% block current_note %} + {% if conversation is instanceof('array') %} + {{ noteView.macro_note(conversation['note'], conversation['replies']) }} + {% else %} + {{ noteView.macro_note(conversation) }} + {% endif %} +
+ {% endblock current_note %} + {% endfor %}
+
{% endif %} -
-
+
+ {% endif %} {% endblock body %} diff --git a/templates/cards/note/view.html.twig b/templates/cards/note/view.html.twig index 534550e41e..2893a85cdd 100644 --- a/templates/cards/note/view.html.twig +++ b/templates/cards/note/view.html.twig @@ -107,18 +107,14 @@ {% endblock note_sidebar %} {% block note_info %} -
-
- {{ block('note_author') }} - - {{ 'in conversation' | trans }} - {{ note.getModified() | ago }} - -
- - {{ block('note_actions') }} + {% endblock note_info %} @@ -162,7 +158,10 @@ class="h-entry hentry note" lang={{ note.getLanguageLocale() }}> {{ block('note_sidebar') }}
- {{ block('note_info') }} +
+ {{ block('note_info') }} + {{ block('note_actions') }} +