Changeset 829

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

Add slots for other responsibilities

Files:

Legend:

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

    r828 r829  
    3838      </a> 
    3939    </div> 
     40 
     41    <h3>Realizations</h3> 
    4042   
     43    <div class="widget" tal:repeat="work view/realizations"> 
     44      <a 
     45        tal:attributes="href work/@@absolute_url" 
     46        tal:content="work/title"> 
     47        WORK 
     48      </a> 
     49    </div> 
     50 
     51    <h3>Productions</h3> 
     52   
     53    <div class="widget" tal:repeat="work view/productions"> 
     54      <a 
     55        tal:attributes="href work/@@absolute_url" 
     56        tal:content="work/title"> 
     57        WORK 
     58      </a> 
     59    </div> 
     60 
     61    <h3>Items</h3> 
     62   
     63    <div class="widget" tal:repeat="work view/items"> 
     64      <a 
     65        tal:attributes="href work/@@absolute_url" 
     66        tal:content="work/title"> 
     67        WORK 
     68      </a> 
     69    </div> 
     70 
    4171  </body> 
    4272 
  • Bibliomane/trunk/bibliomane/browser/principals.py

    r828 r829  
    55from zope.formlib.form import AddForm, DisplayForm, EditForm, Fields 
    66 
    7 from bibliomane.interfaces import IPerson, ICorporateBody, ICreatedBy 
     7from bibliomane.interfaces import IPerson, ICorporateBody 
     8from bibliomane.interfaces import ICreatedBy, IRealizedBy, IProducedBy, IOwnedBy 
    89from bibliomane.principals import Person, CorporateBody 
    910from bibliomane.relationship import find_sources 
     
    2728    def creations(self): 
    2829        return find_sources(self.context, ICreatedBy) 
     30 
     31    @property 
     32    def realizations(self): 
     33        return find_sources(self.context, IRealizedBy) 
     34 
     35    @property 
     36    def productions(self): 
     37        return find_sources(self.context, IProducedBy) 
     38 
     39    @property 
     40    def items(self): 
     41        return find_sources(self.context, IOwnedBy) 
    2942 
    3043