Location: PHPKode > projects > Community Learning Network > cln/lib/CLN/interfaces/editRoles.html

// set title
// should support multiple languages
$GLOBALS['CLN_PAGE_TITLE'] = 'Change Roles';


<form name="editPermission" action="<?php echo appendToURL(cleanURL($GLOBALS['path']), 'editKoId=' . $this->koId . '&amp;editProcess=Roles'); ?>" method="post">

<p>Use this form to change permissions to edit, publish, and
  access this Block. The roles are described below.</p>

<table class="cmsForm">

	<td class="cmsFormTableColumnHeader" id="cmsFormTableOwnColumnHeader">Owner</td>
	<td class="cmsFormTableColumnHeader" id="cmsFormTablePubColumnHeader">Publisher</td>
	<td class="cmsFormTableColumnHeader" id="cmsFormTableCollabColumnHeader">Collaborator</td>
	<td class="cmsFormTableColumnHeader" id="cmsFormTableViewColumnHeader">Viewer</td>

// Get the data we need, role names and group names
$roles = $this->loadAllRoles();
$groups = $this->loadAllGroups();

// Build the display
foreach ($this->roles as $groupId => $rolesArray) {
		echo "<tr class=\"cmsTableRow\">\n\t<td class=\"cmsTableRowHeader\" id=\"rowheader-$groupId\">Group: {$groups[$groupId]} </td>\n";
			foreach ($roles as $thisRoleId => $thisRole) {
				if (in_array($thisRoleId, $rolesArray)) {
					echo "\t<td class=\"cmsFormTableCell\" id=\"GroupId-$groupId-RoleId-$thisRoleId-\"><input type=\"checkbox\" class=\"clnFormInput\" id=\"editRolesGroupId-$groupId-RoleId-$thisRoleId-\" name=\"groupRoles[$groupId][]\" value=\"$thisRoleId\" checked=\"checked\" /></td>\n";
				else {
					echo "\t<td class=\"cmsFormTableCell\" id=\"GroupId-$groupId-RoleId-$thisRoleId-\"><input type=\"checkbox\" class=\"clnFormInput\" id=\"editRolesGroupID-$groupId-RoleID-$thisRoleId-\" name=\"groupRoles[$groupId][]\" value=\"$thisRoleId\" /></td>\n";
		echo "</tr>\n\n";


<span class="clnFormLine">
	<label class="clnFormLabel"  for="editRoles"></label>
	<input class="clnFormInput" type="submit" id="editRoles" name="editRoles" value="Save" />
	<input class="clnFormInput" type="submit" name="selectGroups" value="Select more groups" />
	<input class="clnFormInput" type="submit" name="cancel" value="Cancel" />


<h2>Role Types</h2>
<p>Owners have ultimate control over the Block--they control
  the roles and permissions. They can also view and edit the
<p>Publishers can publish draft versions, and thereby make them visible on the live site (i.e. to groups with View permissions).</p>
<p>Collaborators can view draft version as well as the live version of your Block, and have the ability to edit the content of Block's. Collaborators cannot publish or change permissions.</p>
<p>Viewers can see the live version of the Block, but not any draft versions, and they can't edit anything about the Block.</p>
Return current item: Community Learning Network