aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/note.php33
-rw-r--r--templates/reply_form.php5
-rw-r--r--templates/write_note_form.php13
3 files changed, 44 insertions, 7 deletions
diff --git a/templates/note.php b/templates/note.php
index 0a19475..0de2168 100644
--- a/templates/note.php
+++ b/templates/note.php
@@ -1,5 +1,6 @@
<?php
use Digitigrade\Model\InteractionKind;
+use Digitigrade\Model\NotePrivacyScope;
use Digitigrade\Model\UserAccount;
$user = UserAccount::findByCurrentSession();
@@ -26,18 +27,36 @@ if ($user != null) {
)
?>
</a>
+ <span class="privacyScope inlineIcon material-symbols-outlined" title="<?= match ($note->privacy->scope) {
+ NotePrivacyScope::NONE => __('note.privacy.scope.none'),
+ NotePrivacyScope::MUTUALS => __('note.privacy.scope.mutuals'),
+ NotePrivacyScope::FOLLOWERS => __('note.privacy.scope.followers'),
+ NotePrivacyScope::PUBLIC => __('note.privacy.scope.public')
+ } . '">' . match ($note->privacy->scope) {
+ NotePrivacyScope::NONE => 'lock',
+ NotePrivacyScope::MUTUALS => 'group',
+ NotePrivacyScope::FOLLOWERS => 'groups',
+ NotePrivacyScope::PUBLIC => 'public'
+ } ?></span>
</div>
<?php if (isset($note->inReplyTo)): ?>
- <div class="replyInfo">
- <a href="/@/<?= $note->inReplyTo->author->getFullHandle() ?>/note/<?= $note->inReplyTo->id ?>">
- <span class="material-symbols-outlined inlineIcon">reply</span>
- <?= sprintf(__('note.info.replyTo'),
- '<b>' . $note->inReplyTo->author->displayName) . '</b>' ?>
- </a>
+ <div class=" replyInfo">
+ <a href="/@/<?= $note->inReplyTo->author->getFullHandle() ?>/note/<?= $note->inReplyTo->id ?>">
+ <span class="material-symbols-outlined inlineIcon">reply</span>
+ <?= sprintf(__('note.info.replyTo'),
+ '<b>' . $note->inReplyTo->author->displayName) . '</b>' ?>
+ </a>
</div>
<?php endif; ?>
<div class="content">
- <?= $note->getFormattedContent('text/html') ?? htmlspecialchars($note->plainContent) ?>
+ <?php if (isset($note->summary)): ?>
+ <details>
+ <summary><?= htmlspecialchars($note->summary) ?></summary>
+ <?php endif; ?>
+ <?= $note->getFormattedContent('text/html') ?? htmlspecialchars($note->plainContent) ?>
+ <?php if (isset($note->summary)): ?>
+ </details>
+ <?php endif; ?>
</div>
<div class="buttons">
<?php foreach (['like', 'dislike', 'reshare'] as $action) {
diff --git a/templates/reply_form.php b/templates/reply_form.php
index 9a1d7e5..3434472 100644
--- a/templates/reply_form.php
+++ b/templates/reply_form.php
@@ -6,6 +6,11 @@
<textarea id="replyContent-<?= $note->id ?>" name="content" required autocomplete="off"></textarea>
</div>
<div class="row">
+ <label for="replySummary-<?= $note->id ?>"><?= __('writeNote.summary.label') ?></label>
+ <input type="text" id="replySummary-<?= $note->id ?>" name="summary" autocomplete="off"
+ value="<?= $note->summary ? "re: $note->summary" : '' ?>">
+ </div>
+ <div class="row">
<button class="primary"><?= __('writeReply.action') ?></button>
</div>
</form> \ No newline at end of file
diff --git a/templates/write_note_form.php b/templates/write_note_form.php
index c28dc12..b74de69 100644
--- a/templates/write_note_form.php
+++ b/templates/write_note_form.php
@@ -5,6 +5,19 @@
<textarea name="content" id="noteContent" required autocomplete="off"></textarea>
</div>
<div class="row">
+ <label for="noteSummary"><?= __('writeNote.summary.label') ?></label>
+ <input type="text" id="noteSummary" name="summary" autocomplete="off">
+ </div>
+ <div class="row">
+ <label for="noteScope"><?= __('writeNote.scope.label') ?></label>
+ <select name="scope" id="noteScope" required autocomplete="off">
+ <option value="none"><?= __('note.privacy.scope.none') ?></option>
+ <option value="mutuals"><?= __('note.privacy.scope.mutuals') ?></option>
+ <option value="followers"><?= __('note.privacy.scope.followers') ?></option>
+ <option value="public" selected><?= __('note.privacy.scope.public') ?></option>
+ </select>
+ </div>
+ <div class="row">
<button class="primary"><?= __('writeNote.action') ?></button>
</div>
</form> \ No newline at end of file