]> git.ipfire.org Git - ipfire.org.git/commitdiff
www: Show latest entry from the planet on the index page.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 28 Jan 2011 11:29:02 +0000 (12:29 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 28 Jan 2011 11:29:02 +0000 (12:29 +0100)
www/templates/index.html
www/translations/de_DE.csv
www/webapp/handlers.py

index 025075bec616267589db69359594fda798c56c47..3b6d3ca323dba863c8ec124f7a4f3461bc133213 100644 (file)
                {{ modules.NewsItem(item) }}
        {% end %}
 
-       <h4>{{ _("Recent news") }}:</h4>
-       <ul class="news">
-       {% for item in recent_news %}
-               <li>{{ modules.NewsLine(item) }}</li>
+       <div class="line"></div>
+
+       {% for item in recent_planets %}
+               <strong>{{ _("Have you already seen?") }}</strong>
+               <a href="http://planet.ipfire.org/user/{{ item.author.uid }}">{{ item.author.cn }}</a>
+               {{ _("talks about") }}
+               <a href="http://planet.ipfire.org/post/{{ item.slug }}">{{ item.title }}</a>
+               {{ _("on the IPFire planet.") }}
        {% end %}
-       </ul>
 
+       <br class="clear" />
        <br class="clear" />
 
        <p class="right">
index 89f1133b8949d679e8a1ebeae9d3eb0dd00dfa40..348c3c3f91c1790b140d61638c8c237efb771560 100644 (file)
 "See a breakdown of the CPU cores that are installed on the IPFire systems.","Hier ist eine Übersicht über die Anzahl der CPU-Kerne, die in den IPFire-Systemen installiert sind."
 "CPU cores counter","CPU-Kerne"
 "All together, there are <strong>%s bogomips</strong> out there.","Insgesamt bringen es alle Systeme auf <strong>%s bogomips</strong>."
+"Have you already seen?","Schon gesehen?"
+"talks about","redet über"
+"on the IPFire planet.","auf dem IPFire planet."
index 2a9c7590314f9088fdc79bed3fd5643b7a7787d8..f88e383d1db77b65d195cbc186d62fda174465f7 100644 (file)
@@ -56,10 +56,10 @@ class IndexHandler(BaseHandler):
        def get(self):
                # Get a list of the most recent news items and put them on the page.            
                latest_news = self.news.get_latest(limit=1, locale=self.locale)
-               recent_news = self.news.get_latest(limit=3, locale=self.locale, offset=1)
+               recent_planets = self.planet.get_entries(limit=1)
 
                return self.render("index.html",
-                       latest_news=latest_news, recent_news=recent_news)
+                       latest_news=latest_news, recent_planets=recent_planets)
 
 
 class StaticHandler(BaseHandler):