최근 게시물 위젯 오류 수정

git-svn-id: http://xe-core.googlecode.com/svn/trunk@2195 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-08-05 08:19:06 +00:00
parent 98cbcdaa59
commit 8427e381c8
5 changed files with 19 additions and 7 deletions

View file

@ -3,4 +3,4 @@ h3 { margin:0 10px 0 10px; }
.widget_list { margin:10px; }
.widget_list a { margin-bottom:10px; }
.editor_box { margin:0 10px 10px 10px; }
.button_box { margin:0 10px 10px 10px; text-align:right;}
.button_box { float:right; overflow:hidden; }

View file

@ -27,6 +27,7 @@
<span class="button"><input type="submit" value="{$lang->cmd_save}" accesskey="s" /></span>
<span class="button"><input type="button" value="{$lang->cmd_close}" onclick="window.close(); return false;" /></span>
</div>
<div class="clear"></div>
<div class="editor_box">{$editor}</div>
@ -35,5 +36,6 @@
<span class="button"><input type="submit" value="{$lang->cmd_save}" accesskey="s" /></span>
<span class="button"><input type="button" value="{$lang->cmd_close}" onclick="window.close(); return false;" /></span>
</div>
<div class="clear"></div>
</form>

View file

@ -71,15 +71,21 @@
}
}
if(!count($document_srl_list)) return;
$oDocumentModel = &getModel('document');
$documents_output = $oDocumentModel->getDocuments($document_srl_list);
if(!count($documents_output)) return;
if(count($document_srl_list)) {
$documents_output = $oDocumentModel->getDocuments($document_srl_list);
if(!count($documents_output)) return;
foreach($documents_output as $key => $val) {
$document_list[] = $val;
}
foreach($documents_output as $key => $val) {
$document_list[] = $val;
}
$document_count = count($document_list);
$total_count = $widget_info->rows_list_count * $widget_info->cols_list_count;
for($i=$document_count;$i<$total_count;$i++) $document_list[] = new DocumentItem();
$widget_info->document_list = $document_list;

View file

@ -22,6 +22,7 @@
<!--@for($j=0;$j<$widget_info->cols_list_count;$j++)-->
{@ $oDocument = $widget_info->document_list[$i*$widget_info->cols_list_count + $j]}
<td <!--@if($widget_info->rows_list_count>1)-->class="bottomBorder"<!--@end-->>
<!--@if($oDocument->document_srl)-->
<div class="thumbnail"><a href="{getUrl('','document_srl',$oDocument->document_srl)}"><img src="{$oDocument->getThumbnail($widget_info->thumbnail_width)}" width="{$widget_info->thumbnail_width}" height="{$widget_info->thumbnail_width}" border="0" alt="" class="thumbnail" /></a></div>
<div>
@ -53,6 +54,7 @@
<!--@end-->
</div>
<!--@end-->
<!--@end-->
</td>
<!--@end-->

View file

@ -18,6 +18,7 @@
<!--@for($j=0;$j<$widget_info->cols_list_count;$j++)-->
{@ $oDocument = $widget_info->document_list[$i*$widget_info->cols_list_count + $j]}
<td <!--@if($widget_info->rows_list_count>1)-->class="bottomBorder"<!--@end-->>
<!--@if($oDocument->document_srl)-->
<div class="thumbnail"><a href="{getUrl('','document_srl',$oDocument->document_srl)}"><img src="{$oDocument->getThumbnail($widget_info->thumbnail_width)}" width="{$widget_info->thumbnail_width}" height="{$widget_info->thumbnail_width}" border="0" alt="" class="thumbnail" /></a></div>
<div>
@ -49,6 +50,7 @@
<!--@end-->
</div>
<!--@end-->
<!--@end-->
</td>
<!--@end-->