2009-09-23 02:30:16 +00:00
|
|
|
<?php if (current_user_can('edit_users') && is_array($options)) { ?>
|
|
|
|
<form method="post">
|
|
|
|
<input type="hidden" name="wdts[_nonce]" value="<?php echo $nonce ?>" />
|
|
|
|
<input type="hidden" name="wdts[module]" value="capabilities" />
|
|
|
|
<h3><?php _e('Capabilities', 'what-did-they-say') ?></h3>
|
|
|
|
|
2009-09-24 02:38:11 +00:00
|
|
|
<p><?php _e('Determine who can do what with transcripts by setting the minimum role requirements below.', 'what-did-they-say') ?></p>
|
|
|
|
|
2009-09-23 02:30:16 +00:00
|
|
|
<table class="widefat fixed">
|
|
|
|
<tr class="thead">
|
|
|
|
<th scope="col" class="manage-col"><?php _e('Capability', 'what-did-they-say') ?></th>
|
|
|
|
<th scope="col" class="manage-col"><?php _e('Role Needed', 'what-did-they-say') ?></th>
|
|
|
|
</tr>
|
|
|
|
<?php foreach ($this->capabilities as $key => $label) { ?>
|
|
|
|
<tr>
|
|
|
|
<th scope="col"><?php echo $label ?></th>
|
|
|
|
<td>
|
|
|
|
<select name="wdts[capabilities][<?php echo $key ?>]">
|
|
|
|
<?php wp_dropdown_roles($options['capabilities'][$key]) ?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php } ?>
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
|
|
|
<td>
|
|
|
|
<input class="button" type="submit" value="<?php _e('Change capabilities', 'what-did-they-say') ?>" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
2009-10-15 00:49:31 +00:00
|
|
|
|
|
|
|
<h3><?php _e('Per-user Permissions', 'what-did-they-say') ?></h3>
|
|
|
|
|
|
|
|
<p><?php _e('Give specified users permissions above and beyond their role permissions.', 'what-did-they-say') ?></p>
|
|
|
|
|
|
|
|
<form method="post">
|
|
|
|
<input type="hidden" name="wdts[_nonce]" value="<?php echo $nonce ?>" />
|
|
|
|
<input type="hidden" name="wdts[module]" value="user-capabilities" />
|
|
|
|
<table class="widefat fixed">
|
|
|
|
<tr>
|
|
|
|
<th width="15%">Login</th>
|
|
|
|
<th colspan="3">Capabilities</th>
|
|
|
|
</tr>
|
|
|
|
<?php foreach ((array)$users as $user) {
|
|
|
|
$user_capabilities = get_usermeta($user->ID, 'transcript_capabilities');
|
|
|
|
if (!is_array($user_capabilities)) { $user_capabilities = array(); }
|
|
|
|
?>
|
|
|
|
<tr>
|
2009-10-15 01:05:39 +00:00
|
|
|
<th scope="row">
|
|
|
|
<?php echo get_avatar($user->ID, 20) ?>
|
|
|
|
<?php echo $user->user_login ?>
|
|
|
|
</th>
|
2009-10-15 00:49:31 +00:00
|
|
|
<?php foreach ($this->capabilities as $key => $label) { ?>
|
|
|
|
<td>
|
|
|
|
<label style="white-space: nowrap">
|
2009-10-15 01:05:39 +00:00
|
|
|
<input type="checkbox"
|
|
|
|
name="wdts[user_capabilities][<?php echo $user->ID ?>][<?php echo $key ?>]"
|
|
|
|
value="yes"
|
|
|
|
<?php echo (isset($user_capabilities[$key])) ? 'checked="checked"' : '' ?>
|
|
|
|
/>
|
2009-10-15 00:49:31 +00:00
|
|
|
<?php echo $label ?>
|
|
|
|
</label>
|
|
|
|
</td>
|
|
|
|
<?php } ?>
|
|
|
|
</tr>
|
|
|
|
<?php } ?>
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
|
|
|
<td colspan="3">
|
2009-10-15 01:05:39 +00:00
|
|
|
<input class="button" type="submit" value="<?php _e('Update per-user permissions', 'what-did-they-say') ?>" />
|
2009-10-15 00:49:31 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
2009-09-23 02:30:16 +00:00
|
|
|
<?php } ?>
|
|
|
|
|