Skip to content
This repository has been archived by the owner on Oct 31, 2018. It is now read-only.

Commit

Permalink
Cleaned up file hierarchy and code. Integrated Signup and Register
Browse files Browse the repository at this point in the history
modals and menus. Integrated Language switcher and available locale
identifier. Updated index, contacts, and systeminfo page. Updated CSS
and Javascript.
  • Loading branch information
joergrech committed Oct 14, 2012
1 parent bab01df commit 077b4c8
Show file tree
Hide file tree
Showing 31 changed files with 1,498 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
groovy.compiler.level=18
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
org.grails.ide.eclipse.core.org.grails.ide.eclipse.core.install.name=Grails 2.1.1
org.grails.ide.eclipse.core.use.default.install=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package kickstart

class KickstartFilters {

def filters = {
all() {
before = {
// Small "logging" filter for controller & actions
println !params.controller ? '/: ' + params : params.controller +"."+(params.action ?: "index")+": "+params
// Better logging: needs to be switched on in Config.groovy and is a little bit verbose
// log.info(!params.controller ? '/: ' + params : params.controller +"."+(params.action ?: "index")+": "+params)

if (params.layout) session.layout = params.layout
if (params.skin) session.skin = params.skin
// if (!session.skin) session.skin = "bootstrap"

// Identify RTL (right-to-left) languages
if (params.lang) {
if (params.lang == "sa") session.menuposition = "right"
else session.menuposition = "left"
}
}
after = {
}
afterView = {
}
}
}
}
37 changes: 37 additions & 0 deletions kickstartWithBootstrap/grails-app/views/404.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<html>
<head>
<title>404 - Page Not Found!</title>
<meta name="layout" content="kickstart" />
</head>

<body>
<content tag="header">
<!-- Empty Header -->
</content>

<section id="Error" class="">
<div class="big-message">
<div class="container">
<h1>Oops!</h1>
<h2>404 Not Found</h2>
<p>
Sorry, an error has occured, Requested page not found!
</p>

<div class="actions">
<a href="./" class="btn btn-large btn-primary">
<i class="icon-chevron-left icon-white"></i>
Back to Home
</a>
<a href="/contact" class="btn btn-large">
<i class="icon-envelope"></i>
Contact Support
</a>
</div>
</div>
</div>
</section>


</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--
This button is used to call the show page.
-->

<!-- Button -->
<span class="">
<g:link action="edit" id="${item ? item.id : params.id}" role="button" class="btn btn-success btn-small" title="${message(code: 'default.button.edit.label', default: 'Edit')}">
<i class="icon-pencil icon-large"></i>
</g:link>
</span>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--
This button is used to call the show page.
-->

<!-- Button -->
<span class="">
<g:link action="show" id="${item ? item.id : params.id}" role="button" class="btn btn-small" title="${message(code: 'default.button.show.label', default: 'Show')}">
<i class="icon-eye-open icon-large"></i>
</g:link>
</span>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
This is the standard dialog that initiates the delete action.
-->

<!-- Modal dialog -->
<div id="DeleteModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="DeleteModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="DeleteModalLabel"><g:message code="default.button.delete.confirm.title" default="Delete Item"/></h3>
</div>
<div class="modal-body">
<p><g:message code="default.button.delete.confirm.message" args="[entityName]" default="Do you really want to delete this item?"/></p>
</div>
<div class="modal-footer">
<g:form>
<button class="btn" data-dismiss="modal" aria-hidden="true"><g:message code="default.button.cancel.label" default="Cancel"/></button>
<%-- <g:link action="delete" id="${params.id}" class="btn btn-danger">--%>
<%-- <g:message code="default.button.delete.label" default="Delete"/>--%>
<%-- </g:link>--%>
<g:hiddenField name="id" value="${item ? item.id : params.id}" />
<span class="button"><g:actionSubmit class="btn btn-danger" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}"/></span>
</g:form>

</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
This modal is used to show a button that initiates the delete action.
-->

<!-- Button to trigger modal -->
<span class="requiresJavascript"> <!-- Wrapped in a div to work around false colloring due to line 2484 in Bootstrap.css (.nav > li > a:hover) -->
<a href="#DeleteModal" role="button" class="btn btn-danger btn-small" data-toggle="modal" title="${message(code: 'default.button.delete.label', default: 'Delete')}">
<i class="icon-trash icon-large"></i>
</a>

<g:render template="/_common/modals/deleteDialog" model="[item: item]" plugin="SPECTRAwebPlugin"/>
</span>

<!-- delete button if no Javascript is available -->
<noscript>
<div class="button">
<!-- TODO: use a special action that will request to confim the deletion! (e.g., "deleteConfirm") -->
<g:link action="deleteConfirm" id="${item ? item.id : params.id}" role="button" class="btn btn-danger btn-small">
<i class="icon-trash"></i>
</g:link>
</div>
</noscript>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
This modal is used to show a button that initiates the delete action.
-->

