epay_privilege_list.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <%@ include file="../common/header.jsp"%>
  2. <%
  3. if (seq==0){
  4. seq = (Integer) request.getAttribute("nhprivilege_start");
  5. }
  6. %>
  7. <script type="text/javascript" language="javascript">
  8. <!--
  9. function page(start, count){
  10. document.forms.nhprivilege.start.value=start;
  11. document.forms.nhprivilege.count.value=count;
  12. document.forms.nhprivilege.action.value="list";
  13. document.forms.nhprivilege.submit();
  14. doDisable(document.forms.nhprivilege, "button");
  15. }
  16. function doChangePage(count){
  17. document.forms.nhprivilege.start.value= (document.forms.nhprivilege.startx.value-1)*10;
  18. if(document.forms.nhprivilege.start.value=="NaN") document.forms.nhprivilege.start.value = 0;
  19. document.forms.nhprivilege.count.value=count;
  20. document.forms.nhprivilege.action.value="list";
  21. document.forms.nhprivilege.submit();
  22. doDisable(document.forms.nhprivilege, "button");
  23. }
  24. function fillIndex(val){
  25. document.forms.nhprivilege.startx.value = val.value;
  26. }
  27. function doCreate(){
  28. document.forms.nhprivilege.action.value="create";
  29. document.forms.nhprivilege.submit();
  30. doDisable(document.forms.nhprivilege, "button");
  31. }
  32. function doDetail(code){
  33. document.forms.nhprivilege.code.value=code;
  34. document.forms.nhprivilege.action.value="detail";
  35. document.forms.nhprivilege.submit();
  36. }
  37. function doFilter(){
  38. document.forms.nhprivilege.action.value="list";
  39. document.forms.nhprivilege.submit();
  40. doDisable(document.forms.nhprivilege, "button");
  41. }
  42. function doReset(){
  43. document.forms.nhprivilege.nhprivilege_code_filter.value="";
  44. document.forms.nhprivilege.nhprivilege_name_filter.value="";
  45. document.forms.nhprivilege.nhprivilege_type_filter.value="";
  46. document.forms.nhprivilege.nhprivilege_parent_filter.value="";
  47. document.forms.nhprivilege.clear.value="true";
  48. document.forms.nhprivilege.action.value="list";
  49. document.forms.nhprivilege.submit();
  50. }
  51. function doOrder(field, type){
  52. document.forms.nhprivilege.nhprivilege_fieldOrder.value=field;
  53. document.forms.nhprivilege.nhprivilege_orderType.value=type;
  54. document.forms.nhprivilege.action.value="list";
  55. document.forms.nhprivilege.submit();
  56. doDisable(document.forms.status, "button");
  57. }
  58. function doSwitchActiveInactive() {
  59. if (document.forms.nhprivilege.nhprivilege_status.value=="ACTIVE") {
  60. document.forms.nhprivilege.nhprivilege_status.value="INACTIVE";
  61. } else {
  62. document.forms.nhprivilege.nhprivilege_status.value="ACTIVE";
  63. }
  64. document.forms.nhprivilege.action.value="list";
  65. document.forms.nhprivilege.submit();
  66. }
  67. -->
  68. </script>
  69. <!-- CONTENT -->
  70. <form name="nhprivilege" method="post" action="epayPrivilege.do">
  71. <input type="hidden" name="start" value="">
  72. <input type="hidden" name="startx" value="">
  73. <input type="hidden" name="action" value="">
  74. <input type="hidden" name="count" value="">
  75. <input type="hidden" name="code" value="">
  76. <input type="hidden" name="clear" value="">
  77. <input type="hidden" name="nhprivilege_fieldOrder" value="<bean:write name="nhprivilege_fieldOrder"/>">
  78. <input type="hidden" name="nhprivilege_orderType" value="<bean:write name="nhprivilege_orderType"/>">
  79. <input type="hidden" name="nhprivilege_status" value="<bean:write name="nhprivilege_status"/>">
  80. <input type="hidden" name="focus_field" value=""/>
  81. <!--td width="80%" valign="top"-->
  82. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  83. <tr>
  84. <td class="titleHeader"><bean:message key="project.privilege.key"/> - LIST</td>
  85. </tr>
  86. <tr>
  87. <td><%@ include file="../common/paging.jsp"%>
  88. </td>
  89. </tr>
  90. </table>
  91. <table width="100%" border="0" cellspacing="1" cellpadding="1">
  92. <tr>
  93. <td width="5%" class="titleField"><div align="center">#</div></td>
  94. <td align="left" height="10" valign="top" class="titleField"><bean:message key="privilege.id.key" />
  95. <logic:equal name="privilege_fieldOrder" value="code">
  96. <logic:equal name="privilege_orderType" value="ASC">
  97. <a href="#" onclick="doOrder('code', 'DESC');"><img src="./images/arrow_down.gif" border="0"></a>
  98. </logic:equal>
  99. <logic:equal name="privilege_orderType" value="DESC">
  100. <a href="#" onclick="doOrder('code', 'ASC');"><img src="./images/arrow_up.gif" border="0"></a>
  101. </logic:equal>
  102. </logic:equal>
  103. <logic:notEqual name="privilege_fieldOrder" value="code">
  104. <a href="#" onclick="doOrder('code', 'ASC');"><img src="./images/arrow.gif" border="0"></a>
  105. </logic:notEqual>
  106. </td>
  107. <td align="left" height="10" valign="top" class="titleField"><bean:message key="privilege.name.key" />
  108. <logic:equal name="privilege_fieldOrder" value="name">
  109. <logic:equal name="privilege_orderType" value="ASC">
  110. <a href="#" onclick="doOrder('name', 'DESC');"><img src="./images/arrow_down.gif" border="0"></a>
  111. </logic:equal>
  112. <logic:equal name="privilege_orderType" value="DESC">
  113. <a href="#" onclick="doOrder('name', 'ASC');"><img src="./images/arrow_up.gif" border="0"></a>
  114. </logic:equal>
  115. </logic:equal>
  116. <logic:notEqual name="privilege_fieldOrder" value="name">
  117. <a href="#" onclick="doOrder('name', 'ASC');"><img src="./images/arrow.gif" border="0"></a>
  118. </logic:notEqual>
  119. </td>
  120. <td align="left" height="10" valign="top" class="titleField"><bean:message key="privilege.type.key"/>
  121. <logic:equal name="privilege_fieldOrder" value="type">
  122. <logic:equal name="privilege_orderType" value="ASC">
  123. <a href="#" onclick="doOrder('type', 'DESC');"><img src="./images/arrow_down.gif" border="0"></a>
  124. </logic:equal>
  125. <logic:equal name="privilege_orderType" value="DESC">
  126. <a href="#" onclick="doOrder('type', 'ASC');"><img src="./images/arrow_up.gif" border="0"></a>
  127. </logic:equal>
  128. </logic:equal>
  129. <logic:notEqual name="privilege_fieldOrder" value="type">
  130. <a href="#" onclick="doOrder('type', 'ASC');"><img src="./images/arrow.gif" border="0"></a>
  131. </logic:notEqual>
  132. </td>
  133. <td align="left" height="10" valign="top" class="titleField"><bean:message key="privilege.parent.key"/>
  134. <logic:equal name="privilege_fieldOrder" value="parent">
  135. <logic:equal name="privilege_orderType" value="ASC">
  136. <a href="#" onclick="doOrder('parent', 'DESC');"><img src="./images/arrow_down.gif" border="0"></a>
  137. </logic:equal>
  138. <logic:equal name="privilege_orderType" value="DESC">
  139. <a href="#" onclick="doOrder('parent', 'ASC');"><img src="./images/arrow_up.gif" border="0"></a>
  140. </logic:equal>
  141. </logic:equal>
  142. <logic:notEqual name="privilege_fieldOrder" value="parent">
  143. <a href="#" onclick="doOrder('parent', 'ASC');"><img src="./images/arrow.gif" border="0"></a>
  144. </logic:notEqual>
  145. </td>
  146. <td width="5%" class="titleField">&nbsp;</td>
  147. </tr>
  148. <logic:notEmpty name="nhprivilegeList">
  149. <logic:iterate id="element" name="nhprivilegeList" scope="request" indexId="index">
  150. <%
  151. sequence++;
  152. String bgcolor = "FFFFFF";
  153. if(sequence%2 == 0){
  154. bgcolor = "EDEDE8";
  155. }
  156. %>
  157. <tr bgcolor="<% out.print(bgcolor); %>" onmouseover="mOvr(this);" onmouseout="mOut(this, '<% out.print(bgcolor); %>');">
  158. <td align="center" class="celBorder"><%=++seq%>&nbsp;</td>
  159. <td align="left" class="celBorder">
  160. &nbsp;<bean:write name="element" property="code"/>
  161. </td>
  162. <td align="left" class="celBorder">
  163. &nbsp;<bean:write name="element" property="name"/>
  164. </td>
  165. <td align="left" class="celBorder">
  166. &nbsp;<bean:write name="element" property="type"/>
  167. </td>
  168. <td align="left" class="celBorder">
  169. <logic:notEmpty name="element" property="parent">
  170. &nbsp;<bean:write name="element" property="parent.name"/>
  171. </logic:notEmpty>&nbsp;
  172. </td>
  173. <td align="center" class="celBorder" ><a href="#" ><img src="./images/detail.gif" border="0" onclick="doDetail('<bean:write name="element" property="code"/>');" alt="see detail"/></a>
  174. </td>
  175. </tr>
  176. </logic:iterate>
  177. </logic:notEmpty>
  178. <tr>
  179. <td valign="top">&nbsp;</td>
  180. <td valign="top">&nbsp;</td>
  181. <td valign="top">&nbsp;</td>
  182. <td valign="top">&nbsp;</td>
  183. <td valign="top">&nbsp;</td>
  184. <td colspan="2" valign="top"><a href="#" onclick="javascript:doSwitchActiveInactive();">
  185. <logic:equal name="nhprivilege_status" value="ACTIVE">View Inactive</logic:equal>
  186. <logic:equal name="nhprivilege_status" value="INACTIVE">View Active</logic:equal>
  187. </a></td>
  188. </tr>
  189. <tr>
  190. <td valign="top">&nbsp;</td>
  191. <td valign="top">&nbsp;</td>
  192. <td valign="top">&nbsp;</td>
  193. <td valign="top">&nbsp;</td>
  194. <td valign="top">&nbsp;</td>
  195. <td valign="top">
  196. <%/*<logic:equal name="nhprivilege_status" value="ACTIVE">
  197. <input type="button" value="Create" onclick="doCreate();">
  198. </logic:equal>*/%>
  199. </td>
  200. </tr>
  201. </TABLE>
  202. <table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
  203. <tr>
  204. <td class="search"><bean:message key="project.search.key" /></td>
  205. </tr>
  206. </table>
  207. <table width="100%" border="0" cellspacing="1" cellpadding="2">
  208. <tr>
  209. <td width="20%"><b><bean:message key="privilege.id.key"/></b></td>
  210. <td width="1%">:</td>
  211. <td width="29%">
  212. <label>
  213. <input type="text" name="nhprivilege_code_filter" value="<logic:notEmpty name="nhprivilege_code_filter"><bean:write name="nhprivilege_code_filter"/></logic:notEmpty>">
  214. </label>
  215. </td>
  216. </tr>
  217. <tr>
  218. <td width="20%"><b><bean:message key="privilege.name.key"/></b></td>
  219. <td width="1%">:</td>
  220. <td width="29%">
  221. <label>
  222. <input type="text" name="nhprivilege_name_filter" value="<logic:notEmpty name="nhprivilege_name_filter"><bean:write name="nhprivilege_name_filter"/></logic:notEmpty>">
  223. </label>
  224. </td>
  225. </tr>
  226. <tr>
  227. <td width="20%"><b><bean:message key="privilege.type.key"/></b></td>
  228. <td width="1%">:</td>
  229. <td width="29%">
  230. <SELECT name="nhprivilege_type_filter">
  231. <option value="">Pilih Salah Satu</option>
  232. <option value="PRIV_TYPE_MENU"
  233. <logic:equal name="nhprivilege_type_filter" value="PRIV_TYPE_MENU">
  234. SELECTED
  235. </logic:equal>
  236. >PRIV_TYPE_MENU</option>
  237. <option value="PRIV_TYPE_ACTION"
  238. <logic:equal name="nhprivilege_type_filter" value="PRIV_TYPE_ACTION">
  239. SELECTED
  240. </logic:equal>
  241. >PRIV_TYPE_ACTION</option>
  242. </SELECT>
  243. </td>
  244. </tr>
  245. <tr>
  246. <td width="20%" align="left"><b><bean:message key="privilege.parent.key"/></b></td>
  247. <td width="1%" align="center">:</td>
  248. <td width="29%" align="left">
  249. <select name="nhprivilege_parent_filter">
  250. <option value="">-- Pilih Salah Satu --</option>
  251. <logic:notEmpty name="nhprivilegeListParent">
  252. <logic:iterate id="nhprivilegeListElement" name="nhprivilegeListParent">
  253. <option value="<bean:write name="nhprivilegeListElement" property="code"/>"
  254. <logic:notEmpty name="nhprivilege_parent_filter">
  255. <logic:equal name="nhprivilegeListElement" property="code" value="${nhprivilege_parent_filter}">
  256. SELECTED
  257. </logic:equal>
  258. </logic:notEmpty>
  259. >
  260. <bean:write name="nhprivilegeListElement" property="name"/></option>
  261. </logic:iterate>
  262. </logic:notEmpty>
  263. </select>
  264. </td>
  265. </tr>
  266. <tr>
  267. <td>&nbsp;</td>
  268. <td>&nbsp;</td>
  269. <td>&nbsp;</td>
  270. <td>&nbsp;</td>
  271. <td>&nbsp;</td>
  272. <td>&nbsp;</td>
  273. </tr>
  274. <tr>
  275. <td>&nbsp;</td>
  276. <td>&nbsp;</td>
  277. <td colspan="3" align="left">
  278. <input type="button" size="50" maxlength="25" value="<bean:message key="button.reset"/>" onclick="doReset();"/>
  279. &nbsp;&nbsp;
  280. <input type="button" value="<bean:message key="button.search"/>" onclick="doFilter();"/>
  281. </td>
  282. <td>&nbsp;</td>
  283. <td>&nbsp;</td>
  284. <td>&nbsp;</td>
  285. </tr>
  286. </table>
  287. </td>
  288. </form>
  289. <!-- END CONTENT -->
  290. <logic:notEmpty name="focus"><bean:write name="focus" filter="false" /></logic:notEmpty>
  291. <%@ include file="../common/footer.jsp"%>