Extended the user admin.

This commit is contained in:
James Cole
2016-10-15 07:11:53 +02:00
parent 6e4f2c0c8a
commit ac968dd6cd
9 changed files with 763 additions and 480 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -25,6 +25,7 @@ return [
'matchedOn' => 'Matched on',
'matchesOn' => 'Matched on',
'account_type' => 'Account type',
'created_at' => 'Created at',
'new_balance' => 'New balance',
'account' => 'Account',
'matchingAmount' => 'Amount',
@@ -71,4 +72,15 @@ return [
'blocked_code' => 'Block code',
'domain' => 'Domain',
'registration_attempts' => 'Registration attempts',
'accounts_count' => 'Number of accounts',
'journals_count' => 'Number of journals',
'attachments_count' => 'Number of attachments',
'bills_count' => 'Number of bills',
'categories_count' => 'Number of categories',
'export_jobs_count' => 'Number of export jobs',
'import_jobs_count' => 'Number of import jobs',
'budget_count' => 'Number of budgets',
'rule_and_groups_count' => 'Number of rules and rule groups',
'tags_count' => 'Number of tags',
];

View File

@@ -35,7 +35,8 @@
</div>
</td>
<td>#{{ user.id }}</td>
<td>{{ user.email }}</td>
<td>
<a href="{{ route('admin.users.show',user.id) }}">{{ user.email }}</a></td>
<td>
{{ user.created_at.formatLocalized(monthAndDayFormat) }}
{{ user.created_at.format('H:i') }}

View File

@@ -0,0 +1,151 @@
{% extends "./layout/default.twig" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, user) }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'user_information'|_ }}</h3>
</div>
<div class="box-body table-responsive">
<table class="table table-striped table-bordered">
<tbody>
<tr>
<td>{{ trans('list.id') }}</td>
<td>#{{ user.id }}</td>
</tr>
<tr>
<td>{{ trans('list.email') }}</td>
<td><a href="mailto:{{ user.email }}">{{ user.email }}</a>
<td>
</tr>
<tr>
<td>{{ trans('list.created_at') }}</td>
<td>
{{ user.created_at.formatLocalized(monthAndDayFormat) }}
{{ user.created_at.format('H:i') }}</td>
</tr>
<tr>
<td>{{ trans('list.registered_from') }}</td>
<td>{{ registration }} ({{ registrationHost }})</td>
</tr>
<tr>
<td>{{ trans('list.confirmed_from') }}</td>
<td>{{ confirmation }} ({{ confirmationHost }})</td>
</tr>
<tr>
<td>{{ trans('list.is_admin') }}</td>
<td>
{% if information.is_admin %}
<small class="text-success"><i class="fa fa-fw fa-check"></i></small> Yes
{% else %}
<small class="text-danger"><i class="fa fa-fw fa-times"></i></small> No
{% endif %}
</td>
</tr>
<tr>
<td>{{ trans('list.has_two_factor') }}</td>
<td>
{% if information.has_2fa %}
<small class="text-success"><i class="fa fa-fw fa-check"></i></small> Yes
{% else %}
<small class="text-danger"><i class="fa fa-fw fa-times"></i></small> No
{% endif %}
</td>
</tr>
<tr>
<td>{{ trans('list.is_activated') }}</td>
<td>
{% if information.activated %}
<small class="text-success"><i class="fa fa-fw fa-check"></i></small> Yes
{% else %}
<small class="text-danger"><i class="fa fa-fw fa-times"></i></small> No
{% endif %}
</td>
</tr>
<tr>
<td>{{ trans('list.is_blocked') }}</td>
<td>
{% if information.blocked == 1 %}
<small class="text-danger"><i class="fa fa-fw fa-check" title="{{ 'yes'|_ }}"></i></small> Yes:
{% if information.blocked_code == "" %}
<em>~</em>
{% else %}
{{ information.blocked_code }}
{% endif %}
{% else %}
<small class="text-success"><i class="fa fa-fw fa-times" title="{{ 'no'|_ }}"></i></small> No
{% endif %}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'user_data_information'|_ }}</h3>
</div>
<div class="box-body table-responsive">
<table class="table table-striped table-bordered">
<tr>
<td>{{ trans('list.accounts_count') }}</td>
<td>{{ information.accounts }}</td>
</tr>
<tr>
<td>{{ trans('list.journals_count') }}</td>
<td>{{ information.journals }} ({{ information.transactions }} {{ trans('firefly.transactions') }})</td>
</tr>
<tr>
<td>{{ trans('list.attachments_count') }}</td>
<td>{{ information.attachments }} ({{ trans('firefly.total_size') }}: {{ information.attachments_size|filesize }})</td>
</tr>
<tr>
<td>{{ trans('list.bills_count') }}</td>
<td>{{ information.bills }}</td>
</tr>
<tr>
<td>{{ trans('list.categories_count') }}</td>
<td>{{ information.categories }}</td>
</tr>
<tr>
<td>{{ trans('list.export_jobs_count') }}</td>
<td>{{ information.export_jobs }}, {{ trans('firefly.successful_count', {count: information.export_jobs_success}) }}
<!-- of which x successful --></td>
</tr>
<tr>
<td>{{ trans('list.import_jobs_count') }}</td>
<td>{{ information.import_jobs }}, {{ trans('firefly.successful_count', {count: information.import_jobs_success}) }}
<!-- of which x successful --></td>
</tr>
<tr>
<td>{{ trans('list.budget_count') }}</td>
<td>{{ information.budgets }} {{ trans('firefly.budget_or_budgets') }},
{{ information.budgets_with_limits }} {{ trans('firefly.budgets_with_limits') }}</td>
</tr>
<tr>
<td>{{ trans('list.rule_and_groups_count') }}</td>
<td>
{{ information.rules }} {{ 'rule_or_rules'|_ }} {{ 'in'|_ }} {{ information.rule_groups }}
{{ 'rulegroup_or_groups'|_ }}
</td>
</tr>
<tr>
<td>{{ trans('list.tags_count') }}</td>
<td>{{ information.tags }} tags</td>
</tr>
</table>
</div>
</div>
</div>
</div>
{% endblock %}