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

📄 maintenancecaltemplate.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 calendar#import time#import mx.DateTime#block tabcontent#set $cal = calendar.monthcalendar(int($year), int($month))#set $today = time.strftime('%Y-%m-%d')<table class="calendar">    <caption>#set $thismonth = time.strptime('%04d-%02d-01' % ($year, $month), '%Y-%m-%d')#set $prevmonth = time.gmtime(time.mktime($thismonth) - 28*24*60*60)#set $prevmonthy = int(time.strftime('%Y', $prevmonth))#set $prevmonthm = int(time.strftime('%m', $prevmonth))        <a href="?y=$prevmonthy&amp;m=$prevmonthm">&lt;&lt;</a>#set $monthname = time.strftime('%B %Y', $thismonth)        $monthname#set $nextmonth = time.gmtime(time.mktime($thismonth) + 32*24*60*60)#set $nextmonthy = int(time.strftime('%Y', $nextmonth))#set $nextmonthm = int(time.strftime('%m', $nextmonth))        <a href="?y=$nextmonthy&amp;m=$nextmonthm">&gt;&gt;</a>    </caption>    <tr>#for $day in calendar.weekheader(9).split(' ')    #if len($day) > 0        <th>$day</th>    #end if#end for    </tr>#for $week in $cal    <tr>    #for $day in $week        #if $day == 0        <td>&nbsp;</td>        #else            #set $date = '%04d-%02d-%02d' % ($year, $month, $day)        <td>            #if $date == $today                #set $todays = 'Today - '            <div class="dayheader" style="background: #beb;">            #else                #set $todays = ''            <div class="dayheader">            #end if            #if calendar.weekday($year, $month, $day) == 5                <span style="color: gray;">            #elif calendar.weekday($year, $month, $day) == 6                <span style="color: red;">            #else                <span>            #end if                <strong>$todays$day</strong>            </span></div>            #if $tasks.has_key($date)                #for $task in $tasks[$date]            <strong>$task.maint_start.strftime('%H:%M'):</strong>            <a href="view?id=$task.maint_taskid" title="$task.description">                    #if len($task.description) > 16            $task.description[:16]...</a>                    #else            $task.description</a>                    #end if                    #if int($task.interval.strftime('%d')) > 0                        #set $interval = int($task.interval.strftime('%d'))            ($(interval)d)                    #else                        #set $interval = int($task.interval.strftime('%H'))            ($(interval)h)                    #end if            <br />                #end for            #else            &nbsp;            #end if        </td>        #end if    #end for    </tr>#end for</table>#end block tabcontent

⌨️ 快捷键说明

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