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

📄 maintenancelisttemplate.tmpl

📁 Network Administration Visualized 网络管理可视化源码
💻 TMPL
字号:
#encoding UTF-8## $Id:$#### Copyright 2006 UNINETT AS#### 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###### Author: Stein Magnus Jodal <stein.magnus.jodal@uninett.no>###extends MaintenanceTemplate#import mx.DateTime## $verbosetasks may be adjusted to according to preference#attr $verbosetasks = 5#block tabcontent#if not $tasks<p>No maintenance tasks found.</p>#else    #set $taskcount = 0    #for $task in $tasks        #set $taskcount += 1        #if $taskcount <= $verbosetasks<h3>$task.description[:50]</h3><table class="vertitable">    <tr>        <th>Start</th>        <td>$task.maint_start.strftime('%Y-%m-%d %H:%M')</td>    </tr>    <tr>        <th>End</th>        <td>$task.maint_end.strftime('%Y-%m-%d %H:%M')</td>    </tr>    <tr>        <th>Description</th>        <td>$task.description</td>    </tr>    <tr>        <th>Components</th>        <td>$listComponents($task.components)</td>    </tr>    <tr>        <th>Author</th>        <td>$task.author</td>    </tr>#if $authorized    <tr>        <th>State</th>        <td>$task.state.capitalize()</td>    </tr>    <tr>        <th>Actions</th>        <td><a href="edit?id=$task.maint_taskid">Edit</a>    #if not $task.state == 'cancelled'            | <a href="cancel?id=$task.maint_taskid">Cancel now</a>    #end if        </td>    </tr>#end if</table>        #else                #if $taskcount == $verbosetasks+1<h3>Older Maintenance Tasks</h3><table class="vertilist">    <tr>        <th>Start</th>        <th>End</th>        <th>Description</th>        <th>Components</th>        <th>Author</th>        <th>State</th>    </tr>        #end if        #if len($task.description) > 50             #set $desc = $task.description[:50] + '...'        #else            #set $desc = $task.description        #end if        #if type($task.components) is list            #set $comp = len($task.components)        #else            #set $comp = 0        #end if    <tr>        <td>$task.maint_start.strftime('%Y-%m-%d %H:%M')</td>        <td>$task.maint_end.strftime('%Y-%m-%d %H:%M')</td>        <td><a href="view?id=$task.maint_taskid">$desc</a></td>        <td><a href="view?id=$task.maint_taskid">$comp</a></td>        <td>$task.author</td>        <td>$task.state</td>    </tr>        #end if    #end for## End of 'Older Maintenace Tasks' table#if $taskcount > $verbosetasks</table>#end if#end if#end block tabcontent

⌨️ 快捷键说明

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