Skip to content

Commit

Permalink
Added base configuration for user administration
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlau committed Jul 2, 2013
1 parent bc092dc commit f76287f
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.RequestMapping

[Controller]
[RequestMapping(array("/administration"))]
public class AdministrationController {

[RequestMapping(array("/administration"))]
[RequestMapping]
fun index() = ".administration.index"

[RequestMapping(array("/users"))]
fun users() = ".administration.users"

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
administration.index.title=Administration

administration.users.title=User administration

common.footer.change-theme=Change theme
common.footer.back-to-top=Back to top
common.footer.privacy=Privacy
Expand Down
31 changes: 31 additions & 0 deletions fixture-web/src/main/webapp/WEB-INF/jspx/administration/users.jspx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:spring="http://www.springframework.org/tags"
version="2.0">

<h2>
<spring:message code="administration.users.title"/>
</h2>

<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
In laborum magni molestiae nostrum perspiciatis, quam quis.
Earum et laborum sit soluta! Aliquam incidunt labore natus praesentium rem sapiente sint voluptatem.
</p>

<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>

<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>

</jsp:root>
9 changes: 7 additions & 2 deletions fixture-web/src/main/webapp/WEB-INF/tiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
<add-attribute value="/static/html5shiv/3.6.2/html5shiv.min.js" />
</put-list-attribute>
<put-list-attribute name="headLinks" cascade="true" inherit="true">
<add-attribute value="/static/font-awesome/3.1.1/css/font-awesome.min.css"/>
<add-attribute value="/static/font-awesome/3.2.1/css/font-awesome.min.css"/>
<add-attribute value="/static/bootswatch/2.3.1/css/bootswatch.css"/>
<add-attribute value="/resources/css/fixture.css"/>
</put-list-attribute>
<put-list-attribute name="bodyScripts" cascade="true" inherit="true">
<add-attribute value="/static/jquery/2.0.0/jquery.min.js"/>
<add-attribute value="/static/jquery/2.0.2/jquery.min.js"/>
<add-attribute value="/static/bootswatch/2.3.1/js/bootstrap.min.js"/>
<add-attribute value="/static/bootswatch/2.3.1/js/bootswatch.js"/>
</put-list-attribute>
Expand All @@ -26,6 +26,11 @@
<put-attribute name="title" type="string" value="fixture.io - Administration"/>
</definition>

<definition name=".administration.users" extends=".base.template">
<put-attribute name="body" type="template" value="/WEB-INF/jspx/administration/users.jspx"/>
<put-attribute name="title" type="string" value="fixture.io - User administration"/>
</definition>

<definition name=".common.*" template="/WEB-INF/jspx/common/{1}.jspx"/>

<definition name=".secure.index" extends=".base.template">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ class AdministrationControllerTest {
assertEquals(".administration.index", subject.index())
}

[Test]
fun testUsers() {

assertEquals(".administration.users", subject.users())
}

}

0 comments on commit f76287f

Please sign in to comment.