<!-- Button to trigger modal if Javascript is available -->
<div class="requiresJavascript"> <!-- Wrapped in a div to work around false colloring due to line 2484 in Bootstrap.css (.nav > li > a:hover) -->
<a href="#DeleteModal" role="button" class="btn btn-danger" data-toggle="modal" title="${message(code: 'default.button.delete.label', default: 'Delete')}">
<g:message code="default.button.delete.label" default="Delete"/>
</a>

<g:render template="/_common/modals/deleteDialog" model="[item: item]" plugin="SPECTRAwebPlugin"/>
</div>

<!-- delete button if no Javascript is available -->
<noscript>
<g:form>
<g:hiddenField name="id" value="${item ? item.id : params.id}" />
<span class="button">
<!-- TODO: use a special action that will request to confim the deletion! (e.g., "deleteConfirm") -->
<g:actionSubmit action="delete" class="btn btn-danger"
value="${message(code: 'default.button.delete.label', default: 'Delete')}"
/>
</span>
</g:form>
</noscript>
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<div class="modal hide" id="RegisterModal">
<g:form controller="login" action="register" class="form-horizontal" method="post" name="register_form">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">x</button>
<h3><g:message code="security.register.title"/></h3>
</div>
<div class="modal-body">
<div class="control-group">
<label class="control-label" for="firstname">${message(code: 'security.firstname.button', default: 'Firstname')}</label>
<div class="controls">
<input type="text" class="span3" name="firstname" id="firstname" placeholder="${message(code: 'security.firstname.button', default: 'Firstname')}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="lastname">${message(code: 'security.lastname.button', default: 'Lastname')}</label>
<div class="controls">
<input type="text" class="span3" name="lastname" id="lastname" placeholder="${message(code: 'security.lastname.button', default: 'Lastname')}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">${message(code: 'security.email.button', default: 'Email')}</label>
<div class="controls">
<input type="text" class="span3" name="email" id="email" placeholder="${message(code: 'security.email.button', default: 'Email')}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="password">${message(code: 'security.password.button', default: 'Password')}</label>
<div class="controls">
<input type="password" class="span3" name="password" id="password" placeholder="${message(code: 'security.password.button', default: 'Password')}">
</div>
</div>
<div class="control-group">
<label class="control-label" for="confirmpasswd">${message(code: 'security.password.confirm.button', default: 'Confirm')}</label>
<div class="controls">
<input type="password" class="span3" name="confirmpasswd" id="confirmpasswd" placeholder="${message(code: 'security.password.confirm.button', default: 'Confirm')}">
</div>
</div>
<div class="control-group">
<%-- <label class="control-label" for="agreement">${message(code: 'security.agreement.button', default: 'I have read and agree with the Terms of Use.')}</label>--%>
<div class="controls">
<label class="checkbox" for="agreement">
<input type="checkbox" value="" name="agreement" id="agreement" >
${message(code: 'security.agreement.button', default: 'I have read and agree with the Terms of Use.')}
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary"><g:message code="security.register.button"/></button>
</div>
</g:form>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--
This modal is used to show a button that initiates the registration action.
-->

<!-- Button to trigger modal if Javascript is available -->
<div class="requiresJavascript"> <!-- Wrapped in a div to work around false colloring due to line 2484 in Bootstrap.css (.nav > li > a:hover) -->
<a href="#RegisterModal" class="btn btn-success" role="button" data-toggle="modal" title="${message(code: 'security.register.button', default: 'Register')}">
<i class="icon-signin"></i>
<g:message code="security.register.button"/>
</a>

<!-- NOTE: the renderDialog MUST be placed outside the NavBar (at least for Bootstrap 2.1.1): see bottom of main.gsp -->
<%-- <g:render template="/_common/modals/registerDialog" model="[item: item]" plugin="SPECTRAwebPlugin"/>--%>
</div>

<!-- register button if no Javascript is available -->
<noscript>
<g:form>
<span class="button">
<!-- TODO: use link to a special action that will show a special page where to register! (e.g., "register.gsp") -->
<g:actionSubmit action="register" class="btn btn-danger"
value="${message(code: 'security.register.button', default: 'Register')}"
/>
</span>
</g:form>
</noscript>
29 changes: 29 additions & 0 deletions kickstartWithBootstrap/grails-app/views/layouts/_content_fluid.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div id="Content" class="container-fluid">
<div class="row-fluid">

<!-- Main menu on the left side (e.g., controller entry points) -->
<div class="span2">
<g:render template="/menu/menubar"/>
</div>

