##<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
##<html xmlns="http://www.w3.org/1999/xhtml">
##<head>
##	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
##	<title>WorkStyle</title>
##	<link type="text/css" rel="stylesheet" href="resources/skin/default/basic.css"/>
##	<script src="resources/prototype.js" language="JavaScript"></script>
##	<script src="resources/jkl-parsexml.js" language="JavaScript"></script>
##	<script src="resources/script.js" language="JavaScript"></script>
##	<script src="resources/local.js" language="JavaScript"></script>
##	<script src="resources/AjaxPages.js" language="JavaScript"></script>
##</head>
##<body class="yellow" onload="init()">
##<p id="header"><a href="TaskList.html"><img src="resources/skin/default/image/logo.png" alt="WorkStyle" /></a></p>
##
##<ul class="nav">
##	<li><a href="TaskList.html">タスク一覧</a></li>
##	<li><a href="TaskList.html">タグ管理</a></li>
##</ul>
##
##<h1 id="pageTitle">Tag List</h1>
##
##<div id="content"> 
##<div id="content-body"> 

#set ($page_title = 'Tag Type List')
#set ($init_js = 'init();')

<script src="$link.contextPath/resources/TagTypeList.js" language="JavaScript"></script>
	<div id="menu"> 
		<h2>Menu</h2>
		<ul>
			<li><a href="$link.setAction('/tag/list')"><img src="$link.contextPath/resources/skin/default/image/icon/TagType.png"/>タグを編集する</a></li>
		</ul>
	</div>
	<div id="main"> 
	<form class="listTableForm" onsubmit="return editTagType();">
	<input id="tagTypeId" name="tagTypeId" type="hidden" value=""/>
		<table id="tagTypeList" class="list">
		<tr> 
			<th nowrap="nowrap">&nbsp;</th>
			<th nowrap="nowrap">&nbsp;</th>
			<th nowrap="nowrap">タグ種別</th>
			<th nowrap="nowrap">表示順</th>
			<th nowrap="nowrap">色</th>
		</tr>
#foreach( $_type in $tagTypeList )
		<tr id="tagType${_type.tagTypeId}"> 
			<td class="icon"><a class="deleteAction" href="javascript:deleteTagType(${_type.tagTypeId},'tagType${_type.tagTypeId}');"><img src="$link.contextPath/resources/skin/default/image/spacer.gif" width="16" height="16" /></a></td>
			<td id="editLink-${_type.tagTypeId}" class="icon"><a class="editAction" href="javascript:openEditForm(${_type.tagTypeId});"><img src="$link.contextPath/resources/skin/default/image/spacer.gif" width="16" height="16" /></a>
			</td>
			<td id="editButton-${_type.tagTypeId}" class="submit" style="display:none">
				<input type="submit" class="submit" value="登録" onmousedown="setTarget(${_type.tagTypeId})"/>
				<input type="reset" class="cancel" value="キャンセル" onclick="closeEditForm(${_type.tagTypeId})"/>
			</td>
			<td id="nameView-${_type.tagTypeId}" class="editable" nowrap="nowrap" onclick="openEditForm(${_type.tagTypeId});">$_type.name</td>
			<td id="orderView-${_type.tagTypeId}" class="editable-number" onclick="openEditFormOrder(${_type.tagTypeId});">${_type.sortOrder}</td>
			<td id="editName-${_type.tagTypeId}" class="input" style="display:none">
				<input id="name-${_type.tagTypeId}" name="name-${_type.tagTypeId}" onfocus="setTarget(${_type.tagTypeId})" type="text" class="text" value="$_type.name"/>
			</td>
			<td id="editOrder-${_type.tagTypeId}" class="input-number" style="display:none">
				<input id="order-${_type.tagTypeId}" name="order-${_type.tagTypeId}"  onfocus="setTarget(${_type.tagTypeId})" type="text" class="number" value="${_type.sortOrder}"/>
			</td>
			<td>
				<ul id="tagTypeStyleLink-${_type.tagTypeId}" class="tagTypeList">
					<li id="tagTypeStyle-${_type.tagTypeId}" class="$_type.styleClass"><a href="javascript:openChangeTagTypeStyleForm(${_type.tagTypeId})">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
				</ul>
				<ul id="tagTypeStyleForm-${_type.tagTypeId}" class="tagTypeList" style="display:none">
					<li class="tag1"><a href="javascript:changeTagTypeStyle(${_type.tagTypeId},'tag1')">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
					<li class="tag2"><a href="javascript:changeTagTypeStyle(${_type.tagTypeId},'tag2')">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
					<li class="tag3"><a href="javascript:changeTagTypeStyle(${_type.tagTypeId},'tag3')">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
					<li class="tag4"><a href="javascript:changeTagTypeStyle(${_type.tagTypeId},'tag4')">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
					<li class="tag5"><a href="javascript:changeTagTypeStyle(${_type.tagTypeId},'tag5')">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
					<li class="tag6"><a href="javascript:changeTagTypeStyle(${_type.tagTypeId},'tag6')">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
					<li class="tag7"><a href="javascript:changeTagTypeStyle(${_type.tagTypeId},'tag7')">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
					<li class="tag8"><a href="javascript:changeTagTypeStyle(${_type.tagTypeId},'tag8')">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
					<li class="tag9"><a href="javascript:changeTagTypeStyle(${_type.tagTypeId},'tag9')">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
					<li class="tag10"><a href="javascript:changeTagTypeStyle(${_type.tagTypeId},'tag10')">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
				</ul>
			</td>
		</tr>
#end
		</table>
	</form>
	<p id="newLink">
	<a class="ajax" href="javascript:openTagTypeForm()"/>追加</a>
	</p>
	<form id="TagTypeForm" onsubmit="return addTagType()" style="display:none">
		<fieldset>
			<div>
			<label for="name">タグ種別</label>
			<input id="name" name="name" type="text" class="text" value="" />
			</div>
			<div>
			<label for="order">表示順</label>
			<input id="order" name="order" type="text" class="text" value="" />
			</div>
		</fieldset>
		<div class="action">
		<input type="submit" class="submit" value="登録"/>
		<input type="reset" class="cancel" value="キャンセル" onclick="closeTagTypeForm()"/>
		</div>
	</form>
	</div>
##	<!-- main -->
##<hr class="bot" />
##</div>
##<!-- content-body -->
##</div>
##<!-- content -->
##<div id="footer"/>
##</body>
##</html>
