Merge lp:~timo-wingender/widelands-website/ggz-support into lp:widelands-website

Proposed by Timowi
Status: Merged
Merged at revision: 218
Proposed branch: lp:~timo-wingender/widelands-website/ggz-support
Merge into: lp:widelands-website
Diff against target: 5503 lines (+2736/-1294)
89 files modified
diff_match_patch.py (+2/-2)
media/css/base.css (+225/-101)
media/css/comments.css (+8/-8)
media/css/forum.css (+30/-90)
media/css/ggz.css (+12/-0)
media/css/messages.css (+3/-76)
media/css/news.css (+68/-83)
media/css/notice.css (+12/-0)
media/css/profile.css (+7/-79)
news/templatetags/news.py (+31/-0)
news/urls.py (+12/-12)
news/views.py (+0/-1)
pybb/feeds.py (+22/-5)
pybb/forms.py (+14/-3)
pybb/management/__init__.py (+1/-0)
pybb/management/pybb_notifications.py (+20/-0)
pybb/models.py (+14/-2)
pybb/templatetags/pybb_extras.py (+132/-1)
pybb/urls.py (+4/-0)
pybb/util.py (+3/-5)
pybb/views.py (+7/-0)
settings.py (+1/-0)
templates/django_messages/compose.html (+16/-21)
templates/django_messages/inbox.html (+9/-6)
templates/django_messages/inlines/navigation.html (+14/-14)
templates/django_messages/outbox.html (+9/-5)
templates/django_messages/trash.html (+25/-14)
templates/mainpage.html (+40/-44)
templates/mainpage/online_users.html (+8/-5)
templates/navigation.html (+16/-2)
templates/news/inlines/post_detail.html (+49/-47)
templates/news/post_archive_day.html (+20/-14)
templates/news/post_archive_month.html (+21/-10)
templates/news/post_archive_year.html (+26/-11)
templates/news/post_list.html (+24/-30)
templates/notification/forum_new_post/full.txt (+7/-0)
templates/notification/forum_new_post/notice.html (+2/-0)
templates/notification/forum_new_topic/full.txt (+7/-0)
templates/notification/forum_new_topic/notice.html (+2/-0)
templates/notification/notices.html (+46/-28)
templates/notification/single.html (+50/-0)
templates/notification/wiki_article_edited/notice.html (+1/-1)
templates/pybb/add_post.html (+5/-4)
templates/pybb/delete_post.html (+15/-6)
templates/pybb/edit_post.html (+5/-4)
templates/pybb/forum.html (+62/-39)
templates/pybb/index.html (+7/-3)
templates/pybb/inlines/add_post_form.html (+27/-35)
templates/pybb/inlines/display_category.html (+9/-15)
templates/pybb/inlines/forum_row.html (+0/-2)
templates/pybb/inlines/post.html (+43/-71)
templates/pybb/inlines/topic_row.html (+11/-3)
templates/pybb/last_posts.html (+21/-0)
templates/pybb/pagination.html (+35/-14)
templates/pybb/topic.html (+73/-59)
templates/registration/base.html (+8/-0)
templates/registration/login.html (+49/-20)
templates/registration/password_change_done.html (+23/-8)
templates/registration/password_change_form.html (+65/-20)
templates/registration/password_reset_complete.html (+23/-8)
templates/registration/password_reset_confirm.html (+35/-21)
templates/registration/password_reset_done.html (+23/-8)
templates/registration/password_reset_form.html (+35/-14)
templates/registration/registration_complete.html (+19/-8)
templates/registration/registration_form.html (+82/-54)
templates/right_boxes.html (+27/-26)
templates/threadedcomments/inlines/comments.html (+33/-27)
templates/threadedcomments/preview_comment.html (+16/-18)
templates/wlggz/base.html (+12/-0)
templates/wlggz/edit_ggz.html (+43/-0)
templates/wlggz/view_ggz_highscore.html (+43/-0)
templates/wlggz/view_ggz_matches.html (+45/-0)
templates/wlggz/view_ggz_overview.html (+27/-0)
templates/wlggz/view_ggz_playerstats.html (+106/-0)
templates/wlprofile/edit_profile.html (+36/-11)
templates/wlprofile/view_profile.html (+21/-9)
templates/wlwebchat/index.html (+1/-1)
urls.py (+2/-0)
wiki/feeds.py (+29/-56)
wlggz/admin.py (+27/-0)
wlggz/fields.py (+85/-0)
wlggz/forms.py (+43/-0)
wlggz/ggz_models.py (+189/-0)
wlggz/models.py (+27/-0)
wlggz/urls.py (+25/-0)
wlggz/views.py (+117/-0)
wlprofile/models.py (+23/-0)
wlprofile/templatetags/custom_date.py (+58/-10)
wlprofile/templatetags/wlprofile.py (+6/-0)
To merge this branch: bzr merge lp:~timo-wingender/widelands-website/ggz-support
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+27543@code.launchpad.net

Description of the change

Changes:
* ggz support: set ggz password in the profile, show ggz statistics in the profile and two overview pages: latest ten matches and top ten rating
* show ggz statistics in the forum
* improved navigation through profiles, messaging, notifications
* implementing forum ranking #340926
* add notifications for the forum: new topics and subscribing to topics #336016
* improved pagination in the forum #336699
* show signatures in the forum #357960
* add a form to change the password #591880
* make the feeds valid #454450
* lot of style fixes on the website
* improvement of the news archive

To post a comment you must log in.
259. By Timowi

add feature to pybb: show last five posts

260. By Timowi

pass user through last_post tag

261. By janus

add string filter
modify output template

262. By janus

add pybb_cut_string function to cut a string ;)
modify last_post output

263. By janus

add local timezone support
-> https://bugs.launchpad.net/widelands-website/+bug/345981

264. By janus

add some new forum icons, thx to genesis for this work
modify and implement the new graphics

265. By janus

add the new forum icons, thx to genesis for this work

266. By janus

:d

267. By janus

;)

268. By Timowi

merge trunk

269. By janus

modify the background of user menu
next time the menu will move to the account div in the right menu panel

270. By janus

add some new icons, big thx to genesis

271. By janus

add the new icons in the forum

272. By janus

add new open_topic icon, thx to genesis

273. By janus

modify the webchat guest nickname

274. By janus

sum sum sum ;)

275. By Timowi

merge trunk

276. By Timowi

remove wrong raise Exception

277. By Timowi

add field to choose between markdown and bbcode as markup

278. By Timowi

add new forum rank images by genesis

279. By janus

modify output of forum topic ;), for the forum better handling

280. By Timowi

fix displaying of ggz users which do not exist in django

281. By Timowi

add new columns to ggz matchplayers database schema

282. By Timowi

rename wgllz template

283. By Timowi

display result and points on last matches page

284. By Timowi

style fix by janus

285. By janus

change ranks post count

286. By janus

disable online users if it's none

287. By janus

fix previews commit -.-

288. By janus

many style fixes, remove ggz menu becouse it's not done

289. By janus

fix wiki edit history style, fix new style

290. By janus

remove <li>

291. By janus

