#*
 * 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/>.
 *#

## ---------------------------------------------------------------------------
<form name="addressbook$!portlet.ID" id="addressbook$!portlet.ID" action="#" method="post" onsubmit="aipo.addressbook.onSubmitSerchButton(this,'$!jslink.getPortletById($!portlet.ID).addQueryData('template','AddressBookScreen')','$!portlet.ID',''); return false;">
<table>
<tbody>
<tr>
#ALtdcellheader()
#ALtextfield('sword' "$!result.SearchWord" '120px' 100 'active')
#ALsubmit('submit' ' 検 索 ')
#ALtdcellfooter()
</tr>
<tr>
#ALtdcellheaderAtt('colspan="2"')
<input name="tab" type="radio" value="syagai" id="$!{portlet.ID}syagai" #if(!($address_type=="corp_address" || $!{result.CurrentTab}=="corp")) checked="checked" #end />
<label for="$!{portlet.ID}syagai">社外アドレス</label>
<input name="tab" type="radio" value="corp" id="$!{portlet.ID}corp" #if($address_type=="corp_address" || $!{result.CurrentTab}=="corp") checked="checked" #end />
<label for="$!{portlet.ID}corp">社内アドレス</label>
#ALtdcellfooter()
</tr>
</tbody></table>
<input name="mode" type="hidden" value="ajaxsearch" />
#if($!result.CurrentTab)
#if($result.List.size() == 0)
指定された条件に該当するアドレスはありません。<br />
#else
#ALajaxpageview('AddressBookScreen' $result)
#ALtableheaderWide()
<tr>
#ALtdhead("名前")
#ALtdhead("会社名")
#ALtdhead("メールアドレス")
</tr>
#foreach ($record in $result.List)
<tr>
#ALtdcellheader()
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","AddressBookDetailScreen").addQueryData("entityid",$record.AddressId).addQueryData("tab","$!result.currentTab"))');">$result.getStringCR($!record.Name)</a>
#if($!record.PublicFlag.toString() == 'F')
<img src="images/addressbook/addressbook_secret.gif" border="0" width="16" height="16" align="absmiddle" alt="非公開" title="非公開" />
#end
#ALtdcellfooter()
#ALtdcell($result.getStringCR($!record.CompanyName))
#ALtdcell("<a href='mailto:$!record.Email'>$result.getStringCR($!record.Email)</a>")
</tr>
#end
#ALtablefooter()
#end
#end
</form>
