Main page prototype.

This commit is contained in:
Alexey Skobkin 2015-05-31 03:01:48 +03:00
parent 0ff0db81a3
commit af94e84256
3 changed files with 30 additions and 5 deletions

View file

@ -45,6 +45,7 @@ class MainController extends Controller
'users_count' => $usersCount, 'users_count' => $usersCount,
'subscribers_count' => $subscribersCount, 'subscribers_count' => $subscribersCount,
'events_count' => $eventsCount, 'events_count' => $eventsCount,
'service_login' => $this->container->getParameter('point_login'),
]); ]);
} }

View file

@ -5,6 +5,8 @@ index:
user_show: user_show:
path: /user/{login} path: /user/{login}
defaults: { _controller: SkobkinPointToolsBundle:User:show } defaults: { _controller: SkobkinPointToolsBundle:User:show }
requirements:
login: "[\w-]+"
users_top: users_top:
path: /top path: /top

View file

@ -1,9 +1,31 @@
{% extends "::base.html.twig" %} {% extends "::base.html.twig" %}
{% block title %}SkobkinPointToolsBundle:Main:index{% endblock %} {% block content %}
<div class="well well-lg">
<form class="form-inline">
<div class="form-group">
<label class="sr-only" for="index-input-username">Username</label>
<div class="input-group">
<div class="input-group-addon">@</div>
<input type="text" class="form-control" id="index-input-username" placeholder="username">
</div>
</div>
<button type="submit" class="btn btn-primary">Search</button>
</form>
</div>
{% block body %} <div class="container service-stats">
<h1>{{ users_count }}</h1> <div class="row">
<h1>{{ subscribers_count }}</h1> <div class="col-xs-2"><span class="glyphicon glyphicon-user"></span> {{ 'All users'|trans }}</div>
<h1>{{ events_count }}</h1> <div class="col-xs-2">{{ users_count }}</div>
</div>
<div class="row">
<div class="col-xs-2"><span class="glyphicon glyphicon-user"></span> {{ 'Subscribed users'|trans }}</div>
<div class="col-xs-2"><a href="{{ url('user_show', {'login': service_login}) }}">{{ subscribers_count }}</a></div>
</div>
<div class="row">
<div class="col-xs-2"><span class="glyphicon glyphicon-list"></span> {{ 'Last events'|trans }}</div>
<div class="col-xs-2">{{ events_count }}</div>
</div>
</div>
{% endblock %} {% endblock %}