Changeset 490:ebc65bcb529b

Show
Ignore:
Timestamp:
01/25/10 11:34:29 (7 months ago)
Author:
rgrp <http://rufuspollock.org>
Branch:
default
Message:

[revision,bugfix][s]: fix brokenness on revision read view due to assuming revision ids were still ints (changed to uuids in cset:e87fbe8d9f78).

  • Also change revision read view to display more useful change links
Location:
microfacts
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • microfacts/controllers/revision.py

    r409 r490  
    5959        if id is None: 
    6060            h.redirect_to(controller='revision', action='list') 
    61         id = int(id) 
    6261        c.revision = model.Revision.query.get(id) 
    6362        if c.revision is None: 
  • microfacts/templates/revision/read.html

    r363 r490  
    3030      <ul py:if="len(items) > 0"> 
    3131        <py:for each="item in items"> 
    32           <li>${item}</li> 
     32        <li> 
     33          <py:if test="_type.__name__ in ['Thread','Factlet']"> 
     34            <a href="${h.url_for(controller=_type.__name__.lower(), 
     35              action='read', id=item.id)}">${item.title}</a> 
     36          </py:if> 
     37          <py:if test="_type.__name__ == 'ThreadFactlet'"> 
     38            <a href="${h.url_for(controller='thread', 
     39              action='read', id=item.thread_id)}">${item.thread.title}</a> 
     40            -  
     41            <a href="${h.url_for(controller='factlet', 
     42              action='read', id=item.factlet_id)}">${item.factlet.title}</a> 
     43          </py:if> 
     44        </li> 
    3345        </py:for> 
    3446      </ul>