<div class="content2">
	<check if="{{in_array('settings/read_all_logs', @authorization_user.module)}}">
	<input type="button" value="Прочитать все" class="right" name="read_all_logs" />
	</check>
	<h1>{{@page_data['title']}}</h1>
	<include href="pagination.htm" />
	<div class="mobile_scroll">
		<table class="work_table">
			<tr>
				<th width="20">
					№
				</th>
				<th width="100">
					Дата
				</th>
				<th>
					Текст
				</th>
				<th width="100">
					Прочитано
				</th>
			</tr>
			<repeat group="{{@logs}}" value="{{@log}}">
			<tr>
				<td align="center">
					{{@log['id']}}
				</td>
				<td align="center">
					{{date("d.m.Y H:i", @log['time'])}}
				</td>
				<td>
					{{@log['txt'] | raw}}
				</td>
				<td align="center">
					<check if="{{in_array('settings/post_logs', @authorization_user.module)}}">
						<true>
					<div class="switch">
		  				<input type="checkbox" name="read_log" for="{{@log['id']}}" {{@log['read']?'checked="checked"':''}}>
					</div>
					<form name="read_log_form_{{@log['id']}}" method="POST" action="{{@URI}}">
						<input type="hidden" name="id" value="{{@log['id']}}">
					</form>
						</true>
						<false>
							{{@log['read']?'Да':'Нет'}}
						</false>
					</check>
				</td>
			</tr>
			</repeat>
		</table>
	</div>
</div>
