<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- 系統管理: <!-- TMPL_IF name="add" --><!-- TMPL_VAR name="head" --><!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirm" -->確認刪除分館 '<!-- TMPL_VAR NAME="branchcode" -->'<!-- /TMPL_IF -->
<!-- TMPL_IF name="else" --><!-- TMPL_VAR name="head" --><!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_category" -->確認刪除類別<!-- /TMPL_IF -->
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="masthead.inc" -->
<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->

<div id="main"><!-- TMPL_IF name="add" -->
	<h1>
	<!-- TMPL_IF NAME="heading-branches-p" -->分館<!-- /TMPL_IF -->
	<!-- TMPL_IF NAME="heading-branches-add-branch-p" -->新增分館<!-- /TMPL_IF -->
	<!-- TMPL_IF NAME="heading-branches-edit-branch-p" -->編輯分館<!-- /TMPL_IF -->
	<!-- TMPL_IF NAME="heading-branches-edit-category-p" -->編輯分館類別<!-- /TMPL_IF -->
	</h1>
	
<form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
<input type="hidden" name="op" value="add_validate" />
<div class="data"><table>
	<tr>
	<th><label for="branchcode" class="required">分館代碼</label></th>
		<td>
			<!-- TMPL_IF name="branchcode" -->
				<input type="hidden" id="branchcode" name="branchcode" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
				<!-- TMPL_VAR name="branchcode" -->
			<!-- TMPL_ELSE -->
				<input type="text" id="branchcode" name="branchcode" size="5" maxlength="5" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
			<!-- /TMPL_IF -->
		</td>
	</tr>
	<tr>
	<th><label for="branchname" class="required">名稱</label></th>
		<td><input type="text" id="branchname" name="branchname" size="40" maxlength="80" value="<!-- TMPL_VAR name="branchname" escape="HTML" -->" />&nbsp;</td>
	</tr>
<!-- TMPL_LOOP name="categoryloop" -->
					<tr>
						<th><label for="<!-- TMPL_VAR name="categorycode" -->"><!-- TMPL_VAR name="categoryname" --></label></th>
						<td><input type="checkbox" id="<!-- TMPL_VAR name="categorycode" -->" name="<!-- TMPL_VAR name="categorycode" -->" <!-- TMPL_VAR name="checked" --> /><!-- TMPL_VAR name="codedescription" --></td>
					</tr>
				<!-- /TMPL_LOOP -->
<tr>
	<th><label for="branchaddress1">主要地址</label></th>
		<td><input type="text" id="branchaddress1" name="branchaddress1" value="<!-- TMPL_VAR name="branchaddress1" escape="HTML" -->" /></td>
	</tr>
	<tr>
	<th><label for="branchaddress2">次要地址</label></th>
		<td><input type="text" id="branchaddress2" name="branchaddress2" value="<!-- TMPL_VAR name="branchaddress2" escape="HTML" -->" /></td>
	</tr>
	<tr>
	<th><label for="branchaddress3">其他地址</label></th>
		<td><input type="text" id="branchaddress3" name="branchaddress3" value="<!-- TMPL_VAR name="branchaddress3" escape="HTML" -->" /></td>
	</tr>
	<tr>
	<th><label for="branchphone">電話</label></th>
		<td><input type="text" id="branchphone" name="branchphone" value="<!-- TMPL_VAR name="branchphone" escape="HTML" -->" /></td>
	</tr>
	<tr>
	<th><label for="branchfax">傳真機</label></th>
		<td><input type="text" id="branchfax" name="branchfax" value="<!-- TMPL_VAR name="branchfax" escape="HTML" -->" /></td>
	</tr>
	<tr>
	<th><label for="branchemail">E-mail</label></th>
		<td><input type="text" id="branchemail" name="branchemail" value="<!-- TMPL_VAR name="branchemail" escape="HTML" -->" /></td>
	</tr>
</table></div><p><input type="submit" class="submit" value="送出" /></p>
</form>
<!-- /TMPL_IF -->

<!-- TMPL_IF name="delete_confirm" -->
	<h3>確認刪除 <!-- TMPL_VAR NAME="branchname" --> (<!-- TMPL_VAR NAME="branchcode" -->)?</h3>
	<div class="tabitem"><span class="form"><form action="<!-- TMPL_VAR name="action" -->" method="post">
		<input type="hidden" name="op" value="delete_confirmed" />
		<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
			<input type="hidden" name="branchname" value="<!-- TMPL_VAR NAME="branchname" escape="HTML" -->">
		<input type="submit" value="刪除分館" class="cancel" />
	</form> 
	<form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="hidden" name="op" value="">
		<input type="submit" value="不要刪除" class="submit" />
	</form></span></div>
