removed display controller
authorSven Arnold <sven@schnuppe.(none)>
Sun, 12 Apr 2009 18:57:36 +0000 (20:57 +0200)
committerSven Arnold <sven@schnuppe.(none)>
Sun, 12 Apr 2009 18:57:36 +0000 (20:57 +0200)
grails-app/controllers/DisplayController.groovy [deleted file]
grails-app/views/admin.gsp [new file with mode: 0644]
grails-app/views/display/index.gsp [deleted file]
grails-app/views/display/show.gsp [deleted file]
grails-app/views/layouts/grey.gsp [new file with mode: 0644]
grails-app/views/page/create.gsp [deleted file]
grails-app/views/page/display.gsp [new file with mode: 0644]
grails-app/views/page/edit.gsp [deleted file]
grails-app/views/page/list.gsp [deleted file]
grails-app/views/page/show.gsp [deleted file]
web-app/css/grey/screen.css [new file with mode: 0644]

diff --git a/grails-app/controllers/DisplayController.groovy b/grails-app/controllers/DisplayController.groovy
deleted file mode 100644 (file)
index 79316f6..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-class DisplayController {
-
-  def index = {
-    redirect(action: show)
-  }
-
-  def show = {
-
-    def pageInstance = Page.get(params.id)
-
-    if (!pageInstance) {
-      flash.message = "Page not found with id ${params.id}"
-    }
-
-    return [pageInstance: pageInstance]
-  }
-
-  def getChildren = {
-    
-  }
-}
diff --git a/grails-app/views/admin.gsp b/grails-app/views/admin.gsp
new file mode 100644 (file)
index 0000000..3676de5
--- /dev/null
@@ -0,0 +1,20 @@
+<html>\r
+    <head>\r
+        <title>Welcome to Grails</title>\r
+               <meta name="layout" content="main" />\r
+    </head>\r
+    <body>\r
+        <h1 style="margin-left:20px;">Welcome to Grails</h1>\r
+        <p style="margin-left:20px;width:80%">Congratulations, you have successfully started your first Grails application! At the moment\r
+        this is the default page, feel free to modify it to either redirect to a controller or display whatever\r
+        content you may choose. Below is a list of controllers that are currently deployed in this application,\r
+        click on each to execute its default action:</p>\r
+        <div class="dialog" style="margin-left:20px;width:60%;">\r
+            <ul>\r
+              <g:each var="c" in="${grailsApplication.controllerClasses}">\r
+                    <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li>\r
+              </g:each>\r
+            </ul>\r
+        </div>\r
+    </body>\r
+</html>
\ No newline at end of file
diff --git a/grails-app/views/display/index.gsp b/grails-app/views/display/index.gsp
deleted file mode 100644 (file)
index 1fbce7f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<%@ page contentType="text/html;charset=UTF-8" %>
-<html>
-<head>
-  <title>${pageInstance.title}</title>
-  <meta name="layout" content="main"/>
-</head>
-<body>
-<g:if test="${flash.message}">
-  <div class="message">${flash.message}</div>
-</g:if>
-${pageInstance.content}
-</body>
-</html>
\ No newline at end of file
diff --git a/grails-app/views/display/show.gsp b/grails-app/views/display/show.gsp
deleted file mode 100644 (file)
index 7dea01d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<%@ page contentType="text/html;charset=UTF-8" %>
-<html>
-
-<head>
-  <title>${pageInstance?.title}</title>
-  <meta name="layout" content="main"/>
-</head>
-
-<body>
-
-<g:if test="${flash.message}">
-  <div class="message">${flash.message}</div>
-</g:if>
-
-
-<div id="header">
-  <h1>Header</h1>
-</div>
-
-<div id="roots">
-  <h1>Top Level Pages</h1>
-  <ul>
-    <g:each var="child" in='${Page.findAll("from Page as p where p.parent=NULL")}'>
-      <li><g:link action="show" id="${child.id}">${child.title}</g:link></li>
-    </g:each>
-  </ul>
-</div>
-
-<div id="siblings">
-  <g:if test="${pageInstance?.parent}">
-    <h1>Siblings</h1>
-    <ul>
-      <g:each var="sibling" in="${Page.findAllByParent(pageInstance.parent)}">
-        <g:if test="${sibling.id != pageInstance.id}">
-          <li><g:link action="show" id="${sibling.id}">${sibling.title}</g:link></li>
-        </g:if>
-      </g:each>
-    </ul>
-  </g:if>
-</div>
-
-<div id="children">
-  <g:if test="${pageInstance}">
-    <h1>Children</h1>
-    <ul>
-      <g:each var="child" in="${Page.findAllByParent(pageInstance)}">
-        <li><g:link action="show" id="${child.id}">${child.title}</g:link></li>
-      </g:each>
-    </ul>
-  </g:if>
-</div>
-
-<div id="content">
-  <h1>Content</h1>
-  ${pageInstance?.content}
-</div>
-
-<div id="footer">
-  <h1>Footer</h1>
-</div>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/grails-app/views/layouts/grey.gsp b/grails-app/views/layouts/grey.gsp
new file mode 100644 (file)
index 0000000..1d310fc
--- /dev/null
@@ -0,0 +1,49 @@
+<html>
+<head>
+  <title><g:layoutTitle default="Portal"/></title>
+  <link rel="stylesheet" href="${resource(dir: 'css/blueprint', file: 'screen.css')}" type="text/css" media="screen, projection"/>
+  <link rel="stylesheet" href="${resource(dir: 'css/blueprint', file: 'print.css')}" type="text/css" media="print"/>
+  <!--[if IE]><link rel="stylesheet" href="${resource(dir: 'css', file: 'ie.css')}" type="text/css" media="screen, projection"><![endif]-->
+
+  <link rel="shortcut icon" href="${resource(dir: 'images', file: 'favicon.ico')}" type="image/x-icon"/>
+  <g:layoutHead/>
+  <g:javascript library="application"/>
+</head>
+<body>
+<div id="spinner" class="spinner" style="display:none;">
+  <img src="${resource(dir: 'images', file: 'spinner.gif')}" alt="Spinner"/>
+</div>
+
+<div class="header first span-24 last">
+  <h1>The Portal Header</h1>
+</div>
+
+<div class="first span-24 last">
+  <h1>
+    <g:pageProperty name="page.roots"/>
+  </h1>
+</div>
+
+<div class="first span-24 last">
+  <h2>
+    <g:pageProperty name="page.siblings"/>
+  </h2>
+</div>
+
+<div class="first span-24 last">
+  <h3>
+    <g:pageProperty name="page.children"/>
+  </h3>
+</div>
+
+<div class="first span-24 last">
+  <div style="border: solid thin black">
+    <g:pageProperty name="page.content"/>
+  </div>
+</div>
+
+<div class="first span-24 last footer">
+ <h4>The Footer</h4>
+</div>
+</body>
+</html>
\ No newline at end of file
diff --git a/grails-app/views/page/create.gsp b/grails-app/views/page/create.gsp
deleted file mode 100644 (file)
index 3688114..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-        <meta name="layout" content="main" />
-        <title>Create Page</title>         
-    </head>
-    <body>
-        <div class="nav">
-            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
-            <span class="menuButton"><g:link class="list" action="list">Page List</g:link></span>
-        </div>
-        <div class="body">
-            <h1>Create Page</h1>
-            <g:if test="${flash.message}">
-            <div class="message">${flash.message}</div>
-            </g:if>
-            <g:hasErrors bean="${pageInstance}">
-            <div class="errors">
-                <g:renderErrors bean="${pageInstance}" as="list" />
-            </div>
-            </g:hasErrors>
-            <g:form action="save" method="post" >
-                <div class="dialog">
-                    <table>
-                        <tbody>
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="title">Title:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'title','errors')}">
-                                    <input type="text" id="title" name="title" value="${fieldValue(bean:pageInstance,field:'title')}"/>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="author">Author:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'author','errors')}">
-                                    <input type="text" id="author" name="author" value="${fieldValue(bean:pageInstance,field:'author')}"/>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="language">Language:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'language','errors')}">
-                                    <input type="text" id="language" name="language" value="${fieldValue(bean:pageInstance,field:'language')}"/>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="parent">Parent:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'parent','errors')}">
-                                    <g:select optionKey="id" from="${Page.list()}" name="parent.id" value="${pageInstance?.parent?.id}" noSelection="['null':'']"></g:select>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="ordinal">Ordinal:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'ordinal','errors')}">
-                                    <input type="text" id="ordinal" name="ordinal" value="${fieldValue(bean:pageInstance,field:'ordinal')}" />
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="content">Content:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'content','errors')}">
-                                    <input type="text" id="content" name="content" value="${fieldValue(bean:pageInstance,field:'content')}"/>
-                                </td>
-                            </tr> 
-                        
-                        </tbody>
-                    </table>
-                </div>
-                <div class="buttons">
-                    <span class="button"><input class="save" type="submit" value="Create" /></span>
-                </div>
-            </g:form>
-        </div>
-    </body>
-</html>
diff --git a/grails-app/views/page/display.gsp b/grails-app/views/page/display.gsp
new file mode 100644 (file)
index 0000000..7ff4beb
--- /dev/null
@@ -0,0 +1,13 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: sven
+  Date: 12.04.2009
+  Time: 17:13:54
+  To change this template use File | Settings | File Templates.
+--%>
+
+<%@ page contentType="text/html;charset=UTF-8" %>
+<html>
+  <head><title>Simple GSP page</title></head>
+  <body>Place your content here</body>
+</html>
\ No newline at end of file
diff --git a/grails-app/views/page/edit.gsp b/grails-app/views/page/edit.gsp
deleted file mode 100644 (file)
index 101b875..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-        <meta name="layout" content="main" />
-        <title>Edit Page</title>
-    </head>
-    <body>
-        <div class="nav">
-            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
-            <span class="menuButton"><g:link class="list" action="list">Page List</g:link></span>
-            <span class="menuButton"><g:link class="create" action="create">New Page</g:link></span>
-        </div>
-        <div class="body">
-            <h1>Edit Page</h1>
-            <g:if test="${flash.message}">
-            <div class="message">${flash.message}</div>
-            </g:if>
-            <g:hasErrors bean="${pageInstance}">
-            <div class="errors">
-                <g:renderErrors bean="${pageInstance}" as="list" />
-            </div>
-            </g:hasErrors>
-            <g:form method="post" >
-                <input type="hidden" name="id" value="${pageInstance?.id}" />
-                <input type="hidden" name="version" value="${pageInstance?.version}" />
-                <div class="dialog">
-                    <table>
-                        <tbody>
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="title">Title:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'title','errors')}">
-                                    <input type="text" id="title" name="title" value="${fieldValue(bean:pageInstance,field:'title')}"/>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="author">Author:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'author','errors')}">
-                                    <input type="text" id="author" name="author" value="${fieldValue(bean:pageInstance,field:'author')}"/>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="language">Language:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'language','errors')}">
-                                    <input type="text" id="language" name="language" value="${fieldValue(bean:pageInstance,field:'language')}"/>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="parent">Parent:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'parent','errors')}">
-                                    <g:select optionKey="id" from="${Page.list()}" name="parent.id" value="${pageInstance?.parent?.id}" noSelection="['null':'']"></g:select>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="ordinal">Ordinal:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'ordinal','errors')}">
-                                    <input type="text" id="ordinal" name="ordinal" value="${fieldValue(bean:pageInstance,field:'ordinal')}" />
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="content">Content:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'content','errors')}">
-                                    <input type="text" id="content" name="content" value="${fieldValue(bean:pageInstance,field:'content')}"/>
-                                </td>
-                            </tr> 
-                        
-                            <tr class="prop">
-                                <td valign="top" class="name">
-                                    <label for="attachments">Attachments:</label>
-                                </td>
-                                <td valign="top" class="value ${hasErrors(bean:pageInstance,field:'attachments','errors')}">
-                                    <g:select name="attachments"
-from="${Attachment.list()}"
-size="5" multiple="yes" optionKey="id"
-value="${pageInstance?.attachments}" />
-
-                                </td>
-                            </tr> 
-                        
-                        </tbody>
-                    </table>
-                </div>
-                <div class="buttons">
-                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
-                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
-                </div>
-            </g:form>
-        </div>
-    </body>
-</html>
diff --git a/grails-app/views/page/list.gsp b/grails-app/views/page/list.gsp
deleted file mode 100644 (file)
index 76a10ab..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-        <meta name="layout" content="main" />
-        <title>Page List</title>
-    </head>
-    <body>
-        <div class="nav">
-            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
-            <span class="menuButton"><g:link class="create" action="create">New Page</g:link></span>
-        </div>
-        <div class="body">
-            <h1>Page List</h1>
-            <g:if test="${flash.message}">
-            <div class="message">${flash.message}</div>
-            </g:if>
-            <div class="list">
-                <table>
-                    <thead>
-                        <tr>
-                        
-                               <g:sortableColumn property="id" title="Id" />
-                        
-                               <g:sortableColumn property="title" title="Title" />
-                        
-                               <g:sortableColumn property="author" title="Author" />
-                        
-                               <g:sortableColumn property="language" title="Language" />
-                        
-                               <th>Parent</th>
-                           
-                               <g:sortableColumn property="ordinal" title="Ordinal" />
-                        
-                        </tr>
-                    </thead>
-                    <tbody>
-                    <g:each in="${pageInstanceList}" status="i" var="pageInstance">
-                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
-                        
-                            <td><g:link action="show" id="${pageInstance.id}">${fieldValue(bean:pageInstance, field:'id')}</g:link></td>
-                        
-                            <td>${fieldValue(bean:pageInstance, field:'title')}</td>
-                        
-                            <td>${fieldValue(bean:pageInstance, field:'author')}</td>
-                        
-                            <td>${fieldValue(bean:pageInstance, field:'language')}</td>
-                        
-                            <td>${fieldValue(bean:pageInstance, field:'parent')}</td>
-                        
-                            <td>${fieldValue(bean:pageInstance, field:'ordinal')}</td>
-                        
-                        </tr>
-                    </g:each>
-                    </tbody>
-                </table>
-            </div>
-            <div class="paginateButtons">
-                <g:paginate total="${pageInstanceTotal}" />
-            </div>
-        </div>
-    </body>
-</html>
diff --git a/grails-app/views/page/show.gsp b/grails-app/views/page/show.gsp
deleted file mode 100644 (file)
index 0fb694a..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-<html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-        <meta name="layout" content="main" />
-        <title>Show Page</title>
-    </head>
-    <body>
-        <div class="nav">
-            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
-            <span class="menuButton"><g:link class="list" action="list">Page List</g:link></span>
-            <span class="menuButton"><g:link class="create" action="create">New Page</g:link></span>
-        </div>
-        <div class="body">
-            <h1>Show Page</h1>
-            <g:if test="${flash.message}">
-            <div class="message">${flash.message}</div>
-            </g:if>
-            <div class="dialog">
-                <table>
-                    <tbody>
-
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Id:</td>
-                            
-                            <td valign="top" class="value">${fieldValue(bean:pageInstance, field:'id')}</td>
-                            
-                        </tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Title:</td>
-                            
-                            <td valign="top" class="value">${fieldValue(bean:pageInstance, field:'title')}</td>
-                            
-                        </tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Author:</td>
-                            
-                            <td valign="top" class="value">${fieldValue(bean:pageInstance, field:'author')}</td>
-                            
-                        </tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Language:</td>
-                            
-                            <td valign="top" class="value">${fieldValue(bean:pageInstance, field:'language')}</td>
-                            
-                        </tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Parent:</td>
-                            
-                            <td valign="top" class="value"><g:link controller="page" action="show" id="${pageInstance?.parent?.id}">${pageInstance?.parent?.encodeAsHTML()}</g:link></td>
-                            
-                        </tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Ordinal:</td>
-                            
-                            <td valign="top" class="value">${fieldValue(bean:pageInstance, field:'ordinal')}</td>
-                            
-                        </tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Content:</td>
-                            
-                            <td valign="top" class="value">${fieldValue(bean:pageInstance, field:'content')}</td>
-                            
-                        </tr>
-                    
-                        <tr class="prop">
-                            <td valign="top" class="name">Attachments:</td>
-                            
-                            <td  valign="top" style="text-align:left;" class="value">
-                                <ul>
-                                <g:each var="a" in="${pageInstance.attachments}">
-                                    <li><g:link controller="attachment" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li>
-                                </g:each>
-                                </ul>
-                            </td>
-                            
-                        </tr>
-                    
-                    </tbody>
-                </table>
-            </div>
-            <div class="buttons">
-                <g:form>
-                    <input type="hidden" name="id" value="${pageInstance?.id}" />
-                    <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
-                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
-                </g:form>
-            </div>
-        </div>
-    </body>
-</html>
diff --git a/web-app/css/grey/screen.css b/web-app/css/grey/screen.css
new file mode 100644 (file)
index 0000000..e69de29