[Plugins][Components] Fixed issue where right panel form was rendered multiple times in actors plugin page. Actors page done.
This commit is contained in:
parent
e4b650be46
commit
6c899b7b61
@ -57,7 +57,7 @@ class Avatar extends Component
|
||||
|
||||
public function onStartTwigPopulateVars(array &$vars): bool
|
||||
{
|
||||
if (Common::user() != null) {
|
||||
if (Common::user() !== null) {
|
||||
$vars['user_avatar'] = self::getAvatarUrl();
|
||||
}
|
||||
return Event::next;
|
||||
|
@ -53,7 +53,7 @@ class Posting extends Component
|
||||
*/
|
||||
public function onStartTwigPopulateVars(array &$vars): bool
|
||||
{
|
||||
if (($user = Common::user()) == null) {
|
||||
if (($user = Common::user()) === null) {
|
||||
return Event::next;
|
||||
}
|
||||
|
||||
|
@ -21,10 +21,11 @@ namespace Component\Right;
|
||||
|
||||
use App\Core\Event;
|
||||
use App\Core\Modules\Component;
|
||||
use App\Util\Common;
|
||||
|
||||
class Right extends Component
|
||||
{
|
||||
public function onEndTwigPopulateVars(array &$vars)
|
||||
public function onStartTwigPopulateVars(array &$vars)
|
||||
{
|
||||
return Event::next;
|
||||
}
|
||||
|
@ -1,19 +1,15 @@
|
||||
{% extends 'stdgrid.html.twig' %}
|
||||
|
||||
{% set nickname = note.getActorNickname() %}
|
||||
|
||||
{% block title %}{{ nickname }}'s profile{% endblock %}
|
||||
{% set actor_nickname = actor.nickname() %}
|
||||
{% set actor_tags = actor.getSelfTags() %}
|
||||
{% set actor_bio = actor.getBio() %}
|
||||
|
||||
{% block body %}
|
||||
<section class="section-widget section-widget-padded">
|
||||
<div class="section-title">
|
||||
<img class="icon icon-avatar" src="{{ actor.getAvatarUrl() }}" alt="{{ nickname }}'s avatar">{{ nickname }}
|
||||
</div>
|
||||
<section class='section-widget section-widget-padded' title="{{ 'Your profile information.' | trans }}">
|
||||
<a id="user" href="{{ path('actor_view_nickname', {'nickname' : actor_nickname}) }}">
|
||||
<img src='{{ user_avatar }}' class="icon icon-avatar" alt="{{ 'Your account\'s avatar.' | trans }}">
|
||||
<div class="user-info">
|
||||
<strong id="user-nickname" title="{{ 'Your account\' nickname.' | trans }}">{{ actor_nickname }}</strong>
|
||||
|
||||
<div class="actor-nickname-and-tags">
|
||||
{% set actor_tags = actor.getSelfTags() %}
|
||||
|
||||
<div class="tags">
|
||||
<nav class="user-tags">
|
||||
{% if actor_tags %}
|
||||
{% for tag in actor_tags %}
|
||||
<a href='#'><i> #{{ tag }} </i></a>
|
||||
@ -21,17 +17,16 @@
|
||||
{% else %}
|
||||
<i> {{ '(No tags)' | trans }} </i>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{% set actor_bio = actor.getBio() %}
|
||||
<div class="actor-bio">
|
||||
<section class="user-bio">
|
||||
{% if actor_bio %}
|
||||
<p>{{ actor_bio }}</p>
|
||||
{% else %}
|
||||
<p>{{ '(No bio)' | trans }}</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</a>
|
||||
</section>
|
||||
{% endblock body %}
|
@ -4,10 +4,12 @@
|
||||
|
||||
{% block body %}
|
||||
<section class="section-widget section-widget-padded">
|
||||
<div class="actors">
|
||||
<h2 class="section-title">{{ "Actors" | trans }}</h2>
|
||||
|
||||
<div class="section-widget-padded">
|
||||
{% if actors is defined and actors is not empty %}
|
||||
{% for actor in actors %}
|
||||
{% include 'directory/actor.html.twig' with {'actor': actor, 'have_user': have_user} only %}
|
||||
{% include 'directory/actor.html.twig' %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h1>{% trans %}No actors here.{% endtrans %}</h1>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<a id="anchor-right-panel" class="anchor-hidden" title="{{ 'Press tab to access selected region!' | trans }}"></a>
|
||||
<aside class="panel-content accessibility-target">
|
||||
|
||||
{% if post_form is defined %}
|
||||
{% if post_form is defined and not post_form.isRendered() %}
|
||||
<section class="section-widget" title={{ 'Create a new note.' | trans }}>
|
||||
<details class="section-title-details" title={{ 'Expand if you want to access more options.' | trans }}>
|
||||
<summary class="section-title-summary">
|
||||
|
Loading…
Reference in New Issue
Block a user