Mercurial > hg > LGServices
view src/main/webapp/methods/addSectionToTopic.jsp @ 58:b8ad346e39a0
new: modify based on doc 'Improving LGServices interface.docx': user workflow improvement, functions like adding task into a topic and search suggestions.
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 02 May 2016 12:03:30 +0200 |
parents | 9dbbbfd474f4 |
children | 824b808a7481 |
line wrap: on
line source
<%@page import="de.mpiwg.gazetteer.bo.LGTopic"%> <%@page import="de.mpiwg.gazetteer.db.DBSection"%> <%@page import="de.mpiwg.gazetteer.utils.DBService"%> <%@page import="de.mpiwg.gazetteer.utils.DataProvider"%> <jsp:useBean id="sessionBean" class="de.mpiwg.web.jsp.SessionBean" scope="session" /> <% if (sessionBean == null || sessionBean.getUser() == null) { %> <form name="timeoutForm" action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" method="post"> <input name="bean" type="hidden" value="loginBean" /> <h3>Timeout or Logout at another page! Please Login again.</h3> <input type="image" width="40" height="40" onclick="setAction('logout', 'timeoutForm');" src="<%=sessionBean.getApplicationBean().getOkImage() %>"/> </form> <% } else if (sessionBean.getTopicListPage().getCompleteTopicList() == null) { sessionBean.getTopicListPage().loadParameters(request, response); sessionBean.getTopicListPage().reloadTopics(); } %> <form name="addSectionToTopicForm" id="addSectionToTopicForm" action="<%= sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp" method="post"> <input name="bean" type="hidden" value="topicBean" /> <input name="sourceBean" type="hidden" value="<%=request.getParameter("sourceBean")%>" /> <table class="dialogTable"> <tr> <td><label style="font-weight: bold;">Topic Id</label></td> <td><label style="font-weight: bold;">Name</label></td> </tr> <% for (LGTopic topic : sessionBean.getTopicListPage().getCompleteTopicList() ) {%> <tr> <td><%=topic.getId() %></td> <td> <%=topic.getNameEn() %>(<%=topic.getNameCh() %>) <% if(request.getParameter("sectionId") != null) { Long sectionId = Long.parseLong(request.getParameter("sectionId")); %> <!-- add section to selected topic --> <input name="selectedSectionId" type="hidden" value="<%=request.getParameter("sectionId") %>" /> <input type="image" onclick="setAction0('addSection', 'addSectionToTopicForm', 'selectedTopicId', '<%=topic.getId() %>');" src="<%=sessionBean.getApplicationBean().getPlusImage() %>" width="20" height="20"/> <% } else if (request.getParameter("addAllSections") != null) { %> <input type="image" onclick="setAction0('addAllSections', 'addSectionToTopicForm', 'selectedTopicId', '<%=topic.getId() %>');" src="<%=sessionBean.getApplicationBean().getPlusImage() %>" width="20" height="20"/> <% } %> </td> </tr> <% } %> </table> </form>