Ignore:
Timestamp:
27 Apr 2011, 07:43:49 (14 years ago)
Author:
Henrik Bettermann
Message:

Implement title_prefix vocabulary. Remove redundant getName method and replace by the longtitle property.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/browser
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/breadcrumbs.py

    r5864 r5988  
    121121    @property
    122122    def title(self):
    123         prefix = self.context.title_prefix
    124         prefix = prefix[0].upper() + prefix[1:]
    125         return '%s of %s' % (prefix, self.context.title)
     123        return self.context.longtitle()
    126124
    127125class DepartmentBreadcrumb(FacultyBreadcrumb):
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r5987 r5988  
    4141    IWAeUPXMLImporter, IWAeUPXMLExporter, IBatchProcessor)
    4242from waeup.sirp.university.catalog import search
    43 from waeup.sirp.utils.helpers import getName
    4443from waeup.sirp.widgets.interfaces import ITableProvider
    4544
     
    905904    grok.name('index')
    906905    pnav = 1
     906
    907907    @property
    908908    def title(self):
    909         return "%s (%s)" % (getName(self.context), self.context.code)
     909        return self.context.longtitle()
    910910
    911911    #def update(self, code=None, edit=None, delete=None):
     
    995995    grok.name('index')
    996996    pnav = 1
     997    #title = 'xxx'
    997998
    998999    @property
    9991000    def title(self):
    1000         return "%s (%s)" % (getName(self.context), self.context.code)
     1001        #import pdb; pdb.set_trace()
     1002        return self.context.longtitle()
    10011003   
    10021004    def update(self):
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/facultycontainerpage.pt

    r5942 r5988  
    1515    <tr tal:repeat="value context/values">
    1616      <td> <a tal:attributes="href value/__name__"> <span tal:content="value/code">Name</span></a></td>
    17       <td tal:content="value/title">Title</td>
     17      <td tal:content="value/longtitle">Title</td>
    1818    </tr>
    1919  </tbody>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/facultypage.pt

    r5942 r5988  
    1515    <tr tal:repeat="value context/values">
    1616      <td> <a tal:attributes="href value/__name__"> <span tal:content="value/code">Name</span></a></td>
    17       <td tal:content="value/title">Title</td>
     17      <td tal:content="value/longtitle">Title</td>
    1818      <td class="text-right">
    1919      </td>
Note: See TracChangeset for help on using the changeset viewer.