diff --git a/components/Tag/templates/note_tag_feed.html.twig b/components/Tag/templates/note_tag_feed.html.twig
index 857e01ad8d..c058bbb48d 100644
--- a/components/Tag/templates/note_tag_feed.html.twig
+++ b/components/Tag/templates/note_tag_feed.html.twig
@@ -1,5 +1,5 @@
{% extends 'base.html.twig' %}
-{% import '/cards/note/view.html.twig' as noteView %}
+{% import '/cards/macros/note.html.twig' as noteView %}
{% block stylesheets %}
{{ parent() }}
@@ -22,7 +22,7 @@
{% for note in results %}
{% block current_note %}
- {{ noteView.macro_note(note) }}
+ {{ noteView.note_vanilla(note) }}
{% endblock current_note %}
{% endfor %}
diff --git a/plugins/AttachmentCollections/AttachmentCollections.php b/plugins/AttachmentCollections/AttachmentCollections.php
index 6bdc5862f7..7e187dd8d7 100644
--- a/plugins/AttachmentCollections/AttachmentCollections.php
+++ b/plugins/AttachmentCollections/AttachmentCollections.php
@@ -108,17 +108,13 @@ class AttachmentCollections extends Plugin
$res = DB::findBy(AttachmentCollection::class, ['actor_id' => $owner->getId()]);
} else {
$res = DB::dql(
- <<<'EOF'
- SELECT entry.attachment_collection_id FROM \Plugin\AttachmentCollections\Entity\AttachmentCollectionEntry AS entry
- INNER JOIN \Plugin\AttachmentCollections\Entity\AttachmentCollection AS attachment_collection
- WITH attachment_collection.id = entry.attachment_collection_id
- WHERE entry.attachment_id = :attach_id AND entry.note_id = :note_id AND attachment_collection.actor_id = :id
- EOF,
- [
- 'id' => $owner->getId(),
- 'note_id' => $vars['vars']['note_id'],
- 'attach_id' => $vars['vars']['attachment_id'],
- ],
+ 'select e.attachment_collection_id from attachment_collection_entry e '
+ . 'inner join attachment_collection as a '
+ . 'with a.id = e.attachment_collection_id '
+ . 'where e.attachment_id = :attachment_id '
+ . 'and e.note_id = :note_id '
+ . 'and a.actor_id = :actor_id',
+ ['actor_id' => $owner->getId(), 'note_id' => $vars['vars']['note_id'], 'attachment_id' => $vars['vars']['attachment_id']],
);
}
if (!$ids_only) {
diff --git a/plugins/AttachmentCollections/templates/AttachmentCollections/collection_entry_view.html.twig b/plugins/AttachmentCollections/templates/AttachmentCollections/collection_entry_view.html.twig
index b3db64714f..babdc1c77f 100644
--- a/plugins/AttachmentCollections/templates/AttachmentCollections/collection_entry_view.html.twig
+++ b/plugins/AttachmentCollections/templates/AttachmentCollections/collection_entry_view.html.twig
@@ -3,7 +3,7 @@
{% block collection_items %}
{% for key, attachment in attachments %}
- {% include '/cards/attachments/view.html.twig' with {'attachment': attachment, 'note': bare_notes[key], 'title': attachment.getBestTitle(bare_notes[key])} only %}
+ {% include '/cards/blocks/attachment.html.twig' with {'attachment': attachment, 'note': bare_notes[key], 'title': attachment.getBestTitle(bare_notes[key])} only %}
{{ 'Download link' | trans }}
diff --git a/plugins/AttachmentShowRelated/templates/attachmentShowRelated/attachmentRelatedNotes.html.twig b/plugins/AttachmentShowRelated/templates/attachmentShowRelated/attachmentRelatedNotes.html.twig
index 294742cec1..3b0b6b5168 100644
--- a/plugins/AttachmentShowRelated/templates/attachmentShowRelated/attachmentRelatedNotes.html.twig
+++ b/plugins/AttachmentShowRelated/templates/attachmentShowRelated/attachmentRelatedNotes.html.twig
@@ -1,4 +1,4 @@
-{% import '/cards/note/view.html.twig' as noteView %}
+{% import '/cards/macros/note.html.twig' as noteView %}
@@ -8,6 +8,6 @@
{% for note in related_notes %}
- {{ noteView.macro_note_minimal(note) }}
+ {{ noteView.note_compact(note) }}
{% endfor %}
\ No newline at end of file
diff --git a/plugins/BlogCollections/BlogCollections.php b/plugins/BlogCollections/BlogCollections.php
index e93e3f6118..ec36030e78 100644
--- a/plugins/BlogCollections/BlogCollections.php
+++ b/plugins/BlogCollections/BlogCollections.php
@@ -80,7 +80,7 @@ class BlogCollections extends Plugin
protected function shouldAddToRightPanel(Actor $user, $vars, Request $request): bool
{
// TODO: Implement shouldAddToRightPanel() method.
- return $vars['path'] === 'note_view';
+ return false;
}
protected function getCollectionsBy(Actor $owner, ?array $vars = null, bool $ids_only = false): array
diff --git a/plugins/DeleteNote/templates/delete_note/delete_note.html.twig b/plugins/DeleteNote/templates/delete_note/delete_note.html.twig
index fad12edd79..a81750fbab 100644
--- a/plugins/DeleteNote/templates/delete_note/delete_note.html.twig
+++ b/plugins/DeleteNote/templates/delete_note/delete_note.html.twig
@@ -1,5 +1,5 @@
{% extends 'stdgrid.html.twig' %}
-{% import "/cards/note/view.html.twig" as noteView %}
+{% import "/cards/macros/note.html.twig" as noteView %}
{% block title %}{{ 'Delete ' | trans }}{{ 'note' | trans }}{% endblock %}
@@ -12,7 +12,7 @@
{{ parent() }}
- {{ noteView.macro_note_minimal(note) }}
+ {{ noteView.note_compact(note) }}
{{ form(delete) }}
diff --git a/plugins/Favourite/templates/favourite/add_to_favourites.html.twig b/plugins/Favourite/templates/favourite/add_to_favourites.html.twig
index 680108970b..249217e03d 100644
--- a/plugins/Favourite/templates/favourite/add_to_favourites.html.twig
+++ b/plugins/Favourite/templates/favourite/add_to_favourites.html.twig
@@ -1,5 +1,5 @@
{% extends 'stdgrid.html.twig' %}
-{% import "/cards/note/view.html.twig" as noteView %}
+{% import "/cards/macros/note.html.twig" as noteView %}
{% block title %}{{ 'Favourite ' | trans }}{{ note.getActorNickname() }}{{ '\'s note.' | trans }}{% endblock %}
@@ -12,7 +12,7 @@
{{ parent() }}
- {{ noteView.macro_note_minimal(note) }}
+ {{ noteView.note_vanilla(note) }}
{{ form(add_favourite) }}
diff --git a/plugins/Favourite/templates/favourite/remove_from_favourites.html.twig b/plugins/Favourite/templates/favourite/remove_from_favourites.html.twig
index 27be98b850..b0367e18a4 100644
--- a/plugins/Favourite/templates/favourite/remove_from_favourites.html.twig
+++ b/plugins/Favourite/templates/favourite/remove_from_favourites.html.twig
@@ -1,5 +1,5 @@
{% extends 'stdgrid.html.twig' %}
-{% import "/cards/note/view.html.twig" as noteView %}
+{% import "/cards/macros/note.html.twig" as noteView %}
{% block title %}{{ 'Remove favourite from ' | trans }}{{ note.getActorNickname() }}{{ '\'s note.' | trans }}{% endblock %}
@@ -12,7 +12,7 @@
{{ parent() }}
- {{ noteView.macro_note_minimal(note) }}
+ {{ noteView.note_vanilla(note) }}
{{ form(remove_favourite) }}
diff --git a/plugins/PinnedNotes/templates/PinnedNotes/notes.html.twig b/plugins/PinnedNotes/templates/PinnedNotes/notes.html.twig
index bdaa18b47b..2a19bec7ef 100644
--- a/plugins/PinnedNotes/templates/PinnedNotes/notes.html.twig
+++ b/plugins/PinnedNotes/templates/PinnedNotes/notes.html.twig
@@ -1,4 +1,4 @@
-{% import '/cards/note/view.html.twig' as noteView %}
+{% import '/cards/macros/note.html.twig' as noteView %}
{# Backwards compatibility with hAtom 0.1 #}
{% if pinnednotes is not empty %}
@@ -8,9 +8,9 @@
{% for conversation in pinnednotes %}
{% block current_note %}
{% if conversation is instanceof('array') %}
- {{ noteView.macro_note(conversation['note'], conversation['replies']) }}
+ {{ noteView.note_vanilla(conversation['note'], conversation['replies']) }}
{% else %}
- {{ noteView.macro_note(conversation) }}
+ {{ noteView.note_vanilla(conversation) }}
{% endif %}
{% endblock current_note %}
diff --git a/plugins/PinnedNotes/templates/PinnedNotes/toggle.html.twig b/plugins/PinnedNotes/templates/PinnedNotes/toggle.html.twig
index 06f5268197..423eccb107 100644
--- a/plugins/PinnedNotes/templates/PinnedNotes/toggle.html.twig
+++ b/plugins/PinnedNotes/templates/PinnedNotes/toggle.html.twig
@@ -1,5 +1,5 @@
{% extends 'stdgrid.html.twig' %}
-{% import "/cards/note/view.html.twig" as noteView %}
+{% import "/cards/macros/note.html.twig" as noteView %}
{% block title %}{{ title }}{% endblock %}
@@ -12,7 +12,7 @@
{{ parent() }}
- {{ noteView.macro_note_minimal(note) }}
+ {{ noteView.note_compact(note) }}
{{ form(toggle_form) }}
diff --git a/plugins/RelatedTags/templates/related_tags/actor_tags.html.twig b/plugins/RelatedTags/templates/related_tags/actor_tags.html.twig
index a744143e07..3513549450 100644
--- a/plugins/RelatedTags/templates/related_tags/actor_tags.html.twig
+++ b/plugins/RelatedTags/templates/related_tags/actor_tags.html.twig
@@ -2,7 +2,7 @@
Related tags
{% for at in actor_tags %}
- {% include 'cards/tag/actor_tag.html.twig' with { 'tag': at, 'actor': null } %}
+ {% include 'cards/blocks/tag_actor.html.twig' with { 'tag': at, 'actor': null } %}
{% endfor %}
{% endif %}
diff --git a/plugins/RelatedTags/templates/related_tags/note_tags.html.twig b/plugins/RelatedTags/templates/related_tags/note_tags.html.twig
index 733c6d6831..b7abeffd4f 100644
--- a/plugins/RelatedTags/templates/related_tags/note_tags.html.twig
+++ b/plugins/RelatedTags/templates/related_tags/note_tags.html.twig
@@ -3,7 +3,7 @@
Related tags
{% for nt in note_tags %}
- {% include 'cards/tag/note_tag.html.twig' with { 'tag': nt } %}
+ {% include 'cards/blocks/tag_note.html.twig' with { 'tag': nt } %}
{% endfor %}
{% endif %}
diff --git a/plugins/RepeatNote/templates/repeat/add_to_repeats.html.twig b/plugins/RepeatNote/templates/repeat/add_to_repeats.html.twig
index 99f55250eb..1cc7af3b5f 100644
--- a/plugins/RepeatNote/templates/repeat/add_to_repeats.html.twig
+++ b/plugins/RepeatNote/templates/repeat/add_to_repeats.html.twig
@@ -1,5 +1,5 @@
{% extends 'stdgrid.html.twig' %}
-{% import "/cards/note/view.html.twig" as noteView %}
+{% import "/cards/macros/note.html.twig" as noteView %}
{% block title %}{{ 'Repeat ' | trans }}{{ note.getActorNickname() }}{{ '\'s note.' | trans }}{% endblock %}
@@ -12,7 +12,7 @@
{{ parent() }}
- {{ noteView.macro_note(note) }}
+ {{ noteView.note_vanilla(note) }}
{{ form(add_repeat) }}
diff --git a/plugins/RepeatNote/templates/repeat/remove_from_repeats.html.twig b/plugins/RepeatNote/templates/repeat/remove_from_repeats.html.twig
index c34188cfff..8358935fa8 100644
--- a/plugins/RepeatNote/templates/repeat/remove_from_repeats.html.twig
+++ b/plugins/RepeatNote/templates/repeat/remove_from_repeats.html.twig
@@ -1,5 +1,5 @@
{% extends 'stdgrid.html.twig' %}
-{% import "/cards/note/view.html.twig" as noteView %}
+{% import "/cards/macros/note.html.twig" as noteView %}
{% block title %}{{ 'Remove repeat from ' | trans }}{{ note.getActorNickname() }}{{ '\'s note.' | trans }}{% endblock %}
@@ -12,7 +12,7 @@
{{ parent() }}
- {{ noteView.macro_note(note) }}
+ {{ noteView.note_vanilla(note) }}
{{ form(remove_repeat) }}
diff --git a/plugins/TagBasedFiltering/templates/tag_based_filtering/add_blocked.html.twig b/plugins/TagBasedFiltering/templates/tag_based_filtering/add_blocked.html.twig
index ed0f608a4e..0bcf0b40e5 100644
--- a/plugins/TagBasedFiltering/templates/tag_based_filtering/add_blocked.html.twig
+++ b/plugins/TagBasedFiltering/templates/tag_based_filtering/add_blocked.html.twig
@@ -1,5 +1,5 @@
{% extends 'base.html.twig' %}
-{% import '/cards/note/view.html.twig' as noteView %}
+{% import '/cards/macros/note.html.twig' as noteView %}
{% block stylesheets %}
{{ parent() }}
@@ -10,9 +10,9 @@
{% if note is defined or actor is defined %}
{% if note is defined and note is not null %}
- {{ noteView.macro_note(note, {}) }}
+ {{ noteView.note_vanilla(note, {}) }}
{% elseif actor is defined and actor is not null %}
- {% include 'cards/profile/view.html.twig' with {'actor': actor} only %}
+ {% include 'cards/blocks/profile.html.twig' with {'actor': actor} only %}
{% endif %}
{% endif %}
diff --git a/templates/actor/view.html.twig b/templates/actor/view.html.twig
index 6ccbff47d7..ca57921061 100644
--- a/templates/actor/view.html.twig
+++ b/templates/actor/view.html.twig
@@ -1,10 +1,10 @@
-{% extends 'collection/notes.html.twig' %}
+{% extends '/collection/notes.html.twig' %}
{% block title %}{% trans %}%nickname%'s profile{% endtrans %}{% endblock %}
{% block body %}
{% block profile_view %}
- {% include 'cards/profile/view.html.twig' %}
+ {% include '/cards/blocks/profile.html.twig' %}
{% endblock profile_view %}
{{ parent() }}
diff --git a/templates/cards/attachments/show.html.twig b/templates/attachment/view.html.twig
similarity index 66%
rename from templates/cards/attachments/show.html.twig
rename to templates/attachment/view.html.twig
index 0328ea0eae..e2c893f8b3 100644
--- a/templates/cards/attachments/show.html.twig
+++ b/templates/attachment/view.html.twig
@@ -3,7 +3,7 @@
{% block body %}