<{strip}>
<{* 一覧画面 *}>
<div class="outerdiv">
	<{if !$action.metadata_exists}>
		<{$lang.mdb_noneexists_metadata|smarty:nodefaults}>
	<{else}>
		<div class="bold">
			<{$action.mdb_obj.multidatabase_name}>
		</div>
		<table class="outer">
			<tr>
				<td class="nowrap mdb_right_space">
					<{if $action.mdb_obj.post_auth && $action.mdb_obj.active_flag == $smarty.const._ON}>
						<a class="syslink" href="#" title="<{$lang.mdb_new_content_title|smarty:nodefaults}>" onclick="commonCls.sendView('<{$id}>', {'action':'multidatabase_view_main_content_init', 'multidatabase_id':'<{$action.multidatabase_id}>'}, {'loading_el':this}); return false;">
							<img class="icon" alt="" src="<{"edit.gif"|get_themes_image}>"/>
							<{$lang.mdb_new_content|smarty:nodefaults}>
						</a>
						<{if $smarty.session._auth_id >= $smarty.const._AUTH_CHIEF}>
							<{$lang._separator|smarty:nodefaults}>
							<a class="syslink" href="#" title="" onclick="mdbCls['<{$id}>'].showDataSeqPop(event, '<{$action.multidatabase_id}>'); return false;">
								<{$lang.mdb_sequence|smarty:nodefaults}>
							</a>
						<{/if}>
					<{/if}>
				</td>
				<td class="align-right nowrap">
					<a class="syslink" href="#" title="<{$lang.mdb_search_title|smarty:nodefaults|sprintf:$action.mdb_obj.multidatabase_name}>" onclick="commonCls.sendView('<{$id}>', {'action':'multidatabase_view_main_search_init', 'multidatabase_id':'<{$action.multidatabase_id}>'}, {'loading_el':this}); return false;">
						<img class="icon" src="<{"search.gif"|get_themes_image}>" alt="<{$lang.mdb_search|smarty:nodefaults}>" title="<{$lang.mdb_search|smarty:nodefaults}>" />
						<{$lang.mdb_search|smarty:nodefaults}>
					</a>
				</td>
			</tr>
		</table>
		<div class="nowrap">
			<form id="mdb_page_form<{$id}>" action="" onsubmit="return false;">
				<table class="mdb_mdblist_table" cellspacing="0" summary="">
					<tr>
						<td class="align-right">
							<{if $action.total_page > 1}>
								<{include file="multidatabase_view_main_init_page.html"}>
							<{/if}>
							<{foreach from=$action.section_metadatas item=item key=key}>
								<span class="mdb_separator">
									<select class="mdb_category" name="sort_section[<{$key}>]" onchange="mdbCls['<{$id}>'].toPage(this, '')">
										<option value="0" <{if $action.sort_section.$key == 0 || $action.sort_section == null}> selected="selected"<{/if}>>
											<{$item.name}>
										</option>
										<{foreach from=$item.select_content_array item=option name=selectloop}>
											<option value="<{$option}>" <{if $action.sort_section.$key == $option}> selected="selected"<{/if}>>
												<{$option}>
											</option>
										<{/foreach}>
									</select>
								</span>
							<{/foreach}>
							<span class="mdb_separator">
								<select class="mdb_sort[<{$id}>]" id="mdb_sort<{$id}>" name="sort_metadata" onchange="mdbCls['<{$id}>'].toPage(this, '')">
									<option value="<{$smarty.const.MULTIDATABASE_DEFAULT_SEQUENCE_SORT}>" <{if $action.sort_metadata == "" || $action.sort_metadata == $smarty.const.MULTIDATABASE_DEFAULT_SEQUENCE_SORT}> selected="selected"<{/if}>>
										<{$lang.mdb_default_sort|smarty:nodefaults}>
									</option>
									<option value="<{$smarty.const.MULTIDATABASE_DEFAULT_DATE_SORT}>" <{if $action.sort_metadata == $smarty.const.MULTIDATABASE_DEFAULT_DATE_SORT}> selected="selected"<{/if}>>
										<{$lang.mdb_date_sort|smarty:nodefaults}>
									</option>
									<option value="<{$smarty.const.MULTIDATABASE_DEFAULT_DATE_ASC_SORT}>" <{if $action.sort_metadata == $smarty.const.MULTIDATABASE_DEFAULT_DATE_ASC_SORT}> selected="selected"<{/if}>>
										<{$lang.mdb_date_asc_sort|smarty:nodefaults}>
									</option>
									<{if $action.mdb_obj.vote_flag == $smarty.const._ON}>
										<option value="<{$smarty.const.MULTIDATABASE_DEFAULT_VOTE_SORT}>" <{if $action.sort_metadata == $smarty.const.MULTIDATABASE_DEFAULT_VOTE_SORT}> selected="selected"<{/if}>>
											<{$lang.mdb_vote_sort|smarty:nodefaults}>
										</option>
									<{/if}>
									<{foreach from=$action.sort_metadatas item=option name=selectloop}>
										<option value="<{$option.metadata_id}>" <{if $action.sort_metadata == $option.metadata_id}> selected="selected"<{/if}>>
											<{$option.name}><{$lang.mdb_sort_item|smarty:nodefaults}>
										</option>
									<{/foreach}>
								</select>
							</span>
							<select class="visible_item<{$id}>" id="visible_item<{$id}>" name="visible_item" onchange="mdbCls['<{$id}>'].toPage(this, '')">
								<option value="1" <{if ($action.visible_item == 1)}> selected="selected"<{/if}>>1<{$lang.mdb_display_item|smarty:nodefaults}></option>
								<option value="5" <{if ($action.visible_item == 5)}> selected="selected"<{/if}>>5<{$lang.mdb_display_item|smarty:nodefaults}></option>
								<option value="10" <{if ($action.visible_item == 10)}> selected="selected"<{/if}>>10<{$lang.mdb_display_item|smarty:nodefaults}></option>
								<option value="20" <{if ($action.visible_item == 20)}> selected="selected"<{/if}>>20<{$lang.mdb_display_item|smarty:nodefaults}></option>
								<option value="50" <{if ($action.visible_item == 50)}> selected="selected"<{/if}>>50<{$lang.mdb_display_item|smarty:nodefaults}></option>
								<option value="100" <{if ($action.visible_item == 100)}> selected="selected"<{/if}>>100<{$lang.mdb_display_item|smarty:nodefaults}></option>
								<{* <option value="0" <{if ($action.visible_item == 0)}> selected="selected"<{/if}>><{$lang.mdb_display_item_all|smarty:nodefaults}></option> *}>
							</select>
						</td>
					</tr>
				</table>
				<{*ページ*}>
				<input type="hidden" name="multidatabase_id" value="<{$action.multidatabase_id}>" />
				<input type="hidden" name="now_page" value="<{$action.now_page}>" />
			</form>
		</div>
		<{if !$action.exists}>
			<br /><{$lang.mdb_noneexists_data|smarty:nodefaults}>
		<{else}>
			<{if $action.mdblist.metadata == ""}>
				<br /><{$lang.mdb_noneexists_list_metadata|smarty:nodefaults}>
			<{else}>
				<{assign var="mode" value="list"}>
				<{assign var="data_pos_1" value=$action.mdblist.metadata.1}>
				<{assign var="data_pos_2" value=$action.mdblist.metadata.2}>
				<{assign var="data_pos_3" value=$action.mdblist.metadata.3}>
				<{assign var="data_pos_4" value=$action.mdblist.metadata.4}>
				<{foreach item=item key=key from=$action.mdblist.value}>
					<{* 詳細部 *}>
					<{include file="multidatabase_common_metadata.html"}>
					<br />
				<{/foreach}>
			<{/if}>
		<{/if}>
	<{/if}>
</div>
<{include file="../multidatabase_script.html"}>
<{/strip}>