<!-- /TMPL_IF -->

<!-- TMPL_IF name="else" -->

<h1>
<!-- TMPL_IF NAME="heading-branches-p" -->分館<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="heading-branches-add-branch-p" -->新增分館<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="heading-branches-edit-branch-p" --> 編輯分館<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="heading-branches-edit-category-p" -->編輯分館類別<!-- /TMPL_IF -->
</h1>

	<!-- TMPL_IF name="MESSAGE1" -->
			<div class="error">無法改變分館紀錄：你必須取一個分館名稱和代碼</div>
		<!-- /TMPL_IF -->
		<!-- TMPL_IF name="MESSAGE2" -->
			<div class="error">分館記錄更新</div>
		<!-- /TMPL_IF -->
		<!-- TMPL_IF name="MESSAGE3" -->
			<div class="error">分館記錄被刪除</div>
		<!-- /TMPL_IF -->
		<!-- TMPL_IF name="MESSAGE4" -->
			<div class="error">無法改變分館類別: 你必須取一各類別和代碼</div>
		<!-- /TMPL_IF -->
		<!-- TMPL_IF name="MESSAGE5" -->
			<div class="error">分館類別記錄更新</div>
		<!-- /TMPL_IF -->
		<!-- TMPL_IF name="MESSAGE6" -->
			<div class="error">分館類別已經被刪除</div>
		<!-- /TMPL_IF -->
		<!-- TMPL_IF name="MESSAGE7" -->
			<div class="error">分館無法被刪除因為有一些館藏被其他分館使用</div>
		<!-- /TMPL_IF -->

	<table>
		<tr>
			<th>名稱</th>
			<th>代碼</th>
			<th>地址</th>
			<th>類別</th>
			<th>&nbsp;</th>
			<th>&nbsp;</th>
		</tr>
		<!-- TMPL_LOOP name="branches" -->
			<!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
				<td><!-- TMPL_VAR NAME="i" --><!-- TMPL_VAR name="branch_name" escape="HTML" --></td>
				<td><!-- TMPL_VAR name="branch_code" escape="HTML" --></td>
				<td>
					<!-- TMPL_IF name="address-empty-p" -->
						(沒有東西輸入)
					<!-- TMPL_ELSE -->
						<!-- TMPL_IF name="branchaddress1" -->
							<!-- TMPL_VAR name="branchaddress1" escape="HTML" --><!-- /TMPL_IF -->
						<!-- TMPL_IF name="branchaddress2" -->
							<br /><!-- TMPL_VAR name="branchaddress2" escape="HTML" --><!-- /TMPL_IF -->
						<!-- TMPL_IF name="branchaddress3" -->
							<br /><!-- TMPL_VAR name="branchaddress3" escape="HTML" --><!-- /TMPL_IF -->
						<!-- TMPL_IF name=branchphone -->
							<br />電腦: <!-- TMPL_VAR name="branchphone" escape="HTML" --><!-- /TMPL_IF -->
						<!-- TMPL_IF name="branchfax" -->
							<br />傳真機: <!-- TMPL_VAR name="branchfax" escape="HTML" --><!-- /TMPL_IF -->
						<!-- TMPL_IF name="branchemail" -->
							<br />Email: <!-- TMPL_VAR name="branchemail" escape="HTML" --><!-- /TMPL_IF -->
					<!-- /TMPL_IF -->
				</td>
				<td>
					<!-- TMPL_IF name="no-categories-p" -->
						(沒有設定類別)
					<!-- TMPL_ELSE -->
						<!-- TMPL_LOOP name="category_list" -->
							<!-- TMPL_VAR name="categoryname" --><br />
						<!-- /TMPL_LOOP -->
					<!-- /TMPL_IF -->
				</td>
				<td>
					<form action="<!-- TMPL_VAR name=action -->" method="post">
					<input type="hidden" name="op" value="edit" />
					<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name=value escape="HTML" -->" />
					<input type="submit" value="編輯" class="submit" />
					</form>
				</td>
				<td>
					<form action="<!-- TMPL_VAR name=action -->" method="post">
					<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name=value escape="HTML" -->" />
<input type="hidden" name="branchname" value="<!-- TMPL_VAR NAME="branch_name" escape="HTML" -->">
					<input type="hidden" name="op" value="delete" /><input type="submit" value="刪除" class="cancel" />
					</form>
				</td>
			</tr>
		<!-- /TMPL_LOOP -->
	</table>
<form action="<!-- TMPL_VAR name=action -->" method="post">
		<p><input type="hidden" name="op" value="add" />
		<input type="submit" class="submit" value="新增分館" /></p>
	</form>
	
	<table>
	<caption>分館類別</caption>
	<tr>
		<th>名稱</th>
		<th>代碼</th>
		<th>描述說明</th>
		<th>&nbsp;</th>
		<th>&nbsp;</th>
	</tr>
	<!-- TMPL_LOOP name="branchcategories" -->
			<!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
	<td><!-- TMPL_VAR name="categoryname" --></td>
		<td><!-- TMPL_VAR name="categorycode" --></td>
		<td><!-- TMPL_VAR name="codedescription" --></td>
		<td>
			<form action="<!-- TMPL_VAR name=action -->" method="post">
			<input type="hidden" name="op" value="editcategory" />
			<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name=categorycode escape="HTML" -->" />
			<input type="submit" value="編輯" class="submit" />
			</form>
		</td>
		<td>
			<form action="<!-- TMPL_VAR name=action -->" method="post">
			<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name=categorycode escape="HTML" -->" />
			<input type="hidden" name="op" value="delete_category" /><input type="submit" value="刪除" class="cancel" />
			</form>
		</td>
		</tr>
	<!-- /TMPL_LOOP -->
	</table><form action="<!-- TMPL_VAR name="action" -->" method="post"><p>
		<input type="hidden" name="op" value="editcategory" />
		<input type="submit" class="submit" value="新增類別" /></p>
	</form>
<!-- /TMPL_IF -->

<!-- TMPL_IF name="editcategory" -->
	
	<form action="<!-- TMPL_VAR name=action -->" name="Aform" method="post">
	<input type="hidden" name="op" value="addcategory_validate" />
	<div class="data"><table>
	<caption>
		<!-- TMPL_IF NAME="categorycode" -->更新分館類別<!-- TMPL_ELSE -->新增分館類別<!-- /TMPL_IF -->
	</caption>
		<tr>
			<th><label for="categorycode" class="required">類別代碼</label></th>
			<td>
				<!-- TMPL_IF name="categorycode" -->
					<input type="hidden" id="categorycode" name="categorycode" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
					<!-- TMPL_VAR name="categorycode" -->
				<!-- TMPL_ELSE -->
					<input type="text" id="categorycode" name="categorycode" size="5" maxlength="5" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
				<!-- /TMPL_IF -->
			</td>
		</tr>
		<tr>
			<th><label for="categoryname" class="required">名稱</label></th>
			<td><input type="text" id="categoryname" name="categoryname" size="40" maxlength="80" value="<!-- TMPL_VAR name="categoryname" escape="HTML" -->" />&nbsp;</td>
		</tr>
		<tr>
			<th><label for="codedescription">描述說明</label></th>
			<td><input type="text" id="codedescription" name="codedescription" size="40" maxlength="80" value="<!-- TMPL_VAR name="codedescription" escape="HTML" -->" />&nbsp;</td>
		</tr>
	</table></div>
	<!-- TMPL_IF name="categorycode" -->
	<input type="submit" value="更新分館類別" class="submit" />
	<!-- TMPL_ELSE -->
	<input type="submit" value="新增分館類別" class="submit" />
	<!-- /TMPL_IF -->
	</form>
<!-- /TMPL_IF -->

<!-- TMPL_IF name="delete_category" -->
	<div class="data">
	<table>
	<caption>確認刪除類別?</caption>
	<tr><th>類別代碼: </th><td><!-- TMPL_VAR NAME="categorycode" --></td></tr>
	</table>
<div class="tabitem">	<form action="<!-- TMPL_VAR name=action -->" method="post">
		<input type="hidden" name="op" value="categorydelete_confirmed" />
		<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
		<input type="submit" value="是，刪除" class="submit" />
	</form>
	<form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="hidden" name="op" value="">
		<input type="submit" value="否，無法刪除" class="cancel" />
	</form></div>
<!-- /TMPL_IF --></div>

<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
