<div class="col-12">
	{include file='main/datatable.tpl' tableTitle="Все лоты:"
	theads=["id", "lang", "title", "category", "views", "actions"]
	data=$lots }
    {*<table class="table">
        <thead>
            <tr>
                <th class="border-end text-center">#</th>
                <th class="border-end text-center" width="60px">date</th>
                <th class="border-end text-center">cat</th>
                <th class="border-end text-center">lang</th>
                <th class="border-end text-center">title</th>
                <th class="text-center" width="90px">Действия</th>
            </tr>
        </thead>
        <tbody>
			{foreach $lots as $lot}
            <!-- Пример для первого виджета -->
            <tr>
                <td class="border-end border-bottom-0 text-center">{$lot.id}</td>
                <td class="border-end border-bottom-0 text-center">
                    <i class="fa fa-clock-o" title="{$lot.created_at|date_format:"%m-%d-%y %H:%M"}"></i>
                </td>
				<td class="border-end fs-8 py-1">
					{assign var='categoryAltNames' value=','|explode:$lot.category_alt_names}
					{foreach $lot.category_links as $index => $link}
						{if $index > 0}, {/if}<a href="{$link}" target="_blank">{$lot.category_names[$index]|default:''}</a>
					{/foreach}
				</td>
				<td class="border-end text-center text-muted">
					<img src="{$engine}/lang/{$lot.language}/icon.png" style="height: 22px;" alt="">
				</td>
				<td class="border-end"><a href="/lots/{$lot.alt_name}?lang={$lot.language}" target="_blank">{$lot.title}</a></td>
                <td class="text-center border-bottom-0">
                    <div class="btn-group d-flex align-items-center justify-content-between">
                        <button class="btn btn-sm border border-default rounded" data-bs-toggle="collapse" data-bs-target="#details{$lot.id}" aria-expanded="false" aria-controls="details{$lot.id}">Подробнее</button>
                        <a href="#" class="mx-3"><i class="fa fa-edit"></i></a>
                        <form method="POST" action="#" style="display:inline;">
                            <input type="hidden" name="delete_widget_id" value="1">
                            <button type="submit" class="no-b px-0" onclick="return confirm('Удалить этот виджет?');">
                                <i class="fa fa-trash"></i>
                            </button>
                        </form>
                    </div>
                </td>
            </tr>
            <tr class="collapse-row">
				<td colspan="7" class="p-0">
					<div id="details{$lot.id}" class="collapse">
						<div class="p-3 body-color">
							<div class="row">
								<div class="col">
									<div class="card">
										<div class="card-body py-2 border-top border-success d-flex align-items-center justify-content-between fs-7">
											<strong>s_price:</strong>
											<span>-</span>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="card">
										<div class="card-body py-2 border-top border-success d-flex align-items-center justify-content-between fs-7">
											<strong>c_price:</strong>
											<span>-</span>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="card">
										<div class="card-body py-2 border-top border-success d-flex align-items-center justify-content-between fs-7">
											<strong>buy_now:</strong>
											<span>-</span>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="card">
										<div class="card-body py-2 border-top border-success d-flex align-items-center justify-content-between fs-7">
											<strong>start:</strong>
											<span>-</span>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="card">
										<div class="card-body py-2 border-top border-success d-flex align-items-center justify-content-between fs-7">
											<strong>end:</strong>
											<span>-</span>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="card">
										<div class="card-body py-2 border-top border-success d-flex align-items-center justify-content-between fs-7">
											<strong>status:</strong>
											<span>-</span>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="card">
										<div class="card-body py-2 border-top border-success d-flex align-items-center justify-content-between fs-7">
											<strong>winner:</strong>
											<span>-</span>
										</div>
									</div>
								</div>
								<div class="col">
									<div class="card">
										<div class="card-body py-2 border-top border-success d-flex align-items-center justify-content-between fs-7">
											<strong>bids:</strong>
											<span>-</span>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</td>
			</tr>
            {/foreach}
        </tbody>
    </table>*}
</div>
<script>
	var contentSection = document.getElementById('contentSection');
	contentSection.classList.add('active');
	var contentBlock = document.getElementById('contentBlock');
	contentBlock.classList.add('show');
	var currentLink = document.getElementById('eventsList');
	currentLink.classList.add('active');
</script>