remove online menu complitly

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'diff_match_patch.py'
--- diff_match_patch.py 2010-01-03 21:51:19 +0000
+++ diff_match_patch.py 2010-10-30 22:51:06 +0000
@@ -1006,10 +1006,10 @@
1006 text = (data.replace("&", "&amp;").replace("<", "&lt;")1006 text = (data.replace("&", "&amp;").replace("<", "&lt;")
1007 .replace(">", "&gt;").replace("\n", "&para;<BR>"))1007 .replace(">", "&gt;").replace("\n", "&para;<BR>"))
1008 if op == self.DIFF_INSERT:1008 if op == self.DIFF_INSERT:
1009 html.append("<INS STYLE=\"color: #00FF00;\" TITLE=\"i=%i\">%s</INS>"1009 html.append("<SPAN STYLE=\"color: #00FF00;\" TITLE=\"i=%i\">%s</SPAN>"
1010 % (i, text))1010 % (i, text))
1011 elif op == self.DIFF_DELETE:1011 elif op == self.DIFF_DELETE:
1012 html.append("<DEL STYLE=\"color: #FF0000;\" TITLE=\"i=%i\">%s</DEL>"1012 html.append("<SPAN STYLE=\"color: #FF0000;\" TITLE=\"i=%i\">%s</SPAN>"
1013 % (i, text))1013 % (i, text))
1014 elif op == self.DIFF_EQUAL:1014 elif op == self.DIFF_EQUAL:
1015 html.append("<SPAN TITLE=\"i=%i\">%s</SPAN>" % (i, text))1015 html.append("<SPAN TITLE=\"i=%i\">%s</SPAN>" % (i, text))
10161016
=== modified file 'media/css/base.css'
--- media/css/base.css 2010-09-26 13:30:30 +0000
+++ media/css/base.css 2010-10-30 22:51:06 +0000
@@ -1,24 +1,24 @@
1/* HEADER */1/* HEADER */
2div#headerbanner {2div#headerbanner {
3background: url(../img/headback.jpg);3 background: url(../img/headback.jpg);
4background-repeat: repeat-x;4 background-repeat: repeat-x;
5color: #FFFFFF;5 color: #FFFFFF;
6text-align: center;6 text-align: center;
7height:110px;7 height:110px;
8border-bottom:2px solid #090909;8 order-bottom:2px solid #090909;
9}9}
1010
11/***************************************************************/11/***************************************************************/
12/* SIDECOLUMNS */12/* SIDECOLUMNS */
13/***************************************************************/13/***************************************************************/
14#leftcolumn, #rightcolumn {14#leftcolumn, #rightcolumn {
15 background-color: #555555;15 background-color: #555555;
16 background-image: url('../img/Menubackground.png');16 background-image: url('../img/Menubackground.png');
17 border-left: 1px solid #151515;17 border-left: 1px solid #151515;
18 border-right: 1px solid #090909;18 border-right: 1px solid #090909;
19 border-bottom: 1px solid #090909;19 border-bottom: 1px solid #090909;
20 padding-top: 4px; /* A small space */20 padding-top: 4px; /* A small space */
21 vertical-align: top;21 vertical-align: top;
2222
23}23}
24/* The content is capsuled in divs, because24/* The content is capsuled in divs, because
@@ -26,10 +26,10 @@
26 * for tables26 * for tables
27 */27 */
28#leftcontent {28#leftcontent {
29 min-width: 175px;29 min-width: 175px;
30}30}
31#rightcontent {31#rightcontent {
32 min-width: 170px;32 min-width: 170px;
33}33}
3434
3535
@@ -37,19 +37,19 @@
37* Mainmenu37* Mainmenu
38*/38*/
39#mainmenu { 39#mainmenu {
40margin: 0px;40 margin: 0px;
41padding: 0px;41 padding: 0px;
42} 42}
43#mainmenu li {43#mainmenu li {
44 list-style-image: url('../img/1.gif'); 44 list-style-image: url('../img/1.gif');
45 list-style-position: inside;45 list-style-position: inside;
46 font-weight: bold;46 font-weight: bold;
47 padding: 4px;47 padding: 4px;
48} 48}
49#mainmenu .sub {49#mainmenu .sub {
50padding-left: 20px;50 padding-left: 20px;
51color: red;51 color: red;
52font-weight: normal;52 font-weight: normal;
53}53}
5454
5555
@@ -57,52 +57,55 @@
57/* CONTENT COLUMN */57/* CONTENT COLUMN */
58/******************/58/******************/
59#content {59#content {
60 text-align: left;60 text-align: left;
61 vertical-align: top;61 vertical-align: top;
62 padding: 8px;62 padding: 8px;
63 padding-top: 0px;63 padding-top: 0px;
64 background-color: #333333;64 background-color: #000000;
65 background: url(../img/background.png);65 background: url(../img/background.png);
6666
67 font-size: 12px;67 font-size: 12px;
68 color: #D0DFFF;68 color: #D0DFFF;
69 width: 100%;69 width: 100%;
70}70}
7171
72/****************/72/****************/
73/* BOTTOM TABLE */73/* BOTTOM TABLE */
74/****************/74/****************/
75table#table_bottom {75table#table_bottom {
76 background-color: #333333;76 background-color: #333333;
77 background: url(../img/background.png);77 background: url(../img/background.png);
7878
79 width: 100%;79 width: 100%;
80}80}
81td#table_bottomleft {81td#table_bottomleft {
82 background: url(../img/table_bottomleft.png);82 background: url(../img/table_bottomleft.png);
83 background-repeat: no-repeat;83 background-repeat: no-repeat;
84 background-position: left;84 background-position: left;
85 height:8px;85 height:8px;
86 width:8px;86 width:8px;
87}87}
8888
89td#table_bottomright {89td#table_bottomright {
90 background: url(../img/table_bottomright.png);90 background: url(../img/table_bottomright.png);
91 background-repeat: no-repeat;91 background-repeat: no-repeat;
92 background-position: right;92 background-position: right;
93 height:8px;93 height:8px;
94 width:8px;94 width:8px;
95}95}
9696
97/**********/97/**********/
98/* FOOTER */98/* FOOTER */
99/**********/99/**********/
100#footer {100#footer {
101 width: 100%;101 width: 100%;
102 height: 8px;102 height: 8px;
103 background: url(../img/background.png); 103 background: url(../img/background.png);
104}104}
105/* Menu Blocks */105
106/*
107 * Menu Blocks
108 */
106h3.box_title {109h3.box_title {
107 color: #D0DFFF;110 color: #D0DFFF;
108 font-weight: bold;111 font-weight: bold;
@@ -117,96 +120,100 @@
117 padding-bottom: 6px;120 padding-bottom: 6px;
118 margin: 0px;121 margin: 0px;
119}122}
123
120div.box_content {124div.box_content {
121 font-size:12px;125 font-size:12px;
122 line-height: 120%;126 line-height: 120%;
123 border-left: 0px solid #999999;127 border-left: 0px solid #999999;
124 border-right: 0px solid #999999;128 border-right: 0px solid #999999;
125 padding: 6px;129 padding: 6px;
126 padding-top: 0px;130 padding-top: 0px;
127 padding-bottom: 20px;131 padding-bottom: 20px;
128 background-color: #555555;132 background-color: #555555;
129 background-image: url('../img/Menubackground.png');133 background-image: url('../img/Menubackground.png');
130}134}
135
131.box_content p {136.box_content p {
132 margin: 0px;137 margin: 0px;
133 padding: 0px;138 padding: 0px;
134 padding-bottom: 4px;139 padding-bottom: 4px;
135}140}
136141
142.block_center {
143 text-align: center;
144}
137145
138/***************************************************************/146/***************************************************************/
139/* GENERAL STYLE ELEMENTS */147/* GENERAL STYLE ELEMENTS */
140/***************************************************************/148/***************************************************************/
141body {149body {
142 color: #D0DFFF;150 color: #D0DFFF;
143 font-family: Verdana, Arial, Helvetica, sans-serif;151 font-family: Verdana, Arial, Helvetica, sans-serif;
144 font-size: 12px;152 font-size: 12px;
145 background-color: #000000;153 background-color: #000000;
146 margin: 0;154 margin: 0;
147 padding: 0;155 padding: 0;
148}156}
149157
150img {158img {
151 border: 0px;159 border: 0px;
152}160}
153161
154a {162a {
155 color: #D0DFFF;163 color: #D0DFFF;
156 text-decoration: none;164 text-decoration: none;
157 font-weight: bold;165 font-weight: bold;
158 background-color: transparent;166 background-color: transparent;
159}167}
160a.external:before {168a.external:before {
161 padding-right: 2px;169 padding-right: 2px;
162 /* Must be an absolute reference, otherwise some browsers give errors */170 /* Must be an absolute reference, otherwise some browsers give errors */
163 content: url(/wlmedia/img/external_link.gif);171 content: url(/wlmedia/img/external_link.gif);
164}172}
165a.missing {173a.missing {
166 color: rgb(255, 85, 0);174 color: rgb(255, 85, 0);
167} 175}
168176
169177
170a:hover {178a:hover {
171 color: #A0AAFF;179 color: #A0AAFF;
172 text-decoration: underline;180 text-decoration: underline;
173}181}
174182
175
176/*183/*
177 * Default table layout184 * Default table layout
178 */185 */
179th {186th {
180 font-weight: bold;187 font-weight: bold;
181 background-position: left;188 background-position: left;
182 text-align: left;189 text-align: left;
183 padding-left: 4px;190 padding-left: 4px;
184 background-image: url('../img/Navbar.png');191 background-image: url('../img/Navbar.png');
185 background-repeat: repeat-x;192 background-repeat: repeat-x;
186 height: 20px;193 height: 20px;
187}194}
188195
189/*196/*
190 * Odd Even Tags (mainly for tables)197 * Odd Even Tags (mainly for tables)
191 */198 */
192.even {199.even {
193 background-color: #444444;200 background-color: #444444;
194 background: url(../img/background-444.png);201 background: url(../img/background-444.png);
195 padding: 5px;202 padding: 5px;
196}203}
197204
198.odd {205.odd {
199 background-color: #4f4f4f;206 background-color: #4f4f4f;
200 background: url(../img/background-4F4F4F.png);207 background: url(../img/background-4F4F4F.png);
201 padding: 5px;208 padding: 5px;
202}209}
203210
204.legend {211/*
205}212 * Error Handling
206213 */
207.errormessage {214.errormessage {
208 color: #ff0000;215 color: #ff0000;
209 font-size: 13px;216 font-size: 13px;
210}217}
211218
212/* 219/*
@@ -230,3 +237,120 @@
230}237}
231238
232239
240/*
241 * Box Item Model
242 */
243.box_item_model {
244
245}
246
247.border {
248 border: 1px solid rgb(9, 9, 9);
249}
250
251.full_site {
252 width: 100%;
253}
254
255.fixed_site {
256 width: 540px;
257}
258
259.box_item_model img.news {
260 float: right;
261 padding: 0px;
262 width: 20px;
263}
264
265.box_item_model .border_top {
266 border-top: 1px solid rgb(9, 9, );
267}
268
269.box_item_model h3.title {
270 font-weight: bold;
271 font-size: 12px;
272 padding-left: 12px;
273 background-image: url('../img/Navbar.png');
274 background-repeat: repeat-x;
275 border-left: 0px solid #999999;
276 bolder-right: 0px solid #999999;
277 border-top: 0px solid #999999;
278 padding-top: 2px;
279 padding-bottom: 0px;
280 margin: 0px;
281}
282
283.box_item_model .content {
284 line-height: 120%;
285 border: 0px;
286 padding: 2px;
287 padding-top: 5px;
288 padding-left: 15px;
289 background-color: #3F3F3F;
290 background: url('../img/background-3F3F3F.png');
291}
292
293.box_item_model .info_line {
294 text-align: right;
295 padding: 3px;
296 margin: 0px;
297 background-color: #222222;
298 background: url('../img/background-222.png');
299}
300
301.box_item_model .text {
302 vertical-align: baseline;
303 margin-top: 5px;
304 margin-bottom: 5px;
305 margin: 0px;
306 line-height: 130%;
307}
308
309.box_item_model .text:first-letter {
310 color: #7070FF;
311 font-size: 180%;
312 font-family: Cretino, "Bitstream Vera Serif", serif;
313 font-weight: bold;
314}
315
316.box_item_model .show_right {
317 text-align: right;
318 vertical-align: top;
319}
320
321.box_item_model .show_left {
322 text-align: left;
323 vertical-align: top;
324}
325
326.box_item_model .show_center {
327 text-align: center;
328 vertical-align: top;
329}
330
331.show_center {
332 text-align: center;
333 vertical-align: top;
334}
335.button_send {
336 padding:0;
337 margin:0;
338 border:none;
339 color: #222222;
340 background: url(../forum/img/en/send.png) no-repeat center;
341 background-repeat: no-repeat;
342 font-size:12px;
343 width:100px;
344 height: 25px;
345}
346.button_preview {
347 padding:0;
348 margin:0;
349 border:none;
350 color: #222222;
351 background: url(../forum/img/en/preview.png) no-repeat center;
352 background-repeat: no-repeat;
353 font-size:12px;
354 width:100px;
355 height: 25px;
356}
233357
=== modified file 'media/css/comments.css'
--- media/css/comments.css 2010-01-03 18:38:36 +0000
+++ media/css/comments.css 2010-10-30 22:51:06 +0000
@@ -1,14 +1,14 @@
1
2
3/* 1/*
4 * Comment2 * Comment
5 */3 */
6.comment {4.comment {
7 margin: 0px;5 margin: 0px;
8 padding-bottom: 2px;6 padding-bottom: 2px;
9/* border: 1px solid rgb(20%,20%,20%); */7 /*
10 border-top: 0px;8 * border: 1px solid rgb(20%,20%,20%);
11 width: 100%;9 */
10 border-top: 0px;
11 width: 100%;
12}12}
13.comment p {13.comment p {
14 margin: 0px;14 margin: 0px;
@@ -26,4 +26,4 @@
26}26}
27.text textarea {27.text textarea {
28 width: 100%;28 width: 100%;
29}
30\ No newline at end of file29\ No newline at end of file
30}
3131
=== modified file 'media/css/forum.css'
--- media/css/forum.css 2010-01-03 00:07:10 +0000
+++ media/css/forum.css 2010-10-30 22:51:06 +0000
@@ -1,6 +1,17 @@
11
2.index_category, .index_forum {2.index_category, .index_forum {
3 margin-bottom: 20px;3 margin-bottom: 20px;
4 border-left: 0px;
5 border-right: 0px;
6}
7
8.list_overview {
9 display: block;
10 font-weight: bold;
11 padding: 0px;
12 margin-top: 0px;
13 margin-bottom: 0px;
14 background: url('../img/background-444.png');
4}15}
516
6.title {17.title {
@@ -16,7 +27,6 @@
16 text-align: center;27 text-align: center;
17}28}
1829
19
20/*30/*
21 * POSTS31 * POSTS
22 */32 */
@@ -30,6 +40,14 @@
30 height: auto;40 height: auto;
31}41}
3242
43.post .top {
44 vertical-align: top;
45}
46.post .top .signature .line {
47 color: #D0DFFF;
48 font-weight: bolder;
49}
50
33/* 51/*
34 * Post52 * Post
35 */53 */
@@ -87,93 +105,15 @@
87 width: 40%;105 width: 40%;
88}106}
89.post-form #id_body {107.post-form #id_body {
90 width: 100%;108 width: 98%;
91 height: 400px;109 height: 150px;
92}110}
93111.post .bold {
94/*
95 * Post and Edit field
96 */
97
98.forum_poster { font-size: 90%;}
99.forum_post_date { font-size: 90%;}
100
101
102.forum_item .forum_image img {
103 float: right;
104 padding: 0px;
105 margin-left: 20px;
106}
107
108.forum_item {
109 border: 1px solid rgb(9, 9, 9);
110 width: 100%;
111}
112
113.forum_item p {
114 margin-bottom: 5px;
115}
116
117.forum_item h3.title {
118 font-weight: bold;112 font-weight: bold;
119 font-size: 12px;113}
120 padding-left: 12px;114.post .underline {
121 background-image: url('../img/Navbar.png');115 text-decoration: underline;
122 background-repeat: repeat-x;116}
123 border-left: 0px solid #999999;117.post .italic {
124 border-right: 0px solid #999999;118 font-style: italic;
125 border-bottom: 0px solid #999999;119}
126 padding-top: 2px;
127 padding-bottom: 0px;
128 margin: 0px;
129}
130.forum_item .content {
131 line-height: 120%;
132 border: 0px;
133 padding: 2px;
134 padding-top: 5px;
135 padding-left: 15px;
136 background-color: #3F3F3F;
137 background: url(../img/background-3F3F3F.png);
138}
139
140.forum_item .info_line {
141 text-align: right;
142 padding: 3px;
143 margin: 0px;
144 background-color: #222222;
145 background: url(../img/background-222.png);
146}
147
148.forum_item .text {
149 vertical-align: baseline;;
150 margin-top: 5px;
151 margin-bottom: 5px;
152 margin: 0px;
153 line-height: 130%;
154}
155
156.forum_item .text:first-letter {
157 vertical-align: baseline;
158 color: #7070FF;
159 font-size: 180%;
160 font-family: Cretino, "Bitstream Vera Serif", serif;
161 font-weight: bold;
162 }
163
164.forum_item .bottom_line {
165 background-color: #222222;
166 background: url(../img/background-222.png);
167 table-layout: fixed;
168}
169.forum_item .tags {
170 text-align: right;
171}
172.forum_item .comments {
173 text-align: left;
174}
175.forum_item .admin {
176 text-align: center;
177}
178
179
180120
=== added file 'media/css/ggz.css'
--- media/css/ggz.css 1970-01-01 00:00:00 +0000
+++ media/css/ggz.css 2010-10-30 22:51:06 +0000
@@ -0,0 +1,12 @@
1.ggz_stats {
2 width: 120px;
3}
4.ggz_date {
5 width: 150px;
6}
7.ggz_winner {
8 width: 100px;
9}
10.ggz_vs {
11 width: 290px;
12}
013
=== modified file 'media/css/messages.css'
--- media/css/messages.css 2010-01-03 15:47:15 +0000
+++ media/css/messages.css 2010-10-30 22:51:06 +0000
@@ -60,89 +60,16 @@
60 width: 40%;60 width: 40%;
61}61}
62#id_body {62#id_body {
63 width: 100%;63 width: 98%;
64 height: 400px;64 height: 200px;
65}65}
6666
67/*67/*
68 * MessageBox style68 * MessageBox style
69 */69 */
7070
71.message_item .message_image img {71.message_image img {
72 float: right; 72 float: right;
73 padding: 0px;73 padding: 0px;
74 margin-left: 20px;74 margin-left: 20px;
75}75}
76
77.message_item {
78 border: 1px solid rgb(9, 9, 9);
79 width: 100%;
80}
81
82.message_item p {
83 margin-bottom: 5px;
84}
85
86.message_item h3.title {
87 font-weight: bold;
88 font-size: 12px;
89 padding-left: 12px;
90 background-image: url('../img/Navbar.png');
91 background-repeat: repeat-x;
92 border-left: 0px solid #999999;
93 border-right: 0px solid #999999;
94 border-bottom: 0px solid #999999;
95 padding-top: 2px;
96 padding-bottom: 0px;
97 margin: 0px;
98}
99.message_item .content {
100 line-height: 120%;
101 border: 0px;
102 padding: 2px;
103 padding-top: 5px;
104 padding-left: 15px;
105 background-color: #3F3F3F;
106 background: url(../img/background-3F3F3F.png);
107}
108
109.message_item .info_line {
110 text-align: right;
111 padding: 3px;
112 margin: 0px;
113 background-color: #222222;
114 background: url(../img/background-222.png);
115}
116
117.message_item .text {
118 vertical-align: baseline;;
119 margin-top: 5px;
120 margin-bottom: 5px;
121 margin: 0px;
122 line-height: 130%;
123}
124
125.message_item .text:first-letter {
126 vertical-align: baseline;
127 color: #7070FF;
128 font-size: 180%;
129 font-family: Cretino, "Bitstream Vera Serif", serif;
130 font-weight: bold;
131 }
132
133.message_item .bottom_line {
134 background-color: #222222;
135 background: url(../img/background-222.png);
136 table-layout: fixed;
137}
138.message_item .tags {
139 text-align: right;
140}
141.message_item .comments {
142 text-align: left;
143}
144.message_item .admin {
145 text-align: center;
146}
147
148
14976
=== modified file 'media/css/news.css'
--- media/css/news.css 2009-02-27 15:36:38 +0000
+++ media/css/news.css 2010-10-30 22:51:06 +0000
@@ -1,83 +1,68 @@
11/**************************/
2.news_poster { font-size: 90%;}2/* General Style elements */
3.news_post_date { font-size: 90%;}3/**************************/
44.text h1 {
55 font-size: 2.5em;
6.news_item .news_image img {6 margin: 10px 0px;
7 float: right; 7}
8 padding: 0px;8.text h2 {
9 margin-left: 20px;9 font-size: 2em;
10}10 margin: 25px 0px 10px;
1111 line-height: 70%;
12.news_item {12}
13 border: 1px solid rgb(9, 9, 9);13.text h3 {
14 width: 100%;14 font-size: 1.4em;
15}15 margin: 5px 0px;
1616}
17.news_item p {17.text h4 {
18 margin-bottom: 5px;18 font-size: 1.30em;
19}19 margin: 5px 0px;
2020 /*
21.news_item h3.title {21 * text-decoration: underline;
22 font-weight: bold;22 * */
23 font-size: 12px;23}
24 padding-left: 12px;24.text h5 {
25 background-image: url('../img/Navbar.png');25 font-size: 1.2em;
26 background-repeat: repeat-x;26 margin: 5px 0px;
27 border-left: 0px solid #999999;27 /*
28 border-right: 0px solid #999999;28 * text-decoration: underline;
29 border-bottom: 0px solid #999999;29 * font-style: italic;
30 padding-top: 2px;30 * */
31 padding-bottom: 0px;31}
32 margin: 0px;32.text h6 {
33}33 font-size: 1.1em;
34.news_item .content {34 margin: 5px 0px;
35 line-height: 120%;35 /*
36 border: 0px;36 * font-style: italic;
37 padding: 2px;37 * */
38 padding-top: 5px;38}
39 padding-left: 15px;39
40 background-color: #3F3F3F;40.text h1:first-letter,.text h2:first-letter,.text h3:first-letter,.text h4:first-letter,.text h5:first-letter {
41 background: url(../img/background-3F3F3F.png);41 vertical-align: baseline;
42}42 color: #7070FF;
4343 font-size: 180%;
44.news_item .info_line {44 font-family: Cretino, "Bitstream Vera Serif", serif;
45 text-align: right;45 font-weight: bold;
46 padding: 3px;46}
47 margin: 0px;47.text h3:first-letter {
48 background-color: #222222;48 color: rgb(156,156,86);
49 background: url(../img/background-222.png);49}
50}50.text h4:first-letter {
51 51 color: rgb(156,86,156);
52.news_item .text {52 font-size: 150%;
53 vertical-align: baseline;;53}
54 margin-top: 5px;54.text h5:first-letter {
55 margin-bottom: 5px;55 color: rgb(86,156,156);
56 margin: 0px;56 font-size: 120%;
57 line-height: 130%;57}
58}58.news_poster {
5959 font-size: 90%;
60.news_item .text:first-letter {60}
61 vertical-align: baseline;61.news_post_date {
62 color: #7070FF;62 font-size: 90%;
63 font-size: 180%;63}
64 font-family: Cretino, "Bitstream Vera Serif", serif;64.news_image img {
65 font-weight: bold;65 float:right;
66 }66 margin-left:20px;
6767 padding:0;
68.news_item .bottom_line {68}
69 background-color: #222222;
70 background: url(../img/background-222.png);
71 table-layout: fixed;
72}
73.news_item .tags {
74 text-align: right;
75}
76.news_item .comments {
77 text-align: left;
78}
79.news_item .admin {
80 text-align: center;
81}
82
83
8469
=== added file 'media/css/notice.css'
--- media/css/notice.css 1970-01-01 00:00:00 +0000
+++ media/css/notice.css 2010-10-30 22:51:06 +0000
@@ -0,0 +1,12 @@
1.notice_poster {
2 font-size: 90%;
3}
4.notice_post_date {
5 font-size: 90%;
6}
7.notice_unseen_notice {
8 font-style: italic;
9}
10.notice_type {
11 font-weight: bold;
12}
013
=== modified file 'media/css/profile.css'
--- media/css/profile.css 2010-01-02 19:08:16 +0000
+++ media/css/profile.css 2010-10-30 22:51:06 +0000
@@ -1,83 +1,11 @@
11.profile_poster {
2.profile_poster { font-size: 90%;}2 font-size: 90%;
3.profile_post_date { font-size: 90%;}3}
44.profile_post_date {
55 font-size: 90%;
6.profile_item .profile_image img {6}
7.profile_image img {
7 float: right; 8 float: right;
8 padding: 0px;9 padding: 0px;
9 margin-left: 20px;10 margin-left: 20px;
10}11}
11
12.profile_item {
13 border: 1px solid rgb(9, 9, 9);
14 width: 540px;
15}
16
17.profile_item p {
18 margin-bottom: 5px;
19}
20
21.profile_item h3.title {
22 font-weight: bold;
23 font-size: 12px;
24 padding-left: 12px;
25 background-image: url('../img/Navbar.png');
26 background-repeat: repeat-x;
27 border-left: 0px solid #999999;
28 border-right: 0px solid #999999;
29 border-bottom: 0px solid #999999;
30 padding-top: 2px;
31 padding-bottom: 0px;
32 margin: 0px;
33}
34.profile_item .content {
35 line-height: 120%;
36 border: 0px;
37 padding: 2px;
38 padding-top: 5px;
39 padding-left: 15px;
40 background-color: #3F3F3F;
41 background: url(../img/background-3F3F3F.png);
42}
43
44.profile_item .info_line {
45 text-align: right;
46 padding: 3px;
47 margin: 0px;
48 background-color: #222222;
49 background: url(../img/background-222.png);
50}
51
52.profile_item .text {
53 vertical-align: baseline;;
54 margin-top: 5px;
55 margin-bottom: 5px;
56 margin: 0px;
57 line-height: 130%;
58}
59
60.profile_item .text:first-letter {
61 vertical-align: baseline;
62 color: #7070FF;
63 font-size: 180%;
64 font-family: Cretino, "Bitstream Vera Serif", serif;
65 font-weight: bold;
66 }
67
68.profile_item .bottom_line {
69 background-color: #222222;
70 background: url(../img/background-222.png);
71 table-layout: fixed;
72}
73.profile_item .tags {
74 text-align: right;
75}
76.profile_item .comments {
77 text-align: left;
78}
79.profile_item .admin {
80 text-align: center;
81}
82
83
8412
=== added file 'media/css/register.css'
=== added file 'media/forum/img/en/close_small.png'
85Binary files media/forum/img/en/close_small.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/close_small.png 2010-10-30 22:51:06 +0000 differ13Binary files media/forum/img/en/close_small.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/close_small.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/close_topic.png'
86Binary files media/forum/img/en/close_topic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/close_topic.png 2010-10-30 22:51:06 +0000 differ14Binary files media/forum/img/en/close_topic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/close_topic.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/closed.png'
87Binary files media/forum/img/en/closed.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/closed.png 2010-10-30 22:51:06 +0000 differ15Binary files media/forum/img/en/closed.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/closed.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/delete.png'
88Binary files media/forum/img/en/delete.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/delete.png 2010-10-30 22:51:06 +0000 differ16Binary files media/forum/img/en/delete.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/delete.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/edit.png'
89Binary files media/forum/img/en/edit.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/edit.png 2010-10-30 22:51:06 +0000 differ17Binary files media/forum/img/en/edit.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/edit.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/new_topic.png'
90Binary files media/forum/img/en/new_topic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/new_topic.png 2010-10-30 22:51:06 +0000 differ18Binary files media/forum/img/en/new_topic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/new_topic.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/newtopic.png'
91Binary files media/forum/img/en/newtopic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/newtopic.png 2010-10-30 22:51:06 +0000 differ19Binary files media/forum/img/en/newtopic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/newtopic.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/open_topic.png'
92Binary files media/forum/img/en/open_topic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/open_topic.png 2010-10-30 22:51:06 +0000 differ20Binary files media/forum/img/en/open_topic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/open_topic.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/permalink.png'
93Binary files media/forum/img/en/permalink.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/permalink.png 2010-10-30 22:51:06 +0000 differ21Binary files media/forum/img/en/permalink.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/permalink.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/preview.png'
94Binary files media/forum/img/en/preview.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/preview.png 2010-10-30 22:51:06 +0000 differ22Binary files media/forum/img/en/preview.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/preview.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/quote.png'
95Binary files media/forum/img/en/quote.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/quote.png 2010-10-30 22:51:06 +0000 differ23Binary files media/forum/img/en/quote.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/quote.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/search.png'
96Binary files media/forum/img/en/search.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/search.png 2010-10-30 22:51:06 +0000 differ24Binary files media/forum/img/en/search.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/search.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/send.png'
97Binary files media/forum/img/en/send.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/send.png 2010-10-30 22:51:06 +0000 differ25Binary files media/forum/img/en/send.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/send.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/send_pm.png'
98Binary files media/forum/img/en/send_pm.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/send_pm.png 2010-10-30 22:51:06 +0000 differ26Binary files media/forum/img/en/send_pm.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/send_pm.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/sendpm.png'
99Binary files media/forum/img/en/sendpm.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/sendpm.png 2010-10-30 22:51:06 +0000 differ27Binary files media/forum/img/en/sendpm.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/sendpm.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/stick_topic.png'
100Binary files media/forum/img/en/stick_topic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/stick_topic.png 2010-10-30 22:51:06 +0000 differ28Binary files media/forum/img/en/stick_topic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/stick_topic.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/stick_topic_small.png'
101Binary files media/forum/img/en/stick_topic_small.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/stick_topic_small.png 2010-10-30 22:51:06 +0000 differ29Binary files media/forum/img/en/stick_topic_small.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/stick_topic_small.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/sticky.png'
102Binary files media/forum/img/en/sticky.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/sticky.png 2010-10-30 22:51:06 +0000 differ30Binary files media/forum/img/en/sticky.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/sticky.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/subscribe.png'
103Binary files media/forum/img/en/subscribe.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/subscribe.png 2010-10-30 22:51:06 +0000 differ31Binary files media/forum/img/en/subscribe.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/subscribe.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/subscribe_small.png'
104Binary files media/forum/img/en/subscribe_small.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/subscribe_small.png 2010-10-30 22:51:06 +0000 differ32Binary files media/forum/img/en/subscribe_small.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/subscribe_small.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/top.png'
105Binary files media/forum/img/en/top.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/top.png 2010-10-30 22:51:06 +0000 differ33Binary files media/forum/img/en/top.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/top.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/unstick_topic.png'
106Binary files media/forum/img/en/unstick_topic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/unstick_topic.png 2010-10-30 22:51:06 +0000 differ34Binary files media/forum/img/en/unstick_topic.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/unstick_topic.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/forum/img/en/unsubscribe.png'
107Binary files media/forum/img/en/unsubscribe.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/unsubscribe.png 2010-10-30 22:51:06 +0000 differ35Binary files media/forum/img/en/unsubscribe.png 1970-01-01 00:00:00 +0000 and media/forum/img/en/unsubscribe.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/rang_1.png'
108Binary files media/img/rang_1.png 1970-01-01 00:00:00 +0000 and media/img/rang_1.png 2010-10-30 22:51:06 +0000 differ36Binary files media/img/rang_1.png 1970-01-01 00:00:00 +0000 and media/img/rang_1.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/rang_2.png'
109Binary files media/img/rang_2.png 1970-01-01 00:00:00 +0000 and media/img/rang_2.png 2010-10-30 22:51:06 +0000 differ37Binary files media/img/rang_2.png 1970-01-01 00:00:00 +0000 and media/img/rang_2.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/rang_3.png'
110Binary files media/img/rang_3.png 1970-01-01 00:00:00 +0000 and media/img/rang_3.png 2010-10-30 22:51:06 +0000 differ38Binary files media/img/rang_3.png 1970-01-01 00:00:00 +0000 and media/img/rang_3.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/rang_4.png'
111Binary files media/img/rang_4.png 1970-01-01 00:00:00 +0000 and media/img/rang_4.png 2010-10-30 22:51:06 +0000 differ39Binary files media/img/rang_4.png 1970-01-01 00:00:00 +0000 and media/img/rang_4.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/rang_5.png'
112Binary files media/img/rang_5.png 1970-01-01 00:00:00 +0000 and media/img/rang_5.png 2010-10-30 22:51:06 +0000 differ40Binary files media/img/rang_5.png 1970-01-01 00:00:00 +0000 and media/img/rang_5.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/rang_6.png'
113Binary files media/img/rang_6.png 1970-01-01 00:00:00 +0000 and media/img/rang_6.png 2010-10-30 22:51:06 +0000 differ41Binary files media/img/rang_6.png 1970-01-01 00:00:00 +0000 and media/img/rang_6.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/rang_7.png'
114Binary files media/img/rang_7.png 1970-01-01 00:00:00 +0000 and media/img/rang_7.png 2010-10-30 22:51:06 +0000 differ42Binary files media/img/rang_7.png 1970-01-01 00:00:00 +0000 and media/img/rang_7.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/sterne_0.png'
115Binary files media/img/sterne_0.png 1970-01-01 00:00:00 +0000 and media/img/sterne_0.png 2010-10-30 22:51:06 +0000 differ43Binary files media/img/sterne_0.png 1970-01-01 00:00:00 +0000 and media/img/sterne_0.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/sterne_1.png'
116Binary files media/img/sterne_1.png 1970-01-01 00:00:00 +0000 and media/img/sterne_1.png 2010-10-30 22:51:06 +0000 differ44Binary files media/img/sterne_1.png 1970-01-01 00:00:00 +0000 and media/img/sterne_1.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/sterne_2.png'
117Binary files media/img/sterne_2.png 1970-01-01 00:00:00 +0000 and media/img/sterne_2.png 2010-10-30 22:51:06 +0000 differ45Binary files media/img/sterne_2.png 1970-01-01 00:00:00 +0000 and media/img/sterne_2.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/sterne_3.png'
118Binary files media/img/sterne_3.png 1970-01-01 00:00:00 +0000 and media/img/sterne_3.png 2010-10-30 22:51:06 +0000 differ46Binary files media/img/sterne_3.png 1970-01-01 00:00:00 +0000 and media/img/sterne_3.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/sterne_4.png'
119Binary files media/img/sterne_4.png 1970-01-01 00:00:00 +0000 and media/img/sterne_4.png 2010-10-30 22:51:06 +0000 differ47Binary files media/img/sterne_4.png 1970-01-01 00:00:00 +0000 and media/img/sterne_4.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/sterne_5.png'
120Binary files media/img/sterne_5.png 1970-01-01 00:00:00 +0000 and media/img/sterne_5.png 2010-10-30 22:51:06 +0000 differ48Binary files media/img/sterne_5.png 1970-01-01 00:00:00 +0000 and media/img/sterne_5.png 2010-10-30 22:51:06 +0000 differ
=== added file 'media/img/sterne_6.png'
121Binary files media/img/sterne_6.png 1970-01-01 00:00:00 +0000 and media/img/sterne_6.png 2010-10-30 22:51:06 +0000 differ49Binary files media/img/sterne_6.png 1970-01-01 00:00:00 +0000 and media/img/sterne_6.png 2010-10-30 22:51:06 +0000 differ
=== modified file 'news/templatetags/news.py'
--- news/templatetags/news.py 2009-02-24 12:53:54 +0000
+++ news/templatetags/news.py 2010-10-30 22:51:06 +0000
@@ -47,6 +47,37 @@
47 format_string, var_name = m.groups()47 format_string, var_name = m.groups()
48 return LatestPosts(format_string, var_name)48 return LatestPosts(format_string, var_name)
4949
50class NewsYears(template.Node):
51 def __init__(self, var_name):
52 self.var_name = var_name
53
54 def render(self, context):
55 years = Post.objects.all().dates('publish', 'year')
56 context[self.var_name] = years
57 return ''
58
59@register.tag
60def get_news_years(parser, token):
61 """
62 Gets any number of latest posts and stores them in a varable.
63
64 Syntax::
65
66 {% get_latest_posts [limit] as [var_name] %}
67
68 Example usage::
69
70 {% get_latest_posts 10 as latest_post_list %}
71 """
72 try:
73 tag_name, arg = token.contents.split(None, 1)
74 except ValueError:
75 raise template.TemplateSyntaxError, "%s tag requires arguments" % token.contents.split()[0]
76 m = re.search(r'as (\w+)', arg)
77 if not m:
78 raise template.TemplateSyntaxError, "%s tag had invalid arguments" % tag_name
79 (var_name, ) = m.groups()
80 return NewsYears(var_name)
5081
51class NewsCategories(template.Node):82class NewsCategories(template.Node):
52 def __init__(self, var_name):83 def __init__(self, var_name):
5384
=== modified file 'news/urls.py'
--- news/urls.py 2009-03-23 20:34:20 +0000
+++ news/urls.py 2010-10-30 22:51:06 +0000
@@ -6,18 +6,18 @@
6 url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/$',6 url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>[-\w]+)/$',
7 view=news_views.post_detail,7 view=news_views.post_detail,
8 name='news_detail'),8 name='news_detail'),
9 #9
10 # url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',10 url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$',
11 # view=news_views.post_archive_day,11 view=news_views.post_archive_day,
12 # name='news_archive_day'),12 name='news_archive_day'),
13 #13
14 # url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',14 url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',
15 # view=news_views.post_archive_month,15 view=news_views.post_archive_month,
16 # name='news_archive_month'),16 name='news_archive_month'),
17 #17
18 # url(r'^(?P<year>\d{4})/$',18 url(r'^(?P<year>\d{4})/$',
19 # view=news_views.post_archive_year,19 view=news_views.post_archive_year,
20 # name='news_archive_year'),20 name='news_archive_year'),
2121
22 # url(r'^categories/(?P<slug>[-\w]+)/$',22 # url(r'^categories/(?P<slug>[-\w]+)/$',
23 # view=news_views.category_detail,23 # view=news_views.category_detail,
2424
=== modified file 'news/views.py'
--- news/views.py 2009-03-23 20:34:20 +0000
+++ news/views.py 2010-10-30 22:51:06 +0000
@@ -13,7 +13,6 @@
13 return list_detail.object_list(13 return list_detail.object_list(
14 request,14 request,
15 queryset = Post.objects.published(),15 queryset = Post.objects.published(),
16 paginate_by = 20,
17 page = page,16 page = page,
18 **kwargs17 **kwargs
19 )18 )
2019
=== modified file 'pybb/feeds.py'
--- pybb/feeds.py 2009-04-08 18:21:36 +0000
+++ pybb/feeds.py 2010-10-30 22:51:06 +0000
@@ -1,8 +1,8 @@
1from django.contrib.syndication.feeds import Feed1from django.contrib.syndication.feeds import Feed
2from django.utils.feedgenerator import Atom1Feed
3from django.core.urlresolvers import reverse2from django.core.urlresolvers import reverse
4from django.utils.translation import ugettext_lazy as _3from django.utils.translation import ugettext_lazy as _
5from django.core.exceptions import ObjectDoesNotExist4from django.core.exceptions import ObjectDoesNotExist
5from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed
66
7from pybb.models import Post, Topic, Forum7from pybb.models import Post, Topic, Forum
88
@@ -27,10 +27,10 @@
27 else: 27 else:
28 return self.items_for_object(obj)28 return self.items_for_object(obj)
2929
30 def link(self,obj):30 def link(self, obj):
31 if obj == self.all_objects:31 if obj == self.all_objects:
32 return reverse('pybb_index')32 return reverse('pybb_index')
33 return reverse('pybb_forum', args=(obj.pk,))33 return "/ewfwevw%s" % reverse('pybb_forum', args=(obj.pk,))
34 34
35 def get_object(self,bits):35 def get_object(self,bits):
36 """36 """
@@ -46,12 +46,15 @@
46 ##########################46 ##########################
47 # Individual items below #47 # Individual items below #
48 ##########################48 ##########################
49 def item_guid(self, obj):49 def item_id(self, obj):
50 return str(obj.id)50 return str(obj.id)
5151
52 def item_pubdate(self, obj):52 def item_pubdate(self, obj):
53 return obj.created53 return obj.created
54 54
55 def item_links(self, item):
56 return [{'href': item.get_absolute_url()}, ]
57
5558
56class LastPosts(PybbFeed):59class LastPosts(PybbFeed):
57 all_title = _('Latest posts on all forums')60 all_title = _('Latest posts on all forums')
@@ -66,6 +69,13 @@
66 def items_for_object(self,obj):69 def items_for_object(self,obj):
67 return Post.objects.filter( topic__forum = obj ).order_by('-created')[:15]70 return Post.objects.filter( topic__forum = obj ).order_by('-created')[:15]
6871
72 def item_author_name(self, item):
73 """
74 Takes the object returned by get_object and returns the feeds's
75 auhor's name as a Python string
76 """
77 return item.user.username
78
6979
70class LastTopics(PybbFeed):80class LastTopics(PybbFeed):
71 all_title = _('Latest topics on all forums')81 all_title = _('Latest topics on all forums')
@@ -80,3 +90,10 @@
80 def items_for_object(self,obj):90 def items_for_object(self,obj):
81 return Topic.objects.filter( forum = obj ).order_by('-created')[:15]91 return Topic.objects.filter( forum = obj ).order_by('-created')[:15]
8292
93 def item_author_name(self, item):
94 """
95 Takes the object returned by get_object and returns the feeds's
96 auhor's name as a Python string
97 """
98 return item.user.username
99
83100
=== modified file 'pybb/forms.py'
--- pybb/forms.py 2009-04-10 11:35:06 +0000
+++ pybb/forms.py 2010-10-30 22:51:06 +0000
@@ -10,13 +10,15 @@
10from pybb.models import Topic, Post, PrivateMessage, Attachment10from pybb.models import Topic, Post, PrivateMessage, Attachment
11from pybb import settings as pybb_settings11from pybb import settings as pybb_settings
1212
13from notification import models as notification
14
13class AddPostForm(forms.ModelForm):15class AddPostForm(forms.ModelForm):
14 name = forms.CharField(label=_('Subject'))16 name = forms.CharField(label=_('Subject'))
15 attachment = forms.FileField(label=_('Attachment'), required=False)17 attachment = forms.FileField(label=_('Attachment'), required=False)
1618
17 class Meta:19 class Meta:
18 model = Post20 model = Post
19 fields = ['body']21 fields = ['body', 'markup',]
2022
21 def __init__(self, *args, **kwargs):23 def __init__(self, *args, **kwargs):
22 self.user = kwargs.pop('user', None)24 self.user = kwargs.pop('user', None)
@@ -25,7 +27,7 @@
25 self.ip = kwargs.pop('ip', None)27 self.ip = kwargs.pop('ip', None)
26 super(AddPostForm, self).__init__(*args, **kwargs)28 super(AddPostForm, self).__init__(*args, **kwargs)
2729
28 self.fields.keyOrder = ['name', 'body', 'attachment']30 self.fields.keyOrder = ['name', 'body', 'markup', 'attachment']
2931
30 if self.topic:32 if self.topic:
31 self.fields['name'].widget = forms.HiddenInput()33 self.fields['name'].widget = forms.HiddenInput()
@@ -47,20 +49,29 @@
4749
48 def save(self):50 def save(self):
49 if self.forum:51 if self.forum:
52 topic_is_new = True
50 topic = Topic(forum=self.forum,53 topic = Topic(forum=self.forum,
51 user=self.user,54 user=self.user,
52 name=self.cleaned_data['name'])55 name=self.cleaned_data['name'])
53 topic.save()56 topic.save()
54 else:57 else:
58 topic_is_new = False
55 topic = self.topic59 topic = self.topic
5660
57 post = Post(topic=topic, user=self.user, user_ip=self.ip,61 post = Post(topic=topic, user=self.user, user_ip=self.ip,
58 markup="markdown",62 markup=self.cleaned_data['markup'],
59 body=self.cleaned_data['body'])63 body=self.cleaned_data['body'])
60 post.save()64 post.save()
6165
62 if pybb_settings.ATTACHMENT_ENABLE:66 if pybb_settings.ATTACHMENT_ENABLE:
63 self.save_attachment(post, self.cleaned_data['attachment'])67 self.save_attachment(post, self.cleaned_data['attachment'])
68
69 if topic_is_new:
70 notification.send(User.objects.all(), "forum_new_topic",
71 {'topic': topic, 'post':post, 'user':topic.user})
72 else:
73 notification.send(self.topic.subscribers.all(), "forum_new_post",
74 {'post':post, 'topic':topic, 'user':post.user})
64 return post75 return post
6576
6677
6778
=== modified file 'pybb/management/__init__.py'
--- pybb/management/__init__.py 2009-02-25 16:55:36 +0000
+++ pybb/management/__init__.py 2010-10-30 22:51:06 +0000
@@ -0,0 +1,1 @@
1import pybb_notifications
02
=== added file 'pybb/management/pybb_notifications.py'
--- pybb/management/pybb_notifications.py 1970-01-01 00:00:00 +0000
+++ pybb/management/pybb_notifications.py 2010-10-30 22:51:06 +0000
@@ -0,0 +1,20 @@
1from django.db.models import signals
2
3from django.utils.translation import ugettext_noop as _
4
5try:
6 from notification import models as notification
7
8 def create_notice_types(app, created_models, verbosity, **kwargs):
9 notification.create_notice_type("forum_new_topic",
10 _("Forum New Topic"),
11 _("a new topic has been added to the forum"),
12 default=1)
13 notification.create_notice_type("forum_new_post",
14 _("Forum New Post"),
15 _("a new comment has been posted to a topic you observe"))
16
17 signals.post_syncdb.connect(create_notice_types,
18 sender=notification)
19except ImportError:
20 print "Skipping creation of NoticeTypes as notification app not found"
021
=== modified file 'pybb/models.py'
--- pybb/models.py 2010-01-02 23:11:47 +0000
+++ pybb/models.py 2010-10-30 22:51:06 +0000
@@ -18,9 +18,15 @@
18if settings.USE_SPHINX:18if settings.USE_SPHINX:
19 from djangosphinx import SphinxSearch19 from djangosphinx import SphinxSearch
2020
21try:
22 from notification import models as notification
23 from django.db.models import signals
24except ImportError:
25 notification = None
26
21MARKUP_CHOICES = (27MARKUP_CHOICES = (
22 ('markdown', 'markdown'),28 ('markdown', 'markdown'),
23 # ('bbcode', 'bbcode'),29 ('bbcode', 'bbcode'),
24)30)
2531
2632
@@ -127,10 +133,12 @@
127 return reverse('pybb_topic', args=[self.id])133 return reverse('pybb_topic', args=[self.id])
128134
129 def save(self, *args, **kwargs):135 def save(self, *args, **kwargs):
130 if self.id is None:136 new = self.id is None
137 if new:
131 self.created = datetime.now()138 self.created = datetime.now()
132 super(Topic, self).save(*args, **kwargs)139 super(Topic, self).save(*args, **kwargs)
133140
141
134 def update_read(self, user):142 def update_read(self, user):
135 read, new = Read.objects.get_or_create(user=user, topic=self)143 read, new = Read.objects.get_or_create(user=user, topic=self)
136 if not new:144 if not new:
@@ -207,6 +215,7 @@
207 def save(self, *args, **kwargs):215 def save(self, *args, **kwargs):
208 if self.created is None:216 if self.created is None:
209 self.created = datetime.now()217 self.created = datetime.now()
218
210 self.render()219 self.render()
211220
212 new = self.id is None221 new = self.id is None
@@ -339,5 +348,8 @@
339 self.path)348 self.path)
340349
341350
351#if notification is not None:
352# signals.post_save.connect(notification.handle_observations, sender=Post)
353
342from pybb import signals354from pybb import signals
343signals.setup_signals()355signals.setup_signals()
344356
=== modified file 'pybb/templatetags/pybb_extras.py'
--- pybb/templatetags/pybb_extras.py 2009-12-06 09:53:08 +0000
+++ pybb/templatetags/pybb_extras.py 2010-10-30 22:51:06 +0000
@@ -1,16 +1,21 @@
1# coding=UTF-8
2
1from datetime import datetime, timedelta3from datetime import datetime, timedelta
4import re
5from pprint import pprint
26
3from django import template7from django import template
4from django.core.urlresolvers import reverse8from django.core.urlresolvers import reverse
5from django.utils.safestring import mark_safe9from django.utils.safestring import mark_safe
6from django.template import RequestContext10from django.template import RequestContext
11from django.template.defaultfilters import stringfilter
7from django.utils.encoding import smart_unicode12from django.utils.encoding import smart_unicode
8from django.db import settings13from django.db import settings
9from django.utils.html import escape14from django.utils.html import escape
10from django.utils.translation import ugettext as _15from django.utils.translation import ugettext as _
11from django.utils import dateformat16from django.utils import dateformat
1217
13from pybb.models import Forum, Topic, Read, PrivateMessage18from pybb.models import Post, Forum, Topic, Read, PrivateMessage
14from pybb.unread import cache_unreads19from pybb.unread import cache_unreads
15from pybb import settings as pybb_settings20from pybb import settings as pybb_settings
1621
@@ -73,6 +78,13 @@
73 'label': label,78 'label': label,
74 }79 }
7580
81@register.inclusion_tag('pybb/last_posts.html', takes_context=True)
82def pybb_last_posts(context, number = 5):
83 last_posts = Post.objects.order_by('-created').select_related()[:5]
84 return {
85 'posts': last_posts,
86 'user': context['user'],
87 }
7688
77@register.simple_tag89@register.simple_tag
78def pybb_link(object, anchor=u''):90def pybb_link(object, anchor=u''):
@@ -179,3 +191,122 @@
179@register.filter191@register.filter
180def pybb_unreads(qs, user):192def pybb_unreads(qs, user):
181 return cache_unreads(qs, user)193 return cache_unreads(qs, user)
194
195@register.filter
196@stringfilter
197def pybb_cut_string(value, arg):
198 if len(value) > arg:
199 return value[0:arg-3] + "..."
200 else:
201 return value
202
203@register.filter
204@stringfilter
205def pybb_output_bbcode(post):
206 """
207 post = post.replace('[b]', '<span class="bold">')
208 post = post.replace('[i]', '<span class="italic">')
209 post = post.relpace('[u]', '<span class="underline">')
210
211 post = post.replace('[/b]', '</span>')
212 post = post.replace('[/i]', '</span>')
213 post = post.replace('[/u]', '</span>')
214 """
215 return pprint(post)
216
217@register.simple_tag
218def pybb_render_post(post, mode='html'):
219 """
220 Process post contents and replace special tags with human readeable messages.
221
222 Arguments:
223 post - the ``Post`` instance
224 mode - "html" or "text". Control which field to use ``body_html`` or ``body_text``
225
226 Currently following tags are supported:
227
228 @@@AUTOJOIN-(SECONDS)@@@ - autojoin message
229
230 """
231
232 def render_autojoin_message(match):
233 time_diff = int(match.group(1)) / 60
234
235 join_message = ungettext(u"Added after %s minute",
236 u"Added after %s minutes",
237 time_diff)
238 join_message %= time_diff
239
240 if mode == 'html':
241 return u'<div class="autojoin-message">%s</div>' % join_message
242 else:
243 return join_message
244
245
246 body = getattr(post, 'body_%s' % mode)
247 re_tag = re.compile(r'@@@AUTOJOIN-(\d+)@@@')
248 return re_tag.sub(render_autojoin_message, body)
249
250"""
251Spielwiese, Playground, Cour de récréati ;)
252"""
253
254@register.filter
255@stringfilter
256def pybb_trim_string(value, arg):
257 """
258 Mit "arg" ist es moeglich 1 oder mehr Werte der Funtion zu Uebergeben. Wenn
259 mehr als 1 Wert genutzt werden soll wird es durch "-" getrennt. Jeder Wert
260 kann entweder die Beschraenkung fuer die Zeichen oder Woerter beinhalten.
261 Um das eindeutig zu identifizieren Wort "w" und Zeichen "z".
262 Beispiel:
263 1. w:10 -> Auf 10 Worte beschraenken
264 2. z:250 -> Auf 250 Zeichen beschraenken
265 3. w:10-z:250 -> Auf 10 Worte und 250 Zeichen beschraenken
266
267 Beim spaeteren drueber nachdenken ist das mit den Worten eig. egal und
268 koennte wieder entfernt werden, aber vllt findet ja einer noch einen nutzen
269 dafuer ;)
270 """
271 _iWord = ""
272 _iSign = ""
273 _lArguments = arg.split("-")
274 _sOption = _lArguments[0].split(":")[0]
275 _iValue = _lArguments[0].split(":")[1]
276 if len(_lArguments) == 1:
277 if _sOption == "w":
278 _iWord = int(_iValue)
279 elif _sOption == "z":
280 _iSign = int(_iValue)
281 else:
282 pass
283 elif len(_lArguments) == 2:
284 if _sOption == "w":
285 _iWord = int(_iValue)
286 _iSign = int(_lArguments[1].split(":")[1])
287 elif _sOption == "z":
288 _iSign = int(_iValue)
289 _iWord = int(_lArguments[1].split(":")[1])
290 else:
291 pass
292 else:
293 pass
294 if _iWord != "" or _iSign != "":
295 _iWordCount = int(len(value.split(" ")))
296 _iSignCount = int(len(value))
297 """
298 Hier waere noch die Ueberlegung wenn 2 Werte gesetzt das man dann
299 wirklich nur ganze Woerter anzeigen laesst ohne sie zu beschneiden
300 """
301 if _iWord != "" and _iSign != "" and _iSignCount >= _iSign:
302 return value[0:_iSign] + "..."
303 elif _iWord != "" and _iSign == "" and _iWordCount >= _iWord:
304 return ' '.join(value.split(" ")[0:_iWord]) + "..."
305 elif _iWord == "" and _iSign != "" and _iSignCount >= _iSign:
306 return value[0:_iSign] + "..."
307 else:
308 return value
309 # return " " + str(len(value)) + " " + str(len(value.split(" "))) + " " + str(arg) + " " + str(_iWord) + ":" + str(_iWordCount) + " " + str(_iSign) + ":" + str(_iSignCount)
310 else:
311 return value
312
182313
=== modified file 'pybb/urls.py'
--- pybb/urls.py 2009-03-17 15:02:13 +0000
+++ pybb/urls.py 2010-10-30 22:51:06 +0000
@@ -37,4 +37,8 @@
3737
38 # API 38 # API
39 url('^api/post_ajax_preview/$', views.post_ajax_preview, name='pybb_post_ajax_preview'),39 url('^api/post_ajax_preview/$', views.post_ajax_preview, name='pybb_post_ajax_preview'),
40
41 # Subsciption
42 url('^topic/(?P<topic_id>\d+)/subscribe/$', views.add_subscription, name='pybb_add_subscription'),
43 url('^topic/(?P<topic_id>\d+)/unsubscribe/$', views.delete_subscription, name='pybb_delete_subscription'),
40)44)
4145
=== modified file 'pybb/util.py'
--- pybb/util.py 2009-02-28 12:03:41 +0000
+++ pybb/util.py 2010-10-30 22:51:06 +0000
@@ -173,14 +173,12 @@
173 text = user.username + " wrote:\n" + text173 text = user.username + " wrote:\n" + text
174174
175 # if markup == 'markdown':175 # if markup == 'markdown':
176 if markup:176 if markup == 'markdown':
177 return '>'+text.replace('\n','\n>').replace('\r','\n>') + '\n'177 return '>'+text.replace('\n','\n>').replace('\r','\n>') + '\n'
178 elif markup == 'bbcode':
179 return '[quote]\n%s\n[/quote]\n' % text
178 else:180 else:
179 return text181 return text
180 # elif markup == 'bbcode':
181 # return '[quote]\n%s\n[/quote]\n' % text
182 # else:
183 # return text
184182
185183
186def absolute_url(path):184def absolute_url(path):
187185
=== modified file 'pybb/views.py'
--- pybb/views.py 2009-06-08 13:26:43 +0000
+++ pybb/views.py 2010-10-30 22:51:06 +0000
@@ -18,6 +18,11 @@
18from pybb import settings as pybb_settings18from pybb import settings as pybb_settings
19from pybb.orm import load_related19from pybb.orm import load_related
2020
21try:
22 from notification import models as notification
23except ImportError:
24 notification = None
25
21def index_ctx(request):26def index_ctx(request):
22 quick = {'posts': Post.objects.count(),27 quick = {'posts': Post.objects.count(),
23 'topics': Topic.objects.count(),28 'topics': Topic.objects.count(),
@@ -165,6 +170,8 @@
165170
166 if form.is_valid():171 if form.is_valid():
167 post = form.save();172 post = form.save();
173 if not topic:
174 post.topic.subscribers.add(request.user)
168 return HttpResponseRedirect(post.get_absolute_url())175 return HttpResponseRedirect(post.get_absolute_url())
169176
170 if topic:177 if topic:
171178
=== modified file 'settings.py'
--- settings.py 2010-09-26 13:30:30 +0000
+++ settings.py 2010-10-30 22:51:06 +0000
@@ -199,6 +199,7 @@
199 'widelands.wlevents',199 'widelands.wlevents',
200 'widelands.wlmaps',200 'widelands.wlmaps',
201 'widelands.wlscreens',201 'widelands.wlscreens',
202 'widelands.wlggz',
202203
203 # Modified 3rd party apps204 # Modified 3rd party apps
204 'widelands.wiki', # This is based on wikiapp, but has some local modifications205 'widelands.wiki', # This is based on wikiapp, but has some local modifications
205206
=== modified file 'templates/django_messages/compose.html'
--- templates/django_messages/compose.html 2010-03-14 14:13:24 +0000
+++ templates/django_messages/compose.html 2010-10-30 22:51:06 +0000
@@ -10,28 +10,23 @@
10{% include "django_messages/inlines/navigation.html" %}10{% include "django_messages/inlines/navigation.html" %}
11<br />11<br />
12<br />12<br />
13<div class="message_item">13<div class="box_item_model fixed_site border">
14 <h3 class="title">{% trans "Compose Message"%}</h3>14 <h3 class="title">{% trans "Compose Message"%}</h3>
15 <div class="content">15 <form action="" method="post">
16 <form action="" method="post">16 <div class="content">
17 <table class="text" width="100%" cellspacing="1">17 <table class="text full_site" cellspacing="1">
18 {% for field in form %}18 {% for field in form %}
19 <tr>19 <tr>
20 <td {% ifequal field.name "body" %}valign="top" {% endifequal %}width="80" class="{% cycle "odd" "even" %}">{{ field.label_tag }}:</td>20 <td width="80" class="{% cycle "odd" "even" %}{% ifequal field.name "body" %} show_left{% endifequal %}">{{ field.label_tag }}:</td>
21 <td class="{% cycle "odd" "even" %}">{{ field }}</td>21 <td class="{% cycle "odd" "even" %}">{{ field }}</td>
22 <td width="1%" class="{% cycle "odd" "even" %}"></td>22 </tr>
23 </tr>23 {% endfor %}
24 {% endfor %}24 </table>
25 </table>25 </div>
26 </div>26 <div class="info_line show_center">
27 <table class="bottom_line" width="100%">27 <input type="submit" value="{% trans "Send" %} &raquo;"/>
28 <tr>28 </div>
29 <td class="admin">29 </form>
30 <input type="submit" value="{% trans "Send" %} &raquo;"/>
31 </td>
32 <tr>
33 </table>
34 </form>
35</div>30</div>
3631
37{% endblock %}32{% endblock %}
3833
=== modified file 'templates/django_messages/inbox.html'
--- templates/django_messages/inbox.html 2010-03-14 14:13:24 +0000
+++ templates/django_messages/inbox.html 2010-10-30 22:51:06 +0000
@@ -7,15 +7,17 @@
77
8{% block content %}8{% block content %}
9 {% include "django_messages/inlines/navigation.html" %}9 {% include "django_messages/inlines/navigation.html" %}
1010 <br />
11 <h1>{% trans "Inbox" %}</h1>11 <br />
12 <div class="box_item_model border">
13 <h3 class="title">{% trans "Inbox" %}</h3>
12 <table class="messages" cellspacing="1">14 <table class="messages" cellspacing="1">
13 <thead>15 <thead>
14 <tr>16 <tr>
15 <th>{% trans "Sender" %}</th>17 <td>{% trans "Sender" %}</td>
16 <th>{% trans "Subject" %}</th>18 <td>{% trans "Subject" %}</td>
17 <th>{% trans "Received" %}</th>19 <td>{% trans "Received" %}</td>
18 <th>{% trans "Action" %}</th>20 <td>{% trans "Action" %}</td>
19 </tr>21 </tr>
20 </thead>22 </thead>
21 <tbody>23 <tbody>
@@ -24,4 +26,5 @@
24 {% endfor %}26 {% endfor %}
25 </tbody>27 </tbody>
26 </table>28 </table>
29 </div>
27{% endblock %}30{% endblock %}
2831
=== modified file 'templates/django_messages/inlines/navigation.html'
--- templates/django_messages/inlines/navigation.html 2009-03-15 20:26:08 +0000
+++ templates/django_messages/inlines/navigation.html 2010-10-30 22:51:06 +0000
@@ -1,19 +1,19 @@
1{% load i18n %} 1{% load i18n %}
22
3{% if user.is_authenticated %}
3<div>4<div>
4 <table width="100%">5 <table width="100%">
5 <tr>6 <tr>
6 <td align="left">7 <td width="">&nbsp;
7 <a href="{% url profile_view %} ">{% trans "Profile" %}</a>8 </td>
8 | <a href="{% url notification_notices %} ">{% trans "Notifications" %}</a>9 <td width="370" align="right" style="table-layout: fixed; background-image: url(http://wl-testbed.dyndns.org/wlmedia/img/background-4F4F4F.png);">
9 </td>10 <a href="{% url messages_inbox %} ">{% trans "Inbox" %}</a>
10 <td align="right" style="table-layout: fixed;">11 | <a href="{% url messages_outbox %} ">{% trans "Sent Messages" %}</a>
11 <a href="{% url messages_inbox %} ">{% trans "Inbox" %}</a>12 | <a href="{% url messages_compose %} ">{% trans "New Message" %}</a>
12 | <a href="{% url messages_outbox %} ">{% trans "Sent Messages" %}</a>13 | <a href="{% url messages_trash %} ">{% trans "Message Trash" %}</a>
13 | <a href="{% url messages_compose %} ">{% trans "New Message" %}</a>14 </td>
14 | <a href="{% url messages_trash %} ">{% trans "Message Trash" %}</a>15 </tr>
15 </td>16 </table>
16 </tr>
17 </table>
18</div>17</div>
18{% endif %}
1919
2020
=== modified file 'templates/django_messages/outbox.html'
--- templates/django_messages/outbox.html 2010-03-14 14:13:24 +0000
+++ templates/django_messages/outbox.html 2010-10-30 22:51:06 +0000
@@ -7,14 +7,17 @@
77
8{% block content %} 8{% block content %}
9{% include "django_messages/inlines/navigation.html" %}9{% include "django_messages/inlines/navigation.html" %}
10<h1>{% trans "Sent Messages" %}</h1>10<br />
11<br />
12<div class="box_item_model border">
13<h3 class="title">{% trans "Sent Messages" %}</h3>
11<table class="messages" cellspacing="1"> 14<table class="messages" cellspacing="1">
12 <thead>15 <thead>
13 <tr>16 <tr>
14 <th>{% trans "Recipient" %}</th>17 <td>{% trans "Recipient" %}</td>
15 <th>{% trans "Subject" %}</th>18 <td>{% trans "Subject" %}</td>
16 <th>{% trans "Sent" %}</th>19 <td>{% trans "Sent" %}</td>
17 <th>{% trans "Action" %}</th>20 <td>{% trans "Action" %}</td>
18 </tr>21 </tr>
19 </thead>22 </thead>
20 <tbody>23 <tbody>
@@ -23,4 +26,5 @@
23 {% endfor %}26 {% endfor %}
24 </tbody>27 </tbody>
25</table>28</table>
29</div>
26{% endblock %}30{% endblock %}
2731
=== modified file 'templates/django_messages/trash.html'
--- templates/django_messages/trash.html 2010-03-14 14:13:24 +0000
+++ templates/django_messages/trash.html 2010-10-30 22:51:06 +0000
@@ -7,22 +7,33 @@
77
8{% block content %} 8{% block content %}
9{% include "django_messages/inlines/navigation.html" %} 9{% include "django_messages/inlines/navigation.html" %}
10<h1>{% trans "Deleted Messages" %}</h1>10<br />
11<table class="messages" cellspacing="1">11<br />
12 <thead>12<div class="box_item_model border">
13 <tr>13 <h3 class="title">{% trans "Deleted Messages" %}</h3>
14 <th>{% trans "Sender" %}</th>14 <table class="messages" cellspacing="1">
15 <th>{% trans "Subject" %}</th>15 <thead>
16 <th>{% trans "Date" %}</th>16 <tr>
17 <th>{% trans "Action" %}</th>17 <td>{% trans "Sender" %}</td>
18 </tr>18 <td>{% trans "Subject" %}</td>
19 </thead>19 <td>{% trans "Date" %}</td>
20 <tbody>20 <td>{% trans "Action" %}</td>
21 </tr>
22 </thead>
23 <tbody>
21{% for message in message_list %} 24{% for message in message_list %}
22 {% include "django_messages/inlines/message_row.html" %}25 {% include "django_messages/inlines/message_row.html" %}
23{% endfor %}26{% endfor %}
24 </tbody>27 </tbody>
25</table>28 </table>
29</div>
26<br />30<br />
27<p>{% trans "Deleted Messages are removed from the trash at unregular intervals, don't rely on this feature for long-time storage." %}</p>31<div class="box_item_model border">
32 <div class="info_line show_center errormessage">
33 <br />
34 {% trans "Deleted Messages are removed from the trash at unregular intervals, don't rely on this feature for long-time storage." %}
35 <br />
36 <br />
37 </div>
38</div>
28{% endblock %}39{% endblock %}
2940
=== modified file 'templates/mainpage.html'
--- templates/mainpage.html 2009-05-25 10:47:04 +0000
+++ templates/mainpage.html 2010-10-30 22:51:06 +0000
@@ -16,58 +16,54 @@
16{{ block.super}}{% endblock %}16{{ block.super}}{% endblock %}
17{% block content %}17{% block content %}
1818
1919<div class="block_center">
20<div class="blockContent">20 <h1>Welcome to Widelands.org</h1>
21 <center>21 <h3>Home of the free realtime strategy game and its community</h3>
22 <h1>Welcome to Widelands.org</h1>22 <br/>
23 <h3>Home of the free realtime strategy game and its community</h3>23 <img src='{{ MEDIA_URL }}/img/HomepageSplash.jpg' title='Widelands' alt='Widelands-Screenshot' />
24 <p>24 <br/>
25 <br/>25 <br/>
26 <img src='{{ MEDIA_URL }}/img/HomepageSplash.jpg' title='Widelands' alt='Widelands-Screenshot' />
27 <br/><br/>
28 </p>
29 </center>
30</div>26</div>
3127
32<!-- Begin of text -->28<!-- Begin of text -->
33<div class="itemText">29<div class="itemText">
34 <p>30 <p>
35 Widelands is an open source (GPLed) real-time strategy31 Widelands is an open source (GPLed) real-time strategy game.
36 game. It is built upon the <a32 It is built upon the <a href='http://www.libsdl.org'>SDL</a> and other
37 href='http://www.libsdl.org'>SDL</a> and other open33 open source libraries and is (and will always be) under heavy
38 source libraries and is (and will always be) under heavy development. If34 development. If you knew Settlers I &amp; II&#8482; (© Bluebyte), then
39 you knew Settlers I &amp; II&#8482; (© Bluebyte), then you35 you already have a rough idea what Widelands is all about because
40 already have a rough idea what Widelands is all about because36 widelands is heavily inspired by those two games.
41 widelands is heavily inspired by those two games. 37 </p>
42 </p>38 <p>
43 <p>39 You can find detailed information on the game in our
44 You can find detailed information on the game in our <a40 <a href="/wiki">Wiki</a>. I you want to get a quick Overview, go to the
45 href="/wiki">Wiki</a>. I you want to get a quick Overview, go to41 <a title="General Info" href="{% url wiki_article "GeneralInfo" %}">General Info</a>
46 the <a title="General Info" href="{% url wiki_article "GeneralInfo" %}">General Info</a> page.42 page.
47 </p>43 </p>
48 44 <p>
49 <p>45 You can download the game on the
50 You can download the game on the <a href="{% url wiki_article "DownloadPage" %}">DownloadPage</a>. You can also find46 <a href="{% url wiki_article "DownloadPage" %}">DownloadPage</a>. You
51 installation instructions and various troubleshooting hints47 can also find installation instructions and various troubleshooting
52 there.48 hints there.
53 </p>49 </p>
54 50 <p>
55 <p>51 You are also invited to visit the <a href="{% url pybb_index %}">Forums</a>:
56 You are also invited to visit the <a52 chat with the community about the game, find playing mates for
57 href="{% url pybb_index %}">Forums</a>:53 multiplayer, help translating, discuss graphics, music and much more.
58 chat with the community about the game, find playing mates for multiplayer,54 </p>
59 help translating, discuss graphics, music and much more.
60 </p>
61</div>55</div>
6256
63{% get_latest_posts 3 as latest_posts_list %}57{% get_latest_posts 3 as latest_posts_list %}
64{% if latest_posts_list %}58{% if latest_posts_list %}
65 <h2><a href="{% url news_index %}">Latest news:</a></h2>59<h2>
66 {% for object in latest_posts_list %}60 <a href="{% url news_index %}">Latest news:</a>
67 {% include "news/inlines/post_detail.html" %} 61</h2>
68 <br />62 {% for object in latest_posts_list %}
69 {% endfor %}63 {% include "news/inlines/post_detail.html" %}
70 <a href="{% url news_index %}">News archive</a>64 <br />
65 {% endfor %}
66 <a href="{% url news_index %}">News archive</a>
71{% endif %}67{% endif %}
7268
73{% endblock %}69{% endblock %}
7470
=== modified file 'templates/mainpage/online_users.html'
--- templates/mainpage/online_users.html 2009-03-15 17:19:34 +0000
+++ templates/mainpage/online_users.html 2010-10-30 22:51:06 +0000
@@ -1,9 +1,12 @@
1{% load wlprofile %}1{% load wlprofile %}
22
3{% if users %}3{% if users %}
4 <ul>4 <h3 class="box_title">Currently online</h3>
5 {% for user in users %}5 <div class="box_content">
6 <li><a href="{% url profile_view user %}">{{user.username}}</a></li>6 <ul>
7 {% endfor %}7 {% for user in users %}
8 </ul>8 <li><a href="{% url profile_view user %}">{{user.username}}</a></li>
9 {% endfor %}
10 </ul>
11 </div>
9{% endif %}12{% endif %}
1013
=== modified file 'templates/navigation.html'
--- templates/navigation.html 2010-05-13 09:45:42 +0000
+++ templates/navigation.html 2010-10-30 22:51:06 +0000
@@ -38,7 +38,9 @@
38 <li><a href="{% url pybb_forum 12 %}">Translations &amp; Internationalization</a></li>38 <li><a href="{% url pybb_forum 12 %}">Translations &amp; Internationalization</a></li>
39 </ul>39 </ul>
40</li>40</li>
41<li><a href="{% url webchat_index %}">IRC Chat</a></li>41<li>
42 <a href="{% url webchat_index %}">IRC Chat</a>
43</li>
42<li>44<li>
43 <a href="{% url wiki_article "DevelopmentPage" %}">Development</a>45 <a href="{% url wiki_article "DevelopmentPage" %}">Development</a>
44 <ul>46 <ul>
@@ -50,4 +52,16 @@
50 <li><a href="https://bugs.launchpad.net/widelands-website">Website Bugtracker</a></li>52 <li><a href="https://bugs.launchpad.net/widelands-website">Website Bugtracker</a></li>
51 </ul>53 </ul>
52</li>54</li>
5355 <!--
56<li>
57 <a href="{% url wlggz_main %}">Online Gaming</a>
58 <ul>
59 <li><a href="{% url wlggz_ranking %}">GGZ Ranking</a></li>
60 <li><a href="{% url wlggz_matches %}">GGZ Matches</a></li>
61 {% if user.is_authenticated %}
62 <li><a href="{% url wlggz_userstats %}">GGZ Status</a></li>
63 {% endif %}
64 <li><a href="{% url wiki_article "InternetGaming" %}">HowTo</a></li>
65 </ul>
66</li>
67 -->
5468
=== modified file 'templates/news/inlines/post_detail.html'
--- templates/news/inlines/post_detail.html 2010-01-02 15:32:46 +0000
+++ templates/news/inlines/post_detail.html 2010-10-30 22:51:06 +0000
@@ -6,50 +6,52 @@
6{% endcomment %}6{% endcomment %}
7{% load threadedcommentstags %}7{% load threadedcommentstags %}
8{% load news wl_markdown tagging_tags wlprofile custom_date %}8{% load news wl_markdown tagging_tags wlprofile custom_date %}
99 <div class="box_item_model border">
1010 <h3 class="title">{# TODO: categories! #} {{ object.title }}</h3>
11 <div class="news_item">11 <div class="info_line">
12 <h3 class="title">{# TODO: categories! #} {{ object.title }}</h3>12 <span class="news_poster">Posted by {{object.author|user_link}}</span>
13 <div class="info_line"> 13 <span class="news_post_date">on {{ object.publish|custom_date:user }}</span>
14 <span class="news_poster">Posted by {{object.author|user_link}}</span>14 </div>
15 <span class="news_post_date">on {{ object.publish|custom_date:user }}</span> 15 <div class="content">
16 </div>16{% if object.has_image %}
17 <div class="content">17 <span class="news_image"><img src='{{MEDIA_URL}}{{ object.image }}' alt='{{ object.image_alt }}' /></span>
18 {% if object.has_image %}18 <div class="text" style='min-height: {{ object.image.height }}px;'>
19 <span class="news_image"><img src='{{MEDIA_URL}}{{ object.image }}' alt='{{ object.image_alt }}' /></span>19{% else %}
20 <div class="text" style='min-height: {{ object.image.height }}px;'>20 <div class="text">
21 {% else %}21{% endif %}
22 <div class="text">22{{ object.body|wl_markdown:"safe" }}
23 {% endif %}23 </div>
24 {{ object.body|wl_markdown:"safe" }}24 </div>
25 </div>25
26 </div>26 <table class="info_line full_site">
27 27 <tr>
28 <table class="bottom_line" width="100%">28{% get_comment_count for object as ccount %}
29 <tr>29 <td class="comments show_left">
30 {% get_comment_count for object as ccount %}30 <a href="{{ object.get_absolute_url }}">{{ ccount }} comments</a>
31 <td class="comments">31 </td>
32 <a href="{{ object.get_absolute_url }}">{{ ccount }} comments</a>32 <td class="show_center">
33 </td>33{% if perms.news %}
34 34 {% if perms.news.post_can_add %}
35 <td class="admin">35 <a href="/admin/news/post/add/">Add New Post</a>
36 {% if perms.news %}36 {% endif %}
37 {% if perms.news.post_can_add %}<a href="/admin/news/post/add/">Add New Post</a>{% endif %}37 {% if perms.news.post_can_edit %}
38 {% if perms.news.post_can_edit %}| <a href="/admin/news/post/{{object.id}}/">Edit</a>{% endif %}38 | <a href="/admin/news/post/{{object.id}}/">Edit</a>
39 {% if perms.news.post_can_delete %}| <a href="/admin/news/post/{{object.id}}/delete/">Delete</a>{% endif %}39 {% endif %}
40 {% endif %}40 {% if perms.news.post_can_delete %}
41 </td>41 | <a href="/admin/news/post/{{object.id}}/delete/">Delete</a>
42 42 {% endif %}
43 {% tags_for_object object as tag_list %}43{% endif %}
44 <td class="tags">44 </td>
45 {% if tag_list %}45{% tags_for_object object as tag_list %}
46 <strong>Tags:</strong>46 <td class="show_right">
47 {% for tag in tag_list %}47{% if tag_list %}
48 {{ tag }}{% if not forloop.last %}, {% endif %}48 <strong>Tags:</strong>
49 {% endfor %}49 {% for tag in tag_list %}
50 {% endif %}50 {{ tag }}
51 </td>51 {% if not forloop.last %}, {% endif %}
52 </tr>52 {% endfor %}
5353{% endif %}
54 </table>54 </td>
55 </div>55 </tr>
56 </table>
57 </div>
5658
=== modified file 'templates/news/post_archive_day.html'
--- templates/news/post_archive_day.html 2009-03-19 06:46:41 +0000
+++ templates/news/post_archive_day.html 2010-10-30 22:51:06 +0000
@@ -1,23 +1,29 @@
1{% extends "news/base_news.html" %}1{% extends "news/base_news.html" %}
2{% load custom_date %}2{% load custom_date %}
33{% load pagination_tags %}
4{% block title %}Post archive for {{ day|date:"d F Y" }}{% endblock %}4{% block title %}Post archive for {{ day|date:"d F Y" }}{% endblock %}
5{% block body_class %}{{ block.super }} post_archive_day{% endblock %}5{% block body_class %}{{ block.super }} post_archive_day{% endblock %}
66
7
8{% block content_title %}
9 <h2>Post archive for {{ day|date:"d F Y" }}</h2>
10{% endblock %}
11
12
13{% block content %}7{% block content %}
14 <div class="post_list">8{% include "django_messages/inlines/navigation.html" %}
15 {% for post in object_list %}9<br />
16 <div>10<br />
17 <h3 class="title"><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>11<div class="muttis_liebling">
18 <p class="date">{{ post.publish|custom_date:user }}</p>12 <div class="box_item_model even show_center">
19 <p class="tease">{{ post.tease }}</p>13 <a href="{% url news_index %}{{ day|date:"Y" }}/{{ day|date:"m" }}">Archiv {{ day|date:"F" }}</a>
14 {% autopaginate object_list 10 %}
15 {% paginate %}
20 </div>16 </div>
17 <br />
18 {% for object in object_list %}
19 {% include "news/inlines/post_detail.html" %}
20 <br />
21 {% endfor %}21 {% endfor %}
22 </div>22 <br />
23 {% if page_obj.has_other_pages %}
24 <div class="box_item_model even show_center">
25 {% paginate %}
26 </div>
27 {% endif %}
28</div>
23{% endblock %}29{% endblock %}
2430
=== modified file 'templates/news/post_archive_month.html'
--- templates/news/post_archive_month.html 2009-03-23 17:44:44 +0000
+++ templates/news/post_archive_month.html 2010-10-30 22:51:06 +0000
@@ -1,22 +1,33 @@
1{% extends "news/base_news.html" %}1{% extends "news/base_news.html" %}
2{% load custom_date %}2{% load custom_date %}
33{% load news %}
4{% load pagination_tags %}
45
5{% block title %}Post archive for {{ month|date:"F Y" }}{% endblock %}6{% block title %}Post archive for {{ month|date:"F Y" }}{% endblock %}
6{% block body_class %}{{ block.super }} post_archive_month{% endblock %}7{% block body_class %}{{ block.super }} post_archive_month{% endblock %}
78
8
9{% block content_title %}
10 <h2>Post archive for {{ month|date:"F Y" }}</h2>
11{% endblock %}
12
13
14{% block content %}9{% block content %}
15 <div class="post_list">10{% load markup %}
11{% include "django_messages/inlines/navigation.html" %}
12<br />
13<br />
14<div class="muttis_liebling">
15 <div class="box_item_model even show_center">
16 <a href="{% url news_index %}{{ month|date:"Y" }}">Archiv {{ month|date:"Y" }}</a>
17 {% for day in object_list %}
18 {% endfor %}
19 {% autopaginate object_list 10 %}
20 {% paginate %}
21 </div>
16 <br />22 <br />
17 {% for object in object_list %}23 {% for object in object_list %}
18 {% include "news/inlines/post_detail.html" %}24 {% include "news/inlines/post_detail.html" %}
19 <br />25 <br />
20 {% endfor %}26 {% endfor %}
21 </div>27 {% if page_obj.has_other_pages %}
28 <div class="box_item_model even show_center">
29 {% paginate %}
30 </div>
31 {% endif %}
32</div>
22{% endblock %}33{% endblock %}
2334
=== modified file 'templates/news/post_archive_year.html'
--- templates/news/post_archive_year.html 2009-03-23 17:44:44 +0000
+++ templates/news/post_archive_year.html 2010-10-30 22:51:06 +0000
@@ -1,22 +1,37 @@
1{% extends "news/base_news.html" %}1{% extends "news/base_news.html" %}
2{% load custom_date %}2{% load custom_date %}
3{% load news %}
4{% load pagination_tags %}
35
46
5{% block title %}Post archive for {{ year }}{% endblock %}7{% block title %}Post archive for {{ year }}{% endblock %}
6{% block body_class %}{{ block.super }} post_archive_year{% endblock %}8{% block body_class %}{{ block.super }} post_archive_year{% endblock %}
79
8
9{% block content_title %}
10 <h2>Post archive for {{ year }}</h2>
11{% endblock %}
12
13
14{% block content %}10{% block content %}
15 {% load markup %}11 {% load markup %}
16 12{% include "django_messages/inlines/navigation.html" %}
17 <ul class="link_list">13<br />
14<br />
15<div class="muttis_liebling">
16 <div class="box_item_model even show_center">
17 <a href="/news/">News Archiv</a>
18 {% for month in date_list %}18 {% for month in date_list %}
19 <li><a href="{% url news_index %}{{ year }}/{{ month|date:"m" }}/">{{ month|date:"F" }}</a></li>19 | <a href="{% url news_index %}{{ year }}/{{ month|date:"m" }}/">{{ month|date:"F" }}</a>
20 {% endfor %}20 {% endfor %}
21 </ul>21 <br />
22 {% autopaginate object_list 10 %}
23 {% paginate %}
24 </div>
25 <br />
26 {% for object in object_list %}
27 {% include "news/inlines/post_detail.html" %}
28 <br />
29 {% endfor %}
30 {% if page_obj.has_other_pages %}
31 <div class="box_item_model even show_center">
32 {% paginate %}
33 </div>
34 {% endif %}
35
36</div>
22{% endblock %}37{% endblock %}
2338
=== modified file 'templates/news/post_list.html'
--- templates/news/post_list.html 2009-03-23 17:44:44 +0000
+++ templates/news/post_list.html 2010-10-30 22:51:06 +0000
@@ -1,40 +1,34 @@
1{% extends "news/base_news.html" %}1{% extends "news/base_news.html" %}
22
3{% load news %}3{% load news %}
44{% load custom_date %}
5{% load pagination_tags %}
5{% block title %}Post archive - {{ block.super }}{% endblock %}6{% block title %}Post archive - {{ block.super }}{% endblock %}
6{% block body_class %}{{ block.super }} post_list{% endblock %}7{% block body_class %}{{ block.super }} post_list{% endblock %}
78
8{% block content_title %}
9 <h2>Post archive</h2>
10{% endblock %}
11
12
13{% block content %}9{% block content %}
14 <div class="post_list">10{% include "django_messages/inlines/navigation.html" %}
15 <br />11<br />
12<br />
13<div class="">
14 {% get_news_years as news_years %}
15 <div class="box_item_model even show_center">
16 {% for muh in news_years %}
17 <a href="{% url news_index %}{{ muh.year }}" >{{ muh.year }}</a>
18 {% endfor %}
19 {% autopaginate object_list 10 %}
20 {% paginate %}
21 </div>
22 <br />
16 {% for object in object_list %}23 {% for object in object_list %}
17 {% include "news/inlines/post_detail.html" %}24 {% include "news/inlines/post_detail.html" %}
18 <br />25 <br />
19 {% comment %}26 {% endfor %}
20 <div>27 <br />
21 <h3 class="title"><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>28 {% if page_obj.has_other_pages %}
22 <p class="date">{{ post.publish|date:"Y F d" }}</p>29 <div class="box_item_model even show_center">
23 <p class="tease">{{ post.tease }}</p>30 {% paginate %}
24 </div>31 </div>
25 {%endcomment%}32 {% endif %}
26 {% endfor %}33</div>
27 </div>
28
29 {% if is_paginated %}
30 <p class="pagination">
31 {% if has_next %}
32 <a class="older" href="?page={{ next }}">Older</a>
33 {% endif %}
34 {% if has_next and has_previous %} | {% endif %}
35 {% if has_previous %}
36 <a class="newer" href="?page={{ previous }}">Newer</a>
37 {% endif %}
38 </p>
39 {% endif %}
40{% endblock %}34{% endblock %}
4135
=== added directory 'templates/notification/forum_new_post'
=== added file 'templates/notification/forum_new_post/full.txt'
--- templates/notification/forum_new_post/full.txt 1970-01-01 00:00:00 +0000
+++ templates/notification/forum_new_post/full.txt 2010-10-30 22:51:06 +0000
@@ -0,0 +1,7 @@
1{% load i18n %}{% blocktrans with topic.get_absolute_url as topic_url %} A new forum post was added under topic "{{ topic }}" by "{{ user }}".
2
3http://{{ current_site }}{{ topic_url }}
4{% endblocktrans %}
5{{ topic }}:
6
7{{ post.body_text }}
08
=== added file 'templates/notification/forum_new_post/notice.html'
--- templates/notification/forum_new_post/notice.html 1970-01-01 00:00:00 +0000
+++ templates/notification/forum_new_post/notice.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,2 @@
1{% load i18n %}{% url profile_view user.username as user_url %}
2{% blocktrans with topic.get_absolute_url as topic_url %}A new forum post has be created in forum under topic <a href="{{ topic_url }}">{{ topic }}</a> by <a href="{{ user_url }}">{{ user }}</a>.{% endblocktrans %}
03
=== added directory 'templates/notification/forum_new_topic'
=== added file 'templates/notification/forum_new_topic/full.txt'
--- templates/notification/forum_new_topic/full.txt 1970-01-01 00:00:00 +0000
+++ templates/notification/forum_new_topic/full.txt 2010-10-30 22:51:06 +0000
@@ -0,0 +1,7 @@
1{% load i18n %}{% blocktrans with topic.get_absolute_url as topic_url %}The Forum topic {{ topic }} has been created by {{ user }}.
2
3http://{{ current_site }}{{ topic_url }}
4{% endblocktrans %}
5{{ topic }}:
6
7{{ post.body_text }}
08
=== added file 'templates/notification/forum_new_topic/notice.html'
--- templates/notification/forum_new_topic/notice.html 1970-01-01 00:00:00 +0000
+++ templates/notification/forum_new_topic/notice.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,2 @@
1{% load i18n %}{% url profile_view user.username as user_url %}
2{% blocktrans with topic.get_absolute_url as topic_url %}A new forum topic has be created under <a href="{{ topic_url }}">{{ topic }}</a> by <a href="{{ user_url }}">{{ user }}</a>.{% endblocktrans %}
03
=== modified file 'templates/notification/notices.html'
--- templates/notification/notices.html 2010-01-02 19:55:10 +0000
+++ templates/notification/notices.html 2010-10-30 22:51:06 +0000
@@ -10,64 +10,82 @@
1010
11{% block extra_head %}11{% block extra_head %}
12 <link rel="alternate" type="application/atom+xml" title="Notices Feed" href="{% url notification_feed_for_user %}" />12 <link rel="alternate" type="application/atom+xml" title="Notices Feed" href="{% url notification_feed_for_user %}" />
13 <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}/css/notice.css" />{{ block.super}}
13{% endblock %}14{% endblock %}
1415
15{% block content %}16{% block content %}
16 {% include "messages/inlines/navigation.html" %}17 {% include "django_messages/inlines/navigation.html" %}
1718<br />
18 <h1>{% trans "Notices" %}</h1>19<br />
20<div class="box_item_model full_site border" width="100%">
21 <h3 class="title">{% trans "Notices" %}</h3>
19 22
20 {% autopaginate notices %}23 {% autopaginate notices %}
21 24
22 {% if notices %}25 {% if notices %}
23 <a href="{% url notification_mark_all_seen %}">{% trans "Mark all unseen notices seen" %}</a>26 <div class="info_line show_center">
24 27 <br />
28 <a href="{% url notification_mark_all_seen %}">{% trans "Mark all unseen notices seen" %}</a>
29 <br />
30 <br />
31 </div>
25 {# TODO: get timezone support working with regroup #}32 {# TODO: get timezone support working with regroup #}
26 {% regroup notices by added.date as notices_by_date %}33 {% regroup notices by added.date as notices_by_date %}
27 34
28 {% for date in notices_by_date %}35 {% for date in notices_by_date %}
29 <h2 class="notice_date">{{ date.grouper|naturalday:_("MONTH_DAY_FORMAT")|capfirst }}</h2>36 <h3 class="title notice_date">{{ date.grouper|naturalday:_("MONTH_DAY_FORMAT")|capfirst }}</h3>
30
31 {% for notice in date.list %}37 {% for notice in date.list %}
32 {% if notice.is_unseen %}38 {% if notice.is_unseen %}
33 <div class="unseen_notice">39 <div class="{% cycle "odd" "even" %} notice_unseen_notice border_top">
34 {% else %}40 {% else %}
35 <div class="notice">41 <div class="{% cycle "odd" "even" %} border_top">
36 {% endif %}42 {% endif %}
37 <span class="notice_type">[{% trans notice.notice_type.display %}]</span>43 <span class="notice_type"><a href="{% url notification_notice notice.pk %} ">[{% trans notice.notice_type.display %}]</a></span>
38 <span class="notice_message">{{ notice.message|safe }}</span>44 <span class="notice_message">{{ notice.message|safe }}</span>
39 <span class="notice_time">{{ notice.added }}</span>45 <span class="notice_time">{{ notice.added }}</span>
40 </div>46 </div>
41 {% endfor %}47 {% endfor %}
42 {% endfor %}48 {% endfor %}
43 49 <div class="info_line show_center">
44 {% paginate %}50 {% paginate %}
45 51 </div>
46 {% else %}52 {% else %}
47 <p>{% trans "No notices." %}</p>53 <div class="info_line show_center">
54 <br />
55 {% trans "No notices." %}
56 <br />
57 <br />
58 </div>
48 {% endif %}59 {% endif %}
49 60 </div>
50 61 <br />
51 <div class="notice_settings">62 <br />
52 <h2>{% trans "Settings" %}</h2>63 <div class="box_item_model full_site border">
64 <h3 class="title">{% trans "Settings" %}</h2>
53 65
54 {% url acct_email as email_url %}66 {% url acct_email as email_url %}
55 {% if user.email %}67 {% if user.email %}
56 <p>68 <div class="info_line show_center">
69 <br />
57 {% trans "Primary email" %}:<br />70 {% trans "Primary email" %}:<br />
58 <b>{{ user.email }}</b><br />71 <b>{{ user.email }}</b><br />
59 (change under <a href="{% url profile_view %}">Account</a>)72 (change under <a href="{% url profile_view user %}">Account</a>)
60 </p>73 <br />
74 <br />
75 </div>
61 {% else %}76 {% else %}
62 <p>77 <div class="info_line show_center">
78 <br />
63 <span class="warning">{% trans "Note" %}</span>:79 <span class="warning">{% trans "Note" %}</span>:
64 {% blocktrans %}You do not have a verified email address to which notices can be sent. You can add one by going to <a href="{{ email_url }}">Account</a>.{% endblocktrans %}80 You do not have a verified email address to which notices can be sent. You can add one by going to <a href="{% url profile_edit %}">Account</a>.
65 </p>81 <br />
82 <br />
83 </div>
66 {% endif %}84 {% endif %}
67 85
68 <form method="POST" action=""> {# doubt this easy to do in uni-form #}86 <form method="POST" action=""> {# doubt this easy to do in uni-form #}
69 <table class="notice_settings" cellspacing="1">87 <table width="100%" class="notice_settings" cellspacing="1">
70 <tr>88 <tr>
71 <th>{% trans "Notification Type" %}</th>89 <th>{% trans "Notification Type" %}</th>
72 {% for header in notice_settings.column_headers %}90 {% for header in notice_settings.column_headers %}
73 <th>{{ header }}</th>91 <th>{{ header }}</th>
@@ -86,7 +104,7 @@
86 </tr>104 </tr>
87 {% endfor %}105 {% endfor %}
88 <tr>106 <tr>
89 <td><input type="submit" value="{% trans "Change" %}" /></td>107 <td class="info_line show_center" colspan="2"><input type="submit" value="{% trans "Change" %}" /></td>
90 </tr>108 </tr>
91 </table>109 </table>
92 </form>110 </form>
93111
=== added file 'templates/notification/single.html'
--- templates/notification/single.html 1970-01-01 00:00:00 +0000
+++ templates/notification/single.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,50 @@
1{% extends "notification/base.html" %}
2
3{% load humanize i18n %}
4{% load pagination_tags %}
5{% load custom_date %}
6
7{% block title %}
8{% trans "Notices "%} - Account - {{ block.super }}
9{% endblock %}
10
11{% block extra_head %}
12 <link rel="alternate" type="application/atom+xml" title="Notices Feed" href="{% url notification_feed_for_user %}" />
13 <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}/css/notice.css" />{{ block.super}}
14{% endblock %}
15
16{% block content %}
17 {% include "django_messages/inlines/navigation.html" %}
18 <br />
19 <br />
20 <div class="box_item_model fixed_site">
21 <h3 class="title">{% trans "Notice" %}</h3>
22 <table width="100%">
23 <tr>
24 <td class="odd">Notice:</td>
25 <td class="odd">{{ notice.message|safe }}</td>
26 </tr>
27 <tr>
28 <td class="even">Notice Type:</td>
29 <td class="even">{{ notice.notice_type }}</td>
30 </tr>
31 <tr>
32 <td class="odd">Date of Notice:</td>
33 <td class="odd">{{ notice.added }}</td>
34 </tr>
35 <tr>
36 <td class="even">Notice Unseen:</td>
37 <td class="even">{{ notice.unseen }}</td>
38 </tr>
39 <tr>
40 <td class="odd">Notice Archiv:</td>
41 <td class="odd">{{ notice.archived }}</td>
42 </tr>
43 <tr>
44 <td class="even">Notice Site:</td>
45 <td class="even">{{ notice.on_site }}</td>
46 </tr>
47 </table>
48 </div>
49{% endblock %}
50
051
=== modified file 'templates/notification/wiki_article_edited/notice.html'
--- templates/notification/wiki_article_edited/notice.html 2009-02-20 10:11:49 +0000
+++ templates/notification/wiki_article_edited/notice.html 2010-10-30 22:51:06 +0000
@@ -1,2 +1,2 @@
1{% load i18n %}{% url profile_detail username=user.username as user_url %}1{% load i18n %}{% url profile_view user.username as user_url %}
2{% blocktrans with article.get_absolute_url as article_url %}The wiki article <a href="{{ article_url }}">{{ article }}</a> has been edited by <a href="{{ user_url }}">{{ user }}</a>.{% endblocktrans %}2{% blocktrans with article.get_absolute_url as article_url %}The wiki article <a href="{{ article_url }}">{{ article }}</a> has been edited by <a href="{{ user_url }}">{{ user }}</a>.{% endblocktrans %}
33
=== modified file 'templates/pybb/add_post.html'
--- templates/pybb/add_post.html 2010-01-03 00:07:10 +0000
+++ templates/pybb/add_post.html 2010-10-30 22:51:06 +0000
@@ -3,9 +3,10 @@
3{% load i18n %}3{% load i18n %}
44
5{% block content %}5{% block content %}
6<br />6{% include "django_messages/inlines/navigation.html" %}
7<br />7<br />
8<div class="forum_item">8<br />
9{% include "pybb/inlines/add_post_form.html" %}9<div class="box_item_model border">
10 {% include "pybb/inlines/add_post_form.html" %}
10</div>11</div>
11{% endblock %}12{% endblock %}
1213
=== modified file 'templates/pybb/delete_post.html'
--- templates/pybb/delete_post.html 2009-03-17 15:02:13 +0000
+++ templates/pybb/delete_post.html 2010-10-30 22:51:06 +0000
@@ -6,11 +6,20 @@
6{% endblock %}6{% endblock %}
77
8{% block content %}8{% block content %}
9<h1>{% trans "Are you sure you want to delete this message?" %}</h1>9{% include "django_messages/inlines/navigation.html" %}
10<p class="post-preview">10<br />
11<br />
12<div class="box_item_model fixed_site border">
13 <h3 class="title">{% trans "Are you sure you want to delete this message?" %}</h3>
14 <div class="even">
15 <p class="post-preview">
11 {{ post.body_html|safe }}16 {{ post.body_html|safe }}
12</p>17 </p>
13<form method="post">18 </div>
14 <p><input type="submit" value="{% trans "Yes, I am sure." %}" /></p>19 <form method="post">
15</form>20 <div class="info_line">
21 <input type="submit" value="{% trans "Yes, I am sure." %}" />
22 </div>
23 </form>
24</div>
16{% endblock %}25{% endblock %}
1726
=== modified file 'templates/pybb/edit_post.html'
--- templates/pybb/edit_post.html 2010-01-03 00:07:10 +0000
+++ templates/pybb/edit_post.html 2010-10-30 22:51:06 +0000
@@ -7,9 +7,10 @@
7{% endblock %}7{% endblock %}
88
9{% block content %}9{% block content %}
10<br />10{% include "django_messages/inlines/navigation.html" %}
11<br />11<br />
12<div class="forum_item">12<br />
13{% include "pybb/inlines/add_post_form.html" %}13<div class="box_item_model border">
14 {% include "pybb/inlines/add_post_form.html" %}
14</div>15</div>
15{% endblock %}16{% endblock %}
1617
=== modified file 'templates/pybb/forum.html'
--- templates/pybb/forum.html 2010-01-02 18:28:31 +0000
+++ templates/pybb/forum.html 2010-10-30 22:51:06 +0000
@@ -13,52 +13,75 @@
13{% endblock %}13{% endblock %}
1414
15{% block content %}15{% block content %}
16{% include "django_messages/inlines/navigation.html" %}
17<br />
18<br />
19<div class="box_item_model">
16 <div class="forum-list">20 <div class="forum-list">
17 <span class="title">{{ forum }}</span>21 <span class="title"><a href="/forum/">Forum</a> &rArr; {{ forum }}</span>
18 22 <br />
19 <div class="index_forum">23 <div class="index_forum">
20 {% pybb_pagination _('Topics') %}24 <table width="100%">
21 <div class="controls">25 <tr>
22 <a href="{% url pybb_add_topic forum.id %}">{% trans "New topic" %}</a>26 <td>
23 </div>27 {% pybb_pagination _('Topics') %}
2428 </td>
25 <table cellspacing="1" width="100%">29 <td>
26 <tr align="center">30 <div class="controls">
27 <th width="5%">&nbsp;</th>31 <a href="{% url pybb_add_topic forum.id %}">
28 <th width="40%" nowrap="nowrap" align="left">Topic</th>32 <img src="{{MEDIA_URL}}/forum/img/en/new_topic.png" height="25" alt ="{% trans "New Topic" %}" style="float:right" />
29 <th nowrap="nowrap">Creator</th>33 </a>
30 <th nowrap="nowrap">At</th>34 </div>
31 <th nowrap="nowrap">Posts</th>35 </td>
32 <th nowrap="nowrap">Views</th>36 </tr>
33 <th width="20%" nowrap="nowrap">Last Post</th>37 </table>
34 </tr>38 <table cellspacing="1" width="100%">
3539 <tr align="center">
36 {# List all forums #}40 <th width="5%">&nbsp;</th>
37 {% for topic in topics %}41 <th width="40%" nowrap="nowrap" align="left">Topic</th>
38 {% include "pybb/inlines/topic_row.html" %}42 <th nowrap="nowrap">Creator</th>
39 {% endfor %}43 <th nowrap="nowrap">At</th>
40 </table>44 <th nowrap="nowrap">Posts</th>
41 45 <th nowrap="nowrap">Views</th>
42 {% pybb_pagination _('Topics') %}46 <th width="20%" nowrap="nowrap">Last Post</th>
43 <div class="controls">47 </tr>
44 <a href="{% url pybb_add_topic forum.id %}">{% trans "New topic" %}</a>48
45 </div>49 {# List all forums #}
46 50 {% for topic in topics %}
51 {% include "pybb/inlines/topic_row.html" %}
52 {% endfor %}
53 </table>
54 <table width="100%">
55 <tr>
56 <td>
57 {% pybb_pagination _('Topics') %}
58 </td>
59 <td>
60 <div class="controls">
61 <a href="{% url pybb_add_topic forum.id %}">
62 <img src="{{MEDIA_URL}}/forum/img/en/new_topic.png" height="25" alt ="{% trans "New Topic" %}" style="float:right"/>
63 </a>
64 </div>
65 </td>
66 </tr>
67 </table>
47 </div> 68 </div>
48 69
49 <table class="legend">70 <table class="legend">
50 <tr>71 <tr>
51 <td>72 <td>
52 <img src="{{MEDIA_URL}}/forum/img/folder_new.png" style=":" alt="" align="middle" />73 <img src="{{MEDIA_URL}}/forum/img/folder_new.png" style=":" alt="" align="middle" />
53 </td><td>= Unread posts</td>74 </td>
54 <td>75 <td>= Unread posts</td>
55 <img src="{{MEDIA_URL}}/forum/img/folder.png" style="" alt="" align="middle" /> 76 <td>
56 </td><td>= No unread posts</td>77 <img src="{{MEDIA_URL}}/forum/img/folder.png" style="" alt="" align="middle" />
57 <td>78 </td>
58 </tr>79 <td>= No unread posts</td>
80 <td>
81 </tr>
59 </table>82 </table>
60 </div>83 </div>
6184</div>
62{% endblock %}85{% endblock %}
6386
64{% comment %}87{% comment %}
6588
=== modified file 'templates/pybb/index.html'
--- templates/pybb/index.html 2009-03-23 20:34:20 +0000
+++ templates/pybb/index.html 2010-10-30 22:51:06 +0000
@@ -2,9 +2,13 @@
2{% load pybb_extras %}2{% load pybb_extras %}
33
4{% block content %}4{% block content %}
5 {% for category in cats %}5{% include "django_messages/inlines/navigation.html" %}
6<br />
7<br />
8<div class="box_item_model">
9{% for category in cats %}
6 {% include 'pybb/inlines/display_category.html' %}10 {% include 'pybb/inlines/display_category.html' %}
7 {% endfor %}11{% endfor %}
812
9<table class="legend">13<table class="legend">
10 <tr>14 <tr>
@@ -27,6 +31,6 @@
27 </tr>31 </tr>
28 {% endcomment %}32 {% endcomment %}
29</table>33</table>
3034<div>
31{% endblock %}35{% endblock %}
3236
3337
=== modified file 'templates/pybb/inlines/add_post_form.html'
--- templates/pybb/inlines/add_post_form.html 2010-01-03 00:07:10 +0000
+++ templates/pybb/inlines/add_post_form.html 2010-10-30 22:51:06 +0000
@@ -1,5 +1,4 @@
1{% load i18n %}1{% load i18n %}
2
3{% block extra_head %}2{% block extra_head %}
4<script type="text/javascript" src="/wlmedia/js/disableOnSubmit.js"></script>3<script type="text/javascript" src="/wlmedia/js/disableOnSubmit.js"></script>
5<script type="text/javascript">4<script type="text/javascript">
@@ -7,42 +6,35 @@
7 $('form').disableOnSubmit();6 $('form').disableOnSubmit();
8 });7 });
9</script>8</script>
10
11{{ block.super }}9{{ block.super }}
12{% endblock %}10{% endblock %}
13 <form class="post-form" action="{{ form_url }}" method="post" enctype="multipart/form-data">11 <form class="post-form" action="{{ form_url }}" method="post" enctype="multipart/form-data">
14 <div class="preview-box" style="display: none">12 <div class="preview-box" style="display: none">
15 <div class="header"><h3 class="title">{% trans "Preview" %}</h3></div>13 <div class="header">
16 <div class="content"></div>14 <h3 class="title">{% trans "Preview" %}</h3>
17 </div>15 </div>
18 <h3 class="title">{% if forum %}16 <div class="content">
19 {% trans "New topic" %}17 </div>
20 {% else %}18 </div>
21 {%if post %}19 <h3 class="title">
22 {% trans "Edit reply" %}20 {% if forum %}
23 {% else %}21 {% trans "New topic" %}
24 {% trans "New reply" %}22 {% else %}
25 {% endif %}23 {%if post %}
26 {% endif %}</h3>24 {% trans "Edit reply" %}
27 <div class="content">25 {% else %}
28 <table width="100%" colspan="1" class="text">26 {% trans "New reply" %}
29 <tr>27 {% endif %}
30 <td width="99%">28 {% endif %}
31 {{ form.as_p }}29 </h3>
32 </td>30 <div class="content">
33 <td width="1%"> </td>31 {{ form.as_p }}
34 </tr>32 </div>
35 </table>33 <div class="info_line show_left">
36 </div>34 <input type="submit" class="button_send" value="" />
37 <table class="bottom_line" width="100%">35 <input class="preview-button button_preview" type="button" value="" />
38 <tr>36 </div>
39 <td>37 </form>
40 <input type="submit" value="{% trans "Submit" %}" />
41 <input class="preview-button" type="button" value="{% trans "Preview" %}" />
42 </td>
43 </tr>
44 </table>
45 </form>
46<script type="text/javascript">38<script type="text/javascript">
47$(function() {39$(function() {
48 $('.post-form .preview-button').click(function() {40 $('.post-form .preview-button').click(function() {
4941
=== modified file 'templates/pybb/inlines/display_category.html'
--- templates/pybb/inlines/display_category.html 2009-03-01 09:47:33 +0000
+++ templates/pybb/inlines/display_category.html 2010-10-30 22:51:06 +0000
@@ -3,26 +3,20 @@
33
4 How to display a Forum list in the index page4 How to display a Forum list in the index page
5{% endcomment %}5{% endcomment %}
66<div class="box_item_model index_category">
7<div class="index_category">7 <h3 class="title">{{category.cat}} </h3>
88 <table class="full_site" cellspacing="1">
9 <span class="title"> {{category.cat}} </span>9 <tr class="show_center" cellspacing="0">
10 10 <td width="5%" class="info_line show_left">&nbsp;</td>
11 <table cellspacing="1" width="100%">11 <td width="57%" nowrap="nowrap" class="info_line show_left">Forum</td>
12 <tr align="center">12 <td width="9%" nowrap="nowrap" class="info_line show_left">Topics</td>
13 <th width="5%">&nbsp;</th>13 <td width="9%" nowrap="nowrap" class="info_line show_left">Posts</td>
14 <th width="57%" nowrap="nowrap" align="left">Forum</th>14 <td width="20%" nowrap="nowrap" class="info_line show_left">Last Post</td>
15 <th width="9%" nowrap="nowrap">Topics</th>
16 <th width="9%" nowrap="nowrap">Posts</th>
17 <th width="20%" nowrap="nowrap">Last Post</th>
18 </tr>15 </tr>
19
20 {# List all forums #}16 {# List all forums #}
21 {% for forum in category.forums %}17 {% for forum in category.forums %}
22 {% include 'pybb/inlines/forum_row.html' %}18 {% include 'pybb/inlines/forum_row.html' %}
23 {% endfor %}19 {% endfor %}
24
25 </table>20 </table>
26
27</div>21</div>
2822
2923
=== modified file 'templates/pybb/inlines/forum_row.html'
--- templates/pybb/inlines/forum_row.html 2009-03-16 17:28:02 +0000
+++ templates/pybb/inlines/forum_row.html 2010-10-30 22:51:06 +0000
@@ -1,12 +1,10 @@
1{% comment %}1{% comment %}
2 vim:ft=htmldjango:2 vim:ft=htmldjango:
3{% endcomment %}3{% endcomment %}
4
5{% load humanize %}4{% load humanize %}
6{% load pybb_extras %}5{% load pybb_extras %}
7{% load wlprofile %}6{% load wlprofile %}
8{% load custom_date %}7{% load custom_date %}
9
10 <tr>8 <tr>
11 <td class="even" align="center" valign="middle">9 <td class="even" align="center" valign="middle">
12 {% if forum|pybb_has_unreads:user %}10 {% if forum|pybb_has_unreads:user %}
1311
=== modified file 'templates/pybb/inlines/post.html'
--- templates/pybb/inlines/post.html 2009-05-26 15:50:12 +0000
+++ templates/pybb/inlines/post.html 2010-10-30 22:51:06 +0000
@@ -8,7 +8,6 @@
8{% load wiki %}8{% load wiki %}
9{% load wlprofile %}9{% load wlprofile %}
10{% load custom_date %}10{% load custom_date %}
11
12 <a name="post-{{ post.id }}"></a>11 <a name="post-{{ post.id }}"></a>
13 <table class="{% cycle "odd" "even" %}" width="100%">12 <table class="{% cycle "odd" "even" %}" width="100%">
14 <tr>13 <tr>
@@ -17,7 +16,9 @@
17 <table width="100%" cellpadding="0" cellspacing="0" style="table-layout: fixed; border: 0px;">16 <table width="100%" cellpadding="0" cellspacing="0" style="table-layout: fixed; border: 0px;">
18 <tr>17 <tr>
19 <td style="text-align: left; border: 0px;">18 <td style="text-align: left; border: 0px;">
20 <a href="{{post.get_absolute_url}}">Permalink</a>19 <a href="{{post.get_absolute_url}}">
20 <img src="{{MEDIA_URL}}/forum/img/en/permalink.png" height="25" alt ="{% trans "Permalink" %}" />
21 </a>
21 </td>22 </td>
22 <td style="text-align: right; border: 0px;">23 <td style="text-align: right; border: 0px;">
23 <strong>Posted at:</strong> {{ post.created|custom_date:user}}24 <strong>Posted at:</strong> {{ post.created|custom_date:user}}
@@ -36,21 +37,40 @@
36 </a>37 </a>
37 </div>38 </div>
38 {% endif %}39 {% endif %}
39 <strong>Joined:</strong> {{ post.user.date_joined|custom_date:user|title }}<br />40 <strong>Joined:</strong> {{ post.user.date_joined|custom_date:user|title }}<br />
40 <strong>Posts:</strong> {{ post.user.wlprofile.post_count }}<br />41 <strong>Posts:</strong> {{ post.user.wlprofile.post_count }}<br />
41 {% if post.user.wlprofile.location %}42 <img src="{{ MEDIA_URL }}img/{{ post.user.wlprofile.user_status.image }}" alt="Ranking" />
42 <strong>Location:</strong> {{ post.user.wlprofile.location }}<br />43 <br />
43 {% endif %}44 <strong>{{ post.user.wlprofile.user_status.text }}</strong><br />
45 {% if post.user.wlprofile.location %}
46 <strong>Location:</strong> {{ post.user.wlprofile.location }}<br />
47 {% endif %}
48 {% if post.user.wlprofile.get_ggzstats and post.user.wlprofile.get_ggzstats.ranking %}
49 <strong>GGZ ranking:</strong> {{ post.user.wlprofile.get_ggzstats.ranking|floatformat }}<br />
50 <strong>GGZ rating:</strong> {{ post.user.wlprofile.get_ggzstats.rating|floatformat }}<br />
51 <strong>GGZ win:</strong> {{ post.user.wlprofile.get_ggzstats.wins|floatformat }}<br />
52 <strong>GGZ loses:</strong> {{ post.user.wlprofile.get_ggzstats.losses|floatformat }}<br />
53 {% endif %}
44 </div>54 </div>
45 </td>55 </td>
46 <td width="85%" class="content">56 <td width="85%" class="content top">
47 {{ post.body_html|safe }}57 {{ post.body_html|safe|linebreaks }}
48 {% if not user.is_authenticated or user.pybb_profile.show_signatures %}58 {% if user.is_authenticated %}
49 {% if post.user.pybb_profile.signature %}59 {% ifequal user.wlprofile.show_signatures 1 %}
50 <div class="signature">60 {% if post.user.wlprofile.signature %}
51 {{ post.user.pybb_profile.signature|urlize|linebreaks }}61 <div class="signature">
52 </div>62 <span class="line">__________________</span>
53 {% endif %}63 {{ post.user.wlprofile.signature|urlize|linebreaks }}
64 </div>
65 {% endif %}
66 {% endifequal %}
67 {% else %}
68 {% if post.user.wlprofile.signature %}
69 <div class="signature">
70 <span class="line">__________________</span>
71 {{ post.user.wlprofile.signature|urlize|linebreaks }}
72 </div>
73 {% endif %}
54 {% endif %}74 {% endif %}
55 {% if post.updated %}75 {% if post.updated %}
56 <div class="updated-message"><strong>{% trans "Edited" %}:</strong> {{ post.updated|custom_date:user|title}}</div>76 <div class="updated-message"><strong>{% trans "Edited" %}:</strong> {{ post.updated|custom_date:user|title}}</div>
@@ -65,7 +85,9 @@
65 </tr>85 </tr>
66 <tr>86 <tr>
67 <td class="toplink">87 <td class="toplink">
68 <a href="#top">Top</a>88 <a href="#top">
89 <img src="{{MEDIA_URL}}/forum/img/en/top.png" height="25" alt ="{% trans "Top" %}" />
90 </a>
69 </td>91 </td>
7092
71 <td>93 <td>
@@ -73,78 +95,28 @@
73 {% if user.is_authenticated %}95 {% if user.is_authenticated %}
74 {% ifnotequal user post.user %}96 {% ifnotequal user post.user %}
75 <a href="{% url messages_compose_to post.user %}">97 <a href="{% url messages_compose_to post.user %}">
76 Send PM98 <img src="{{MEDIA_URL}}/forum/img/en/send_pm.png" height="25" alt ="{% trans "Send PM" %}" />
77 </a>99 </a>
78 {% endifnotequal %}100 {% endifnotequal %}
79 {% endif %}101 {% endif %}
80 {% if moderator or post|pybb_posted_by:user %}102 {% if moderator or post|pybb_posted_by:user %}
81 <a href="{% url pybb_edit_post post.id %}">103 <a href="{% url pybb_edit_post post.id %}">
82 <img src="{{MEDIA_URL}}/forum/img/en/p_edit.png" height="26" alt ="{% trans "Edit" %}" />104 <img src="{{MEDIA_URL}}/forum/img/en/edit.png" height="25" alt ="{% trans "Edit" %}" />
83 </a>105 </a>
84 {% endif %}106 {% endif %}
85 {% if moderator or post|pybb_equal_to:last_post %}107 {% if moderator or post|pybb_equal_to:last_post %}
86 {% if moderator or post.user|pybb_equal_to:user %}108 {% if moderator or post.user|pybb_equal_to:user %}
87 <a href="{% url pybb_delete_post post.id %}">109 <a href="{% url pybb_delete_post post.id %}">
88 <img src="{{MEDIA_URL}}/forum/img/en/p_delete.png" height="26" alt ="{% trans "Delete" %}" />110 <img src="{{MEDIA_URL}}/forum/img/en/delete.png" height="25" alt ="{% trans "Delete" %}" />
89 </a>111 </a>
90 {% endif %}112 {% endif %}
91 {% endif %}
92 </div>113 </div>
93 <div class="tools" style="float: right;">114 <div class="tools" style="float: right;">
94 <a href="{% url pybb_add_post topic.id %}?quote_id={{ post.id }}">115 <a href="{% url pybb_add_post topic.id %}?quote_id={{ post.id }}">
95 <img src="{{MEDIA_URL}}/forum/img/en/p_quote.png" height="26" alt ="{% trans "Quote" %}" />116 <img src="{{MEDIA_URL}}/forum/img/en/quote.png" height="25" alt ="{% trans "Quote" %}" />
96 </a>117 </a>
118 {% endif %}
97 </div>119 </div>
98 </td>120 </td>
99 </tr>121 </tr>
100 </table>122 </table>
101
102{% comment %}
103 {% if post.user.pybb_profile.avatar %}
104 <div class="avatar">
105 <a href="{% url pybb_profile post.user %}">
106 <img src="{{ post.user.pybb_profile.avatar.url }}" />
107 </a>
108 </div>
109 {% endif %}
110 <div class="bottom">
111 <a class="permalink" href="{{ post.get_absolute_url }}">#</a>
112 <span class="updated">{% pybb_time post.created %}</span>
113 </div>
114 {% if user.is_authenticated %}
115 <div class="pm-link">
116 <a href="{% url pybb_create_pm %}?recipient={{ post.user.username }}">{% trans "Send PM" %}</a>
117 </div>
118 {% endif %}
119 </div>
120 </td>
121 <td class="content" width="85%">
122 {{ post.body_html|safe }}
123 {% if not user.is_authenticated or user.pybb_profile.show_signatures %}
124 {% if post.user.pybb_profile.signature %}
125 <div class="signature">
126 {{ post.user.pybb_profile.signature|urlize|linebreaks }}
127 </div>
128 {% endif %}
129 {% endif %}
130 {% if post.updated %}
131 <div class="updated-message">{% trans "Edited" %} {% pybb_time post.updated %}</div>
132 {% endif %}
133
134 {% if post.attachment_cache %}
135 {% for attach in post.attachment_cache %}
136 {% trans "Attachment" %}: <a href="{{ attach.get_absolute_url }}">{{ attach.name }}</a> ({{ attach.size_display }})
137 {% endfor %}
138 {% endif %}
139
140 <div class="post-related">
141 <a href="{% url pybb_add_post topic.id %}?quote_id={{ post.id }}">{% trans "quote" %}</a>
142 </div>
143
144 </td>
145 </tr>
146 </table>
147 <!--<div style="clear: both"></div>-->
148 </div>
149</div>
150{% endcomment%}
151123
=== modified file 'templates/pybb/inlines/topic_row.html'
--- templates/pybb/inlines/topic_row.html 2009-03-16 17:28:02 +0000
+++ templates/pybb/inlines/topic_row.html 2010-10-30 22:51:06 +0000
@@ -1,12 +1,10 @@
1{% comment %}1{% comment %}
2 vim:ft=htmldjango:2 vim:ft=htmldjango:
3{% endcomment %}3{% endcomment %}
4
5{% load humanize %}4{% load humanize %}
6{% load pybb_extras %}5{% load pybb_extras %}
7{% load wlprofile %}6{% load wlprofile %}
8{% load custom_date %}7{% load custom_date %}
9
10 <tr class="topic_description {% cycle "odd" "even" %}">8 <tr class="topic_description {% cycle "odd" "even" %}">
11 <td align="center" valign="middle">9 <td align="center" valign="middle">
12 {% if topic|pybb_has_unreads:user %}10 {% if topic|pybb_has_unreads:user %}
@@ -16,7 +14,17 @@
16 {% endif %}14 {% endif %}
17 </td>15 </td>
18 <td id="name">16 <td id="name">
19 <span class="name"><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></span>17 <span class="name">
18 <a href="{{ topic.get_absolute_url }}">
19 {% comment %}
20 oehm ja, geht nicht weil ka muss ich guggn, die frage ist. soll es fuer alle gelten oder nur fuer eine topic
21 {% endcomment %}
22 {% if subscribed %}<img src="{{MEDIA_URL}}/forum/img/en/subscribe_small.png" height="20" alt="subscribe" style="float:left" />{% endif %}
23 {% if topic.sticky %}<img src="{{MEDIA_URL}}/forum/img/en/stick_topic_small.png" height="20" alt ="Sticky" style="float:left;" /> {% endif %}
24 {% if topic.closed %}<img src="{{MEDIA_URL}}/forum/img/en/close_small.png" height="20" alt ="Closed" style="float:left; " /> {% endif %}
25 &nbsp;{{ topic.name }}
26 </a>
27 </span>
20 </td>28 </td>
21 <td><span class="creator">{{ topic.user|user_link }}</span></td>29 <td><span class="creator">{{ topic.user|user_link }}</span></td>
22 <td><span class="at">{{ topic.created|custom_date:user }}</span></td>30 <td><span class="at">{{ topic.created|custom_date:user }}</span></td>
2331
=== added file 'templates/pybb/last_posts.html'
--- templates/pybb/last_posts.html 1970-01-01 00:00:00 +0000
+++ templates/pybb/last_posts.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,21 @@
1{% load i18n %}
2{% load wlprofile %}
3{% load custom_date %}
4{% load pybb_extras %}
5
6<div>
7<br />
8{% for post in posts %}
9 <table>
10 <tr>
11 <td>
12 <a href="{{ post.get_absolute_url }}" title="{{ post.topic.name }}">{{ post.topic.name|pybb_cut_string:21 }}</a> @<br />
13 <a href="{{ post.topic.get_absolute_url}}" title="{{ post.topic.forum.name }}">{{ post.topic.forum.name|pybb_cut_string:23 }}</a><br />
14 by {{ post.user|user_link }} at {{ post.created|custom_date:user }}
15 <br />
16 <br />
17 </td>
18 </tr>
19 </table>
20{% endfor %}
21<div>
022
=== modified file 'templates/pybb/pagination.html'
--- templates/pybb/pagination.html 2010-01-02 18:24:49 +0000
+++ templates/pybb/pagination.html 2010-10-30 22:51:06 +0000
@@ -1,20 +1,41 @@
1{% load i18n %}1{% load i18n %}
2<div class="pagination">2<div class="pagination" style="float:left">
33 <span class="summary">{{ label }} <strong>{{ page.start_index }}</strong>&mdash;<strong>{{ page.end_index }}</strong> {% trans "of" %} <strong>{{ paginator.count }}</strong> {{ label }}&nbsp;&nbsp;&nbsp;&nbsp;</span>
4 {% if page.has_previous %}4 {% if page.has_previous %}
5 <a href="{{ page.previous_link }}">&lt;{% trans "Back" %}</a>5 {% ifequal page.previous_page_number 1 %}
6 <a href="?page={{ page.previous_page_number }}" class="prev">&lsaquo;&lsaquo; </a>
7 {% else %}
8 <a href="?page=1" class="prev">&lsaquo;&lsaquo;&lsaquo;&lsaquo; </a>
9 <a href="?page={{ page.previous_page_number }}" class="prev">&lsaquo;&lsaquo; </a>
10 {% endifequal %}
11 {% else %}
12 {% ifnotequal paginator.num_pages 1 %}
13 <span class="disabled prev">&lsaquo;&lsaquo; </span>
14 {% endifnotequal %}
6 {% endif %}15 {% endif %}
716 {% for pages in paginator.page_range %}
8<span class="summary">{{ label }} <strong>{{ page.start_index }}</strong>&mdash;<strong>{{ page.end_index }}</strong> {% trans "of" %} <strong>{{ paginator.count }}</strong> {{ label }}17 {% if pages %}
9 {% if page.has_other_pages %} 18 {% ifequal paginator.num_pages 1 %}
10 {% trans "in" %} <strong>{{ paginator.num_pages }}</strong> 19 ...
11 {% trans "pages" %} 20 {% else %}
12 {% endif %}21 {% ifequal pages page.number %}
13 </span>22 <span class="current page">| {{ page.number }} |</span>
1423 {% else %}
24 <a href="?page={{ pages }}" class="page">{{ pages }}</a>
25 {% endifequal %}
26 {% endifequal %}
27 {% endif %}
28 {% endfor %}
15 {% if page.has_next %}29 {% if page.has_next %}
16 <a href="{{ page.next_link }}">{% trans "Forward" %}&gt;</a>30 {% ifequal page.next_page_number paginator.num_pages %}
31 <a href="?page={{ page.next_page_number }}" class="next"> &rsaquo;&rsaquo;</a>
32 {% else %}
33 <a href="?page={{ page.next_page_number }}" class="next"> &rsaquo;&rsaquo;</a>
34 <a href="?page={{ paginator.num_pages }}" class="next"> &rsaquo;&rsaquo;&rsaquo;&rsaquo;</a>
35 {% endifequal %}
36 {% else %}
37 {% ifnotequal paginator.num_pages 1 %}
38 <span class="disabled next"> &rsaquo;&rsaquo;</span>
39 {% endifnotequal %}
17 {% endif %}40 {% endif %}
18
19
20</div>41</div>
2142
=== modified file 'templates/pybb/topic.html'
--- templates/pybb/topic.html 2010-01-03 00:07:10 +0000
+++ templates/pybb/topic.html 2010-10-30 22:51:06 +0000
@@ -13,70 +13,84 @@
13{% endblock %}13{% endblock %}
1414
15{% block content %}15{% block content %}
1616{% include "django_messages/inlines/navigation.html" %}
17{% pybb_pagination _('Posts') %}17<br />
1818<br />
19<div class="posts">19<div class="box_item_model">
20 <a name="top" id="top"></a>20 <span class="title"><a href="/forum/">Forum</a> &rArr; <a href="{{ topic.forum.get_absolute_url }}">{{ topic.forum.name }}</a> &rArr; {{ topic }}</span>
21 <table cellspacing="1" width="100%">21 <br />
22 <tr align="center">22 {% pybb_pagination _('Posts') %}
23 <th>Author</th>23 <div class="posts" style="clear:left">
24 <th width="85%" nowrap="nowrap">Message</th>24 <a name="top" id="top"></a>
25 </tr>25 <table cellspacing="1" width="100%">
26 </table>26 <tr align="center">
2727 <th>Author</th>
28 {% if first_post %}28 <th width="85%" nowrap="nowrap">Message</th>
29 {% ifnotequal first_post posts.0 %}29 </tr>
30 {% with first_post as post %}30 </table>
31 <div class="post first_post">31
32 {% include "pybb/inlines/post.html" %}32 {% if first_post %}
33 </div>33 {% ifnotequal first_post posts.0 %}
34 {% endwith %}34 {% with first_post as post %}
35 {% endifnotequal %}35 <div class="post first_post">
36 {% endif %}36 {% include "pybb/inlines/post.html" %}
37 {% for post in posts %}37 </div>
38 <div class="post">38 {% endwith %}
39 {% include "pybb/inlines/post.html" %}39 {% endifnotequal %}
40 </div>40 {% endif %}
41 {% endfor %}41 {% for post in posts %}
42</div>42 <div class="post">
4343 {% include "pybb/inlines/post.html" %}
44{% pybb_pagination _('Posts') %}44 </div>
45<div class="controls">45 {% endfor %}
46 </div>
47 {% pybb_pagination _('Posts') %}
48 <br />
49 <div class="controls">
50 <br />
46 {% if moderator %}51 {% if moderator %}
47 {% if topic.sticky %}52 {% if topic.sticky %}
48 <a href="{% url pybb_unstick_topic topic.id %}">{% trans "Unstick topic" %}</a>53 <a href="{% url pybb_unstick_topic topic.id %}">
49 {% else %}54 <img src="{{MEDIA_URL}}/forum/img/en/unstick_topic.png" height="25" alr="{% trans "Unstick topic" %}" />
50 <a href="{% url pybb_stick_topic topic.id %}">{% trans "Stick topic" %}</a>55 </a>
51 {% endif %}56 {% else %}
52 |57 <a href="{% url pybb_stick_topic topic.id %}">
53 {% if topic.closed %}58 <img src="{{MEDIA_URL}}/forum/img/en/stick_topic.png" height="25" alt ="{% trans "Stick Topic" %}" />
54 <a href="{% url pybb_open_topic topic.id %}">{% trans "Open topic" %}</a>59 </a>
55 {% else %}60 {% endif %}
56 <a href="{% url pybb_close_topic topic.id %}">{% trans "Close topic" %}</a>61 {% if topic.closed %}
57 {% endif %}62 <a href="{% url pybb_open_topic topic.id %}">
58 |63 <img src="{{MEDIA_URL}}/forum/img/en/open_topic.png" height="25" alt="{% trans "Open topic" %}" />
59 {% endif %}64 </a>
60 {% comment %}65 {% else %}
61 TODO: subscribe66 <a href="{% url pybb_close_topic topic.id %}">
67 <img src="{{MEDIA_URL}}/forum/img/en/close_topic.png" height="25" alt ="{% trans "Close Topic" %}" />
68 </a>
69 {% endif %}
70 {% endif %}
71
72
62 {% if user.is_authenticated %}73 {% if user.is_authenticated %}
63 {% if subscribed %}74 {% if subscribed %}
64 <a href="{% url pybb_delete_subscription topic.id %}?from_topic">{% trans "Unsubscribe" %}</a>75 <a href="{% url pybb_delete_subscription topic.id %}?from_topic">
65 {% else %}76 <img src="{{MEDIA_URL}}/forum/img/en/unsubscribe.png" height="25" alt ="{% trans "Unsubscribe" %}" />
66 <a href="{% url pybb_add_subscription topic.id %}">{% trans "Subscribe" %}</a>77 </a>
67 {% endif %}78 {% else %}
68 {% endif %}79 <a href="{% url pybb_add_subscription topic.id %}">
69 {% endcomment %}80 <img src="{{MEDIA_URL}}/forum/img/en/subscribe.png" height="25" alt="{% trans "Subscribe" %}" /></a>
81 {% endif %}
82 {% endif %}
83
84 </div>
70</div>85</div>
71
72{% if user.is_authenticated %}86{% if user.is_authenticated %}
73{% if not topic.closed %}87 {% if not topic.closed %}
74<br />88<br />
75<br />89<br />
76<div class="forum_item">90<div class="box_item_model border">
77{% include "pybb/inlines/add_post_form.html" %}91 {% include "pybb/inlines/add_post_form.html" %}
78</div>92</div>
79{% endif %}93 {% endif %}
80{% endif %}94{% endif %}
8195
82{% endblock %}96{% endblock %}
8397
=== added file 'templates/registration/base.html'
--- templates/registration/base.html 1970-01-01 00:00:00 +0000
+++ templates/registration/base.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,8 @@
1{% extends "base.html" %}
2{% comment %}
3 vim:ft=htmldjango
4{% endcomment %}
5
6{% block extra_head %}
7<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}/css/register.css" />{{ block.super}}
8{% endblock %}
09
=== modified file 'templates/registration/login.html'
--- templates/registration/login.html 2009-02-20 11:19:12 +0000
+++ templates/registration/login.html 2010-10-30 22:51:06 +0000
@@ -1,26 +1,55 @@
1{% extends "registration/base.html" %}
12
2{% extends "base.html" %}3{% block title %}
4{{ block.super }} - Login
5{% endblock %}
36
4{% block content %}7{% block content %}
58{% include "django_messages/inlines/navigation.html" %}
9<br />
10<br />
11<div class="box_item_model fixed_site border">
12 <h3 class="title">Login</h3>
6{% if form.errors %}13{% if form.errors %}
7<p>Your username and password didn't match. Please try again.</p>14 <div class="info_line show_center errormessage">
15 <br />
16 Your username and password didn't match.
17 <br />
18 Please try again.
19 <br />
20 <br />
21 </div>
8{% endif %}22{% endif %}
923 <div class="info_line show_center">
10<form method="post" action=".">24 <br />
11<table>25 <form method="post" action=".">
12<tr>26 <table>
13 <td>{{ form.username.label_tag }}</td>27 <tr>
14 <td>{{ form.username }}</td>28 <td>
15</tr>29 {{ form.username.label_tag }}:
16<tr>30 </td>
17 <td>{{ form.password.label_tag }}</td>31 <td>
18 <td>{{ form.password }}</td>32 {{ form.username }}
19</tr>33 </td>
20</table>34 </tr>
2135 <tr>
22<input type="submit" value="login" />36 <td>
23<input type="hidden" name="next" value="{{ next }}" />37 {{ form.password.label_tag }}:
24</form>38 </td>
2539 <td>
40 {{ form.password }}
41 </td>
42 </tr>
43 <tr>
44 <td></td>
45 <td class="show_right">
46 <input type="submit" value="login" />
47 <input type="hidden" name="next" value="{{ next }}" />
48 </td>
49 </tr>
50 </table>
51 </form>
52 <br />
53 </div>
54</div>
26{% endblock %}55{% endblock %}
2756
=== modified file 'templates/registration/password_change_done.html'
--- templates/registration/password_change_done.html 2009-02-20 11:19:12 +0000
+++ templates/registration/password_change_done.html 2010-10-30 22:51:06 +0000
@@ -1,12 +1,27 @@
1{% extends "base.html" %}1{% extends "registration/base.html" %}
2{% comment %}
3vim:ft=htmldjango:
4{% endcomment %}
5
6{% block title %}
7{{ block.super }} - Change Password
8{% endblock %}
9
2{% load i18n %}10{% load i18n %}
311
4{% block title %}{% trans 'Password change successful' %} - {{ block.super }}{% endblock %}
5
6{% block content %}12{% block content %}
713{% include "django_messages/inlines/navigation.html" %}
8<h1>{% trans 'Password change successful' %}</h1>14
915<br />
10<p>{% trans 'Your password was changed.' %}</p>16<br />
1117<div class="box_item_model fixed_site border">
18 <h3 class="title">Password change successful </h3>
19 <div class="info_line">
20 <br />
21 <div class="show_center errormessage">
22 Your password was changed.
23 </div>
24 <br />
25 </div>
26</div>
12{% endblock %}27{% endblock %}
1328
=== modified file 'templates/registration/password_change_form.html'
--- templates/registration/password_change_form.html 2009-02-20 11:19:12 +0000
+++ templates/registration/password_change_form.html 2010-10-30 22:51:06 +0000
@@ -1,24 +1,69 @@
1{% extends "base.html" %}1{% extends "registration/base.html" %}
2{% comment %}
3vim:ft=htmldjango:
4{% endcomment %}
5
6{% block title %}
7{{ block.super }} - Change Password
8{% endblock %}
9
2{% load i18n %}10{% load i18n %}
311
4{% block title %}{% trans 'Password change' %} - {{block.super}}{% endblock %}
5
6{% block content %}12{% block content %}
713{% include "django_messages/inlines/navigation.html" %}
8<h1>{% trans 'Password change' %}</h1>14
915<br />
10<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>16<br />
1117<div class="box_item_model fixed_site border">
12<form action="" method="post">18 <h3 class="title">Password change</h3>
1319 <div class="info_line">
14{{ form.old_password.errors }}20 <br />
15<p class="aligned wide"><label for="id_old_password">{% trans 'Old password:' %}</label>{{ form.old_password }}</p>21 <div class="show_center errormessage">
16{{ form.new_password1.errors }}22 Please enter your old password,
17<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>23 <br />
18{{ form.new_password2.errors }}24 for security's sake, and then enter your new password twice so we can verify you typed it in correctly.
19<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>25 </div>
2026 <div >
21<p><input type="submit" value="{% trans 'Change my password' %}" /></p>27 <br />
22</form>28 <form action="" method="post">
2329 <table>
30 <tr>
31 <td class="show_right" width="120">
32 <label for="id_old_password">{% trans 'Old password:' %}</label>
33 </td>
34 <td>
35 {{ form.old_password }}
36 <span class="errormessage">{{ form.old_password.errors }}</span>
37 </td>
38 </tr>
39 <tr>
40 <td class="show_right">
41 <label for="id_new_password1">{% trans 'New password:' %}</label>
42 </td>
43 <td>
44 {{ form.new_password1 }}
45 <span class="errormessage">{{ form.new_password1.errors }}</span>
46 </td>
47 </tr>
48 <tr>
49 <td class="show_right">
50 <label for="id_new_password2">{% trans 'Confirm password:' %}</label>
51 </td>
52 <td>
53 {{ form.new_password2 }}
54 <span class="errormessage">{{ form.new_password2.errors }}</span>
55 </td>
56 </tr>
57 <tr>
58 <td>&nbsp;</td>
59 <td>
60 <input type="submit" value="{% trans 'Change my password' %}" />
61 </td>
62 </tr>
63 </table>
64 </form>
65 <br />
66 </div>
67 </div>
68</div>
24{% endblock %}69{% endblock %}
2570
=== modified file 'templates/registration/password_reset_complete.html'
--- templates/registration/password_reset_complete.html 2009-02-20 11:25:20 +0000
+++ templates/registration/password_reset_complete.html 2010-10-30 22:51:06 +0000
@@ -1,12 +1,27 @@
1{% extends "base.html" %}1{% extends "registration/base.html" %}
2{% comment %}
3vim:ft=htmldjango:
4{% endcomment %}
5
6{% block title %}
7{{ block.super }} - Change Password
8{% endblock %}
9
2{% load i18n %}10{% load i18n %}
311
4{% block title %}{% trans 'Password reset complete' %}{% endblock %}
5
6{% block content %}12{% block content %}
713{% include "django_messages/inlines/navigation.html" %}
8<h1>{% trans 'Password reset complete' %}</h1>14
915<br />
10<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>16<br />
1117<div class="box_item_model fixed_site border">
18 <h3 class="title">Password reset complete</h3>
19 <div class="info_line">
20 <br />
21 <div>
22 Your password has been set. You may go ahead and log in now.
23 </div>
24 <br />
25 </div>
26</div>
12{% endblock %}27{% endblock %}
1328
=== modified file 'templates/registration/password_reset_confirm.html'
--- templates/registration/password_reset_confirm.html 2009-02-20 11:23:56 +0000
+++ templates/registration/password_reset_confirm.html 2010-10-30 22:51:06 +0000
@@ -1,30 +1,44 @@
1{% extends "base.html" %}1{% extends "base.html" %}
2{% extends "registration/base.html" %}
3{% comment %}
4vim:ft=htmldjango:
5{% endcomment %}
6
7{% block title %}
8{{ block.super }} - Reset Password
9{% endblock %}
10
2{% load i18n %}11{% load i18n %}
312
4{% block title %}{% trans 'Password reset' %}{% endblock %}
5
6{% block content %}13{% block content %}
14{% include "django_messages/inlines/navigation.html" %}
715
16<br />
17<br />
18<div class="box_item_model fixed_site border">
19 <h3 class="title">Password reset</h3>
20 <div class="info_line">
21 <br />
8{% if validlink %}22{% if validlink %}
923 <div class="show_center errormessage">
10<h1>{% trans 'Enter new password' %}</h1>24 Please enter your new password twice so we can verify you typed it in correctly.
1125 </div>
12<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>26 <div>
1327 <br />
14<form action="" method="post">28 <form action="" method="post">
15{{ form.new_password1.errors }}29 {{ form.new_password1.errors }}
16<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>30 <p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
17{{ form.new_password2.errors }}31 {{ form.new_password2.errors }}
18<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>32 <p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
19<p><input type="submit" value="{% trans 'Change my password' %}" /></p>33 <p><input type="submit" value="{% trans 'Change my password' %}" /></p>
20</form>34 </form>
2135 <br />
36 </div>
22{% else %}37{% else %}
2338 <div class="show_center errormessage">
24<h1>{% trans 'Password reset unsuccessful' %}</h1>39 The password reset link was invalid, possibly because it has already been used. Please request a new password reset.
2540 </div>
26<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
27
28{% endif %}41{% endif %}
2942 </div>
43</div>
30{% endblock %}44{% endblock %}
3145
=== modified file 'templates/registration/password_reset_done.html'
--- templates/registration/password_reset_done.html 2009-02-20 11:19:12 +0000
+++ templates/registration/password_reset_done.html 2010-10-30 22:51:06 +0000
@@ -1,12 +1,27 @@
1{% extends "base.html" %}1{% extends "registration/base.html" %}
2{% comment %}
3vim:ft=htmldjango:
4{% endcomment %}
5
6{% block title %}
7{{ block.super }} - Reset Password
8{% endblock %}
9
2{% load i18n %}10{% load i18n %}
311
4{% block title %}{% trans 'Password reset successful' %}{% endblock %}
5
6{% block content %}12{% block content %}
713{% include "django_messages/inlines/navigation.html" %}
8<h1>{% trans 'Password reset successful' %}</h1>14
915<br />
10<p>{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}</p>16<br />
1117<div class="box_item_model fixed_site border">
18 <h3 class="title">Password reset successful</h3>
19 <div class="info_line">
20 <br />
21 <div class="show_center errormessage">
22 We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly.
23 </div>
24 <br />
25 </div>
26</div>
12{% endblock %}27{% endblock %}
1328
=== modified file 'templates/registration/password_reset_form.html'
--- templates/registration/password_reset_form.html 2009-02-20 11:19:12 +0000
+++ templates/registration/password_reset_form.html 2010-10-30 22:51:06 +0000
@@ -1,19 +1,40 @@
1{% extends "base.html" %}1{% extends "registration/base.html" %}
2{% comment %}
3vim:ft=htmldjango:
4{% endcomment %}
5
6{% block title %}
7{{ block.super }} - Register
8{% endblock %}
9
2{% load i18n %}10{% load i18n %}
311
4{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password reset' %}</div>{% endblock %}
5
6{% block title %}{% trans "Password reset" %}{% endblock %}
7
8{% block content %}12{% block content %}
913{% include "django_messages/inlines/navigation.html" %}
10<h1>{% trans "Password reset" %}</h1>14
1115<br />
12<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>16<br />
1317<div class="box_item_model fixed_site border">
14<form action="" method="post">18 <h3 class="title">Password reset</h3>
15{{ form.email.errors }}19 <div class="info_line">
16<p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p>20 <br />
17</form>21 <div class="show_center errormessage">
22 Forgotten your password?
23 <br />
24 Enter your e-mail address below,
25 <br />
26 and we'll e-mail instructions for setting a new one.
27 </div>
28 <div class="show_right">
29 <br />
30 <form action="" method="post">
31 {{ form.email.errors }}
32 <label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }}
33 <input type="submit" value="{% trans 'Reset my password' %}" />
34 </form>
35 <br />
36 </div>
37 </div>
38</div>
1839
19{% endblock %}40{% endblock %}
2041
=== modified file 'templates/registration/registration_complete.html'
--- templates/registration/registration_complete.html 2009-02-20 10:11:49 +0000
+++ templates/registration/registration_complete.html 2010-10-30 22:51:06 +0000
@@ -1,13 +1,24 @@
1{% extends "base.html" %}1{% extends "registration/base.html" %}
2{% comment %}
3vim:ft=htmldjango:
4{% endcomment %}
25
3{% block title %}6{% block title %}
4registration_complete.html | {{ block.super }}7{{ block.super }} - Registration complete
5{% endblock %}
6
7{% block header %}
8<h1>registration_complete.html</h1>
9{% endblock %}8{% endblock %}
109
11{% block content %}10{% block content %}
12Thank you for signing up. An email with the activation code has been send to your inbox.
13{% endblock %}
14\ No newline at end of file11\ No newline at end of file
12{% include "django_messages/inlines/navigation.html" %}
13
14<br />
15<br />
16<div class="box_item_model fixed_site border">
17 <h3 class="title">Registration</h3>
18 <div class="info_line">
19 <br />
20 <div class="show_center errormessage">
21 Thank you for signing up. An email with the activation code has been send to your inbox.
22 </div>
23 </div>
24</div>
25{% endblock %}
1526
=== modified file 'templates/registration/registration_form.html'
--- templates/registration/registration_form.html 2009-03-03 13:46:05 +0000
+++ templates/registration/registration_form.html 2010-10-30 22:51:06 +0000
@@ -1,4 +1,4 @@
1{% extends "base.html" %}1{% extends "registration/base.html" %}
2{% comment %}2{% comment %}
3vim:ft=htmldjango: 3vim:ft=htmldjango:
4{% endcomment %}4{% endcomment %}
@@ -8,57 +8,85 @@
8{% endblock %}8{% endblock %}
99
10{% block content %}10{% block content %}
11<form action="{% url registration_register %}" method="POST">11{% include "django_messages/inlines/navigation.html" %}
12<table>12
13<tr>13<br />
14 <td align="right" valign="top">Username:</td>14<br />
15 <td>15<div class="box_item_model fixed_site border">
16 {{ registration_form.username }} <br/>16 <h3 class="title">Registration</h3>
17 {% for error in registration_form.username.errors %}17 <div class="info_line">
18 <span class="errormessage">{{ error }}</span>18 <br />
19 {% endfor %}19 <form action="{% url registration_register %}" method="POST">
20 </td>20 <table>
21</tr>21 <tr>
22<tr>22 <td class="show_right">Username:</td>
23 <td align="right" valign="top">Email:</td>23 <td class="show_left">
24 <td>24 {{ registration_form.username }}
25 {{ registration_form.email }} <br/>25 <br/>
26 {% for error in registration_form.email.errors %}26 {% for error in registration_form.username.errors %}
27 <span class="errormessage">{{ error }}</span>27 <span class="errormessage">
28 {% endfor %}28 {{ error }}
29 </td>29 </span>
30</tr>30 {% endfor %}
31<tr>31 </td>
32 <td align="right" valign="top">Password:</td>32 </tr>
33 <td>33 <tr>
34 {{ registration_form.password1 }} <br/>34 <td class="show_right">Email:</td>
35 {% for error in registration_form.password1.errors %}35 <td class="show_left">
36 <span class="errormessage">{{ error }}</span>36 {{ registration_form.email }}
37 {% endfor %}37 <br/>
38 </td>38 {% for error in registration_form.email.errors %}
39</tr>39 <span class="errormessage">
40<tr>40 {{ error }}
41 <td align="right" valign="top">Password (again):</td>41 </span>
42 <td>42 {% endfor %}
43 {{ registration_form.password2 }} <br/>43 </td>
44 {% for error in registration_form.password2.errors %}44 </tr>
45 <span class="errormessage">{{ error }}</span>45 <tr>
46 {% endfor %}46 <td class="show_right">Password:</td>
47 </td>47 <td class="show_left">
48</tr>48 {{ registration_form.password1 }}
49<tr align="right">49 <br/>
50 <td align="right" valign="top">Prove that you're no spambot:</td>50 {% for error in registration_form.password1.errors %}
51 <td>51 <span class="errormessage">
52 {{ registration_form.captcha|safe }} <br/>52 {{ error }}
53 {% for error in registration_form.captcha.errors %}53 </span>
54 <span class="errormessage">{{ error }}</span>54 {% endfor %}
55 {% endfor %}55 </td>
56 </td>56 </tr>
57</tr>57 <tr>
58<tr>58 <td class="show_right">Password (again):</td>
59 <td>&nbsp;</td>59 <td class="show_left">
60 <td><input type="submit" value="Register" /></td>60 {{ registration_form.password2 }}
61</tr>61 <br/>
62</table>62 {% for error in registration_form.password2.errors %}
63</form>63 <span class="errormessage">
64 {{ error }}
65 </span>
66 {% endfor %}
67 </td>
68 </tr>
69 <tr>
70 <td class="show_right">Prove that you're no spambot:</td>
71 <td class="show_left">
72 {{ registration_form.captcha|safe }}
73 <br/>
74 {% for error in registration_form.captcha.errors %}
75 <span class="errormessage">
76 {{ error }}
77 </span>
78 {% endfor %}
79 </td>
80 </tr>
81 <tr>
82 <td class="show_right">&nbsp;</td>
83 <td class="show_left">
84 <input type="submit" value="Register" />
85 </td>
86 </tr>
87 </table>
88 </form>
89 <br />
90 </div>
91</div>
64{% endblock %}92{% endblock %}
6593
=== modified file 'templates/right_boxes.html'
--- templates/right_boxes.html 2010-09-26 13:30:30 +0000
+++ templates/right_boxes.html 2010-10-30 22:51:06 +0000
@@ -3,11 +3,11 @@
33
4 This file is included by mainpage and contains all the left menu boxes4 This file is included by mainpage and contains all the left menu boxes
5 on the site5 on the site
6
7{% endcomment %}6{% endcomment %}
8{% load inbox %}7{% load inbox %}
9{% load i18n %}8{% load i18n %}
10{% load wlprofile wlpoll wlevents %}9{% load wlprofile wlpoll wlevents%}
10{% load pybb_extras %}
1111
12 <!-- Search Box -->12 <!-- Search Box -->
13 <h3 class="box_title">Search</h3>13 <h3 class="box_title">Search</h3>
@@ -29,10 +29,10 @@
29 Help us to pay our Server!<br/>(: Consider a donation :) <br/><br/>29 Help us to pay our Server!<br/>(: Consider a donation :) <br/><br/>
30 <div>30 <div>
31 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">31 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
32 <input type="hidden" name="cmd" value="_s-xclick">32 <input type="hidden" name="cmd" value="_s-xclick" />
33 <input type="hidden" name="hosted_button_id" value="JH5R7YHSVRMRG">33 <input type="hidden" name="hosted_button_id" value="JH5R7YHSVRMRG" />
34 <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">34 <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" />
35 <img alt="" border="0" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1">35 <img alt="" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1" />
36 </form>36 </form>
37 </div>37 </div>
38 </div>38 </div>
@@ -40,20 +40,22 @@
40 <!-- Login Block / User informations -->40 <!-- Login Block / User informations -->
41 {% if user.is_authenticated %}41 {% if user.is_authenticated %}
42 <h3 class="box_title">Account</h3>42 <h3 class="box_title">Account</h3>
43 <div class="box_content" align="center"> 43 <div class="box_content">
44 <p>44 <p align="center">
45 You are logged in as<br/>45 Welcome <b>{{ user|user_link }}</b>,<br />
46 <b>{{ user|user_link }}</b>46 you've <a href="{% url messages_inbox %}">{% inbox_count %}</a> new messages
47 </p>47 </p>
48 48 <ul>
49 <p>49 <li>
50 <a href="{% url messages_inbox %}">{% inbox_count %} {% trans "new messages" %}</a>50 <a href="{% url profile_edit %}">Edit Profile</a>
51 </p>51 </li>
5252 <li>
53 <p>53 <a href="{% url notification_notices %} ">Notifications</a>
54 <a href="/accounts/logout/next={{request.path}}">Logout</a>54 </li>
55 </p>55 <li>
5656 <a href="/accounts/logout/next={{ request.path }}">Logout</a>
57 </li>
58 </ul>
57 </div>59 </div>
58 {% else %}60 {% else %}
59 <h3 class="box_title">Login</h3>61 <h3 class="box_title">Login</h3>
@@ -75,7 +77,6 @@
75 </center>77 </center>
76 </div>78 </div>
77 {% endif %}79 {% endif %}
78
79 <!-- Current polls if any -->80 <!-- Current polls if any -->
80 {% get_open_polls as polls %}81 {% get_open_polls as polls %}
81 {% if polls.count %}82 {% if polls.count %}
@@ -122,10 +123,10 @@
122123
123 <!-- Logged in users -->124 <!-- Logged in users -->
124 {%load online_users %}125 {%load online_users %}
125 <h3 class="box_title">Currently online</h3>126 {% online_users 10 %}
126 <div class="box_content"> 127 <!-- Placeholder for The Last 5 Forum Posts -->
127 {% online_users 10 %}128 <h3 class="box_title">Last 5 Forum Posts</h3>
129 <div class="box_content">
130 {% pybb_last_posts %}
128 </div>131 </div>
129
130
131132
132133
=== modified file 'templates/threadedcomments/inlines/comments.html'
--- templates/threadedcomments/inlines/comments.html 2010-04-17 09:17:23 +0000
+++ templates/threadedcomments/inlines/comments.html 2010-10-30 22:51:06 +0000
@@ -27,36 +27,42 @@
27 {% endif %}27 {% endif %}
28 </div>28 </div>
29 {% endfor %}29 {% endfor %}
30 {% if user.is_authenticated %}
31 <br />30 <br />
32 <br />31 <br />
33 <div class="news_item">32 <div class="box_item_model fixed_site border">
34 <h3 class="title">Reply to Original:</h3>33 {% if user.is_authenticated %}
35 <form method="POST" action="{% get_comment_url object %}?next={{object.get_absolute_url}}">34 <h3 class="title">Reply to Original:</h3>
36 <div class="content">35 <form method="POST" action="{% get_comment_url object %}?next={{object.get_absolute_url}}">
37 <table class="text" width="100%">36 <div class="content">
38 <tr>37 <table class="text full_site">
39 <td width="99%">38 <tr>
40 <span class=errorclass">{{ form.comment.errors }}</span>39 <td width="99%">
41 {{ form.comment }}40 <span class="errormessage">{{ form.comment.errors }}</span>
42 </td>41 {{ form.comment }}
43 <td width="1%"></td>42 </td>
44 </tr>43 <td width="1%"></td>
45 </table>44 </tr>
46 </div>45 </table>
47 <table class="bottom_line" width="100%">46 </div>
48 <tr>47 <table class="info_line full_site">
49 <td class="admin">48 <tr>
50 <input type="hidden" name="markup" value="1" />49 <td class="show_center">
51 <input type="hidden" value="next" value="{{ object.get_absolute_url }}" />50 <input type="hidden" name="markup" value="1" />
52 <input type="submit" value="Submit Comment" />51 <input type="hidden" value="next" value="{{ object.get_absolute_url }}" />
53 </td>52 <input type="submit" value="Submit Comment" />
54 </tr>53 </td>
55 </table>54 </tr>
56 </form>55 </table>
57 </div>56 </form>
58 {% else %}57 {% else %}
59 <p>Log in to post comments</p>58 <h3 class="title">Comments</h3>
59 <div class="info_line errormessage show_center">
60 <br />
61 !!! Log in to post comments !!!
62 <br />
63 <br />
64 </div>
60 {% endif %}65 {% endif %}
66 </div>
6167
6268
6369
=== modified file 'templates/threadedcomments/preview_comment.html'
--- templates/threadedcomments/preview_comment.html 2010-01-04 21:48:27 +0000
+++ templates/threadedcomments/preview_comment.html 2010-10-30 22:51:06 +0000
@@ -7,24 +7,22 @@
7 <div id="comment_preview">{% auto_transform_markup comment %}</div>7 <div id="comment_preview">{% auto_transform_markup comment %}</div>
8 {% endif %}8 {% endif %}
9 <form method="POST" action="">9 <form method="POST" action="">
10 <div class="content">10 <div class="content">
11 <table class="text" width="100%">11 <table class="text" width="100%">
12 <tr>12 <tr>
13 <td width="99%">13 <td width="99%">
14 <span class=errorclass">{{ form.comment.errors }}</span>14 <span class="errormessage">{{ form.comment.errors }}</span>
15 {{ form.comment }}15 {{ form.comment }}
16 </td>16 </td>
17 <td width="1%"></td>17 <td width="1%"></td>
18 </tr>18 </tr>
19 <tr>
20 <td class="bottom_line show_center">
21 <input type="hidden" name="markup" value="1" />
22 <input type="submit" value="Submit Comment" />
23 </td>
24 </tr>
19 </table>25 </table>
20 </div>26 </div>
21 <table class="bottom_line" width="100%">27 </form>
22 <tr>
23 <td class="admin">
24 <input type="hidden" name="markup" value="1" />
25 <input type="submit" value="Submit Comment" />
26 </td>
27 </tr>
28 </table>
29 </form>
30{% endblock %}28{% endblock %}
3129
=== added directory 'templates/wlggz'
=== added file 'templates/wlggz/base.html'
--- templates/wlggz/base.html 1970-01-01 00:00:00 +0000
+++ templates/wlggz/base.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,12 @@
1{% extends "base.html" %}
2{% comment %}
3 vim:ft=htmldjango
4{% endcomment %}
5
6{% block title %}
7GGZ statistics - {{ block.super }}
8{% endblock %}
9
10{% block extra_head %}
11<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}/css/ggz.css" />{{ block.super}}
12{% endblock %}
013
=== added file 'templates/wlggz/edit_ggz.html'
--- templates/wlggz/edit_ggz.html 1970-01-01 00:00:00 +0000
+++ templates/wlggz/edit_ggz.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,43 @@
1{% extends "wlggz/base.html" %}
2
3{% load i18n %}
4
5{% block content %}
6{% include "django_messages/inlines/navigation.html" %}
7<br />
8<br />
9<div class="box_item_model fixed_site border">
10 <h3 class="title">{% trans "Set GGZ password" %}</h3>
11 <form method="post" enctype="multipart/form-data">
12 <div class="content">
13 <table cellspacing="1" class="text full_site">
14 {% if profile_form.errors %}
15 <tr>
16 <td class="even" colspan="2">{{ profile_form.errors }}</td>
17 </tr>
18 {% endif %}
19 {% for field in ggz_form %}
20 <tr>
21 {% if field.errors %}
22 <td colspan="2" class="{% cycle "odd" "even" %}">
23 <div class="errormessage">{{ field.errors }}</div>
24 </td>
25 </tr>
26 <tr>
27 {% endif %}
28 <td class="{% cycle "odd" "even" %}">{{ field.label_tag }}:</td>
29 <td class="{% cycle "odd" "even" %}">{{ field }}
30 {% ifequal field.name "time_display" %}
31 <a href="/wiki/HomepageDocuTimeDisplay">Documented here</a>
32 {% endifequal %}
33 </td>
34 </tr>
35 {% endfor %}
36 </table>
37 </div>
38 <div class="info_line">
39 <input type="submit" value="{% trans "Save" %}" />
40 </div>
41 </form>
42</div>
43{% endblock %}
044
=== added file 'templates/wlggz/view_ggz_highscore.html'
--- templates/wlggz/view_ggz_highscore.html 1970-01-01 00:00:00 +0000
+++ templates/wlggz/view_ggz_highscore.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,43 @@
1{% extends "wlggz/base.html" %}
2
3{% load i18n %}
4
5{% block content %}
6{% load custom_date %}
7{% load wlprofile %}
8
9{% include "django_messages/inlines/navigation.html" %}
10
11<br />
12<br />
13<div class="box_item_model fixed_site border">
14 <h3 class="title">Top ten widelands players</h3>
15 <table cellspacing="1" class="text full_site">
16 <tr>
17 <td>User</td>
18 <td>ranking</td>
19 <td>rating</td>
20 <td>wins</td>
21 <td>losses</td>
22 </tr>
23 {% for userstat in ggzstats %}
24 <tr>
25 <td class="{% cycle "odd" "even" %}"><a href="{% url wlggz_userstats userstat.handle %}">{{ userstat.handle }}</a></td>
26 <td class="{% cycle "odd" "even" %}"> {{ userstat.ranking|floatformat }} </td>
27 <td class="{% cycle "odd" "even" %}"> {{ userstat.rating|floatformat }} </td>
28 <td class="{% cycle "odd" "even" %}"> {{ userstat.wins|floatformat }} </td>
29 <td class="{% cycle "odd" "even" %}"> {{ userstat.losses|floatformat }} </td>
30 </tr>
31 {% empty %}
32 <tr>
33 <td class="even show_center" colspan="5">
34 <br />
35 <b>Sorry, no ranking yet</b>
36 <br />
37 <br />
38 </td>
39 </tr>
40 {% endfor %}
41 </table>
42</div>
43{% endblock %}
044
=== added file 'templates/wlggz/view_ggz_matches.html'
--- templates/wlggz/view_ggz_matches.html 1970-01-01 00:00:00 +0000
+++ templates/wlggz/view_ggz_matches.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,45 @@
1{% extends "wlggz/base.html" %}
2
3{% load i18n %}
4
5{% block content %}
6{% load custom_date %}
7{% load wlprofile %}
8
9{% include "django_messages/inlines/navigation.html" %}
10
11<br />
12<br />
13<div class="box_item_model fixed_site border">
14 <h3 class="title">Last 10 matches</h3>
15 <table cellspacing="1" class="text full_site">
16 <tr>
17 <td class="ggz_date">Date</td>
18 <td class="ggz_winner">Winner</td>
19 <td class="ggz_vs">Participants</td>
20 </tr>
21 {% for match in ggzmatches %}
22 <tr>
23 <td class="{% cycle "odd" "even" %}">{{ match.date_date }}</td>
24 <td class="{% cycle "odd" "even" %}">
25 {{ match.winner_as_userlink }}
26 </td>
27 <td class="{% cycle "odd" "even" %}">
28 {% for player in match.wlggz_matchplayers.all %}
29 {{ player.handle_as_userlink }}({{ player.result }}, {{ player.points }})
30 {% endfor %}
31 </td>
32 </tr>
33 {% empty %}
34 <tr>
35 <td class="even show_center" colspan="3">
36 <br />
37 <b>Sorry, no matches yet</b>
38 <br />
39 <br />
40 </td>
41 </tr>
42 {% endfor %}
43 </table>
44</div>
45{% endblock %}
046
=== added file 'templates/wlggz/view_ggz_overview.html'
--- templates/wlggz/view_ggz_overview.html 1970-01-01 00:00:00 +0000
+++ templates/wlggz/view_ggz_overview.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,27 @@
1{% extends "wlggz/base.html" %}
2
3{% load i18n %}
4
5{% block content %}
6{% load custom_date %}
7
8{% include "django_messages/inlines/navigation.html" %}
9<br />
10<br />
11<div class="box_item_model fixed_site border">
12 <h3 class="title">{% trans "Available Links" %}</h3>
13 <div class="info_line show_left">
14 <br />
15 &nbsp;&nbsp;<a href="{% url wlggz_matches %}">Last matches</a><br />
16 &nbsp;&nbsp;<a href="{% url wlggz_ranking %}">GGZ ranking</a><br />
17 <br />
18 {% if user.is_authenticated %}
19 &nbsp;&nbsp;<a href="{% url wlggz_userstats %}">View your ggz statistics</a><br />
20 &nbsp;&nbsp;<a href="{% url wlggz_userinfo %}">About your ggz account</a><br />
21 &nbsp;&nbsp;<a href="{% url wlggz_changepw %}">Change your ggz password</a><br />
22 <br />
23 {% endif %}
24 </div>
25</div>
26
27{% endblock %}
028
=== added file 'templates/wlggz/view_ggz_playerstats.html'
--- templates/wlggz/view_ggz_playerstats.html 1970-01-01 00:00:00 +0000
+++ templates/wlggz/view_ggz_playerstats.html 2010-10-30 22:51:06 +0000
@@ -0,0 +1,106 @@
1{% extends "wlggz/base.html" %}
2
3{% load i18n %}
4
5{% block content %}
6{% load custom_date %}
7{% load wlprofile %}
8
9{% include "django_messages/inlines/navigation.html" %}
10
11<br />
12<br />
13
14{% if ggzauth.user %}
15 <div class="box_item_model fixed_site border">
16 <h3 class="title">{% trans "GGZ results for" %} {{ ggzauth.user.username }}</h3>
17 <table class="info_line full_site">
18 <tr><td class="ggz_stats">Last ggz login:</td><td class="show_left"> {{ ggzauth.lastlogin }}</td></tr>
19 <tr><td class="ggz_stats">Ranking:</td><td class="show_left"> {{ ggzstats.ranking }}</td></tr>
20 <tr><td class="ggz_stats">Rating:</td><td class="show_left"> {{ ggzstats.rating|floatformat }}</td></tr>
21 <tr><td class="ggz_stats">wins:</td><td class="show_left"> {{ ggzstats.wins }}</td></tr>
22 <tr><td class="ggz_stats">losses:</td><td class="show_left"> {{ ggzstats.losses }}</td></tr>
23 </table>
24 </div>
25 <br />
26 <br />
27
28 <div class="box_item_model fixed_site border">
29 <h3 class="title">Last 10 matches of {{ ggzauth.user.username }}</h3>
30 {% if ggzmatches %}
31 <table width="100%" cellspacing="1" class="text">
32 <tr>
33 <td class="ggz_date">Date</td>
34 <td class="ggz_winner">Winner</td>
35 <td class="ggz_vs">Participants</td>
36 </tr>
37 {% for match in ggzmatches %}
38 <tr>
39 <td class="{% cycle "odd" "even" %}">{{ match.match.date_date }}</td>
40 <td class="{% cycle "odd" "even" %}">
41 {% if match.match.winner %}
42 {{ match.match.winner_as_userlink }}
43 {% endif %}
44 </td>
45 <td class="{% cycle "odd" "even" %}">
46 {% for player in match.match.wlggz_matchplayers.all %}
47 {{ player.handle_as_userlink }}
48 {% endfor %}
49 </td class="{% cycle "odd" "even" %}">
50 </tr>
51 {% endfor %}
52 </table>
53 {% else %}
54 <div class="info_line show_center">
55 <br />
56 <b>User has not participated in any matches</b>
57 <br />
58 <br />
59 </div>
60 {% endif %}
61 </div>
62 <br />
63 <br />
64 <div class="box_item_model fixed_site border">
65 <h3 class="title">Last 10 matches {{ ggzauth.user.username }} won</h3>
66 {% if ggzwonmatches %}
67 <table cellspacing="1" class="text full_site">
68 <tr>
69 <td class="ggz_date">Date</td>
70 <td class="ggz_winner">Winner</td>
71 <td class="ggz_vs">Participants</td>
72 </tr>
73 {% for match in ggzwonmatches %}
74 <tr>
75 <td class="{% cycle "odd" "even" %}">{{ match.date_date }}</td>
76 <td class="{% cycle "odd" "even" %}">{{ match.winner_as_userlink }}</td>
77 <td class="{% cycle "odd" "even" %}">
78 {% for player in match.wlggz_matchplayers.all %}
79 {{ player.handle_as_userlink }}
80 {% endfor %}
81 </td>
82 </tr>
83 {% endfor %}
84 </table>
85 {% else %}
86 <div class="info_line show_center">
87 <br />
88 <b>User has won no matches</b>
89 <br />
90 <br />
91 </div>
92 {% endif %}
93 </div>
94{% else %}
95 <div class="box_item_model">
96 <h3 class="title">{% trans "GGZ results for" %} {{ ggzauth.user.username }}</h3>
97 <div class="info_line show_center">
98 <br />
99 <b class="errormessage">User does not exist or has no ggz account
100 <br />
101 <br />
102 </table>
103 </div>
104{% endif %}
105
106{% endblock %}
0107
=== modified file 'templates/wlprofile/edit_profile.html'
--- templates/wlprofile/edit_profile.html 2010-01-02 21:19:28 +0000
+++ templates/wlprofile/edit_profile.html 2010-10-30 22:51:06 +0000
@@ -4,11 +4,11 @@
44
5{% block content %}5{% block content %}
6{% ifequal user profile.user %}6{% ifequal user profile.user %}
7 {% include "messages/inlines/navigation.html" %}7 {% include "django_messages/inlines/navigation.html" %}
8{% endifequal %}8{% endifequal %}
9<br />9<br />
10<br />10<br />
11<div class="profile_item">11<div class="box_item_model fixed_site border">
12 <h3 class="title">{% trans "Profile editing" %}</h3>12 <h3 class="title">{% trans "Profile editing" %}</h3>
13 <div class="content">13 <div class="content">
14 {% if profile.avatar %}14 {% if profile.avatar %}
@@ -25,29 +25,54 @@
25 {% endif %}25 {% endif %}
2626
27 {% for field in profile_form %}27 {% for field in profile_form %}
28 {% if field.errors %}
28 <tr>29 <tr>
29 {% if field.errors %}
30 <td colspan="2" class="{% cycle "odd" "even" %}">30 <td colspan="2" class="{% cycle "odd" "even" %}">
31 <div class="errormessage">{{ field.errors }}</div>31 <div class="errormessage">{{ field.errors }}</div>
32 </td>32 </td>
33 </tr>33 </tr>
34 {% endif %}
35 {% ifequal field.name "delete_avatar" %}
36 {% if profile.avatar %}
34 <tr>37 <tr>
38 <td class="{% cycle "odd" "even" %}">{{ field.label_tag }}:</td>
39 <td class="{% cycle "odd" "even" %}">{{ field }}
40 </tr>
35 {% endif %}41 {% endif %}
36 <td {% ifequal field.name "signature" %} valign="top" {% endifequal %}class="{% cycle "odd" "even" %}">{{ field.label_tag }}:</td>42 {% else %}
37 <td class="{% cycle "odd" "even" %}">{{ field }} 43 <tr>
44 <td class="{% cycle "odd" "even" %} {%ifequal field.name "signature" %}show_left{% endifequal %}">{{ field.label_tag }}:</td>
45 <td class="{% cycle "odd" "even" %}">{{ field }}
38 {% ifequal field.name "time_display" %}46 {% ifequal field.name "time_display" %}
39 <a href="/wiki/HomepageDocuTimeDisplay">Documented here</a>47 <a href="/wiki/HomepageDocuTimeDisplay">Documented here</a>
40 {% endifequal %}48 {% endifequal %}
41 </td>49 </td>
42 </tr>50 </tr>
51 {% endifequal %}
43 {% endfor %}52 {% endfor %}
44 </table>53 </table>
45 </div>54 </div>
46 <table class="bottom_line" width="100%">55 <div class="info_line">
47 <tr>56 <input type="submit" value="{% trans "Save" %}" />
48 <td><input type="submit" value="{% trans "Save" %}" /></td>57 </div>
49 </tr>
50 </table>
51 </form>58 </form>
52</div>59</div>
60<br />
61<div class="box_item_model fixed_site border">
62 <div class="info_line show_left">
63 <a href="{% url auth_change_password %}">Change website password</a>
64 <br />
65 <br />
66 <b class="errormessage">WARNING: Passwords are transmitted in cleartext.</b>
67 </div>
68</div>
69<br />
70<div class="box_item_model fixed_site border">
71 <div class="info_line show_left">
72 <a href="{% url wlggz_changepw %}">Change online lobby password</a>
73 <br />
74 <br />
75 <b class="errormessage">WARNING: GGZ transmitts the password in cleartext. Choose a different password for online gaming.</b>
76 </div>
77</div>
53{% endblock %}78{% endblock %}
5479
=== modified file 'templates/wlprofile/view_profile.html'
--- templates/wlprofile/view_profile.html 2010-01-03 14:37:49 +0000
+++ templates/wlprofile/view_profile.html 2010-10-30 22:51:06 +0000
@@ -5,18 +5,17 @@
5{% block content %}5{% block content %}
6{% load custom_date %}6{% load custom_date %}
77
8{% ifequal user profile.user %}8{% include "django_messages/inlines/navigation.html" %}
9{% include "messages/inlines/navigation.html" %}9
10{%endifequal%}10<br />
11<br />11<br />
12<br />12<div class="box_item_model fixed_site border">
13<div class="profile_item">
14 <h3 class="title">{% trans "View Profile" %}</h3>13 <h3 class="title">{% trans "View Profile" %}</h3>
15 <div class="content">14 <div class="content">
16 {% if profile.avatar %}15 {% if profile.avatar %}
17 <img src="{{ profile.avatar.url }}" />16 <img src="{{ profile.avatar.url }}" />
18 {% endif %}17 {% endif %}
19 <table width="100%" cellspacing="1" class="text">18 <table cellspacing="1" class="text full_site">
20 <tr>19 <tr>
21 <td class="odd">User:</td>20 <td class="odd">User:</td>
22 <td class="odd">{{ profile.user.username }}</td>21 <td class="odd">{{ profile.user.username }}</td>
@@ -57,14 +56,19 @@
57 <td class="even">Yahoo:</td>56 <td class="even">Yahoo:</td>
58 <td class="even">{{ profile.yahoo }}</td>57 <td class="even">{{ profile.yahoo }}</td>
59 </tr>58 </tr>
59 <tr>
60 <td class="odd show_left">Signature:</td>
61 <td class="odd show_left">{{ profile.signature|urlize|linebreaks }}</td>
62 </tr>
60 {% ifequal user profile.user %}63 {% ifequal user profile.user %}
61 <tr>64 <tr>
62 <td class="odd">Email:</td>65 <td class="even">Email:</td>
63 <td class="odd">{{ profile.user.email }}</td>66 <td class="even">{{ profile.user.email }}</td>
64 </tr>67 </tr>
65 {% endifequal %}68 {% endifequal %}
66 </table>69 </table>
67</div>70</div>
71{% comment %}
68<table class="bottom_line" width="100%">72<table class="bottom_line" width="100%">
69 <tr>73 <tr>
70 <td>74 <td>
@@ -76,5 +80,13 @@
76 </td>80 </td>
77 </tr>81 </tr>
78</table>82</table>
83<table class="bottom_line" width="100%">
84 <tr>
85 <td>
86 <a href="{% url wlggz_userstats profile.user %}">View GGZ Statistics of this user</a>
87 </td>
88 </tr>
89</table>
90{% endcomment %}
79</div>91</div>
80{% endblock %}92{% endblock %}
8193
=== modified file 'templates/wlwebchat/index.html'
--- templates/wlwebchat/index.html 2010-09-06 19:10:18 +0000
+++ templates/wlwebchat/index.html 2010-10-30 22:51:06 +0000
@@ -18,7 +18,7 @@
1818
19<!-- Start of Webchat -->19<!-- Start of Webchat -->
20{% if user.is_anonymous %}20{% if user.is_anonymous %}
21<iframe src="http://webchat.freenode.net?nick=guest&channels=widelands&uio=d4" width="647" height="400"></iframe>21<iframe src="http://webchat.freenode.net?nick=widelands_.&channels=widelands&uio=d4" width="647" height="400"></iframe>
22{% else %}22{% else %}
23<iframe src="http://webchat.freenode.net?nick={{ user.username }}&channels=widelands&uio=d4" width="100%" height="400"></iframe>23<iframe src="http://webchat.freenode.net?nick={{ user.username }}&channels=widelands&uio=d4" width="100%" height="400"></iframe>
24{% endif %}24{% endif %}
2525
=== modified file 'urls.py'
--- urls.py 2010-03-14 14:13:24 +0000
+++ urls.py 2010-10-30 22:51:06 +0000
@@ -22,6 +22,7 @@
22 # Django builtin / Registration22 # Django builtin / Registration
23 (r'^accounts/logout/(next=(?P<next_page>.*))?$', 'django.contrib.auth.views.logout'),23 (r'^accounts/logout/(next=(?P<next_page>.*))?$', 'django.contrib.auth.views.logout'),
24url (r'^accounts/register/$', 'mainpage.views.register', name='registration_register'),24url (r'^accounts/register/$', 'mainpage.views.register', name='registration_register'),
25 url(r'^accounts/changepw/$', 'django.contrib.auth.views.password_change', name="auth_change_password"),
25 (r'^accounts/', include('registration.backends.default.urls')),26 (r'^accounts/', include('registration.backends.default.urls')),
26 (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),27 (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
2728
@@ -49,6 +50,7 @@
49 url(r'^poll/', include("wlpoll.urls")),50 url(r'^poll/', include("wlpoll.urls")),
50 url(r'^maps/', include("wlmaps.urls")),51 url(r'^maps/', include("wlmaps.urls")),
51 url(r'^screenshots/', include("wlscreens.urls")),52 url(r'^screenshots/', include("wlscreens.urls")),
53 url(r'^ggz/', include("wlggz.urls")),
52)54)
5355
54try:56try:
5557
=== modified file 'wiki/feeds.py'
--- wiki/feeds.py 2010-01-01 21:35:23 +0000
+++ wiki/feeds.py 2010-10-30 22:51:06 +0000
@@ -9,15 +9,16 @@
9from django.template.loader import get_template9from django.template.loader import get_template
10from wiki.models import ChangeSet, Article10from wiki.models import ChangeSet, Article
11from wiki.utils import get_ct11from wiki.utils import get_ct
12import notification.atomformat as atom12from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed
1313
14ALL_ARTICLES = Article.objects.all()14ALL_ARTICLES = Article.objects.all()
15ALL_CHANGES = ChangeSet.objects.all()15ALL_CHANGES = ChangeSet.objects.all()
1616
17class RssHistoryFeed(Feed):17class RssHistoryFeed(Feed):
1818
19 feed_type = Rss201rev2Feed
19 title = 'History for all articles'20 title = 'History for all articles'
20 link = '/wiki/'21 link = '/wiki/feeds/rss'
21 description = 'Recent changes in wiki'22 description = 'Recent changes in wiki'
2223
23 def __init__(self, request,24 def __init__(self, request,
@@ -49,37 +50,21 @@
49 """50 """
50 return item.modified51 return item.modified
5152
5253 def item_author_name(self, item):
53class AtomHistoryFeed(atom.Feed):54 """
5455 Takes the object returned by get_object and returns the feeds's
55 feed_title = 'History for all articles'56 auhor's name as a Python string
57 """
58 if item.is_anonymous_change():
59 return _("Anonymous")
60 return item.editor.username
61
62
63class AtomHistoryFeed(RssHistoryFeed):
64
65 feed_type = Atom1Feed
56 feed_subtitle = 'Recent changes in wiki'66 feed_subtitle = 'Recent changes in wiki'
5767 link = '/wiki/feeds/atom'
58 def __init__(self, request,
59 group_slug=None, group_slug_field=None, group_qs=None,
60 article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES,
61 extra_context=None,
62 title_template = u'feeds/history_title.html',
63 description_template = u'feeds/history_description.html',
64 *args, **kw):
65
66 if group_slug is not None:
67 group = get_object_or_404(group_qs,
68 **{group_slug_field : group_slug})
69 self.changes_qs = changes_qs.filter(article__content_type=get_ct(group),
70 article__object_id=group.id)
71 else:
72 self.changes_qs = changes_qs
73
74 self.title_template = get_template(title_template)
75 self.description_template = get_template(description_template)
76 super(AtomHistoryFeed, self).__init__('', request)
77
78 def feed_id(self):
79 return "feed_id"
80
81 def items(self):
82 return self.changes_qs.order_by('-modified')[:30]
8368
84 def item_id(self, item):69 def item_id(self, item):
85 return "%s" % item.id70 return "%s" % item.id
@@ -103,9 +88,19 @@
103 c = Context({'obj' : item,})88 c = Context({'obj' : item,})
104 return ({'type': 'html'}, self.description_template.render(c))89 return ({'type': 'html'}, self.description_template.render(c))
10590
91 def item_author_name(self, item):
92 """
93 Takes the object returned by get_object and returns the feeds's
94 auhor's name as a Python string
95 """
96 if item.is_anonymous_change():
97 return _("Anonymous")
98 return item.editor.username
99
106100
107class RssArticleHistoryFeed(Feed):101class RssArticleHistoryFeed(Feed):
108102
103 feed_type = Rss201rev2Feed
109 def __init__(self, title, request, 104 def __init__(self, title, request,
110 group_slug=None, group_slug_field=None, group_qs=None,105 group_slug=None, group_slug_field=None, group_qs=None,
111 article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES,106 article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES,
@@ -150,27 +145,8 @@
150 return item.modified145 return item.modified
151146
152147
153class AtomArticleHistoryFeed(atom.Feed):148class AtomArticleHistoryFeed(RssArticleHistoryFeed):
154 149 feed_type = Atom1Feed
155 def __init__(self, title, request,
156 group_slug=None, group_slug_field=None, group_qs=None,
157 article_qs=ALL_ARTICLES, changes_qs=ALL_CHANGES,
158 extra_context=None,
159 title_template = u'feeds/history_title.html',
160 description_template = u'feeds/history_description.html',
161 *args, **kw):
162
163 if group_slug is not None:
164 group = get_object_or_404(group_qs,
165 **{group_slug_field : group_slug})
166 self.article_qs = article_qs.filter(content_type=get_ct(group),
167 object_id=group.id)
168 else:
169 self.article_qs = article_qs
170
171 self.title_template = get_template(title_template)
172 self.description_template = get_template(description_template)
173 super(AtomArticleHistoryFeed, self).__init__('', request)
174150
175 def get_object(self, bits):151 def get_object(self, bits):
176 # We work around a bug here which is likely in atomformat.py; 152 # We work around a bug here which is likely in atomformat.py;
@@ -190,9 +166,6 @@
190 def feed_id(self):166 def feed_id(self):
191 return "feed_id"167 return "feed_id"
192168
193 def items(self, obj):
194 return ChangeSet.objects.filter(article__id__exact=obj.id).order_by('-modified')[:30]
195
196 def item_id(self, item):169 def item_id(self, item):
197 return "%s" % item.id170 return "%s" % item.id
198171
199172
=== added directory 'wlggz'
=== added file 'wlggz/__init__.py'
=== added file 'wlggz/admin.py'
--- wlggz/admin.py 1970-01-01 00:00:00 +0000
+++ wlggz/admin.py 2010-10-30 22:51:06 +0000
@@ -0,0 +1,27 @@
1#!/usr/bin/env python -tt
2# encoding: utf-8
3#
4# File: wlggz/admin.py
5#
6# Created 2010-06-03 by Timo Wingender <timo.wingender@gmx.de>
7#
8# Last Modified: $Date$
9#
10
11from django.utils.translation import ugettext_lazy as _
12from django.contrib import admin
13from models import GGZAuth
14
15class GGZAdmin(admin.ModelAdmin):
16 list_display = ['user', 'password', 'permissions', 'lastlogin']
17 list_per_page = 20
18 ordering = ['-user']
19 search_fields = ['user__username', 'user__first_name', 'user__last_name']
20 fieldsets = (
21 (None, {
22 'fields': ('user', 'password', 'permissions')
23 }
24 ),
25 )
26
27admin.site.register(GGZAuth, GGZAdmin)
028
=== added file 'wlggz/fields.py'
--- wlggz/fields.py 1970-01-01 00:00:00 +0000
+++ wlggz/fields.py 2010-10-30 22:51:06 +0000
@@ -0,0 +1,85 @@
1"""
2Details about AutoOneToOneField:
3 http://softwaremaniacs.org/blog/2007/03/07/auto-one-to-one-field/
4"""
5
6from StringIO import StringIO
7import logging
8
9from django.db.models import OneToOneField
10from django.db.models.fields.related import SingleRelatedObjectDescriptor
11from django.db import models
12from django.core.files.uploadedfile import SimpleUploadedFile
13
14
15class AutoSingleRelatedObjectDescriptor(SingleRelatedObjectDescriptor):
16 def __get__(self, instance, instance_type=None):
17 try:
18 return super(AutoSingleRelatedObjectDescriptor, self).__get__(instance, instance_type)
19 except self.related.model.DoesNotExist:
20 obj = self.related.model(**{self.related.field.name: instance})
21 obj.save()
22 return obj
23
24
25class AutoOneToOneField(OneToOneField):
26 """
27 OneToOneField creates dependent object on first request from parent object
28 if dependent oject has not created yet.
29 """
30
31 def contribute_to_related_class(self, cls, related):
32 setattr(cls, related.get_accessor_name(), AutoSingleRelatedObjectDescriptor(related))
33 #if not cls._meta.one_to_one_field:
34 #cls._meta.one_to_one_field = self
35
36
37class ExtendedImageField(models.ImageField):
38 """
39 Extended ImageField that can resize image before saving it.
40 """
41 def __init__(self, *args, **kwargs):
42 self.width = kwargs.pop('width', None)
43 self.height = kwargs.pop('height', None)
44 super(ExtendedImageField, self).__init__(*args, **kwargs)
45
46
47 def save_form_data(self, instance, data):
48 if data and self.width and self.height:
49 if instance.avatar:
50 instance.avatar.delete()
51
52 content = self.resize_image(data.read(), width=self.width, height=self.height)
53 data = SimpleUploadedFile(instance.user.username + ".png", content, data.content_type)
54 super(ExtendedImageField, self).save_form_data(instance, data)
55
56
57 def resize_image(self, rawdata, width, height):
58 """
59 Resize image to fit it into (width, height) box.
60 """
61
62 try:
63 import Image
64 except ImportError:
65 from PIL import Image
66
67 image = Image.open(StringIO(rawdata))
68 try:
69 oldw, oldh = image.size
70
71 if oldw > width or oldh > height:
72 if oldw >= oldh:
73 x = int(round((oldw - oldh) / 2.0))
74 image = image.crop((x, 0, (x + oldh) - 1, oldh - 1))
75 else:
76 y = int(round((oldh - oldw) / 2.0))
77 image = image.crop((0, y, oldw - 1, (y + oldw) - 1))
78 image = image.resize((width, height), resample=Image.ANTIALIAS)
79 except Exception, err:
80 logging.error(err)
81 return ''
82
83 string = StringIO()
84 image.save(string, format='PNG')
85 return string.getvalue()
086
=== added file 'wlggz/forms.py'
--- wlggz/forms.py 1970-01-01 00:00:00 +0000
+++ wlggz/forms.py 2010-10-30 22:51:06 +0000
@@ -0,0 +1,43 @@
1#!/usr/bin/env python -tt
2# encoding: utf-8
3#
4# Created by Timo Wingender <timo.wingender@gmx.de> on 2010-06-02.
5#
6# Last Modified: $Date$
7#
8
9from django import forms
10from models import GGZAuth
11from django.utils.translation import ugettext_lazy as _
12
13import hashlib
14import base64
15import settings
16import re
17
18class EditGGZForm(forms.ModelForm):
19 password = forms.CharField(label=_(u'GGZ password'), widget = forms.PasswordInput(render_value = False), required=True)
20
21 class Meta:
22 model = GGZAuth
23 fields = [ 'password', ]
24
25 def __init__(self, *args, **kwargs):
26 instance = kwargs.pop("instance")
27
28 print "instance: %s, kwargs: %s" % (instance, kwargs)
29 super(EditGGZForm, self).__init__(instance=instance, *args,**kwargs)
30
31 def clean_password(self):
32 pw = self.cleaned_data['password']
33 print "pw: %s" % (pw)
34 pw_hash = hashlib.sha1(pw).digest()
35 pw_base64 = base64.standard_b64encode(pw_hash)
36 print "sha1: %s" % (pw_hash)
37 print "base: %s" % (pw_base64)
38 return pw_base64
39
40
41 def save(self):
42 super(EditGGZForm, self).save()
43
044
=== added file 'wlggz/ggz_models.py'
--- wlggz/ggz_models.py 1970-01-01 00:00:00 +0000
+++ wlggz/ggz_models.py 2010-10-30 22:51:06 +0000
@@ -0,0 +1,189 @@
1#!/usr/bin/env python -tt
2# encoding: utf-8
3#
4# Created by Timo Wingender <timo.wingender@gmx.de> on 2010-06-03.
5#
6# Last Modified: $Date$
7#
8
9
10# This is an auto-generated and eddited representation for the ggzd tables.
11#
12
13from django.db import models
14from django.db.models import OneToOneField, ForeignKey
15from django.contrib.auth.models import User
16from django.core.urlresolvers import reverse
17from django.utils.safestring import mark_safe
18
19import datetime
20
21def ggz_userlink(user):
22 data = u'<a href="%s">%s</a>' % (\
23 reverse('wlggz_userstats', args=[user.username]), user.username)
24 return mark_safe(data)
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches