Changeset 10650


Ignore:
Timestamp:
25 Sep 2013, 06:46:53 (11 years ago)
Author:
Henrik Bettermann
Message:

Convert longtitle() into property attribute.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py

    r10596 r10650  
    9393                '__parent__', None)
    9494        faculty = getattr(dept, '__parent__', None)
    95         return [x is not None and x.longtitle() or x for x in dept, faculty]
     95        return [x is not None and x.longtitle or x for x in dept, faculty]
    9696
    9797    def _addLoginInformation(self):
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/breadcrumbs.py

    r9818 r10650  
    182182    @property
    183183    def title(self):
    184         return self.context.longtitle()
     184        return self.context.longtitle
    185185
    186186class DepartmentBreadcrumb(FacultyBreadcrumb):
     
    217217    @property
    218218    def title(self):
    219         return self.context.longtitle()
     219        return self.context.longtitle
    220220
    221221def getBreadcrumb(obj, viewname=None):
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r10649 r10650  
    18651865    @property
    18661866    def label(self):
    1867         return _('Find students in ') + ('%s' % self.context.longtitle())
     1867        return _('Find students in ') + ('%s' % self.context.longtitle)
    18681868
    18691869    def _find_students(self,query=None, searchtype=None, view=None):
     
    23302330    @property
    23312331    def label(self):
    2332         return '%s' % (self.context.longtitle())
     2332        return '%s' % (self.context.longtitle)
    23332333
    23342334    @property
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatecoursepage.pt

    r9320 r10650  
    1818      <td i18n:translate="">Provided by:</td>
    1919      <td>
    20       <span tal:content="python: context.course.__parent__.__parent__.longtitle()">DEPARTMENT</span>
     20      <span tal:content="python: context.course.__parent__.__parent__.longtitle">DEPARTMENT</span>
    2121      <br />
    22       <span tal:content="python: context.course.__parent__.__parent__.__parent__.longtitle()">FACULTY</span>
     22      <span tal:content="python: context.course.__parent__.__parent__.__parent__.longtitle">FACULTY</span>
    2323      </td>
    2424    </tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r10647 r10650  
    29302930
    29312931    def label(self):
    2932         return 'Students in %s' % self.context.longtitle()
     2932        return 'Students in %s' % self.context.longtitle
    29332933
    29342934    def _set_session_values(self):
     
    29962996
    29972997    def label(self):
    2998         return 'Students studying %s' % self.context.longtitle()
     2998        return 'Students studying %s' % self.context.longtitle
    29992999
    30003000    def _searchCatalog(self, session, level):
     
    30243024
    30253025    def label(self):
    3026         return 'Students registered for %s' % self.context.longtitle()
     3026        return 'Students registered for %s' % self.context.longtitle
    30273027
    30283028    def _searchCatalog(self, session, level):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/export.py

    r10296 r10650  
    476476            value = certificate.title
    477477        if name == 'department' and certificate is not None:
    478             value = certificate.__parent__.__parent__.longtitle()
     478            value = certificate.__parent__.__parent__.longtitle
    479479        if name == 'faculty' and certificate is not None:
    480             value = certificate.__parent__.__parent__.__parent__.longtitle()
     480            value = certificate.__parent__.__parent__.__parent__.longtitle
    481481        if name == 'passport_path' and certificate is not None:
    482482            file_id = IFileStoreNameChooser(context).chooseName(attr='passport.jpg')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/level_report.py

    r10617 r10650  
    152152        self.faccode = faccode
    153153        self.depcode = depcode
    154         self.factitle = site['faculties'][faccode].longtitle()
    155         self.deptitle = site['faculties'][faccode][depcode].longtitle()
     154        self.factitle = site['faculties'][faccode].longtitle
     155        self.deptitle = site['faculties'][faccode][depcode].longtitle
    156156        self.author = author
    157157        self.creation_dt_string = self.creation_dt.astimezone(
     
    272272            for dep in fac.values():
    273273                faccode_depcodes.append(
    274                     ('%s (%s)' %(dep.longtitle(), fac.longtitle()),
     274                    ('%s (%s)' %(dep.longtitle, fac.longtitle),
    275275                     '%s_%s' %(fac.code, dep.code)))
    276276        self.faccode_depcodes = sorted(
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py

    r10621 r10650  
    130130        self.faccode = faccode
    131131        self.depcode = depcode
    132         self.factitle = site['faculties'][faccode].longtitle()
    133         self.deptitle = site['faculties'][faccode][depcode].longtitle()
     132        self.factitle = site['faculties'][faccode].longtitle
     133        self.deptitle = site['faculties'][faccode][depcode].longtitle
    134134        self.author = author
    135135        self.creation_dt_string = self.creation_dt.astimezone(
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r10578 r10650  
    142142            f_label = Paragraph(f_label, ENTRY1_STYLE)
    143143            f_text = formatted_text(
    144                 studentview.context['studycourse'].certificate.longtitle())
     144                studentview.context['studycourse'].certificate.longtitle)
    145145            f_text = Paragraph(f_text, ENTRY1_STYLE)
    146146            data_right.append([f_label,f_text])
     
    150150            f_text = formatted_text(
    151151                studentview.context[
    152                 'studycourse'].certificate.__parent__.__parent__.longtitle(),
     152                'studycourse'].certificate.__parent__.__parent__.longtitle,
    153153                )
    154154            f_text = Paragraph(f_text, ENTRY1_STYLE)
     
    159159            f_text = formatted_text(
    160160                studentview.context[
    161                 'studycourse'].certificate.__parent__.__parent__.__parent__.longtitle(),
     161                'studycourse'].certificate.__parent__.__parent__.__parent__.longtitle,
    162162                )
    163163            f_text = Paragraph(f_text, ENTRY1_STYLE)
     
    727727        f_label = trans(_('Course of Study:'), portal_language)
    728728        f_label = Paragraph(f_label, ENTRY1_STYLE)
    729         f_text = formatted_text(view.context.certificate.longtitle())
     729        f_text = formatted_text(view.context.certificate.longtitle)
    730730        f_text = Paragraph(f_text, ENTRY1_STYLE)
    731731        contextdata.append([f_label,f_text])
     
    734734        f_label = Paragraph(f_label, ENTRY1_STYLE)
    735735        f_text = formatted_text(
    736             view.context.certificate.__parent__.__parent__.__parent__.longtitle())
     736            view.context.certificate.__parent__.__parent__.__parent__.longtitle)
    737737        f_text = Paragraph(f_text, ENTRY1_STYLE)
    738738        contextdata.append([f_label,f_text])
     
    741741        f_label = Paragraph(f_label, ENTRY1_STYLE)
    742742        f_text = formatted_text(
    743             view.context.certificate.__parent__.__parent__.longtitle())
     743            view.context.certificate.__parent__.__parent__.longtitle)
    744744        f_text = Paragraph(f_text, ENTRY1_STYLE)
    745745        contextdata.append([f_label,f_text])
  • main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py

    r10530 r10650  
    8989        return None
    9090
     91    @property
    9192    def longtitle(self):
    9293        return "%s (%s)" % (self.title,self.code)
     
    161162        return self.course.code
    162163
     164    @property
    163165    def longtitle(self):
    164166        return "%s in level %s" % (self.course.code,
  • main/waeup.kofa/trunk/src/waeup/kofa/university/course.py

    r9843 r10650  
    6767        return None
    6868
     69    @property
    6970    def longtitle(self):
    7071        return "%s (%s)" % (self.title,self.code)
  • main/waeup.kofa/trunk/src/waeup/kofa/university/department.py

    r10635 r10650  
    8989        return None
    9090
     91    @property
    9192    def longtitle(self):
    9293        return longtitle(self)
  • main/waeup.kofa/trunk/src/waeup/kofa/university/faculty.py

    r10639 r10650  
    7474        self[department.code] = department
    7575
     76    @property
    7677    def longtitle(self):
    7778        return longtitle(self)
  • main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py

    r10642 r10650  
    5555        )
    5656
    57     def longtitle():
    58         """
    59         Returns the long title of a faculty.
    60         """
    6157
    6258class IFacultyAdd(IFaculty):
     
    114110    certificates = Attribute("A container for certificates.")
    115111
    116     def longtitle():
    117         """
    118         Returns the long title of a department.
    119         """
    120112
    121113class IDepartmentAdd(IDepartment):
     
    185177        )
    186178
    187     def longtitle():
    188         """
    189         Returns the long title of a course.
    190         """
    191179
    192180class ICourseAdd(ICourse):
     
    293281        required = False,
    294282        )
    295 
    296     def longtitle():
    297         """
    298         Returns the long title of a certificate.
    299         """
    300283
    301284    @invariant
     
    364347        """
    365348
    366     def longtitle():
    367         """
    368         Returns the long title of a certificatecourse.
    369         """
    370 
    371 
    372349class ICertificateCourseAdd(ICertificateCourse):
    373350    """A certificatecourse is referring a course and
Note: See TracChangeset for help on using the changeset viewer.