templates/gallery.html
author Tero Marttila <terom@fixme.fi>
Wed, 03 Jun 2009 18:37:12 +0300
branchold-taggr
changeset 37 5df1a18df815
parent 23 10841abbc01f
permissions -rw-r--r--
Old taggr code, never finished
23
10841abbc01f taggr2, which is starting to shape up
terom
parents: 19
diff changeset
     1
<%! use_javascript = False %>
12
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
     2
<%inherit file="master.html" /> <!-- %> -->
1
740133ab6353 initial code, somewhere between 0.2 and 0.5
terom
parents:
diff changeset
     3
12
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
     4
<%def name="pagination(num_pages, cur_page)"> <!-- %> -->
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
     5
% if num_pages > 1 :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
     6
        <ul>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
     7
        
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
     8
%   if cur_page > 0 :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
     9
            <li><a href="${h.url_for_page(cur_page - 1)}">&laquo; Prev</a></li>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    10
%   else :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    11
            <li><span>&laquo; Prev</span></li>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    12
%   endif
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    13
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    14
%   for page in xrange(0, num_pages) :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    15
%     if page == cur_page :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    16
            <li><strong>${page + 1}</strong></li>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    17
%     else :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    18
            <li><a href="${h.url_for_page(page)}">${page + 1}</a></li>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    19
%     endif            
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    20
%   endfor
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    21
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    22
%   if cur_page < num_pages - 1 :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    23
            <li><a href="${h.url_for_page(cur_page + 1)}">Next &raquo;</a></li>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    24
%   else :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    25
            <li><span>Next &raquo;</span></li>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    26
%   endif
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    27
        </ul>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    28
% endif       
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    29
</%def> <!-- %> -->
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    30
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    31
    <h1>${title}</h1>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    32
    <div id="dirs">
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    33
% if dirs :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    34
        <ul>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    35
%   for dir in dirs :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    36
            <li><a href="${dir.name}">${dir.title}</a></li>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    37
%   endfor
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    38
        </ul>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    39
% endif
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    40
    </div>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    41
    <div class="paginate">
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    42
${pagination(num_pages, cur_page)}
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    43
    </div>
1
740133ab6353 initial code, somewhere between 0.2 and 0.5
terom
parents:
diff changeset
    44
    <div id="thumbnails">
12
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    45
% for img in images :
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    46
        ${h.tag_for_img(img.html_name, img.thumb_name)}
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    47
% endfor
1
740133ab6353 initial code, somewhere between 0.2 and 0.5
terom
parents:
diff changeset
    48
    </div>
12
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    49
    <div class="paginate">
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    50
${pagination(num_pages, cur_page)}
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    51
    </div>
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    52
    <p id="description">
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    53
${description}
c2d8e9a754a1 Major code restructuring. Version is now 0.5, templates use Mako, and the code is split off into several files under lib/
terom
parents: 5
diff changeset
    54
    </p>
19
8d3ffd87cb0b * 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
terom
parents: 18
diff changeset
    55
% if shorturl :    
1
740133ab6353 initial code, somewhere between 0.2 and 0.5
terom
parents:
diff changeset
    56
    <div id="info">
18
46536daf9e04 fix bug with shorturls in gallery.html, and some horrible, horrible crap for the CGI stuff - I need to drop everything now and take a fresh look tomorrow before it gets even worse
terom
parents: 12
diff changeset
    57
        <p>ShortURL: <a href="${shorturl}" rel="nofollow">${shorturl_code}</a></p>
1
740133ab6353 initial code, somewhere between 0.2 and 0.5
terom
parents:
diff changeset
    58
    </div>
19
8d3ffd87cb0b * 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
terom
parents: 18
diff changeset
    59
% endif