#*
 * 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 ($indicator_id = "indicator-list-")
## ---------------------------------------------------------------------------
#if ($result.List.size() == 0)
<div class="message">受信した伝言メモは 0 件です</div>
#else
#ALajaxIndicator("${indicator_id}" "$!{portlet.ID}" "")
#ALajaxlistformheader("noteForm")
##<input type="hidden" name="mode" value="update" />
#if($!{result.NewNoteAllSum} > 0 || $!{result.UnreadReceivedNotesAllSum} > 0)<a href='$!utils.escapeXML($!jslink.getAction('controls.Maximize',$!portlet.getID()).addQueryData('mode','list').addQueryData('sort','note_stat').addQueryData('sorttype','asc'))'>#if($!{result.NewNoteAllSum} > 0) 新着：$!{result.NewNoteAllSum}件 #end #if($!{result.UnreadReceivedNotesAllSum} > 0) 未読：$!{result.UnreadReceivedNotesAllSum}件 #end</a> #end
#ALajaxpageview('NoteScreen' $result)
#ALtableheaderWide()
<tr>
#ALtdheadThin("#ALswitchCheckbox()")
#ALtdheadThin("#ALajaxsort('note_stat' '状態' $result 'NoteScreen')")
#ALtdheadW33("#ALajaxsort('client_name' '依頼者' $result 'NoteScreen')")
#ALtdheadW33("#ALajaxsort('subject_type' '用件' $result 'NoteScreen')")
#ALtdheadW33("#ALajaxsort('accept_date' '受付日時' $result 'NoteScreen')")
</tr>
#foreach ($record in $result.List)
<tr>
#ALtdcellAtt("<input name='check$!record.NoteId' type='checkbox' value='$!record.NoteId'/>" 'align="center"')
#if($record.NoteStat.toString() == "1" || $record.NoteStat.toString() == "2")
#ALtdcellAtt("<img src='$record.NoteStatImage' alt='$!record.NoteStatImageDescription'  title='$!record.NoteStatImageDescription'/>" 'align="center"')
#else
#ALtdcell(' ')
#end
#ALtdcellheader()
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","NoteDetailScreen").addQueryData("entityid",$!record.NoteId))', '$!portlet.ID', aipo.note.onLoadDetail);">$!record.ClientName</a>
#ALtdcellfooter()
#ALtdcell($!record.Subject)
#ALtdcell("$!{record.AcceptDate.Month}月$!{record.AcceptDate.Day}日 $!{record.AcceptDate.Hour}時$!{record.AcceptDate.Minute}分")
</tr>
#end
#ALtablefooter()
#ALbuttonheaderRight()
#ALajaxbuttonCheckboxAction('既読にする' "$!jslink.getPortletById($!portlet.ID).addQueryData('template','NoteFormJSONScreen').addQueryData('mode','update')" "$indicator_id" "$!portlet.ID" "aipo.note.onReceiveMessage")
#ALbuttonfooterRight()
#ALformfooter()
#end
