• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

修訂389bda7fb2d2ed2ea9b3abb8fb89ddd9582f35e5 (tree)
時間2010-06-02 06:04:14
作者Jenny Steele <jsteele@geek...>
CommiterJenny Steele

Log Message

Merge branch 'js/neighborhood_header'

Change Summary

差異

--- a/pyforge/pyforge/templates/master.html
+++ b/pyforge/pyforge/templates/master.html
@@ -13,6 +13,7 @@
1313 <xi:include href="sidebars.html" />
1414 <xi:include href="footer.html" />
1515 <xi:include href="lib.html" />
16+ <xi:include href="neighborhood_project_lib.html" py:if="c.project and c.project.url()==c.project.neighborhood.url()"/>
1617 <head py:match="head" py:attrs="select('@*')">
1718 <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
1819 <title py:replace="''">Your title goes here</title>
--- /dev/null
+++ b/pyforge/pyforge/templates/neighborhood_project_lib.html
@@ -0,0 +1,91 @@
1+<html xmlns:py="http://genshi.edgewall.org/"
2+ xmlns:xi="http://www.w3.org/2001/XInclude"
3+ py:strip="">
4+
5+ <?python from pyforge.lib.security import has_neighborhood_access ?>
6+
7+ <py:def function="main_menu">
8+ <div id="mainmenu" class="span-24 last">
9+ <div class="sf_logo span-10"><a href="/"><img src="${g.forge_static('images/sfc.png')}" alt="SourceForge"/></a></div>
10+ <div class="span-14 tright last">
11+ <a href="/auth/logout" py:if="c.user and c.user._id" class="sf_log_out">Log Out</a>
12+ <a href="/auth/" py:if="not c.user or not c.user._id" class="sf_log_in">Log In</a>
13+ <a href="/users/${c.user.username}" py:if="c.user and c.user._id" class="sf_user_link">$c.user.display_name</a>
14+ <a href="/auth/create_account" py:if="not c.user or not c.user._id" class="sf_create_account">Create Account</a>
15+ <a href="/search/" class="sf_search_link"><span class="ui-icon reverse ui-icon-search"></span> Search</a>
16+ </div>
17+ </div>
18+ </py:def>
19+ <py:def function="nav_menu()">
20+ <div id="nav_menu_missing" class="span-24 last ui-corner-tl" py:if="not c.project.neighborhood"/>
21+ <div id="nav_menu" class="span-24 last ui-corner-tl" py:if="c.project.neighborhood">
22+ <div class="span-1">
23+ <img py:if="c.project.neighborhood.icon" src="${c.project.neighborhood.url()}/icon" class="project_icon"/>
24+ <img py:if="not c.project.neighborhood.icon" src="${g.forge_static('images/project_default.png')}" class="project_icon"/>
25+ </div>
26+ <div class="span-16 project">
27+ <span class="project_name">
28+ <a href="${c.project.neighborhood.url()}" class="neighborhood_name">$c.project.neighborhood.name</a><br/>
29+ </span>
30+ <ul class="nav_links">
31+ <li>
32+ <a href="${c.project.neighborhood.url()}" class="${request.url.rfind(c.project.neighborhood.url(),-len(c.project.neighborhood.url())) != -1 and 'active' or ''}">
33+ <span class="ui-icon ui-icon-home"></span>
34+ </a>
35+ </li>
36+ <li py:if="has_neighborhood_access('admin', c.project.neighborhood)()">
37+ <a href="${c.project.neighborhood.url()}_admin/" class="${c.project.neighborhood.url()+'_admin' in request.url and 'active' or ''}">Admin</a>
38+ </li>
39+ <li py:if="has_neighborhood_access('moderate', c.project.neighborhood)()">
40+ <a href="${c.project.neighborhood.url()}_moderate/" class="${c.project.neighborhood.url()+'_moderate' in request.url and 'active' or ''}">Moderate</a>
41+ </li>
42+ </ul>
43+ </div>
44+ <div class="span-7 last tright">
45+ <span class="neighborhood ui-corner-bl ui-corner-tr">
46+ <form py:if="has_neighborhood_access('create', c.project.neighborhood)()"
47+ method="POST" action="${c.project.neighborhood.url()}/register">
48+ <label for="pid">Register project</label>
49+ <input name="pid" id="pid"/>
50+ <input type="submit" value="Register" class="ui-state-default ui-button ui-button-text"/>
51+ </form>
52+ </span>
53+ </div>
54+ </div>
55+ </py:def>
56+
57+ <py:def function="sidebar_menu()">
58+ <div id="sidebar" class="span-4">
59+ <form py:if="c.app and c.app.searchable" method="GET" action="${c.app.url + 'search/'}">
60+ <span id="app-search">
61+ <input name="q" type="text" class="defaultText" title="Search ${c.app.config.options.mount_point.title()}"/>
62+ </span>
63+ </form>
64+ <div py:if="not c.app or not c.app.searchable">&nbsp;</div>
65+ <py:if test="not c.app and not getattr(c, 'custom_sidebar_menu', None)">&nbsp;</py:if>
66+ <ul id="sidebarmenu" py:if="getattr(c, 'custom_sidebar_menu', None)">
67+ <li py:for="s in c.custom_sidebar_menu">
68+ <a py:if="s.url" href="$s.url" class="$s.className ${request.url.find(s.url,-len(s.url)) != -1 and 'active' or ''}"><span py:if="s.ui_icon" class="ui-icon ui-icon-$s.ui_icon"></span>$s.label</a>
69+ <span py:if="not s.url" class="$s.className nav_head"><span py:if="s.ui_icon" class="ui-icon ui-icon-$s.ui_icon"></span>$s.label</span>
70+ </li>
71+ </ul>
72+ <ul id="sidebarmenu" py:if="getattr(c, 'app', None)">
73+ <li py:if="has_neighborhood_access('admin', c.project.neighborhood)()">
74+ <a href="${c.project.neighborhood.url()}_admin/" class="${c.project.neighborhood.url()+'_admin' in request.url and 'active' or ''}">Admin Neighborhood</a>
75+ </li>
76+ <li py:for="s in c.app.sidebar_menu()">
77+ <a py:if="s.url" href="$s.url" class="$s.className ${request.url.rfind(s.url,-len(s.url)) != -1 and 'active' or ''}"><span py:if="s.ui_icon" class="ui-icon ui-icon-$s.ui_icon"></span>$s.label</a>
78+ <span py:if="not s.url" class="$s.className nav_head"><span py:if="s.ui_icon" class="ui-icon ui-icon-$s.ui_icon"></span>$s.label</span>
79+ </li>
80+ </ul>
81+ <ul id="sidebarmenu"
82+ py:if="getattr(c, 'project', None) and not getattr(c, 'app', None)">
83+ <li py:for="s in c.project.sidebar_menu()">
84+ <a py:if="s.url" href="$s.url" class="$s.className ${s.url[:-1] in request.url and 'active' or ''}">$s.label</a>
85+ <span py:if="not s.url" class="$s.className nav_head">$s.label</span>
86+ </li>
87+ </ul>
88+ </div>
89+ </py:def>
90+
91+</html>