[Directory] Changed the route so the plugin Directory doesn't take over - query is not working for some reason

This commit is contained in:
Angelo D. Moura 2020-11-30 02:25:22 +00:00 committed by Hugo Sales
parent eb1ef4dd0f
commit 098fdb3361
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
4 changed files with 89 additions and 5 deletions

View File

@ -152,8 +152,8 @@ END;
{
return [
'_template' => 'network/groups.html.twig',
'groups' => DB::dql('select group from App\Entity\Groups group ' .
'order by group.created DESC'),
'groups' => DB::dql('select g from App\Entity\Group g ' .
'order by g.nickname ASC'),
];
}
}

View File

@ -55,6 +55,7 @@ abstract class Main
$r->connect('actors', '/actors', [C\Network::class, 'actors']);
$r->connect('groups', '/groups', [C\Network::class, 'groups']);
$r->connect('groups_stream', '/groups/stream', [C\Network::class, 'groups']);
$r->connect('panel', '/panel', [C\AdminPanel::class, 'site']);
$r->connect('panel_site', '/panel/site', [C\AdminPanel::class, 'site']);

View File

View File

@ -4,7 +4,7 @@
{{ parent() }}
{% endblock %}
{% block title %}Welcome!{% endblock %}
{% block title %}Actors{% endblock %}
{% block stylesheets %}
{{ parent() }}
@ -25,7 +25,90 @@
{% endblock %}
{% block body %}
<div class="content">
{% if post_form is defined %}
{{ form_start(post_form) }}
<div class="create-notice">
<div class="target">
<div class="target-top">
{{ form_label(post_form.to) }}
</div>
<div class="target-bot">
{{ form_widget(post_form.to) }}
</div>
</div>
<div class="create-right">
<div class="create-top-right">
<div class="scope">
{{ form_row(post_form.visibility) }}
</div>
<div class="tabs">
{% for tab in tabs %}
<a href={{ path(tab['href']) }}>{{ tab['title'] }}</a>
{% endfor %}
</div>
</div>
<div class="input-wrapper">
<div class="content-input">
{{ form_row(post_form.content) }}
</div>
</div>
<div class="notice-options">
<div class="attachments">
{{ form_widget(post_form.attachments) }}
<label for="{{ post_form.attachments.vars.id }}">
{{ icon('attach', 'icon icon-attach') | raw }}
</label>
</div>
<div class="post">
{{ form_row(post_form.post) }}
</div>
</div>
</div>
</div>
{{ form_end(post_form) }}
{% endif %}
<div class="main">
<nav class='main-nav'>
<ul>
<li>
<a href="{{ path('main_public') }}" class='hover-effect {{ active('main_public', 'main_all', "home_all") }}'>Timeline</a>
</li>
</ul>
</nav>
<div class="notes-wrap">
<nav class='main-nav'>
<ul>
<li>
<a href="{{ path('main_public') }}" class='hover-effect {{ active('main_public') }}'>Public</a>
</li>
{% if user_nickname is defined %}
<li>
<a href="{{ path("home_all", {'nickname' : user_nickname}) }}" class='hover-effect {{ active("home_all") }}'>Home</a>
</li>
{% endif %}
<li>
<a href="{{ path('main_all') }}" class='hover-effect {{ active('main_all') }}'>Network</a>
</li>
<li>
<a href="{{ path('groups_stream') }}" class='hover-effect {{ active('groups_stream') }}'>Groups</a>
</li>
</ul>
</nav>
<div class="timeline">
<div class="groups">
{% if groups is defined and groups is not empty %}
{% for group in groups %}
{% include '/group/group.html.twig' with {'group': group, 'have_user': have_user} only %}
{% endfor %}
{% else %}
<h1>{% trans %}No groups here.{% endtrans %}</h1>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endblock body %}
{% block javascripts %}{% endblock %}
{% block javascripts %}{% endblock %}