File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/admin/templates/groups.view.tpl
{template="header"}
{if strlen($ViewName) > 0}
{capture name=PageTitle}{$ViewName}{/capture}
{else}
{capture name=PageTitle}{$lang.AllGroups}{/capture}
{/if}
<div id="ViewsMenu" class="DropDownMenu DropShadow" style="display: none; width:220px">
{if $groupViewCount > 0}
<ul>
{foreach from=$groupViewTypes key=k item=view id=viewsLoop}
<li class="{$view.selectedClass}">
<a href="index.php?section=groups&action=view&viewid={$view.viewid}" style='background-image:url("images/view.gif"); background-repeat:no-repeat; background-position:5px 5px; padding-left:28px'>
<span>View {$view.name}</span>
</a>
</li>
{/foreach}
</ul>
{else}
<ul>
<li><a href="index.php?section=groups&action=view" style="background-image: url('images/view.gif'); background-repeat: no-repeat; background-position: 5px 5px; padding-left: 28px;"><strong>{$lang.AllGroups}</strong></a></li>
</ul>
{/if}
<hr />
<ul>
<li><a href="index.php?section=groups&action=createview" style="background-image:url('images/view_add.gif'); background-repeat:no-repeat; background-position:5px 5px; padding-left:28px">{$lang.CreateNewView}</a></li>
{if $isView}
<li><a href="index.php?section=groups&action=view&viewid={$viewid}&type=delete" style="background-image:url('images/view_del.gif'); background-repeat:no-repeat; background-position:5px 5px; padding-left:28px">{$lang.ViewDelete}</a></li>
<li><a href="index.php?section=groups&action=editview&viewid={$viewid}" style="background-image:url('images/layoutEdit.png'); background-repeat:no-repeat; background-position:8px 8px; padding-left:28px">{$lang.ViewEdit}</a></li>
{/if}
</ul>
</div>
<script type="text/javascript" src="../javascript/jquery/plugins/interface.js"></script>
<script type="text/javascript">
<!--
$(document).ready(function() {
$('.statusUpdate').click(function() {
var uId = $(this).parent().parent().children(':eq(0)').children('input').attr('value');
var $theImg = $(this);
var url = "remote.php?section=groups&action=statuschange&groupid=" + uId;
$.ajax({
url: url,
dataType: 'xml',
success: function(xml, status) {
var stat = $('status', xml).text();
if(stat == "success") {
$('#MainMessage').successMessage('{$lang.GroupStatusChanged}');
$theImg.children('img').attr('src', $('img', xml).text());
} else {
$('#MainMessage').errorMessage($('message', xml).text());
}
},
error: function(xml, status) {
$('#MainMessage').errorMessage(status);
}
});
return false;
});
{if iwp_HasPerm('core', 'categories', 'delete', '*')}
$('#DeleteSelectedButton').click(function(){
$('.bulkselect').val('delete');
RunBulkEntry();
});
{/if}
$('.DelLink').click(function() {
var link = $(this).attr('href');
$("#dialogConfirm").text('Are you sure you want to delete the selected group and all content they have submitted?');
$("#dialogConfirm").dialog({
autoOpen: false,
modal: true,
overlay: {
'background-color': 'black',
opacity: '0.75'
},
buttons: {
"No, don't delete the group": function() { $("#dialogConfirm").dialog("destroy"); },
"Yes, delete the selected group": function() {
$("#dialogConfirm").dialog("destroy");
window.top.location = link;
}
}
});
$("#dialogConfirm").css('display', 'block').dialog("open");
return false;
});
});
function RunBulkEntry() {
var index = $('.bulkselect').val();
if (!index) {
alert('{$lang.PleaseChooseAnAction}');
$('.bulkselect').focus();
return;
}
var checked = Array();
$('#ContentListArea input:checked').each(function() {
var id = $(this).attr('id');
id = id.substr(10);
checked.push(id);
});
if(checked.length < 1) {
alert('{$lang.PleaseChooseOneGroup}');
return false;
}
var text = "";
var func = "";
if(index == "disapprove") {
text = "Are you sure you want to disapprove the selected groups?";
func = "disapprove";
} else if(index == "approve") {
text = "Are you sure you want to approve the selected groups?";
func = "approve";
} else if(index == "delete") {
text = "Are you sure you want to delete the selected user groups? Users in these groups may no longer belong to any group. Click OK to confirm.";
func = "delete";
} else {
return false;
}
if (confirm(text)) {
runCall(func, checked);
}
return false;
}
function runCall(act, list) {
var url = "remote.php?section=groups&action=bulk&type=" + act;
$.ajax({
url: url,
type: "post",
dataType: 'xml',
data: {'groupList[]': list},
success: function(xml, status) {
var stat = $('status', xml).text();
if(stat == "success") {
window.top.location = window.top.location;
} else {
$('#MainMessage').errorMessage($('message', xml).text());
}
},
error: function(xml, status) {
$('#MainMessage').errorMessage(status);
}
});
}
function ConfirmDelete () {
return confirm('{$lang.ConfirmDeleteGroup}');
}
//--></script>
<div title="Confirmation" class="iDialog" style="display: none;" id="dialogConfirm"></div>
{if strlen($ViewName) > 0}
{capture name=PageTitle}{$ViewName}{/capture}
{/if}
{capture name=CustomButtons}
<input type="button" name="IndexCreateButton" value="{$lang.$CreateItem}" id="IndexCreateButton" class="Button" onClick="document.location.href='index.php?section={$section}&action=create'" />
{if iwp_HasPerm('core', 'categories', 'delete', '*')}
<input type="button" id="DeleteSelectedButton" value="{$lang.DeleteSelected}" class="Button" />
{else}
<input type="button" value="{$lang.DeleteSelected}" class="Button" disabled="disabled" />
{/if}
<input type="hidden" name="bulkaction" class="bulkselect" value="" />
{/capture}
{template="common.view.top"}
<div class="BodyContainer Intro">
<form name="GroupForm" id="GroupForm" action="index.php?section=groups&action=view" method="post">
<table class="GridPanel" cellspacing="1" cellpadding="2" border="0" id="IndexGrid" style="width:100%;">
<tr>
<td align="right">
{template="paging"}
</td>
</tr>
</table>
<table class="GridPanel" cellspacing="0" cellpadding="0" border="0" id="IndexGrid" style="width:100%;" >
{if $groupCount > 0}
<tr class="Heading3">
<td align="Center" width='10'><input type="checkbox" name="masterCheckbox" id="masterCheckbox" onClick="toggleCheckboxes(this,'GroupForm');"></td>
<td> </td>
{foreach from=$DisplayFields key=k item=field id=fieldsHeaderLoop}
{if $field.display}
<td nowrap style="width:{$field.width};">
{capture name=tmp}Group_{$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.dbfield}"><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.dbfield}"><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=group id=viewLoop}
<tr id="tr_{$group.groupid}" class="GridRow" onmouseover="this.className='GridRowOver'" onmouseout="this.className='GridRow'" >
<td align="Center">
{if $group.deleteprotected}
<input type="checkbox" disabled="disabled">
{elseif iwp_HasPerm('core', 'groups', 'delete', $group.groupid)}
<input type="checkbox" name="items[]" id="deleteBox_{$group.groupid}" value="{$group.groupid}">
{else}
<input type="checkbox" disabled="disabled">
{/if}
</td>
<td>
<a href="javascript:;" onclick="$('#deleteBox_{$group.groupid}').parent().toggleCheckboxes();return false;"><img src="images/group.gif" /></a>
</td>
{foreach from=$DisplayFields key=l item=field id=fieldBodyLoop}
{if $field.display}
<td nowrap class="{if $field.dbfield == $SortField}SortHighlight{/if}">
{capture name=tmp}{$field.dbfield}{/capture}
{if is_blank($group.$tmp)}
{$field.default}
{else}
{$group.$tmp}
{/if}
</td>
{/if}
{/foreach}
<td nowrap style="width:110px">
{if iwp_HasPerm('core', 'groups', 'edit', $group.groupid)}
<a href="index.php?section=groups&action=edit&groupid={$group.groupid}">{$lang.Edit}</a>
{else}
<a class="Disabled" href="#" onclick="alert('{$lang.EditGroupsNoPermission|iwp_FilterJavascriptString,false}');return false;">{$lang.Edit}</a>
{/if}
{if $group.deleteprotected}
<a class="Disabled" href="#" onclick="alert('{$lang.CannotDeleteProtectedGroup|iwp_FilterJavascriptString,false}');return false;">{$lang.Delete}</a>
{elseif iwp_HasPerm('core', 'groups', 'delete', $group.groupid)}
<a href="index.php?section=groups&action=delete&groupid={$group.groupid}" onclick="return ConfirmDelete();">{$lang.Delete}</a>
{else}
<a class="Disabled" href="#" onclick="alert('{$lang.DeleteGroupsNoPermission|iwp_FilterJavascriptString,false}');return false;">{$lang.Delete}</a>
{/if}
</td>
</tr>
{/foreach}
</tbody>
{else}
<tr class="GridRow">
<td colspan="7" style="text-align: center; padding: 10px;">
<strong>{$lang.NoGroupsToDisplay}</strong>
</td>
</tr>
{/if}
</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>
</div>
{template="footer"}