summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-03 00:51:00 -0500
committerDan McGee <dan@archlinux.org>2010-09-03 00:51:00 -0500
commit2dc0cafbb47fa67fde5ebe7876fb7566d660904a (patch)
tree33640193919fccf94b0c78d0ae45e4bc81c73cb6
parent8bd28385043ea146b76eadbc021db7e7c92c0be1 (diff)
downloadarchweb-2dc0cafbb47fa67fde5ebe7876fb7566d660904a.tar.gz
archweb-2dc0cafbb47fa67fde5ebe7876fb7566d660904a.zip
Add links to 'Versions Elsewhere' on package details page
This will allow clicking through to a few more associated packages from a given package, including those for the other architecture and potentially in other repositories. The box floats to the right with the package actions, which have also been restyled slightly so the whole area is a bit more styled and set off from the rest of the page. This should allow us to close the current oldest bug open in the Arch bug tracker, FS#7787. I remember the days when every bug was a four-digit number... Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--media/archweb.css8
-rw-r--r--templates/packages/details.html82
2 files changed, 55 insertions, 35 deletions
diff --git a/media/archweb.css b/media/archweb.css
index 247bb00d..179cd3bb 100644
--- a/media/archweb.css
+++ b/media/archweb.css
@@ -192,9 +192,11 @@ div#pkglist-about { margin-top: 1.5em; }
#pkglist-search legend { display: none; }
#pkglist-search label { width: auto; display: block; font-weight: normal; }
-/* pkgdetails: action list (svn entries, flag out-of-date) */
-#pkgdetails #actionlist { float: right; }
-#pkgdetails #actionlist ul { list-style: none; padding: 0; font-size: 0.846em }
+/* pkgdetails: details links that float on the right */
+#pkgdetails #detailslinks { float: right; }
+#pkgdetails #detailslinks h4 { margin-top: 0; margin-bottom: 0.25em; }
+#pkgdetails #detailslinks ul { list-style: none; padding: 0; margin-bottom: 0; font-size: 0.846em; }
+#pkgdetails #detailslinks > div { padding: 0.5em; margin-bottom: 1em; background: #eee; border: 1px solid #bbb; }
#pkgdetails #actionlist .flagged { color: red; font-size: 0.9em; font-style: italic; }
/* pkgdetails: pkg info */
diff --git a/templates/packages/details.html b/templates/packages/details.html
index 4537772c..785bf626 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -8,40 +8,58 @@
<h2>Package Details: {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h2>
- <div id="actionlist" class="listing">
-
- <ul class="small">
- <li><a href="{{ pkg.get_arch_svn_link }}" title="View SVN entries in the {{pkg.repo|lower}}-{{pkg.arch}} branch">SVN Entries ({{pkg.repo|lower}}-{{pkg.arch}})</a></li>
- <li><a href="{{ pkg.get_trunk_svn_link }}" title="View SVN entries on trunk">SVN Entries (trunk)</a></li>
- <li><a href="{{ pkg.get_bugs_link }}" title="View existing bug tickets for {{ pkg.pkgname }}">Bug Reports</a></li>
- {% if pkg.flag_date %}
- <li><span class="flagged">Package has been flagged out-of-date</span></li>
- {% with pkg.in_testing as tp %}{% if tp %}
- <li><span class="flagged">Version
- <a href="{{ tp.get_absolute_url }}"
- title="Testing package details for {{ tp.pkgname }}">{{ tp.pkgver }}-{{ tp.pkgrel }}</a>
- in testing</span></li>
- {% endif %}{% endwith %}
+ <div id="detailslinks" class="listing">
+
+ <div id="actionlist">
+ <h4>Package Actions</h4>
+ <ul class="small">
+ <li><a href="{{ pkg.get_arch_svn_link }}" title="View SVN entries in the {{pkg.repo|lower}}-{{pkg.arch}} branch">SVN Entries ({{pkg.repo|lower}}-{{pkg.arch}})</a></li>
+ <li><a href="{{ pkg.get_trunk_svn_link }}" title="View SVN entries on trunk">SVN Entries (trunk)</a></li>
+ <li><a href="{{ pkg.get_bugs_link }}" title="View existing bug tickets for {{ pkg.pkgname }}">Bug Reports</a></li>
+ {% if pkg.flag_date %}
+ <li><span class="flagged">Package has been flagged out-of-date</span></li>
+ {% with pkg.in_testing as tp %}{% if tp %}
+ <li><span class="flagged">Version
+ <a href="{{ tp.get_absolute_url }}"
+ title="Testing package details for {{ tp.pkgname }}">{{ tp.pkgver }}-{{ tp.pkgrel }}</a>
+ in testing</span></li>
+ {% endif %}{% endwith %}
+ {% if user.is_authenticated %}
+ <li><a href="unflag/" title="Unflag this package">Click here to unflag</a></li>
+ {% endif %}
+ {% else %}
+ <li><a href="flag/" title="Flag {{ pkg.pkgname }} as out-of-date">Flag Package Out-of-Date</a>
+ <a href="/packages/flaghelp/"
+ title="Get help on package flagging"
+ onclick="return !window.open('/packages/flaghelp/','FlagHelp',
+ 'height=350,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');">(?)</a></li>
+ {% endif %}
+ <li><a href="download/" title="Download {{ pkg.pkgname }} from mirror">Download From Mirror</a></li>
+ </ul>
+
{% if user.is_authenticated %}
- <li><a href="unflag/" title="Unflag this package">Click here to unflag</a></li>
- {% endif %}
- {% else %}
- <li><a href="flag/" title="Flag {{ pkg.pkgname }} as out-of-date">Flag Package Out-of-Date</a>
- <a href="/packages/flaghelp/"
- title="Get help on package flagging"
- onclick="return !window.open('/packages/flaghelp/','FlagHelp',
- 'height=350,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');">(?)</a></li>
+ <form id="pkg-action" method="post" action="/packages/update/">{% csrf_token %}
+ <div><input type="hidden" name="pkgid" value="{{ pkg.id }}" /></div>
+ <p>{% if user in pkg.maintainers %}
+ <input title="Orphan this package" type="submit" name="disown" value="Disown"/>
+ {% else %}
+ <input title="Adopt this package" type="submit" name="adopt" value="Adopt"/>
+ {% endif %}</p>
+ </form>
{% endif %}
- <li><a href="download/" title="Download {{ pkg.pkgname }} from mirror">Download From Mirror</a></li>
- </ul>
+ </div>
- {% if user.is_authenticated %}
- <form id="pkg-action" method="post" action="/packages/update/">{% csrf_token %}
- <div><input type="hidden" name="pkgid" value="{{ pkg.id }}" /></div>
- <p><input title="Adopt this package" type="submit" class="adopt" name="adopt" value="Adopt" />
- &nbsp;&nbsp;<input title="Orphan this package" type="submit" class="disown" name="disown" value="Disown" /></p>
- </form>
- {% endif %}
+ {% with pkg.elsewhere as others %}{% if others %}
+ <div id="elsewhere" class="widget">
+ <h4>Versions Elsewhere</h4>
+ <ul>
+ {% for o in others %}
+ <li><a href="{{ o.get_absolute_url }}"
+ title="Package details for {{ o.pkgname }}">{{ o.pkgname }} {{ o.pkgver }}-{{ o.pkgrel }} [{{ o.repo.name|lower }}] ({{ o.arch.name }})</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}{% endwith %}
</div><!-- #actionlist -->
@@ -62,7 +80,7 @@
<td>
{% for s in splits %}
<a href="{{ s.get_absolute_url }}"
- title="Package details for {{ pkg.pkgname }}">{{ s.pkgname }}</a><br/>
+ title="Package details for {{ s.pkgname }}">{{ s.pkgname }}</a><br/>
{% endfor %}
</td>
</tr>