Merge lp:~timojbo/widelands-website/new-help into lp:widelands-website

Proposed by Timo Paulssen
Status: Merged
Merged at revision: 238
Proposed branch: lp:~timojbo/widelands-website/new-help
Merge into: lp:widelands-website
Diff against target: 102 lines (+34/-6)
6 files modified
online_help/management/commands/update_help.py (+6/-2)
online_help/templates/building_details.html (+2/-0)
online_help/templates/inlines/display_worker.html (+1/-1)
online_help/templates/ware_details.html (+23/-1)
online_help/templates/worker_details.html (+2/-0)
online_help/views.py (+0/-2)
To merge this branch: bzr merge lp:~timojbo/widelands-website/new-help
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+40258@code.launchpad.net

Description of the change

cool stuff (working this time)

To post a comment you must log in.
238. By SirVer

Applied Timos changes with minimal rewording

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'online_help/management/commands/update_help.py'
2--- online_help/management/commands/update_help.py 2010-11-01 21:45:54 +0000
3+++ online_help/management/commands/update_help.py 2010-11-06 19:38:40 +0000
4@@ -188,8 +188,12 @@
5 enhancement_hier.append((b, building.enhancement))
6
7 if building._conf.has_option("global","help"):
8- helpstr = normalize_name(building._conf.get("global","help"))
9- b.help = helpstr
10+ b.help = normalize_name(building._conf.get("global","help"))
11+ else:
12+ try:
13+ b.help = [worker.help for worker in b.workers_types.all()][0]
14+ except IndexError:
15+ print "could not find a help string for %s (%s) anywhere!" % (b.name, self._tribe.name)
16
17 # See if there is any inputs field around
18 if isinstance(building, ProductionSite):
19
20=== modified file 'online_help/templates/building_details.html'
21--- online_help/templates/building_details.html 2010-11-01 17:52:47 +0000
22+++ online_help/templates/building_details.html 2010-11-06 19:38:40 +0000
23@@ -13,4 +13,6 @@
24 {{ building.imagemap|safe }}
25 </center>
26
27+Return to the <a href="../">Building overview/<a>.
28+
29 {% endblock %}
30
31=== modified file 'online_help/templates/inlines/display_worker.html'
32--- online_help/templates/inlines/display_worker.html 2010-11-01 19:02:28 +0000
33+++ online_help/templates/inlines/display_worker.html 2010-11-06 19:38:40 +0000
34@@ -4,7 +4,7 @@
35
36 <tr class="odd">
37 <td><img src="{{ worker.image_url }}" alt="{{ worker.name }}" /></td>
38- <td><a name="{{ worker.name }}">{{ worker.displayname }}</a></td>
39+ <td><a name="{{ worker.name }}" href="{{worker.name}}/">{{ worker.displayname }}</a></td>
40 <td>{{ worker.help }}</td>
41 </tr>
42
43
44=== modified file 'online_help/templates/ware_details.html'
45--- online_help/templates/ware_details.html 2010-11-01 17:52:47 +0000
46+++ online_help/templates/ware_details.html 2010-11-06 19:38:40 +0000
47@@ -8,9 +8,31 @@
48
49
50 <center>
51-<img src="{{ ware.graph_url }}" usemap="#G" alt="Graph for {{ ware.name }}" />
52+<img src="{{ ware.graph_url }}" usemap="#G" alt="Graph for {{ ware.displayname }}" />
53
54 {{ ware.imagemap|safe }}
55 </center>
56
57+{% if ware.build_ware_for_buildings.all %}
58+<h2>Used for building</h2>
59+<table style="width:100%" class="building">
60+ <tr>
61+ <th>Building</th>
62+ <th>Name</th>
63+ <th>Description</th>
64+ </tr>
65+ {% for b in ware.build_ware_for_buildings.all %}
66+ <tr class="odd">
67+ <td><img src="{{ b.image_url }}" alt="{{b.displayname}}" /></td>
68+ <td><a href="../../buildings/{{b.name}}/">{{ b.displayname }}</a></td>
69+ <td>{{ b.help }}</td>
70+ </tr>
71+ {% endfor %}
72+</table>
73+{% else %}
74+Not used for building.<br />
75+{% endif %}
76+
77+Return to the <a href="../">Ware overview</a>.
78+
79 {% endblock %}
80
81=== modified file 'online_help/templates/worker_details.html'
82--- online_help/templates/worker_details.html 2010-11-01 18:59:39 +0000
83+++ online_help/templates/worker_details.html 2010-11-06 19:38:40 +0000
84@@ -13,4 +13,6 @@
85 {{ worker.imagemap|safe }}
86 </center>
87
88+Return to the <a href="../">Worker overview</a>.
89+
90 {% endblock %}
91
92=== modified file 'online_help/views.py'
93--- online_help/views.py 2010-11-01 19:02:28 +0000
94+++ online_help/views.py 2010-11-06 19:38:40 +0000
95@@ -3,8 +3,6 @@
96 from django.http import HttpResponse
97 from .models import Worker, Ware, Building, Tribe
98
99-
100-import pydot
101 from settings import WIDELANDS_SVN_DIR, MEDIA_ROOT
102 import os
103

Subscribers

People subscribed via source and target branches