"Fossies" - the Fresh Open Source Software Archive

Member "PURELIB/trac/templates/macros.html" (27 Aug 2019, 2737 Bytes) of package /windows/misc/Trac-1.4.win-amd64.exe:


The requested HTML page contains a <FORM> tag that is unusable on "Fossies" in "automatic" (rendered) mode so that page is shown as HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {# Copyright (C) 2006-2014 Edgewall Software
    2 
    3   This software is licensed as described in the file COPYING, which
    4   you should have received as part of this distribution. The terms
    5   are also available at https://trac.edgewall.org/wiki/TracLicense.
    6 
    7   This software consists of voluntary contributions made by many
    8   individuals. For the exact contribution history, see the revision
    9   history and logs, available at https://trac.edgewall.org/.
   10 #}
   11 
   12 ## Macros and constants
   13 
   14 {# Usage:
   15 
   16      # import 'macros.html' as jmacros with context
   17 
   18    Note that this import is not necessary in templates that extend the
   19    "layout.html" template, as the latter contains that import.
   20    However, in secondary templates included from a template extending
   21    "layout.html", jmacros is no longer accessible and the import
   22    statement has to be written again.
   23 
   24 #}
   25 
   26 
   27 {# Creates an <input> form field containing the CSRF protection token.
   28 
   29    All form with method POST should include this field.
   30 
   31    Example:
   32 
   33      <form id="query" method="post" action="${href.query()}">
   34      ${jmacros.form_token_input()}
   35      ...
   36      </form>
   37 #}
   38 # macro form_token_input()
   39 <input type="hidden" name="__FORM_TOKEN" value="${form_token}" />
   40 # endmacro
   41 ## jinjacheck: "input" OK
   42 
   43 {# Utilities for the repetitive help divs #}
   44 
   45 # macro note()
   46 <strong>${_("Note:")}</strong>
   47 # endmacro
   48 
   49 # macro wikihelp(page, anchor='')
   50 <div class="trac-help">
   51   # set trac_page
   52   <a href="${href.wiki(page) + anchor}">${page}</a>
   53   # endset
   54   ${caller(note(), trac_page)}
   55 </div>
   56 #endmacro
   57 
   58 # macro wikiformatting_link()
   59 <a tabindex="42" href="${href.wiki('WikiFormatting')}">WikiFormatting</a>
   60 # endmacro
   61 
   62 # macro warnings(messages, id='warning', close_message=True)
   63   # if messages:
   64   <div id="${id}" class="warning system-message">
   65     # if close_message:
   66       <a class="trac-close-msg" href="#"
   67          title="${_('Hide this warning')}"><span>${_("close")}</span></a>
   68     # endif
   69     <strong>${_("Warning:")}</strong>
   70     # if len(messages) == 1:
   71     ${messages[0]}
   72     # else:
   73     <ul>
   74       # for message in messages:
   75       <li>${message}</li>
   76       # endfor
   77     </ul>
   78     # endif
   79   </div>
   80   # endif
   81 # endmacro
   82 
   83 # macro notices(messages, id='notice', close_message=True)
   84   # if messages:
   85   <div id="${id}" class="notice system-message">
   86     # if close_message:
   87       <a class="trac-close-msg" href="#"
   88          title="${_('Hide this notice')}"><span>${_("close")}</span></a>
   89     # endif
   90     # if len(messages) == 1:
   91     ${messages[0]}
   92     # else:
   93     <ul>
   94       # for message in messages:
   95       <li>${message}</li>
   96       # endfor
   97     </ul>
   98     # endif
   99   </div>
  100   # endif
  101 # endmacro