Improve sortability in various lists.

This commit is contained in:
James Cole
2016-11-20 15:30:16 +01:00
parent 78f297e18f
commit 0b613c3b8c
7 changed files with 83 additions and 55 deletions

View File

@@ -5,19 +5,18 @@
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<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">{{ 'all_blocked_domains'|_ }}</h3>
</div>
<div class="box-body table-responsive">
<div class="box-body table-responsive no-padding">
{% if domains|length > 0 %}
<table class="table table-condensed sortable">
<table class="table table-condensed table-hover sortable">
<thead>
<tr>
<th style="width:20%;">&nbsp;</th>
<th>{{ trans('list.domain') }}</th>
<th>{{ trans('list.is_blocked') }}</th>
<th data-defaultsort="disabled" style="width:20%;">&nbsp;</th>
<th data-defaultsign="az">{{ trans('list.domain') }}</th>
</tr>
</thead>
<tbody>
@@ -27,9 +26,9 @@
<a href="{{ route('admin.users.domains.block-toggle', [domain]) }}" class="btn btn-sm btn-success"><i
class="fa fa-fw fa-times"></i> unblock</a>
</td>
<td>{{ domain }}</td>
<td>
<small class="text-success"><i class="fa fa-fw fa-check"></i></small>
<td data-value="{{ domain }}">
<a href="http://{{ domain }}/">{{ domain }}</a>
(<a href="http://whois.domaintools.com/{{ domain }}">whois</a>)
</td>
</tr>
{% endfor %}
@@ -43,12 +42,9 @@
</div>
</div>
</div>
</div>
<!-- domains found in users (not in top list) -->
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<!-- domains found in users (not in top list) -->
<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">{{ 'all_user_domains'|_ }}</h3>
@@ -59,11 +55,11 @@
{{ 'all_domains_is_filtered'|_ }}
</p>
<table class="table table-condensed sortable">
<table class="table table-condensed table-hover sortable">
<thead>
<tr>
<th style="width:20%;">&nbsp;</th>
<th>{{ trans('list.domain') }}</th>
<th data-defaultsort="disabled" style="width:20%;">&nbsp;</th>
<th data-defaultsign="az">{{ trans('list.domain') }}</th>
</tr>
</thead>
<tbody>

View File

@@ -14,16 +14,16 @@
<table class="table table-condensed sortable">
<thead>
<tr>
<th class="hidden-xs" colspan="2">&nbsp;</th>
<th>{{ trans('list.email') }}</th>
<th class="hidden-xs">{{ trans('list.registered_at') }}</th>
<th class="hidden-xs">{{ trans('list.registered_from') }}</th>
<th class="hidden-xs">{{ trans('list.confirmed_from') }}</th>
<th data-defaultsign="_19" class="hidden-xs" colspan="2">&nbsp;</th>
<th data-defaultsign="az">{{ trans('list.email') }}</th>
<th data-defaultsign="month" class="hidden-xs">{{ trans('list.registered_at') }}</th>
<th data-defaultsign="az" class="hidden-xs">{{ trans('list.registered_from') }}</th>
<th data-defaultsign="az" class="hidden-xs">{{ trans('list.confirmed_from') }}</th>
<th class="hidden-xs">{{ trans('list.is_admin') }}</th>
<th class="hidden-xs">{{ trans('list.has_two_factor') }}</th>
<th>{{ trans('list.is_activated') }}</th>
<th>{{ trans('list.is_blocked') }}</th>
<th class="hidden-xs">{{ trans('list.blocked_code') }}</th>
<th data-defaultsign="az" class="hidden-xs">{{ trans('list.blocked_code') }}</th>
</tr>
</thead>
<tbody>
@@ -41,11 +41,17 @@
{{ user.created_at.formatLocalized(monthAndDayFormat) }}
{{ user.created_at.format('H:i') }}
</td>
<td class="hidden-xs">
{{ Preferences.getForUser(user,"registration_ip_address").data }}
<td data-value="{{ user.prefs.registration_ip_address }}" class="hidden-xs">
{{ user.prefs.registration_ip_address }}
{% if user.prefs.registration_ip_address|length > 0 %}
(<a href="http://whois.domaintools.com/{{ user.prefs.registration_ip_address }}">whois</a>)
{% endif %}
</td>
<td class="hidden-xs">
{{ Preferences.getForUser(user,"confirmation_ip_address").data }}
<td data-value="{{ user.prefs.confirmation_ip_address }}" class="hidden-xs">
{{ user.prefs.confirmation_ip_address }}
{% if user.prefs.confirmation_ip_address|length > 0 %}
(<a href="http://whois.domaintools.com/{{ user.prefs.confirmation_ip_address }}">whois</a>)
{% endif %}
</td>
<td class="hidden-xs" data-value="{% if user.isAdmin %}1{% else %}0{% endif %}">
{% if user.isAdmin %}