#*
 * Aipo is a groupware program developed by Aimluck,Inc.
 * Copyright (C) 2004-2008 Aimluck,Inc.
 * http://aipostyle.com/
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU 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 General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *#
## ---------------------------------------------------------------------------
#set ($tabs = [["共有ファイル", "", ""]])
## ---------------------------------------------------------------------------
#ALajaxtabheader($tabs "")
#ALspacebothheader()
#if($!result.isSearch())
<table cellSpacing=0 cellPadding=0 width="100%" border=0><tr>
<td class="item" align="left"><div style="padding:0px 0px 2px 0px;font-size:10pt;font-weight:bold;color:#5D6A70;">検索結果</div></td>
<td class="item" align="right"><a href="$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doJob_list', '1')">[一覧へ戻る]</a>
</td></tr></table>
#end
<table width="100%" border="0" cellspacing="0" cellpadding="0"> 
<tr>
<td width="150px" valign="top">
<div  class="explorer_box" style="padding:2px 2px 2px 5px;width:150pt;overflow:scroll;">
#foreach($record in $!result.FolderHierarchyList)
#if($record.visible())
#if($record.HierarchyIndex <= 0)
<nobr>#if($record.isOpened()) <img src="images/cabinet/folder_open.gif"> #else <img src="images/cabinet/folder_close.gif"> #end #if($result.SelectedFolderInfo.FolderId == $record.FolderId) <b>${record.FolderName}</b> #else 
<a href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","CabinetListScreen").addQueryData('eventSubmit_doCabinet_list','1').addQueryData('folder_id' ,"$record.FolderId"))', '$!portlet.ID');" >${record.FolderName}</a>
#end</nobr><br>
#else
#set($imgwidth = 16 * $record.HierarchyIndex)
<nobr><img src="images/blank.gif" height="10" width="$imgwidth">#if($record.isOpened())  <img src="images/cabinet/folder_open.gif"> #else <img src="images/cabinet/folder_close.gif"> #end #if($result.SelectedFolderInfo.FolderId == $record.FolderId) <b>${record.FolderName}</b> #else 
<a href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","CabinetListScreen").addQueryData('eventSubmit_doCabinet_list','1').addQueryData('folder_id' ,"$record.FolderId"))', '$!portlet.ID');" >${record.FolderName}</a>
#end</nobr><br>
#end
#end
#end
</div>
</td>
<td valign="top" style="padding:0px 0px 0px 5px">
<h4>
検索結果（ファイル一覧）
<div style="text-align:right;"><a href="javascript:void(0);" onclick="aipo.viewPage('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","CabinetListScreen").addQueryData('eventSubmit_doCabinet_list','1'))', '$!portlet.ID');" >[一覧へ戻る]</a></div>
</h4>
<form name="cabinetlist$!portlet.ID" id="cabinetlist$!portlet.ID" action="#" method="post" onsubmit="aipo.cabinet.onSubmitSerchButton(this,'$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData('template','CabinetFileSearchListScreen'))','$!portlet.ID'); return false;">
<input type="hidden" name="_name" value="ファイル" />
#ALtableheaderSimpleWide()
#ALtdcaption('検索')
#ALtditemheader()
#ALtextfield('sword' "$!result.SearchWord" "120px" 100 'active')
#ALsubmitJS('submit' ' 検索する ' 'setHiddenValue(this)')
<span class="middle">（タイトル・ファイル名・メモで検索します）</span>
#ALtditemfooter()
#ALtablefooter()
#if($result.List.size() == 0)
<div class="message">指定された条件に該当するファイルはありません。</div>
#else
#ALajaxpageview('CabinetListScreen' $result)
#ALtableheader("100%")
<tr>
#ALtdheadThin("#ALswitchCheckbox()")
#ALtdheadW33("#ALajaxsort('file_title' 'タイトル' $result 'CabinetFileSearchListScreen')")
#ALtdheadW33("#ALajaxsort('file_name' 'ファイル名' $result 'CabinetFileSearchListScreen')")
##ALtdheadThin("#ALajaxsort('update_user' '更新者' $result 'CabinetListScreen')")
#ALtdheadW25("#ALajaxsort('update_date' '更新日時' $result 'CabinetFileSearchListScreen')")
#ALtdheadThin("#ALajaxsort('file_size' 'サイズ（KB）' $result 'CabinetFileSearchListScreen')")
#ALtdheadW33("#ALajaxsort('folder_name' 'フォルダ名'  $result 'CabinetFileSearchListScreen')")
#ALtdheadThin(' ')
</tr>
#foreach ($record in $result.List)
<tr>
#ALtdcellAtt("<input name='check$!record.FileId' type='checkbox' value='$!record.FileId'/>" 'align="center"')
#ALtdcellheader()
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","CabinetFileDetailScreen").addQueryData("entityid",$record.FileId))');">$!record.FileTitle</a>
#ALtdcellfooter()
#ALtdcellheader()
<a href="$jslink.getTemplate("CabinetFileRawScreen").addQueryData("entityid", ${record.FileId})">$record.FileName</a>
#ALtdcellfooter()
#ALtdcell($record.UpdateDate)
<td class="item" align="right">$record.FileSize</td>
#ALtdcellheader()
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","CabinetFolderDetailScreen").addQueryData("mode","folder_detail").addQueryData("folder_id","${record.FolderId}"))');">${record.FolderName}</a>
#ALtdcellfooter()
<td class="item" nowrap="nowrap">#ALajaxbuttonLink('編集' $!jslink.getPortletById($!portlet.ID).addQueryData('template','CabinetFileFormScreen').addQueryData('entityid', ${record.FileId}) 'images/icon/icon_edit.gif')</td>
</tr>
#end
#ALtablefooter()
#ALbuttonheaderRight()
選択した ファイル を #ALajaxbuttonCheckboxDelete('削除する' "$!jslink.getPortletById($!portlet.ID).addQueryData('template','CabinetFileFormJSONScreen').addQueryData('mode','multi_delete')" "$!portlet.ID" "aipo.cabinet.onReceiveMessage")
#ALbuttonfooterRight()
#ALajaxpageviewFooter('CabinetListScreen' $result)
#ALformfooter()
#end
</td></tr></table>
#ALspacebothfooter()
#ALajaxtabfooter()
