debian-koji/www/kojiweb/includes/header.chtml
2024-09-30 10:46:26 -04:00

87 lines
3.9 KiB
Text

#encoding UTF-8
#import koji
#from kojiweb import util
#from koji_cli.lib import greetings
#import random
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
#def greeting()
#echo $random.choice($greetings)##slurp
#end def
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>$title | $siteName</title>
<link rel="shortcut icon" href="$util.themePath('images/koji.ico')"/>
<link rel="stylesheet" type="text/css" media="screen" title="Koji Style" href="$util.themePath('koji.css')"/>
<link rel="alternate stylesheet" type="text/css" media="screen" title="Debug" href="$util.themePath('debug.css')"/>
<link rel="alternate" type="application/rss+xml" title="Koji: recent builds" href="/koji/recentbuilds"/>
</head>
<body id="$pageID">
<div id="wrap">
<div id="innerwrap">
<!-- HEADER -->
<div id="header">
<img src="$util.themePath('images/koji.png')" alt="Koji Logo" id="kojiLogo"/>
#set $localnavpath=$util.themePath("extra-nav.html", local=True)
#if os.path.exists($localnavpath)
#set $localnav="".join(open($localnavpath, 'rt', encoding='utf-8').readlines())
$localnav
#end if
<form action="search" id="headerSearch">
<input type="hidden" name="match" value="glob"/>
<select name="type">
<option $util.toggleSelected($self, $type, "package") value="package">Packages</option>
<option $util.toggleSelected($self, $type, "build") value="build">Builds</option>
<option $util.toggleSelected($self, $type, "tag") value="tag">Tags</option>
<option $util.toggleSelected($self, $type, "target") value="target">Build Targets</option>
<option $util.toggleSelected($self, $type, "user") value="user">Users</option>
<option $util.toggleSelected($self, $type, "host") value="host">Hosts</option>
<option $util.toggleSelected($self, $type, "rpm") value="rpm">RPMs</option>
#if $mavenEnabled
<option $util.toggleSelected($self, $type, "maven") value="maven">Maven Artifacts</option>
#end if
#if $winEnabled
<option $util.toggleSelected($self, $type, "win") value="win">Windows Artifacts</option>
#end if
</select>
<input type="text" name="terms" title="You can use glob expressions here (e.g. 'bash-*')" value="$terms"/>
<input type="submit" value="Search"/>
</form>
</div><!-- end header -->
<!-- MAIN NAVIGATION -->
<div id="mainNav">
<h4 class="hide">Main Site Links:</h4>
<ul>
<li id="summaryTab"><a href="index">Summary</a></li>
<li id="packagesTab"><a href="packages">Packages</a></li>
<li id="buildsTab"><a href="builds">Builds</a></li>
<li id="tasksTab"><a href="tasks">Tasks</a></li>
<li id="tagsTab"><a href="tags">Tags</a></li>
<li id="buildtargetsTab"><a href="buildtargets">Build Targets</a></li>
<li id="usersTab"><a href="users">Users</a></li>
<li id="hostsTab"><a href="hosts">Hosts</a></li>
<li id="reportsTab"><a href="reports">Reports</a></li>
<li id="searchTab"><a href="search">Search</a></li>
<li id="apiTab"><a href="api">API</a></li>
</ul>
</div><!-- end mainNav -->
<span id="loginInfo">
$koji.formatTimeLong($currentDate)
#if not $LoginDisabled
|
#if $currentUser
$greeting(), <a href="userinfo?userID=$currentUser.id">$currentUser.name</a> | <a href="logout">logout</a>
#else
<a href="login">login</a>
#end if
#end if
</span>
<div id="content">