Author: bbrossaud Date: 2010-06-03 18:03:39 +0200 (Thu, 03 Jun 2010) New Revision: 66 Url: http://chorem.org/repositories/revision/bow/66 Log: new design with javascript Added: trunk/src/main/webapp/search2.jsp Modified: trunk/src/main/java/org/chorem/bow/BookmarkActions.java trunk/src/main/java/org/chorem/bow/ControllerServlet.java trunk/src/main/webapp/css/styles.css trunk/src/main/webapp/header.jsp trunk/src/main/webapp/home.jsp trunk/src/main/webapp/main.jsp trunk/src/main/webapp/search.jsp Modified: trunk/src/main/java/org/chorem/bow/BookmarkActions.java =================================================================== --- trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-06-03 08:18:34 UTC (rev 65) +++ trunk/src/main/java/org/chorem/bow/BookmarkActions.java 2010-06-03 16:03:39 UTC (rev 66) @@ -37,7 +37,7 @@ String link = getUrlFromHtml(html); String tags = getTagsFromHtml(html); Date date = getDateFromHtml(html); - Bookmark bookmark = createBookmark(link, name, tags, user, date); + Bookmark bookmark = createBookmark(link, name, tags, user, null, date); return bookmark; } @@ -90,9 +90,9 @@ return export; } - /* @param html String html - * - */ + /* @param html String html + * + */ public static String getUrlFromHtml(String html) { String url = ""; if (html != null) { @@ -184,7 +184,7 @@ } } - public static Bookmark createBookmark(String url, String name, String tags, User user, Date date) { + public static Bookmark createBookmark(String url, String name, String tags, User user, String alias, Date date) { Bookmark bookmark = (Bookmark) new BookmarkImpl(); if (name != null) { name = name.trim(); @@ -212,7 +212,12 @@ date = new Date(); } bookmark.setDate(date); // set the date - bookmark.setAlias(""); + if (alias != null) { + alias = alias.trim(); + bookmark.setAlias(alias); + } else { + bookmark.setAlias(""); + } return bookmark; } @@ -223,6 +228,33 @@ } } + public static void updateBookmark(Bookmark bookmark, String name, String link, String str, String alias) { + if (name != null) { + name = name.trim(); + bookmark.setDescription(name); + } + if (link != null) { + link = link.trim(); + bookmark.setLink(link); + } + if (str != null) { + bookmark.clearTags(); + if (!str.isEmpty()) { + str = str.trim(); + String[] tags = str.split("\\s+"); + for (int i = 0; i < tags.length; i++) { + if (bookmark.getTags() == null || !bookmark.getTags().contains(tags[i])) { + bookmark.addTags(tags[i]); + } + } + } + } + if (alias != null) { + alias = alias.trim(); + bookmark.setAlias(alias); + } + } + public static String getBookmarkTagsString(Bookmark bookmark) { if (bookmark != null) { Set<String> tags = bookmark.getTags(); Modified: trunk/src/main/java/org/chorem/bow/ControllerServlet.java =================================================================== --- trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-03 08:18:34 UTC (rev 65) +++ trunk/src/main/java/org/chorem/bow/ControllerServlet.java 2010-06-03 16:03:39 UTC (rev 66) @@ -118,6 +118,11 @@ log.debug("Going to actionAddUrl"); } this.actionAddUrl(request, response, user); + } else if (action.equals("modifyBookmark") && user != null) { + if (log.isDebugEnabled()) { + log.debug("Going to actionModif"); + } + this.actionModifyBookmark(request, response, user); } else if (action.equals("importBookmarks") && user != null) { if (log.isDebugEnabled()) { log.debug("Going to actionImportBookmarks"); @@ -488,6 +493,22 @@ redirectToTheGoodPage(request, response); } + protected void actionModifyBookmark(HttpServletRequest request, HttpServletResponse response, User user) + throws IOException { + String link = request.getParameter("url"); // url of the website + String name = request.getParameter("name"); // website name + String alias = request.getParameter("alias"); + String tags = request.getParameter("tags"); + String id = request.getParameter("bookmarkId"); + WikittyProxy proxy = BowProxy.getInstance(); + Bookmark bookmark = proxy.restore(Bookmark.class, id); + if (bookmark != null) { + BookmarkActions.updateBookmark(bookmark, name, link, tags, alias); + proxy.store(bookmark); + } + redirectToTheGoodPage(request, response); + } + /* @param request servlet request * @param response servlet response * @param user User user @@ -503,10 +524,11 @@ protected void addUrl(HttpServletRequest request, User user) { String link = request.getParameter("url"); // url of the website String name = request.getParameter("name"); // website name + String alias = request.getParameter("alias"); Bookmark bookmark = null; if (name != null) { String tags = request.getParameter("tags"); // tags - bookmark = BookmarkActions.createBookmark(link, name, tags, user, null); + bookmark = BookmarkActions.createBookmark(link, name, tags, user, alias, null); } else { // this part is for the bookmark addition by script String nameAndTags = request.getParameter("nameAndTags"); bookmark = BookmarkActions.createBookmark(link, nameAndTags, user); Modified: trunk/src/main/webapp/css/styles.css =================================================================== --- trunk/src/main/webapp/css/styles.css 2010-06-03 08:18:34 UTC (rev 65) +++ trunk/src/main/webapp/css/styles.css 2010-06-03 16:03:39 UTC (rev 66) @@ -45,7 +45,7 @@ font-family:monospace; border:1px solid #6495ed; padding:5px; - text-align:center; + /*text-align:center;*/ } caption { font-family:sans-serif; @@ -164,3 +164,12 @@ background:#A9BCE1 none repeat scroll 0 0; color:#FFFFFF; } + +.test { + text-align: center; + float: right; + position: relative; + bottom: 1%; + right: 0px; + width: 4em; +} \ No newline at end of file Modified: trunk/src/main/webapp/header.jsp =================================================================== --- trunk/src/main/webapp/header.jsp 2010-06-03 08:18:34 UTC (rev 65) +++ trunk/src/main/webapp/header.jsp 2010-06-03 16:03:39 UTC (rev 66) @@ -9,4 +9,17 @@ <link rel="stylesheet" type="text/css" href="./css/styles.css" /> <link rel="search" type="application/opensearchdescription+xml" title="bowTemporarySearchEngine" href="<%=url%>bow?action=temporaryXml" /> <link rel="search" type="application/opensearchdescription+xml" title="bowPermanentSearchEngine" href="<%=url%>bow?action=permanentXml" /> + <script type="text/javascript"> + <!-- + function modify(name, alias, tags, url, action) { + var form = document.getElementById("bookmarkForm"); + form.elements["url"].value = url; + form.elements["name"].value = name; + form.elements["tags"].value = tags; + form.elements["alias"].value = alias; + form.elements["submit"].value = 'Modif'; + form.action = action; + } + //--> + </script> </head> \ No newline at end of file Modified: trunk/src/main/webapp/home.jsp =================================================================== --- trunk/src/main/webapp/home.jsp 2010-06-03 08:18:34 UTC (rev 65) +++ trunk/src/main/webapp/home.jsp 2010-06-03 16:03:39 UTC (rev 66) @@ -24,177 +24,150 @@ Home </h1> <% - if (bookmarkActions != null) { - List<Bookmark> bookmarkList = bookmarkActions.getBookmarks(); - if (!bookmarkList.isEmpty()) { + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + List<Bookmark> bookmarkList = bookmarkActions.getBookmarks(); + if (!bookmarkList.isEmpty()) { %> <h2 class="result">The most used bookmarks</h2> + + <% + for (Bookmark bookmark : bookmarkList) { + %> <table class="result"> <tr class="result"> - <th class ="result remove"> - remove + <th> + + <div style="float: left"> + <input type="image" src="img/img.png" title="bookmark" /> + <%=bookmark.getAlias()%> + (<%=sdf.format(bookmark.getDate())%>) + </div> + + <div style="float: right"> + <input type="image" src="img/edit.png" title="Edit" onclick="modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=bookmark.getLink()%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%>')"/> + <a style="border:none;text-decoration: none" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"> + <IMG style="border:none;" SRC="img/remove.png" ALT="Remove bookmark" TITLE="Remove" /> + </a> + </div> + </th> - <th class="result date"> - Date - </th> - <th class="result name"> - Name - </th> - <th class ="result tags"> - Tags - </th> - <th class=" result click"> - Click - </th> </tr> - <% - SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); - for (Bookmark bookmark : bookmarkList) { - %> - <tr class="result"> + + <tr> <td class="result"> - <a style="border:none;" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"> - <IMG style="border:none;" SRC="img/remove.png" ALT="Remove bookmark" TITLE="Remove" /> - </a> - </td> - <td class="result"> - <%=sdf.format(bookmark.getDate())%> - </td> - <% - String alias = bookmark.getAlias(); - if (alias != null && !alias.isEmpty()) { - alias = url + "alias/" + alias; - } - %> - <td class="result" style="text-align: left"> - <a title ="<%=alias%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a> - <form method="POST" action="bow?action=addAlias&bookmarkId=<%=bookmark.getWikittyId()%>" style="display: inline"> - <input type="text" name="alias" size="10" value="<%=bookmark.getAlias()%>" /> - <input style="display: inline;" type="submit" value="Add alias" /> - </form> - <form method="POST" action="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"> - <input type="text" name="name" size="35" value="<%=bookmark.getDescription()%>" /> - <input type="image" src="img/edit.png" title="Edit"/> - </form> - </td> - <td class="result" style="text-align: left"> - <% - Set<String> tagList = bookmark.getTags(); - if (tagList != null && !tagList.isEmpty()) { - for (String tag : tagList) { - %> - <div style="display: inline"> - <a style="text-decoration:none" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>"> - <IMG style="border:none" SRC="img/delete.png" ALT="Delete tag" TITLE="Delete" /> + <div class="test"> + Clicks: + <br /> + <%=bookmark.getClick()%> + </div> + <div style="float: left; margin: 5px;"> + <input type="image" src="img/img.png" title="bookmark" /> + </div> + + <div style="float: left;margin: 5px"> + <a title ="<%=bookmark.getLink()%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a> + <br /> + tags : + <% + Set<String> tagList = bookmark.getTags(); + if (tagList != null && !tagList.isEmpty()) { + for (String tag : tagList) { + %> + <a id="delete" style="display:none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" > + <IMG style="border:none;" SRC="img/delete.png" ALT="Delete tag" TITLE="Delete" /> </a> - <a href="bow?action=search&addTag=<%=tag%>" style="text-decoration: none"><%=tag%></a> + <a href="bow?action=search&searchLine=<%=tag%>" style="text-decoration: none"><%=tag%></a> + <% + } + %> </div> - <% - } - } - %> - <form method="POST" action="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"> - <input type="text" name="tags" size="35" value="<%=BookmarkActions.getBookmarkTagsString(bookmark)%>" /> - <input type="image" src="img/edit.png" title="Edit"/> - </form> </td> - <td class="result"> - <%=bookmark.getClick()%> - </td> + <% + } + %> </tr> - <% - } - %> + <br /> </table> + <% - List<Bookmark> lastBookmarks = bookmarkActions.getLastBookmarks(); - if (!lastBookmarks.isEmpty()) { + } + } else { %> + <h2 class="result">No Bookmarks</h2> + <% } + %> + <% + List<Bookmark> lastBookmarks = bookmarkActions.getLastBookmarks(); + if (!lastBookmarks.isEmpty()) { + %> <h2 class="result">The last addition bookmarks</h2> + <% + for (Bookmark bookmark : lastBookmarks) { + %> <table class="result"> <tr class="result"> - <th class ="result remove"> - remove + <th> + + <div style="float: left"> + <input type="image" src="img/img.png" title="bookmark" /> + <%=bookmark.getAlias()%> + (<%=sdf.format(bookmark.getDate())%>) + </div> + + <div style="float: right"> + <input type="image" src="img/edit.png" title="Edit" onclick="modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=bookmark.getLink()%>', 'bow?action=modifyBookmark&bookmarkId=<%=bookmark.getWikittyId()%>')"/> + <a style="border:none;text-decoration: none" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"> + <IMG style="border:none;" SRC="img/remove.png" ALT="Remove bookmark" TITLE="Remove" /> + </a> + </div> + </th> - <th class="result date"> - Date - </th> - <th class="result name"> - Name - </th> - <th class ="result tags"> - Tags - </th> - <th class=" result click"> - Click - </th> </tr> - <% - for (Bookmark bookmark : lastBookmarks) { - %> - <tr class="result"> + + <tr> <td class="result"> - <a style="border:none;" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"> - <IMG style="border:none;" SRC="img/remove.png" ALT="Remove bookmark" TITLE="Remove" /> - </a> - </td> - <td class="result"> - <%=sdf.format(bookmark.getDate())%> - </td> - <% - String alias = bookmark.getAlias(); - if (alias != null && !alias.isEmpty()) { - alias = url + "alias/" + alias; - } - %> - <td class="result" style="text-align: left"> - <a title ="<%=alias%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a> - <form method="POST" action="bow?action=addAlias&bookmarkId=<%=bookmark.getWikittyId()%>" style="display: inline"> - <input type="text" name="alias" size="10" value="<%=bookmark.getAlias()%>" /> - <input style="display: inline;" type="submit" value="Add alias" /> - </form> - <form method="POST" action="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"> - <input type="text" name="name" size="35" value="<%=bookmark.getDescription()%>" /> - <input type="image" src="img/edit.png" title="Edit"/> - </form> - </td> - <td class="result" style="text-align: left"> - <% - Set<String> tagList = bookmark.getTags(); - if (tagList != null && !tagList.isEmpty()) { - for (String tag : tagList) { - %> - <div style="display: inline"> - <a style="text-decoration:none" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>"> + <div class="test"> + Clicks: + <br /> + <%=bookmark.getClick()%> + </div> + <div style="float: left; margin: 5px;"> + <input type="image" src="img/img.png" title="bookmark" /> + </div> + + <div style="float: left;margin: 5px"> + <a title ="<%=bookmark.getLink()%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a> + <br /> + tags : + <% + Set<String> tagList = bookmark.getTags(); + if (tagList != null && !tagList.isEmpty()) { + for (String tag : tagList) { + %> + <a id="delete" style="display:none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" > <IMG style="border:none;" SRC="img/delete.png" ALT="Delete tag" TITLE="Delete" /> </a> - <a href="bow?action=search&addTag=<%=tag%>" style="text-decoration: none"><%=tag%></a> - </div> - <% + <a href="bow?action=search&searchLine=<%=tag%>" style="text-decoration: none"><%=tag%></a> + <% } - } - %> - <form method="POST" action="bow?action=editBookmark&bookmarkId=<%=bookmark.getWikittyId()%>"> - <input type="text" name="tags" size="35" value="<%=BookmarkActions.getBookmarkTagsString(bookmark)%>" /> - <input style="display: inline" type="image" src="img/edit.png" title="Edit"/> - </form> + %> + </div> </td> - <td class="result"> - <%=bookmark.getClick()%> - </td> - </tr> - <% + <% } - %> + %> + </tr> + <br /> </table> + <% - } - } else { + } + } else { %> <h2 class="result">No Bookmarks</h2> - <% } - } + <% } %> + </div> <div id="menu"> <div class="menu"> @@ -206,20 +179,22 @@ </ul> </div> <div class="menu"> - <form method="POST" action="bow?action=addUrl"> + <form id="bookmarkForm" method="POST" action="bow?action=addUrl"> URL<br /> <input type="text" name="url" size="20" value="URL" /><br /> Name<br /> <input type="text" name="name" size="20" value="name" /><br /> Tags<br /> <input type="text" name="tags" size="20" value="tag1 tag2..." /><br /> - <input type="submit" value="add" /> + Alias<br /><input type="text" name="alias" size="20" value="alias" /><br /> + <input type="submit" name="submit" value="add" /> </form> </div> <div class="menu"> <div class="tagCloud"> - <% if (bookmarkActions != null) { + <% if (bookmarkActions + != null) { List<FacetTopic> tagCloud = bookmarkActions.getTagsCloud(); for (FacetTopic tag : tagCloud) { int value = tag.getCount(); Modified: trunk/src/main/webapp/main.jsp =================================================================== --- trunk/src/main/webapp/main.jsp 2010-06-03 08:18:34 UTC (rev 65) +++ trunk/src/main/webapp/main.jsp 2010-06-03 16:03:39 UTC (rev 66) @@ -18,7 +18,7 @@ <% if (searchLine != null) { %> - <jsp:include page="search.jsp" flush="true"> + <jsp:include page="search2.jsp" flush="true"> <jsp:param name="bookmarkActions" value="<%=tokenActions%>" /> <jsp:param name="bookmarkActions" value="<%=bookmarkActions%>" /> <jsp:param name="bowUrl" value="<%=url%>"/> Modified: trunk/src/main/webapp/search.jsp =================================================================== --- trunk/src/main/webapp/search.jsp 2010-06-03 08:18:34 UTC (rev 65) +++ trunk/src/main/webapp/search.jsp 2010-06-03 16:03:39 UTC (rev 66) @@ -18,7 +18,6 @@ String searchLine = bookmarkActions.getSearchLine(); String fullText = bookmarkActions.getFullTextLine(); String url = (String) request.getAttribute("bowUrl"); - String version = (String) request.getAttribute("version"); %> <body> @@ -149,7 +148,7 @@ <input type="text" name="name" size="20" value="name" /><br /> Tags<br /> <input type="text" name="tags" size="20" value="tag1 tag2..." /><br /> - <input type="submit" value="add" /> + <input name="submit" type="submit" value="add" /> </form> </div> Added: trunk/src/main/webapp/search2.jsp =================================================================== --- trunk/src/main/webapp/search2.jsp (rev 0) +++ trunk/src/main/webapp/search2.jsp 2010-06-03 16:03:39 UTC (rev 66) @@ -0,0 +1,183 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@page import="org.chorem.bow.Bookmark" %> +<%@page import="org.chorem.bow.BookmarkActions" %> +<%@page import="java.text.SimpleDateFormat" %> +<%@page import="java.util.Iterator" %> +<%@page import="java.util.Set" %> +<%@page import="java.util.ArrayList" %> +<%@page import="java.util.List" %> +<%@page import="org.chorem.bow.TokenActions" %> +<%@page import="org.nuiton.wikitty.FacetTopic" %> + +<% + TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions"); + BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions"); + if (tokenActions != null && bookmarkActions != null) { + String temporaryToken = tokenActions.getTemporaryToken(); + String permanentToken = tokenActions.getPermanentToken(); + String searchLine = bookmarkActions.getSearchLine(); + String fullText = bookmarkActions.getFullTextLine(); + String url = (String) request.getAttribute("bowUrl"); +%> + +<body> + <div id="table"> + <h1 class="result"> + <a style="float: left;font-size: 12px; margin-left: 10px;" href="<%=url%>bow?action=home">home</a> + My Bookmarks + </h1> + <div style="text-align: center"> + Date + <a style="text-decoration:none" href="bow?action=orderAsc&type=date&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" > + <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" /> + </a> + <a style="text-decoration:none" href="bow?action=orderDesc&type=date&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"> + <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" /> + </a> + Name + <a style="text-decoration:none" href="bow?action=orderAsc&type=name&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"> + <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" /> + </a> + <a style="text-decoration:none" href="bow?action=orderDesc&type=name&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"> + <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" /> + </a> + Click + <a style="text-decoration:none" href="bow?action=orderAsc&type=click&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"> + <IMG style="border:none" SRC="img/asc.png" ALT="order ASC" TITLE="Asc" /> + </a> + <a style="text-decoration:none" href="bow?action=orderDesc&type=click&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"> + <IMG style="border:none" SRC="img/desc.png" ALT="order DESC" TITLE="Desc" /> + </a> + </div> + <br /> + <% + List<Bookmark> bookmarkList = bookmarkActions.getBookmarks(); + if (!bookmarkList.isEmpty()) { + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); + for (Bookmark bookmark : bookmarkList) { + %> + <table class="result"> + <tr class="result"> + <th> + + <div style="float: left"> + <input type="image" src="img/img.png" title="bookmark" /> + <%=bookmark.getAlias()%> + (<%=sdf.format(bookmark.getDate())%>) + </div> + + <div style="float: right"> + <input type="image" src="img/edit.png" title="Edit" onclick="modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=bookmark.getLink()%>', 'bow?action=modifyBookmark&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>&bookmarkId=<%=bookmark.getWikittyId()%>')"/> + <a style="border:none;text-decoration: none" href="bow?action=removeBookmark&bookmarkId=<%=bookmark.getWikittyId()%>&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"> + <IMG style="border:none;" SRC="img/remove.png" ALT="Remove bookmark" TITLE="Remove" /> + </a> + </div> + + </th> + </tr> + + <tr> + <td class="result"> + <div class="test"> + Clicks: + <br /> + <%=bookmark.getClick()%> + </div> + <div style="float: left; margin: 5px;"> + <input type="image" src="img/img.png" title="bookmark" /> + </div> + + <div style="float: left;margin: 5px"> + <a title ="<%=bookmark.getLink()%>" href="bow?action=addClick&bookmarkId=<%=bookmark.getWikittyId()%>" target="_blank"><%=bookmark.getDescription()%></a> + <br /> + tags : + <% + Set<String> tagList = bookmark.getTags(); + if (tagList != null && !tagList.isEmpty()) { + for (String tag : tagList) { + %> + <a id="delete" style="display:none;" href="bow?action=deleteTag&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%>" > + <IMG style="border:none;" SRC="img/delete.png" ALT="Delete tag" TITLE="Delete" /> + </a> + <a href="bow?action=search&searchLine=<%=tag%>" style="text-decoration: none"><%=tag%></a> + <%}%> + </div> + </td> + <% + } + %> + </tr> + </table> + <br /> + <% + } + } else { + %> + <h2 class="result">No Bookmarks</h2> + <% } + %> + </div> + + <div id="menu"> + <div class="menu"> + <ul id="meta"> + <li><a href="bow?action=logout">Logout</a></li> + <li><a href="bow?action=home">Home</a></li> + <li><a href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');var%20link='<%=url%>bow?action=addUrl&token=<%=temporaryToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);void(0);">Temporary token</a></li> + <li><a href="javascript:var%20url=location.href;var%20nameAndTags=prompt('Entrez%20le%20nom%20du%20lien%20et%20la%20liste%20des%20tags%20sous%20la%20forme:%20name|tag1%20tag2%20tag3',%20document.title+'|');var%20link='<%=url%>bow?action=addUrl&token=<%=permanentToken%>&url='+encodeURIComponent(url)+'&nameAndTags='+encodeURIComponent(nameAndTags);var%20script=document.createElement('script');script.src=link;script.type='text/javascript';document.body.appendChild(script);void(0);">Current permanent token</a></li> + <li><a href="bow?action=generateToken&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Regenerate permanent token</a></li> + </ul> + </div> + <div class="menu"> + <form id="bookmarkForm" method="POST" action="bow?action=addUrl&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>"> + URL<br /> + <input type="text" name="url" size="20" value="URL" /><br /> + Name<br /> + <input type="text" name="name" size="20" value="name" /><br /> + Tags<br /> + <input type="text" name="tags" size="20" value="tag1 tag2..." /><br /> + Alias<br /> + <input type="text" name="alias" size="20" value="alias" /><br /> + <input type="submit" name="submit" value="add" /> + </form> + </div> + + <div class="menu"> + <div class="tagCloud"> + <% if (bookmarkActions != null) { + List<FacetTopic> tagCloud = bookmarkActions.getTagsCloud(); + for (FacetTopic tag : tagCloud) { + int value = tag.getCount(); + String tagName = tag.getTopicName(); + int font = bookmarkActions.getFont(value); + %> + <a href="bow?action=search&addTag=<%=tagName%>&searchLine=<%=searchLine%>" title="<%=value%> results" class="tag" style="font-size: <%=font%>px;"><%=tagName%></a> + <% + } + } + %> + <form method="POST" action="bow?action=search" style="text-align: center;margin-left: 20px;"> + <input style="float: left" type="text" name="searchLine" size="15" value="<%=searchLine%>" /> + <input style="float: left" type="submit" value="Find" /> + </form> + </div> + <div class="menu"> + <form method="POST" action="bow?action=fullText" style="text-align: center;"> + Full text research + <input style="float: left" type="text" name="fullTextLine" size="15" value="<%=bookmarkActions.getFullTextLine()%>" /> + <input style="float: left;" type="submit" value="Find" /> + </form> + </div> + <div class="menu"> + <form method="post" action="bow?action=importBookmarks&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>" enctype="multipart/form-data"> + Import Bookmarks + <input type="file" name="upfile" /> + <input type="submit" value="Import"/> + </form> + <br /> + <a href="bow?action=exportBookmarks&searchLine=<%=searchLine%>&fullTextLine=<%=fullText%>">Export bookmarks</a> + </div> + </div> + </div> +</body> +<%}%> \ No newline at end of file