Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed layout for twitterbootstrap 2.0

  • Loading branch information...
commit c4af418c3dcd37d47aed1b2442a6740f59f14373 1 parent 9867c52
Chris authored February 09, 2012
5  src/templates/scaffolding/list.gsp
@@ -13,7 +13,7 @@
13 13
 				<div class="span3">
14 14
 					<h1><g:message code="default.list.label" args="[entityName]" /></h1>
15 15
 				</div>
16  
-				<div class="span8">
  16
+				<div class="span9">
17 17
 					<g:if test="\${flash.message}">
18 18
 						<div class="alert-message info" role="status"><strong>\${flash.message}</strong></div>
19 19
 					</g:if>
@@ -33,6 +33,7 @@
33 33
 				<div class="sidebar span3">
34 34
 					<div class="well" role="navigation">
35 35
 						<ul class="nav nav-list">
  36
+							<li class="nav-header">Options</li>
36 37
 							<li><a class="home" href="\${createLink(uri: '/')}"><i class="icon-list"></i><g:message code="default.list.label" args="[entityName]"/></a></li>
37 38
 							<li><g:link class="create" action="create"><i class="icon-file"></i><g:message code="default.new.label" args="[entityName]" /></g:link></li>
38 39
 						</ul>
@@ -40,7 +41,7 @@
40 41
 				</div>
41 42
 				<div class="content">
42 43
 					<div class="row">
43  
-						<div class="span8">
  44
+						<div class="span9">
44 45
 							<div id="list-${domainClass.propertyName}" class="content scaffold-list" role="main">
45 46
 								<table class="table table-striped table-bordered">
46 47
 									<thead>
36  src/templates/scaffolding/show.gsp
@@ -10,10 +10,10 @@
10 10
 	<body>
11 11
 		<div class="container">
12 12
 			<div class="row">
13  
-				<div class="span4">
  13
+				<div class="span3">
14 14
 					<h1><g:message code="default.show.label" args="[entityName]" /></h1>
15 15
 				</div>
16  
-				<div class="span12">
  16
+				<div class="span9">
17 17
 					<g:if test="\${flash.message}">
18 18
 						<div class="alert-message info" role="status"><strong>\${flash.message}</strong></div>
19 19
 					</g:if>
@@ -29,18 +29,18 @@
29 29
 				</div>
30 30
 			</div>
31 31
 			<div class="row">
32  
-				<div class="sidebar span4">
  32
+				<div class="sidebar span3">
33 33
 					<div class="well" role="navigation">
34  
-						<ul>
35  
-							<li><a class="home" href="\${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
36  
-							<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
37  
-							<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
  34
+						<ul class="nav nav-list">
  35
+							<li class="nav-header">Options</li>
  36
+							<li><a class="home" href="\${createLink(uri: '/')}"><i class="icon-list"></i><g:message code="default.list.label" args="[entityName]"/></a></li>
  37
+							<li><g:link class="create" action="create"><i class="icon-file"></i><g:message code="default.new.label" args="[entityName]" /></g:link></li>
38 38
 						</ul>
39 39
 					</div>
40 40
 				</div>
41 41
 				<div class="content">
42 42
 					<div class="row">
43  
-						<div class="span12">
  43
+						<div class="span9">
44 44
 								<%  excludedProps = Event.allEvents.toList() << 'id' << 'version'
45 45
 									allowedNames = domainClass.persistentProperties*.name << 'dateCreated' << 'lastUpdated'
46 46
 									props = domainClass.properties.findAll { allowedNames.contains(it.name) && !excludedProps.contains(it.name) }
@@ -50,29 +50,29 @@
50 50
 											<g:if test="\${${propertyName}?.${p.name}}">
51 51
 												<div id="${p.name}-label" class="property-label span3"><g:message code="${domainClass.propertyName}.${p.name}.label" default="${p.naturalName}" />:</div>
