{block name=metaTitle}Twoje prezentacje{/block}
{block name=bodyPage}administrator_presentations_list{/block}
{block name=body}
	<section class="section_presentations_table">
		<div class="ct">
			<div class="ct_l"></div>
			<div class="ct_c">
				<div class="presentations_table_box">
					<div class="space space_30"></div>
					<div class="row">
						<div class="col-xs-12">
							<div class="presentations_search_w">
								<div class="presentations_search">
									<div class="presentations_search_l">
										<form action="{url controller="index" action="index"}" method="get">
											<div class="input-group">
												<input type="text" name="f" value="{htmlspecialchars($searchQuery)}" class="form-control" placeholder="Wyszukaj prezentację...">
												<div class="input-group-btn"><button class="btn btn-primary" type="submit"><i class="fa fa-search" aria-hidden="true"></i></button></div>
											</div>
										</form>
									</div>
									<div class="presentations_search_s"></div>
									<div class="presentations_search_r"><a href="#modal_new_presentation" data-toggle="modal" data-backdrop="static" data-keyboard="false" class="rbtn btn-primary"><div class="rbtn_c"><span class="icon"><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-plus"/></svg></span><span class="text">Nowa prezentacja</span></div></a></div>
								</div>
							</div>
						</div>
					</div>
					<div class="space space_30"></div>
					<div class="row">
						<div class="col-xs-12">
							<table class="table table-stripped presentations_table">
								<thead>
									<tr>
										<th class="{if $sort == "name"}{if $sortType == "asc"}sort_asc{else}sort_desc{/if}{/if}" onclick="location.href='{url controller="index" action="index"}?s=name&t={if $sort == "name"}{if $sortType == "asc"}desc{else}asc{/if}{else}asc{/if}'">
											Nazwa prezentacji
											<span class="sort"><i class="fa fa-sort" aria-hidden="true"></i></span> 
											<span class="sort_asc"><i class="fa fa-sort-asc" aria-hidden="true"></i></span>
											<span class="sort_desc"><i class="fa fa-sort-desc" aria-hidden="true"></i></span>
										</th>
										<th class="{if $sort == "slides"}{if $sortType == "asc"}sort_asc{else}sort_desc{/if}{/if}" data-hide="phone,tablet" onclick="location.href='{url controller="index" action="index"}?s=slides&t={if $sort == "slides"}{if $sortType == "asc"}desc{else}asc{/if}{else}asc{/if}'">
											Liczba slajdów
											<span class="sort"><i class="fa fa-sort" aria-hidden="true"></i></span> 
											<span class="sort_asc"><i class="fa fa-sort-asc" aria-hidden="true"></i></span>
											<span class="sort_desc"><i class="fa fa-sort-desc" aria-hidden="true"></i></span>
										</th>
										<th class="{if $sort == "users"}{if $sortType == "asc"}sort_asc{else}sort_desc{/if}{/if}" data-hide="phone,tablet" onclick="location.href='{url controller="index" action="index"}?s=users&t={if $sort == "users"}{if $sortType == "asc"}desc{else}asc{/if}{else}asc{/if}'">
											Użytkowicy
											<span class="sort"><i class="fa fa-sort" aria-hidden="true"></i></span> 
											<span class="sort_asc"><i class="fa fa-sort-asc" aria-hidden="true"></i></span>
											<span class="sort_desc"><i class="fa fa-sort-desc" aria-hidden="true"></i></span>
										</th>
										<th class="{if $sort == "date_created"}{if $sortType == "asc"}sort_asc{else}sort_desc{/if}{/if}" data-hide="phone,tablet" onclick="location.href='{url controller="index" action="index"}?s=date_created&t={if $sort == "date_created"}{if $sortType == "asc"}desc{else}asc{/if}{else}asc{/if}'">
											Data utworzenia
											<span class="sort"><i class="fa fa-sort" aria-hidden="true"></i></span> 
											<span class="sort_asc"><i class="fa fa-sort-asc" aria-hidden="true"></i></span>
											<span class="sort_desc"><i class="fa fa-sort-desc" aria-hidden="true"></i></span>
										</th>
										<th class="{if $sort == "date_updated"}{if $sortType == "asc"}sort_asc{else}sort_desc{/if}{/if}" data-hide="phone,tablet" onclick="location.href='{url controller="index" action="index"}?s=date_updated&t={if $sort == "date_updated"}{if $sortType == "asc"}desc{else}asc{/if}{else}asc{/if}'">
											Ostatnia aktualizacja
											<span class="sort"><i class="fa fa-sort" aria-hidden="true"></i></span> 
											<span class="sort_asc"><i class="fa fa-sort-asc" aria-hidden="true"></i></span>
											<span class="sort_desc"><i class="fa fa-sort-desc" aria-hidden="true"></i></span>
										</th>
										<th class="" data-hide="phone,tablet">Akcje</th>
									</tr>
								</thead>
								<tbody>
									{foreach from=$_MODEL item=item key=key}
										<tr>
											<td><a href="{$item.url_edit}"><div class="icon"><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-play"/></svg></div> <span>{$item.name}</span></a></td>
											<td>{$item.num_boards}</td>
											<td>{$item.num_users}</td>
											<td>{$item.date_created}</td>
											<td>{$item.date_updated}</td>
											<td>
												<a href="{$item.url_edit}" class="icon"><div data-toggle="tooltip" data-placement="top" title="" data-original-title="Edytuj"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-pencil"/></svg></div></a>
												<div data-action="presentation-copy" data-url="{$item.url_copy}" data-name="{$item.name}" data-tempo="{$item.tempo}" class="icon"><div data-toggle="tooltip" data-placement="top" title="" data-original-title="Kopiuj"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-copy"/></svg></div></div>
												<div data-action="presentation-remove" data-url="{$item.url_remove}" data-name="{$item.name}" class="icon"><div data-toggle="tooltip" data-placement="top" title="" data-original-title="Usuń"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-trash"/></svg></div></div>
											</td>
										</tr>
									{foreachelse}
										<tr>
											<td colspan="6">Brak prezentacji</td>
										</tr>
									{/foreach}
								</tbody>
								{if $numPages > 1}
									<tfoot>
										<tr>
											<td colspan="6">
												<div class="space space_30"></div>
												<div class="pagination_w">
													<div class="pagination_ct">
														<div class="pagination_ct_c">
															<nav aria-label="...">
																<ul class="pagination pagination-sm">
																	<li class="page-item{if $page == 1} disabled{/if}"><a class="page-link" href="{url controller="index" action="index"}?p={$page-1}" tabindex="-1">Wstecz</a></li>
																	{for $item=1 to $numPages}
																		<li class="page-item{if $item == $page} active{/if}"><a class="page-link" href="{url controller="index" action="index"}?p={$item}">{$item}</a></li>
																	{/for}
																	<li class="page-item{if $page == $numPages} disabled{/if}"><a class="page-link" href="{url controller="index" action="index"}?p={$page+1}">Dalej</a></li>
																</ul>
															</nav>
														</div>
													</div>
												</div>
												<div class="space space_30"></div>
											</td>
										</tr>
									</tfoot>
								{/if}
							</table>
						</div>
					</div>
				</div>
			</div>
			<div class="ct_r"></div>
		</div>
	</section>
{/block}
{block name=dialog}
	<div id="modal_new_presentation" class="modal fade" aria-hidden="true">
		<form action="{url controller="prezentacje" action="dodaj"}" method="post">
			<div class="modal-dialog modal-md">
				<div class="modal-content">
					<div class="modal-header text-center">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Zamknij</span></button>
						<h4 class="modal-title">Tworzenie nowej prezentacji</h4>
					</div>
					<div class="modal-body">
						<div class="row">
							<div class="col-xs-12">
								<div class="df_w">
									<div class="df">
										<div class="df_title"><span>Tytuł prezentacji</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Maksymalna długość tekstu to 80 znaków"><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"/></svg></div></div> 
										<div class="space space_10"></div>
										<div class="df_ct">
											<div class="input-group"><input type="text" name="name" class="form-control  fn_data_max_length" data-max-length="80"><span class="input-group-addon data-length-value">80</span></div>
										</div>
										<div class="df_error"><div data-error="name"></div></div>
										{*<div class="space space_15"></div>*}
									</div>
									<input type="hidden" name="tempo" value="1">
									{*<div class="df">
										<div class="space space_15"></div>
										<div class="df_title"><span>Typ prezentacji</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Określa dostęp do prezentacji dla użytkowników"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"></use></svg></div></div> 
										<div class="space space_10"></div>
										<div class="df_ct">
											<div class="df_options">
												<div class="df_option">
													<input type="radio" name="tempo" value="1" id="create_tempo_1" checked>
													<label for="create_tempo_1"><span>Z prelegentem (na żywo)</span></label>
												</div>
												<div class="df_option">
													<input type="radio" name="tempo" value="2" id="create_tempo_2">
													<label for="create_tempo_2"><span>Bez prelegenta</span></label>
												</div>
											</div>
										</div>
										<div class="df_error"><div data-error="tempo"></div></div>
									</div>*}
								</div>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<div class="text-center">
							<button type="button" class="btn btn-white" data-dismiss="modal">Anuluj</button>
							<button type="submit" class="btn btn-primary"><strong>Dalej</strong></button>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
	<div id="modal_copy_presentation" class="modal fade" aria-hidden="true">
		<form action="" method="post">
			<div class="modal-dialog modal-md">
				<div class="modal-content">
					<div class="modal-header text-center">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Zamknij</span></button>
						<h4 class="modal-title">Kopiowanie prezentacji</h4>
					</div>
					<div class="modal-body">
						<div class="row">
							<div class="col-xs-12">
								<div class="df_w">
									<div class="df">
										<div class="df_title"><span>Tytuł prezentacji</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Maksymalna długość tekstu to 80 znaków"><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"/></svg></div></div> 
										<div class="space space_10"></div>
										<div class="df_ct">
											<div class="input-group"><input type="text" name="name" class="form-control fn_data_max_length" data-max-length="80"><span class="input-group-addon data-length-value">80</span></div>
										</div>
										<div class="df_error"><div data-error="name"></div></div>
										{*<div class="space space_15"></div>*}
									</div>
									<input type="hidden" name="tempo" value="1">
									{*<div class="df">
										<div class="space space_15"></div>
										<div class="df_title"><span>Typ prezentacji</span><div class="df_tooltip" data-toggle="tooltip" data-placement="top" title="" data-original-title="Określa dostęp do prezentacji dla użytkowników"><div class="df_tooltip_mask"></div><svg><use xlink:href="{url mode="root"}theme/dobry-start/images/icons/svg/sprite.svg#shape-help-circle"></use></svg></div></div> 
										<div class="space space_10"></div>
										<div class="df_ct">
											<div class="df_options">
												<div class="df_option">
													<input type="radio" name="tempo" value="1" id="copy_tempo_1" checked>
													<label for="copy_tempo_1"><span>Z prelegentem (na żywo)</span></label>
												</div>
												<div class="df_option">
													<input type="radio" name="tempo" value="2" id="copy_tempo_2">
													<label for="copy_tempo_2"><span>Bez prelegenta</span></label>
												</div>
											</div>
										</div>
										<div class="df_error"><div data-error="tempo"></div></div>
									</div>*}
								</div>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<div class="text-center">
							<button type="button" class="btn btn-white m-r-sm" data-dismiss="modal">Anuluj</button>
							<button type="submit" class="btn btn-primary m-l-sm"><strong>Dalej</strong></button>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
	<div id="modal_remove_presentation" class="modal fade" aria-hidden="true">
		<form action="" method="post">
			<div class="modal-dialog modal-md">
				<div class="modal-content">
					<div class="modal-header text-center">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Zamknij</span></button>
						<h4 class="modal-title">Usuwanie prezentacji</h4>
					</div>
					<div class="modal-body text-center">
						<div class="row">
							<div class="col-xs-12"><p>Czy na pewno chcesz usunąć: <strong data-name=""></strong>?</p></div>
						</div>
					</div>
					<div class="modal-footer">
						<div class="text-center">
							<button type="button" class="btn btn-white m-r-sm" data-dismiss="modal">Nie</button>
							<button type="submit" class="btn btn-primary m-l-sm"><strong>Tak</strong></button>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
{/block}