Changeset 1091


Ignore:
Timestamp:
Nov 5, 2010, 3:51:47 PM (12 years ago)
Author:
work@…
Message:
  • refactored and redesigned search page
  • bugfixed the build information div
Location:
trunk
Files:
7 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/simpleQuery/common/_query.gsp

    r959 r1091  
    1010        <h1>Simple Query</h1>
    1111
    12     <g:form action="pages" name="simpleQueryForm" id="simpleQueryForm">
    13     <g:if test="${search_term}"><g:set var="preterm" value="${search_term}" /></g:if>
     12        <g:form action="pages" name="simpleQueryForm" id="simpleQueryForm">
     13        <g:if test="${search_term}"><g:set var="preterm" value="${search_term}"/></g:if>
     14        <div class="searchContainer">
     15                <div class="search">
     16                 <div class="begin"><span class="label">Search term</span></div><div class="middle"><g:textField name="search_term" class="searchfield" value="${preterm}"/></div><div class="end"><a onClick="$('#search_term').val('');"><img src="${resource(dir: 'images', file: 'simpleQuery/spotlight-end.png')}" value="Reset" alt="Reset" border="0"></a></div><div class="submit"><g:submitButton name="search" value=""/></div>
     17                </div>
     18        </div>
     19        </g:form>
    1420
    15     <div id="accordion">
    16       <h3><a href="#">Search term</a></h3>
    17       <div>
    18         <div class="element">
    19           <div class="description">Search term (e.g. 'paracetamol')</div>
    20           <div class="input"><g:textField name="search_term" value="${preterm}" /></div>
    21         </div>
    22         <div class="element">
    23           <div class="description">Species (e.g. 'rattus norvegicus')</div>
    24           <div class="input"><g:select name="species" from="${species}" value="" noSelection="['':'--- select a species ---']"/></div>
    25         </div>
    26         <div class="element">
    27           <div class="description">Material (e.g. 'liver')</div>
    28           <div class="input"><g:select name="organs" from="${organs}" value="" noSelection="['':'--- select organ/tissue ---']"/></div>
    29         </div>
    30       </div>
    3121
    32       <h3><a href="#">Simple Assays (optional)</a></h3>
    33       <div class="element">
    34         <div id="compoundGroup">
    3522
    36           <g:if test="${showFirstRowCompounds}">
    37           <div id="compoundRow1">
    38             <div class="descriptionSA">Compound</div><div class="input"><g:textField name="sa_compound" value=""/></div><div class="descriptionSA">Operator</div><div class="input" id="operatorInput"><g:select name="sa_operator" from="${operators}" value="="/></div><div class="descriptionSA">Value</div><div class="input"><g:textField name="sa_value" value=""/></div>
    39           </div>
    40           </g:if>
    4123
    42           <g:else>
    43             <g:each status="i" in="${search_sa_compounds}" var="compound">
    44             <div id="compoundRow${i}">
    45               <div class="descriptionSA">Compound (e.g. 'glucose')</div><div class="input"><g:textField name="sa_compound" value="${search_sa_compounds.get(i)}"/></div><div class="descriptionSA">Type of regulations</div><div class="input"><g:select name="sa_operator" from="${operators}" value="="/></div><div class="descriptionSA">Value</div><div class="input"><g:textField name="sa_value" value="${search_sa_values.get(i)}"/></div>
    46             </div>
    47             </g:each>
    48           </g:else>
    49         </div>
    50         <div id="addCompound" class="submit">Add compound</div>
    51       </div>
     24        <% /*
     25        <g:form action="pages" name="simpleQueryForm" id="simpleQueryForm">
     26                <g:if test="${search_term}"><g:set var="preterm" value="${search_term}"/></g:if>
    5227
    53       <h3><a href="#">Transcriptomics (optional)</a></h3>
     28                <div id="accordion">
     29                        <h3><a href="#">Search term</a></h3>
     30                        <div>
     31                                <div class="element">
     32                                        <div class="description">Search term (e.g. 'paracetamol')</div>
     33                                        <div class="input"><g:textField name="search_term" value="${preterm}"/></div>
     34                                </div>
     35                                <div class="element">
     36                                        <div class="description">Species (e.g. 'rattus norvegicus')</div>
     37                                        <div class="input"><g:select name="species" from="${species}" value="" noSelection="['':'--- select a species ---']"/></div>
     38                                </div>
     39                                <div class="element">
     40                                        <div class="description">Material (e.g. 'liver')</div>
     41                                        <div class="input"><g:select name="organs" from="${organs}" value="" noSelection="['':'--- select organ/tissue ---']"/></div>
     42                                </div>
     43                        </div>
    5444
    55       <div class="element">
    56         <div id="transcriptomeGroup">
    57           <div id="transcriptomeRow1">
    58             <div class="description">List of Gene IDs or pathway IDs</div><div class="input"><g:textField name="genepath" value="" /></div><div class="description">Type of regulations</div><div class="input" id="regulationInput"><g:select name="regulation" from="" value="${regulation}" noSelection="['':'--- select regulation ---']"/></div>
    59           </div>
    60         </div>
    61         <div id="addTranscriptome" class="submit">Add transciptome</div>
    62       </div>
    63     </div>
     45                        <h3><a href="#">Simple Assays (optional)</a></h3>
     46                        <div class="element">
     47                                <div id="compoundGroup">
    6448
    65     <g:submitButton name="search" value="Search"  /> <g:if test="${search_term}"><g:submitButton name="reset" value="Reset" /></g:if>
     49                                        <g:if test="${showFirstRowCompounds}">
     50                                                <div id="compoundRow1">
     51                                                        <div class="descriptionSA">Compound</div><div class="input"><g:textField name="sa_compound" value=""/></div><div class="descriptionSA">Operator</div><div class="input" id="operatorInput"><g:select name="sa_operator" from="${operators}" value="="/></div><div class="descriptionSA">Value</div><div class="input"><g:textField name="sa_value" value=""/></div>
     52                                                </div>
     53                                        </g:if>
    6654
    67     </g:form>
     55                                        <g:else>
     56                                                <g:each status="i" in="${search_sa_compounds}" var="compound">
     57                                                        <div id="compoundRow${i}">
     58                                                                <div class="descriptionSA">Compound (e.g. 'glucose')</div><div class="input"><g:textField name="sa_compound" value="${search_sa_compounds.get(i)}"/></div><div class="descriptionSA">Type of regulations</div><div class="input"><g:select name="sa_operator" from="${operators}" value="="/></div><div class="descriptionSA">Value</div><div class="input"><g:textField name="sa_value" value="${search_sa_values.get(i)}"/></div>
     59                                                        </div>
     60                                                </g:each>
     61                                        </g:else>
     62                                </div>
     63                                <div id="addCompound" class="submit">Add compound</div>
     64                        </div>
    6865
    69     <g:if test="${search_term}">
    70         <h1><g:message code="Search results"/></h1>
     66                        <h3><a href="#">Transcriptomics (optional)</a></h3>
    7167
    72         <g:if test="${listStudies}">
    73           <div class="list">
    74             <table>
    75                 <thead>
    76                     <tr>
    77                         <g:sortableColumn property="id" title="Result" />
    78                         <g:sortableColumn property="id" title="${message(code: 'study.id', default: 'ID')}" />
    79                         <g:sortableColumn property="title" title="${message(code: 'study.title.label', default: 'Study')}" />
    80                         <g:sortableColumn property="samples" title="${message(code: 'study.sample', default: 'Samples')}" />
    81                     </tr>
    82                 </thead>
    83                 <tbody>
    84                 <g:each in="${listStudies}" var="Study" status="i" >
    85                   <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
    86                     <td><g:checkBox name="study${Study.id}" value="${true}" /></td>
    87                     <td><g:link url="[action:'show',controller:'study', id:Study.id]">${fieldValue(bean: Study, field: "id")}</g:link></td>
    88                     <td><g:link url="[action:'show',controller:'study', id:Study.id]">${fieldValue(bean: Study, field: "title")}</g:link></td>
    89                     <td><g:link url="[action:'show',controller:'study', id:Study.id]"></g:link></td>
    90                   </tr>
    91                 </g:each>
    92                 </tbody>
    93             </table>
    94           </div>
     68                        <div class="element">
     69                                <div id="transcriptomeGroup">
     70                                        <div id="transcriptomeRow1">
     71                                                <div class="description">List of Gene IDs or pathway IDs</div><div class="input"><g:textField name="genepath" value=""/></div><div class="description">Type of regulations</div><div class="input" id="regulationInput"><g:select name="regulation" from="" value="${regulation}" noSelection="['':'--- select regulation ---']"/></div>
     72                                        </div>
     73                                </div>
     74                                <div id="addTranscriptome" class="submit">Add transciptome</div>
     75                        </div>
     76                </div>
    9577
    96         </g:if>
    97         <g:else>
    98           <g:message code="No studies found with term '${search_term}'"/> 
    99         </g:else>
    100     </g:if>
     78                <g:submitButton name="search" value="Search"/> <g:if test="${search_term}"><g:submitButton name="reset" value="Reset"/></g:if>
     79        </g:form>
     80        */ %>
     81
     82        <g:if test="${search_term}">
     83                <h1><g:message code="Search results"/></h1>
     84
     85                <g:if test="${listStudies}">
     86                        <div class="list">
     87                                <table>
     88                                        <thead>
     89                                        <tr>
     90                                                <g:sortableColumn property="id" title="Result"/>
     91                                                <g:sortableColumn property="id" title="${message(code: 'study.id', default: 'ID')}"/>
     92                                                <g:sortableColumn property="title" title="${message(code: 'study.title.label', default: 'Study')}"/>
     93                                                <g:sortableColumn property="samples" title="${message(code: 'study.sample', default: 'Samples')}"/>
     94                                        </tr>
     95                                        </thead>
     96                                        <tbody>
     97                                        <g:each in="${listStudies}" var="Study" status="i">
     98                                                <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
     99                                                        <td><g:checkBox name="study${Study.id}" value="${true}"/></td>
     100                                                        <td><g:link url="[action:'show',controller:'study', id:Study.id]">${fieldValue(bean: Study, field: "id")}</g:link></td>
     101                                                        <td><g:link url="[action:'show',controller:'study', id:Study.id]">${fieldValue(bean: Study, field: "title")}</g:link></td>
     102                                                        <td><g:link url="[action:'show',controller:'study', id:Study.id]"></g:link></td>
     103                                                </tr>
     104                                        </g:each>
     105                                        </tbody>
     106                                </table>
     107                        </div>
     108
     109                </g:if>
     110                <g:else>
     111                        <g:message code="No studies found with term '${search_term}'"/>
     112                </g:else>
     113        </g:if>
    101114
    102115</div>
  • trunk/grails-app/views/simpleQuery/mainPage.gsp

    r959 r1091  
    1818        <script type="text/javascript" src="${resource(dir: 'js', file: 'simpleQuery.js')}"></script>
    1919</g:else>
     20 <style type="text/css">
     21  #spotlight { display: block; align: center; padding: 0px; }
     22  #spotlight #begin { display: inline-block; background-image: url(${resource(dir: 'images', file: 'simpleQuery/spotlight-begin.png')}); height: 30px; width: 140px; }
     23  #spotlight #middle { display: inline-block; background-image: url(${resource(dir: 'images', file: 'simpleQuery/spotlight-middle.png')}); height: 30px; repeat-x top left; }
     24  #spotlight #end { display: inline-block; background-image: url(${resource(dir: 'images', file: 'simpleQuery/spotlight-end.png')}); height: 30px; width: 28px; }
     25  #spotlight #submit { display: inline-block; height: 30px; }
     26
     27        #simpleQuery {
     28        }
     29
     30        #simpleQuery .search {
     31                display: block;
     32                height: 30px;
     33                margin-bottom: 10px;
     34                zoom: 1; /* IE 6 & 7 hack */
     35                *display: inline; /* IE 6 & 7 hack */
     36        }
     37        #simpleQuery .search .begin {
     38                margin: 0px;
     39                padding: 0px;
     40                display: inline-block;
     41                background-image: url(${resource(dir: 'images', file: 'simpleQuery/spotlight-begin.png')});
     42                height: 30px;
     43                width: 140px;
     44                vertical-align: top;
     45                text-align: right;
     46                zoom: 1; /* IE 6 & 7 hack */
     47                *display: inline; /* IE 6 & 7 hack */
     48        }
     49  #simpleQuery .search .begin .label {
     50          color: #fff;
     51          font-face: Arial;
     52          line-height: 30px;
     53          text-shadow: 0px 0px 1px #006DBA;
     54          font-size: 12px;
     55    margin-right: 23px;
     56  }
     57  #simpleQuery .search .middle {
     58                margin: 0px 0px -20px 0px;
     59          padding: 0;
     60          display: inline-block;
     61          background-image: url(${resource(dir: 'images', file: 'simpleQuery/spotlight-middle.png')});
     62          height: 30px;
     63          width: 200px;
     64          vertical-align: top;
     65          zoom: 1; /* IE 6 & 7 hack */
     66          *display: inline; /* IE 6 & 7 hack */
     67  }
     68  #simpleQuery .search .searchfield {
     69          vertical-align: middle;
     70                width: 100%;
     71          height: 100%;
     72          color: #006DBA;
     73          border-width:0px;
     74          border: none;
     75          background-color:Transparent;
     76          zoom: 1; /* IE 6 & 7 hack */
     77          *display: inline; /* IE 6 & 7 hack */
     78  }
     79  #simpleQuery .search .end {
     80          margin: 0px;
     81          padding: 0px;
     82          display: inline-block;
     83          background-image: url(${resource(dir: 'images', file: 'simpleQuery/spotlight-end.png')});
     84          height: 30px;
     85          width: 28px;
     86          zoom: 1; /* IE 6 & 7 hack */
     87          *display: inline; /* IE 6 & 7 hack */
     88  }
     89        #simpleQuery .search .submit {
     90                vertical-align: top;
     91          margin: 0px;
     92          padding: 0px;
     93          display: inline-block;
     94          height: 30px;
     95          width: 100px;
     96                border: 0;
     97                zoom: 1; /* IE 6 & 7 hack */
     98                *display: inline; /* IE 6 & 7 hack */
     99  }
     100        #simpleQuery .search .submit input {
     101                width:30px;
     102                height:30px;
     103                border: 0px;
     104                background-image: url(${resource(dir: 'images', file: 'simpleQuery/button.png')});
     105        }
     106 </style>
    20107</head>
    21108<body>
  • trunk/web-app/css/default_style.css

    r1085 r1091  
    3636#header .info {
    3737    color: #ff3333;
    38     position: relative;
     38                vertical-align: top;
     39                align: right;
    3940    width: 350px;
    40     margin: -110px 600px;
    41     display: block;
     41                margin: -140px 0px 0px 600px;
     42    display: inline-block;
    4243    zoom: 1; /* IE 6 & 7 hack */
    4344    *display: inline; /* IE 6 & 7 hack */
Note: See TracChangeset for help on using the changeset viewer.