Advertisement
Guest User

My low Search results tag

a guest
May 27th, 2015
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 6.54 KB | None | 0 0
  1. {exp:low_search:results
  2.     query="{segment_3}"
  3.     status="not closed"
  4.     disable="member_data|category_fields"
  5.     channel="library_content"
  6.     limit="10"
  7.     paginate="bottom"
  8.     shortcut="{segment_3}"
  9. }
  10.  
  11.   {if count == 1}
  12.     <p>
  13.         <br />Total results: <strong>{absolute_results}</strong>.
  14.     </p>
  15.     <div class="table-responsive">
  16.         <table id="library-search-results-table" class="table table-striped">
  17.             <thead>
  18.                 <tr>
  19.                     <th><span class="glyphicon glyphicon-star-empty"></span></th>
  20.                     <th>File</th>
  21.                     <th>
  22.                         {if low_search_orderby == 'title'}
  23.                             {if low_search_sort == 'desc'}
  24.                                 <a href='{low_search:url result_page="library/search" orderby_sort="title|asc" encode="no"}'> Title <span class="glyphicon glyphicon-arrow-up"></span></a>
  25.                             {if:else}
  26.                                 <a href='{low_search:url result_page="library/search" orderby_sort="title|desc" encode="no"}'> Title <span class="glyphicon glyphicon-arrow-down"></span></a>
  27.                             {/if}
  28.                         {if:else}
  29.                             <a href='{low_search:url result_page="library/search" orderby_sort="title|asc" encode="no"}'> Title</a>
  30.                         {/if}                                          
  31.                     </th>
  32.                     <th>
  33.                         {if low_search_orderby == 'library_date_published'}
  34.                             {if low_search_sort == 'desc'}
  35.                                 <a href='{low_search:url result_page="library/search" orderby_sort="library_date_published|asc" encode="no"}'> Pub. Date <span class="glyphicon glyphicon-arrow-up"></span></a>
  36.                             {if:else}
  37.                                 <a href='{low_search:url result_page="library/search" orderby_sort="library_date_published|desc" encode="no"}'> Pub. Date <span class="glyphicon glyphicon-arrow-down"></span></a>
  38.                             {/if}
  39.                         {if:else}
  40.                             <a href='{low_search:url result_page="library/search" orderby_sort="library_date_published|asc" encode="no"}'> Pub. Date</a>
  41.                         {/if}  
  42.                     </th>
  43.                     <th>
  44.                         {if low_search_orderby == 'comment_total'}
  45.                             {if low_search_sort == 'desc'}
  46.                                 <a href='{low_search:url result_page="library/search" orderby_sort="comment_total|asc" encode="no"}'>Comments <span class="glyphicon glyphicon-arrow-up"></span></a>
  47.                             {if:else}
  48.                                 <a href='{low_search:url result_page="library/search" orderby_sort="comment_total|desc" encode="no"}'>Comments <span class="glyphicon glyphicon-arrow-down"></span></a>
  49.                             {/if}
  50.                         {if:else}
  51.                             <a href='{low_search:url result_page="library/search" orderby_sort="comment_total|asc" encode="no"}'>Comments</a>
  52.                         {/if}  
  53.                     </th>
  54.                     <th>
  55.                         {if low_search_orderby == 'library_state_territory'}
  56.                             {if low_search_sort == 'desc'}
  57.                                 <a href='{low_search:url result_page="library/search" orderby_sort="library_state_territory|asc" encode="no"}'> State <span class="glyphicon glyphicon-arrow-up"></span></a>
  58.                             {if:else}
  59.                                 <a href='{low_search:url result_page="library/search" orderby_sort="library_state_territory|desc" encode="no"}'> State <span class="glyphicon glyphicon-arrow-down"></span></a>
  60.                             {/if}
  61.                         {if:else}
  62.                             <a href='{low_search:url result_page="library/search" orderby_sort="library_state_territory|asc" encode="no"}'> State</a>
  63.                         {/if}                                      
  64.                     </th>
  65.                     {!--<th>Description</th>--}
  66.                     <th>Type</th>
  67.                     <th>Topic</th>
  68.                     <th>
  69.                         {if low_search_orderby == 'library_jurisdiction'}
  70.                             {if low_search_sort == 'desc'}
  71.                                 <a href='{low_search:url result_page="library/search" orderby_sort="library_jurisdiction|asc" encode="no"}'> Juris. <span class="glyphicon glyphicon-arrow-up"></span></a>
  72.                             {if:else}
  73.                                 <a href='{low_search:url result_page="library/search" orderby_sort="library_jurisdiction|desc" encode="no"}'> Juris. <span class="glyphicon glyphicon-arrow-down"></span></a>
  74.                             {/if}
  75.                         {if:else}
  76.                             <a href='{low_search:url result_page="library/search" orderby_sort="library_jurisdiction|asc" encode="no"}'> Juris.</a>
  77.                         {/if}  
  78.                     </th>
  79.                     <th>Pop. Group</th>
  80.                 </tr>
  81.             </thead>
  82.             <tbody>
  83.   {/if}
  84.  
  85.         <tr>
  86.             <td>
  87.                 <a href="#" class="bookmark-button" data-file-id="{entry_id}" data-toggle='tooltip' data-placement='left' title="Bookmark">
  88.                     <span class="glyphicon glyphicon-star-empty"></span>
  89.                 </a>
  90.             </td>
  91.             {exp:channel_files:files entry_id="{entry_id}"}
  92.                 <td>
  93.                     <a href="{file:locked_url}" title="{file:title}" class="file-download-link" data-file-extension="{file:extension}" data-file-name="{title}">
  94.                         {exp:switchee variable="{file:extension}" parse="inward"}
  95.                             {case value="pdf"}
  96.                                 <img src="/_assets/icon-pdf-50x50.png" alt="download pdf" />
  97.                             {/case}
  98.                             {case value="ppt"}
  99.                                 <img src="/_assets/icon-ppt-50x50.png" alt="download powerpoint" />
  100.                             {/case}
  101.                             {case default="yes"}
  102.                                 <img src="/_assets/icon-file-50x50.png" alt="download file" />
  103.                             {/case}
  104.                         {/exp:switchee}
  105.                        
  106.                     </a>
  107.                     <small class="file-size">{file:filesize}</small>
  108.                 </td>
  109.                 {if file:no_files}<td>--</td>{/if}
  110.             {/exp:channel_files:files}
  111.             <td>
  112.                 <a href="/library/view/{url_title}/">{title}</a>
  113.                 {if library_sub_title}<br /><em>{library_sub_title}</em>{/if}
  114.                 {if library_description}<br /><small>{library_description}</small>{/if}
  115.             </td>
  116.             <td>{library_date_published format="%M %Y"}</td>
  117.             <td>{comment_total}</td>
  118.             <td>{library_state_territory}</td>
  119.             {!--<td>{library_description}</td>--}
  120.             <td>{library_type}</td>
  121.             <td>{library_topic}</td>
  122.             <td>{library_jurisdiction}</td>
  123.             <td>{if library_population_group}{library_population_group}{if:else}--{/if}</td>
  124.         </tr>
  125.  
  126.     {if count == total_results}
  127.             </tbody>
  128.         </table>
  129.     </div>
  130.     {/if}
  131.     {if low_search_no_results}
  132.         <h3>
  133.             Sorry, your query did not return any results.<br>
  134.             Check your spelling or try a different search term.
  135.         </h3>
  136.     {/if}
  137.     {paginate}
  138.         {pagination_links  page_padding="4"  always_show_first_last="yes"}
  139.             <ul class="pagination pagination-sm">
  140.                 {!--
  141.                 {first_page}
  142.                     <li><a href="{pagination_url}" class="page-first">First Page</a></li>
  143.                 {/first_page}
  144.  
  145.                 {last_page}
  146.                     <li><a href="{pagination_url}" class="page-last">Last Page</a></li>
  147.                 {/last_page}
  148.                 --}
  149.  
  150.                 {previous_page}
  151.                     <li><a href="{pagination_url}" class="page-previous">&laquo;</a></li>
  152.                 {/previous_page}
  153.  
  154.                 {page}
  155.                     <li{if current_page} class="active"{/if}>
  156.                         <a href="{pagination_url}" class="page-{pagination_page_number}">
  157.                             {pagination_page_number}
  158.                         </a>
  159.                     </li>
  160.                 {/page}
  161.  
  162.                 {next_page}
  163.                     <li><a href="{pagination_url}" class="page-next">&raquo;</a></li>
  164.                 {/next_page}
  165.             </ul>
  166.         {/pagination_links}
  167.     {/paginate}            
  168.  
  169.  
  170. {/exp:low_search:results}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement