Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added about page and updated some stub home page content to point to …

…about page. Added freemarker macros to clean dashboard sidebar.
  • Loading branch information...
commit 7d1d05f7ff16ec40abe340f1c8c776b1af9ef351 1 parent 5491a5e
@ngerakines authored
View
20 src/main/java/com/socklabs/whoisthat/mvc/controller/AboutController.java
@@ -0,0 +1,20 @@
+package com.socklabs.whoisthat.mvc.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+/**
+ * The controller for the about page.
+ * @author ngerakines
+ * @since 2/25/12
+ */
+@Controller
+public class AboutController {
+
+ @RequestMapping(value = "/about", method = RequestMethod.GET)
+ public String getAbout() {
+ return "about";
+ }
+
+}
View
2  src/main/java/com/socklabs/whoisthat/mvc/controller/DashboardController.java
@@ -66,6 +66,8 @@ public String getIndex(
modelMap.addAttribute("lastPage", offset - count);
modelMap.addAttribute("nextPage", offset + count);
+ modelMap.addAttribute("dashboardFilter", "all");
+
List<AccountMeta> accountMetaList = account.getAccountMetaList();
Map<String, Integer> counts = getCountsDefault();
View
8 src/main/java/com/socklabs/whoisthat/mvc/controller/HomeController.java
@@ -10,11 +10,9 @@
import java.util.Map;
/**
- * Created by IntelliJ IDEA.
- * User: ngerakines
- * Date: 2/19/12
- * Time: 6:41 PM
- * To change this template use File | Settings | File Templates.
+ * The controller for the home page.
+ * @author ngerakines
+ * @since 2/19/12
*/
@Controller
public class HomeController {
View
3  src/main/resources/springSecurityConfig.xml
@@ -13,10 +13,11 @@
<http pattern="/static/**" security="none"/>
<http auto-config="true" access-denied-page="/denied" >
<intercept-url pattern="/" access="IS_AUTHENTICATED_ANONYMOUSLY" />
+ <intercept-url pattern="/about" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<intercept-url pattern="/login" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<intercept-url pattern="/register" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<intercept-url pattern="/**" access="ROLE_USER" />
- <form-login login-page="/login" authentication-failure-url="/login?login_error=1" default-target-url="/dashboard" />
+ <form-login login-page="/login" authentication-failure-url="/login?login_error=1" />
<logout logout-success-url="/" />
</http>
View
35 src/main/webapp/WEB-INF/ftl/about.ftl
@@ -0,0 +1,35 @@
+<#import "utils.ftl" as c />
+<@c.page>
+<div class="row-fluid">
+ <div class="span9">
+ <h1>5 Minute Intro</h1>
+ <p><a name="intro"> Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ </div>
+ <div class="span9">
+ <h2>Facebook</h2>
+ <p><a name="facebook"> Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ <h2>GitHub</h2>
+ <p><a name="github"> Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ <h2>Twitter</h2>
+ <p><a name="twitter"> Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ </div>
+ <div class="span9">
+ <h1>Features</h1>
+ <p><a name="features"> Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ <h1>Notes</h1>
+ <p><a name="notes"> Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ <h1>Aliases and Relationships</h1>
+ <p><a name="aliases"> Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ <h1>Orphans</h1>
+ <p><a name="orphans"> Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ <h1>Import / Export</h1>
+ <p><a name="yourdata"> Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+ </div>
+</div>
+<div class="row-fluid">
+ <div class="span9">
+ <h1>Meta</h1>
+ <p>This site was created by <a href="http://socklabs.com/">Nick Gerakines</a>. It is <a href="https://github.com/ngerakines/whoisthat">open source software</a> built with Java, Spring and Bootstrap.</p>
+ </div>
+</div>
+</@c.page>
View
27 src/main/webapp/WEB-INF/ftl/dashboard.ftl
@@ -1,21 +1,36 @@
<#import "utils.ftl" as c />
+<#macro connectionLink counts key url label displayEmpty current>
+<#if counts[key] &gt; 0 >
+<#if current >
+<li class="active">${label} (${counts[key]})</li>
+<#else>
+<li><a href="${url}">${label} (${counts[key]})</a></li>
+</#if>
+<#else>
+<#if displayEmpty>
+<li<#if current > class="active"</#if>>${label} (0)</li>
+</#if>
+</#if>
+</#macro>
<@c.page>
<div class="row-fluid">
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
<li class="nav-header">Connections</li>
- <li class="active">All</li>
- <li><a href="/dashboard/user">User (${counts['user']})</a></li>
- <li><a href="/dashboard/facebook">Facebook (${counts['facebook']})</a></li>
- <li><a href="/dashboard/twitter">Twitter (${counts['twitter']})</a></li>
- <li><a href="/dashboard/github">GitHub (${counts['github']})</a></li>
- <li><a href="/dashboard/foursquare">FourSquare (${counts['foursquare']})</a></li>
+ <li <#if dashboardFilter == "all" > class="active"</#if>>All</li>
+ <@connectionLink counts 'user' '/dashboard/user' 'User' true dashboardFilter == "user"/>
+ <@connectionLink counts 'facebook' '/dashboard/facebook' 'Facebook' false dashboardFilter == "facebook" />
+ <@connectionLink counts 'twitter' '/dashboard/twitter' 'Twitter' false dashboardFilter == "twitter" />
+ <@connectionLink counts 'github' '/dashboard/github' 'GitHub' false dashboardFilter == "github" />
+ <@connectionLink counts 'foursquare' '/dashboard/foursquare' 'FourSquare' false dashboardFilter == "foursquare" />
<li class="nav-header">Utilities</li>
<li><a href="/utility/orphans">Orphans</a></li>
<li><a href="/utility/duplicates">Duplicates</a></li>
<li><a href="/utility/export">Export</a></li>
<li><a href="/utility/stats">Stats</a></li>
+ <li class="nav-header">Settings</li>
+ <li><a href="/connect">Connections</a></li>
</ul>
</div>
</div>
View
30 src/main/webapp/WEB-INF/ftl/home.ftl
@@ -3,42 +3,42 @@
<div class="row-fluid">
<div class="span9">
<div class="hero-unit">
- <h1>Hello, world!</h1>
- <p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
- <p><a class="btn btn-primary btn-large">Learn more &raquo;</a></p>
+ <h1>Who Is That? (App)</h1>
+ <p>WhoIsThatApp lets you sync and annotate your social network friend lists and circles.</p>
+ <p><a href="/about" class="btn btn-primary btn-large">Learn more &raquo;</a></p>
</div>
<div class="row-fluid">
<div class="span4">
- <h2>Heading</h2>
+ <h2>Facebook</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
- <p><a class="btn" href="#">View details &raquo;</a></p>
+ <p><a class="btn" href="/about#facebook">View details &raquo;</a></p>
</div><!--/span-->
<div class="span4">
- <h2>Heading</h2>
+ <h2>Twitter</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
- <p><a class="btn" href="#">View details &raquo;</a></p>
+ <p><a class="btn" href="/about#twitter">View details &raquo;</a></p>
</div><!--/span-->
<div class="span4">
- <h2>Heading</h2>
+ <h2>GitHub</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
- <p><a class="btn" href="#">View details &raquo;</a></p>
+ <p><a class="btn" href="/about#github">View details &raquo;</a></p>
</div><!--/span-->
</div><!--/row-->
<div class="row-fluid">
<div class="span4">
- <h2>Heading</h2>
+ <h2>Add Notes</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
- <p><a class="btn" href="#">View details &raquo;</a></p>
+ <p><a class="btn" href="/about#notes">View details &raquo;</a></p>
</div><!--/span-->
<div class="span4">
- <h2>Heading</h2>
+ <h2>Create Aliases</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
- <p><a class="btn" href="#">View details &raquo;</a></p>
+ <p><a class="btn" href="/about#aliases">View details &raquo;</a></p>
</div><!--/span-->
<div class="span4">
- <h2>Heading</h2>
+ <h2>More</h2>
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
- <p><a class="btn" href="#">View details &raquo;</a></p>
+ <p><a class="btn" href="/about#features">View details &raquo;</a></p>
</div><!--/span-->
</div><!--/row-->
</div><!--/span-->
View
5 src/main/webapp/WEB-INF/ftl/utils.ftl
@@ -44,11 +44,12 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
- <a class="brand" href="#"><@spring.messageText "welcome", "Welcome!"/></a>
+ <a class="brand" href="/"><@spring.messageText "welcome", "Welcome!"/></a>
<div class="nav-collapse">
<ul class="nav">
<li class="active"><a href="/">Home</a></li>
- <li><a href="/dashboard">dashboard</a></li>
+ <li><a href="/about">About</a></li>
+ <li><a href="/dashboard">Dashboard</a></li>
<li><a href="/facebook">facebook</a></li>
<li><a href="/twitter">twitter</a></li>
</ul>
Please sign in to comment.
Something went wrong with that request. Please try again.