| 1 | {# |
|---|
| 2 | Copyright (C) 2011-2012 Steffen Hoffmann <hoff.st@web.de> |
|---|
| 3 | Copyright (C) 2021 Cinc |
|---|
| 4 | |
|---|
| 5 | This software is licensed as described in the file COPYING, which |
|---|
| 6 | you should have received as part of this distribution. |
|---|
| 7 | |
|---|
| 8 | headers - a sequence of header structure: |
|---|
| 9 | .label - what to display for this header |
|---|
| 10 | #} |
|---|
| 11 | <div> |
|---|
| 12 | # if warning: |
|---|
| 13 | <div class="central system-message warning"> |
|---|
| 14 | <p> |
|---|
| 15 | # trans |
|---|
| 16 | You seem to be using an old Tag query. Try using the |
|---|
| 17 | <a href="${tags_url}">new syntax</a> in your |
|---|
| 18 | <strong>ListTagged</strong> macro. |
|---|
| 19 | # endtrans |
|---|
| 20 | </p> |
|---|
| 21 | </div> |
|---|
| 22 | #endif |
|---|
| 23 | |
|---|
| 24 | # if paginator.has_more_pages: |
|---|
| 25 | <h2 class="report-result"> |
|---|
| 26 | Results <span class="numresults">(${paginator.displayed_items()})</span> |
|---|
| 27 | </h2> |
|---|
| 28 | # endif |
|---|
| 29 | |
|---|
| 30 | # if paginator.show_index: |
|---|
| 31 | # include "page_index.html" ignore missing |
|---|
| 32 | # endif |
|---|
| 33 | # if format == 'table': |
|---|
| 34 | <table class="listing listtagged"> |
|---|
| 35 | <thead> |
|---|
| 36 | <tr> |
|---|
| 37 | # for header in headers: |
|---|
| 38 | <th> |
|---|
| 39 | ${header.label} |
|---|
| 40 | </th> |
|---|
| 41 | # endfor |
|---|
| 42 | </tr> |
|---|
| 43 | </thead> |
|---|
| 44 | |
|---|
| 45 | <tbody> |
|---|
| 46 | # if not results: |
|---|
| 47 | <tr class="even"> |
|---|
| 48 | <td colspan="${len(headers)}"> |
|---|
| 49 | No resources found |
|---|
| 50 | </td> |
|---|
| 51 | </tr> |
|---|
| 52 | # else: |
|---|
| 53 | # for result in results: |
|---|
| 54 | <tr class="${loop.index0 % 2 and 'odd' or 'even'}"> |
|---|
| 55 | # for cell in result.cells: |
|---|
| 56 | <td> |
|---|
| 57 | ${cell} |
|---|
| 58 | </td> |
|---|
| 59 | # endfor |
|---|
| 60 | </tr> |
|---|
| 61 | |
|---|
| 62 | # endfor |
|---|
| 63 | # endif |
|---|
| 64 | </tbody> |
|---|
| 65 | </table> |
|---|
| 66 | # elif not results: |
|---|
| 67 | <p> |
|---|
| 68 | No resources found |
|---|
| 69 | </p> |
|---|
| 70 | # else: |
|---|
| 71 | <ul class="taglist"> |
|---|
| 72 | # if format == 'compact': |
|---|
| 73 | <span class="listtagged"> |
|---|
| 74 | # for result in results[:-1]: |
|---|
| 75 | ${result.resource_link}, |
|---|
| 76 | # endfor |
|---|
| 77 | ${results[-1].resource_link} |
|---|
| 78 | </span> |
|---|
| 79 | # elif format == 'oldlist': |
|---|
| 80 | # for result in results: |
|---|
| 81 | <li> |
|---|
| 82 | ${result.resource_link} ${result.desc} |
|---|
| 83 | # if result.rendered_tags: |
|---|
| 84 | (${result.rendered_tags[0]} |
|---|
| 85 | # for tag in result.rendered_tags[1:]: |
|---|
| 86 | ${tag}) |
|---|
| 87 | # endfor |
|---|
| 88 | ) |
|---|
| 89 | # endif |
|---|
| 90 | </li> |
|---|
| 91 | # endfor |
|---|
| 92 | # else: |
|---|
| 93 | <!--! alternative compact list --> |
|---|
| 94 | # for result in results: |
|---|
| 95 | <li> |
|---|
| 96 | ${result.resource_link} |
|---|
| 97 | </li> |
|---|
| 98 | # endfor |
|---|
| 99 | # endif |
|---|
| 100 | </ul> |
|---|
| 101 | # endif |
|---|
| 102 | # if paginator.show_index: |
|---|
| 103 | # include "page_index.html" ignore missing |
|---|
| 104 | # endif |
|---|
| 105 | </div> |
|---|