#*
 * 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 ($title = "別のユーザーを選択")
#set($link = "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectmember','1')")
#set($linklist = [["グループの選択へ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_form_selectgroup','1')"],["自分のスケジュールへ", "$!jslink.getPortletById($!portlet.ID).addQueryData('eventSubmit_doSchedule_menu','1')"]])
#ALcell_pagetitle_iphone($career $title)
#ALcell_linklist_iphone($career $linklist)
#ALcell_contents_header($career)

#ALcell_formheader($career $jslink $portlet)
<h3>参照ユーザー選択</h3>
<script type="text/javascript">

function formSubmit(value) {
  var form = document.forms[0];
  form.selectedmember.value = value;
  form.submit();
}

</script>
<input name="eventSubmit_doSchedule_menu_select_member" type="hidden" value="1"/>
<input name="selectedmember" type="hidden" value=""/>
#set($memberlist = $!result.getUsers())
<input type="hidden" name="selectedgroup" value="$!{result.SelectedGroup}">
#set($usercount = 1)

#if($memberlist.size() == 0)
所属するユーザーがいません。
#else

#if($result.PagesNum > 1)
#set($pages = $result.PagesNum)
#set($currentPage = $result.CurrentPage)
#set($rowsNum = $result.RowsNum)
#if ($pages > 1)
#ALcell_pageview($career $link $result)
#end
#end

#ALcell_radius_header($career)
#foreach($record in $memberlist)
#ALcell_li_header($career)
#if ( ! ($!result.LoginUser.Name.toString() == $!record.Name.toString()) )
<a href="javascript:void(0);" onclick="formSubmit('$!{record.UserId}');return false;">$!record.AliasName</a>
#end
#ALcell_li_footer($career)
#end
#ALcell_radius_footer($career)

#if($result.PagesNum > 1)
#set($pages = $result.PagesNum)
#set($currentPage = $result.CurrentPage)
#set($rowsNum = $result.RowsNum)
#if ($pages > 1)
#ALcell_pageview($career $link $result)
#end
#end

#end

#ALcell_formfooter()
#ALcell_contents_footer($career)
#ALcell_linklist_iphone($career $linklist)