Changeset 22833


Ignore:
Timestamp:
09/09/10 10:52:10 (17 months ago)
Author:
fhu
Message:

Added create List option on experiment, keywordSearchResults, modMineSearchResults pages of modMine and keywordSearchResults page of InterMine

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/intermine/webapp/main/resources/webapp/keywordSearchResults.jsp

    r22492 r22833  
    1515<html:xhtml /> 
    1616 
     17<style type="text/css"> 
     18input.submit { 
     19  color: #008AB8; 
     20  font: bold 84% 'trebuchet ms',helvetica,sans-serif; 
     21  background-color: #fed; 
     22  border:1px solid; 
     23  border-color: #696 #363 #363 #696; 
     24} 
     25</style> 
     26 
     27<script> 
     28 
     29  jQuery(document).ready(function(){ 
     30    // Unckeck all checkboxes everything the page is (re)loaded 
     31    initCheck(); 
     32 
     33    // Do before the form submitted 
     34    jQuery("#saveFromIdsToBagForm").submit(function() { 
     35        var ids = new Array(); 
     36        jQuery(".item").each(function() { 
     37          if (this.checked) {ids.push(this.value);} 
     38       }); 
     39 
     40        if (ids.length < 1) 
     41        { alert("Please select some ${searchFacetValues['Category']}s..."); 
     42          return false; 
     43        } else { 
     44          jQuery("#ids").val(ids); 
     45          return true; 
     46          } 
     47    }); 
     48  }); 
     49 
     50     function initCheck() 
     51     { 
     52       jQuery('#allItems').removeAttr('checked'); 
     53       jQuery(".item").removeAttr('checked'); 
     54     } 
     55 
     56     // (un)Check all ids checkboxes 
     57     function checkAll() 
     58     { 
     59         jQuery(".item").attr('checked', jQuery('#allItems').is(':checked')); 
     60         jQuery('#allItems').css("opacity", 1); 
     61     } 
     62 
     63     function updateCheckStatus(status) 
     64     { 
     65         var statTag; 
     66         if (!status) { //unchecked 
     67           jQuery(".item").each(function() { 
     68             if (this.checked) {statTag=true;} 
     69           }); 
     70 
     71           if (statTag) { 
     72            jQuery("#allItems").attr('checked', true); 
     73            jQuery("#allItems").css("opacity", 0.5); } 
     74           else { 
     75            jQuery("#allItems").removeAttr('checked'); 
     76            jQuery("#allItems").css("opacity", 1);} 
     77         } 
     78         else { //checked 
     79           jQuery(".item").each(function() { 
     80             if (!this.checked) {statTag=true;} 
     81         }); 
     82 
     83         if (statTag) { 
     84           jQuery("#allItems").attr('checked', true); 
     85           jQuery("#allItems").css("opacity", 0.5); } 
     86         else { 
     87           jQuery("#allItems").attr('checked', true); 
     88           jQuery("#allItems").css("opacity", 1);} 
     89         } 
     90     } 
     91 
     92</script> 
     93 
    1794<div class="body"> 
    1895 
     
    2299<c:choose> 
    23100    <c:when test="${empty searchTerm && !empty searchFacets && (searchFacetValues == null || empty searchFacetValues)}"> 
    24        <div class="keywordSearchIndex"> 
    25        <c:forEach items="${searchFacets}" var="facet" varStatus="facetStatus"> 
    26             <c:if test="${facet.items != null && !empty facet.items}"> 
    27                 <div class="keywordSearchIndexColumn" style="width: <c:out value="${(90 - 90 % fn:length(searchFacets)) / fn:length(searchFacets)}"></c:out>%;"> 
    28                     <h2 class="overviewFacetHeader">Objects by ${facet.name}</h2> 
    29                     <div class="overviewFacetContents"> 
    30                     <ul> 
    31                         <c:forEach items="${facet.items}" var="facetItem"> 
     101     <div class="keywordSearchIndex"> 
     102     <c:forEach items="${searchFacets}" var="facet" varStatus="facetStatus"> 
     103        <c:if test="${facet.items != null && !empty facet.items}"> 
     104            <div class="keywordSearchIndexColumn" style="width: <c:out value="${(90 - 90 % fn:length(searchFacets)) / fn:length(searchFacets)}"></c:out>%;"> 
     105                <h2 class="overviewFacetHeader">Objects by ${facet.name}</h2> 
     106                <div class="overviewFacetContents"> 
     107                <ul> 
     108                    <c:forEach items="${facet.items}" var="facetItem"> 
    32109                            <li> 
    33                                 <a href="<c:url value="/keywordSearchResults.do"> 
    34                                        <c:param name="searchTerm" value="${searchTerm}" /> 
    35                                        <c:param name="searchBag" value="${searchBag}" /> 
    36                                        <c:param name="facet_${facet.field}" value="${facetItem.value}" /> 
    37                                 </c:url>" title="Click to show '<c:out value="${facetItem.value}" />'"> 
    38                                    <c:out value="${facetItem.value}" /> 
    39                                    (<c:out value="${facetItem.facetValueHitCount}"></c:out>) 
    40                                 </a> 
    41                             </li> 
    42                         </c:forEach> 
    43                     </ul> 
    44                     </div> 
    45                 </div> 
    46             </c:if>                 
    47        </c:forEach> 
    48        </div> 
     110                            <a href="<c:url value="/keywordSearchResults.do"> 
     111                                   <c:param name="searchTerm" value="${searchTerm}" /> 
     112                                   <c:param name="searchBag" value="${searchBag}" /> 
     113                                   <c:param name="facet_${facet.field}" value="${facetItem.value}" /> 
     114                            </c:url>" title="Click to show '<c:out value="${facetItem.value}" />'"> 
     115                               <c:out value="${facetItem.value}" /> 
     116                               (<c:out value="${facetItem.facetValueHitCount}"></c:out>) 
     117                            </a> 
     118                        </li> 
     119                    </c:forEach> 
     120                </ul> 
     121                </div> 
     122              </div> 
     123        </c:if> 
     124     </c:forEach> 
     125     </div> 
    49126    </c:when> 
    50      
    51     <c:otherwise> 
    52         <div class="keywordSearchResults"> 
    53          
    54         <div> 
    55         <c:choose> 
    56             <c:when test="${!empty searchTerm && searchTerm != '*:*'}"> 
    57                Search Term: <b><c:out value="${searchTerm}"/></b> 
    58             </c:when> 
    59             <c:otherwise> 
    60                <i>(showing all)</i>    
    61             </c:otherwise> 
    62         </c:choose> 
    63         </div> 
    64          
    65         <div> 
    66         <c:forEach items="${searchFacets}" var="facet"> 
    67             <c:if test="${facet.value != null && facet.value != ''}"> 
    68                 <div class="facetRestriction"> 
    69                     ${facet.name} restricted to <b>${facet.value}</b> 
    70                     <a href="<c:url value="/keywordSearchResults.do"> 
    71                            <c:param name="searchTerm" value="${searchTerm}" /> 
    72                            <c:param name="searchBag" value="${searchBag}" /> 
    73                            <c:forEach items="${searchFacets}" var="facetOTHER"> 
    74                                <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
    75                                    <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    76                                </c:if> 
    77                            </c:forEach> 
    78                     </c:url>">                            
    79                         <img border="0" src="images/cross.gif" alt="(x)" title="Remove restriction"/> 
    80                     </a> 
    81                 </div> 
    82             </c:if> 
    83         </c:forEach> 
    84          
    85         <c:if test="${!empty searchBag}"> 
    86             <div class="facetRestriction"> 
    87                 Searching only in list <b>${searchBag}</b> 
    88                 <a href="<c:url value="/keywordSearchResults.do"> 
    89                        <c:param name="searchTerm" value="${searchTerm}" /> 
    90                        <c:forEach items="${searchFacets}" var="facetOTHER"> 
    91                            <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
    92                                <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    93                            </c:if> 
    94                        </c:forEach> 
    95                 </c:url>">                            
    96                     <img border="0" src="images/cross.gif" alt="(x)" title="Remove restriction"/> 
    97                 </a> 
    98             </div> 
    99         </c:if> 
    100        </div> 
    101          
    102         <c:if test="${searchTotalHits == 0}"> 
    103             <div style="margin-top: 2em; text-align: center;"> 
    104                 <div style="font-weight: bold;"> 
    105                   Unfortunately your search did not return any results! 
    106                 </div> 
    107                  
     127 
     128  <c:otherwise> 
     129    <div class="keywordSearchResults"> 
     130 
     131    <div> 
     132    <c:choose> 
     133      <c:when test="${!empty searchTerm && searchTerm != '*:*'}"> 
     134           Search Term: <b><c:out value="${searchTerm}"/></b> 
     135        </c:when> 
     136        <c:otherwise> 
     137           <i>(showing all)</i> 
     138        </c:otherwise> 
     139      </c:choose> 
     140    </div> 
     141 
     142    <div> 
     143    <c:forEach items="${searchFacets}" var="facet"> 
     144        <c:if test="${facet.value != null && facet.value != ''}"> 
     145          <div class="facetRestriction"> 
     146              ${facet.name} restricted to <b>${facet.value}</b> 
     147              <a href="<c:url value="/keywordSearchResults.do"> 
     148                     <c:param name="searchTerm" value="${searchTerm}" /> 
     149                     <c:param name="searchBag" value="${searchBag}" /> 
     150                     <c:forEach items="${searchFacets}" var="facetOTHER"> 
     151                         <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
     152                             <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     153                         </c:if> 
     154                     </c:forEach> 
     155              </c:url>"> 
     156                  <img border="0" src="images/cross.gif" alt="(x)" title="Remove restriction"/> 
     157              </a> 
     158          </div> 
     159        </c:if> 
     160    </c:forEach> 
     161 
     162    <c:if test="${!empty searchBag}"> 
     163      <div class="facetRestriction"> 
     164          Searching only in list <b>${searchBag}</b> 
     165          <a href="<c:url value="/keywordSearchResults.do"> 
     166                 <c:param name="searchTerm" value="${searchTerm}" /> 
     167                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     168                     <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
     169                         <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     170                     </c:if> 
     171                 </c:forEach> 
     172          </c:url>"> 
     173              <img border="0" src="images/cross.gif" alt="(x)" title="Remove restriction"/> 
     174          </a> 
     175      </div> 
     176    </c:if> 
     177     </div> 
     178 
     179    <c:if test="${searchTotalHits == 0}"> 
     180        <div style="margin-top: 2em; text-align: center;"> 
     181            <div style="font-weight: bold;"> 
     182              Unfortunately your search did not return any results! 
     183            </div> 
     184 
    108185                <div style="margin-top: 1em;"> 
    109                   Please try one of these steps to broaden your search: 
     186              Please try one of these steps to broaden your search: 
    110187                </div> 
    111                  
    112                 <ul> 
    113                     <c:if test="${!empty searchFacetValues}"> 
    114                         <li>Remove restrictions by clicking the red <b>(x)</b> above</li> 
    115                     </c:if> 
    116                     <li>Add an asterisk (*) to the end of a word to search for partial matches, e.g. <i>dros*</i></li> 
    117                     <li>Search for synonyms using the OR operator, e.g. <i>(fly OR drosophila)</i></li> 
    118                 </ul> 
    119             </div> 
    120         </c:if> 
    121          
    122         <c:if test="${searchTotalHits > 0}"> 
    123             <div style="margin-top: 1em;"> 
    124                <c:out value="Showing results ${searchOffset + 1} to ${fn:length(searchResults) + searchOffset} out of ${searchTotalHits}"/> 
    125                <c:if test="${searchTotalHits > fn:length(searchResults)}"> 
    126                     <div class="pages"> 
    127                         <c:choose> 
    128                             <c:when test="${searchOffset > 0}">                      
    129                                 <a href="<c:url value="/keywordSearchResults.do"> 
    130                                      <c:param name="searchTerm" value="${searchTerm}" /> 
    131                                      <c:param name="searchBag" value="${searchBag}" /> 
    132                                      <c:forEach items="${searchFacets}" var="facetOTHER"> 
    133                                          <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
    134                                              <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    135                                          </c:if> 
    136                                      </c:forEach> 
    137                                      <c:param name="searchOffset" value="0" /></c:url>"> 
    138                                    &lt;&lt;&nbsp;First 
    139                                 </a> 
    140                                 &nbsp;&nbsp;       
    141                                 <a href="<c:url value="/keywordSearchResults.do"> 
    142                                      <c:param name="searchTerm" value="${searchTerm}" /> 
    143                                      <c:param name="searchBag" value="${searchBag}" /> 
    144                                      <c:forEach items="${searchFacets}" var="facetOTHER"> 
    145                                          <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
    146                                              <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    147                                          </c:if> 
    148                                      </c:forEach> 
    149                                      <c:param name="searchOffset" value="${searchOffset - searchPerPage}" /></c:url>"> 
    150                                    &lt;&nbsp;Previous 
    151                                 </a> 
    152                             </c:when> 
    153                             <c:otherwise> 
    154                                &lt;&lt;&nbsp;First 
    155                                &nbsp;&nbsp;  
    156                                &lt;&nbsp;Previous 
    157                             </c:otherwise> 
    158                         </c:choose> 
    159                         &nbsp;|&nbsp;   
    160                         <c:choose> 
    161                             <c:when test="${searchOffset + searchPerPage < searchTotalHits}">                      
    162                                 <a href="<c:url value="/keywordSearchResults.do"> 
    163                                      <c:param name="searchTerm" value="${searchTerm}" /> 
    164                                      <c:param name="searchBag" value="${searchBag}" /> 
    165                                      <c:forEach items="${searchFacets}" var="facetOTHER"> 
    166                                          <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
    167                                              <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    168                                          </c:if> 
    169                                      </c:forEach> 
    170                                      <c:param name="searchOffset" value="${searchOffset + searchPerPage}" /></c:url>"> 
    171                                    Next&nbsp;&gt; 
    172                                 </a> 
    173                                 &nbsp;&nbsp;    
    174                                 <a href="<c:url value="/keywordSearchResults.do"> 
    175                                      <c:param name="searchTerm" value="${searchTerm}" /> 
    176                                      <c:param name="searchBag" value="${searchBag}" /> 
    177                                      <c:forEach items="${searchFacets}" var="facetOTHER"> 
    178                                          <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
    179                                              <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    180                                          </c:if> 
    181                                      </c:forEach> 
    182                                      <c:param name="searchOffset" value="${searchTotalHits - searchTotalHits % searchPerPage}" /></c:url>"> 
    183                                    Last&nbsp;&gt;&gt; 
    184                                 </a> 
    185                             </c:when> 
    186                             <c:otherwise> 
    187                                Next&nbsp;&gt; 
    188                                &nbsp;&nbsp;  
    189                                Last&nbsp;&gt;&gt; 
    190                             </c:otherwise> 
    191                         </c:choose> 
    192                     </div> 
    193                </c:if> 
    194             </div> 
    195              
    196             <div style="color: #ccc; font-size: 9px;"> 
    197             ${searchTime/1000}s 
    198             </div> 
    199              
    200             <div style="clear: both;"> 
    201              
    202             <div class="facets"> 
    203                 <c:forEach items="${searchFacets}" var="facet"> 
    204                     <c:if test="${facet.items != null && !empty facet.items}"> 
    205                         <c:choose> 
    206                             <c:when test="${facet.value != null && facet.value != ''}"> 
    207                                 <div class="facetHeader">${facet.name}: <i>${facet.value}</i></div> 
    208                                 <div class="facetContents"> 
    209                                 <a href="<c:url value="/keywordSearchResults.do"> 
    210                                        <c:param name="searchTerm" value="${searchTerm}" /> 
    211                                        <c:param name="searchBag" value="${searchBag}" /> 
    212                                        <c:forEach items="${searchFacets}" var="facetOTHER"> 
    213                                            <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
    214                                                <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    215                                            </c:if> 
    216                                        </c:forEach> 
    217                                 </c:url>">                            
    218                                     &laquo; show all 
    219                                 </a> 
    220                                 </div> 
    221                             </c:when> 
    222                             <c:otherwise> 
    223                                 <div class="facetHeader">Hits by ${facet.name}</div> 
    224                                 <div class="facetContents"> 
    225                                 <ol> 
    226                                     <c:forEach items="${facet.items}" var="facetItem" varStatus="facetItemStat"> 
    227                                         <c:if test="${facetItemStat.index == 10}"> 
    228                                               <li class="facetMoreLink"> 
    229                                                   <a href="javascript:{}" onclick="jQuery(this).parent('li').next('ul').slideToggle('fast');"> 
    230                                                      ... and <b>${fn:length(facet.items) - facetItemStat.index }</b> more values &raquo; 
    231                                                   </a> 
    232                                               </li> 
    233                                           </ul> 
    234                                            
    235                                           <ul style="display: none;"> 
    236                                         </c:if> 
    237                          
     188 
     189            <ul> 
     190                <c:if test="${!empty searchFacetValues}"> 
     191                    <li>Remove restrictions by clicking the red <b>(x)</b> above</li> 
     192                </c:if> 
     193                <li>Add an asterisk (*) to the end of a word to search for partial matches, e.g. <i>dros*</i></li> 
     194                <li>Search for synonyms using the OR operator, e.g. <i>(fly OR drosophila)</i></li> 
     195            </ul> 
     196        </div> 
     197    </c:if> 
     198 
     199    <c:if test="${searchTotalHits > 0}"> 
     200      <div style="margin-top: 1em;"> 
     201         <c:out value="Showing results ${searchOffset + 1} to ${fn:length(searchResults) + searchOffset} out of ${searchTotalHits}"/> 
     202         <c:if test="${searchTotalHits > fn:length(searchResults)}"> 
     203              <div class="pages"> 
     204                  <c:choose> 
     205                    <c:when test="${searchOffset > 0}"> 
     206                      <a href="<c:url value="/keywordSearchResults.do"> 
     207                           <c:param name="searchTerm" value="${searchTerm}" /> 
     208                           <c:param name="searchBag" value="${searchBag}" /> 
     209                                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     210                                     <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
     211                                         <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     212                                     </c:if> 
     213                                 </c:forEach> 
     214                                 <c:param name="searchOffset" value="0" /></c:url>"> 
     215                         &lt;&lt;&nbsp;First 
     216                      </a> 
     217                      &nbsp;&nbsp; 
     218                        <a href="<c:url value="/keywordSearchResults.do"> 
     219                                 <c:param name="searchTerm" value="${searchTerm}" /> 
     220                                 <c:param name="searchBag" value="${searchBag}" /> 
     221                                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     222                                     <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
     223                                         <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     224                                     </c:if> 
     225                                 </c:forEach> 
     226                                 <c:param name="searchOffset" value="${searchOffset - searchPerPage}" /></c:url>"> 
     227                           &lt;&nbsp;Previous 
     228                        </a> 
     229                    </c:when> 
     230                    <c:otherwise> 
     231                       &lt;&lt;&nbsp;First 
     232                         &nbsp;&nbsp; 
     233                       &lt;&nbsp;Previous 
     234                    </c:otherwise> 
     235                  </c:choose> 
     236                  &nbsp;|&nbsp; 
     237                  <c:choose> 
     238                    <c:when test="${searchOffset + searchPerPage < searchTotalHits}"> 
     239                        <a href="<c:url value="/keywordSearchResults.do"> 
     240                                 <c:param name="searchTerm" value="${searchTerm}" /> 
     241                                 <c:param name="searchBag" value="${searchBag}" /> 
     242                                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     243                                     <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
     244                                         <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     245                                     </c:if> 
     246                                 </c:forEach> 
     247                                 <c:param name="searchOffset" value="${searchOffset + searchPerPage}" /></c:url>"> 
     248                           Next&nbsp;&gt; 
     249                        </a> 
     250                        &nbsp;&nbsp; 
     251                        <a href="<c:url value="/keywordSearchResults.do"> 
     252                                 <c:param name="searchTerm" value="${searchTerm}" /> 
     253                                 <c:param name="searchBag" value="${searchBag}" /> 
     254                                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     255                                     <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
     256                                         <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     257                                     </c:if> 
     258                                 </c:forEach> 
     259                                 <c:param name="searchOffset" value="${searchTotalHits - searchTotalHits % searchPerPage}" /></c:url>"> 
     260                           Last&nbsp;&gt;&gt; 
     261                        </a> 
     262                    </c:when> 
     263                    <c:otherwise> 
     264                       Next&nbsp;&gt; 
     265                         &nbsp;&nbsp; 
     266                       Last&nbsp;&gt;&gt; 
     267                    </c:otherwise> 
     268                  </c:choose> 
     269              </div> 
     270         </c:if> 
     271      </div> 
     272 
     273      <div style="color: #ccc; font-size: 9px;"> 
     274      ${searchTime/1000}s 
     275      </div> 
     276 
     277      <div style="clear: both;"> 
     278 
     279      <div class="facets"> 
     280            <c:forEach items="${searchFacets}" var="facet"> 
     281              <c:if test="${facet.items != null && !empty facet.items}"> 
     282                  <c:choose> 
     283                      <c:when test="${facet.value != null && facet.value != ''}"> 
     284                          <div class="facetHeader">${facet.name}: <i>${facet.value}</i></div> 
     285                          <div class="facetContents"> 
     286                          <a href="<c:url value="/keywordSearchResults.do"> 
     287                                 <c:param name="searchTerm" value="${searchTerm}" /> 
     288                                 <c:param name="searchBag" value="${searchBag}" /> 
     289                                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     290                                     <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
     291                                           <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     292                                     </c:if> 
     293                                 </c:forEach> 
     294                          </c:url>"> 
     295                              &laquo; show all 
     296                          </a> 
     297                          </div> 
     298                      </c:when> 
     299                      <c:otherwise> 
     300                          <div class="facetHeader">Hits by ${facet.name}</div> 
     301                          <div class="facetContents"> 
     302                          <ol> 
     303                                <c:forEach items="${facet.items}" var="facetItem" varStatus="facetItemStat"> 
     304                                    <c:if test="${facetItemStat.index == 10}"> 
     305                                        <li class="facetMoreLink"> 
     306                                            <a href="javascript:{}" onclick="jQuery(this).parent('li').next('ul').slideToggle('fast');"> 
     307                                               ... and <b>${fn:length(facet.items) - facetItemStat.index }</b> more values &raquo; 
     308                                            </a> 
     309                                        </li> 
     310                                    </ul> 
     311 
     312                                    <ul style="display: none;"> 
     313                                  </c:if> 
     314 
    238315                                        <li> 
    239                                             <a href="<c:url value="/keywordSearchResults.do"> 
    240                                                    <c:param name="searchTerm" value="${searchTerm}" /> 
    241                                                    <c:param name="searchBag" value="${searchBag}" /> 
    242                                                    <c:param name="facet_${facet.field}" value="${facetItem.value}" /> 
    243                                                    <c:forEach items="${searchFacets}" var="facetOTHER"> 
    244                                                        <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
    245                                                            <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    246                                                        </c:if> 
    247                                                    </c:forEach> 
    248                                             </c:url>" title="Click to only show '<c:out value="${facetItem.value}" />'"> 
    249                                                <c:out value="${facetItem.value}" />: 
    250                                                <c:out value="${facetItem.facetValueHitCount}"></c:out> 
    251                                             </a> 
    252                                         </li> 
    253                                     </c:forEach> 
    254                                 </ol> 
    255                                 </div> 
    256                             </c:otherwise> 
    257                         </c:choose> 
    258                     </c:if>                 
    259                 </c:forEach> 
    260             </div> 
    261              
    262             <div class="resultTableContainer"> 
    263                 <table cellpadding="0" cellspacing="0" border="0" class="dbsources"> 
    264                 <tr> 
    265                     <th>Type</th> 
    266                     <th>Details</th> 
    267                     <th>Search score</th> 
    268                 </tr> 
    269                 <c:forEach items="${searchResults}" var="searchResult"> 
    270                   <tr class="keywordSearchResult"> 
    271                       <td> 
    272                           <c:out value="${searchResult.type}"></c:out> 
    273                       </td> 
    274                       <td> 
    275                           <div class="objectKeys"> 
    276                           <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${searchResult.id}"> 
    277                           <c:if test="${empty searchResult.keyFields}"> 
    278                               <c:out value="${searchResult.type}"></c:out> 
    279                           </c:if> 
    280                           <c:forEach items="${searchResult.keyFields}" var="field" varStatus="status"> 
    281                             <c:set var="fieldConfig" value="${searchResult.fieldConfigs[field]}"/> 
    282                             <span title="<c:out value="${field}"/>" class="objectKey"> 
    283                                <c:choose>     
    284                                <%-- print each field configured for this object --%> 
    285                                 <c:when test="${!empty fieldConfig && !empty fieldConfig.displayer}"> 
    286                                   <c:set var="interMineObject" value="${searchResult.object}" scope="request"/> 
    287                                   <span class="value"> 
    288                                     <tiles:insert page="${fieldConfig.displayer}"> 
    289                                       <tiles:put name="expr" value="${fieldConfig.fieldExpr}" /> 
    290                                     </tiles:insert> 
    291                                   </span> 
    292                                 </c:when> 
    293                                 <c:when test="${!empty fieldConfig && !empty fieldConfig.fieldExpr}"> 
    294                                   <c:set var="outVal" value="${searchResult.fieldValues[fieldConfig.fieldExpr]}"/> 
    295                                   <span class="value">${outVal}</span> 
    296                                   <c:if test="${empty outVal}"> 
    297                                     - 
    298                                   </c:if> 
    299                                 </c:when> 
    300                                 <c:otherwise> 
    301                                   - 
    302                                 </c:otherwise> 
    303                               </c:choose> 
    304                             </span> 
    305                             <c:if test="${! status.last }"> 
    306                                 <span class="objectKey">|</span> 
    307                             </c:if> 
    308                           </c:forEach> 
    309                           </html:link> 
    310                           </div> 
    311                            
    312                           <%-- print each field configured for this object --%> 
    313                           <c:forEach items="${searchResult.additionalFields}" var="field"> 
    314                             <c:set var="fieldConfig" value="${searchResult.fieldConfigs[field]}"/> 
    315                             <div class="objectField"> 
    316                                <c:choose>    
    317                                <%-- print each field configured for this object --%> 
    318                                 <c:when test="${!empty fieldConfig && !empty fieldConfig.displayer}"> 
    319                                   <span class="objectFieldName"><c:out value="${field}"/>:</span> 
    320                                 
    321                                   <c:set var="interMineObject" value="${searchResult.object}" scope="request"/> 
    322                                   <span class="value"> 
    323                                     <tiles:insert page="${fieldConfig.displayer}"> 
    324                                       <tiles:put name="expr" value="${fieldConfig.fieldExpr}" /> 
    325                                     </tiles:insert> 
    326                                   </span> 
    327                                 </c:when> 
    328                                  
    329                                 <c:when test="${!empty fieldConfig && !empty fieldConfig.fieldExpr}"> 
    330                                   <c:set var="outVal" value="${searchResult.fieldValues[fieldConfig.fieldExpr]}"/> 
    331                                   <c:if test="${!empty outVal}"> 
    332                                     <span class="objectFieldName"><c:out value="${field}"/>:</span> 
    333                                   </c:if> 
    334                                 
    335                                   <span class="value" style="font-weight: bold;">${outVal}</span> 
    336                                   <c:if test="${empty outVal}"> 
    337                                     &nbsp;<%--for IE--%> 
    338                                   </c:if> 
    339                                 </c:when> 
    340                                 <c:otherwise> 
    341                                   &nbsp;<%--for IE--%> 
    342                                 </c:otherwise> 
    343                               </c:choose> 
    344                             </div> 
    345                           </c:forEach> 
    346                            
     316                                        <a href="<c:url value="/keywordSearchResults.do"> 
     317                                               <c:param name="searchTerm" value="${searchTerm}" /> 
     318                                               <c:param name="searchBag" value="${searchBag}" /> 
     319                                               <c:param name="facet_${facet.field}" value="${facetItem.value}" /> 
     320                                         <c:forEach items="${searchFacets}" var="facetOTHER"> 
     321                                             <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
     322                                                 <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     323                                             </c:if> 
     324                                         </c:forEach> 
     325                                        </c:url>" title="Click to only show '<c:out value="${facetItem.value}" />'"> 
     326                                           <c:out value="${facetItem.value}" />: 
     327                                           <c:out value="${facetItem.facetValueHitCount}"></c:out> 
     328                                        </a> 
     329                                    </li> 
     330                                </c:forEach> 
     331                          </ol> 
     332                          </div> 
     333                      </c:otherwise> 
     334                  </c:choose> 
     335              </c:if> 
     336            </c:forEach> 
     337      </div> 
     338 
     339    <c:if test="${!empty searchFacetValues['Category']}"> 
     340      <form action="/${WEB_PROPERTIES['webapp.path']}/saveFromIdsToBag.do" id="saveFromIdsToBagForm" method="POST"> 
     341          <input type="hidden" id="type" name="type" value="${searchFacetValues['Category']}"/> 
     342          <input type="hidden" id="ids" name="ids" value=""/> 
     343          <input type="hidden" name="source" value="keywordSearchResults"/> 
     344          <input type="hidden" name="newBagName" value="new_${searchFacetValues['Category']}_list"/> 
     345          <div align="left" style="padding:10px;"><input type="submit" class="submit" value="CREATE LIST"/></div> 
     346      </form> 
     347    </c:if> 
     348 
     349      <div class="resultTableContainer"> 
     350        <table cellpadding="0" cellspacing="0" border="0" class="dbsources"> 
     351        <tr> 
     352 
     353            <c:if test="${!empty searchFacetValues['Category']}"> 
     354              <th> 
     355                <input type="checkbox" id="allItems" onclick="checkAll()"/> 
     356              </th> 
     357            </c:if> 
     358 
     359            <th>Type</th> 
     360            <th>Details</th> 
     361            <th>Search score</th> 
     362        </tr> 
     363        <c:forEach items="${searchResults}" var="searchResult"> 
     364          <tr class="keywordSearchResult"> 
     365 
     366              <c:if test="${!empty searchFacetValues['Category']}"> 
     367                <td> 
     368                  <input type="checkbox" class="item" value="${searchResult.id}" onclick="updateCheckStatus(this.checked)"/> 
     369                </td> 
     370              </c:if> 
     371              <td> 
     372                  <c:out value="${searchResult.type}"></c:out> 
     373              </td> 
     374              <td> 
     375                  <div class="objectKeys"> 
     376                  <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${searchResult.id}"> 
     377                  <c:if test="${empty searchResult.keyFields}"> 
     378                      <c:out value="${searchResult.type}"></c:out> 
     379                  </c:if> 
     380                  <c:forEach items="${searchResult.keyFields}" var="field" varStatus="status"> 
     381                    <c:set var="fieldConfig" value="${searchResult.fieldConfigs[field]}"/> 
     382                    <span title="<c:out value="${field}"/>" class="objectKey"> 
     383                       <c:choose> 
     384                       <%-- print each field configured for this object --%> 
     385                        <c:when test="${!empty fieldConfig && !empty fieldConfig.displayer}"> 
     386                          <c:set var="interMineObject" value="${searchResult.object}" scope="request"/> 
     387                          <span class="value"> 
     388                            <tiles:insert page="${fieldConfig.displayer}"> 
     389                              <tiles:put name="expr" value="${fieldConfig.fieldExpr}" /> 
     390                            </tiles:insert> 
     391                          </span> 
     392                        </c:when> 
     393                        <c:when test="${!empty fieldConfig && !empty fieldConfig.fieldExpr}"> 
     394                          <c:set var="outVal" value="${searchResult.fieldValues[fieldConfig.fieldExpr]}"/> 
     395                          <span class="value">${outVal}</span> 
     396                          <c:if test="${empty outVal}"> 
     397                            - 
     398                          </c:if> 
     399                        </c:when> 
     400                        <c:otherwise> 
     401                          - 
     402                        </c:otherwise> 
     403                      </c:choose> 
     404                    </span> 
     405                    <c:if test="${! status.last }"> 
     406                        <span class="objectKey">|</span> 
     407                    </c:if> 
     408                  </c:forEach> 
     409                  </html:link> 
     410                  </div> 
     411 
     412                <%-- print each field configured for this object --%> 
     413                  <c:forEach items="${searchResult.additionalFields}" var="field"> 
     414                    <c:set var="fieldConfig" value="${searchResult.fieldConfigs[field]}"/> 
     415                  <div class="objectField"> 
     416                     <c:choose> 
     417                     <%-- print each field configured for this object --%> 
     418                      <c:when test="${!empty fieldConfig && !empty fieldConfig.displayer}"> 
     419                              <span class="objectFieldName"><c:out value="${field}"/>:</span> 
     420 
     421                        <c:set var="interMineObject" value="${searchResult.object}" scope="request"/> 
     422                        <span class="value"> 
     423                          <tiles:insert page="${fieldConfig.displayer}"> 
     424                            <tiles:put name="expr" value="${fieldConfig.fieldExpr}" /> 
     425                          </tiles:insert> 
     426                        </span> 
     427                      </c:when> 
     428 
     429                      <c:when test="${!empty fieldConfig && !empty fieldConfig.fieldExpr}"> 
     430                              <c:set var="outVal" value="${searchResult.fieldValues[fieldConfig.fieldExpr]}"/> 
     431                        <c:if test="${!empty outVal}"> 
     432                                <span class="objectFieldName"><c:out value="${field}"/>:</span> 
     433                              </c:if> 
     434 
     435                        <span class="value" style="font-weight: bold;">${outVal}</span> 
     436                        <c:if test="${empty outVal}"> 
     437                          &nbsp;<%--for IE--%> 
     438                        </c:if> 
     439                      </c:when> 
     440                      <c:otherwise> 
     441                        &nbsp;<%--for IE--%> 
     442                      </c:otherwise> 
     443                    </c:choose> 
     444                  </div> 
     445                </c:forEach> 
     446 
    347447                          <c:if test="${searchResult.templates != null && !empty searchResult.templates}"> 
    348                               <c:forEach items="${searchResult.templates}" var="template">                               
     448                              <c:forEach items="${searchResult.templates}" var="template"> 
    349449                                    <c:if test="${template.value.valid}"> 
    350450                                    <div> 
     
    352452                                               title="Click here to go to the template form"> 
    353453                                           <span class="templateTitle">${template.value.title}</span> 
    354                                            <img border="0" class="arrow" src="images/template_t.gif"/> 
    355                                       </html:link> 
    356                                     </div> 
    357                                     </c:if> 
     454                         <img border="0" class="arrow" src="images/template_t.gif"/> 
     455                    </html:link> 
     456                  </div> 
     457                  </c:if> 
    358458                              </c:forEach> 
    359459                          </c:if> 
    360                       </td>       
    361                       <td><img height="10" width="${searchResult.points * 5}" src="images/heat${searchResult.points}.gif" alt="${searchResult.points}/10" title="${searchResult.points}/10"/></td> 
    362                 </tr> 
    363                 </c:forEach> 
    364                 </table> 
    365             </div> 
    366              
    367             </div> 
    368         </c:if> 
    369          
    370         </div> 
    371     </c:otherwise> 
     460              </td> 
     461              <td><img height="10" width="${searchResult.points * 5}" src="images/heat${searchResult.points}.gif" alt="${searchResult.points}/10" title="${searchResult.points}/10"/></td> 
     462        </tr> 
     463        </c:forEach> 
     464        </table> 
     465      </div> 
     466 
     467      </div> 
     468    </c:if> 
     469 
     470    </div> 
     471  </c:otherwise> 
    372472</c:choose> 
    373473</c:if> 
  • trunk/modmine/webapp/resources/web.properties

    r22698 r22833  
    189189hint.experiment.m5=By clicking on the submission name or DCC id you will reach a page with information about the structure of the data production process, the protocols used and the resulting features. 
    190190hint.experiment.m6=Click on [Find nearby features] to reach a tool in the data submission page that allows to query for overlapping features or adjacent genes. 
     191hint.experiment.m7=Create a list of submissions using the checkboxes and 'CREATE LIST' button.  Use checkboxes in the table header to select all rows in the submissions. 
    191192 
    192193meta.keywords = microarray, bioinformatics, drosophila, c.elegans, genomics 
  • trunk/modmine/webapp/resources/webapp/keywordSearchResults.jsp

    r22497 r22833  
    1515<html:xhtml /> 
    1616 
     17<style type="text/css"> 
     18input.submit { 
     19  color: #008AB8; 
     20  font: bold 84% 'trebuchet ms',helvetica,sans-serif; 
     21  background-color: #fed; 
     22  border:1px solid; 
     23  border-color: #696 #363 #363 #696; 
     24} 
     25</style> 
     26 
     27<script> 
     28 
     29  jQuery(document).ready(function(){ 
     30    // Unckeck all checkboxes everything the page is (re)loaded 
     31    initCheck(); 
     32 
     33    // Do before the form submitted 
     34    jQuery("#saveFromIdsToBagForm").submit(function() { 
     35        var ids = new Array(); 
     36        jQuery(".item").each(function() { 
     37          if (this.checked) {ids.push(this.value);} 
     38       }); 
     39 
     40        if (ids.length < 1) 
     41        { alert("Please select some ${searchFacetValues['Category']}s..."); 
     42          return false; 
     43        } else { 
     44          jQuery("#ids").val(ids); 
     45          return true; 
     46          } 
     47    }); 
     48  }); 
     49 
     50     function initCheck() 
     51     { 
     52       jQuery('#allItems').removeAttr('checked'); 
     53       jQuery(".item").removeAttr('checked'); 
     54     } 
     55 
     56     // (un)Check all ids checkboxes 
     57     function checkAll() 
     58     { 
     59         jQuery(".item").attr('checked', jQuery('#allItems').is(':checked')); 
     60         jQuery('#allItems').css("opacity", 1); 
     61     } 
     62 
     63     function updateCheckStatus(status) 
     64     { 
     65         var statTag; 
     66         if (!status) { //unchecked 
     67           jQuery(".item").each(function() { 
     68             if (this.checked) {statTag=true;} 
     69           }); 
     70 
     71           if (statTag) { 
     72            jQuery("#allItems").attr('checked', true); 
     73            jQuery("#allItems").css("opacity", 0.5); } 
     74           else { 
     75            jQuery("#allItems").removeAttr('checked'); 
     76            jQuery("#allItems").css("opacity", 1);} 
     77         } 
     78         else { //checked 
     79           jQuery(".item").each(function() { 
     80             if (!this.checked) {statTag=true;} 
     81         }); 
     82 
     83         if (statTag) { 
     84           jQuery("#allItems").attr('checked', true); 
     85           jQuery("#allItems").css("opacity", 0.5); } 
     86         else { 
     87           jQuery("#allItems").attr('checked', true); 
     88           jQuery("#allItems").css("opacity", 1);} 
     89         } 
     90     } 
     91 
     92</script> 
     93 
    1794<div class="body"> 
    1895 
     
    2299<c:choose> 
    23100    <c:when test="${empty searchTerm && !empty searchFacets && (searchFacetValues == null || empty searchFacetValues)}"> 
    24        <div class="keywordSearchIndex"> 
    25        <c:forEach items="${searchFacets}" var="facet" varStatus="facetStatus"> 
    26             <c:if test="${facet.items != null && !empty facet.items}"> 
    27                 <div class="keywordSearchIndexColumn" style="width: <c:out value="${(90 - 90 % fn:length(searchFacets)) / fn:length(searchFacets)}"></c:out>%;"> 
    28                     <h2 class="overviewFacetHeader">Objects by ${facet.name}</h2> 
    29                     <div class="overviewFacetContents"> 
    30                     <ul> 
    31                         <c:forEach items="${facet.items}" var="facetItem"> 
     101     <div class="keywordSearchIndex" style="background: #008AB8"> 
     102     <c:forEach items="${searchFacets}" var="facet" varStatus="facetStatus"> 
     103        <c:if test="${facet.items != null && !empty facet.items}"> 
     104            <div class="keywordSearchIndexColumn" style="width: <c:out value="${(90 - 90 % fn:length(searchFacets)) / fn:length(searchFacets)}"></c:out>%;"> 
     105                <h2 class="overviewFacetHeader">Objects by ${facet.name}</h2> 
     106                <div class="overviewFacetContents"> 
     107                <ul> 
     108                    <c:forEach items="${facet.items}" var="facetItem"> 
    32109                            <li> 
    33                                 <a href="<c:url value="/keywordSearchResults.do"> 
    34                                        <c:param name="searchTerm" value="${searchTerm}" /> 
    35                                        <c:param name="searchBag" value="${searchBag}" /> 
    36                                        <c:param name="facet_${facet.field}" value="${facetItem.value}" /> 
    37                                 </c:url>" title="Click to show '<c:out value="${facetItem.value}" />'"> 
    38                                    <c:out value="${facetItem.value}" /> 
    39                                    (<c:out value="${facetItem.facetValueHitCount}"></c:out>) 
    40                                 </a> 
    41                             </li> 
    42                         </c:forEach> 
    43                     </ul> 
    44                     </div> 
    45                 </div> 
    46             </c:if>                 
    47        </c:forEach> 
    48        </div> 
     110                            <a href="<c:url value="/keywordSearchResults.do"> 
     111                                   <c:param name="searchTerm" value="${searchTerm}" /> 
     112                                   <c:param name="searchBag" value="${searchBag}" /> 
     113                                   <c:param name="facet_${facet.field}" value="${facetItem.value}" /> 
     114                            </c:url>" title="Click to show '<c:out value="${facetItem.value}" />'"> 
     115                               <c:out value="${facetItem.value}" /> 
     116                               (<c:out value="${facetItem.facetValueHitCount}"></c:out>) 
     117                            </a> 
     118                        </li> 
     119                    </c:forEach> 
     120                </ul> 
     121                </div> 
     122              </div> 
     123        </c:if> 
     124     </c:forEach> 
     125     </div> 
    49126    </c:when> 
    50      
    51     <c:otherwise> 
    52         <div class="keywordSearchResults"> 
    53          
    54         <div> 
    55         <c:choose> 
    56             <c:when test="${!empty searchTerm && searchTerm != '*:*'}"> 
    57                Search Term: <b><c:out value="${searchTerm}"/></b> 
    58             </c:when> 
    59             <c:otherwise> 
    60                <i>(showing all)</i>    
    61             </c:otherwise> 
    62         </c:choose> 
    63         </div> 
    64          
    65         <div> 
    66         <c:forEach items="${searchFacets}" var="facet"> 
    67             <c:if test="${facet.value != null && facet.value != ''}"> 
    68                 <div class="facetRestriction"> 
    69                     ${facet.name} restricted to <b>${facet.value}</b> 
    70                     <a href="<c:url value="/keywordSearchResults.do"> 
    71                            <c:param name="searchTerm" value="${searchTerm}" /> 
    72                            <c:param name="searchBag" value="${searchBag}" /> 
    73                            <c:forEach items="${searchFacets}" var="facetOTHER"> 
    74                                <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
    75                                    <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    76                                </c:if> 
    77                            </c:forEach> 
    78                     </c:url>">                            
    79                         <img border="0" src="images/cross.gif" alt="(x)" title="Remove restriction"/> 
    80                     </a> 
    81                 </div> 
    82             </c:if> 
    83         </c:forEach> 
    84          
    85         <c:if test="${!empty searchBag}"> 
    86             <div class="facetRestriction"> 
    87                 Searching only in list <b>${searchBag}</b> 
    88                 <a href="<c:url value="/keywordSearchResults.do"> 
    89                        <c:param name="searchTerm" value="${searchTerm}" /> 
    90                        <c:forEach items="${searchFacets}" var="facetOTHER"> 
    91                            <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
    92                                <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    93                            </c:if> 
    94                        </c:forEach> 
    95                 </c:url>">                            
    96                     <img border="0" src="images/cross.gif" alt="(x)" title="Remove restriction"/> 
    97                 </a> 
    98             </div> 
    99         </c:if> 
    100        </div> 
    101          
    102         <c:if test="${searchTotalHits == 0}"> 
    103             <div style="margin-top: 2em; text-align: center;"> 
    104                 <div style="font-weight: bold;"> 
    105                   Unfortunately your search did not return any results! 
    106                 </div> 
    107                  
     127 
     128  <c:otherwise> 
     129    <div class="keywordSearchResults"> 
     130 
     131    <div> 
     132    <c:choose> 
     133      <c:when test="${!empty searchTerm && searchTerm != '*:*'}"> 
     134           Search Term: <b><c:out value="${searchTerm}"/></b> 
     135        </c:when> 
     136        <c:otherwise> 
     137           <i>(showing all)</i> 
     138        </c:otherwise> 
     139      </c:choose> 
     140    </div> 
     141 
     142    <div> 
     143    <c:forEach items="${searchFacets}" var="facet"> 
     144        <c:if test="${facet.value != null && facet.value != ''}"> 
     145          <div class="facetRestriction"> 
     146              ${facet.name} restricted to <b>${facet.value}</b> 
     147              <a href="<c:url value="/keywordSearchResults.do"> 
     148                     <c:param name="searchTerm" value="${searchTerm}" /> 
     149                     <c:param name="searchBag" value="${searchBag}" /> 
     150                     <c:forEach items="${searchFacets}" var="facetOTHER"> 
     151                         <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
     152                             <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     153                         </c:if> 
     154                     </c:forEach> 
     155              </c:url>"> 
     156                  <img border="0" src="images/cross.gif" alt="(x)" title="Remove restriction"/> 
     157              </a> 
     158          </div> 
     159        </c:if> 
     160    </c:forEach> 
     161 
     162    <c:if test="${!empty searchBag}"> 
     163      <div class="facetRestriction"> 
     164          Searching only in list <b>${searchBag}</b> 
     165          <a href="<c:url value="/keywordSearchResults.do"> 
     166                 <c:param name="searchTerm" value="${searchTerm}" /> 
     167                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     168                     <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
     169                         <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     170                     </c:if> 
     171                 </c:forEach> 
     172          </c:url>"> 
     173              <img border="0" src="images/cross.gif" alt="(x)" title="Remove restriction"/> 
     174          </a> 
     175      </div> 
     176    </c:if> 
     177     </div> 
     178 
     179    <c:if test="${searchTotalHits == 0}"> 
     180        <div style="margin-top: 2em; text-align: center;"> 
     181            <div style="font-weight: bold;"> 
     182              Unfortunately your search did not return any results! 
     183            </div> 
     184 
    108185                <div style="margin-top: 1em;"> 
    109                   Please try one of these steps to broaden your search: 
     186              Please try one of these steps to broaden your search: 
    110187                </div> 
    111                  
    112                 <ul> 
    113                     <c:if test="${!empty searchFacetValues}"> 
    114                         <li>Remove restrictions by clicking the red <b>(x)</b> above</li> 
    115                     </c:if> 
    116                     <li>Add an asterisk (*) to the end of a word to search for partial matches, e.g. <i>dros*</i></li> 
    117                     <li>Search for synonyms using the OR operator, e.g. <i>(fly OR drosophila)</i></li> 
    118                 </ul> 
    119             </div> 
    120         </c:if> 
    121          
    122         <c:if test="${searchTotalHits > 0}"> 
    123             <div style="margin-top: 1em;"> 
    124                <c:out value="Showing results ${searchOffset + 1} to ${fn:length(searchResults) + searchOffset} out of ${searchTotalHits}"/> 
    125                <c:if test="${searchTotalHits > fn:length(searchResults)}"> 
    126                     <div class="pages"> 
    127                         <c:choose> 
    128                             <c:when test="${searchOffset > 0}">                      
    129                                 <a href="<c:url value="/keywordSearchResults.do"> 
    130                                      <c:param name="searchTerm" value="${searchTerm}" /> 
    131                                      <c:param name="searchBag" value="${searchBag}" /> 
    132                                      <c:forEach items="${searchFacets}" var="facetOTHER"> 
    133                                          <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
    134                                              <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    135                                          </c:if> 
    136                                      </c:forEach> 
    137                                      <c:param name="searchOffset" value="0" /></c:url>"> 
    138                                    &lt;&lt;&nbsp;First 
    139                                 </a> 
    140                                 &nbsp;&nbsp;       
    141                                 <a href="<c:url value="/keywordSearchResults.do"> 
    142                                      <c:param name="searchTerm" value="${searchTerm}" /> 
    143                                      <c:param name="searchBag" value="${searchBag}" /> 
    144                                      <c:forEach items="${searchFacets}" var="facetOTHER"> 
    145                                          <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
    146                                              <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    147                                          </c:if> 
    148                                      </c:forEach> 
    149                                      <c:param name="searchOffset" value="${searchOffset - searchPerPage}" /></c:url>"> 
    150                                    &lt;&nbsp;Previous 
    151                                 </a> 
    152                             </c:when> 
    153                             <c:otherwise> 
    154                                &lt;&lt;&nbsp;First 
    155                                &nbsp;&nbsp;  
    156                                &lt;&nbsp;Previous 
    157                             </c:otherwise> 
    158                         </c:choose> 
    159                         &nbsp;|&nbsp;   
    160                         <c:choose> 
    161                             <c:when test="${searchOffset + searchPerPage < searchTotalHits}">                      
    162                                 <a href="<c:url value="/keywordSearchResults.do"> 
    163                                      <c:param name="searchTerm" value="${searchTerm}" /> 
    164                                      <c:param name="searchBag" value="${searchBag}" /> 
    165                                      <c:forEach items="${searchFacets}" var="facetOTHER"> 
    166                                          <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
    167                                              <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    168                                          </c:if> 
    169                                      </c:forEach> 
    170                                      <c:param name="searchOffset" value="${searchOffset + searchPerPage}" /></c:url>"> 
    171                                    Next&nbsp;&gt; 
    172                                 </a> 
    173                                 &nbsp;&nbsp;    
    174                                 <a href="<c:url value="/keywordSearchResults.do"> 
    175                                      <c:param name="searchTerm" value="${searchTerm}" /> 
    176                                      <c:param name="searchBag" value="${searchBag}" /> 
    177                                      <c:forEach items="${searchFacets}" var="facetOTHER"> 
    178                                          <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
    179                                              <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    180                                          </c:if> 
    181                                      </c:forEach> 
    182                                      <c:param name="searchOffset" value="${searchTotalHits - searchTotalHits % searchPerPage}" /></c:url>"> 
    183                                    Last&nbsp;&gt;&gt; 
    184                                 </a> 
    185                             </c:when> 
    186                             <c:otherwise> 
    187                                Next&nbsp;&gt; 
    188                                &nbsp;&nbsp;  
    189                                Last&nbsp;&gt;&gt; 
    190                             </c:otherwise> 
    191                         </c:choose> 
    192                     </div> 
    193                </c:if> 
    194             </div> 
    195              
    196             <div style="color: #ccc; font-size: 9px;"> 
    197             ${searchTime/1000}s 
    198             </div> 
    199              
    200             <div style="clear: both;"> 
    201              
    202             <div class="facets"> 
    203                 <c:forEach items="${searchFacets}" var="facet"> 
    204                     <c:if test="${facet.items != null && !empty facet.items}"> 
    205                         <c:choose> 
    206                             <c:when test="${facet.value != null && facet.value != ''}"> 
    207                                 <div class="facetHeader">${facet.name}: <i>${facet.value}</i></div> 
    208                                 <div class="facetContents"> 
    209                                 <a href="<c:url value="/keywordSearchResults.do"> 
    210                                        <c:param name="searchTerm" value="${searchTerm}" /> 
    211                                        <c:param name="searchBag" value="${searchBag}" /> 
    212                                        <c:forEach items="${searchFacets}" var="facetOTHER"> 
    213                                            <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
    214                                                <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    215                                            </c:if> 
    216                                        </c:forEach> 
    217                                 </c:url>">                            
    218                                     &laquo; show all 
    219                                 </a> 
    220                                 </div> 
    221                             </c:when> 
    222                             <c:otherwise> 
    223                                 <div class="facetHeader">Hits by ${facet.name}</div> 
    224                                 <div class="facetContents"> 
    225                                 <ol> 
    226                                     <c:forEach items="${facet.items}" var="facetItem" varStatus="facetItemStat"> 
    227                                         <c:if test="${facetItemStat.index == 10}"> 
    228                                               <li class="facetMoreLink"> 
    229                                                   <a href="javascript:{}" onclick="jQuery(this).parent('li').next('ul').slideToggle('fast');"> 
    230                                                      ... and <b>${fn:length(facet.items) - facetItemStat.index }</b> more values &raquo; 
    231                                                   </a> 
    232                                               </li> 
    233                                           </ul> 
    234                                            
    235                                           <ul style="display: none;"> 
    236                                         </c:if> 
    237                          
     188 
     189            <ul> 
     190                <c:if test="${!empty searchFacetValues}"> 
     191                    <li>Remove restrictions by clicking the red <b>(x)</b> above</li> 
     192                </c:if> 
     193                <li>Add an asterisk (*) to the end of a word to search for partial matches, e.g. <i>dros*</i></li> 
     194                <li>Search for synonyms using the OR operator, e.g. <i>(fly OR drosophila)</i></li> 
     195            </ul> 
     196        </div> 
     197    </c:if> 
     198 
     199    <c:if test="${searchTotalHits > 0}"> 
     200      <div style="margin-top: 1em;"> 
     201         <c:out value="Showing results ${searchOffset + 1} to ${fn:length(searchResults) + searchOffset} out of ${searchTotalHits}"/> 
     202         <c:if test="${searchTotalHits > fn:length(searchResults)}"> 
     203              <div class="pages"> 
     204                  <c:choose> 
     205                    <c:when test="${searchOffset > 0}"> 
     206                      <a href="<c:url value="/keywordSearchResults.do"> 
     207                           <c:param name="searchTerm" value="${searchTerm}" /> 
     208                           <c:param name="searchBag" value="${searchBag}" /> 
     209                                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     210                                     <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
     211                                         <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     212                                     </c:if> 
     213                                 </c:forEach> 
     214                                 <c:param name="searchOffset" value="0" /></c:url>"> 
     215                         &lt;&lt;&nbsp;First 
     216                      </a> 
     217                      &nbsp;&nbsp; 
     218                        <a href="<c:url value="/keywordSearchResults.do"> 
     219                                 <c:param name="searchTerm" value="${searchTerm}" /> 
     220                                 <c:param name="searchBag" value="${searchBag}" /> 
     221                                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     222                                     <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
     223                                         <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     224                                     </c:if> 
     225                                 </c:forEach> 
     226                                 <c:param name="searchOffset" value="${searchOffset - searchPerPage}" /></c:url>"> 
     227                           &lt;&nbsp;Previous 
     228                        </a> 
     229                    </c:when> 
     230                    <c:otherwise> 
     231                       &lt;&lt;&nbsp;First 
     232                         &nbsp;&nbsp; 
     233                       &lt;&nbsp;Previous 
     234                    </c:otherwise> 
     235                  </c:choose> 
     236                  &nbsp;|&nbsp; 
     237                  <c:choose> 
     238                    <c:when test="${searchOffset + searchPerPage < searchTotalHits}"> 
     239                        <a href="<c:url value="/keywordSearchResults.do"> 
     240                                 <c:param name="searchTerm" value="${searchTerm}" /> 
     241                                 <c:param name="searchBag" value="${searchBag}" /> 
     242                                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     243                                     <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
     244                                         <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     245                                     </c:if> 
     246                                 </c:forEach> 
     247                                 <c:param name="searchOffset" value="${searchOffset + searchPerPage}" /></c:url>"> 
     248                           Next&nbsp;&gt; 
     249                        </a> 
     250                        &nbsp;&nbsp; 
     251                        <a href="<c:url value="/keywordSearchResults.do"> 
     252                                 <c:param name="searchTerm" value="${searchTerm}" /> 
     253                                 <c:param name="searchBag" value="${searchBag}" /> 
     254                                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     255                                     <c:if test="${facetOTHER.value != null && facetOTHER.value != ''}"> 
     256                                         <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     257                                     </c:if> 
     258                                 </c:forEach> 
     259                                 <c:param name="searchOffset" value="${searchTotalHits - searchTotalHits % searchPerPage}" /></c:url>"> 
     260                           Last&nbsp;&gt;&gt; 
     261                        </a> 
     262                    </c:when> 
     263                    <c:otherwise> 
     264                       Next&nbsp;&gt; 
     265                         &nbsp;&nbsp; 
     266                       Last&nbsp;&gt;&gt; 
     267                    </c:otherwise> 
     268                  </c:choose> 
     269              </div> 
     270         </c:if> 
     271      </div> 
     272 
     273      <div style="color: #ccc; font-size: 9px;"> 
     274      ${searchTime/1000}s 
     275      </div> 
     276 
     277      <div style="clear: both;"> 
     278 
     279      <div class="facets" style="background: #008AB8"> 
     280            <c:forEach items="${searchFacets}" var="facet"> 
     281              <c:if test="${facet.items != null && !empty facet.items}"> 
     282                  <c:choose> 
     283                      <c:when test="${facet.value != null && facet.value != ''}"> 
     284                          <div class="facetHeader">${facet.name}: <i>${facet.value}</i></div> 
     285                          <div class="facetContents"> 
     286                          <a href="<c:url value="/keywordSearchResults.do"> 
     287                                 <c:param name="searchTerm" value="${searchTerm}" /> 
     288                                 <c:param name="searchBag" value="${searchBag}" /> 
     289                                 <c:forEach items="${searchFacets}" var="facetOTHER"> 
     290                                     <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
     291                                           <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     292                                     </c:if> 
     293                                 </c:forEach> 
     294                          </c:url>"> 
     295                              &laquo; show all 
     296                          </a> 
     297                          </div> 
     298                      </c:when> 
     299                      <c:otherwise> 
     300                          <div class="facetHeader">Hits by ${facet.name}</div> 
     301                          <div class="facetContents"> 
     302                          <ol> 
     303                                <c:forEach items="${facet.items}" var="facetItem" varStatus="facetItemStat"> 
     304                                    <c:if test="${facetItemStat.index == 10}"> 
     305                                        <li class="facetMoreLink"> 
     306                                            <a href="javascript:{}" onclick="jQuery(this).parent('li').next('ul').slideToggle('fast');"> 
     307                                               ... and <b>${fn:length(facet.items) - facetItemStat.index }</b> more values &raquo; 
     308                                            </a> 
     309                                        </li> 
     310                                    </ul> 
     311 
     312                                    <ul style="display: none;"> 
     313                                  </c:if> 
     314 
    238315                                        <li> 
    239                                             <a href="<c:url value="/keywordSearchResults.do"> 
    240                                                    <c:param name="searchTerm" value="${searchTerm}" /> 
    241                                                    <c:param name="searchBag" value="${searchBag}" /> 
    242                                                    <c:param name="facet_${facet.field}" value="${facetItem.value}" /> 
    243                                                    <c:forEach items="${searchFacets}" var="facetOTHER"> 
    244                                                        <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
    245                                                            <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
    246                                                        </c:if> 
    247                                                    </c:forEach> 
    248                                             </c:url>" title="Click to only show '<c:out value="${facetItem.value}" />'"> 
    249                                                <c:out value="${facetItem.value}" />: 
    250                                                <c:out value="${facetItem.facetValueHitCount}"></c:out> 
    251                                             </a> 
    252                                         </li> 
    253                                     </c:forEach> 
    254                                 </ol> 
    255                                 </div> 
    256                             </c:otherwise> 
    257                         </c:choose> 
    258                     </c:if>                 
    259                 </c:forEach> 
    260             </div> 
    261              
    262             <div class="resultTableContainer"> 
    263                 <table cellpadding="0" cellspacing="0" border="0" class="dbsources"> 
     316                                        <a href="<c:url value="/keywordSearchResults.do"> 
     317                                               <c:param name="searchTerm" value="${searchTerm}" /> 
     318                                               <c:param name="searchBag" value="${searchBag}" /> 
     319                                               <c:param name="facet_${facet.field}" value="${facetItem.value}" /> 
     320                                         <c:forEach items="${searchFacets}" var="facetOTHER"> 
     321                                             <c:if test="${facetOTHER.field != facet.field && facetOTHER.value != null && facetOTHER.value != ''}"> 
     322                                                 <c:param name="facet_${facetOTHER.field}" value="${facetOTHER.value}" /> 
     323                                             </c:if> 
     324                                         </c:forEach> 
     325                                        </c:url>" title="Click to only show '<c:out value="${facetItem.value}" />'"> 
     326                                           <c:out value="${facetItem.value}" />: 
     327                                           <c:out value="${facetItem.facetValueHitCount}"></c:out> 
     328                                        </a> 
     329                                    </li> 
     330                                </c:forEach> 
     331                          </ol> 
     332                          </div> 
     333                      </c:otherwise> 
     334                  </c:choose> 
     335              </c:if> 
     336            </c:forEach> 
     337      </div> 
     338 
     339    <c:if test="${!empty searchFacetValues['Category']}"> 
     340      <form action="/${WEB_PROPERTIES['webapp.path']}/saveFromIdsToBag.do" id="saveFromIdsToBagForm" method="POST"> 
     341          <input type="hidden" id="type" name="type" value="${searchFacetValues['Category']}"/> 
     342          <input type="hidden" id="ids" name="ids" value=""/> 
     343          <input type="hidden" name="source" value="keywordSearchResults"/> 
     344          <input type="hidden" name="newBagName" value="new_${searchFacetValues['Category']}_list"/> 
     345          <div align="left" style="padding:10px;"><input type="submit" class="submit" value="CREATE LIST"/></div> 
     346      </form> 
     347    </c:if> 
     348 
     349      <div class="resultTableContainer"> 
     350        <table cellpadding="0" cellspacing="0" border="0" class="dbsources"> 
    264351                  <c:choose> 
    265352                      <c:when test="${searchFacetValues['Category'] == 'Submission'}"> 
    266                         <tr> 
    267                             <th>DCC id</th> 
    268                             <th>Organism</th> 
    269                             <th>Group</th> 
    270                             <th>Name</th> 
    271                             <th>Date</th> 
    272                             <th>Details</th> 
    273                             <th>Search score</th> 
    274                         </tr> 
    275                         <c:forEach items="${searchResults}" var="searchResult"> 
    276                           <c:set var="sub" value="${searchResult.object}"/> 
    277                           <tr> 
    278                               <td><html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${sub.id}"><c:out value="${sub.dCCid}"></c:out></html:link></td> 
    279                               <td> 
    280                               <c:if test="${sub.organism.genus eq 'Drosophila'}">  
    281                                 <img border="0" class="arrow" src="model/images/f_vvs.png" title="fly"/> 
    282                                                 <c:set var="fly" value="1" /> 
    283                               </c:if> 
    284                               <c:if test="${sub.organism.genus eq 'Caenorhabditis'}">   
    285                                 <img border="0" class="arrow" src="model/images/w_vvs.png" title="worm"/> 
    286                                                 <c:set var="worm" value="1" /> 
    287                                             </c:if> 
    288                               </td> 
    289                               <td>PI: <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${sub.project.id}"><c:out value="${sub.project.surnamePI}"/></html:link><br/> 
    290                                   Lab: <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${sub.lab.id}"><c:out value="${sub.lab.surname}"/></html:link><br/> 
    291                               </td> 
    292                               <td><html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${sub.id}"><c:out value="${sub.title}"></c:out></html:link></td> 
    293                               <td><fmt:formatDate value="${sub.publicReleaseDate}" type="date"/></td> 
    294                               <td> 
    295                                 <c:set var="isPrimer" value="0"/>           
    296                                 <c:forEach items="${sub.properties}" var="prop" varStatus="status"> 
    297                                  <c:choose> 
    298                                   <c:when test="${fn:contains(prop,'primer')}"> 
    299                                   <c:set var="isPrimer" value="${isPrimer + 1}"/> 
    300                                   </c:when> 
    301                                   </c:choose> 
    302                                 <c:choose> 
    303                                 <c:when test="${isPrimer <= 5 || !fn:contains(prop,'primer')}"> 
    304                                   <c:out value="${prop.type}: "/> 
    305                                   <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${prop.id}"> 
    306                                   <c:out value="${prop.name}"/></html:link><br/> 
    307                                 </c:when> 
    308                                 <c:when test="${isPrimer > 5 && status.last}"> 
    309                                 ...<br></br> 
    310                                 <im:querylink text="all ${isPrimer} ${prop.type}s" showArrow="true" skipBuilder="true"  
    311                                           title="View all ${isPrimer} ${prop.type}s factors of submission ${sub.dCCid}"> 
    312                          
    313                                     <query name="" model="genomic" view="SubmissionProperty.name SubmissionProperty.type" sortOrder="SubmissionProperty.type asc" constraintLogic="A and B"> 
    314                                       <node path="SubmissionProperty" type="SubmissionProperty"> 
    315                                       </node> 
    316                                       <node path="SubmissionProperty.submissions" type="Submission"> 
    317                                         <constraint op="LOOKUP" value="${sub.dCCid}" description="" identifier="" code="A" extraValue=""> 
    318                                         </constraint> 
    319                                       </node> 
    320                                       <node path="SubmissionProperty.type" type="String"> 
    321                                         <constraint op="=" value="${prop.type}" description="" identifier="" code="B" extraValue=""> 
    322                                         </constraint> 
    323                                       </node> 
    324                                     </query> 
    325                          
    326                                 </im:querylink> 
    327                                  
    328                                 </c:when> 
    329                                 </c:choose> 
    330                                 </c:forEach> 
    331                               </td> 
    332                                
    333                               <td><img height="10" width="${searchResult.points * 5}" src="images/heat${searchResult.points}.gif" alt="${searchResult.points}/10" title="${searchResult.points}/10"/></td> 
    334                         </tr> 
     353            <tr> 
     354                <th> 
     355                  <input type="checkbox" id="allItems" onclick="checkAll()"/> 
     356                </th> 
     357                <th>DCC id</th> 
     358                <th>Organism</th> 
     359                <th>Group</th> 
     360                <th>Name</th> 
     361                <th>Date</th> 
     362                <th>Details</th> 
     363                <th>Search score</th> 
     364            </tr> 
     365            <c:forEach items="${searchResults}" var="searchResult"> 
     366                  <c:set var="sub" value="${searchResult.object}"/> 
     367              <tr> 
     368                  <td> 
     369                      <input type="checkbox" class="item" value="${sub.id}" onclick="updateCheckStatus(this.checked)"/> 
     370                  </td> 
     371                  <td><html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${sub.id}"><c:out value="${sub.dCCid}"></c:out></html:link></td> 
     372                  <td> 
     373                  <c:if test="${sub.organism.genus eq 'Drosophila'}"> 
     374                    <img border="0" class="arrow" src="model/images/f_vvs.png" title="fly"/> 
     375                                    <c:set var="fly" value="1" /> 
     376                  </c:if> 
     377                  <c:if test="${sub.organism.genus eq 'Caenorhabditis'}"> 
     378                    <img border="0" class="arrow" src="model/images/w_vvs.png" title="worm"/> 
     379                                    <c:set var="worm" value="1" /> 
     380                                </c:if> 
     381                  </td> 
     382                  <td>PI: <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${sub.project.id}"><c:out value="${sub.project.surnamePI}"/></html:link><br/> 
     383                      Lab: <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${sub.lab.id}"><c:out value="${sub.lab.surname}"/></html:link><br/> 
     384                  </td> 
     385                  <td><html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${sub.id}"><c:out value="${sub.title}"></c:out></html:link></td> 
     386                  <td><fmt:formatDate value="${sub.publicReleaseDate}" type="date"/></td> 
     387                  <td> 
     388                    <c:set var="isPrimer" value="0"/> 
     389                    <c:forEach items="${sub.properties}" var="prop" varStatus="status"> 
     390                     <c:choose> 
     391                      <c:when test="${fn:contains(prop,'primer')}"> 
     392                      <c:set var="isPrimer" value="${isPrimer + 1}"/> 
     393                      </c:when> 
     394                      </c:choose> 
     395                    <c:choose> 
     396                    <c:when test="${isPrimer <= 5 || !fn:contains(prop,'primer')}"> 
     397                      <c:out value="${prop.type}: "/> 
     398                      <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${prop.id}"> 
     399                      <c:out value="${prop.name}"/></html:link><br/> 
     400                    </c:when> 
     401                    <c:when test="${isPrimer > 5 && status.last}"> 
     402                    ...<br></br> 
     403                    <im:querylink text="all ${isPrimer} ${prop.type}s" showArrow="true" skipBuilder="true" 
     404                              title="View all ${isPrimer} ${prop.type}s factors of submission ${sub.dCCid}"> 
     405 
     406                  <query name="" model="genomic" view="SubmissionProperty.name SubmissionProperty.type" sortOrder="SubmissionProperty.type asc" constraintLogic="A and B"> 
     407                    <node path="SubmissionProperty" type="SubmissionProperty"> 
     408                    </node> 
     409                    <node path="SubmissionProperty.submissions" type="Submission"> 
     410                      <constraint op="LOOKUP" value="${sub.dCCid}" description="" identifier="" code="A" extraValue=""> 
     411                      </constraint> 
     412                    </node> 
     413                    <node path="SubmissionProperty.type" type="String"> 
     414                      <constraint op="=" value="${prop.type}" description="" identifier="" code="B" extraValue=""> 
     415                      </constraint> 
     416                    </node> 
     417                  </query> 
     418 
     419                    </im:querylink> 
     420 
     421                    </c:when> 
     422                    </c:choose> 
     423                    </c:forEach> 
     424                  </td> 
     425 
     426                  <td><img height="10" width="${searchResult.points * 5}" src="images/heat${searchResult.points}.gif" alt="${searchResult.points}/10" title="${searchResult.points}/10"/></td> 
     427            </tr> 
    335428                        </c:forEach> 
    336                       </c:when> 
    337                       <c:otherwise> 
     429              </c:when> 
     430              <c:otherwise> 
    338431                        <tr> 
     432 
     433                            <c:if test="${!empty searchFacetValues['Category']}"> 
     434                              <th> 
     435                                <input type="checkbox" id="allItems" onclick="checkAll()"/> 
     436                              </th> 
     437                            </c:if> 
     438 
    339439                            <th>Type</th> 
    340440                            <th>Details</th> 
     
    342442                        </tr> 
    343443                        <c:forEach items="${searchResults}" var="searchResult"> 
    344                           <tr class="keywordSearchResult"> 
    345                               <td> 
    346                                   <c:out value="${searchResult.type}"></c:out> 
    347                               </td> 
    348                               <td> 
    349                                   <div class="objectKeys"> 
    350                                   <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${searchResult.id}"> 
    351                                   <c:if test="${empty searchResult.keyFields}"> 
    352                                       <c:out value="${searchResult.type}"></c:out> 
    353                                   </c:if> 
    354                                   <c:forEach items="${searchResult.keyFields}" var="field" varStatus="status"> 
    355                                     <c:set var="fieldConfig" value="${searchResult.fieldConfigs[field]}"/> 
    356                                     <span title="<c:out value="${field}"/>" class="objectKey"> 
    357                                        <c:choose>     
    358                                        <%-- print each field configured for this object --%> 
    359                                         <c:when test="${!empty fieldConfig && !empty fieldConfig.displayer}"> 
    360                                           <c:set var="interMineObject" value="${searchResult.object}" scope="request"/> 
    361                                           <span class="value"> 
    362                                             <tiles:insert page="${fieldConfig.displayer}"> 
    363                                               <tiles:put name="expr" value="${fieldConfig.fieldExpr}" /> 
    364                                             </tiles:insert> 
    365                                           </span> 
    366                                         </c:when> 
    367                                         <c:when test="${!empty fieldConfig && !empty fieldConfig.fieldExpr}"> 
    368                                           <c:set var="outVal" value="${searchResult.fieldValues[fieldConfig.fieldExpr]}"/> 
    369                                           <span class="value">${outVal}</span> 
    370                                           <c:if test="${empty outVal}"> 
    371                                             - 
    372                                           </c:if> 
    373                                         </c:when> 
    374                                         <c:otherwise> 
    375                                           - 
    376                                         </c:otherwise> 
    377                                       </c:choose> 
    378                                     </span> 
    379                                     <c:if test="${! status.last }"> 
    380                                         <span class="objectKey">|</span> 
    381                                     </c:if> 
    382                                   </c:forEach> 
    383                                   </html:link> 
    384                                   </div> 
    385                                    
    386                                   <%-- print each field configured for this object --%> 
    387                                   <c:forEach items="${searchResult.additionalFields}" var="field"> 
    388                                     <c:set var="fieldConfig" value="${searchResult.fieldConfigs[field]}"/> 
    389                                     <div class="objectField"> 
    390                                        <c:choose>    
    391                                        <%-- print each field configured for this object --%> 
    392                                         <c:when test="${!empty fieldConfig && !empty fieldConfig.displayer}"> 
    393                                           <span class="objectFieldName"><c:out value="${field}"/>:</span> 
    394                                         
    395                                           <c:set var="interMineObject" value="${searchResult.object}" scope="request"/> 
    396                                           <span class="value"> 
    397                                             <tiles:insert page="${fieldConfig.displayer}"> 
    398                                               <tiles:put name="expr" value="${fieldConfig.fieldExpr}" /> 
    399                                             </tiles:insert> 
    400                                           </span> 
    401                                         </c:when> 
    402                                          
    403                                         <c:when test="${!empty fieldConfig && !empty fieldConfig.fieldExpr}"> 
    404                                           <c:set var="outVal" value="${searchResult.fieldValues[fieldConfig.fieldExpr]}"/> 
    405                                           <c:if test="${!empty outVal}"> 
    406                                             <span class="objectFieldName"><c:out value="${field}"/>:</span> 
    407                                           </c:if> 
    408                                         
    409                                           <span class="value" style="font-weight: bold;">${outVal}</span> 
    410                                           <c:if test="${empty outVal}"> 
    411                                             &nbsp;<%--for IE--%> 
    412                                           </c:if> 
    413                                         </c:when> 
    414                                         <c:otherwise> 
    415                                           &nbsp;<%--for IE--%> 
    416                                         </c:otherwise> 
    417                                       </c:choose> 
    418                                     </div> 
    419                                   </c:forEach> 
    420                                    
    421                                   <c:if test="${searchResult.templates != null && !empty searchResult.templates}"> 
    422                                       <c:forEach items="${searchResult.templates}" var="template">                               
    423                                             <c:if test="${template.value.valid}"> 
    424                                             <div> 
    425                                                  <html:link action="/template?name=${template.value.name}&amp;scope=global&amp;idForLookup=${searchResult.id}" 
    426                                                        title="Click here to go to the template form"> 
    427                                                    <span class="templateTitle">${template.value.title}</span> 
    428                                                    <img border="0" class="arrow" src="images/template_t.gif"/> 
    429                                               </html:link> 
    430                                             </div> 
    431                                             </c:if> 
    432                                       </c:forEach> 
    433                                   </c:if> 
    434                               </td>       
    435                               <td><img height="10" width="${searchResult.points * 5}" src="images/heat${searchResult.points}.gif" alt="${searchResult.points}/10" title="${searchResult.points}/10"/></td> 
    436                         </tr> 
     444              <tr class="keywordSearchResult"> 
     445 
     446                  <c:if test="${!empty searchFacetValues['Category']}"> 
     447                    <td> 
     448                      <input type="checkbox" class="item" value="${searchResult.id}" onclick="updateCheckStatus(this.checked)"/> 
     449                    </td> 
     450                  </c:if> 
     451 
     452                  <td> 
     453                      <c:out value="${searchResult.type}"></c:out> 
     454                  </td> 
     455                  <td> 
     456                      <div class="objectKeys"> 
     457                      <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${searchResult.id}"> 
     458                      <c:if test="${empty searchResult.keyFields}"> 
     459                          <c:out value="${searchResult.type}"></c:out> 
     460                      </c:if> 
     461                      <c:forEach items="${searchResult.keyFields}" var="field" varStatus="status"> 
     462                        <c:set var="fieldConfig" value="${searchResult.fieldConfigs[field]}"/> 
     463                        <span title="<c:out value="${field}"/>" class="objectKey"> 
     464                           <c:choose> 
     465                           <%-- print each field configured for this object --%> 
     466                            <c:when test="${!empty fieldConfig && !empty fieldConfig.displayer}"> 
     467                              <c:set var="interMineObject" value="${searchResult.object}" scope="request"/> 
     468                              <span class="value"> 
     469                                <tiles:insert page="${fieldConfig.displayer}"> 
     470                                  <tiles:put name="expr" value="${fieldConfig.fieldExpr}" /> 
     471                                </tiles:insert> 
     472                              </span> 
     473                            </c:when> 
     474                            <c:when test="${!empty fieldConfig && !empty fieldConfig.fieldExpr}"> 
     475                              <c:set var="outVal" value="${searchResult.fieldValues[fieldConfig.fieldExpr]}"/> 
     476                              <span class="value">${outVal}</span> 
     477                              <c:if test="${empty outVal}"> 
     478                                - 
     479                              </c:if> 
     480                            </c:when> 
     481                            <c:otherwise> 
     482                              - 
     483                            </c:otherwise> 
     484                          </c:choose> 
     485                        </span> 
     486                        <c:if test="${! status.last }"> 
     487                            <span class="objectKey">|</span> 
     488                        </c:if> 
     489                      </c:forEach> 
     490                      </html:link> 
     491                      </div> 
     492 
     493                    <%-- print each field configured for this object --%> 
     494                      <c:forEach items="${searchResult.additionalFields}" var="field"> 
     495                        <c:set var="fieldConfig" value="${searchResult.fieldConfigs[field]}"/> 
     496                      <div class="objectField"> 
     497                         <c:choose> 
     498                         <%-- print each field configured for this object --%> 
     499                          <c:when test="${!empty fieldConfig && !empty fieldConfig.displayer}"> 
     500                                  <span class="objectFieldName"><c:out value="${field}"/>:</span> 
     501 
     502                            <c:set var="interMineObject" value="${searchResult.object}" scope="request"/> 
     503                            <span class="value"> 
     504                              <tiles:insert page="${fieldConfig.displayer}"> 
     505                                <tiles:put name="expr" value="${fieldConfig.fieldExpr}" /> 
     506                              </tiles:insert> 
     507                            </span> 
     508                          </c:when> 
     509 
     510                          <c:when test="${!empty fieldConfig && !empty fieldConfig.fieldExpr}"> 
     511                                  <c:set var="outVal" value="${searchResult.fieldValues[fieldConfig.fieldExpr]}"/> 
     512                            <c:if test="${!empty outVal}"> 
     513                                    <span class="objectFieldName"><c:out value="${field}"/>:</span> 
     514                                  </c:if> 
     515 
     516                            <span class="value" style="font-weight: bold;">${outVal}</span> 
     517                            <c:if test="${empty outVal}"> 
     518                              &nbsp;<%--for IE--%> 
     519                            </c:if> 
     520                          </c:when> 
     521                          <c:otherwise> 
     522                            &nbsp;<%--for IE--%> 
     523                          </c:otherwise> 
     524                        </c:choose> 
     525                      </div> 
     526                    </c:forEach> 
     527 
     528                              <c:if test="${searchResult.templates != null && !empty searchResult.templates}"> 
     529                                  <c:forEach items="${searchResult.templates}" var="template"> 
     530                                        <c:if test="${template.value.valid}"> 
     531                                        <div> 
     532                                             <html:link action="/template?name=${template.value.name}&amp;scope=global&amp;idForLookup=${searchResult.id}" 
     533                                                   title="Click here to go to the template form"> 
     534                                               <span class="templateTitle">${template.value.title}</span> 
     535                             <img border="0" class="arrow" src="images/template_t.gif"/> 
     536                        </html:link> 
     537                      </div> 
     538                      </c:if> 
     539                                  </c:forEach> 
     540                              </c:if> 
     541                  </td> 
     542                  <td><img height="10" width="${searchResult.points * 5}" src="images/heat${searchResult.points}.gif" alt="${searchResult.points}/10" title="${searchResult.points}/10"/></td> 
     543            </tr> 
    437544                        </c:forEach> 
    438                     </c:otherwise> 
    439                 </c:choose> 
    440                  
    441                 </table> 
    442             </div> 
    443              
    444             </div> 
    445         </c:if> 
    446          
    447         </div> 
    448     </c:otherwise> 
     545          </c:otherwise> 
     546        </c:choose> 
     547 
     548        </table> 
     549      </div> 
     550 
     551      </div> 
     552    </c:if> 
     553 
     554    </div> 
     555  </c:otherwise> 
    449556</c:choose> 
    450557</c:if> 
  • trunk/modmine/webapp/resources/webapp/modMineSearchResults.jsp

    r21810 r22833  
    1414<html:xhtml /> 
    1515 
     16<style type="text/css"> 
     17input.submit { 
     18  color: #008AB8; 
     19  font: bold 84% 'trebuchet ms',helvetica,sans-serif; 
     20  background-color: #fed; 
     21  border: 1px solid; 
     22  border-color: #696 #363 #363 #696; 
     23} 
     24</style> 
     25 
     26<script> 
     27 
     28  jQuery(document).ready(function(){ 
     29    // Unckeck all checkboxes everything the page is (re)loaded 
     30    initCheck(); 
     31 
     32    // Do before the form submitted 
     33    jQuery("#saveFromIdsToBagForm").submit(function() { 
     34        var ids = new Array(); 
     35        jQuery(".aSub").each(function() { 
     36          if (this.checked) {ids.push(this.value);} 
     37       }); 
     38 
     39        if (ids.length < 1) 
     40        { alert("Please select some submissions..."); 
     41          return false; 
     42        } else { 
     43          jQuery("#ids").val(ids); 
     44          return true; 
     45          } 
     46    }); 
     47  }); 
     48 
     49     function initCheck() 
     50     { 
     51       jQuery('#allSub').removeAttr('checked'); 
     52       jQuery(".aSub").removeAttr('checked'); 
     53     } 
     54 
     55     // (un)Check all ids checkboxes 
     56     function checkAll() 
     57     { 
     58         jQuery(".aSub").attr('checked', jQuery('#allSub').is(':checked')); 
     59         jQuery('#allSub').css("opacity", 1); 
     60     } 
     61 
     62     function updateCheckStatus(status) 
     63     { 
     64         var statTag; 
     65         if (!status) { //unchecked 
     66           jQuery(".aSub").each(function() { 
     67             if (this.checked) {statTag=true;} 
     68           }); 
     69 
     70           if (statTag) { 
     71            jQuery("#allSub").attr('checked', true); 
     72            jQuery("#allSub").css("opacity", 0.5); } 
     73           else { 
     74            jQuery("#allSub").removeAttr('checked'); 
     75            jQuery("#allSub").css("opacity", 1);} 
     76         } 
     77         else { //checked 
     78           jQuery(".aSub").each(function() { 
     79             if (!this.checked) {statTag=true;} 
     80         }); 
     81 
     82         if (statTag) { 
     83           jQuery("#allSub").attr('checked', true); 
     84           jQuery("#allSub").css("opacity", 0.5); } 
     85         else { 
     86           jQuery("#allSub").attr('checked', true); 
     87           jQuery("#allSub").css("opacity", 1);} 
     88         } 
     89     } 
     90 
     91</script> 
     92 
    1693<div class="body"> 
    1794 
     
    25102<c:if test="${!empty displayMax}">Matching submissions: more than <c:out value="${displayMax}" /> (only the top <c:out value="${displayMax}" /> matches are displayed)</c:if> 
    26103<table cellpadding="0" cellspacing="0" border="0" class="dbsources"> 
     104 
     105<c:if test="${fn:length(submissions) > 0}"> 
     106    <form action="/${WEB_PROPERTIES['webapp.path']}/saveFromIdsToBag.do" id="saveFromIdsToBagForm" method="POST"> 
     107      <input type="hidden" id="type" name="type" value="Submission"/> 
     108      <input type="hidden" id="ids" name="ids" value=""/> 
     109      <input type="hidden" name="source" value="modMineSearchResults"/> 
     110      <input type="hidden" name="newBagName" value="new_submission_list"/> 
     111      <div style="padding:10px;"><input type="submit" class="submit" value="CREATE LIST"/></div> 
     112    </form> 
     113</c:if> 
     114 
    27115<tr> 
     116    <c:if test="${fn:length(submissions) > 0}"> 
     117      <th><input type="checkbox" id="allSub" onclick="checkAll()"/></th> 
     118    </c:if> 
    28119    <th>DCC id</th> 
    29120    <th>Organism</th> 
     
    37128  <c:set var="sub" value="${subResult.key}"/> 
    38129  <tr> 
     130      <td><input type="checkbox" class="aSub" value="${sub.dCCid}" onclick="updateCheckStatus(this.checked)"/></td> 
    39131      <td><html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${sub.id}"><c:out value="${sub.dCCid}"></c:out></html:link></td> 
    40132      <td> 
    41       <c:if test="${sub.organism.genus eq 'Drosophila'}">  
     133      <c:if test="${sub.organism.genus eq 'Drosophila'}"> 
    42134        <img border="0" class="arrow" src="model/images/f_vvs.png" title="fly"/> 
    43135                        <c:set var="fly" value="1" /> 
    44136      </c:if> 
    45       <c:if test="${sub.organism.genus eq 'Caenorhabditis'}">   
     137      <c:if test="${sub.organism.genus eq 'Caenorhabditis'}"> 
    46138        <img border="0" class="arrow" src="model/images/w_vvs.png" title="worm"/> 
    47139                        <c:set var="worm" value="1" /> 
     
    54146      <td><fmt:formatDate value="${sub.publicReleaseDate}" type="date"/></td> 
    55147      <td> 
    56         <c:set var="isPrimer" value="0"/>           
     148        <c:set var="isPrimer" value="0"/> 
    57149        <c:forEach items="${sub.properties}" var="prop" varStatus="status"> 
    58150         <c:choose> 
     
    69161        <c:when test="${isPrimer > 5 && status.last}"> 
    70162        ...<br></br> 
    71         <im:querylink text="all ${isPrimer} ${prop.type}s" showArrow="true" skipBuilder="true"  
     163        <im:querylink text="all ${isPrimer} ${prop.type}s" showArrow="true" skipBuilder="true" 
    72164                  title="View all ${isPrimer} ${prop.type}s factors of submission ${sub.dCCid}"> 
    73165 
     
    86178 
    87179                  </im:querylink> 
    88          
     180 
    89181        </c:when> 
    90182        </c:choose> 
    91183        </c:forEach> 
    92184      </td> 
    93        
     185 
    94186      <td><img height="10" width="${subResult.value * 5}" src="images/heat${subResult.value}.gif" alt="${subResult.value}" title="${subResult.value}"/></td> 
    95187</tr> 
  • trunk/modmine/webapp/resources/webapp/model/experiment.jsp

    r22451 r22833  
    1111 
    1212<!-- experiment.jsp --> 
     13 
     14<style type="text/css"> 
     15input.submit { 
     16  color:#050; 
     17  font: bold 84% 'trebuchet ms',helvetica,sans-serif; 
     18  background-color:#fed; 
     19  border:1px solid; 
     20  border-color: #696 #363 #363 #696; 
     21} 
     22</style> 
     23 
     24<script> 
     25 
     26  jQuery(document).ready(function(){ 
     27    // Unckeck all checkboxes everything the page is (re)loaded 
     28    initCheck(); 
     29 
     30    // Do before the form submitted 
     31    jQuery("#saveFromIdsToBagForm").submit(function() { 
     32        var ids = new Array(); 
     33        jQuery(".aSub").each(function() { 
     34          if (this.checked) {ids.push(this.value);} 
     35       }); 
     36 
     37        if (ids.length < 1) 
     38        { alert("Please select some submissions..."); 
     39          return false; 
     40        } else { 
     41          jQuery("#ids").val(ids); 
     42          return true; 
     43          } 
     44    }); 
     45  }); 
     46 
     47     function initCheck() 
     48     { 
     49       jQuery('#allSub').removeAttr('checked'); 
     50       jQuery(".aSub").removeAttr('checked'); 
     51     } 
     52 
     53     // (un)Check all ids checkboxes 
     54     function checkAll() 
     55     { 
     56         jQuery(".aSub").attr('checked', jQuery('#allSub').is(':checked')); 
     57         jQuery('#allSub').css("opacity", 1); 
     58     } 
     59 
     60     function updateCheckStatus(status) 
     61     { 
     62         var statTag; 
     63         if (!status) { //unchecked 
     64           jQuery(".aSub").each(function() { 
     65             if (this.checked) {statTag=true;} 
     66           }); 
     67 
     68           if (statTag) { 
     69            jQuery("#allSub").attr('checked', true); 
     70            jQuery("#allSub").css("opacity", 0.5); } 
     71           else { 
     72            jQuery("#allSub").removeAttr('checked'); 
     73            jQuery("#allSub").css("opacity", 1);} 
     74         } 
     75         else { //checked 
     76           jQuery(".aSub").each(function() { 
     77             if (!this.checked) {statTag=true;} 
     78         }); 
     79 
     80         if (statTag) { 
     81           jQuery("#allSub").attr('checked', true); 
     82           jQuery("#allSub").css("opacity", 0.5); } 
     83         else { 
     84           jQuery("#allSub").attr('checked', true); 
     85           jQuery("#allSub").css("opacity", 1);} 
     86         } 
     87     } 
     88 
     89</script> 
     90 
    1391 
    1492<html:xhtml /> 
     
    426504  </em> 
    427505 
     506<form action="/${WEB_PROPERTIES['webapp.path']}/saveFromIdsToBag.do" id="saveFromIdsToBagForm" method="POST"> 
     507  <input type="hidden" id="type" name="type" value="Submission"/> 
     508  <input type="hidden" id="ids" name="ids" value=""/> 
     509  <input type="hidden" name="source" value="experiment"/> 
     510  <input type="hidden" name="newBagName" value="${exp.piSurname}_submission_list"/> 
     511  <div style="padding:10px;"><input type="submit" class="submit" value="CREATE LIST"/></div> 
     512</form> 
    428513<table cellpadding="0" cellspacing="0" border="0" class="sortable-onload-2 rowstyle-alt no-arrow submission_table"> 
    429514<tr> 
     515    <th><input type="checkbox" id="allSub" onclick="checkAll()"/></th> 
    430516    <th class="sortable">DCC id</th> 
    431517    <th class="sortable">Name</th> 
     
    451537  <c:set var="sub" value="${subCounts.key}"></c:set> 
    452538    <tr> 
     539      <td class="sorting"><input type="checkbox" class="aSub" value="${subCounts.key.id}" onclick="updateCheckStatus(this.checked)"/></td> 
    453540      <td class="sorting"> 
    454541      <html:link href="/${WEB_PROPERTIES['webapp.path']}/objectDetails.do?id=${subCounts.key.id}"> 
Note: See TracChangeset for help on using the changeset viewer.