Changeset 549

Show
Ignore:
Timestamp:
02/12/10 22:54:03 (6 months ago)
Author:
olivier
Message:

fix conflict between home modules and rst content image ; properly rewrite img urls when using rst object substitution ; fix build_query_string template tag

Location:
trunk/telemeta
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/telemeta/htdocs/css/telemeta.css

    r548 r549  
    630630} 
    631631 
    632 .rst-content img.align-left { 
     632.rst-content img.align-left, .rst-content img.align-right { 
    633633    margin-left: 0; 
    634     clear: left; 
    635 } 
    636  
    637 .rst-content img.align-right { 
    638     margin-right: 0; 
     634    margin-top: 0.6ex; 
     635} 
     636 
     637.module-set { 
     638    float: right; 
    639639    clear: right; 
    640640} 
    641641 
    642642.module { 
    643     float: right; 
    644643    border: 1px dotted #999; 
    645644    background: #EEE; 
    646645    padding: 1em; 
    647646    margin: 0 0 1.5em 1.5em; 
    648     clear: right; 
    649647} 
    650648 
  • trunk/telemeta/templates/telemeta_default/index.html

    r544 r549  
    55{% block content %} 
    66<div class="home-content"> 
     7<div class="module-set"> 
    78<div class="module"> 
    89    <h3>{% trans "Geographic Navigator" %}</h3> 
     
    1819        <br /> 
    1920        <span class="info">{{item.computed_duration}} {{item.apparent_collector|prepend:' - '}} - {{item.country_or_continent}}</span> 
    20         </li> 
     21    </li> 
    2122    {% endfor %} 
    22     </div> 
     23    </ul> 
     24</div>     
    2325</div> 
    2426<div class="home-description"> 
  • trunk/telemeta/templatetags/telemeta_utils.py

    r544 r549  
    1212from django.utils.encoding import smart_str, force_unicode 
    1313from django.utils.safestring import mark_safe 
     14from django import db 
    1415import re 
    1516 
     
    7576      args = [] 
    7677      for k, v in vars.iteritems(): 
    77           if not isinstance(v, basestring): 
     78          if isinstance(v, db.models.Model): 
     79              v = v.pk 
     80          elif not isinstance(v, basestring): 
    7881              v = unicode(v) 
    7982          args.append(urlquote(k) + '=' + urlquote(v)) 
     
    226229 
    227230    for line in content: 
    228         match = re.match('^(\.\. *(?:_[^:]*:|image::) *)([^ ]+) *$', line) 
     231        match = re.match('^(\.\. *(?:_[^:]*:|(?:\|\w+\|)? *image::) *)([^ ]+) *$', line) 
    229232        if match: 
    230233            directive, urlname = match.groups()