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
=== modified file 'online_help/management/commands/update_help.py'
--- online_help/management/commands/update_help.py 2010-11-01 21:45:54 +0000
+++ online_help/management/commands/update_help.py 2010-11-06 19:38:40 +0000
@@ -188,8 +188,12 @@
188 enhancement_hier.append((b, building.enhancement))188 enhancement_hier.append((b, building.enhancement))
189189
190 if building._conf.has_option("global","help"):190 if building._conf.has_option("global","help"):
191 helpstr = normalize_name(building._conf.get("global","help"))191 b.help = normalize_name(building._conf.get("global","help"))
192 b.help = helpstr192 else:
193 try:
194 b.help = [worker.help for worker in b.workers_types.all()][0]
195 except IndexError:
196 print "could not find a help string for %s (%s) anywhere!" % (b.name, self._tribe.name)
193197
194 # See if there is any inputs field around198 # See if there is any inputs field around
195 if isinstance(building, ProductionSite):199 if isinstance(building, ProductionSite):
196200
=== modified file 'online_help/templates/building_details.html'
--- online_help/templates/building_details.html 2010-11-01 17:52:47 +0000
+++ online_help/templates/building_details.html 2010-11-06 19:38:40 +0000
@@ -13,4 +13,6 @@
13{{ building.imagemap|safe }}13{{ building.imagemap|safe }}
14</center>14</center>
1515
16Return to the <a href="../">Building overview/<a>.
17
16{% endblock %}18{% endblock %}
1719
=== modified file 'online_help/templates/inlines/display_worker.html'
--- online_help/templates/inlines/display_worker.html 2010-11-01 19:02:28 +0000
+++ online_help/templates/inlines/display_worker.html 2010-11-06 19:38:40 +0000
@@ -4,7 +4,7 @@
44
5 <tr class="odd">5 <tr class="odd">
6 <td><img src="{{ worker.image_url }}" alt="{{ worker.name }}" /></td>6 <td><img src="{{ worker.image_url }}" alt="{{ worker.name }}" /></td>
7 <td><a name="{{ worker.name }}">{{ worker.displayname }}</a></td>7 <td><a name="{{ worker.name }}" href="{{worker.name}}/">{{ worker.displayname }}</a></td>
8 <td>{{ worker.help }}</td> 8 <td>{{ worker.help }}</td>
9 </tr>9 </tr>
1010
1111
=== modified file 'online_help/templates/ware_details.html'
--- online_help/templates/ware_details.html 2010-11-01 17:52:47 +0000
+++ online_help/templates/ware_details.html 2010-11-06 19:38:40 +0000
@@ -8,9 +8,31 @@
88
99
10<center>10<center>
11<img src="{{ ware.graph_url }}" usemap="#G" alt="Graph for {{ ware.name }}" />11<img src="{{ ware.graph_url }}" usemap="#G" alt="Graph for {{ ware.displayname }}" />
1212
13{{ ware.imagemap|safe }}13{{ ware.imagemap|safe }}
14</center>14</center>
1515
16{% if ware.build_ware_for_buildings.all %}
17<h2>Used for building</h2>
18<table style="width:100%" class="building">
19 <tr>
20 <th>Building</th>
21 <th>Name</th>
22 <th>Description</th>
23 </tr>
24 {% for b in ware.build_ware_for_buildings.all %}
25 <tr class="odd">
26 <td><img src="{{ b.image_url }}" alt="{{b.displayname}}" /></td>
27 <td><a href="../../buildings/{{b.name}}/">{{ b.displayname }}</a></td>
28 <td>{{ b.help }}</td>
29 </tr>
30 {% endfor %}
31</table>
32{% else %}
33Not used for building.<br />
34{% endif %}
35
36Return to the <a href="../">Ware overview</a>.
37
16{% endblock %}38{% endblock %}
1739
=== modified file 'online_help/templates/worker_details.html'
--- online_help/templates/worker_details.html 2010-11-01 18:59:39 +0000
+++ online_help/templates/worker_details.html 2010-11-06 19:38:40 +0000
@@ -13,4 +13,6 @@
13{{ worker.imagemap|safe }}13{{ worker.imagemap|safe }}
14</center>14</center>
1515
16Return to the <a href="../">Worker overview</a>.
17
16{% endblock %}18{% endblock %}
1719
=== modified file 'online_help/views.py'
--- online_help/views.py 2010-11-01 19:02:28 +0000
+++ online_help/views.py 2010-11-06 19:38:40 +0000
@@ -3,8 +3,6 @@
3from django.http import HttpResponse3from django.http import HttpResponse
4from .models import Worker, Ware, Building, Tribe4from .models import Worker, Ware, Building, Tribe
55
6
7import pydot
8from settings import WIDELANDS_SVN_DIR, MEDIA_ROOT6from settings import WIDELANDS_SVN_DIR, MEDIA_ROOT
9import os7import os
108

Subscribers

People subscribed via source and target branches