1. Juan Carlos Picado Herrera
  2. encuestame

Commits

Juan Carlos Picado Herrera  committed 3e63442

ENCUESTAME-239, minor changes

  • Participants
  • Parent commits 6d7112c
  • Branches master

Comments (0)

Files changed (7)

File encuestame-business/src/main/java/org/encuestame/business/service/SecurityService.java

View file
  • Ignore whitespace
         // SecUsers userD = getUser(user.getUsername());
         // SecPermission perD = loadPermission(permission.getPermission());
         //assingGroup(user, group);
+        //TODO: ????/ emtpy??
     }
 
 

File encuestame-core/src/main/java/org/encuestame/core/util/ConvertDomainBean.java

View file
  • Ignore whitespace
         unitTweetPoll.setSchedule(tweetPoll.getScheduleTweetPoll() == null ? false : tweetPoll.getScheduleTweetPoll());
         unitTweetPoll.setResultNotification(tweetPoll.getResultNotification() == null ? false : tweetPoll.getResultNotification());
         unitTweetPoll.setUserId(tweetPoll.getTweetOwner().getUid());
-        unitTweetPoll.setOwnerUsername(tweetPoll.getEditorOwner().getUsername());
+        unitTweetPoll.setOwnerUsername(tweetPoll.getEditorOwner() == null ? null : tweetPoll.getEditorOwner().getUsername());
         unitTweetPoll.setCaptcha(tweetPoll.getCaptcha() == null ? false : tweetPoll.getCaptcha());
         unitTweetPoll.setCloseNotification(tweetPoll.getCloseNotification() == null ? false : tweetPoll.getCloseNotification());
         unitTweetPoll.setFavourites(tweetPoll.getFavourites() == null ? false : tweetPoll.getFavourites());

File encuestame-mvc/src/main/java/org/encuestame/mvc/view/PictureProfileFactoryController.java

View file
  • Ignore whitespace
 import org.encuestame.mvc.controller.AbstractBaseOperations;
 import org.encuestame.persistence.exception.EnMeNoResultsFoundException;
 import org.springframework.stereotype.Controller;
-import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
     @RequestMapping( value = "/picture/profile/{username}/thumbnail", method = RequestMethod.GET )
     @ResponseBody
     public byte[] getPictureThumbnail(
-            @PathVariable String username ) throws EnMeNoResultsFoundException{
+            @PathVariable String username) throws EnMeNoResultsFoundException{
         byte[] bytes = {};
         try {
             bytes = getPictureService().getProfilePicture(username, PictureType.THUMBNAIL);

File encuestame-mvc/src/main/java/org/encuestame/mvc/view/UserProfileController.java

View file
  • Ignore whitespace
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.encuestame.mvc.controller.AbstractBaseOperations;
+import org.encuestame.utils.web.UserAccountBean;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.PathVariable;
     public String tweetPollController(
             final ModelMap model,
             @PathVariable String username) {
-
-
-
-        return "profile/view";
+        username = filterValue(username);
+        final UserAccountBean accountBean = getSecurityService().searchUserByUsername(username);
+        if (accountBean == null) {
+            return "404";
+        } else {
+            log.debug("user "+accountBean);
+            model.put("profile", accountBean);
+            return "profile/view";
+        }
     }
 }

File encuestame-war/src/main/webapp/WEB-INF/layouts/standard/header.jsp

View file
  • Ignore whitespace
 <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
 <div id="publicLineHeader">
         <div class="logo">
-            <a href="<%=request.getContextPath()%>">
+            <a href="<%=request.getContextPath()%>/">
                 <img alt="logo" src="<%=request.getContextPath()%>/resources/${logo}">
             </a>
         </div>

File encuestame-war/src/main/webapp/WEB-INF/views/home/web/home.jsp

View file
  • Ignore whitespace
                                     <img width="32" height="32" alt=""
                                     src="http://www.gravatar.com/avatar/6757caf55de0413ae0994293e001d465?s=32&amp;d=identicon&amp;r=PG"/>
                             </div>
-                            <div>(Submited By <strong><a href="#">${item.ownerUsername}</a></strong>) added <strong>${item.relativeTime}</strong></div>
-                            <div><img src="/resources/images/icons/enme_comment_reply.png"/> 25 Comments</div>
-
+                            <div>(Submited By <strong>
+                                                <a href="<%=request.getContextPath()%>/profile/${item.ownerUsername}">${item.ownerUsername}</a>
+                                              </strong>) added <strong>${item.relativeTime}</strong></div>
+                            <div>
+                                <img src="/resources/images/icons/enme_comment_reply.png"/> 25 Comments
+                            </div>
                        </div>
                        <div class="tags">
                             <c:forEach items="${item.hashTags}" var="h">

File encuestame-war/src/main/webapp/WEB-INF/views/home/web/profile.jsp

View file
  • Ignore whitespace
 <%@ include file="/WEB-INF/jsp/includes/taglibs.jsp"%>
-<div>Cloud Page</div>
- <c:forEach items="${hashtags}" var="cloud">
-     <span class="item" style="font-size: ${cloud.size}px;">
-         <a href="<%=request.getContextPath()%>/tag/${cloud.hashTagName}/">${cloud.hashTagName}</a>
-     </span>
-   </c:forEach>
+<div class="profile">
+<h2>${profile.username}</h2>
+
+
+<div>
+    <ul>
+    <li>
+        rss : <a href="<%=request.getContextPath()%>/feed/${profile.username}/tweetpoll.rss">TweetPoll RSS for ${profile.username}</a>
+   </li>
+   <li>
+        atom : <a href="<%=request.getContextPath()%>/feed/${profile.username}/tweetpoll.atom">TweetPoll ATOM for ${profile.username}</a>
+    </li>
+    </ul>
+
+</div>
+
+</div>