r163 - in trunk/src/main: resources/i18n webapp/jsp webapp/jsp/inc
Author: vbriand Date: 2011-01-06 10:56:50 +0100 (Thu, 06 Jan 2011) New Revision: 163 Url: http://chorem.org/repositories/revision/bow/163 Log: The bookmarks are now displayed on the home page Modified: trunk/src/main/resources/i18n/bow_en_GB.properties trunk/src/main/resources/i18n/bow_fr_FR.properties trunk/src/main/webapp/jsp/inc/bookmark.jsp trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp trunk/src/main/webapp/jsp/inc/errorFrame.jsp trunk/src/main/webapp/jsp/login.jsp Modified: trunk/src/main/resources/i18n/bow_en_GB.properties =================================================================== --- trunk/src/main/resources/i18n/bow_en_GB.properties 2011-01-05 21:58:10 UTC (rev 162) +++ trunk/src/main/resources/i18n/bow_en_GB.properties 2011-01-06 09:56:50 UTC (rev 163) @@ -15,6 +15,9 @@ bow.forgotPassword.emailDoesntExist= bow.forgotpwd.submit=Send bow.forgotpwd.title=Forgot your password? +bow.home.latestBookmarks= +bow.home.mostUsedBookmarks= +bow.home.noBookmarks= bow.home.title= bow.label.locale.english= bow.label.locale.french= Modified: trunk/src/main/resources/i18n/bow_fr_FR.properties =================================================================== --- trunk/src/main/resources/i18n/bow_fr_FR.properties 2011-01-05 21:58:10 UTC (rev 162) +++ trunk/src/main/resources/i18n/bow_fr_FR.properties 2011-01-06 09:56:50 UTC (rev 163) @@ -15,6 +15,9 @@ bow.forgotPassword.emailDoesntExist= bow.forgotpwd.submit=Envoyer bow.forgotpwd.title=Vous avez oubli\u00E9 votre mot de passe ? +bow.home.latestBookmarks= +bow.home.mostUsedBookmarks= +bow.home.noBookmarks= bow.home.title= bow.label.locale.english= bow.label.locale.french= Modified: trunk/src/main/webapp/jsp/inc/bookmark.jsp =================================================================== --- trunk/src/main/webapp/jsp/inc/bookmark.jsp 2011-01-05 21:58:10 UTC (rev 162) +++ trunk/src/main/webapp/jsp/inc/bookmark.jsp 2011-01-06 09:56:50 UTC (rev 163) @@ -23,6 +23,7 @@ #L% --> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@taglib prefix="s" uri="/struts-tags" %> <%@page import="org.chorem.bow.BowConfig" %> <%@page import="org.chorem.bow.Bookmark" %> <%@page import="java.text.SimpleDateFormat" %> @@ -43,6 +44,7 @@ if (fullTextLine != null) { search += "&fullTextLine=" + fullTextLine; } +url = "toto"; //TODO: à changer if (url != null && bookmark != null && sdf != null && bookmarkActions != null) { String formBookmarkId = (String) request.getAttribute("formBookmarkId"); String link = bookmark.getLink(); @@ -54,8 +56,14 @@ <%=bookmark.getAlias()%> </a> <p class="date"> (<%=sdf.format(bookmark.getDate())%>)</p> - <a class="edit" href="/bow/editBookmark.action&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', 'bow/modifyBookmark.action&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>', '<%=bookmark.getWikittyId()%>');"></a> - <a class="supprim" href="/bow/removeBookmark.action&bookmarkId=<%=bookmark.getWikittyId()%><%=search%>"></a> + <s:url id="editBookmark" action="editBookmark"> + <s:param name="bookmarkId"><%=bookmark.getWikittyId()%><%=search%></s:param> + </s:url> + <s:a cssClass="edit" href="%{editBookmark}" onclick="return modify('<%=bookmark.getDescription()%>', '<%=bookmark.getAlias()%>', '<%=BookmarkActions.getBookmarkTagsString(bookmark)%>', '<%=link%>', %{editBookmark}, '<%=bookmark.getWikittyId()%>');"></s:a> + <s:url id="removeBookmark" action="removeBookmark"> + <s:param name="bookmarkId"><%=bookmark.getWikittyId()%><%=search%></s:param> + </s:url> + <s:a cssClass="supprim" href="%{removeBookmark}"></s:a> </div> <div class="bookmarkcontenu"> <div class="screenshot"></div> @@ -63,7 +71,11 @@ <div class="description"> <h3>Description :</h3> <p> - <a title ="<%=bookmark.getLink()%>" href="/bow/addClick.action&bookmarkId=<%=bookmark.getWikittyId()%>" onclick="window.open(this.href); return false;"><%=bookmark.getDescription()%></a> + <s:url id="addClick" action="addClick"> + <s:param name="bookmarkId"><%=bookmark.getWikittyId()%></s:param> + </s:url> + <s:a title="" href="%{addClick}" onclick="window.open(this.href); return false;"><%=bookmark.getDescription()%></s:a> + <!-- <%=bookmark.getLink()%>--> </p> <p class="tags"> <strong>Tags :</strong> @@ -71,19 +83,29 @@ Set<String> tagList = bookmark.getTags(); if (tagList != null && !tagList.isEmpty()) { for (String tag : tagList) { + %> + <s:url id="deleteTag" action="deleteTag"> + <s:param name="bookmarkId"><%=bookmark.getWikittyId()%></s:param> + <s:param name="deleteTag"><%=tag%><%=search%></s:param> + </s:url> + <% if (formBookmarkId != null && formBookmarkId.equals(bookmark.getWikittyId())) { %> - <a style="text-decoration: none;" href="/bow/deleteTag.action&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%><%=search%>"> + <s:a cssStyle="text-decoration: none;" href="%{deleteTag}"> <img style="border:none;" src="img/delete.png" alt="Delete tag" title="Delete" /> - </a> + </s:a> <% } else { %> - <a name="<%=bookmark.getWikittyId()%>" style="display:none; text-decoration: none;" href="/bow/deleteTag.action&bookmarkId=<%=bookmark.getWikittyId()%>&deleteTag=<%=tag%><%=search%>"> + <!-- <%=bookmark.getWikittyId()%> --> + <s:a name="" cssStyle="display:none; text-decoration: none;" href="%{deleteTag}"> <img style="border:none;" src="img/delete.png" alt="Delete tag" title="Delete" /> - </a> + </s:a> <% } %> - <a href="/bow/search.action&searchLine=<%=tag%>" style="text-decoration: none"><%=tag%></a> + <s:url id="search" action="search"> + <s:param name="searchLine"><%=tag%></s:param> + </s:url> + <s:a href="%{search}" cssStyle="text-decoration: none"><%=tag%></s:a> <% } } Modified: trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp =================================================================== --- trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp 2011-01-05 21:58:10 UTC (rev 162) +++ trunk/src/main/webapp/jsp/inc/bookmarkTop.jsp 2011-01-06 09:56:50 UTC (rev 163) @@ -37,13 +37,11 @@ TokenActions tokenActions = (TokenActions) session.getAttribute("tokenActions"); BookmarkActions bookmarkActions = (BookmarkActions) request.getAttribute("bookmarkActions"); Boolean admin = (Boolean) session.getAttribute("admin"); -if (admin == null) -{ +if (admin == null) { admin = false; } -if (tokenActions != null && bookmarkActions != null) -{ +if (tokenActions != null && bookmarkActions != null) { String temporaryToken = tokenActions.getTemporaryToken(); String permanentToken = tokenActions.getPermanentToken(); String url = (String) request.getAttribute("bowUrl"); @@ -52,8 +50,7 @@ } int tags = preference.getTags(); -if (preference != null && tags > 0) -{ +if (preference != null && tags > 0) { nbTags = tags; } @@ -64,43 +61,33 @@ String formAlias = (String) request.getAttribute("alias"); String formAction = (String) request.getAttribute("action"); -if (formLink == null) -{ +if (formLink == null) { formLink = "URL"; } -if (formName == null) -{ +if (formName == null) { formName = "name"; } -if (formTags == null) -{ +if (formTags == null) { formTags = "tag1 tag2..."; } -if (formAlias == null) -{ +if (formAlias == null) { formAlias = "alias"; } -if (formAction == null) -{ +if (formAction == null) { formAction = "bow?action=addUrl"; } -if (tokenActions != null && bookmarkActions != null) -{ - if (searchLine != null) - { +if (tokenActions != null && bookmarkActions != null) { + if (searchLine != null) { String searchLine = bookmarkActions.getSearchLine(); String fullText = bookmarkActions.getFullTextLine(); - } - else - { - if (preference != null && preference.getBookmarks() > 0) - { + } else { + if (preference != null && preference.getBookmarks() > 0) { nbBookmarks = preference.getBookmarks(); } } -%> +%> \ No newline at end of file Modified: trunk/src/main/webapp/jsp/inc/errorFrame.jsp =================================================================== --- trunk/src/main/webapp/jsp/inc/errorFrame.jsp 2011-01-05 21:58:10 UTC (rev 162) +++ trunk/src/main/webapp/jsp/inc/errorFrame.jsp 2011-01-06 09:56:50 UTC (rev 163) @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <% -String userError = (String) request.getAttribute("errorMsgUser"); -String techError = (String) request.getAttribute("errorMsgTech"); +String userError = (String)request.getAttribute("errorMsgUser"); +String techError = (String)request.getAttribute("errorMsgTech"); if (userError != null) { %> Modified: trunk/src/main/webapp/jsp/login.jsp =================================================================== --- trunk/src/main/webapp/jsp/login.jsp 2011-01-05 21:58:10 UTC (rev 162) +++ trunk/src/main/webapp/jsp/login.jsp 2011-01-06 09:56:50 UTC (rev 163) @@ -24,10 +24,10 @@ </p> </s:form> <s:url id="localeEN" action="login_input"> - <s:param name="request_locale" >en_GB</s:param> + <s:param name="request_locale">en_GB</s:param> </s:url> <s:url id="localeFR" action="login_input"> - <s:param name="request_locale" >fr_FR</s:param> + <s:param name="request_locale">fr_FR</s:param> </s:url> <s:a href="%{localeEN}">English</s:a><br />
participants (1)
-
vbriand@users.chorem.org