Source

bloodhound_theme / bhtheme / templates / bloodhound_theme.html

Full commit
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/"
      py:strip="">

  <div py:def="navigation(category, skip)" id="${category}" class="nav">
    <ul py:if="chrome.nav[category]">
      <li py:for="idx, item in  enumerate(i for i in chrome.nav[category] if i.name not in skip)"
          class="${classes(first_last(idx, chrome.nav[category]), active=item.active)} id_${item.name}">${item.label}</li>
    </ul>
  </div>

  <py:match path="body" once="true" buffer="false"><body class="bh_body">
    <div class="fixed-wrapper" 
        py:with="logo_size = (chrome.logo.width or 170, chrome.logo.height or 48)">
      <div id="banner" py:choose="" >
        <div id="header">
          <div py:when="chrome.logo.src" 
              style="vertical-align: middle; height: ${logo_size[1]}px;"> 
            <div style="float: left;height: ${logo_size[1]}px;">
              <a id="logo" href="${chrome.logo.link or href.wiki('TracIni')+'#header_logo-section'}">
                  <img 
                      src="${chrome.logo.src}" alt="${chrome.logo.alt}" 
                      height="${logo_size[1]}px" width="${logo_size[0]}px" />
              </a> 
            </div>
            <div id="pname"> ${project.name} </div>
            <div id="psum"> ${project.descr or project.description} </div>
          </div>
          <h1 py:otherwise="">
            <a href="${chrome.logo.link or href.wiki('TracIni')+'#header_logo-section'}">
              ${project.name}
            </a>
          </h1>
        </div>
      </div>
      <div id="mainpanel" style="top:${max(60, int(logo_size[1]))}px" 
					class="ui-corner-all">
        ${navigation("mainnav", [])}
				<div id="shortcuts">
					<div class="last">
						<img src="${href('chrome/theme/user.png')}" width="26px" height="26px"/>
					</div>
          <div py:if="'SEARCH_VIEW' in perm">
            <form id="search" action="${href.search()}" method="get">
              <label for="proj-search">Search:</label>
              <input type="text" id="proj-search" name="q" size="10" accesskey="f" value="" />
              <input style="display:none;" type="submit" value=" " />
            </form>
          </div>
					<div>
					  <button id="newticket">
							Create Ticket
							<span class="icon icon_add"></span>
						</button>
					</div>
					<div class="first">
						<img src="${href('chrome/theme/left.png')}" width="20px" height="26px" />
						<img src="${href('chrome/theme/right.png')}" width="20px" height="26px" />
					</div>
				</div>
      </div>
      <div id="outer-wrapper" style="top:${max(60, int(logo_size[1])) + 48}px">
        <div id="ctxtnav" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
          <ul py:if="chrome.ctxtnav" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
              <li py:for="i, elm in enumerate(chrome.ctxtnav)"
                  py:with="is_active = str(elm.attrib.get('href')) == str(href(req.path_info + (req.query_string and '?' + req.query_string or '') ))"
                  class="${classes(first_last(i, chrome.ctxtnav), active=is_active)} ui-corner-top ui-state-default ${is_active and 'ui-tabs-selected ui-state-active' or None}">${elm}</li>
          </ul>
        </div>
        <div id="main-wrapper" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
          <div id="main-scroll">
            <div id="main">
              <div id="warning" py:if="chrome.warnings" class="system-message">
                <py:choose test="len(chrome.warnings)">
                  <py:when test="1">
                    <strong>Warning:</strong> ${chrome.warnings[0]}
                  </py:when>
                  <py:otherwise>
                    <strong>Warnings:</strong>
                    <ul><li py:for="w in chrome.warnings">$w</li></ul>
                  </py:otherwise>
                </py:choose>
              </div>
              <div id="notice" py:if="chrome.notices" class="system-message">
                <py:choose test="len(chrome.notices)">
                  <py:when test="1">
                    <strong>Notice:</strong> ${chrome.notices[0]}
                  </py:when>
                  <py:otherwise>
                    <strong>Notices:</strong>
                    <ul><li py:for="w in chrome.notices">$w</li></ul>
                  </py:otherwise>
                </py:choose>
              </div>
        
              ${select('*|text()')}
          
            
            </div>  
            <py:for each="obj,title in [(chrome, 'Chome'), (chrome.logo, 'Logo')]">
              <h2>$title</h2>
              <ul>
                <li py:for="x in obj">
                  <b>$x</b> <span>${obj[x]}</span>
                </li>
              </ul>
            </py:for>
            <h2>Request</h2>
            <ul>
              <li>
                <b>PATH_INFO</b> <span> ${repr(req.path_info)} </span>
              </li>
              <li>
                <b>QUERY_STRING</b> <span> ${repr(req.query_string)} </span>
              </li>
            </ul>
            <h2>Debug</h2>
            <ul>
            </ul>
          </div>
        </div>
        <div id="footer" xml:lang="en">
          <a id="bhpowered" href="http://incubator.apache.org/bloodhound/"><img
              src="${href.chrome('theme/bh_logo_mini.png')}" height="30"
              width="107" alt="Powered by Bloodhound"/></a>
          <a id="tracpowered" href="http://trac.edgewall.org/"><img 
              src="/trac/project/chrome/common/trac_logo_mini.png" height="30" 
              width="107" alt="Trac Powered" /></a>
          <p class="left">
            Powered by <a href="http://www.apache.org/">Apache<sup>TM</sup></a> <a href="${href.about()}"><strong>Bloodhound ${trac.version}</strong></a>. <br/>
            based on <a href="http://trac.edgewall.org/"><strong>Trac</strong></a>
            by <a href="http://www.edgewall.org/">Edgewall Software</a>.
          </p>
          <p class="right">${chrome.footer}</p>
        </div>
      </div>
    </div>
  </body></py:match>
</html>