templates/channel.tmpl
changeset 46 185504387370
parent 43 fc11c4e86a82
child 48 7858b7b8ffe3
equal deleted inserted replaced
45:e94ab812c0c8 46:185504387370
       
     1 <%inherit file="layout.tmpl" />
       
     2 
       
     3 <%def name="menu()">
       
     4 <ul>
       
     5     <li><a href="${urls.index.build(req)}">Home</a></li>
       
     6 
       
     7     <li>
       
     8         <form action="${urls.channel_select.build(req)}" method="GET">
       
     9             <label for="channel">Channel:</label>
       
    10 
       
    11             <select name="channel">
       
    12             % for ch in channel_list :
       
    13                 <option value="${ch.id}"${' selected="selected"' if ch == channel else ''}>${ch.title}</option>
       
    14             % endfor
       
    15             </select><input type="submit" value="Go &raquo;" />
       
    16         </form>
       
    17     </li>
       
    18 
       
    19     <li>
       
    20         <form action="" method="GET">
       
    21             View last
       
    22 
       
    23             <select name="count">
       
    24             % for cc in (10, 20, 50, 100, 'all') :
       
    25                 <option${' selected="selected"' if cc == count else ''}>${cc}</option>
       
    26             % endfor
       
    27             </select>
       
    28 
       
    29             lines: <input type="submit" value="Go &raquo;" />
       
    30         </form>
       
    31     </li>
       
    32 
       
    33     <li><a href="#">Browse by Date</a></li>
       
    34 
       
    35     <li><a href="#">Search</a></li>
       
    36 
       
    37     <li><a href="#">[RSS]</a></li>
       
    38 </ul>
       
    39 </%def>
       
    40 
       
    41 <h1>${channel.title} &raquo; Last ${count} lines</h1>
       
    42 
       
    43 <pre>
       
    44 % for line in lines :
       
    45 ${line}
       
    46 % endfor
       
    47 </pre>
       
    48