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

## ---------------------------------------------------------------------------
#set($link = "$!jslink.getPortletById($!portlet.ID)")
#set($flag = true)
#ALtableheaderSimpleWide()
#ALtdcaption('フォルダ')
#ALtditemheaderAtt("style='width: 80%;'")
#ALselectpdheader("folder_id" "99%" "aipo.viewPage(this.options[this.selectedIndex].value, '$!portlet.ID')")
#foreach($record in $!result.FolderHierarchyList)
#if($record.isAuthorizedVisible())
#set($space = '')
#if(${record.HierarchyIndex} > 0)
#foreach($index in [1..${record.HierarchyIndex}])
#set($space = "${space}&nbsp;&nbsp;&nbsp;")
#end
#end
<option value="$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","CabinetScreen").addQueryData("folder_id",$!record.FolderId))" #if($!result.isMatch(${record.FolderId}, $!result.SelectedFolderInfo.FolderId.longValue())) selected="selected" #end>${space}${record.FolderName}</option>
#end
#end
#ALselectfooter()
#ALtditemfooter()
#ALtablefooter()

#if ($result.List.size() == 0)
<div class="message">指定したフォルダにファイルはありません。</div>
#else
<div class="p">
#ALajaxpageview('CabinetScreen' $result)
</div>
<div class="p clearfix">
<table class="rowTable wide">
#foreach ($record in $result.List)
<tr #if($flag) class="even" #end>
<td width="20%" nowrap="nowrap">$!{record.UpdateDate}</td>
<td width="40%">
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","CabinetFileDetailScreen").addQueryData("entityid",$record.FileId).addQueryData("folder_id",$result.SelectedFolderInfo.FolderId))');">$!record.FileTitle</a>
</td>
<td width="30%" style="padding:1px 0px 1px 5px;">
<a href="$jslink.getTemplate("CabinetFileRawScreen").addQueryData("entityid", ${record.FileId})">$record.WbrFileName （$!{record.FileSize}KB）</a>
</td>
<td width="10%" style="padding:1px 0px 1px 5px; white-space:nowrap;">$!{record.UpdateUser}</td>
</tr>
#if($flag) #set($flag = false) #else #set($flag = true) #end
#end
</table>
</div>
#end
