"Fossies" - the Fresh Open Source Software Archive

Member "PURELIB/trac/templates/genshi/progress_bar.html" (27 Aug 2019, 2394 Bytes) of package /windows/misc/Trac-1.4.win32.exe:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) 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) 2010-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 Display groups of tickets in a progress bar.
   12 
   13 Arguments:
   14  - stats: an instance of trac.ticket.roadmap.TicketGroupStats
   15  - interval_hrefs: link associated to each interval in stats.intervals
   16  - percent=None: show that value as percentage, instead of stats.done_percent
   17  - legend=True: show a legend of label and count for each interval
   18  - style=None: explicit styling for the table.progress
   19  - stats_href=None: link associated to the total
   20 -->
   21 <html xmlns="http://www.w3.org/1999/xhtml"
   22       xmlns:py="http://genshi.edgewall.org/"
   23       xmlns:xi="http://www.w3.org/2001/XInclude"
   24       xmlns:i18n="http://genshi.edgewall.org/i18n"
   25       py:with="percent = value_of('percent', None);
   26                legend = value_of('legend', True);
   27                style = value_of('style', None);
   28                stats_href = value_of('stats_href', None)" py:strip="">
   29 
   30   <table class="progress" style="$style">
   31     <tr>
   32       <td py:for="idx, interval in enumerate(stats.intervals)"
   33           class="$interval.css_class"
   34           style="${'width: %d%%' % interval.percent if interval.percent > 0 else 'display: none'}">
   35         <a href="${interval_hrefs[idx] if interval_hrefs else None}"
   36            title="${_('%(count)s/%(total)s %(title)s',
   37                       count=interval.count, total=stats.count, title=interval.title)}"></a>
   38       </td>
   39     </tr>
   40   </table>
   41 
   42   <p class="percent">${'%d%%' % stats.done_percent if percent is None else percent}</p>
   43 
   44   <p py:if="legend" class="legend">
   45     <span class="first interval">
   46       <a href="${stats_href}"
   47          i18n:msg="unit, count">Total number of ${stats.unit}: ${stats.count}</a>
   48     </span>
   49     <span py:for="idx, interval in enumerate(stats.intervals)" class="interval">
   50       - <a href="${interval_hrefs[idx] if interval_hrefs else None}"
   51            i18n:msg="title, count">${interval.title}: ${interval.count}</a>
   52     </span>
   53   </p>
   54 </html>