File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/admin/templates/lists.view.tpl
{template="header"}
{if !iwp_HasPerm('core', 'lists', 'create') || !iwp_HasPerm('core', 'lists', 'delete', '*')}
{capture name=CustomButtons}
{if iwp_HasPerm('core', 'lists', 'create')}
<input type="button" name="IndexCreateButton" value="{$lang.$CreateItem}" id="IndexCreateButton" class="Button" onClick="document.location.href='index.php?section={$section}&action=create'" />
{else}
<input type="button" name="IndexCreateButton" value="{$lang.$CreateItem}" id="IndexCreateButton" disabled="disabled" />
{/if}
{if iwp_HasPerm('core', 'lists', 'delete', '*')}
<input type="button" value="{$lang.DeleteSelected}" name="IndexDeleteButton" id="IndexDeleteButton" class="Button" onClick="doBulkDelete(); return false;" />
{else}
<input type="button" value="{$lang.DeleteSelected}" name="IndexDeleteButton" id="IndexDeleteButton" class="Button" disabled="disabled" />
{/if}
{/capture}
{/if}
{template="common.view.top"}
<script type="text/javascript">
$(function(){
{if !$ViewListCount}
$('#MainMessage').infoMessage({$lang.PromptToCreateList|iwp_FilterJavascriptString});
{/if}
{if !iwp_HasPerm('core', 'lists', 'create')}
$('#IndexCreateButton').disabledBind('click', function(){ alert({$lang.CreateListsNoPermission|iwp_FilterJavascriptString}); });
{/if}
{if !iwp_HasPerm('core', 'lists', 'delete', '*')}
$('#IndexDeleteButton').disabledBind('click', function(){ alert({$lang.DeleteListsNoPermission|iwp_FilterJavascriptString}); });
{/if}
});
function ConfirmDeleteList(listId) {
if(iwp.util.isDefined(listId) || listId > 0) {
if(confirm('{$lang.listConfirmDeleteListJS|iwp_js}')) {
window.location = 'index.php?section={$section}&action=deletesingle&id=' + listId;
}
}
}
function doBulkDelete(){
if(!$('#ListForm input:checkbox:checked').exists()){
alert('{$lang.PleaseSelectSomeListsJS|iwp_js}');
return;
}
BulkAction('lists','ListForm');
}
</script>
<div class="BodyContainer Intro">
<table class="OuterPanel">
<tr>
<td style="display:{$DisplayGrid};">
<form name="ListForm" id="ListForm" action="index.php?ToDo=" method="post">
<table class="GridPanel" cellspacing="1" cellpadding="2" border="0" id="IndexGrid" style="width:100%;">
<tr>
<td>
{if iwp_HasPerm('core', 'lists', 'delete', '*')}
<input type="hidden" name="bulkaction" id="bulkaction" class="bulkselect" value="delete" />
<!-- <select name="bulkaction" id="bulkaction" class="bulkselect">
<option value="none">{$lang.ChooseAnAction}</option>
{if iwp_HasPerm('core', 'lists', 'delete', '*')}
<option value="delete">{$lang.Delete}</option>
{/if}
</select>
<input type="button" value="Go" class="gobutton" onclick="javascript: BulkAction('lists','ListForm');"><br/><br/> -->
{/if}
</td>
<td align="right">
{template="paging"}
</td>
</tr>
</table>
<table class="GridPanel SortableGrid AutoExpand" cellspacing="0" cellpadding="0" border="0" id="IndexGrid" style="width:100%;" >
<tr class="Heading3">
<td align="Center" width='10'><input type="checkbox" name="masterCheckbox" id="masterCheckbox" onClick="toggleCheckboxes(this,'ListForm');"></td>
<td> </td>
{foreach from=$DisplayFields key=k item=field id=fieldsHeaderLoop}
{if $field.display}
<td nowrap>
{capture name=tmp}Lists_{$field.name}{/capture}
{capture name=tmplang}{$lang.$tmp}{/capture}
{$tmplang}
{if $field.sortable }
<a title="{$lang.SortByAsc|sprintf,$tmplang}" href="index.php?section={$section}&action={$action}&sortdir=asc&field={$field.name}"><img src='images/{if $SortField == $field.dbfield && $SortDir == 'asc'}active_{/if}sortup.gif' border="0"></a>
<a title="{$lang.SortByDesc|sprintf,$tmplang}" href="index.php?section={$section}&action={$action}&sortdir=desc&field={$field.name}"><img src='images/{if $SortField == $field.dbfield && $SortDir == 'desc'}active_{/if}sortdown.gif' border="0"></a>
{/if}
</td>
{/if}
{/foreach}
<td nowrap style="width:110px">
{$lang.Action}
</td>
</tr>
<tbody id="ContentListArea">
{foreach from=$ViewList key=k item=row id=ViewListLoop}
<tr id="tr_{$row.listid}" class="GridRow" onmouseover="this.className='GridRowOver'" onmouseout="this.className='GridRow'" >
<td align="Center">
{if iwp_HasPerm('core', 'lists', 'delete', $row.listid)}
<input type="checkbox" name="items[]" id="deleteBox_{$row.listid}" value="{$row.listid}">
{/if}
</td>
<td align="Center" style="width:18px;" onMouseDown="document.getElementById('deleteBox_{$row.listid}').checked = true;">
<img src='images/article.gif'>
</td>
{foreach from=$DisplayFields key=k item=field id=fieldsBodyLoop}
{if $field.display}
<td nowrap class="{if $field.dbfield == $SortField}SortHighlight{/if}">
{capture name=tmp}{$field.dbfield}{/capture}
{if is_blank($row.$tmp)}
{$field.default}
{else}
{if $field.UseLang}
{capture name=langname}ListView_{$row.$tmp}{/capture}
{$lang.$langname}
{elseif $field.IsDate}
{$row.$tmp|strtotime|iwp_longdate}
{else}
{$row.$tmp|iwp_htmlspecialchars}
{/if}
{/if}
</td>
{/if}
{/foreach}
<td nowrap style="width:110px">
{if iwp_HasPerm('core', 'lists', 'edit', $row.listid)}
<a href="index.php?section={$section}&action=edit&id={$row.listid}">{$lang.Edit}</a>
{/if}
{if iwp_HasPerm('core', 'lists', 'delete', $row.listid)}
<a href="#" onclick="ConfirmDeleteList({$row.listid});return false;">{$lang.Delete}</a>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
<table class="GridPanel" cellspacing="1" cellpadding="2" border="0" id="IndexGrid" style="width:100%;">
<tr align="right">
<td>
{template="paging"}
</td>
</tr>
</table>
</form>
</td></tr>
</table>
</div>
{template="footer"}