Updates
Updates
<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>
{% set r, l = 3, 3 %}
{% if pagination['current'] == 1 %}
{% set r = 6 %}
{% endif %}
{% if pagination['current'] == 2 %}
{% set r = 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 %}