<div class="tap_{{@tap['id']}}" href="/taps/tap?id={{@tap['id']}}">
	<div class="reload">
		<h1>{{@tap['product_title']!='' && @ta['connection']==1?@tap['product_title'].' ('.@tap['title'].')':@tap['title']}}</h1>
		<div class="tap_buttons">
			<check if="{{in_array('taps/connection', @authorization_user.module)}}">
				<button type="button" class="show_window" href="/taps/connection?id={{@tap['id']}}">
					<i class="fa fa-plus"></i>
					<br>
					<div class="small">Подключить</div>
				</button>
				<check if="{{@tap['connection']==1}}">
				<button type="button" class="show_window" href="/messages/continue?uri={{urlencode("/taps/unconnection?id=".@tap['id'])}}">
					<i class="fa fa-minus"></i>
					<br>
					<div class="small">Отключить</div>
				</button>
				</check>
			</check>
			<check if="{{in_array('taps/form', @authorization_user.module)}}">
				<button type="button" class="show_window return_receipts_button right" href="/messages/continue?uri={{urlencode("/taps/delete?id=".@tap['id'])}}">
					<i class="fa fa-times"></i>
					<br>
					<div class="small">Удалить</div>
				</button>
			</check>
			<check if="{{in_array('taps/form', @authorization_user.module)}}">
				<button type="button" class="show_window right" href="/taps/form?id={{@tap['id']}}">
					<i class="fa fa-pen"></i>
					<br>
					<div class="small">Изменить</div>
				</button>
			</check>
		</div>
		<check if="{{@tap['connection']==1}}">
			<true>
		<br><br>
		<div class="content2">
			<table width="100%" class="work_table">
				<tr>
					<th>
						Разливаемая номенклатура
					</th>
					<check if="{{in_array('taps/connection', @authorization_user.module)}}">
					<td width="100" align="right" class="tap_buttons">
						<button type="button" class="show_window" href="/taps/product_add?tap_id={{@tap['id']}}">
							<i class="fa fa-plus"></i>
							<br>
							<div class="small">Добавить</div>
						</button>
					</td>
					</check>
				</tr>
				<repeat group="{{@tap['products']}}" value="{{@product}}">
				<tr>
					<td>
						{{@product['title']}}
					</td>
					<check if="{{in_array('taps/connection', @authorization_user.module)}}">
					<td width="100" align="right" class="tap_buttons">
						<button type="button" class="show_window return_receipts_button" href="/messages/continue?uri={{urlencode("/taps/product_delete?tap_id=".@tap['id']."&product_id=".@product['id'])}}">
							<i class="fa fa-times"></i>
							<br>
							<div class="small">&nbsp;Удалить&nbsp;</div>
						</button>
					</td>
					</check>
				</tr>
				</repeat>
			</table>
		</div>
				<check if="{{@tap['mark']!=''}}">
		<table width="100%">
			<tr>
				<td>
					<p>
						<b>Объем</b>: {{@tap['volume']>0?@tap['volume']:'-'}} л
					</p>
					<p>
						<b>Осталось</b>: {{@tap['current_volume']}} л
					</p>
					<p>
						<b>Окончание срока годности</b>:<br>
						{{date('d.m.Y H:i:s', @tap['expiration_date'])}}
					</p>
				</td>
				<td align="right">
					<img src="/qr/gen?url={{urlencode(@tap['mark'])}}">
				</td>
			</tr>
			<tr>
				<td align="center" colspan="2">
					<button type="button" class="show_window" href="/messages/continue?uri={{urlencode("/taps/move?id=".@tap['id'])}}">
						<i class="fa fa-sync"></i>
						Переместить на другой кран
					</button>
				</td>
			</tr>
		</table>
				</check>
				<false>
		<p>Кег не подключен</p>
				</false>
			</true>
		</check>
	</div>
</div>