[PLUGIN][Pinned Notes] Allow user to pin his notes
This commit is contained in:
20
plugins/PinnedNotes/templates/PinnedNotes/notes.html.twig
Normal file
20
plugins/PinnedNotes/templates/PinnedNotes/notes.html.twig
Normal file
@@ -0,0 +1,20 @@
|
||||
{% import '/cards/note/view.html.twig' as noteView %}
|
||||
|
||||
{# Backwards compatibility with hAtom 0.1 #}
|
||||
{% if pinnednotes is not empty %}
|
||||
<main class="feed pinned" tabindex="0" role="feed">
|
||||
<h2>Pinned Notes</h2>
|
||||
<div class="h-feed hfeed notes">
|
||||
{% for conversation in pinnednotes %}
|
||||
{% block current_note %}
|
||||
{% if conversation is instanceof('array') %}
|
||||
{{ noteView.macro_note(conversation['note'], conversation['replies']) }}
|
||||
{% else %}
|
||||
{{ noteView.macro_note(conversation) }}
|
||||
{% endif %}
|
||||
<hr tabindex="0" title="{{ 'End of note and replies.' | trans }}">
|
||||
{% endblock current_note %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</main>
|
||||
{% endif %}
|
19
plugins/PinnedNotes/templates/PinnedNotes/toggle.html.twig
Normal file
19
plugins/PinnedNotes/templates/PinnedNotes/toggle.html.twig
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
{% import "/cards/note/view.html.twig" as noteView %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
<link rel="stylesheet" href="{{ asset('assets/default_theme/css/pages/feeds.css') }}" type="text/css">
|
||||
{% endblock stylesheets %}
|
||||
|
||||
{% block body %}
|
||||
{{ parent() }}
|
||||
<div class="page">
|
||||
<div class="main">
|
||||
{{ noteView.macro_note_minimal(note) }}
|
||||
{{ form(toggle_form) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock body %}
|
Reference in New Issue
Block a user