Merge branch 'Xbird/FixIssues' into 'main'
Fix some issues Closes #4, #3, #5, and #6 See merge request gamexperience/vision!17
This commit is contained in:
@@ -48,12 +48,22 @@ class AdminController extends AbstractController
|
||||
): Response {
|
||||
return $this->render('admin/index.html.twig', [
|
||||
'controller_name' => 'AdminController',
|
||||
'documents' => $DocumentRepository->findAll(),
|
||||
'users' => $UserRepository->findAll(),
|
||||
'directories' => $DirectoryRepository->findAll(),
|
||||
'folders' => $DocumentRepository->list()->limitType("Folder")->getResult(),
|
||||
'gangs' => $DocumentRepository->list()->limitType("Gang")->getResult(),
|
||||
'groups' => $GroupRepository->findAll(),
|
||||
'documents' => $DocumentRepository->list()->order(['createdAt' => 'DESC'])->limit(5)->getResult(),
|
||||
'users' => $UserRepository->getAll()->order(['createdAt' => 'DESC'])->limit(5)->getResult(),
|
||||
'directories' => $DirectoryRepository->list()->order(['createdAt' => 'DESC'])->limit(5)->getResult(),
|
||||
'folders' => $DocumentRepository
|
||||
->list()
|
||||
->limitType("Folder")
|
||||
->order(['createdAt' => 'DESC'])
|
||||
->limit(5)
|
||||
->getResult(),
|
||||
'gangs' => $DocumentRepository
|
||||
->list()
|
||||
->limitType("Gang")
|
||||
->order(['createdAt' => 'DESC'])
|
||||
->limit(5)
|
||||
->getResult(),
|
||||
'groups' => $GroupRepository->getAll()->order(['createdAt' => 'DESC'])->limit(5)->getResult(),
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,11 @@ class DirectoryController extends AbstractController
|
||||
* @var CertificateRepository $repo
|
||||
*/
|
||||
$repo = $entityManager->getRepository('App\Entity\\' . $dType);
|
||||
$RenderArray[$dType] = $repo->listForUser($this->getUser())->limitDirectory($Directory)->getResult();
|
||||
$RenderArray[$dType] = $repo->listForUser($this->getUser())
|
||||
->limitDirectory($Directory)
|
||||
->order(['createdAt' => 'DESC'])
|
||||
->limit(4)
|
||||
->getResult();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class AdminUserType extends AbstractType
|
||||
},
|
||||
]);
|
||||
|
||||
if (!$UserGroup->getSubGroups()->isEmpty()) {
|
||||
if ($UserGroup != null && !$UserGroup->getSubGroups()->isEmpty()) {
|
||||
$builder
|
||||
->add('subGroups', EntityType::class, [
|
||||
'class' => SubGroup::class,
|
||||
|
||||
@@ -87,8 +87,8 @@
|
||||
<hr>
|
||||
<div class="border-start p-3">
|
||||
<div class="card">
|
||||
<div class="card-body">{{ app.user.mainGroup.motd | raw }}</div>
|
||||
<div class="card-footer">{% trans %}title_last_update{% endtrans %} : {{ app.user.mainGroup.motdUpdatedAt | date('_datetime.format'|trans) }}</div>
|
||||
<div class="card-body">{{ group.motd | raw }}</div>
|
||||
<div class="card-footer">{% trans %}title_last_update{% endtrans %} : {{ group.motdUpdatedAt | date('_datetime.format'|trans) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}{% trans %}title_directory_list{% endtrans %}{% endblock %}
|
||||
{% block subtitle %}{% trans %}title_directory_list{% endtrans %}{% if app.user.hasPermission('group_administrate') %} <a href="{{ path('directory_create') }}"><span class="badge rounded-pill bg-success"><i class="fa fa-plus"></i> {% trans %}button_create{% endtrans %}</span></a>{% endif %}{% endblock %}
|
||||
{% block subtitle %}{% trans %}title_directory_list{% endtrans %}{% if app.user.hasPermission('directory_create') %} <a href="{{ path('directory_create') }}"><span class="badge rounded-pill bg-success"><i class="fa fa-plus"></i> {% trans %}button_create{% endtrans %}</span></a>{% endif %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user