| 1 |
<{* |
| 2 |
|
| 3 |
$prevpage |
| 4 |
$nextpage |
| 5 |
$maxpage |
| 6 |
$page |
| 7 |
$itemcount |
| 8 |
$page_no_label |
| 9 |
$meta_keyword |
| 10 |
$items |
| 11 |
|
| 12 |
$detail |
| 13 |
$identifier |
| 14 |
$repository_id |
| 15 |
$page |
| 16 |
$itemcount |
| 17 |
$meta_keyword |
| 18 |
|
| 19 |
*}> |
| 20 |
<script type='text/javascript'> |
| 21 |
<!-- |
| 22 |
function irview_search(page_no) |
| 23 |
{ |
| 24 |
var form = document.getElementById('irview_metadata_search_form'); |
| 25 |
form.page.value = page_no; |
| 26 |
form.op.value = 'search'; |
| 27 |
form.submit(); |
| 28 |
return false; |
| 29 |
} |
| 30 |
|
| 31 |
function irview_detail(identifier,repository_id) |
| 32 |
{ |
| 33 |
var form = document.getElementById('irview_metadata_search_form'); |
| 34 |
form.identifier.value = identifier; |
| 35 |
form.repository_id.value = repository_id; |
| 36 |
form.op.value = 'detail'; |
| 37 |
form.submit(); |
| 38 |
return false; |
| 39 |
} |
| 40 |
|
| 41 |
// --> |
| 42 |
</script> |
| 43 |
|
| 44 |
<form action='metadata_search.php' method='get' id='irview_metadata_search_form'> |
| 45 |
<center> |
| 46 |
<h3><{$smarty.const._MD_IRVIEW_METADATA_SEARCH_LABEL}></h3> |
| 47 |
|
| 48 |
<input type='hidden' name='op' value='search' /> |
| 49 |
<input type='hidden' name='page' value='<{$page}>' /> |
| 50 |
<input type='hidden' name='identifier' value='<{$identifier}>' /> |
| 51 |
<input type='hidden' name='repository_id' value='<{$repository_id}>' /> |
| 52 |
|
| 53 |
<{if $op =='' }> |
| 54 |
<input type='text' name='meta_keyword' value='<{$meta_keyword}>' /> |
| 55 |
<input type='submit' value='<{$smarty.const._MD_IRVIEW_METADATA_SEARCH_BUTTON_LABEL}>' /> |
| 56 |
<input type='hidden' name='itemcount' value='20' /> |
| 57 |
<{elseif $op == 'search' }> |
| 58 |
<input type='text' name='meta_keyword' value='<{$meta_keyword}>' /> |
| 59 |
<input type='submit' value='<{$smarty.const._MD_IRVIEW_METADATA_SEARCH_BUTTON_LABEL}>' onclick="irview_search(1)" /><br><br> |
| 60 |
|
| 61 |
<{$smarty.const._MD_IRVIEW_NUM_OF_ITEM_PER_PAGE}> |
| 62 |
<select name="itemcount" onchange="submit();"> |
| 63 |
<{html_options options=$item_count_select selected=$itemcount}> |
| 64 |
</select> |
| 65 |
</center> |
| 66 |
|
| 67 |
<p> |
| 68 |
<{$page_no_label}> |
| 69 |
</p> |
| 70 |
|
| 71 |
<{if $maxpage > 1}> |
| 72 |
<div align="right"> |
| 73 |
<{if $page > 1}> |
| 74 |
<a href="" onclick="return irview_search(<{$page}>-1)">PREV</a> |
| 75 |
<{else}> |
| 76 |
PREV |
| 77 |
<{/if}> |
| 78 |
|
| 79 |
<{foreach item=i from=$pages}> |
| 80 |
<{if $i==$page}> |
| 81 |
<{$i}> |
| 82 |
<{else}> |
| 83 |
<a href="" onclick="return irview_search(<{$i}>)"><{$i}></a> |
| 84 |
<{/if}> |
| 85 |
|
| 86 |
<{/foreach}> |
| 87 |
|
| 88 |
<{if $page < $maxpage }> |
| 89 |
<a href="" onclick="return irview_search(<{$page}>+1)">NEXT</a> |
| 90 |
<{else}> |
| 91 |
NEXT |
| 92 |
<{/if}> |
| 93 |
</div> |
| 94 |
<{/if}> |
| 95 |
|
| 96 |
<table width="100%" border="0" cellspacing="5"> |
| 97 |
<{foreach item=i from=$items}> |
| 98 |
<tr valign="top" align="left"> |
| 99 |
<td class="<{cycle name="cycle2" values="odd,even"}>"> |
| 100 |
<a href="" onclick="return irview_detail('<{$i.identifier}>','<{$i.repository_id}>');"><{$i.title}></a> |
| 101 |
</td> |
| 102 |
</tr> |
| 103 |
<{/foreach}> |
| 104 |
</table> |
| 105 |
|
| 106 |
<{if $maxpage > 1}> |
| 107 |
<div align="right"> |
| 108 |
<{if $page > 1}> |
| 109 |
<a href="" onclick="return irview_search(<{$page}>-1)">PREV</a> |
| 110 |
<{else}> |
| 111 |
PREV |
| 112 |
<{/if}> |
| 113 |
|
| 114 |
<{foreach item=i from=$pages}> |
| 115 |
<{if $i==$page}> |
| 116 |
<{$i}> |
| 117 |
<{else}> |
| 118 |
<a href="" onclick="return irview_search(<{$i}>)"><{$i}></a> |
| 119 |
<{/if}> |
| 120 |
|
| 121 |
<{/foreach}> |
| 122 |
|
| 123 |
<{if $page < $maxpage }> |
| 124 |
<a href="" onclick="return irview_search(<{$page}>+1)">NEXT</a> |
| 125 |
<{else}> |
| 126 |
NEXT |
| 127 |
<{/if}> |
| 128 |
</div> |
| 129 |
<{/if}> |
| 130 |
<{elseif $op == 'detail'}> |
| 131 |
<input type='hidden' name='meta_keyword' value='<{$meta_keyword}>' /> |
| 132 |
<input type='hidden' name='itemcount' value='<{$itemcount}>' /> |
| 133 |
<table width="100%" border="0" cellspacing="5"> |
| 134 |
<{foreach item=i from=$detail}> |
| 135 |
<tr valign="top" align="left"> |
| 136 |
<td class="<{cycle name="cycle3" values="odd,even"}>"><{$i.tag}></td> |
| 137 |
<td class="<{cycle name="cycle4" values="odd,even"}>" ><{$i.value}></td> |
| 138 |
</tr> |
| 139 |
<{/foreach}> |
| 140 |
</table> |
| 141 |
|
| 142 |
<{* Back Button *}> |
| 143 |
<input type='button' value='<{$smarty.const._MD_IRVIEW_BACK_BUTTON_LABEL}>' onclick="irview_search(<{$page}>);" /> |
| 144 |
<{/if}> |
| 145 |
</form> |
| 146 |
|
| 147 |
<br /> |
| 148 |
|
| 149 |
<!-- end module search results loop --> |