<!-- Main content on the right side -->
<div class="span10">
<!-- Secondary menu in one line (e.g., actions for current controller) -->
<div class="row-fluid">
<div class="span12">
<g:render template="/menu/submenubar"/>
</div>
</div>

<!-- print system messages (infos, warnings, etc) - not validation errors -->
<g:if test="${flash.message}">
<div class="alert alert-info">${flash.message}</div>
</g:if>

<!-- Show page's content -->
<g:layoutBody />
<g:pageProperty name="page.body" />

</div>
</div>
</div>
25 changes: 25 additions & 0 deletions kickstartWithBootstrap/grails-app/views/layouts/_content_grid.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<div id="Content" class="container">

<!-- Main menu in one line (e.g., controller entry points -->
<div class="row">
<div class="span12">
<g:render template="/menu/menubar"/>
</div>
</div>

<!-- Secondary menu in one line (e.g., actions for current controller) -->
<div class="row">
<div class="span12">
<g:render template="/menu/submenubar"/>
</div>
</div>

<!-- print system messages (infos, warnings, etc) - not validation errors -->
<g:if test="${flash.message}">
<div class="alert alert-info">${flash.message}</div>
</g:if>

<!-- Show page's content -->
<g:layoutBody />
<g:pageProperty name="page.body" />
</div>
49 changes: 49 additions & 0 deletions kickstartWithBootstrap/grails-app/views/layouts/_footer.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<footer class="footer">
<div class="container">
<div class="row">
<div class="span2">
<h4>Product</h4>
<ul class="unstyled">
<li>
<a href="${createLink(uri: '/')}"><g:message code="default.home.button"/></a>
</li>
<li>
<a href="${createLink(uri: '/')}"><g:message code="default.tour.button"/></a>
</li>
<li>
<a href="${createLink(uri: '/')}"><g:message code="default.pricing.button"/></a>
</li>
<li>
<a href="${createLink(uri: '/')}"><g:message code="default.faq.button"/></a>
</li>
</ul>
</div>
<div class="span2">
<h4>Company</h4>
<ul class="unstyled">
<li><a href="${createLink(uri: '/about')}"><g:message code="default.about.button"/></a></li>
<li><a href="${createLink(uri: '/contact')}"><g:message code="default.contact.button"/></a></li>
</ul>
</div>
<div class="span8">
<h4> Information </h4>
<p>Designed and built with Twitter's <a href="http://twitter.github.com/bootstrap/" target="_blank">Bootstrap</a>.
Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>.
Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
<p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
</div>
</div>
<h4>Disclaimer</h4>
<p>This Web site may contain other proprietary notices and copyright information, the terms of which must be observed and followed.
Information on this Web site may contain technical inaccuracies or typographical errors.
Information may be changed or updated without notice.
</p>
<p>The operator and author may also make improvements and/or changes in the products and/or the programs described in this information
at any time without notice. For documents and software available from this server, the operator and author does not warrant or
assume any legal liability or responsibility for the accuracy, completeness, or usefulness of any information,
apparatus, product, or process disclosed.
</p>

<p class="pull-right"><a href="#">Back to top</a></p>
</div>
</footer>
7 changes: 7 additions & 0 deletions kickstartWithBootstrap/grails-app/views/layouts/_header.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<header id="Header" class="jumbotron masthead">
<div class="inner">
<div class="container">
<h1 class="title"><g:layoutTitle default="${meta(name:'app.name')}" /></h1>
</div>
</div>
</header>
26 changes: 26 additions & 0 deletions kickstartWithBootstrap/grails-app/views/menu/_admin.gsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<ul class="nav pull-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><g:message code="default.admin.title"/><b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="">
<a tabindex="-1" href="#"><b>Technical Admin</b></a>
</li>
<g:if env="development">
<li class=""><a href="${createLink(uri: '/dbconsole')}"><g:message code="default.dbconsole.button"/></a></li>
</g:if>
<li class=""><a href="${createLink(uri: '/systeminfo')}"><g:message code="default.systeminfo.button"/></a></li>
<li class="dropdown-submenu">
<a tabindex="-1" href="#">All Controller</a>
<ul class="dropdown-menu">
<li class="controller"><g:link controller="home">HomeController</g:link></li>
<li class="divider"></li>
<g:each var="c" in="${grailsApplication.controllerClasses.sort { it.logicalPropertyName } }">
<g:if test="${c.logicalPropertyName != 'home'}">
<li class="controller"><g:link controller="${c.logicalPropertyName}">${c?.fullName?.substring(c?.fullName?.lastIndexOf('.')+1)}</g:link></li>
</g:if>
</g:each>
</ul>
</li>
</ul>
</li>
</ul>
Loading

0 comments on commit 077b4c8

Please sign in to comment.