diff --git a/src/Skobkin/Bundle/PointToolsBundle/Controller/MainController.php b/src/Skobkin/Bundle/PointToolsBundle/Controller/MainController.php index 4a050b6..5c5259a 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Controller/MainController.php +++ b/src/Skobkin/Bundle/PointToolsBundle/Controller/MainController.php @@ -45,6 +45,7 @@ class MainController extends Controller 'users_count' => $usersCount, 'subscribers_count' => $subscribersCount, 'events_count' => $eventsCount, + 'service_login' => $this->container->getParameter('point_login'), ]); } diff --git a/src/Skobkin/Bundle/PointToolsBundle/Resources/config/routing.yml b/src/Skobkin/Bundle/PointToolsBundle/Resources/config/routing.yml index 2e4f28b..d65dfd9 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Resources/config/routing.yml +++ b/src/Skobkin/Bundle/PointToolsBundle/Resources/config/routing.yml @@ -5,6 +5,8 @@ index: user_show: path: /user/{login} defaults: { _controller: SkobkinPointToolsBundle:User:show } + requirements: + login: "[\w-]+" users_top: path: /top diff --git a/src/Skobkin/Bundle/PointToolsBundle/Resources/views/Main/index.html.twig b/src/Skobkin/Bundle/PointToolsBundle/Resources/views/Main/index.html.twig index b1f7162..65ee3be 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Resources/views/Main/index.html.twig +++ b/src/Skobkin/Bundle/PointToolsBundle/Resources/views/Main/index.html.twig @@ -1,9 +1,31 @@ {% extends "::base.html.twig" %} -{% block title %}SkobkinPointToolsBundle:Main:index{% endblock %} +{% block content %} +
+
+
+ +
+
@
+ +
+
+ +
+
-{% block body %} -

{{ users_count }}

-

{{ subscribers_count }}

-

{{ events_count }}

+
+
+
{{ 'All users'|trans }}
+
{{ users_count }}
+
+
+
{{ 'Subscribed users'|trans }}
+ +
+
+
{{ 'Last events'|trans }}
+
{{ events_count }}
+
+
{% endblock %}