commit 075acf238c38f3596a943bd496f546ed98398300
parent 5c355974f8ac904b431519fc5506f993ac68230c
Author: dankert <devnull@localhost>
Date: Wed, 24 Nov 2004 23:41:29 +0100
Andere Darstellung der Rechte
Diffstat:
1 file changed, 25 insertions(+), 80 deletions(-)
diff --git a/themes/default/pages/html/object/rights.tpl.php b/themes/default/pages/html/object/rights.tpl.php
@@ -9,20 +9,11 @@
<th colspan="15"><?php echo lang('ACL') ?></th>
</tr>
<tr>
- <td class="help"><?php echo lang('NAME') ?></td>
- <td class="help"><?php echo lang('LANGUAGE') ?></td>
- <td class="help"><span title="<?php echo lang('ACL_READ' ) ?>"><strong>R</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_WRITE' ) ?>"><strong>W</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_PROP' ) ?>"><strong>P</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_DELETE' ) ?>"><strong>E</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_RELEASE' ) ?>"><strong>RE</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_PUBLISH' ) ?>"><strong>W</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_CREATE_FOLDER') ?>"><strong>CD</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_CREATE_FILE' ) ?>"><strong>CF</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_CREATE_LINK' ) ?>"><strong>CL</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_CREATE_PAGE' ) ?>"><strong>CP</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_GRANT' ) ?>"><strong>G</strong></span></td>
- <td class="help"><span title="<?php echo lang('ACL_TRANSMIT' ) ?>"><strong>T</strong></span></td>
+ <td class="help"><?php echo lang('GLOBAL_NAME') ?></td>
+ <td class="help"><?php echo lang('GLOBAL_LANGUAGE') ?></td>
+ <?php foreach( $show as $t ) { ?>
+ <td class="help"><span title="<?php echo lang('ACL_'.strtoupper($t)) ?>"><strong><?php echo lang('ACL_'.strtoupper($t).'_ABBREV') ?></strong></span></td>
+ <?php } ?>
</tr>
@@ -42,20 +33,13 @@
<td width="50%" class="<?php echo $fx ?>"><img src="<?php echo $image_dir.'icon_group.png' ?>" align="left"><?php echo $z['groupname'] ?></a></td>
<?php } ?>
<td class="<?php echo $fx ?>"><?php echo $z['languagename'] ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',true ,false,array('title'=>lang('read')) ) ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['write' ],false) ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['prop' ],false) ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['delete' ],false) ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['release' ],false) ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['publish' ],false) ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['create_folder'],false) ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['create_file' ],false) ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['create_link' ],false) ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['create_page' ],false) ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['grant' ],false) ?></td>
+
+<?php foreach( $show as $t ) { ?>
+<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z[$t],false,array('title'=>lang('ACL_'.strtoupper($t))) ) ?></td>
+<?php } ?>
+
<?php if (isset($z['delete_url']))
{ ?>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('',$z['transmit'],false) ?></td>
<td class="<?php echo $fx ?>"><a href="<?php echo $z['delete_url'] ?>"><?php echo lang('DELETE') ?></a></td>
<?php }
else
@@ -75,26 +59,29 @@
<br/><br/><br/>
-<form action="<?php echo $self ?>" method="post" target="_self">
+<form action="<?php echo $self ?>" method="post" name="add" target="_self">
<input type="hidden" name="subaction" value="addACL">
<table class="main" width="90%" cellspacing="0" cellpadding="4">
<tr>
- <th colspan="2"><?php echo lang('ADD') ?></th>
+ <th colspan="2"><?php echo lang('GLOBAL_ADD') ?></th>
+</tr>
+<tr>
+<td class="<?php echo $fx ?>"><?php echo lang('GLOBAL_ALL') ?></td>
+<td class="<?php echo $fx ?>"><input type="radio" name="type" value="all" checked="checked" /></td>
</tr>
<tr>
<td class="<?php echo $fx ?>"><?php echo lang('USER') ?></td>
-<td class="<?php echo $fx ?>"><input type="radio" name="type" value="user" checked> <?php echo Html::selectBox( 'userid',$users); ?></td>
-
+<td class="<?php echo $fx ?>"><input type="radio" name="type" value="user" /> <?php echo Html::selectBox( 'userid',$users,0,array('onfocus'=>'document.forms[0].type[1].checked=true')); ?></td>
</tr>
<?php if (count($groups)>0)
{ ?>
<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('OR').' '.lang('GROUP') ?></td>
-<td class="<?php echo $fx ?>"><input type="radio" name="type" value="group"> <?php echo Html::selectBox( 'groupid',$groups); ?></td>
+<td class="<?php echo $fx ?>"><?php echo lang('GLOBAL_OR').' '.lang('GROUP') ?></td>
+<td class="<?php echo $fx ?>"><input type="radio" name="type" value="group" /> <?php echo Html::selectBox( 'groupid',$groups,0,array('onfocus'=>'document.forms[0].type[2].checked=true')); ?></td>
</tr>
- <?php } ?>
+<?php } ?>
<tr>
<td class="<?php echo $fx ?>"><?php echo lang('LANGUAGE') ?></td>
@@ -104,56 +91,14 @@
<td colspan="2" class="help"> </td>
</tr>
+<?php foreach( $show as $t ) { ?>
<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_READ') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('' ,true ,false) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_WRITE') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('write' ,false,true,array('title'=>lang('ACL_WRITE' )) ) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_PROP') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('prop' ,false,true,array('title'=>lang('ACL_PROP' )) ) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_DELETE') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('delete' ,false,true,array('title'=>lang('ACL_DELETE' )) ) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_RELEASE') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('release' ,false,true,array('title'=>lang('ACL_RELEASE' )) ) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_PUBLISH') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('publish' ,false,true,array('title'=>lang('ACL_PUBLISH' )) ) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_CREATE_FOLDER') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('create_folder',false,true,array('title'=>lang('ACL_CREATE_FOLDER')) ) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_CREATE_FILE') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('create_file' ,false,true,array('title'=>lang('ACL_CREATE_FILE' )) ) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_CREATE_LINK') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('create_link' ,false,true,array('title'=>lang('ACL_CREATE_LINK' )) ) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_CREATE_PAGE') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('create_page' ,false,true,array('title'=>lang('ACL_CREATE_PAGE' )) ) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_GRANT') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('grant' ,false,true,array('title'=>lang('ACL_GRANT' )) ) ?></td>
-</tr>
-<tr>
-<td class="<?php echo $fx ?>"><?php echo lang('ACL_TRANSMIT') ?></td>
-<td class="<?php echo $fx ?>"><?php echo Html::checkBox('transmit' ,false,true,array('title'=>lang('ACL_TRANSMIT' )) ) ?></td>
+<td class="<?php echo $fx ?>"><?php echo lang('ACL_'.strtoupper($t)) ?></td>
+<td class="<?php echo $fx ?>"><?php echo Html::checkBox($t,($t=='read'),($t!='read'),array('title'=>lang('ACL_'.strtoupper($t) )) ) ?></td>
</tr>
+<?php } ?>
<tr>
-<td class="act" colspan="2"><input type="submit" class="submit" value="<?php echo lang('ADD') ?>"></td>
+<td class="act" colspan="2"><input type="submit" class="submit" value="<?php echo lang('GLOBAL_ADD') ?>"></td>
</tr>
</table>