templates/gallery.html
author terom
Wed, 16 Jan 2008 14:58:03 +0000
changeset 19 8d3ffd87cb0b
parent 18 46536daf9e04
child 23 10841abbc01f
permissions -rw-r--r--
* move cgi-bin to de-cgi-bin so it doesn't conflict with my default alias... need to come up with a real solution to this
* refactored series/shorturl into the new codebase
<%inherit file="master.html" /> <!-- %> -->

<%def name="pagination(num_pages, cur_page)"> <!-- %> -->
% if num_pages > 1 :
        <ul>
        
%   if cur_page > 0 :
            <li><a href="${h.url_for_page(cur_page - 1)}">&laquo; Prev</a></li>
%   else :
            <li><span>&laquo; Prev</span></li>
%   endif

%   for page in xrange(0, num_pages) :
%     if page == cur_page :
            <li><strong>${page + 1}</strong></li>
%     else :
            <li><a href="${h.url_for_page(page)}">${page + 1}</a></li>
%     endif            
%   endfor

%   if cur_page < num_pages - 1 :
            <li><a href="${h.url_for_page(cur_page + 1)}">Next &raquo;</a></li>
%   else :
            <li><span>Next &raquo;</span></li>
%   endif
        </ul>
% endif       
</%def> <!-- %> -->

    <h1>${title}</h1>
    <div id="dirs">
% if dirs :
        <ul>
%   for dir in dirs :
            <li><a href="${dir.name}">${dir.title}</a></li>
%   endfor
        </ul>
% endif
    </div>
    <div class="paginate">
${pagination(num_pages, cur_page)}
    </div>
    <div id="thumbnails">
% for img in images :
        ${h.tag_for_img(img.html_name, img.thumb_name)}
% endfor
    </div>
    <div class="paginate">
${pagination(num_pages, cur_page)}
    </div>
    <p id="description">
${description}
    </p>
% if shorturl :    
    <div id="info">
        <p>ShortURL: <a href="${shorturl}" rel="nofollow">${shorturl_code}</a></p>
    </div>
% endif