host_list.jsp 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <%@ include file="../common/header.jsp"%>
  2. <%
  3. if (seq==0){
  4. seq = (Integer) request.getAttribute("host_start");
  5. }
  6. %>
  7. <script type="text/javascript" language="javascript">
  8. <!--
  9. function page(start, count){
  10. document.forms.host.start.value=start;
  11. document.forms.host.count.value=count;
  12. document.forms.host.action.value="list";
  13. document.forms.host.submit();
  14. doDisable(document.forms.host, "button");
  15. }
  16. function doChangePage(count){
  17. document.forms.host.start.value= (document.forms.host.startx.value-1)*20;
  18. if(document.forms.host.start.value=="NaN") document.forms.host.start.value = 0;
  19. document.forms.host.count.value=count;
  20. document.forms.host.action.value="list";
  21. document.forms.host.submit();
  22. doDisable(document.forms.host, "button");
  23. }
  24. function fillIndex(val){
  25. document.forms.host.startx.value = val.value;
  26. }
  27. function doCreate(){
  28. document.forms.host.action.value="create";
  29. document.forms.host.submit();
  30. doDisable(document.forms.host, "button");
  31. }
  32. function doDetail(id){
  33. document.forms.host.id.value=id;
  34. document.forms.host.action.value="detail";
  35. document.forms.host.submit();
  36. }
  37. function doFilter(){
  38. document.forms.host.action.value="list";
  39. document.forms.host.submit();
  40. doDisable(document.forms.host, "button");
  41. }
  42. function doReset(){
  43. document.forms.host.host_id_filter.value="";
  44. document.forms.host.host_host_filter.value="";
  45. document.forms.host.host_username_filter.value="";
  46. document.forms.host.clear.value="true";
  47. document.forms.host.action.value="list";
  48. document.forms.host.submit();
  49. doDisable(document.forms.host, "button");
  50. }
  51. function doOrder(field, type){
  52. document.forms.host.host_fieldOrder.value=field;
  53. document.forms.host.host_orderType.value=type;
  54. document.forms.host.action.value="list";
  55. document.forms.host.submit();
  56. doDisable(document.forms.status, "button");
  57. }
  58. -->
  59. </script>
  60. <!-- CONTENT -->
  61. <form name="host" method="post" action="host.do">
  62. <input type="hidden" name="start" value="">
  63. <input type="hidden" name="startx" value="">
  64. <input type="hidden" name="action" value="">
  65. <input type="hidden" name="count" value="">
  66. <input type="hidden" name="id" value="">
  67. <input type="hidden" name="clear" value="">
  68. <input type="hidden" name="host_fieldOrder" value="<bean:write name="host_fieldOrder"/>">
  69. <input type="hidden" name="host_orderType" value="<bean:write name="host_orderType"/>">
  70. <input type="hidden" name="focus_field" value="">
  71. <!--td width="80%" valign="top"-->
  72. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  73. <tr>
  74. <td class="titleHeader"><bean:message key="project.host.key"/> - LIST</td>
  75. </tr>
  76. <tr>
  77. <td><%@ include file="../common/paging.jsp"%></td>
  78. </tr>
  79. </table>
  80. <table width="100%" border="0" cellspacing="1" cellpadding="1">
  81. <tr>
  82. <td width="5%" class="titleField"><div align="center">#</div></td>
  83. <td align="left" height="10" valign="top" class="titleField"><bean:message key="host.id.key" />
  84. <logic:equal name="host_fieldOrder" value="id">
  85. <logic:equal name="host_orderType" value="ASC">
  86. <a href="#" onclick="doOrder('id', 'DESC');"><img src="./images/arrow_down.gif" border="0" alt=""></a>
  87. </logic:equal>
  88. <logic:equal name="host_orderType" value="DESC">
  89. <a href="#" onclick="doOrder('id', 'ASC');"><img src="./images/arrow_up.gif" border="0" alt=""></a>
  90. </logic:equal>
  91. </logic:equal>
  92. <logic:notEqual name="host_fieldOrder" value="id">
  93. <a href="#" onclick="doOrder('id', 'ASC');"><img src="./images/arrow.gif" border="0" alt=""></a>
  94. </logic:notEqual>
  95. </td>
  96. <td align="left" height="10" valign="top" class="titleField"><bean:message key="host.host.key" />
  97. <logic:equal name="host_fieldOrder" value="host">
  98. <logic:equal name="host_orderType" value="ASC">
  99. <a href="#" onclick="doOrder('host', 'DESC');"><img src="./images/arrow_down.gif" border="0" alt=""></a>
  100. </logic:equal>
  101. <logic:equal name="host_orderType" value="DESC">
  102. <a href="#" onclick="doOrder('host', 'ASC');"><img src="./images/arrow_up.gif" border="0" alt=""></a>
  103. </logic:equal>
  104. </logic:equal>
  105. <logic:notEqual name="host_fieldOrder" value="host">
  106. <a href="#" onclick="doOrder('host', 'ASC');"><img src="./images/arrow.gif" border="0" alt=""></a>
  107. </logic:notEqual>
  108. </td>
  109. <td align="left" height="10" valign="top" class="titleField"><bean:message key="host.username.key"/>
  110. <logic:equal name="host_fieldOrder" value="username">
  111. <logic:equal name="host_orderType" value="ASC">
  112. <a href="#" onclick="doOrder('username', 'DESC');"><img src="./images/arrow_down.gif" border="0" alt=""></a>
  113. </logic:equal>
  114. <logic:equal name="host_orderType" value="DESC">
  115. <a href="#" onclick="doOrder('username', 'ASC');"><img src="./images/arrow_up.gif" border="0" alt=""></a>
  116. </logic:equal>
  117. </logic:equal>
  118. <logic:notEqual name="host_fieldOrder" value="username">
  119. <a href="#" onclick="doOrder('username', 'ASC');"><img src="./images/arrow.gif" border="0" alt=""></a>
  120. </logic:notEqual>
  121. </td>
  122. <td width="5%" class="titleField">&nbsp;</td>
  123. </tr>
  124. <logic:notEmpty name="hostList">
  125. <logic:iterate id="element" name="hostList" scope="request" indexId="index">
  126. <%
  127. sequence++;
  128. String bgcolor = "FFFFFF";
  129. if(sequence%2 == 0){
  130. bgcolor = "EDEDE8";
  131. }
  132. %>
  133. <tr bgcolor="<% out.print(bgcolor); %>" onmouseover="mOvr(this);" onmouseout="mOut(this, '<% out.print(bgcolor); %>');">
  134. <td align="center" class="celBorder"><%=++seq%>&nbsp;</td>
  135. <td align="left" class="celBorder">
  136. &nbsp;<bean:write name="element" property="id"/>
  137. </td>
  138. <td align="left" class="celBorder">
  139. &nbsp;<bean:write name="element" property="host"/>
  140. </td>
  141. <td align="left" class="celBorder">
  142. &nbsp;<bean:write name="element" property="username"/>
  143. </td>
  144. <td align="center" class="celBorder" ><a href="#" ><img src="./images/detail.gif" border="0" onclick="doDetail('<bean:write name="element" property="id"/>');" alt="see detail"></a>
  145. </td>
  146. </tr>
  147. </logic:iterate>
  148. </logic:notEmpty>
  149. <tr>
  150. <td valign="top">&nbsp;</td>
  151. <td valign="top">&nbsp;</td>
  152. <td valign="top">&nbsp;</td>
  153. <td valign="top">&nbsp;</td>
  154. <td valign="top">
  155. <%/*<div align="center">
  156. <input type="button" size="50" maxlength="25" value="<bean:message key="button.create"/>" onclick="doCreate();">
  157. </div>*/%>
  158. </td>
  159. </tr>
  160. </table>
  161. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  162. <tr>
  163. <td class="search"><bean:message key="project.search.key" /></td>
  164. </tr>
  165. </table>
  166. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  167. <tr>
  168. <td width="20%"><b><bean:message key="host.id.key"/></b></td>
  169. <td width="1%">:</td>
  170. <td width="29%">
  171. <label>
  172. <input type="text" name="host_id_filter" value="<logic:notEmpty name="host_id_filter"><bean:write name="host_id_filter"/></logic:notEmpty>">
  173. </label>
  174. </td>
  175. </tr>
  176. <tr>
  177. <td width="20%"><b><bean:message key="host.host.key"/></b></td>
  178. <td width="1%">:</td>
  179. <td width="29%">
  180. <label>
  181. <input type="text" name="host_host_filter" value="<logic:notEmpty name="host_host_filter"><bean:write name="host_host_filter"/></logic:notEmpty>">
  182. </label>
  183. </td>
  184. </tr>
  185. <tr>
  186. <td width="20%"><b><bean:message key="host.username.key"/></b></td>
  187. <td width="1%">:</td>
  188. <td width="29%">
  189. <label>
  190. <input type="text" name="host_username_filter" value="<logic:notEmpty name="host_username_filter"><bean:write name="host_username_filter"/></logic:notEmpty>">
  191. </label>
  192. </td>
  193. </tr>
  194. <tr>
  195. <td>&nbsp;</td>
  196. <td>&nbsp;</td>
  197. <td>&nbsp;</td>
  198. <td>&nbsp;</td>
  199. <td>&nbsp;</td>
  200. <td>&nbsp;</td>
  201. </tr>
  202. <tr>
  203. <td>&nbsp;</td>
  204. <td>&nbsp;</td>
  205. <td colspan="3" align="left">
  206. <input type="button" size="50" maxlength="25" value="<bean:message key="button.reset"/>" onclick="doReset();">
  207. &nbsp;&nbsp;
  208. <input type="button" value="<bean:message key="button.search"/>" onclick="doFilter();">
  209. </td>
  210. <td>&nbsp;</td>
  211. <td>&nbsp;</td>
  212. <td>&nbsp;</td>
  213. </tr>
  214. </table>
  215. </form>
  216. <!-- END CONTENT -->
  217. <logic:notEmpty name="focus"><bean:write name="focus" filter="false" /></logic:notEmpty>
  218. <%@ include file="../common/footer.jsp"%>