| 1 | {# |
|---|
| 2 | Copyright (C) 2006 Alec Thomas <alec@swapoff.org> |
|---|
| 3 | Copyright (C) 2010-2013 Steffen Hoffmann <hoff.st@web.de> |
|---|
| 4 | Copyright (C) 2021 Cinc |
|---|
| 5 | |
|---|
| 6 | This software is licensed as described in the file COPYING, which |
|---|
| 7 | you should have received as part of this distribution. |
|---|
| 8 | #} |
|---|
| 9 | # extends 'layout.html' |
|---|
| 10 | <!DOCTYPE> |
|---|
| 11 | <html> |
|---|
| 12 | <head> |
|---|
| 13 | <title> |
|---|
| 14 | # block title |
|---|
| 15 | # if page_title: |
|---|
| 16 | ${page_title} |
|---|
| 17 | # else: |
|---|
| 18 | ${_("Tags")} |
|---|
| 19 | # endif |
|---|
| 20 | ${ super() } |
|---|
| 21 | # endblock |
|---|
| 22 | </title> |
|---|
| 23 | # block head |
|---|
| 24 | ${ super() } |
|---|
| 25 | # endblock |
|---|
| 26 | </head> |
|---|
| 27 | <body> |
|---|
| 28 | # block content |
|---|
| 29 | <div id="content" class="tags"> |
|---|
| 30 | <form id="query" action="${href.tags()}" method="get"> |
|---|
| 31 | <div> |
|---|
| 32 | <input type="text" id="tag-query" name="q" size="40" accesskey="t" |
|---|
| 33 | value="${tag_query}"/> |
|---|
| 34 | <input type="submit" value="${_('Filter Tags')}"/> |
|---|
| 35 | </div> |
|---|
| 36 | <div> |
|---|
| 37 | # for realm in tag_realms: |
|---|
| 38 | <input type="checkbox" id="${realm.name}" name="${realm.name}" |
|---|
| 39 | ${{"checked": realm.checked}|htmlattr}/> |
|---|
| 40 | <label for="${realm.name}">${realm.name}</label> |
|---|
| 41 | # endfor |
|---|
| 42 | </div> |
|---|
| 43 | # if tag_query_error: |
|---|
| 44 | <div id="query-error"> |
|---|
| 45 | <strong>${_("Error:")}</strong> ${tag_query_error} |
|---|
| 46 | </div> |
|---|
| 47 | # endif |
|---|
| 48 | <div> |
|---|
| 49 | <p><strong>${_("Query syntax:")}</strong></p> |
|---|
| 50 | <ul> |
|---|
| 51 | # trans |
|---|
| 52 | <li>Use <strong>tag1 tag2</strong> to match <em>all</em> tags.</li> |
|---|
| 53 | <li><strong>tag1 or tag2</strong> will match <em>any</em> tag.</li> |
|---|
| 54 | <li>Negate a tag with <strong>-tag1</strong>.</li> |
|---|
| 55 | <li>Group sub-queries with <strong>(tag1 or tag2)</strong>.</li> |
|---|
| 56 | <li>Quote strings to include special characters.</li> |
|---|
| 57 | <li>Restrict search to a specific realm with <strong>realm:wiki</strong>.</li> |
|---|
| 58 | # endtrans |
|---|
| 59 | </ul> |
|---|
| 60 | </div> |
|---|
| 61 | </form> |
|---|
| 62 | |
|---|
| 63 | <div id="tag_body"> |
|---|
| 64 | # if tag_query and tag_page and tag_page.exists and 'WIKI_VIEW' in perm(tag_page.resource): |
|---|
| 65 | <h1> |
|---|
| 66 | # set url = href.wiki(tag_page.name) |
|---|
| 67 | # trans query = tag_query |
|---|
| 68 | Showing objects tagged with |
|---|
| 69 | <a href="${url}" title="Go to wiki page"> |
|---|
| 70 | '${query}' |
|---|
| 71 | </a> |
|---|
| 72 | # endtrans |
|---|
| 73 | </h1> |
|---|
| 74 | # elif tag_query and tag_page: |
|---|
| 75 | <h1> |
|---|
| 76 | # trans query = tag_query |
|---|
| 77 | Showing objects tagged with '${query}' |
|---|
| 78 | # endtrans |
|---|
| 79 | </h1> |
|---|
| 80 | # elif tag_query: |
|---|
| 81 | <h1> |
|---|
| 82 | # trans query = tag_query |
|---|
| 83 | Showing objects matching '${query}' |
|---|
| 84 | # endtrans |
|---|
| 85 | </h1> |
|---|
| 86 | # endif |
|---|
| 87 | |
|---|
| 88 | # if tag_page and not tag_page.exists and 'WIKI_CREATE' in perm: |
|---|
| 89 | <p> |
|---|
| 90 | # set url = href.wiki(tag_page.name, action='edit', text='= %s =\n\n[[ListTagged(%s)]]' % (tag_page.name, tag_page.name)) |
|---|
| 91 | # trans |
|---|
| 92 | <a href="${url}"> |
|---|
| 93 | Create Wiki page |
|---|
| 94 | </a> |
|---|
| 95 | for this tag |
|---|
| 96 | # endtrans |
|---|
| 97 | </p> |
|---|
| 98 | # endif |
|---|
| 99 | |
|---|
| 100 | ${tag_body} |
|---|
| 101 | |
|---|
| 102 | # if mincount > 1: |
|---|
| 103 | <p> |
|---|
| 104 | # set url = href.tags(realm_args, mincount=1) |
|---|
| 105 | # trans mincount |
|---|
| 106 | Showing only tags with ${mincount} or more occurrences |
|---|
| 107 | (<a href="${url}">view all tags</a>) |
|---|
| 108 | </p> |
|---|
| 109 | # endtrans |
|---|
| 110 | # endif |
|---|
| 111 | </div> |
|---|
| 112 | </div> |
|---|
| 113 | # endblock |
|---|
| 114 | </body> |
|---|
| 115 | </html> |
|---|