Changeset 254

Show
Ignore:
Timestamp:
01/02/08 21:10:35 (1 year ago)
Author:
chris
Message:

Don't display empty results table when there are no results.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lex/trunk/jsp/published.jsp

    r247 r254  
    4242                %><h4>Displaying first <%= results.size() %> of 
    4343                <%= search.getResultCount() %> results.</h4><% 
     44                %> 
     45                <table class="search_results"> 
     46                        <tr> 
     47                                <th>Reference</th> 
     48                                <th>Verb</th> 
     49                                <th>Logical Structure</th> 
     50                        </tr> 
     51                <% 
     52                 
     53                for (Iterator<SearchResult> i = results.iterator(); i.hasNext();) 
     54                { 
     55                        SearchResult result = i.next(); 
     56                         
     57                        %> 
     58                        <tr> 
     59                                <td><a href="result.getLinkUrl()"><%= result.getLocation() %></a></td> 
     60                                <td><%= HebrewConverter.toHebrew(result.getPredicate()) %></td> 
     61                                <td><%= HebrewConverter.toHtml(result.getLogicalStructure()) %></td> 
     62                        </tr> 
     63                        <% 
     64                } 
     65                 
     66                %> 
     67                </table> 
     68                <% 
    4469        } 
    4570%> 
    4671 
    47 <table class="search_results"> 
    48         <tr> 
    49                 <th>Reference</th> 
    50                 <th>Verb</th> 
    51                 <th>Logical Structure</th> 
    52         </tr> 
    53 <% 
    54  
    55 for (Iterator<SearchResult> i = results.iterator(); i.hasNext();) 
    56 { 
    57         SearchResult result = i.next(); 
    58          
    59         %> 
    60         <tr> 
    61                 <td><a href="result.getLinkUrl()"><%= result.getLocation() %></a></td> 
    62                 <td><%= HebrewConverter.toHebrew(result.getPredicate()) %></td> 
    63                 <td><%= HebrewConverter.toHtml(result.getLogicalStructure()) %></td> 
    64         </tr> 
    65         <% 
    66 } 
    67  
    68 %> 
    69 </table> 
    70  
    7172<%@ include file="footer.jsp" %> 
  • lex/trunk/jsp/search.jsp

    r246 r254  
    215215                        %><h4>Displaying first <%= results.size() %> of 
    216216                        <%= search.getResultCount() %> results.</h4><% 
    217                 } 
    218                  
    219                 %
    220                 <table class="search_results"
    221                         <tr
    222                                 <th>Reference</th> 
    223                                 <th>Clause Text</th> 
    224                                 <th>Link</th
    225                         </tr> 
    226                 <% 
    227          
    228                 for (Iterator<SearchResult> i = results.iterator(); i.hasNext();) 
    229                 { 
    230                         SearchResult result = i.next(); 
    231                          
    232                         %
    233                         <tr
    234                                 <td class="verse"><%= result.getLocation() %></td> 
    235                                 <td class="translit"><%= result.getDescription() %></td> 
    236                                 <td><a href="<%= result.getLinkUrl() %>">Open</a></td
    237                         </tr> 
    238                         <% 
    239                 } 
    240          
    241                 %
    242                 </table> 
    243                 <% 
     217                 
     218                       %> 
     219                       <table class="search_results"
     220                               <tr
     221                                       <th>Reference</th
     222                                       <th>Clause Text</th> 
     223                                       <th>Link</th> 
     224                                </tr
     225                        <% 
     226                 
     227                       for (Iterator<SearchResult> i = results.iterator(); i.hasNext();) 
     228                       { 
     229                               SearchResult result = i.next(); 
     230                                
     231                               %> 
     232                               <tr
     233                                       <td class="verse"><%= result.getLocation() %></td
     234                                       <td class="translit"><%= result.getDescription() %></td> 
     235                                       <td><a href="<%= result.getLinkUrl() %>">Open</a></td> 
     236                                </tr
     237                               <% 
     238                        } 
     239                 
     240                       %> 
     241                       </table
     242                       <% 
     243                } 
    244244        }        
    245245%> 
     246 
    246247<%@ include file="footer.jsp" %>