#*
 * 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 ($baselink = "$!jslink.getPortletById($!portlet.ID).addQueryData('template','ManHourListScreen')")
#set ($tabs = [["工数集計", "",""]])
## ---------------------------------------------------------------------------
#ALajaxtabheader($tabs "")
#ALspacebothheader()
#ALajaxlistformheader('ManHour')
<div class="spaceBottom">
#ALtableheaderSimpleWide()
#ALtdcaption('絞込み条件')
#ALtditemheader()
<div class="spaceBoth">
<div class="clearfix">
<div style="padding-top:5px; width:80px;float:left;">ユーザー</div>
<select id="target_group_name" name="target_group_name" onchange="aipo.manhour.onChangeGroup('$baselink', '$!portlet.ID')">
<option value="all">（グループ全体）</option>
#foreach( $record in $!result.MyGroupList )
<option value="$!{record.Name.toString()}" #if($!result.TargetGroupName == $!record.Name.toString()) selected="selected" #end>$!record.AliasName</option>
#end
#if(($result.MyGroupList.size() > 0) && ($result.PostMap.size() > 0))
<option value="all" #if ($!result.CurrentFilter == $!record.Name.toString()) selected #end>----------</option>
#end
#foreach( $record in $!result.PostMap )
<option value="$!{record.GroupName.toString()}" #if($!result.TargetGroupName && $!result.TargetGroupName == $!record.GroupName.toString()) selected="selected" #end>$!record.PostName</option>
#end
</select>
<select id="target_user_id" name="target_user_id" onchange="aipo.manhour.onChangeUser('$baselink', '$!portlet.ID')">
<option value="all">（ユーザー全員）</option>
#foreach($record in $!result.Users)
<option value="$!record.UserId.toString()" #if($!result.TargetUserId && $!result.TargetUserId != "all" && $!result.TargetUserId == $!record.UserId.toString()) selected="selected" #end > $!record.AliasName</option>
#end
</select>
</div>

<div class="clearfix">
<div style="padding-top:5px; width:80px;float:left;">共有カテゴリ</div>
<select id="commoncategory" name="commoncategory" size="1" onchange="aipo.manhour.onChangeCategory('$baselink', '$!portlet.ID')" >
<option value="all">（全体）</option>
#foreach($record in $!result.CategoryList)
<option value="$!record.CategoryId" #if($!result.CategoryId && $!result.CategoryId != "all" && $!result.CategoryId == $!record.CategoryId) selected="selected" #end> $!record.CategoryName</option>
#end
</select>
</div>

<div class="clearfix">
<div style="padding-top:5px; width:80px;float:left;">日付</div>
<select id="view_date_year" name="view_date_year" size="1" onchange="aipo.manhour.onChangeDate('$baselink', '$!portlet.ID')" >
#set($end_year = 2010)
#foreach ( $num in [2006..$!{end_year}] )
<option value="$num" #if ($!result.ViewDate.Year == "$num") selected="selected" #end>$num年</option>
#end
</select>
<select id="view_date_month" name="view_date_month" size="1" onchange="aipo.manhour.onChangeDate('$baselink', '$!portlet.ID')" >
#foreach ( $num in [1..12] )
<option value="$num" #if ($!result.ViewDate.Month == "$num") selected="selected" #end>$num月</option>
#end
</select>
</div>
</div>
<div class="small spaceTop spaceBottom spaceLeft">共有カテゴリ「未分類」の予定は表示されません。</div>
#ALtditemfooter()
#ALtablefooter()
</div>
<div class="spaceBottom">
#ALtableheaderWide()
#ALtdcaption('工数合計（実績）')
#ALtditem("<strong>$!result.TotalManHourPast h</strong>")
#ALtdcaption('工数合計（予定）')
#ALtditem("<strong><span style='color:#aaaaaa'>$!result.TotalManHourPlan h</span></strong>")
#ALtablefooter()
</div>
#if($result.List.size() == 0)
<div class="message"></div>
#else
#ALajaxpageview('ManHourListScreen' $result)
#ALtableheaderWide()
<tr>
#ALtdheadW25("#ALajaxsort('user_name' 'ユーザー' $result 'ManHourListScreen')")
#ALtdheadW25("#ALajaxsort('category' '共有カテゴリ' $result 'ManHourListScreen')")
#ALtdheadW33("#ALajaxsort('schedule' '予定' $result 'ManHourListScreen')")
#ALtdheadThin("#ALajaxsort('time' '時間' $result 'ManHourListScreen')")
#ALtdheadThin("#ALajaxsort('manhour' '工数' $result 'ManHourListScreen')")
</tr>
#foreach ($record in $result.List)
#if(!$!record.Dummy)
<tr valign="top">
#ALtdcell("$!record.User")
#ALtdcell("$!record.CategoryName")
#ALtdcellheader()
$!record.Name
#if(! $!record.Public)
<img src="images/schedule/schedule_secret.gif" border="0" width="16" height="16" align="absmiddle" alt="非公開" title="非公開"/>
#end
#if($!record.Duplicate)
<img src="images/schedule/schedule_duplicate.gif" border="0" width="16" height="16" align="absmiddle" alt="重複スケジュール" title="重複スケジュール"/>
#end
#if($!record.Repeat)
<img src="images/schedule/schedule_repeat.gif" border="0" width="16" height="16" align="absmiddle" alt="繰り返し" title="繰り返し"/>
#end
#if($!record.Tmpreserve)
<img src="images/schedule/schedule_tmpreserve.gif" border="0" width="16" height="16" align="absmiddle" alt="仮スケジュール" title="仮スケジュール"/>
#end
#ALtdcellfooter()
#ALtdcellAtt("$!record.Date2" "nowrap='nowrap'")
#ALtdcellheaderAtt("nowrap='nowrap' align='right'")
<strong><span #if(!$!record.Past)style="color:#aaaaaa"#end>$!record.ManHour h</span></strong>
#ALtdcellfooter()
</tr>
#end
#end
#ALtablefooter()
#ALajaxpageviewFooter('ManHourListScreen' $result)
#end
<input type="hidden" id="commonUrl$!portlet.ID" name="commonUrl$!portlet.ID" value="$!jslink.getPortletById($!portlet.ID).addPathInfo('template','CommonCategoryLiteJSONScreen')" />
<input type="hidden" id="commonCategoryid$!portlet.ID" name="commonCategoryid$!portlet.ID" value="$!result.CategoryId.toString()" />
#ALformfooter()
#ALspacebothfooter()
#ALajaxtabfooter()
