summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 17:18:41 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 17:18:41 -0500
commitc0d6f0711c4760f08a6beb99818d075d7c993e2e (patch)
treee4a580d7b70181e9d5e36a8c438c63d0d7b63450
parentf286e9560e63a776397494899673b103f92f3198 (diff)
parent6ee65265a051933ee154c42490fdc509b9994202 (diff)
Merge tag 'release_2012-03-12'
Signature stuff and template tweaks Conflicts: templates/public/index.html
-rw-r--r--public/views.py1
-rw-r--r--sitestatic/archweb.css3
-rw-r--r--templates/packages/search.html51
-rw-r--r--templates/packages/search_paginator.html27
-rw-r--r--templates/public/index.html12
5 files changed, 36 insertions, 58 deletions
diff --git a/public/views.py b/public/views.py
index 493c45f6..e3d26f92 100644
--- a/public/views.py
+++ b/public/views.py
@@ -44,6 +44,7 @@ def userlist(request, user_type='hackers'):
else:
raise Http404
+ users = users.distinct()
context = USER_LISTS[user_type].copy()
context['users'] = users
return direct_to_template(request, 'public/userlist.html', context)
diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css
index 198eb083..5c9bb5de 100644
--- a/sitestatic/archweb.css
+++ b/sitestatic/archweb.css
@@ -645,8 +645,7 @@ div#pkglist-about {
}
/* pkglist: results navigation */
-#pkglist-stats-top,
-#pkglist-stats-bottom {
+.pkglist-stats {
font-size: 0.85em;
}
diff --git a/templates/packages/search.html b/templates/packages/search.html
index 5bb90a52..e4de5bb6 100644
--- a/templates/packages/search.html
+++ b/templates/packages/search.html
@@ -6,6 +6,7 @@
{% block navbarclass %}anb-packages{% endblock %}
{% block head %}
+{% if is_paginated and page_obj.number > 1 %}<meta name="robots" content="noindex, nofollow"/>{% endif %}
<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/widgets.css" />
{% endblock %}
@@ -51,31 +52,7 @@
{% if package_list %}
<div id="pkglist-results" class="box">
-
- {% if paginator %}
- <div id="pkglist-stats-top">
-
- <p>{{paginator.count}} packages found.
- Page {{page_obj.number}} of {{paginator.num_pages}}.</p>
-
- <p class="pkglist-nav">
- {% if page_obj.has_previous %}
- <a class="prev" href="/packages/{{page_obj.previous_page_number}}/?{{current_query}}"
- title="Go to previous page">&lt; Prev</a>
- {% else %}
- <span class="prev">&lt; Prev</span>
- {% endif %}
- {% if page_obj.has_next %}
- <a class="next" href="/packages/{{page_obj.next_page_number}}/?{{current_query}}"
- title="Go to next page">Next &gt;</a>
- {% else %}
- <span class="next">Next &gt;</span>
- {% endif %}
- </p>
-
- </div>
- {% endif %}
-
+ {% include "packages/search_paginator.html" %}
<form id="pkglist-results-form" method="post" action="/packages/update/">{% csrf_token %}
<table class="results">
@@ -120,29 +97,7 @@
{% endfor %}
</tbody>
</table>
-
- {% if paginator %}
- <div id="pkglist-stats-bottom">
-
- <p>{{paginator.count}} packages found. Page {{page_obj.number}} of {{paginator.num_pages}}.</p>
-
- <p class="pkglist-nav">
- {% if page_obj.has_previous %}
- <a class="prev" href="/packages/{{page_obj.previous_page_number}}/?{{current_query}}"
- title="Go to previous page">&lt; Prev</a>
- {% else %}
- <span class="prev">&lt; Prev</span>
- {% endif %}
- {% if page_obj.has_next %}
- <a class="next" href="/packages/{{page_obj.next_page_number}}/?{{current_query}}"
- title="Go to next page">Next &gt;</a>
- {% else %}
- <span class="next">Next &gt;</span>
- {% endif %}
- </p>
-
- </div>
- {% endif %}
+ {% include "packages/search_paginator.html" %}
{% if perms.main.change_package %}
<p><input title="Adopt selected packages" type="submit" id="adopt-btn"
diff --git a/templates/packages/search_paginator.html b/templates/packages/search_paginator.html
new file mode 100644
index 00000000..362b7cb3
--- /dev/null
+++ b/templates/packages/search_paginator.html
@@ -0,0 +1,27 @@
+<div class="pkglist-stats">
+ {% if is_paginated %}
+ <p>{{paginator.count}} packages found.
+ Page {{page_obj.number}} of {{paginator.num_pages}}.</p>
+
+ <div class="pkglist-nav">
+ <span class="prev">
+ {% if page_obj.has_previous %}
+ <a href="/packages/{{page_obj.previous_page_number}}/?{{current_query}}"
+ title="Go to previous page">&lt; Prev</a>
+ {% else %}
+ &lt; Prev
+ {% endif %}
+ </span>
+ <span class="next">
+ {% if page_obj.has_next %}
+ <a href="/packages/{{page_obj.next_page_number}}/?{{current_query}}"
+ title="Go to next page">Next &gt;</a>
+ {% else %}
+ Next &gt;
+ {% endif %}
+ </span>
+ </div>
+ {% else %}
+ <p>{{ package_list.count }} packages found.</p>
+ {% endif %}
+</div>
diff --git a/templates/public/index.html b/templates/public/index.html
index 444d2908..fa8bb8fb 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -9,7 +9,6 @@
{% block content_left %}
{% cache 62 main-page-left secure %}
<div id="intro" class="box">
-
<h2>A <em>libre</em> version of Arch Linux</h2>
<p>You've reached the website for <strong>Parabola GNU/Linux-libre</strong>,
@@ -28,11 +27,9 @@
<p class="readmore"><a href="{% url page-about %}"
title="Learn more about Parabola">Learn more...</a></p>
-
</div>
<div id="news">
-
<h3>
<a href="{% url news-list %}" title="Browse the news archives">Latest News</a>
<span class="arrow"></span>
@@ -48,7 +45,10 @@
title="View full article: {{ news.title }}">{{ news.title }}</a>
</h4>
<p class="timestamp">{{ news.postdate|date }}</p>
- <div class="article-content">{{ news.content|markdown|truncatewords_html:75 }}</div>
+ <div class="article-content">
+ {% if forloop.counter0 == 0 %}{{ news.content|markdown|truncatewords_html:300 }}
+ {% else %}{{ news.content|markdown|truncatewords_html:100 }}{% endif %}
+ </div>
{% else %}
{% if forloop.counter0 == 5 %}
<h3>
@@ -68,7 +68,6 @@
{% endif %}
{% endif %}
{% endfor %}
-
</div>
{% endcache %}
{% endblock %}
@@ -76,7 +75,6 @@
{% block content_right %}
{% cache 59 main-page-right secure %}
<div id="pkgsearch" class="widget">
-
<form id="pkgsearch-form" method="get" action="/packages/">
<fieldset>
<label for="pkgsearch-field">Package Search:</label>
@@ -87,7 +85,6 @@
</div>
<div id="pkg-updates" class="widget box">
-
<h3>Recent Updates <span class="more">(<a href="/packages/?sort=-last_update"
title="Browse all of the latest packages">more</a>)</span></h3>
@@ -108,7 +105,6 @@
</div>
<div id="nav-sidebar" class="widget">
-
<h4>Documentation</h4>
<ul>