#*
 * 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 "")
#ALtabheader($tabs "")
#ALspacebothheader()
#ALformheader('Blog' $jslink $portlet)
#ALtableheaderSimpleWide()
#ALtdcaption('グループ選択')
#ALtditemheader()
<select name="target_group_name" onChange="aipo.viewPage(this.options[this.selectedIndex].value, '$!portlet.ID')">
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","BlogGroupListScreen").addQueryData("target_group_name","all").addQueryData("target_user_id", "all"))">（グループ全体）</option>
#foreach( $record in $!result.MyGroupList )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","BlogGroupListScreen").addQueryData("target_group_name","$!{record.Name.toString()}").addQueryData("target_user_id", "all"))" #if($!result.TargetGroupName == $!record.Name.toString()) selected #set($groupName = $!record.Name) #end>$!record.AliasName</option>
#end
#if(($result.MyGroupList.size() > 0) && ($result.PostMap.size() > 0))
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","BlogGroupListScreen").addQueryData("target_group_name","all").addQueryData("target_user_id", "all"))" #if ($!result.CurrentFilter == $!record.Name.toString()) selected #end>----------</option>
#end
#foreach( $record in $!result.PostMap )
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","BlogGroupListScreen").addQueryData("target_group_name","$!{record.GroupName.toString()}").addQueryData("target_user_id", "all"))" #if($!result.TargetGroupName == $!record.GroupName.toString()) selected #set($groupName = $!record.GroupName) #end>$!record.PostName</option>
#end
</select>
#ALtditemfooter()
#ALtablefooter()
#if($result.List.size() == 0)
<div class="message">指定された条件に該当するユーザーはいません。</div>
#else
<table border="0" cellspacing="0" cellpadding="2"><tbody>
#set($col_count = 0)
#foreach ($record in $result.List)
#if(!$result.isMatch($result.LoginUid, ${record.UserId.Value}))
#if($col_count == 0)
<tr>
#end
<td valign="top">
<div class="userBlock">
#if($!{record.newlyCreateEntry()})
<div class="userPhoto" style="background-image: url('images/common/bg_photo2.gif')">
#else
<div class="userPhoto" style="background-image: url('images/common/bg_photo1.gif')">
#end
<a href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","BlogEntryListScreen").addQueryData('eventSubmit_doBlog_entry_list_user','1').addQueryData('view_uid',${record.UserId}).addQueryData('view_month', 'none'))', '$!portlet.ID');" >
#if($!{record.hasPhoto()})
<img src="$!utils.escapeXML($jslink.getTemplate("FileuploadFacePhotoScreen").addQueryData("uid", ${record.UserId}).addQueryData('width', '76').addQueryData('height', '76'))" alt="${record.AliasName}" border="0" style="vertical-align:middle" />
#else
<img src="images/common/nophoto.gif" alt="${record.AliasName}" width="76" height="76" border="0" />
#end
</a>
</div> 
<div class="userInfo"><div style="padding:1px;">${record.AliasName}</div></div> 
</div>
</td>
#if($col_count == 4)
</tr>
#set($col_count = 0)
#else
#set($col_count = $col_count + 1)
#end
#end
#end
#ALtablefooter()
#end
#ALformfooter()
#ALspacebothfooter()
#ALajaxtabfooter()
