#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * Copyright (C) 2004-2011 Aimluck,Inc.
 * http://www.aipo.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/>.
 *#

## ---------------------------------------------------------------------------
#if ($!result.PostMap.size() == 0 && $!result.MyGroupList.size() == 0) 
<div class="message">部署または My グループに登録されたユーザーに送信します。</div>
<div class="message">部署または My グループが登録されていません。</div>
#else
#set($link = "$!jslink.getPortletById($!portlet.ID)")
#ALformheader('NoteGroup' $jslink $portlet)
#ALtableheaderSimpleWide()
#ALtdcaption('グループ')
#ALtditemheaderAtt("style='width: 80%;'")   
#ALselectpdheader("group" "99%" "aipo.viewPage(this.options[this.selectedIndex].value, '$!portlet.ID');aipo.portletReload('note','$!portlet.ID');")
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","NoteGroupScreen").addQueryData("filter","").addQueryData("filtertype","group"))">（選択してください）</option>
#foreach( $record in $!result.MyGroupList )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","NoteGroupScreen").addQueryData("filter",$!record.Name).addQueryData("filtertype","group"))" #if ($!result.CurrentFilter && $!result.CurrentFilter == $!record.Name.toString()) selected="selected" #end>$!record.AliasName</option>
#end
#if(($result.MyGroupList.size() > 0) && ($result.PostMap.size() > 0))
<option value="" disabled="disabled">----------</option>
#end
#foreach( $record in $!result.PostMap )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","NoteGroupScreen").addQueryData("filter",$!record.GroupName).addQueryData("filtertype","group"))" #if ($!result.CurrentFilter && $!result.CurrentFilter == $!record.GroupName.toString()) selected="selected" #end>$!record.PostName</option>
#end
#ALselectfooter()
#ALtditemfooter()
#ALtablefooter()
#if($result.List.size() == 0)
<div class="message">選択したグループには、$!result.UserAliasName 様以外のユーザーが登録されていません。</div>
#end
#if($!{result.NewNoteAllSum} && $!{result.NewNoteAllSum} > 0 && $!{result.UnreadReceivedNotesAllSum} && $!{result.UnreadReceivedNotesAllSum} > 0) <a href='$!jslink.getAction('controls.Maximize',$!portlet.getID()).addQueryData('mode','list').addQueryData('sort','note_stat').addQueryData('sorttype','asc')'>#if($!{result.NewNoteAllSum} && $!{result.NewNoteAllSum} > 0) 新着：$!{result.NewNoteAllSum}件 #end</a> #end 
#if($result.List.size() > 0)
#ALajaxpageview('NoteGroupScreen' $result)
#ALtableheaderWide()
<tr>
#ALtdhead("#ALajaxsort('src_user' '名前' $result 'NoteGroupScreen')")
#ALtdheadThin(' ')
</tr>
#foreach ($record in $result.List)
<tr>
#ALtdcell($!record.UserName)
#ALtdcellAtt("#ALajaxbuttonLinkCallback('メモ追加' $!jslink.getPortletById($!portlet.ID).addQueryData('template','NoteFormScreen').addQueryData('dest_user_id', $!record.userId) 'images/icon/icon_add.gif' $!portlet.ID 'aipo.note.onLoadNoteDialog')" 'nowrap="nowrap"')
</tr>
#end
#ALtablefooter()
#end
#ALformfooter()
#end
