forked from cartwheelweb/packaginator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.html
191 lines (178 loc) · 9.55 KB
/
base.html
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{% load i18n %}
{% load ifsetting_tag account_tags openid_tags %}
{% load packaginator_tags %}
{% load flatblock_tags %}
<!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" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}" xml:lang="{{ LANGUAGE_CODE }}" lang="{{ LANGUAGE_CODE }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>{% block head_title_base %}{% plain_flatblock 'site.name' %} : {% block head_title %}{% endblock %}{% endblock %}</title>
<!--[if IE]><style>
div {
zoom: 1; /* trigger hasLayout */
}
</style><![endif]-->
<!-- The following is for sticky footer -->
<!--[if !IE 7]>
<style type="text/css">
#wrap {display:table;height:100%}
</style>
<![endif]-->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.1.2/build/cssreset/reset-min.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.1.2/build/cssbase/base-min.css">
<link rel="stylesheet" href="{{ STATIC_URL }}pinax/css/facebox.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}pinax/css/announcements.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}pinax/css/accounts.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}uni_form/uni-form.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}uni_form/uni-form-generic.css" type="text/css" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/djangopackages.css" type="text/css" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/awesome.css" type="text/css" />
{% block extra_head %}{% endblock %}
</head>
<body class="{% block body_class %}{% endblock %}">
<div id="wrap">
<div id="main">
{% if site_wide_announcements %}
<div id="site_wide_announcements">
<ul>
{% for announcement in site_wide_announcements %}
<li>
<a href="{{ announcement.get_absolute_url }}">{{ announcement }}</a> -
<a href="{% url announcement_hide announcement.pk %}?next={{ request.path }}">{% trans "Hide announcement" %}</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
<div id="top_border">
</div>
{% endif %}
<div id="tabhead">
<div class="logo">
<a href="{% url home %}"><img src="{{ STATIC_URL }}img/logo_squares.png" /></a><h1><a href="{% url home %}">{% plain_flatblock 'site.name' %}</a></h1>
</div>
<div class="login">
{% if user.is_authenticated %}
{% ifopenid %}<img src="{{ STATIC_URL }}images/openid-icon.png" alt="Logged in with OpenID" />{% endifopenid %}<b>{% user_display user %}</b>
|
<a href="/help/">{% trans "Help" %}</a>
|
<a href="{% url acct_email %}">{% trans "Account" %}</a>
|
<a href="{% url profile_detail request.user %}">{% trans "Profile" %}</a>
|
{% if user.is_staff %}
<a href="/admin/">{% trans "Admin" %}</a>
|
{% endif %}
<a href="{% if request.openid %}/openid/logout/?next={% url acct_logout %}{% else %}{% url acct_logout %}{% endif %}">{% trans "Logout" %}</a>
{% else %}
<a href="/help/">{% trans "Help" %}</a>
|
<a href="{% url acct_login %}{% if current_path %}?next={{ current_path }}{% endif %}">{% trans "Log in" %}</a> {% trans "or" %} <a href="{% url acct_signup %}">{% trans "Sign Up" %}</a>
<br/>
{% endif %}
{% block locale_switcher %}{% endblock %}
{% comment %}
<form action="{% url search %}">
<input id="id_q_p" type="text" name="q" maxlength="100" value="{% trans "search" %}" autocomplete="off" />
<input id="magnifier-submit" type="submit" value=" " /><br/>
</form>
{% endcomment %}
</div>
<div class="searchform">
<form action="{% url search %}">
<input id="id_q_p" type="text" name="q" maxlength="100" value="{% trans "search" %}" autocomplete="off" />
<input id="magnifier-submit" type="submit" value=" " /><br/>
{% comment %}
<input class="home-searchcheckbox" checked="checked" type="checkbox" name="category" value="apps" />{% trans "apps" %}
<input class="home-searchcheckbox" type="checkbox" name="category" value="frameworks" />{% trans "frameworks" %}
<input class="home-searchcheckbox" type="checkbox" name="category" value="projects" />{% trans "projects" %}
<input class="home-searchcheckbox" type="checkbox" name="category" value="other" />{% trans "other" %}
{% endcomment %}
</form>
</div>
<div id="left_tabs" >
{% for grid_chunk in grid_tabs %}
<div id="multi-col-nav">
{% for tab in grid_chunk %}
{% if tab %}
<a href="{% url grid tab.grid.slug %}" title="{{ tab.grid.description }}">{{ tab.grid.title }}</a><br />
{% endif %}
{% if forloop.parentloop.last and forloop.last %}
<a href="{% url grids %}">{% trans "» more grids..." %}</a>
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
</div>
<div class="clearfix"></div>
{% block body_outer %}
<div id="body">
{% if messages %}
<ul id="messages">
{% for message in messages %}
<li id="message_{{ forloop.counter }}"{% if message.tags %} class="{{ message.tags }}"{% endif %}>
<a href="#"><small>{% trans "clear" %}</small></a>
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
{% block body %}
{% endblock %}
</div>
{% endblock %}
</div>
</div>
<div class="clear"></div>
<div id="footer">
<div class="legal">
<hr /><br/>
{% plain_flatblock 'copyright.text' %}
- <a href="/about/">{% trans "About" %}</a>
- <a href="/help/">{% trans "Help" %}</a>
- <a href="/terms/">{% trans "Terms of Service" %}</a>
- <a href="/help/team/">{% trans "Team" %}</a>
- <a href="http://readthedocs.org/docs/packaginator/en/latest/api_docs.html">{% trans "API" %}</a>
- <a href="/help/syndication/">{% trans "RSS / Atom" %}</a>
<br />
{% plain_flatblock 'footer.text' %}
</div>
</div>
<script src="{% block jquery_src %}http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js{% endblock %}" type="text/javascript"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script>
<script src="{{ STATIC_URL }}uni_form/uni-form.jquery.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}js/jquery.tablesorter.min.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}pinax/js/base.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}js/site.js" type="text/javascript"></script>
{% include "facebox_js.html" %}
{% fixed_ga %}
{% block extra_body %}{% endblock %}
<script type="text/javascript">
$(function() {
$('input#id_q_p').click(function() {
$("input#id_q_p").val('');
});
});
/*
categories = 'frameworks,projects,other';
$("input:checkbox[name=category]").click(function(){
categories = $('input:checkbox[name=category]').not(':checked').map(function() {
return this.value
}).get();
});
*/
$('#id_q_p').autocomplete({
source: '{% url search_packages_autocomplete %}',
minLength: 1,
open: function(event, ui) {
ac_top = $('.ui-autocomplete').css('top');
$('.ui-autocomplete').css({'width': '250px', 'top': ac_top + 10 });
}
});
</script>
</body>
</html>