0% found this document useful (0 votes)
7 views3 pages

Updates

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Updates

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

<div class="container-fluid">

<div class="grid-container">
<div class="col-span-12">

<div class="page-title">
<i class="fad fa-cowbell-more"></i>
<span>{{ page['title'] }}</span>
</div>

<div class="services-top-box">
{% if types %}
<select class="form-control all-dropdown" onchange="location =
this.value;">
{% for typeItem in types %}
<option value="{{ page['url'] }}{% if typeItem.key != 'all' %}
{{ '/' ~ typeItem.key }}{% endif %}" {% if typeItem.key == type.key %}selected=""{%
endif %}>{{ typeItem.label }}</option>
{% endfor %}
</select>
{% endif %}
<form action="{{ page['url'] }}" method="get" id="history-search">
<div class="input-group">
<input type="text" name="search" class="form-control"
value="{{ search }}" placeholder="{{ lang('general.search.placeholder') }}">
<span class="input-group-btn">
<button type="submit" class="btn btn-default"><i class="fa
fa-search" aria-hidden="true"></i></button>
</span>
</div>
</form>
</div>

<div class="update-list">
{% for update in updatesList %}
<div class="update-box">
<div class="update-top">
<span class="update-service-
name">{{ update['service_id'] }} - {{ update['service'] }}</span>
<span class="update-date">{{ update['date'] }}</span>
</div>
<div class="update-bottom">
<span class="update-text">{{ update['update'] }}</span>
<span class="update-icon">
{% if (update['update'] starts with
lang('updates.new_service')) %}<i class="fa fa-plus" style="color:var(--tp-
green);"></i>
{% elseif (update['update'] starts with
lang('updates.rate.decreased')) %}<i class="fa fa-arrow-alt-down"
style="color:var(--tp-blue);"></i>
{% elseif (update['update'] starts with
lang('updates.rate.increased')) %}<i class="fa fa-arrow-alt-up" style="color:var(--
tp-red);"></i>
{% elseif (update['update'] starts with
lang('updates.service_enabled')) %}<i class="fa fa-check" style="color:var(--tp-
green);"></i>
{% elseif (update['update'] starts with
lang('updates.service_disabled')) %}<i class="fa fa-times" style="color:var(--tp-
yellow);"></i>
{% elseif (update['update'] starts with
lang('updates.service.deleted')) %}<i class="fa fa-times" style="color:var(--tp-
red);"></i>
{% else %}
#d52626;
{% endif %}
</span>
</div>
</div>
{% endfor %}
</div>

{% if pagination['count'] > 100 %}


{% if search %}
{% set params = {} %}
{% set params = params | merge(['search=' ~ search]) %}
{% set params = '?' ~ params|join('&') %}
{% endif %}
<ul class="pagination {% if site['rtl'] %} rtl-pagination {% endif
%}">
{% if pagination['current'] != 1 %}
<li>
<a href="{{ page['url'] }}{{ type.key != 'all' ? '/' ~ type.key
: '' }}{{ pagination['prev'] > 1 ? '/' ~ pagination['prev'] : '' }}{{ params }}"
aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
{% endif %}

{% set r, l = 3, 3 %}

{% if pagination['current'] == 1 %}
{% set r = 6 %}
{% endif %}

{% if pagination['current'] == 2 %}
{% set r = 5 %}
{% endif %}

{% if pagination['current'] >= pagination['pages'] %}


{% set l = 5 %}
{% endif %}

{% for i in 1..ceil(pagination['pages']) %}
{% if i >= (pagination['current']-l) and i <=
(pagination['current']+r) %}
<li{% if i == pagination['current'] %} class="active"{%
endif %}><a
href="{{ page['url'] }}{{ type.key != 'all' ? '/' ~
type.key : '' }}{{ i > 1 ? '/' ~ i : '' }}{{ params }}">{{ i }}</a></li>
{% endif %}
{% endfor %}

{% if pagination['current'] < pagination['pages'] %}


<li>
<a href="{{ page['url'] }}{{ type.key != 'all' ? '/' ~
type.key : '' }}/{{ pagination['next'] }}{{ params }}" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
{% endif %}
</ul>
{% endif %}
</div>
</div>
</div>

You might also like