Commits

Raza Ali committed 601df43

Search UI skeleton implementation

  • Participants
  • Parent commits 82d17e6

Comments (0)

Files changed (3)

File grails-app/views/templates/ddmore/_header.gsp

     
     
       <div class="region region-header">
-    <div style="float:right;margin-top:5px;">
+      	<div id="block-system-user-menu" class="block block-system user-menu block-menu first odd">      
+      		<div class="content">
+      			<ul class="menu"><li class="first last leaf">
+      			<sec:ifLoggedIn>
+      				<a href="/jummp/logout" class="icon icon-functional" data-icon="l">
+      					<g:message code="jummp.main.logout"/>
+      				</a>
+      			</sec:ifLoggedIn>
+      			<sec:ifNotLoggedIn>
+      				<a href="/jummp/login" class="icon icon-functional" data-icon="l">
+      				<g:message code="jummp.main.login"/>
+      			</a>
+      			</sec:ifNotLoggedIn>
+      			</li>
+      		</div><!-- /.block -->
+      	</div>
+      <div id="block-search-form" class="block block-search search even">
+      	 <div class="content">
+      	 	<g:form controller="search" action="search">
+      	 	<%-- <form action="/" method="post" id="search-block-form" accept-charset="UTF-8"> --%><div><div class="container-inline">
+      	 		<h2 class="element-invisible">Search form</h2>
+      	 		<div class="form-item form-type-textfield form-item-search-block-form">
+      	 			<label class="element-invisible" for="edit-search-block-form--2">Search </label>
+      	 			<input title="Enter the terms you wish to search for." type="text" id="edit-search-block-form--2" name="search_block_form" value="" size="15" maxlength="128" class="form-text" />
+      	 		</div>
+      	 		<div class="form-actions form-wrapper" id="edit-actions">
+      	 			<input type="submit" id="edit-submit" name="op" value="Search" class="form-submit" />
+      	 		</div>
+			</div>
+</div></g:form>  </div>
 
-      
-  <div class="content">
-     <sec:ifLoggedIn>
-    	<a href="/jummp/logout" class="icon icon-functional" data-icon="l">
-		<g:message code="jummp.main.logout"/>
-	</a>
-    </sec:ifLoggedIn>
-    <sec:ifNotLoggedIn>
-	<a href="/jummp/login" class="icon icon-functional" data-icon="l">
-		<g:message code="jummp.main.login"/>
-	</a>
-    </sec:ifNotLoggedIn>
-</div><!-- /.block -->
+</div>
+      	 		
 <div id="block-system-main-menu" class="block block-system main-menu block-menu last odd">
 
       

File jummp-plugins/jummp-plugin-web-application/grails-app/controllers/net/biomodels/jummp/webapp/SearchController.groovy

      */
     def list = {
     }
+    
+    /**
+     * Default action showing a list view
+     */
+    def search = {
+    	   [query:params.search_block_form]
+    }
 
     /**
      * Action returning the DataTable content as JSON

File jummp-plugins/jummp-plugin-web-application/grails-app/views/search/search.gsp

+<%@ page contentType="text/html;charset=UTF-8" %>
+    <head>
+        <title>Model Search</title>
+        <meta name="layout" content="main" />
+        <g:javascript contextPath="" src="jquery/jquery.dataTables.js"/>
+        <%-- 
+         <link rel="stylesheet" href="${resource(contextPath: "/jummp", dir: '/css/jqueryui/south-street', file: 'jquery-ui-1.10.3.custom.css')}" />
+        --%>
+         <link rel="stylesheet" href="${resource(contextPath: "/jummp", dir: '/css', file: 'datatablestyle.css')}" />
+         
+         <g:javascript src="jquery/jquery-ui-v1.10.3.js"/>
+        <g:javascript>
+        	$(document).ready(function() {
+        		 $.jummp.showModels.loadModelList();
+        	} );
+        </g:javascript>
+        <g:javascript contextPath="" src="showmodels.js"/>
+    </head>
+    <body activetab="search">
+    	<h2>Search Results for ${query}</h2>
+    	  <div class="content">
+    	  <div class="view view-dom-id-9c00a92f557689f996511ded36a88594">
+    	<div class="view-content">
+        <table id="modelTable" class="views-table cols-4">
+            <thead>
+            <tr>
+                <th><b><g:message code="model.list.name"/></b></th>
+                <th><b><g:message code="model.list.format"/></b></th>
+                <th><b><g:message code="model.list.submitter"/></b></th>
+                <th><b><g:message code="model.list.submissionDate"/></b></th>
+                <th><b><g:message code="model.list.modifiedDate"/></b></th>
+            </tr>
+            </thead>
+            <tbody></tbody>
+            <tfoot>
+            <tr>
+            </tr>
+            </tfoot>
+        </table>
+        </div>
+        </div>
+        </div>
+    </body>
+