52 52
 												<%  if (p.isEnum()) { %>
53  
-													<div class="property-value span7" aria-labelledby="${p.name}-label"><g:fieldValue bean="\${${propertyName}}" field="${p.name}"/></div>
  53
+													<div class="property-value span5" aria-labelledby="${p.name}-label"><g:fieldValue bean="\${${propertyName}}" field="${p.name}"/></div>
54 54
 												<%  } else if (p.oneToMany || p.manyToMany) { %>
55 55
 													<g:each in="\${${propertyName}.${p.name}}" var="${p.name[0]}">
56  
-													<div class="property-value span7" aria-labelledby="${p.name}-label"><g:link controller="${p.referencedDomainClass?.propertyName}" action="show" id="\${${p.name[0]}.id}">\${${p.name[0]}?.encodeAsHTML()}</g:link></div>
  56
+													<div class="property-value span5" aria-labelledby="${p.name}-label"><g:link controller="${p.referencedDomainClass?.propertyName}" action="show" id="\${${p.name[0]}.id}">\${${p.name[0]}?.encodeAsHTML()}</g:link></div>
57 57
 													</g:each>
58 58
 												<%  } else if (p.manyToOne || p.oneToOne) { %>
59  
-													<div class="property-value span7" aria-labelledby="${p.name}-label"><g:link controller="${p.referencedDomainClass?.propertyName}" action="show" id="\${${propertyName}?.${p.name}?.id}">\${${propertyName}?.${p.name}?.encodeAsHTML()}</g:link></div>
  59
+													<div class="property-value span5" aria-labelledby="${p.name}-label"><g:link controller="${p.referencedDomainClass?.propertyName}" action="show" id="\${${propertyName}?.${p.name}?.id}">\${${propertyName}?.${p.name}?.encodeAsHTML()}</g:link></div>
60 60
 												<%  } else if (p.type == Boolean || p.type == boolean) { %>
61  
-													<div class="property-value span7" aria-labelledby="${p.name}-label"><g:formatBoolean boolean="\${${propertyName}?.${p.name}}" /></div>
  61
+													<div class="property-value span5" aria-labelledby="${p.name}-label"><g:formatBoolean boolean="\${${propertyName}?.${p.name}}" /></div>
62 62
 												<%  } else if (p.type == Date || p.type == java.sql.Date || p.type == java.sql.Time || p.type == Calendar) { %>
63  
-													<div class="property-value span7" aria-labelledby="${p.name}-label"><g:formatDate date="\${${propertyName}?.${p.name}}" /></div>
  63
+													<div class="property-value span5" aria-labelledby="${p.name}-label"><g:formatDate date="\${${propertyName}?.${p.name}}" /></div>
64 64
 												<%  } else if(!p.type.isArray()) { %>
65  
-													<div class="property-value span7" aria-labelledby="${p.name}-label"><g:fieldValue bean="\${${propertyName}}" field="${p.name}"/></div>
  65
+													<div class="property-value span5" aria-labelledby="${p.name}-label"><g:fieldValue bean="\${${propertyName}}" field="${p.name}"/></div>
66 66
 												<%  } %>
67 67
 											</g:if>
68 68
 										</div>
69 69
 								<%  } %>
70 70
 							<g:form>
71  
-								<fieldset class="buttons">
  71
+								<p>
72 72
 									<g:hiddenField name="id" value="\${${propertyName}?.id}" />
73  
-									<g:link class="edit" action="edit" id="\${${propertyName}?.id}" class="btn primary"><g:message code="default.button.edit.label" default="Edit" /></g:link>
74  
-									<g:actionSubmit class="btn danger" action="delete" value="\${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('\${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
75  
-								</fieldset>
  73
+									<g:link action="edit" id="\${${propertyName}?.id}" class="btn btn-primary top-align"><g:message code="default.button.edit.label" default="Edit" /></g:link>
  74
+									<g:actionSubmit class="btn-danger" action="delete" value="\${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('\${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
  75
+								</p>
76 76
 							</g:form>
77 77
 						</div>
78 78
 					</div>
4  web-app/css/twitter.css
@@ -40,6 +40,10 @@ span.currentStep {
40 40
 	border-left-width: 0;
41 41
 }
42 42
 
  43
+.top-align {
  44
+	vertical-align: top;
  45
+}
  46
+
43 47
 div.edit-properties.error > input { border-color: #E9322D; }
44 48
 div.edit-properties.error > select { border-color: #E9322D; }
45 49
 div.edit-properties.error > textarea { border-color: #E9322D; }

0 notes on commit c4af418

Please sign in to comment.
Something went wrong with that request. Please try again.