Permalink
Browse files

Search feature WIP...

  • Loading branch information...
1 parent 5871787 commit d672b5edf324e4e28e5f6cff64c3461d1ae4ab7f @dima767 committed Sep 24, 2008
@@ -134,6 +134,9 @@ class UrlMappings {
"/mailbox/messages/archive"(controller: 'mailbox', action: 'archiveMessage') //POST
+ //********* SEARCH ******************************************************/
+ "/search"(controller: 'search', action = 'searchForMembersAndProjects') //GET
+
//********* EXCEPTIONS ******************************************************/
//Uncomment for production
"500"(controller:"errors", action:"serverError")
@@ -0,0 +1,8 @@
+class SearchController {
+
+ def allowedMethods = [searchForMembersAndProjects: 'GET']
+
+ def searchForMembersAndProjects = {
+ render 'Search'
+ }
+}
@@ -31,12 +31,12 @@
</g:else>
</p>
- <form id="search" controller="search" action="searchForMembersAndProjects" method="get">
+ <g:form name="search" controller="search" action="searchForMembersAndProjects" method="get">
<div>
- <input type="text" name="q" value=""/>
- <input class="btn" type="image" name="search" alt="Search" value="Search" src="${createLinkTo(dir:'images',file:'search.gif')}"/>
+ <input type="text" name="q" value=""/>
+ <input class="btn" type="submit" style="{font-size:1.5em}" value="Search" />
</div>
- </form>
+ </g:form>
<ul id="nav-main">
<li class="first"><g:link controller="homeRouter"><g:message code="header.nav.home" /></g:link></li>
@@ -20,12 +20,12 @@
<h3>Already registered? Then <g:link class="inline-link" controller="authentication"><g:message code="header.auth.signin" /></g:link></h3>
</div>
- <form id="search" controller="search" action="searchForMembersAndProjects" method="get">
+ <g:form name="search" controller="search" action="searchForMembersAndProjects" method="get">
<div>
- <input type="text" name="q" value=""/>
- <input class="btn" type="image" name="search" alt="Search" value="Search" src="${createLinkTo(dir:'images',file:'search.gif')}"/>
+ <input type="text" name="q" value=""/>
+ <input class="btn" type="submit" style="{font-size:1.5em}" value="Search" />
</div>
- </form>
+ </g:form>
<ul id="nav-main">
<li class="first"><g:link controller="member" action="findByName">${grailscrowd.core.Member.count()} registered member(s)</g:link></li>
@@ -0,0 +1,6 @@
+class SearchControllerTests extends GroovyTestCase {
+
+ void testSomething() {
+
+ }
+}

0 comments on commit d672b5e

Please sign in to comment.