Refactored the daily column generation (only one loop)
This commit is contained in:
parent
60b83e7cf7
commit
cae64e52e4
2 changed files with 32 additions and 40 deletions
|
@ -1173,10 +1173,7 @@ function showDaily()
|
||||||
$PAGE = new pageBuilder;
|
$PAGE = new pageBuilder;
|
||||||
$PAGE->assign('linksToDisplay',$linksToDisplay);
|
$PAGE->assign('linksToDisplay',$linksToDisplay);
|
||||||
$PAGE->assign('linkcount',count($LINKSDB));
|
$PAGE->assign('linkcount',count($LINKSDB));
|
||||||
$PAGE->assign('col1',$columns[0]);
|
$PAGE->assign('cols', $columns);
|
||||||
$PAGE->assign('col1',$columns[0]);
|
|
||||||
$PAGE->assign('col2',$columns[1]);
|
|
||||||
$PAGE->assign('col3',$columns[2]);
|
|
||||||
$PAGE->assign('day',utf8_encode(strftime('%A %d, %B %Y',linkdate2timestamp($day.'_000000'))));
|
$PAGE->assign('day',utf8_encode(strftime('%A %d, %B %Y',linkdate2timestamp($day.'_000000'))));
|
||||||
$PAGE->assign('previousday',$previousday);
|
$PAGE->assign('previousday',$previousday);
|
||||||
$PAGE->assign('nextday',$nextday);
|
$PAGE->assign('nextday',$nextday);
|
||||||
|
|
|
@ -17,41 +17,36 @@
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
|
||||||
{if="$linksToDisplay"}
|
{if="$linksToDisplay"}
|
||||||
<div id="daily_col1">
|
{loop="cols"}
|
||||||
{loop="col1"}
|
{if="isset($value[0])"}
|
||||||
|
<div id="daily_col{$counter+1}">
|
||||||
|
{loop="value"}
|
||||||
|
{$link=$value}
|
||||||
<div class="dailyEntry">
|
<div class="dailyEntry">
|
||||||
<div class="dailyEntryPermalink"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
|
<div class="dailyEntryPermalink">
|
||||||
{if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
|
<a href="?{$link.linkdate|smallHash}">
|
||||||
<div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
|
<img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink">
|
||||||
{if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
|
</a>
|
||||||
<div class="dailyEntryDescription">{$value.formatedDescription}</div>
|
</div>
|
||||||
|
{if="$link.tags"}
|
||||||
|
<div class="dailyEntryTags">
|
||||||
|
{loop="link.taglist"}
|
||||||
|
{$value|htmlspecialchars} -
|
||||||
|
{/loop}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
<div class="dailyEntryTitle">
|
||||||
|
<a href="{$link.url}">{$link.title|htmlspecialchars}</a>
|
||||||
|
</div>
|
||||||
|
{if="$link.thumbnail"}
|
||||||
|
<div class="dailyEntryThumbnail">{$link.thumbnail}</div>
|
||||||
|
{/if}
|
||||||
|
<div class="dailyEntryDescription">{$link.formatedDescription}</div>
|
||||||
</div>
|
</div>
|
||||||
{/loop}
|
{/loop}
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
<div id="daily_col2">
|
|
||||||
{loop="col2"}
|
|
||||||
<div class="dailyEntry">
|
|
||||||
<div class="dailyEntryPermalink"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
|
|
||||||
{if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
|
|
||||||
<div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
|
|
||||||
{if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
|
|
||||||
<div class="dailyEntryDescription">{$value.formatedDescription}</div>
|
|
||||||
</div>
|
|
||||||
{/loop}
|
{/loop}
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="daily_col3">
|
|
||||||
{loop="col3"}
|
|
||||||
<div class="dailyEntry">
|
|
||||||
<div class="dailyEntryPermalink"><a href="?{$value.linkdate|smallHash}"><img src="../images/squiggle2.png" width="25" height="26" title="permalink" alt="permalink"></a></div>
|
|
||||||
{if="$value.tags"}<div class="dailyEntryTags">{loop="value.taglist"}{$value|htmlspecialchars} - {/loop}</div>{/if}
|
|
||||||
<div class="dailyEntryTitle"><a href="{$value.url}">{$value.title|htmlspecialchars}</a></div>
|
|
||||||
{if="$value.thumbnail"}<div class="dailyEntryThumbnail">{$value.thumbnail}</div>{/if}
|
|
||||||
<div class="dailyEntryDescription">{$value.formatedDescription}</div>
|
|
||||||
</div>
|
|
||||||
{/loop}
|
|
||||||
</div>
|
|
||||||
{else}
|
{else}
|
||||||
<div class="dailyNoEntry">No articles on this day.</div>
|
<div class="dailyNoEntry">No articles on this day.</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in a new issue