"Fossies" - the Fresh Open Source Software Archive

Member "PURELIB/trac/templates/genshi/attachment.html" (27 Aug 2019, 6334 Bytes) of package /windows/misc/Trac-1.4.win32.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-2019 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 <!DOCTYPE html
   12     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   13     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   14 <html xmlns="http://www.w3.org/1999/xhtml"
   15       xmlns:py="http://genshi.edgewall.org/"
   16       xmlns:xi="http://www.w3.org/2001/XInclude"
   17       xmlns:i18n="http://genshi.edgewall.org/i18n"
   18       py:with="parent = attachments.parent if attachments else attachment.resource.parent">
   19   <xi:include href="layout.html" />
   20   <head>
   21     <title py:choose="mode">
   22       <py:when test="'new'">${name_of(parent)} &ndash; Attachment</py:when>
   23       <py:when test="'list'">${name_of(parent)} &ndash; Attachments</py:when>
   24       <py:otherwise><i18n:msg params="filename, parent">${attachment.filename} on ${name_of(parent)} &ndash; Attachment</i18n:msg></py:otherwise>
   25     </title>
   26     <py:if test="preview">
   27       <script>
   28         jQuery(function($) {
   29           $('#preview table.code').enableCollapsibleColumns($('#preview table.code thead th.content'));
   30         });
   31       </script>
   32     </py:if>
   33   </head>
   34 
   35   <body>
   36     <div py:choose="mode" id="content" class="attachment">
   37       <py:when test="'new'">
   38         <h1 i18n:msg="parent">Add Attachment to <a href="${url_of(parent)}">${name_of(parent)}</a></h1>
   39         <form id="attachment" class="mod" method="post" enctype="multipart/form-data" action="#">
   40           <div class="field">
   41             <label>File<py:if test="max_size >= 0">
   42               <i18n:msg params="value">(size limit ${pretty_size(max_size)})</i18n:msg></py:if>:<br />
   43               <input type="file" name="attachment" class="trac-disable-determinant" /></label>
   44           </div>
   45           <fieldset id="changeinfo">
   46             <legend>Attachment Info</legend>
   47             <py:if test="authname == 'anonymous'">
   48               <div class="field">
   49                 <label>Your email or username:<br />
   50                   <input type="text" name="author" class="trac-fullwidth" value="${attachment.author or author}" />
   51                 </label>
   52                 <p py:if="author == 'anonymous'" class="hint">
   53                   <i18n:msg>E-mail address and name can be saved in the <!--!
   54                     --><a href="${href.prefs()}" class="trac-target-new">Preferences</a>.</i18n:msg>
   55                 </p>
   56               </div>
   57               </py:if>
   58             <div class="field">
   59               <label>Description of the file (optional):<br />
   60                 <input type="text" class="trac-fullwidth" name="description" value="$attachment.description" />
   61               </label>
   62             </div>
   63             <py:if test="authname and authname != 'anonymous'">
   64               <div class="options">
   65                 <label><input type="checkbox" name="replace" checked="${is_replace or None}" />
   66                   Replace existing attachment of the same name</label>
   67               </div>
   68             </py:if>
   69           </fieldset>
   70           <div class="buttons">
   71             <input type="hidden" name="action" value="new" />
   72             <input type="hidden" name="realm" value="$parent.realm" />
   73             <input type="hidden" name="id" value="$parent.id" />
   74             <input type="submit" class="trac-disable trac-disable-on-submit" value="${_('Add attachment')}" />
   75             <input type="submit" name="cancel" value="${_('Cancel')}" />
   76           </div>
   77         </form>
   78       </py:when>
   79 
   80       <py:when test="'delete'">
   81         <h1><a href="${url_of(parent)}">${name_of(parent)}</a>: $attachment.filename</h1>
   82         <p><strong>Are you sure you want to delete this attachment?</strong><br />
   83           This is an irreversible operation.</p>
   84         <div class="buttons">
   85           <form method="post" action="#">
   86             <div id="delete">
   87               <input type="hidden" name="action" value="delete" />
   88               <input type="submit" class="trac-disable-on-submit" value="${_('Delete attachment')}" />
   89               <input type="submit" name="cancel" value="${_('Cancel')}" />
   90             </div>
   91           </form>
   92         </div>
   93       </py:when>
   94 
   95       <py:when test="'list'">
   96         <h1><a href="${url_of(parent)}">${name_of(parent)}</a></h1>
   97         <py:with vars="context = context.child(parent)">
   98           <xi:include href="list_of_attachments.html" py:with="alist = attachments"/>
   99         </py:with>
  100       </py:when>
  101 
  102       <py:otherwise> <!--! 'render' mode -->
  103         <h1><a href="${url_of(parent)}">${name_of(parent)}</a>: $attachment.filename</h1>
  104         <table id="info" summary="Description">
  105           <tr>
  106             <th scope="col" i18n:msg="file,size,author,date">
  107               File $attachment.filename, <!--!
  108               --><span title="${ngettext('%(num)d byte', '%(num)d bytes',
  109                                          num=attachment.size)}"><!--!
  110               -->${pretty_size(attachment.size)}</span> <!--!
  111               -->(added by ${authorinfo(attachment.author)}, ${pretty_dateinfo(attachment.date)})
  112             </th>
  113           </tr>
  114           <tr>
  115             <td class="message searchable" xml:space="preserve">
  116               ${wiki_to_html(context.child(parent), attachment.description)}
  117             </td>
  118           </tr>
  119         </table>
  120 
  121         <div py:if="preview" id="preview" class="searchable">
  122           <xi:include href="preview_file.html" py:with="preview = preview"/>
  123         </div>
  124 
  125         <py:if test="attachment and 'ATTACHMENT_DELETE' in perm(attachment.resource)">
  126           <div class="buttons">
  127             <form method="get" action="#">
  128               <div id="delete">
  129                 <input type="hidden" name="action" value="delete" />
  130                 <input type="submit" value="${_('Delete attachment')}" />
  131               </div>
  132             </form>
  133           </div>
  134         </py:if>
  135       </py:otherwise>
  136 
  137     </div>
  138   </body>
  139 </html>