{block name=rtbox}
{foreach $queue as $ticket}
	{include file="rt/rtqueueviewboxrow.html"}
{foreachelse}
<tr>
	<td colspan="11" class="empty-table">
		{trans("This queue is empty.")}
	</td>
</tr>
{/foreach}
	<script>

		$(function() {
			$('.ticket-assign-to-me').click(function () {
				var link = $(this);
				var backid = get_backid(this);
				$.ajax(
					link.attr('href') + '&check-conflict=1',
					{
						async: true,
						method: "GET",
						dataType: "json",
						success: function (data) {
							if (data) {
								confirmDialog($t("Ticket has already been assigned to other user in mean-time. Are you sure you want to re-assign ticket to you?"), link).done(function () {
									location.href = link.attr('href') + backid;
								});
							} else {
								location.href = link.attr('href') + backid;
							}
						}
					}
				);
				return false;
			});
		});

	</script>
{/block}
