forked from GNUsocial/gnu-social
[CARDS][Note] Notification targets are now used as target info, instead of previous reply dependant implementation [COMPONENTS][Group] Feed title is applied to GroupFeed view
This commit is contained in:
parent
d5731e6351
commit
26a50618b0
@ -26,18 +26,19 @@ namespace Component\Group\Controller;
|
|||||||
use App\Core\Cache;
|
use App\Core\Cache;
|
||||||
use App\Core\DB\DB;
|
use App\Core\DB\DB;
|
||||||
use App\Core\Form;
|
use App\Core\Form;
|
||||||
|
use function App\Core\I18n\_m;
|
||||||
use App\Core\Router\Router;
|
use App\Core\Router\Router;
|
||||||
use App\Entity as E;
|
|
||||||
use App\Entity\Actor;
|
use App\Entity\Actor;
|
||||||
|
use App\Entity as E;
|
||||||
use App\Util\Common;
|
use App\Util\Common;
|
||||||
use App\Util\Exception\ClientException;
|
use App\Util\Exception\ClientException;
|
||||||
use App\Util\Exception\ServerException;
|
use App\Util\Exception\ServerException;
|
||||||
|
use App\Util\HTML\Heading;
|
||||||
use Component\Collection\Util\Controller\FeedController;
|
use Component\Collection\Util\Controller\FeedController;
|
||||||
use Component\Group\Entity\LocalGroup;
|
use Component\Group\Entity\LocalGroup;
|
||||||
use Component\Subscription\Entity\ActorSubscription;
|
use Component\Subscription\Entity\ActorSubscription;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use function App\Core\I18n\_m;
|
|
||||||
|
|
||||||
class GroupFeed extends FeedController
|
class GroupFeed extends FeedController
|
||||||
{
|
{
|
||||||
@ -86,6 +87,7 @@ class GroupFeed extends FeedController
|
|||||||
'actor' => $group,
|
'actor' => $group,
|
||||||
'nickname' => $group->getNickname(),
|
'nickname' => $group->getNickname(),
|
||||||
'notes' => $notes,
|
'notes' => $notes,
|
||||||
|
'notes_feed_title' => (new Heading(1, [], $group->getNickname() . '\'s feed')),
|
||||||
'subscribe_form' => $subscribe_form?->createView(),
|
'subscribe_form' => $subscribe_form?->createView(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
{% block profile_view %}
|
{% block profile_view %}
|
||||||
{% include 'cards/blocks/profile.html.twig' with { 'actor': actor } only %}
|
{% include 'cards/blocks/profile.html.twig' with { 'actor': actor } only %}
|
||||||
{% endblock profile_view %}
|
{% endblock profile_view %}
|
||||||
|
<hr>
|
||||||
{% if notes is defined %}
|
{% if notes is defined %}
|
||||||
{{ parent() }}
|
{{ parent() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
-o-mask-image: url(icons/add-actor.svg);
|
-o-mask-image: url(icons/add-actor.svg);
|
||||||
-webkit-mask-image: url(icons/add-actor.svg);
|
-webkit-mask-image: url(icons/add-actor.svg);
|
||||||
mask-image: url(icons/add-actor.svg);
|
mask-image: url(icons/add-actor.svg);
|
||||||
|
opacity: initial !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert button {
|
.alert button {
|
||||||
|
@ -30,12 +30,6 @@
|
|||||||
<div class="note-replies-start"></div>
|
<div class="note-replies-start"></div>
|
||||||
<div class="u-in-reply-to replies">
|
<div class="u-in-reply-to replies">
|
||||||
{% for conversation in replies %}
|
{% for conversation in replies %}
|
||||||
{% if extra.depth is defined %}
|
|
||||||
{% set depth_increment = {'depth': extra.depth + 1} %}
|
|
||||||
{% set parent = {'parent': block('note_author')} %}
|
|
||||||
{% set extra = extra|merge(depth_increment) %}
|
|
||||||
{% set extra = extra|merge(parent) %}
|
|
||||||
{% endif %}
|
|
||||||
<span class="note-replies-indicator" role="presentation"></span>
|
<span class="note-replies-indicator" role="presentation"></span>
|
||||||
{% set args = { 'type': 'vanilla_full', 'note': conversation['note'], 'replies': conversation['replies'] | default, 'extra': extra } %}
|
{% set args = { 'type': 'vanilla_full', 'note': conversation['note'], 'replies': conversation['replies'] | default, 'extra': extra } %}
|
||||||
{{ NoteFactory.constructor(args) }}
|
{{ NoteFactory.constructor(args) }}
|
||||||
|
@ -25,14 +25,26 @@
|
|||||||
{{ block('note_info', 'cards/blocks/note.html.twig') }}
|
{{ block('note_info', 'cards/blocks/note.html.twig') }}
|
||||||
|
|
||||||
<section class="e-content entry-content note-content" title="{{ 'Note\'s main content' | trans }}">
|
<section class="e-content entry-content note-content" title="{{ 'Note\'s main content' | trans }}">
|
||||||
{% if extra.parent is defined %}
|
{% set notification_targets = note.getNotificationTargets() %}
|
||||||
<em
|
{% if notification_targets is not empty %}
|
||||||
tabindex="0"
|
{% for target in notification_targets %}
|
||||||
|
{% if target.isGroup() %}
|
||||||
|
<em tabindex="0"
|
||||||
class="note-replies-parent"
|
class="note-replies-parent"
|
||||||
title="{{'This is a reply with depth: ' | trans}} {{ extra.depth }}"
|
title="{{'The group in which this note was addressed to' | trans}}">
|
||||||
aria-flowto="note-anchor-">
|
{{'in ' | trans}}
|
||||||
{{'in reply to' | trans}} {{ extra.parent | raw }}
|
<a href="{{ target.getUrl() }}">{{ mention(target) | raw }}</a>
|
||||||
</em>
|
</em>
|
||||||
|
{% else %}
|
||||||
|
<em tabindex="0"
|
||||||
|
class="note-replies-parent"
|
||||||
|
title="{{'Whom this is a reply to' | trans}}"
|
||||||
|
aria-flowto="note-anchor-{{ note.getReplyTo() }}">
|
||||||
|
{{'in reply to' | trans}}
|
||||||
|
<a href="{{ target.getUrl() }}">{{ mention(target) | raw }}</a>
|
||||||
|
</em>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ block('note_text', 'cards/blocks/note.html.twig') }}
|
{{ block('note_text', 'cards/blocks/note.html.twig') }}
|
||||||
{{ block('note_attachments', 'cards/blocks/note.html.twig') }}
|
{{ block('note_attachments', 'cards/blocks/note.html.twig') }}
|
||||||
|
Loading…
Reference in New Issue
Block a user