fixed loglist image display if first and sixth log have an image;

better alignment of images to log lines;
fixes #215
This commit is contained in:
following
2013-06-05 12:10:29 +02:00
parent 4ba77df562
commit 91d98f7e81
2 changed files with 11 additions and 3 deletions

View File

@ -81,20 +81,28 @@
LIMIT 1", $rLog['id']);
if ($rPic = sql_fetch_assoc($rsPic))
{
if (count($newLogs))
if (count($newLogs) >= 2)
{
$newLogs[count($newLogs)-2]['pic_uuid'] = $rPic['uuid'];
$newLogs[count($newLogs)-2]['pic_url'] = $rPic['url'];
$newLogs[count($newLogs)-2]['title'] = $rPic['title'];
$pics = $lines_per_pic;
}
else if (count($newLogs) == 1)
{
$newLogs[count($newLogs)-1]['pic_uuid'] = $rPic['uuid'];
$newLogs[count($newLogs)-1]['pic_url'] = $rPic['url'];
$newLogs[count($newLogs)-1]['title'] = $rPic['title'];
$pics = $lines_per_pic+1;
}
else
{
$rLog['pic_uuid'] = $rPic['uuid'];
$rLog['pic_url'] = $rPic['url'];
$rLog['title'] = $rPic['title'];
$pics = $lines_per_pic+2;
}
$rLog['picshown'] = true;
$pics = $lines_per_pic;
}
sql_free_result($rsPic);
}

View File

@ -9,7 +9,7 @@
{t}Latest logs entries{/t} {if $rest}{t}Without Germany{/t}{/if}
</div>
<table width="100%" class="table">
<table width="100%" class="table">
{assign var='lastCountry' value=''}
{foreach name=newLogs from=$newLogs item=newLog}