Merge lp:~widelands-dev/widelands-website/fix_sphinx_index_links into lp:widelands-website

Proposed by kaputtnik
Status: Merged
Merged at revision: 417
Proposed branch: lp:~widelands-dev/widelands-website/fix_sphinx_index_links
Merge into: lp:widelands-website
Diff against target: 75 lines (+26/-5)
3 files modified
mainpage/views.py (+2/-2)
templates/sphinxdoc/genindex.html (+2/-2)
templates/sphinxdoc/py-modindex.html (+22/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands-website/fix_sphinx_index_links
Reviewer Review Type Date Requested Status
SirVer Approve
Review via email: mp+302225@code.launchpad.net

Description of the change

- Fixes the links in https://wl.widelands.org/docs/wl/genindex/

- List some things in https://wl.widelands.org/docs/wl/py-modindex/ This is not really working, but at least the single entry and subentrys are shown as in the html output (make html)

To post a comment you must log in.
Revision history for this message
SirVer (sirver) wrote :

lgtm.

review: Approve
Revision history for this message
kaputtnik (franku) wrote :

Merged and deployed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mainpage/views.py'
2--- mainpage/views.py 2016-07-28 18:32:17 +0000
3+++ mainpage/views.py 2016-08-07 18:45:58 +0000
4@@ -72,9 +72,9 @@
5 new_user.save()
6 reg_user = User.objects.get(username=new_user)
7 # Creating a wlprofile
8- ext_profile = Profile(user=reg_user)
9+ ext_profile = Profile(user=reg_user)
10 ext_profile.save()
11- # Creating a ggzprofile
12+ # Creating a ggzprofile
13 ggz_profile = GGZAuth(user=reg_user)
14 ggz_profile.save()
15
16
17=== modified file 'templates/sphinxdoc/genindex.html'
18--- templates/sphinxdoc/genindex.html 2010-01-22 15:21:32 +0000
19+++ templates/sphinxdoc/genindex.html 2016-08-07 18:45:58 +0000
20@@ -16,7 +16,7 @@
21 <dt>
22 {# contents.0 is a list of links for the item #}
23 {% if contents.0 %}
24- <a href="{{ contents.0.0 }}">{{ name }}</a>
25+ <a href="{{ contents.0.0.1 }}">{{ name }}</a>
26 {% else %}
27 {{ name }}
28 {% endif %}
29@@ -25,7 +25,7 @@
30 {% if contents.1 %}
31 {% for subname, sublinks in contents.1 %}
32 <dd>
33- <a href="{{ sublinks.0 }}">{{ subname }}</a>
34+ <a href="{{ sublinks.0.1 }}">{{ subname }}</a>
35 {% for link in sublinks|slice:"1:" %}, <a href="{{ link }}">[Link]</a>{% endfor %}
36 </dd>
37 {% endfor %}
38
39=== renamed file 'templates/sphinxdoc/modindex.html' => 'templates/sphinxdoc/py-modindex.html'
40--- templates/sphinxdoc/modindex.html 2010-01-22 15:21:32 +0000
41+++ templates/sphinxdoc/py-modindex.html 2016-08-07 18:45:58 +0000
42@@ -2,11 +2,32 @@
43
44 {% block doc_body %}
45 <h1>Module Index</h1>
46+ {% for index in doc.content.0.items %}
47+ <p>index: {{index}}</p>
48+{% endfor %}
49 <dl>
50- {% for modname, collapse, cgroup, indent, fname, synops, pform, dep in doc.modindexentries %}
51+ {% for c in doc.content.0 %}
52+ {% for modul, level, fname, mainmod, unknown1, unknown2, descr in c %}
53+ {% if level < 2 %}
54+ <dt><a href="../{{ fname }}">{{ modul }}</a></dt>
55+ <dd>{{ descr }}
56+ {% else %}
57+ <dl>
58+ <dt><a href="../{{ fname }}">{{ modul }}</a></dt>
59+ <dd>{{ descr }}</dd>
60+ </dl>
61+
62+ {% endif %}
63+ {% endfor %}
64+ </dd>
65+ {% endfor %}
66+
67+ {% comment %}
68+ {% for modname, collapse, cgroup, indent, fname, synops, pform, dep in doc.content.0 %}
69 <dt><a href="{{ fname }}"><tt class="literal xref">{{ modname }}</tt></a></dt>
70 <dd>{{ synops }}</dd>
71 {% endfor %}
72+ {% endcomment %}
73 </dl>
74 <br />
75 {% endblock doc_body %}

Subscribers

People subscribed via source and target branches