⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 grouppage.tmpl

📁 监控大型网络的软件。能够自动发现拓扑结构
💻 TMPL
字号:
## $Id: GroupPage.tmpl 4174 2007-08-23 12:52:56Z jodal $## Extends the UserAdmin template for common useradmin structure.## Builds html for the edit Group screen of the useradmin module.#### Copyright 2003, 2004 Norwegian University of Science and Technology#### This file is part of Network Administration Visualized (NAV)#### NAV is free software; you can redistribute it and/or modify## it under the terms of the GNU General Public License as published by## the Free Software Foundation; either version 2 of the License, or## (at your option) any later version.#### NAV is distributed in the hope that it will be useful,## but WITHOUT ANY WARRANTY; without even the implied warranty of## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the## GNU General Public License for more details.#### You should have received a copy of the GNU General Public License## along with NAV; if not, write to the Free Software## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA###### Authors: Morten Vold <morten.vold@itea.ntnu.no>###extends UserAdmin#import urllib#def textfield($name, $value, $maxLength=0, $forceEditable=0)#if $editable or $forceEditable  <input type="text" name="$name" value="$value" />#else  <i>$value</i>#end if#end def#def add_account($account, $add=False)<li>    <a href="/useradmin/account?id=$account.id">$account.login</a> -    $account.name    #if $add    [<a href="/useradmin/link?gid=$group.id&uid=$account.id&source=group">Add</a>]    #else    [<a href="/useradmin/unlink?gid=$group.id&uid=$account.id&source=group">Remove</a>]    #end if</li>#end def#def add_privilege($privilege)<li>    $privilege.privilegename for    <code>$privilege.target</code>    [<a href="revoke?gid=$group.id&pid=$privilege.privilegeid&target=$urllib.quote($privilege.target)">Revoke</a>]</li>#end def#### useradmin is the content block for all useradmin pages## it begins here###block useradmin<form action="groupsubmit" method="post">#if not $newGroup<input type="hidden" name="id" value="$group.id">#end if<table class="vertitable">    <tr>        <th>Name</th>        <td>$textfield('name', $group.name)</td>    </tr>    <tr>        <th>Description</th>        <td>$textfield('description', $group.description)</td>    </tr>    <tr>        <th></th>        <td><button type="submit">Submit changes</button></td>    </tr></table></form>#if not $newGroup<p>[<a href="groupdel?id=$group.id">Delete group</a>]</p><h3>Privileges</h3><ul>#for $privilege in $group.privileges$add_privilege($privilege)#end for</ul><h4>Grant privileges</h4><p>See <a href="http://www.amk.ca/python/howto/regex/">this HOWTO</a> on theRegular expressions used for matching targets for privileges like'web_access'.</p><form name="privileges" action="grant">    <input type="hidden" name="gid" value="$group.id" />    <select name="pid">    #for $privilege in $privileges        <option value="$privilege.id">$privilege.name</option>    #end for          </select>    Target: <input type="text" name="target" value="" size="60" />    <button type="submit">Grant</button></form><h3>Member list</h3><ul>#for $account in $group.members$add_account($account, False)#end for</ul><h3>Non-member list</h3><ul>#for $account in $group.nonmembers$add_account($account, True)#end for</ul>#end if#end block useradmin

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -