{% include 'header.twig' %}



<div class="wrapper-content">
	<div class="wrapper-content__header"></div>
	<div class="wrapper-content__body">

		
		<!-- Main variables *content* -->
		<div id="block_345">
			<div class="orders-history ">
				<div class="bg"></div>
				<div class="divider-top"></div>
				<div class="divider-bottom"></div>
				<div class="container-fluid">

					<div class="row px-lg-4">
						<div class="col">
							<div class="orders-history__margin-table">
								<div class="table-bg component_table ">
									<div class="table-wr ">
										<table class="table">
											<thead>
												<tr>
													 
																			</div>
																		</div>
																	</form>
																</div>
															</div>
														</div>
													</th>
												</tr>
											</thead>
										</table>
										<div class="table-responsive table-responsive__search ">
											<table class="table">
												<thead>
													<tr>
 
														<th>Title</th>
														<th class="width-service-name">Content</th>

														<th class="nowrap">Date</th>
													 


													</tr>
												</thead>
												<tbody>
{% for new in newsList %}
														<tr>
														 
															<td> <img width="30" class="mr-1" src="/img/icons/{{ new['news_icon'] }}.png">{{ new['news_title'] }}</td>
															<td>

															 {{ new['news_content'] }}
															</td>
															<td>{{ new['news_date'] }}</td>


														</tr>
													{% endfor %}


												</tbody>
											</table>
										</div>

									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="row px-lg-4">
						<div class="col-5">
							<nav class="component_pagination">
								{% if pagination["count"] > 1 %}
									<br>
									<div class="row">
										<div class="col-5">
											<nav class="component_pagination">
												<div class="">
													<ul class="pagination">

														{% if pagination["current"] != 1 %}
															<li>
																<a href="updates/{{ pagination[" previous"] }}{% if search %}?search={{ search }}{% endif %}" aria-label="Previous">
																	<span aria-hidden="true">«</span>
																</a>
															</li>
														{% endif %}

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

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

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

														{% if pagination['current'] >= pagination['count'] %}
															{% set l = 5 %}
														{% endif %}

														{% for page in 1..pagination["count"] %}
															{% if page >= (pagination['current']-l) and page <= (pagination['current']+r) %}
																<li class="page-item pagination-item  {% if page == pagination['current'] %} pagination-item__active {% endif %} ">
																	<a href="updates/{{ page }}{% if search %}?search={{ search }}{% endif %}" class="page-link pagination-link">{{ page }}</a>
																</li>
																{%endif%}
															{% endfor %}

															{% if pagination['current'] < pagination['count'] %}
																<li>
																	<a href="updates/{{ pagination['next'] }}{% if search %}?search={{ search }}{% endif %}" aria-label="Next">
																		<span aria-hidden="true">»</span>
																	</a>
																</li>
															{% endif %}

														</ul>
													</div>
												</div>
											</nav>
										</div>
									{% endif %}
								</nav>
							</div>
						</div>
					</div>
				</div>
			</div>
			{% include 'footer.twig' %}
