#*
 * 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 ($tabs = [["共有カテゴリ一覧", "",""]])
#set ($indicator_id = "indicator-list-")
## ---------------------------------------------------------------------------
#ALajaxtabheader($tabs "")
#ALspacebothheader()
#if($result.List.size() <= 0)
<div class="message">『共有カテゴリ追加』 ボタンを押して、追加してください。 </div>
#else
#ALajaxIndicator("$indicator_id" "$!portlet.ID" "")
<div id="messageDiv"></div>
#ALformheader('共有カテゴリ' $jslink $portlet)
#ALajaxpageview('ManHourCategoryListScreen' $result)
#ALtableheaderWide()
<tr>
#ALtdheadThin("#ALswitchCheckbox()")
#ALtdheadWide("#ALajaxsort('name' '共有カテゴリ名' $result 'ManHourCategoryListScreen')")
#ALtdheadThin(' ')
</tr>
#foreach ($record in $result.List)
<tr>
#if($!result.isMatch($!{result.UserId} , $!{record.CreateUserId.Value}) || $!result.AuthorityDelete)
#ALtdcellAtt("<input name='check$!record.CommonCategoryId' type='checkbox' value='$!record.CommonCategoryId'/>" 'align="center"')
#else
#ALtdcellAtt("<input type='checkbox' disabled='disabled'/>" 'align="center"')
#end
#ALtdcellheader()
#if($!result.isMatch($!{result.UserId} , $!{record.CreateUserId.Value}) || $!result.AuthorityDetail)
<a href="javascript:void(0);" onclick="aipo.common.showDialog('$!utils.escapeXML($!jslink.getPortletById($!portlet.ID).addQueryData("template","ManHourCategoryDetailScreen").addQueryData("entityid",$record.CommonCategoryId))');">$!record.Name</a>
#else
$!record.Name	
#end
#ALtdcellfooter()
#if($!result.isMatch($!{result.UserId} , $!{record.CreateUserId.Value}) || $!result.AuthorityEdit)
#ALtdcellAtt("#ALajaxbuttonLinkCallback('編集' $!jslink.getPortletById($!portlet.ID).addQueryData('template','ManHourCategoryFormScreen').addQueryData('entityid', $!record.CommonCategoryId) 'images/icon/icon_edit.gif' $!portlet.ID 'aipo.manhour.onLoadManhourDialog')" 'nowrap=nowrap')
#else
#ALtdcell('')
#end
</tr>
#end
#ALtablefooter()
#ALbuttonheaderRight()
選択したカテゴリを #ALajaxbuttonCheckboxDelete('削除する' "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ManHourCategoryFormJSONScreen').addQueryData('mode','multi_delete')" "$indicator_id" "$!portlet.ID" "aipo.manhour.onReceiveMessage")
#ALbuttonfooterRight()
#ALajaxpageviewFooter('ManHourCategoryListScreen' $result)
#ALformfooter()
#end
#ALspacebothfooter()
#ALtabfooter()
