[Openupload-svn-update] SF.net SVN: openupload:[110] trunk/templates/default/modules/admin
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2008-11-04 18:51:52
|
Revision: 110
http://openupload.svn.sourceforge.net/openupload/?rev=110&view=rev
Author: tsdogs
Date: 2008-11-04 18:51:42 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
Change rights administration
Modified Paths:
--------------
trunk/templates/default/modules/admin/rightedit.tpl
trunk/templates/default/modules/admin/rights.tpl
Modified: trunk/templates/default/modules/admin/rightedit.tpl
===================================================================
--- trunk/templates/default/modules/admin/rightedit.tpl 2008-11-04 18:50:53 UTC (rev 109)
+++ trunk/templates/default/modules/admin/rightedit.tpl 2008-11-04 18:51:42 UTC (rev 110)
@@ -1,29 +1,44 @@
{include file="default/modules/admin/adminmenu.tpl"}
-
-<form action="{$script}" method="post">
+<div id="message" style="color: #ffaa00; font-size: 11pt; font-weight: bold;">{tr}PLEASE BE CAREFULL WHEN MODIFING THE RIGHTS!{/tr}</div><br>
+<div id="message" style="color: #000000; font-size: 12pt; font-weight: bold;">{tr}Editing rights for group{/tr}:
+{if $group=='*'}[{tr}Any{/tr}]{else}{$group}{/if}</div>
+<br>
+<form action="{$script}" method="POST">
<input type="hidden" name="action" value="{$action}">
<input type="hidden" name="step" value="{$step}">
-<input type="hidden" name="editaclid" value="{$right.id}">
-<table border="0">
-<tr><td>{tr}Group{/tr}:</td><td>
-<select name="editrightgroup">
-{foreach from=$groups item=g}
-<option value="{$g.name}" {if $g.name==$right.group_name}selected{/if}>{$g.name}</option>
+<input type="hidden" name="id" value="{$group}">
+<table border="0" id="dbtable">
+<tr>
+ <th>{tr}Module{/tr}</th>
+ <th>{tr}Action{/tr}</th>
+ <th>{tr}Right{/tr}</th>
+ <th>{tr}Resulting ACL{/tr}</th>
+ <th>{tr}From ACL{/tr}</th>
+</tr>
+{foreach from=$modules key=mk item=m}
+ {cycle values="row1,row2" advance=false assign=rid1}
+<tr>
+ <td id="{$rid1}" width="150" style="vertical-align: top;" rowspan="{$m.actions|@count}">{$m.name}</td>
+ {foreach from=$m.actions key=ak item=ai}
+ {cycle values="row1,row2" advance=true assign=rid2}
+ <td width="200" id="{$rid2}" style="text-align: left; vertical-align: top;">
+ {if $ak=='*'}[{tr}default{/tr}]{else}{$ak}{/if}
+ </td>
+ <td id="{$rid2}" style="text-align: left;">
+ <select name="right_{$mk}_{$ak}">
+ {html_options options=$access selected=$rights[$group][$mk][$ak].access}</select>
+ </td>
+ <td width="100" id="{$rid2}" style="text-align: center; vertical-align: top;">{$rights[$group][$mk][$ak].result}
+ </td>
+ <td id="{$rid2}" style="text-align: left;">
+ {tr}Group{/tr}: {$rights[$group][$mk][$ak].comb.group} |
+ {tr}Module{/tr}: {$rights[$group][$mk][$ak].comb.module} |
+ {tr}Action{/tr}: {$rights[$group][$mk][$ak].comb.action}
+ </td>
+</tr>
+ {/foreach}
{/foreach}
-</select></td></tr>
-<tr><td>{tr}Module{/tr}:</td><td>
-<select name="editrightmodule">
-{foreach from=$modules item=m}
-<option value="{$m}" {if $m==$right.module}selected{/if}>{$m}</option>
-{/foreach}
-</select></td></tr>
-<tr><td>{tr}Action{/tr}:</td><td><input type="text" name="editrightaction" value="{$right.action}"></td></tr>
-<tr><td>{tr}Access{/tr}:</td><td>
-<select name="editrightaccess">
-{foreach from=$access item=a key=k}
-<option value="{$k}" {if $k==$right.access}selected{/if}>{$a}</option>
-{/foreach}
-</select></td></tr>
-<tr><td colspan="2" align=right><input type="submit" class="submit" value="{tr}Confirm{/tr}"></td></tr>
-</table>
-</form>
\ No newline at end of file
+</table><br>
+<input type="button" class="submit" value="{tr}<< Back{/tr}" onclick="document.location='{$script}?action={$action}';">
+<input type="submit" class="submit" value="{tr}Apply changes{/tr}">
+</form>
Modified: trunk/templates/default/modules/admin/rights.tpl
===================================================================
--- trunk/templates/default/modules/admin/rights.tpl 2008-11-04 18:50:53 UTC (rev 109)
+++ trunk/templates/default/modules/admin/rights.tpl 2008-11-04 18:51:42 UTC (rev 110)
@@ -1,32 +1,17 @@
{include file="default/modules/admin/adminmenu.tpl"}
-<div id="toolbar">
-<a href="{$script}?action={$action}&step=2&id={$u.id}"><img src="{tpl file=/img/admin/tadd_right.png}"></a>
-<img src="{tpl file=/img/admin/tdelete.png}">
-</div>
<br>
<table border="0" id="dbtable">
<tr>
- <th width="10">S</th>
- <th width="50">Id</th>
- <th width="200">Group</th>
- <th width="100">Module</th>
- <th width="100">Action</th>
- <th width="200">Right</th>
- <th width="100">Actions</th>
+ <th width="100">Name</th>
+ <th width="200">Description</th>
+ <th width="100">Rights set?</th>
</tr>
-{foreach from=$rights item=r}
+{foreach from=$groups item=g}
{cycle values="row1,row2" advance=true assign=rid}
<tr>
- <td id="{$rid}"><input type="checkbox" name="right_{$r.id}" value="1"></td>
- <td id="{$rid}"><a href="{$script}?action={$action}&step=3&id={$r.id}">{$r.id}</a></td>
- <td id="{$rid}">{$r.group_name}</td>
- <td id="{$rid}">{$r.module}</td>
- <td id="{$rid}">{$r.action}</td>
- <td id="{$rid}">{$r.access}</td>
- <td id="{$rid}">
- <a href="{$script}?action={$action}&step=3&id={$r.id}"><img src="{tpl file=/img/admin/edit_right.png}"></a>
-
- <a href="{$script}?action={$action}&step=4&id={$r.id}"><img src="{tpl file=/img/admin/delete.png}"></a></td>
+ <td id="{$rid}" style="text-align:left"><a href="{$script}?action=adminrights&step=2&id={$g.name}">{if $g.name=='*'}[{tr}Any{/tr}]{else}{$g.name}{/if}</a></td>
+ <td id="{$rid}">{$g.description}</td>
+ <td id="{$rid}">{if isset($rights[$g.name])}{tr}Yes{/tr}{else}{tr}No{/tr}{/if}</td>
</tr>
{/foreach}
</table>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|