[pLog-svn] r1780 - plog/branches/plog-1.0.1/templates/summary
jondaley at devel.plogworld.net
jondaley at devel.plogworld.net
Thu Apr 7 22:39:22 GMT 2005
Author: jondaley
Date: 2005-04-07 22:39:21 +0000 (Thu, 07 Apr 2005)
New Revision: 1780
Modified:
plog/branches/plog-1.0.1/templates/summary/index.template
Log:
xhtml compliance. don't make <ul> if there aren't any <li>. Also don't show RSS feeds, since they are broken, if there isn't any data.
Modified: plog/branches/plog-1.0.1/templates/summary/index.template
===================================================================
--- plog/branches/plog-1.0.1/templates/summary/index.template 2005-04-07 22:38:40 UTC (rev 1779)
+++ plog/branches/plog-1.0.1/templates/summary/index.template 2005-04-07 22:39:21 UTC (rev 1780)
@@ -40,7 +40,7 @@
</div>
<div id="column-right">
- <form id="loginForm" method="post">
+ <form id="searchForm" method="post" action=".">
<fieldset class="inputField">
<h4>{$locale->tr("summary_search_blogs")}</h4>
<div class="field">
@@ -60,29 +60,46 @@
</ul>
<h4>{$locale->tr("summary_most_commented_articles")}
- <a href="{$url->getRssUrl()}?summary=1&type=mostcommented"><img src="{$url->getUrl("/imgs/rss_logo_small.gif")}" alt="RSS" /></a>
+ {if $commentedPosts}
+ <a href="{$url->getRssUrl()}?summary=1&type=mostcommented">
+ <img src="{$url->getUrl("/imgs/rss_logo_small.gif")}"
+ alt="RSS" /></a>
+ {/if}
+
</h4>
- <ul class="itemList">
- {foreach from=$commentedPosts item=post}
+ {foreach name=commented from=$commentedPosts item=post}
+ {if $smarty.foreach.commented.first}
+ <ul class="itemList">
+ {/if}
{assign var="blog" value=$post->getBlogInfo()}
{assign var="url" value=$blog->getBlogRequestGenerator()}
<li class="item">
<a href="{$url->postPermalink($post)}">{$post->getTopic()|strip_tags}</a> ({$post->getTotalComments()})<br />
</li>
+ {if $smarty.foreach.commented.last}
+ </ul>
+ {/if}
{/foreach}
- </ul>
<h4>{$locale->tr("summary_most_read_articles")}
- <a href="{$url->getRssUrl()}?summary=1&type=mostread"><img src="{$url->getUrl("/imgs/rss_logo_small.gif")}" alt="RSS" /></a>
- </h4>
- <ul class="itemList">
- {foreach from=$readestBlogs item=post}
+ {if $readestBlogs}
+ <a href="{$url->getRssUrl()}?summary=1&type=mostread">
+ <img src="{$url->getUrl("/imgs/rss_logo_small.gif")}"
+ alt="RSS" /></a>
+ {/if}
+ </h4>
+ {foreach name=readest from=$readestBlogs item=post}
+ {if $smarty.foreach.readest.first}
+ <ul class="itemList">
+ {/if}
{assign var="blog" value=$post->getBlogInfo()}
{assign var="url" value=$blog->getBlogRequestGenerator()}
<li class="item">
<a href="{$url->postPermalink($post)}">{$post->getTopic()|strip_tags}</a> ({$post->getNumReads()})<br />
</li>
+ {if $smarty.foreach.readest.last}
+ </ul>
+ {/if}
{/foreach}
- </ul>
</div>
{include file="summary/footer.template"}
More information about the pLog-svn
mailing list