Permalink
Browse files

List 5 events on homepage; move navigation / RSS feed links for event…

…s above "Upcoming Training"

List 5 events on homepage; move navigation / RSS feed links for events above "Upcoming Training"
To maintain the balance of the end columns, this patch also extends the list of
News articles and Planet postings to 7
  • Loading branch information...
1 parent ac0905a commit 3c543b357eec27c32f91aee06527e5270d98975e @jkatz jkatz committed Aug 21, 2013
Showing with 17 additions and 17 deletions.
  1. +3 −3 pgweb/core/views.py
  2. +14 −14 templates/index.html
View
6 pgweb/core/views.py
@@ -36,15 +36,15 @@
# Front page view
@cache(minutes=10)
def home(request):
- news = NewsArticle.objects.filter(approved=True)[:5]
- events = Event.objects.select_related('country').filter(approved=True, training=False, enddate__gte=date.today).order_by('enddate', 'startdate')[:3]
+ news = NewsArticle.objects.filter(approved=True)[:7]
+ events = Event.objects.select_related('country').filter(approved=True, training=False, enddate__gte=date.today).order_by('enddate', 'startdate')[:5]
try:
quote = Quote.objects.filter(approved=True).order_by('?')[0]
except:
# if there is no quote available, just ignore error
quote = None
versions = Version.objects.filter(supported=True)
- planet = ImportedRSSItem.objects.filter(feed__internalname="planet").order_by("-posttime")[:5]
+ planet = ImportedRSSItem.objects.filter(feed__internalname="planet").order_by("-posttime")[:7]
traininginfo = Event.objects.filter(approved=True, training=True).extra(where=("startdate <= (CURRENT_DATE + '6 Months'::interval) AND enddate >= CURRENT_DATE",)).aggregate(Count('id'), Count('country', distinct=True))
# can't figure out how to make django do this
View
28 templates/index.html
@@ -150,6 +150,20 @@ <h1 id="txtFrontFeatureHeading">
</p>
{% endfor %}
</div>
+ <div style="margin-bottom: 10px;">
+ <img class="pgArrowImage" src="/media/img/layout/blt_blu_arrow.png" width="6" height="5" alt="" />
+ <ul class="pgRSSBottomList">
+ <li>
+ <a href="/about/events/" title="More Events">More</a>
+ </li>
+ <li>
+ <a href="/account/events/new/">Submit Event</a>
+ </li>
+ <li class="last-child">
+ <a href="/events.rss" title="Events RSS Feed"><img class="pgRSSImage" src="/media/img/misc/ico_rss.png" width="28" height="13" alt="Events RSS Feed" /></a>
+ </li>
+ </ul>
+ </div>
<a href="/about/events/">
<img src="/media/img/hdr/hdr_upcomingtraining.png" width="140" height="10" alt="Upcoming training" />
</a>
@@ -170,20 +184,6 @@ <h1 id="txtFrontFeatureHeading">
There are no training events currently scheduled.
{%endif%}
</div>
- <div>
- <img class="pgArrowImage" src="/media/img/layout/blt_blu_arrow.png" width="6" height="5" alt="" />
- <ul class="pgRSSBottomList">
- <li>
- <a href="/about/events/" title="More Events">More</a>
- </li>
- <li>
- <a href="/account/events/new/">Submit Event</a>
- </li>
- <li class="last-child">
- <a href="/events.rss" title="Events RSS Feed"><img class="pgRSSImage" src="/media/img/misc/ico_rss.png" width="28" height="13" alt="Events RSS Feed" /></a>
- </li>
- </ul>
- </div>
</div> <!-- pgNewsEventsWrap -->
</div> <!-- pgFrontEvent -->
</div> <!-- pgFrontBottomContainer -->

0 comments on commit 3c543b3

Please sign in to comment.