#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * Copyright (C) 2004-2010 Aimluck,Inc.
 * http://aipostyle.com/
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *#

## ---------------------------------------------------------------------------
#set ($newUrl1 = $!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData('template','BlogEntryFormScreen').addQueryData('entityid','new')))
#set ($newUrl2 = $!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","BlogThemaFormScreen").addQueryData("entityid","new")))
#set ($submenulist = [["記事を書く","javascript:aipo.common.showDialog('$newUrl1','$!portlet.ID',aipo.blog.onLoadBlogDialog);","images/icon/icon_add.gif"], ["テーマを追加する","javascript:aipo.common.showDialog('$newUrl2','$!portlet.ID',aipo.blog.onLoadBlogThemaDialog);","images/icon/icon_add.gif"]])
#set($tabs = [["最新記事一覧","",""]])
## ---------------------------------------------------------------------------
#ALsubmenubar($submenulist "")
#ALajaxtabheader($tabs "")
#ALspacebothheader()
#if($result.List.size() == 0)
<div class="message">指定された条件に該当するブログはありません。</div>
#else
#if($result.NewEntrysNum > 0)
<div class="message" style="margin-bottom:5px;"><a href="$!utils.escapeXML($!jslink.getAction('controls.Maximize',$!portlet.ID).addQueryData('mode','detail').addQueryData('entityid',$result.NewEntryId))" style="font-weight:bold;color:#DC0033;">${result.NewEntrysNum}件の日記に対して新着コメントがあります！</a></div>
#end
<h3>最近の写真</h3>
#if($result.PhotoList.size() == 0)
<div class="message" style="padding-left:12px;">写真は登録されていません</div>
#else
<div class="p clearfix">
<ul class="imageView">
#foreach ($record in $result.PhotoList)
<li>
<div class="image outer">
<table class="tableWrapper"> <tbody> <tr>
<td width="96" valign="middle" height="96" align="center"><a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","BlogDetailScreen").addQueryData("entityid",$record.EntryId))');"><img src="$!utils.escapeXML($jslink.getTemplate('BlogFileThumbnailScreen').addQueryData('ownerid', ${record.OwnerId}).addQueryData('entityid', ${record.EntryId}).addQueryData('attachmentIndex', ${record.FileId}))" alt=""  /></a></td>
</tr></tbody></table>
</div>
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","BlogDetailScreen").addQueryData("entityid",$record.EntryId))','$!portlet.ID',aipo.blog.onLoadBlogCommentDialog);">${record.EntryTitle}</a>
</li>
#end
</ul>
</div>
#end

#set($flag = true)
<h3>最新の記事</h3>
#if($result.List.size() == 0)
<div class="message" style="padding-left:12px;">記事は登録されていません</div>
#else
<div class="p">
#ALajaxpageview('BlogEntryListLatestScreen' $result)
</div>
<div class="p clearfix">
<table class="rowTable wide">
#foreach ($record in $result.List)
<tr #if($flag) class="even" #end>
<td width="20%" nowrap="nowrap">${record.TitleDate}</td>
<td width="1%" style="padding:1px 3px 1px 0px;"><img src="images/icon/icon_add.gif" width="16" height="16" /></td>
<td width="40%"><a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","BlogDetailScreen").addQueryData("entityid",$record.EntryId))');">${record.Title} #if($record.CommentsNum > 0)（$record.CommentsNum）#end</a>
</td>
<td style="padding:1px 0px 1px 5px;"><a href="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doBlog_entry_list_user','1').addQueryData('view_uid',${record.OwnerId}).addQueryData('view_month', 'none'))">${record.OwnerName}</a></td>
</tr>
#if($flag) #set($flag = false) #else #set($flag = true) #end
#end
</table>
</div>
<div class="p">
#ALajaxpageviewFooter('BlogEntryListLatestScreen' $result)
</div>
#end

#set($flag2 = true)
<h3>記事コメント記入履歴</h3>
#if($result.CommentHistoryList.size() == 0)
<div class="message" style="padding-top:2px;padding-left:12px;">コメントした記事はありません</div>
#else
<div class="p clearfix">
<table class="rowTable wide">
#foreach ($record2 in $result.CommentHistoryList)
<tr #if($flag2) class="even" #end>
<td width="20%" nowrap="nowrap">${record2.TitleDate}</td>
<td width="1%" style="padding:1px 3px 1px 0px;"><img src="images/icon/icon_add.gif" width="16" height="16" /></td>
<td width="40%"><a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","BlogDetailScreen").addQueryData("entityid",$record2.EntryId).addQueryData('view_uid',${record2.OwnerId}))','$!portlet.ID',aipo.blog.onLoadBlogCommentDialog);">${record2.Title} （${record2.CommentsNum}）</a></td>
<td style="padding:1px 0px 1px 5px;"><a href="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doBlog_entry_list_user','1').addQueryData('view_uid',${record2.OwnerId}).addQueryData('view_month', 'none'))">${record2.OwnerName}</a></td>
</tr>
#if($flag2) #set($flag2 = false) #else #set($flag2 = true) #end
#end
</table>
</div>
#end



#end
#ALspacebothfooter()
#ALajaxtabfooter()
