Parent: [e6927a] (diff)

Child: [e3b310] (diff)

Download this file

neighborhood_lib.html    72 lines (65 with data), 3.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<html xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
<?python from pyforge.lib.security import has_neighborhood_access ?>
<py:def function="main_menu">
<div id="mainmenu" class="span-24 last">
<div class="sf_logo span-10"><a href="/"><img src="${g.forge_static('images/sfc.png')}" alt="SourceForge"/><i>Reforged</i></a></div>
<div class="span-14 tright last">
<a href="/auth/logout" py:if="c.user and c.user._id" class="sf_log_out">Log Out</a>
<a href="/auth/" py:if="not c.user or not c.user._id" class="sf_log_in">Log In</a>
<a href="${c.user.url()}" py:if="c.user and c.user._id" class="sf_user_link">$c.user.display_name</a>
<a href="/auth/create_account" py:if="not c.user or not c.user._id" class="sf_create_account">Create Account</a>
<a href="/search/" class="sf_search_link"><span class="ui-icon reverse ui-icon-search"></span> Search</a>
</div>
</div>
</py:def>
<py:def function="nav_menu()">
<div id="nav_menu_missing" class="span-24 last ui-corner-tl" py:if="not neighborhood"/>
<div id="nav_menu" class="span-24 last ui-corner-tl" py:if="neighborhood">
<div class="span-1">
<img py:if="neighborhood.icon" src="${neighborhood.url()}/icon" class="project_icon"/>
<img py:if="not neighborhood.icon" src="${g.forge_static('images/project_default.png')}" class="project_icon"/>
</div>
<div class="span-16 project">
<span class="project_name">
<a href="${neighborhood.url()}" class="neighborhood_name">$neighborhood.name</a><br/>
</span>
<ul class="nav_links">
<li>
<a href="${neighborhood.url()}" class="${request.url.rfind(neighborhood.url(),-len(neighborhood.url())) != -1 and 'active' or ''}">
<span class="ui-icon ui-icon-home"></span>
</a>
</li>
<li py:if="has_neighborhood_access('admin', neighborhood)()">
<a href="${neighborhood.url()}_admin/" class="${neighborhood.url()+'_admin' in request.url and 'active' or ''}">Admin</a>
</li>
<li py:if="has_neighborhood_access('moderate', neighborhood)()">
<a href="${neighborhood.url()}_moderate/" class="${neighborhood.url()+'_moderate' in request.url and 'active' or ''}">Moderate</a>
</li>
</ul>
</div>
<div class="span-7 last tright">
<span class="neighborhood ui-corner-bl ui-corner-tr">
<form py:if="has_neighborhood_access('create', neighborhood)()"
method="POST" action="${neighborhood.url()}/register">
<label for="pid">Register project</label>
<input name="pid" id="pid"/>
<input type="submit" value="Register" class="ui-state-default ui-button ui-button-text"/>
</form>
</span>
</div>
</div>
</py:def>
<!-- <div id="mainmenu">
<div id="project-menu">
<div class="pti"><img py:if="neighborhood.icon" src="${neighborhood.url()}/icon"/> Neighborhood: <a href="${neighborhood.url()}">$neighborhood.name</a></div>
<form py:if="has_neighborhood_access('create', neighborhood)()" style="float:right"
method="POST" action="${neighborhood.url()}/register">
<label for="pid">Register project</label>
<input name="pid" id="pid"/>
<input type="submit" value="Register"/>
</form>
</div>
</div> -->
</html>