1
0

privilege_list.jsp 11 KB

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