diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig
index ad7855b..a8583c2 100644
--- a/app/Resources/views/base.html.twig
+++ b/app/Resources/views/base.html.twig
@@ -1,6 +1,6 @@
{% extends '::layout.html.twig' %}
-{% block header_title %}Point-Tools{% endblock %}
+{% block header_title %}Point Tools{% endblock %}
{% block css %}
{{ parent() }}
@@ -19,13 +19,13 @@
- Point-Tools
+ Point Tools
{% block header_navbar_menus %}
{% endblock %}
@@ -45,7 +45,7 @@
diff --git a/app/config/config.yml b/app/config/config.yml
index 042fec5..6268325 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -25,6 +25,11 @@ framework:
fragments: ~
http_method_override: true
+sensio_framework_extra:
+ request:
+ converters: true
+ auto_convert: false
+
# Twig Configuration
twig:
debug: "%kernel.debug%"
diff --git a/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php b/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php
index 06e5268..d6b893c 100644
--- a/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php
+++ b/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php
@@ -4,13 +4,38 @@ namespace Skobkin\Bundle\PointToolsBundle\Controller;
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\ORM\EntityManager;
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
+use Skobkin\Bundle\PointToolsBundle\Entity\User;
+use Skobkin\Bundle\PointToolsBundle\Service\UserApi;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class UserController extends Controller
{
- public function showAction($login)
+ /**
+ * @param
+ * @ParamConverter("user", class="SkobkinPointToolsBundle:User", options={"login" = "login"})
+ */
+ public function showAction(User $user)
{
- return $this->render('SkobkinPointToolsBundle:User:show.html.twig', []);
+ $userApi = $this->container->get('skobkin_point_tools.api_user');
+
+ /** @var QueryBuilder $qb */
+ $qb = $this->getDoctrine()->getManager()->getRepository('SkobkinPointToolsBundle:SubscriptionEvent')->createQueryBuilder('se');
+
+ $subscriptionsEvents = $qb
+ ->select()
+ ->where('se.author = :author')
+ ->orderBy('se.date', 'desc')
+ ->setMaxResults(30)
+ ->setParameter('author', $user)
+ ->getQuery()->getResult()
+ ;
+
+ return $this->render('SkobkinPointToolsBundle:User:show.html.twig', [
+ 'user' => $user,
+ 'log' => $subscriptionsEvents,
+ 'avatar_url' => $userApi->getAvatarUrl($user, UserApi::AVATAR_SIZE_LARGE),
+ ]);
}
public function topAction()
diff --git a/src/Skobkin/Bundle/PointToolsBundle/Resources/public/css/main.css b/src/Skobkin/Bundle/PointToolsBundle/Resources/public/css/main.css
index afe98b1..2818740 100644
--- a/src/Skobkin/Bundle/PointToolsBundle/Resources/public/css/main.css
+++ b/src/Skobkin/Bundle/PointToolsBundle/Resources/public/css/main.css
@@ -34,6 +34,14 @@ body > .container {
padding: 60px 15px 0;
}
+.user-subscribers {
+ margin-top: 30px;
+}
+
+h4.panel-title a {
+ text-decoration: none;
+}
+
.user:before {
position: relative;
top: 1px;
@@ -58,11 +66,18 @@ body > .container {
}
+h1.user-login a {
+ text-decoration: none;
+ margin-left: 10px;
+}
+
ul.users.mosaic {
list-style: none;
columns: 140px auto;
-webkit-columns: 140px auto;
-moz-columns: 140px auto;
+ padding-left: 0px;
+ margin-left: 8px;
}
ul.users.mosaic li {
@@ -79,10 +94,6 @@ ul.users.mosaic li:nth-child(odd) {
background-color: #EFEFEF;
}
-#travel-client-data-form {
- margin-top: 20px;
-}
-
/* Required quick fix */
.required:after {
content: " *";
diff --git a/src/Skobkin/Bundle/PointToolsBundle/Resources/views/User/show.html.twig b/src/Skobkin/Bundle/PointToolsBundle/Resources/views/User/show.html.twig
index cc43ab9..081a218 100644
--- a/src/Skobkin/Bundle/PointToolsBundle/Resources/views/User/show.html.twig
+++ b/src/Skobkin/Bundle/PointToolsBundle/Resources/views/User/show.html.twig
@@ -1,7 +1,76 @@
{% extends "::base.html.twig" %}
-{% block title %}SkobkinPointToolsBundle:User:show{% endblock %}
+{% block header_title %}{{ user.login }} @ Point Tools{% endblock %}
-{% block body %}
-Welcome to the User:show page
+{% block content %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ 'User'|trans }} |
+ {{ 'Action'|trans }} |
+ {{ 'Date'|trans }} |
+
+
+
+ {% for event in log %}
+
+
+ @{{ event.subscriber.login }}
+ |
+
+
+ |
+
+ {# Use DateTime helper: https://sonata-project.org/bundles/intl/master/doc/reference/datetime.html #}
+ {{ event.date|date('H:i:s d F Y') }}
+ |
+
+ {% endfor %}
+
+
+
+
+
+
+
{% endblock %}