Changeset 13

Show
Ignore:
Timestamp:
02/08/07 20:28:42 (2 years ago)
Author:
simon
Message:

Rejig the output to cope with cases of lots of tags.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/templates/photo/view

    r11 r13  
    2121[% END %] 
    2222</td> 
    23 <td align="right" class="tagbrowse"> 
    24 [% FOR tag = photo.tags; 
    25     "<a href=\""; base;"/tag/view/";tag.name | html | uri;"\">"; 
    26     tag; 
    27     "</a>&nbsp;("; 
    28     tag.taggings.size; ")"; 
    29     ", " UNLESS tag == photo.tags.last; 
    30 END %] 
    31 </td> 
    32 </tr> 
    33 <tr> 
    34 <td> 
     23<td align="right"> 
    3524[% IF photo.albums %] 
    3625In albums: 
     
    3928[% ";" UNLESS album == photo.albums.last %] 
    4029[% END %] 
     30<br> 
    4131[% END %] 
    42  
    43 </td> 
    44 <td align="right" class="tagbrowse"><small> 
     32<small> 
    4533<i>Photo shot on [% photo.shot.ymd %] </i> <br> 
    4634Uploaded by <a href="[%base%]/user/view/[%photo.uploader.id%]"> [% 
     
    4937</tr> 
    5038</table> 
     39 
     40<div class="tagbrowse smaller"> 
     41[% SET tagset = {}; FOR tag = photo.tags; 
     42    SET name = tag.name; tagset.$name = tag.taggings.size; 
     43  END; 
     44  SET sorted = tagset.nsort.reverse; 
     45%] 
     46[% SET counter = 0; 
     47  FOR tag = sorted; 
     48    counter = counter + 1; 
     49    IF tagset.$tag > 1;  
     50        "<a href=\""; base;"/tag/view/";tag | html | uri;"\">"; 
     51        tag; 
     52        "</a>&nbsp;("; 
     53        tagset.$tag; ")"; 
     54    ELSE;  
     55        tag;  
     56        IF counter > 20; "..."; LAST; END; 
     57    END; 
     58    ", " UNLESS tag == sorted.last; 
     59END %] 
     60</div> 
     61 
    5162<div class="photoview"> 
    5263    [% SET sizes = request.config.sizes %] 
  • trunk/templates/static/memories.css

    r7 r13  
    9292.photorights { font-size: 90%; padding: 10px; text-align: right; font-weight: bold; } 
    9393.photolicense { font-size: 80%; padding: 10px; } 
     94.smaller { font-size: 80%  } 
    9495 
    9596span.tagcloud0 { font-size: 9px;}