Changeset 828

Show
Ignore:
Timestamp:
06/13/07 17:35:31 (2 years ago)
Author:
sgillies
Message:

Links to a persons creations are now working

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Bibliomane/trunk/bibliomane/browser/manifestation.pt

    r822 r828  
    99 
    1010  <body> 
    11     <h1 tal:content="context/title">Title</h1> 
     11    <h1 tal:content="context/__parent__/title">Title</h1> 
    1212    <p id="frbr-entity-identifier">( Manifestation )</p> 
    1313     
  • Bibliomane/trunk/bibliomane/browser/person.pt

    r822 r828  
    3131    <h3>Creations</h3> 
    3232   
    33     <div class="widget" tal:repeat="work context/creations"> 
     33    <div class="widget" tal:repeat="work view/creations"> 
    3434      <a 
    3535        tal:attributes="href work/@@absolute_url" 
  • Bibliomane/trunk/bibliomane/browser/principals.py

    r821 r828  
    55from zope.formlib.form import AddForm, DisplayForm, EditForm, Fields 
    66 
    7 from bibliomane.interfaces import IPerson, ICorporateBody 
     7from bibliomane.interfaces import IPerson, ICorporateBody, ICreatedBy 
    88from bibliomane.principals import Person, CorporateBody 
    9  
     9from bibliomane.relationship import find_sources 
    1010 
    1111# Person 
     
    2323    def frbr_widgets(self): 
    2424        return [w for w in self.widgets] 
     25 
     26    @property 
     27    def creations(self): 
     28        return find_sources(self.context, ICreatedBy) 
    2529 
    2630 
  • Bibliomane/trunk/bibliomane/browser/work.pt

    r822 r828  
    1818    <h3>Creators</h3> 
    1919   
    20     <div class="widget" tal:repeat="principal context/principals"> 
     20    <div class="widget" tal:repeat="principal view/principals"> 
    2121      <a  
    2222        tal:attributes="href principal/@@absolute_url" 
  • Bibliomane/trunk/bibliomane/browser/works.py

    r821 r828  
    2020    def frbr_widgets(self): 
    2121        return [w for w in self.widgets] 
     22 
     23    @property 
     24    def principals(self): 
     25        return self.context.principals 
    2226 
    2327