Main page prototype.
This commit is contained in:
parent
0ff0db81a3
commit
af94e84256
|
@ -45,6 +45,7 @@ class MainController extends Controller
|
|||
'users_count' => $usersCount,
|
||||
'subscribers_count' => $subscribersCount,
|
||||
'events_count' => $eventsCount,
|
||||
'service_login' => $this->container->getParameter('point_login'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ index:
|
|||
user_show:
|
||||
path: /user/{login}
|
||||
defaults: { _controller: SkobkinPointToolsBundle:User:show }
|
||||
requirements:
|
||||
login: "[\w-]+"
|
||||
|
||||
users_top:
|
||||
path: /top
|
||||
|
|
|
@ -1,9 +1,31 @@
|
|||
{% 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 %}
|
||||
<h1>{{ users_count }}</h1>
|
||||
<h1>{{ subscribers_count }}</h1>
|
||||
<h1>{{ events_count }}</h1>
|
||||
<div class="container service-stats">
|
||||
<div class="row">
|
||||
<div class="col-xs-2"><span class="glyphicon glyphicon-user"></span> {{ 'All users'|trans }}</div>
|
||||
<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 %}
|
||||
|
|
Loading…
Reference in a new issue