Thread: [Openupload-svn-update] SF.net SVN: openupload:[23] trunk/templates/default/modules/admin
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2008-10-16 11:18:56
|
Revision: 23
http://openupload.svn.sourceforge.net/openupload/?rev=23&view=rev
Author: tsdogs
Date: 2008-10-16 11:18:52 +0000 (Thu, 16 Oct 2008)
Log Message:
-----------
Add administration of: groups, rights, plugins and a settings display page
Added Paths:
-----------
trunk/templates/default/modules/admin/groups.tpl
trunk/templates/default/modules/admin/pluginedit.tpl
Added: trunk/templates/default/modules/admin/groups.tpl
===================================================================
--- trunk/templates/default/modules/admin/groups.tpl (rev 0)
+++ trunk/templates/default/modules/admin/groups.tpl 2008-10-16 11:18:52 UTC (rev 23)
@@ -0,0 +1,25 @@
+{include file="default/modules/admin/adminmenu.tpl"}
+<div id="toolbar">
+<a href="{$script}?action={$action}&step=2&id={$u.id}"><img src="{$page.template}/img/admin/tadd_group.png"></a>
+<img src="{$page.template}/img/admin/tdelete_group.png">
+</div>
+<br>
+<table border="0" id="dbtable">
+<tr>
+ <th width="10">S</th>
+ <th width="100">Name</th>
+ <th width="200">Description</th>
+ <th width="100">Actions</th>
+</tr>
+{foreach from=$groups item=g}
+<tr>
+ <td id="row1"><input type="checkbox" name="group_{$g.name}" value="1"></td>
+ <td id="row1" style="text-align:left"><a href="{$script}?action=admingroups&step=3&id={$g.name}">{$g.name}</a></td>
+ <td id="row1">{$g.description}</td>
+ <td id="row1">
+ <a href="{$script}?action={$action}&step=3&id={$g.name}"><img src="{$page.template}/img/admin/edit_group.png"></a>
+
+ <a href="{$script}?action={$action}&step=4&id={$g.name}"><img src="{$page.template}/img/admin/delete_group.png"></a></td>
+</tr>
+{/foreach}
+</table>
\ No newline at end of file
Added: trunk/templates/default/modules/admin/pluginedit.tpl
===================================================================
--- trunk/templates/default/modules/admin/pluginedit.tpl (rev 0)
+++ trunk/templates/default/modules/admin/pluginedit.tpl 2008-10-16 11:18:52 UTC (rev 23)
@@ -0,0 +1,28 @@
+{include file="default/modules/admin/adminmenu.tpl"}
+
+<form action="{$script}" method="post">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="{$step}">
+<input type="hidden" name="editpluginid" value="{$plugin.id}">
+<table border="0">
+<tr><td>{tr}Plugin{/tr}:</td><td>
+<select name="editpluginplugin">
+{foreach from=$pluginslist item=p}
+<option value="{$p}" {if $p==$plugin.plugin}selected{/if}>{$p}</option>
+{/foreach}
+</select></td></tr>
+<tr><td>{tr}Group{/tr}:</td><td>
+<select name="editplugingroup">
+{foreach from=$groups item=g}
+<option value="{$g.name}" {if $g.name==$plugin.group_id}selected{/if}>{$g.name}</option>
+{/foreach}
+</select></td></tr>
+<tr><td>{tr}Access{/tr}:</td><td>
+<select name="editpluginaccess">
+{foreach from=$access item=a key=k}
+<option value="{$k}" {if $k==$plugin.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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-10-23 18:16:37
|
Revision: 69
http://openupload.svn.sourceforge.net/openupload/?rev=69&view=rev
Author: tsdogs
Date: 2008-10-23 18:16:35 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
update for first buggy version with ldap authentication
Modified Paths:
--------------
trunk/templates/default/modules/admin/pluginadd.tpl
trunk/templates/default/modules/admin/pluginedit.tpl
trunk/templates/default/modules/admin/pluginsacl.tpl
trunk/templates/default/modules/admin/rightadd.tpl
trunk/templates/default/modules/admin/rightedit.tpl
trunk/templates/default/modules/admin/rights.tpl
trunk/templates/default/modules/admin/useradd.tpl
trunk/templates/default/modules/admin/useredit.tpl
trunk/templates/default/modules/admin/users.tpl
Modified: trunk/templates/default/modules/admin/pluginadd.tpl
===================================================================
--- trunk/templates/default/modules/admin/pluginadd.tpl 2008-10-23 18:15:55 UTC (rev 68)
+++ trunk/templates/default/modules/admin/pluginadd.tpl 2008-10-23 18:16:35 UTC (rev 69)
@@ -13,7 +13,7 @@
<tr><td>{tr}Group{/tr}:</td><td>
<select name="addplugingroup">
{foreach from=$groups item=g}
-<option value="{$g.name}" {if $g.name==$plugin.group_id}selected{/if}>{$g.name}</option>
+<option value="{$g.name}" {if $g.name==$plugin.group_name}selected{/if}>{$g.name}</option>
{/foreach}
</select></td></tr>
<tr><td>{tr}Access{/tr}:</td><td>
Modified: trunk/templates/default/modules/admin/pluginedit.tpl
===================================================================
--- trunk/templates/default/modules/admin/pluginedit.tpl 2008-10-23 18:15:55 UTC (rev 68)
+++ trunk/templates/default/modules/admin/pluginedit.tpl 2008-10-23 18:16:35 UTC (rev 69)
@@ -14,7 +14,7 @@
<tr><td>{tr}Group{/tr}:</td><td>
<select name="editplugingroup">
{foreach from=$groups item=g}
-<option value="{$g.name}" {if $g.name==$plugin.group_id}selected{/if}>{$g.name}</option>
+<option value="{$g.name}" {if $g.name==$plugin.group_name}selected{/if}>{$g.name}</option>
{/foreach}
</select></td></tr>
<tr><td>{tr}Access{/tr}:</td><td>
Modified: trunk/templates/default/modules/admin/pluginsacl.tpl
===================================================================
--- trunk/templates/default/modules/admin/pluginsacl.tpl 2008-10-23 18:15:55 UTC (rev 68)
+++ trunk/templates/default/modules/admin/pluginsacl.tpl 2008-10-23 18:16:35 UTC (rev 69)
@@ -19,7 +19,7 @@
<td id="{$rid}"><input type="checkbox" name="p_{$p.id}" value="1"></td>
<td id="{$rid}" style="text-align:left"><a href="{$script}?action={$action}&step=3&id={$p.id}">{$p.id}</a></td>
<td id="{$rid}">{$p.plugin}</td>
- <td id="{$rid}">{$p.group_id}</td>
+ <td id="{$rid}">{$p.group_name}</td>
<td id="{$rid}">{$p.access}</td>
<td id="{$rid}">
<a href="{$script}?action={$action}&step=3&id={$p.id}"><img src="{$page.template}/img/admin/edit_plugin.png"></a>
Modified: trunk/templates/default/modules/admin/rightadd.tpl
===================================================================
--- trunk/templates/default/modules/admin/rightadd.tpl 2008-10-23 18:15:55 UTC (rev 68)
+++ trunk/templates/default/modules/admin/rightadd.tpl 2008-10-23 18:16:35 UTC (rev 69)
@@ -7,7 +7,7 @@
<tr><td>{tr}Group{/tr}:</td><td>
<select name="addrightgroup">
{foreach from=$groups item=g}
-<option value="{$g.name}" {if $g.name==$right.group_id}selected{/if}>{$g.name}</option>
+<option value="{$g.name}" {if $g.name==$right.group_name}selected{/if}>{$g.name}</option>
{/foreach}
</select></td></tr>
<tr><td>{tr}Module{/tr}:</td><td>
Modified: trunk/templates/default/modules/admin/rightedit.tpl
===================================================================
--- trunk/templates/default/modules/admin/rightedit.tpl 2008-10-23 18:15:55 UTC (rev 68)
+++ trunk/templates/default/modules/admin/rightedit.tpl 2008-10-23 18:16:35 UTC (rev 69)
@@ -8,7 +8,7 @@
<tr><td>{tr}Group{/tr}:</td><td>
<select name="editrightgroup">
{foreach from=$groups item=g}
-<option value="{$g.name}" {if $g.name==$right.group_id}selected{/if}>{$g.name}</option>
+<option value="{$g.name}" {if $g.name==$right.group_name}selected{/if}>{$g.name}</option>
{/foreach}
</select></td></tr>
<tr><td>{tr}Module{/tr}:</td><td>
Modified: trunk/templates/default/modules/admin/rights.tpl
===================================================================
--- trunk/templates/default/modules/admin/rights.tpl 2008-10-23 18:15:55 UTC (rev 68)
+++ trunk/templates/default/modules/admin/rights.tpl 2008-10-23 18:16:35 UTC (rev 69)
@@ -19,7 +19,7 @@
<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_id}</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>
Modified: trunk/templates/default/modules/admin/useradd.tpl
===================================================================
--- trunk/templates/default/modules/admin/useradd.tpl 2008-10-23 18:15:55 UTC (rev 68)
+++ trunk/templates/default/modules/admin/useradd.tpl 2008-10-23 18:16:35 UTC (rev 69)
@@ -11,7 +11,7 @@
<tr><td>{tr}e-mail{/tr}:</td><td><input type="text" name="adduseremail" value="{$adduser.email}"></td></tr>
<tr><td>{tr}Group{/tr}:</td><td><select name="addusergroup">
{foreach from=$groups item=g}
- <option value="{$g.name}" {if $g.name==$adduser.group_id} selected{/if}>{$g.description}</option>
+ <option value="{$g.name}" {if $g.name==$adduser.group_name} selected{/if}>{$g.description}</option>
{/foreach}
</select></td></tr>
<tr><td>{tr}Preferred language{/tr}:</td><td> <select name="adduserlang">
Modified: trunk/templates/default/modules/admin/useredit.tpl
===================================================================
--- trunk/templates/default/modules/admin/useredit.tpl 2008-10-23 18:15:55 UTC (rev 68)
+++ trunk/templates/default/modules/admin/useredit.tpl 2008-10-23 18:16:35 UTC (rev 69)
@@ -11,7 +11,7 @@
<tr><td>{tr}e-mail{/tr}:</td><td><input type="text" name="edituseremail" value="{$edituser.email}"></td></tr>
<tr><td>{tr}Group{/tr}:</td><td><select name="editusergroup">
{foreach from=$groups item=g}
- <option value="{$g.name}" {if $g.name==$edituser.group_id} selected{/if}>{$g.description}</option>
+ <option value="{$g.name}" {if $g.name==$edituser.group_name} selected{/if}>{$g.description}</option>
{/foreach}
</select></td></tr>
<tr><td>{tr}Preferred language{/tr}:</td><td> <select name="edituserlang">
Modified: trunk/templates/default/modules/admin/users.tpl
===================================================================
--- trunk/templates/default/modules/admin/users.tpl 2008-10-23 18:15:55 UTC (rev 68)
+++ trunk/templates/default/modules/admin/users.tpl 2008-10-23 18:16:35 UTC (rev 69)
@@ -20,7 +20,7 @@
<td id="{$rid}"><input type="checkbox" name="user_{$u.login}" value="1"></td>
<td id="{$rid}"><a href="{$script}?action={$action}&step=3&id={$u.login}">{$u.login}</a></td>
<td id="{$rid}">{$u.name}</td>
- <td id="{$rid}">{$u.group_id}</td>
+ <td id="{$rid}">{$u.group_name}</td>
<td id="{$rid}">{$u.email}</td>
<td id="{$rid}"><a href="{$script}?action={$action}&step=5&id={$u.login}&active={$u.active}">
<img src="{$page.template}/img/admin/active{$u.active}.png">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <ts...@us...> - 2008-11-06 12:40:42
|
Revision: 122
http://openupload.svn.sourceforge.net/openupload/?rev=122&view=rev
Author: tsdogs
Date: 2008-11-06 12:40:40 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
Add initial language administration
remove not needed file for rights
Added Paths:
-----------
trunk/templates/default/modules/admin/langedit.tpl
trunk/templates/default/modules/admin/langs.tpl
Removed Paths:
-------------
trunk/templates/default/modules/admin/rightadd.tpl
Added: trunk/templates/default/modules/admin/langedit.tpl
===================================================================
--- trunk/templates/default/modules/admin/langedit.tpl (rev 0)
+++ trunk/templates/default/modules/admin/langedit.tpl 2008-11-06 12:40:40 UTC (rev 122)
@@ -0,0 +1,16 @@
+{include file="default/modules/admin/adminmenu.tpl"}
+
+<form action="{$script}" method="post">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="{$step}">
+<input type="hidden" name="id" value="{$lang.id}">
+<table border="0">
+<tr><td>{tr}ID{/tr}:</td><td>{$lang.id}</td></tr>
+<tr><td>{tr}Name{/tr}:</td><td><input type="text" name="editlangname" value="{$lang.name}"></td></tr>
+<tr><td>{tr}Locale{/tr}:</td><td><input type="text" name="editlanglocale" value="{$lang.locale}"></td></tr>
+<tr><td>{tr}Browser recon{/tr}:</td><td><input type="text" name="editlangbrowser" value="{$lang.browser}"></td></tr>
+<tr><td>{tr}Charset{/tr}:</td><td><input type="text" name="editlangcharset" value="{$lang.charset}"></td></tr>
+<tr><td>{tr}Active{/tr}:</td><td><input type="checkbox" name="editlangactive" value="1" {if $lang.active==1}checked{/if}></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
Added: trunk/templates/default/modules/admin/langs.tpl
===================================================================
--- trunk/templates/default/modules/admin/langs.tpl (rev 0)
+++ trunk/templates/default/modules/admin/langs.tpl 2008-11-06 12:40:40 UTC (rev 122)
@@ -0,0 +1,33 @@
+{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.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="100">ID</th>
+ <th width="200">Name</th>
+ <th width="100">Locale</th>
+ <th width="20">Active</th>
+ <th width="100">Actions</th>
+</tr>
+{foreach from=$langlist item=l}
+{cycle values="row1,row2" advance=true assign=rid}
+<tr>
+ <td id="{$rid}"><input type="checkbox" name="user_{$l.id}" value="1"></td>
+ <td id="{$rid}"><a href="{$script}?action={$action}&step=3&id={$l.id}">{$l.id}</a></td>
+ <td id="{$rid}">{$l.name}</td>
+ <td id="{$rid}">{$l.locale}</td>
+ <td id="{$rid}"><a href="{$script}?action={$action}&step=5&id={$l.id}&active={$l.active}">
+ <img src="{tpl file='/img/admin/active%s.png'|sprintf:$l.active}">
+ </a>
+ </td>
+ <td id="{$rid}">
+ <a href="{$script}?action={$action}&step=3&id={$l.id}"><img src="{tpl file=/img/admin/edit_lang.png}"></a>
+
+ <a href="{$script}?action={$action}&step=4&id={$l.id}"><img src="{tpl file=/img/admin/delete.png}"></a></td>
+</tr>
+{/foreach}
+</table>
\ No newline at end of file
Deleted: trunk/templates/default/modules/admin/rightadd.tpl
===================================================================
--- trunk/templates/default/modules/admin/rightadd.tpl 2008-11-06 12:39:52 UTC (rev 121)
+++ trunk/templates/default/modules/admin/rightadd.tpl 2008-11-06 12:40:40 UTC (rev 122)
@@ -1,28 +0,0 @@
-{include file="default/modules/admin/adminmenu.tpl"}
-
-<form action="{$script}" method="post">
-<input type="hidden" name="action" value="{$action}">
-<input type="hidden" name="step" value="{$step}">
-<table border="0">
-<tr><td>{tr}Group{/tr}:</td><td>
-<select name="addrightgroup">
-{foreach from=$groups item=g}
-<option value="{$g.name}" {if $g.name==$right.group_name}selected{/if}>{$g.name}</option>
-{/foreach}
-</select></td></tr>
-<tr><td>{tr}Module{/tr}:</td><td>
-<select name="addrightmodule">
-{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="addrightaction" value="{$right.action}"></td></tr>
-<tr><td>{tr}Access{/tr}:</td><td>
-<select name="addrightaccess">
-{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}Add{/tr}"></td></tr>
-</table>
-</form>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-12-09 17:06:46
|
Revision: 171
http://openupload.svn.sourceforge.net/openupload/?rev=171&view=rev
Author: tsdogs
Date: 2008-12-09 17:06:42 +0000 (Tue, 09 Dec 2008)
Log Message:
-----------
Add delete confirmation and multi delete options to admin
Modified Paths:
--------------
trunk/templates/default/modules/admin/banned.tpl
trunk/templates/default/modules/admin/files.tpl
trunk/templates/default/modules/admin/groups.tpl
trunk/templates/default/modules/admin/langs.tpl
trunk/templates/default/modules/admin/pluginsacl.tpl
trunk/templates/default/modules/admin/users.tpl
Added Paths:
-----------
trunk/templates/default/modules/admin/deletescript.tpl
Modified: trunk/templates/default/modules/admin/banned.tpl
===================================================================
--- trunk/templates/default/modules/admin/banned.tpl 2008-11-25 19:15:58 UTC (rev 170)
+++ trunk/templates/default/modules/admin/banned.tpl 2008-12-09 17:06:42 UTC (rev 171)
@@ -1,7 +1,12 @@
{include file="default/modules/admin/adminmenu.tpl"}
+<script>
+msg1 = '{tr}Are you sure you want to delete the selected baned ips?{/tr}';
+msg2 = '{tr}Are you sure you want to delete the selected banned ip?{/tr}';
+{include file="default/modules/admin/deletescript.tpl"}
+</script>
<div id="toolbar">
<a href="{$script}?action={$action}&step=2"><img src="{tpl file=/img/admin/tadd.png}"></a>
-<img src="{tpl file=/img/admin/tdelete.png}">
+<a href="{$script}?action={$action}&step={$step}" onclick="return multidelete();"><img src="{tpl file=/img/admin/tdelete.png}"></a>
</div>
<br>
{if $pages>2}
@@ -15,6 +20,9 @@
{/section} </center>
{/if}
<br>
+<form name="deleteform" id="deleteform" action="{$script}" method="POST">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="5">
<table border="0" id="dbtable">
<tr>
<th width="10">S</th>
@@ -26,12 +34,12 @@
{foreach from=$banned item=b}
{cycle values="row1,row2" advance=true assign=rid}
<tr>
- <td id="{$rid}"><input type="checkbox" name="ban_{$d.id}" value="1"></td>
+ <td id="{$rid}"><input type="checkbox" name="ban_{$b.id}" value="1"></td>
<td id="{$rid}" style="text-align: left;"><a href="{$script}?action={$action}&step=3&id={$b.id}">{$b.ip}</a></td>
<td id="{$rid}">{$b.access}</td>
<td id="{$rid}">{$b.priority}</td>
<td id="{$rid}">
- <a title="delete" href="{$script}?action={$action}&step=4&id={$b.id}"><img src="{tpl file=/img/admin/delete.png}"></a>
+ <a title="delete" href="{$script}?action={$action}&step=4&id={$b.id}" onclick="return rowdelete();"><img src="{tpl file=/img/admin/delete.png}"></a>
</td>
</tr>
{/foreach}
Added: trunk/templates/default/modules/admin/deletescript.tpl
===================================================================
--- trunk/templates/default/modules/admin/deletescript.tpl (rev 0)
+++ trunk/templates/default/modules/admin/deletescript.tpl 2008-12-09 17:06:42 UTC (rev 171)
@@ -0,0 +1,11 @@
+{literal}
+function multidelete() {
+ if (window.confirm(msg1))
+ document.getElementById('deleteform').submit();
+ return false;
+}
+
+function rowdelete() {
+ return window.confirm(msg2);
+}
+{/literal}
Modified: trunk/templates/default/modules/admin/files.tpl
===================================================================
--- trunk/templates/default/modules/admin/files.tpl 2008-11-25 19:15:58 UTC (rev 170)
+++ trunk/templates/default/modules/admin/files.tpl 2008-12-09 17:06:42 UTC (rev 171)
@@ -1,4 +1,12 @@
{include file="default/modules/admin/adminmenu.tpl"}
+<script>
+msg1 = '{tr}Are you sure you want to delete the selected files?{/tr}';
+msg2 = '{tr}Are you sure you want to delete the selected file?{/tr}';
+{include file="default/modules/admin/deletescript.tpl"}
+</script>
+<div id="toolbar">
+<a href="{$script}?action={$action}&step={$step}" onclick="return multidelete();"><img src="{tpl file=/img/admin/tdelete.png}"></a>
+</div>
<br>
{if $pages>2}
<center>{section name=page loop=$pages start=1 max=20}
@@ -11,6 +19,9 @@
{/section} </center>
{/if}
<br>
+<form name="deleteform" id="deleteform" action="{$script}" method="POST">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="4">
<table border="0" id="dbtable">
<tr>
<th width="10">S</th>
@@ -32,7 +43,7 @@
<img align="right" src="{tpl file=/img/admin/ban.png}" ></a>{$f.ip} </td>
<td id="{$rid}">{$f.upload_date}</td>
<td id="{$rid}">
- <a title="delete" href="{$script}?action={$action}&step=2&id={$f.id}"><img src="{tpl file=/img/admin/delete.png}"></a></td>
+ <a title="delete" href="{$script}?action={$action}&step=2&id={$f.id}" onclick="return rowdelete();"><img src="{tpl file=/img/admin/delete.png}"></a></td>
</tr>
{/foreach}
</table>
\ No newline at end of file
Modified: trunk/templates/default/modules/admin/groups.tpl
===================================================================
--- trunk/templates/default/modules/admin/groups.tpl 2008-11-25 19:15:58 UTC (rev 170)
+++ trunk/templates/default/modules/admin/groups.tpl 2008-12-09 17:06:42 UTC (rev 171)
@@ -1,9 +1,17 @@
{include file="default/modules/admin/adminmenu.tpl"}
+<script>
+msg1 = '{tr}Are you sure you want to delete the selected groups?{/tr}';
+msg2 = '{tr}Are you sure you want to delete the selected group?{/tr}';
+{include file="default/modules/admin/deletescript.tpl"}
+</script>
<div id="toolbar">
<a href="{$script}?action={$action}&step=2&id={$u.id}"><img src="{tpl file=/img/admin/tadd_group.png}"></a>
-<img src="{tpl file=/img/admin/tdelete_group.png}">
+<a href="{$script}?action={$action}&step={$step}" onclick="return multidelete();"><img src="{tpl file=/img/admin/tdelete_group.png}"></a>
</div>
<br>
+<form name="deleteform" id="deleteform" action="{$script}" method="POST">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="5">
<table border="0" id="dbtable">
<tr>
<th width="10">S</th>
@@ -20,7 +28,8 @@
<td id="{$rid}">
<a href="{$script}?action={$action}&step=3&id={$g.name}"><img src="{tpl file=/img/admin/edit_group.png}"></a>
- <a href="{$script}?action={$action}&step=4&id={$g.name}"><img src="{tpl file=/img/admin/delete_group.png}"></a></td>
+ <a href="{$script}?action={$action}&step=4&id={$g.name}" onclick="return rowdelete();"><img src="{tpl file=/img/admin/delete_group.png}"></a></td>
</tr>
{/foreach}
-</table>
\ No newline at end of file
+</table>
+</form>
\ No newline at end of file
Modified: trunk/templates/default/modules/admin/langs.tpl
===================================================================
--- trunk/templates/default/modules/admin/langs.tpl 2008-11-25 19:15:58 UTC (rev 170)
+++ trunk/templates/default/modules/admin/langs.tpl 2008-12-09 17:06:42 UTC (rev 171)
@@ -1,9 +1,17 @@
{include file="default/modules/admin/adminmenu.tpl"}
+<script>
+msg1 = '{tr}Are you sure you want to delete the selected languages?{/tr}';
+msg2 = '{tr}Are you sure you want to delete the selected language?{/tr}';
+{include file="default/modules/admin/deletescript.tpl"}
+</script>
<div id="toolbar">
<a href="{$script}?action={$action}&step=2&id={$u.id}"><img src="{tpl file=/img/admin/tadd.png}"></a>
-<img src="{tpl file=/img/admin/tdelete.png}">
+<a href="{$script}?action={$action}&step={$step}" onclick="return multidelete();"><img src="{tpl file=/img/admin/tdelete.png}"></a>
</div>
<br>
+<form name="deleteform" id="deleteform" action="{$script}" method="POST">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="6">
<table border="0" id="dbtable">
<tr>
<th width="10">S</th>
@@ -16,7 +24,7 @@
{foreach from=$langlist item=l}
{cycle values="row1,row2" advance=true assign=rid}
<tr>
- <td id="{$rid}"><input type="checkbox" name="user_{$l.id}" value="1"></td>
+ <td id="{$rid}"><input type="checkbox" name="lang_{$l.id}" value="1"></td>
<td id="{$rid}"><a href="{$script}?action={$action}&step=3&id={$l.id}">{$l.id}</a></td>
<td id="{$rid}">{$l.name}</td>
<td id="{$rid}">{$l.locale}</td>
@@ -27,7 +35,8 @@
<td id="{$rid}">
<a href="{$script}?action={$action}&step=3&id={$l.id}"><img src="{tpl file=/img/admin/edit_lang.png}"></a>
- <a href="{$script}?action={$action}&step=4&id={$l.id}"><img src="{tpl file=/img/admin/delete.png}"></a></td>
+ <a href="{$script}?action={$action}&step=4&id={$l.id}" onclick="return rowdelete();"><img src="{tpl file=/img/admin/delete.png}"></a></td>
</tr>
{/foreach}
-</table>
\ No newline at end of file
+</table>
+</form>
\ No newline at end of file
Modified: trunk/templates/default/modules/admin/pluginsacl.tpl
===================================================================
--- trunk/templates/default/modules/admin/pluginsacl.tpl 2008-11-25 19:15:58 UTC (rev 170)
+++ trunk/templates/default/modules/admin/pluginsacl.tpl 2008-12-09 17:06:42 UTC (rev 171)
@@ -1,9 +1,17 @@
{include file="default/modules/admin/adminmenu.tpl"}
+<script>
+msg1 = '{tr}Are you sure you want to delete the selected plugins?{/tr}';
+msg2 = '{tr}Are you sure you want to delete the selected plugin?{/tr}';
+{include file="default/modules/admin/deletescript.tpl"}
+</script>
<div id="toolbar">
<a href="{$script}?action={$action}&step=2&id={$u.id}"><img src="{tpl file=/img/admin/plugins.png}"></a>
-<img src="{tpl file=/img/admin/tdelete.png}">
+<a href="{$script}?action={$action}&step={$step}" onclick="return multidelete();"><img src="{tpl file=/img/admin/tdelete.png}"></a>
</div>
<br>
+<form name="deleteform" id="deleteform" action="{$script}" method="POST">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="5">
<table border="0" id="dbtable">
<tr>
<th width="10">S</th>
@@ -24,7 +32,7 @@
<td id="{$rid}">
<a href="{$script}?action={$action}&step=3&id={$p.id}"><img src="{tpl file=/img/admin/edit_plugin.png}"></a>
- <a href="{$script}?action={$action}&step=4&id={$p.id}"><img src="{tpl file=/img/admin/delete.png}"></a></td>
+ <a href="{$script}?action={$action}&step=4&id={$p.id}" onclick="return rowdelete();"><img src="{tpl file=/img/admin/delete.png}"></a></td>
</tr>
{/foreach}
</table>
\ No newline at end of file
Modified: trunk/templates/default/modules/admin/users.tpl
===================================================================
--- trunk/templates/default/modules/admin/users.tpl 2008-11-25 19:15:58 UTC (rev 170)
+++ trunk/templates/default/modules/admin/users.tpl 2008-12-09 17:06:42 UTC (rev 171)
@@ -1,9 +1,17 @@
{include file="default/modules/admin/adminmenu.tpl"}
+<script>
+msg1 = '{tr}Are you sure you want to delete the selected users?{/tr}';
+msg2 = '{tr}Are you sure you want to delete the selected user?{/tr}';
+{include file="default/modules/admin/deletescript.tpl"}
+</script>
<div id="toolbar">
<a href="{$script}?action={$action}&step=2&id={$u.id}"><img src="{tpl file=/img/admin/tadd_user.png}"></a>
-<img src="{tpl file=/img/admin/tdelete_user.png}">
+<a href="{$script}?action={$action}&step={$step}" onclick="return multidelete();"><img src="{tpl file=/img/admin/tdelete_user.png}"></a>
</div>
<br>
+<form name="deleteform" id="deleteform" action="{$script}" method="POST">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="6">
<table border="0" id="dbtable">
<tr>
<th width="10">S</th>
@@ -29,7 +37,8 @@
<td id="{$rid}">
<a href="{$script}?action={$action}&step=3&id={$u.login}"><img src="{tpl file=/img/admin/edit_user.png}"></a>
- <a href="{$script}?action={$action}&step=4&id={$u.login}"><img src="{tpl file=/img/admin/delete_user.png}"></a></td>
+ <a href="{$script}?action={$action}&step=4&id={$u.login}" onclick="return rowdelete();"><img src="{tpl file=/img/admin/delete_user.png}"></a></td>
</tr>
{/foreach}
-</table>
\ No newline at end of file
+</table>
+</form>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ts...@us...> - 2008-12-11 11:05:00
|
Revision: 185
http://openupload.svn.sourceforge.net/openupload/?rev=185&view=rev
Author: tsdogs
Date: 2008-12-11 11:04:57 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
added maintenance option for files
Modified Paths:
--------------
trunk/templates/default/modules/admin/files.tpl
Added Paths:
-----------
trunk/templates/default/modules/admin/filesmenu.tpl
trunk/templates/default/modules/admin/maintenance.tpl
trunk/templates/default/modules/admin/maintenancerun.tpl
Modified: trunk/templates/default/modules/admin/files.tpl
===================================================================
--- trunk/templates/default/modules/admin/files.tpl 2008-12-11 11:04:10 UTC (rev 184)
+++ trunk/templates/default/modules/admin/files.tpl 2008-12-11 11:04:57 UTC (rev 185)
@@ -1,4 +1,5 @@
{include file="default/modules/admin/adminmenu.tpl"}
+{include file="default/modules/admin/filesmenu.tpl"}
<script>
msg1 = '{tr}Are you sure you want to delete the selected files?{/tr}';
msg2 = '{tr}Are you sure you want to delete the selected file?{/tr}';
@@ -38,7 +39,7 @@
<td id="{$rid}"><input type="checkbox" name="file_{$f.id}" value="1"></td>
<td id="{$rid}">{$f.id}</td>
<td id="{$rid}">{$f.name}</td>
- <td id="{$rid}">{$users[$f.user_id].login}</td>
+ <td id="{$rid}">{$f.user_login}</td>
<td id="{$rid}" style="text-align: left"><a title="ban IP {$f.ip}" href="{$script}?action=adminbanned&step=2&ip={$f.ip}&newaction={$action}">
<img align="right" src="{tpl file=/img/admin/ban.png}" ></a>{$f.ip} </td>
<td id="{$rid}">{$f.upload_date}</td>
Added: trunk/templates/default/modules/admin/filesmenu.tpl
===================================================================
--- trunk/templates/default/modules/admin/filesmenu.tpl (rev 0)
+++ trunk/templates/default/modules/admin/filesmenu.tpl 2008-12-11 11:04:57 UTC (rev 185)
@@ -0,0 +1,7 @@
+<div id="menu">
+<ul>
+ <li><a href="{$script}?action=adminfiles">{tr}Files List{/tr}</a></li>
+ <li style="border-right: 0px;"><a href="{$script}?action=adminmaintenance">{tr}Maintenance{/tr}</a></li>
+</ul>
+</div>
+<br>
\ No newline at end of file
Added: trunk/templates/default/modules/admin/maintenance.tpl
===================================================================
--- trunk/templates/default/modules/admin/maintenance.tpl (rev 0)
+++ trunk/templates/default/modules/admin/maintenance.tpl 2008-12-11 11:04:57 UTC (rev 185)
@@ -0,0 +1,44 @@
+{include file="default/modules/admin/adminmenu.tpl"}
+{include file="default/modules/admin/filesmenu.tpl"}
+
+<fieldset style="width: 100%">
+<legend>{tr}Maintenence{/tr}</legend>
+<p align="left">
+{tr}This options let you delete files based on some options.{/tr}<br>
+{tr}Please select one or more criteria for file deletion{/tr}<br>
+<form action="{$script}" method="POST">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="2">
+<table border="0">
+<tr><td><input type="checkbox" name="c_older" value="1" {if $criteria.c_older==1}checked{/if}> {tr}Delete files older than{/tr}</td><td><input size="4" type="text" name="older" value="{$criteria.days}"> {tr}days{/tr}</td></tr>
+<tr><td><input type="checkbox" name="c_login" value="1" {if $criteria.c_login==1}checked{/if}> {tr}Which user name is{/tr}:</td><td>
+{if isset($users)}
+<select name="login">
+{foreach from=$users item=u}
+<option value="{$u.login}"{if $criteria.login==$u.login}selected{/if}>{$u.login}</option>
+{/foreach}
+</select>
+{else}
+<input size="20" type="text" name="login" value="{$criteria.login}">
+{/if}</td></tr>
+<tr><td><input type="checkbox" name="c_date" value="1" {if $criteria.c_date==1}checked{/if}> {tr}Which upload day is{/tr}:</td><td><input size="14" type="text" name="date" value="{$criteria.date}"> (yyyy-mm-dd)</td></tr>
+<tr><td><input type="checkbox" name="c_size" value="1" {if $criteria.c_size==1}checked{/if}> {tr}Which size is bigger than{/tr}:</td><td><input size="10" type="text" name="size" value=""> MB</td></tr>
+<tr><td colspan="2"> </td>
+<tr><td colspan="2" align="left"><input type="submit" class="submit" name="run" value="{tr}Proceed{/tr}"></td>
+</table>
+</form>
+</fieldset>
+{if $expireplugin=='yes'}
+<br><hr><br>
+<fieldset style="text-align: left; width: 100%;">
+<legend>{tr}Expiration plugin{/tr}</legend>
+<p align="left">
+{tr}To delete files marked as expired by the expire plugin press the "Delete expired" button.{/tr}
+<form action="{$script}" method="POST">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="2">
+<input type="submit" name="expire" class="submit" value="{tr}Delete expired{/tr}">
+</form>
+</p>
+</fieldset>
+{/if}
Added: trunk/templates/default/modules/admin/maintenancerun.tpl
===================================================================
--- trunk/templates/default/modules/admin/maintenancerun.tpl (rev 0)
+++ trunk/templates/default/modules/admin/maintenancerun.tpl 2008-12-11 11:04:57 UTC (rev 185)
@@ -0,0 +1,30 @@
+{include file="default/modules/admin/adminmenu.tpl"}
+{include file="default/modules/admin/filesmenu.tpl"}
+
+<h2>{tr}Deletion Result{/tr}</h2>
+<br>
+<div id="message">
+{if count($files)>0}
+{if isset($deleted)}
+<h3>{tr}The following files have been deleted.{/tr}</h3>
+{foreach from=$files item=f}
+<div id="message">{$f.id}</div>
+{/foreach}
+{else}
+<h3>{tr}The following files will be deleted, proceed?{/tr}</h3>
+<form action="{$script}" method="POST">
+<input type="hidden" name="action" value="{$action}">
+<input type="hidden" name="step" value="{$step}">
+<input type="submit" name="delete" class="submit" value="{tr}Yes, delete all{/tr}">
+</form>
+{foreach from=$files item=f}
+<div id="message">{$f.id}</div>
+{/foreach}
+
+{/if}
+{else}
+{tr}No files matched the criteria{/tr}
+{/if}
+</div>
+<br>
+<a href="{$script}?action={$action}"><< {tr}Back to Maintenance{/tr}</a>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|