Ignore:
Timestamp:
22 Nov 2011, 17:31:23 (13 years ago)
Author:
Henrik Bettermann
Message:

Let's StudyCourseDisplayFormPage? provide the department and faculty objects.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
2 edited

Legend:

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

    r7160 r7171  
    605605    @property
    606606    def current_mode(self):
    607         return study_modes.getTermByToken(
    608             self.context.certificate.study_mode).title
     607        if self.context.certificate:
     608            current_mode = study_modes.getTermByToken(
     609                self.context.certificate.study_mode).title
     610            return current_mode
     611        return
     612       
     613    @property
     614    def department(self):
     615        if self.context.certificate:
     616            return self.context.certificate.__parent__.__parent__
     617        return
     618
     619    @property
     620    def faculty(self):
     621        if self.context.certificate:
     622            return self.context.certificate.__parent__.__parent__.__parent__
     623        return
    609624
    610625class StudyCourseManageActionButton(ManageActionButton):
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studycoursepage.pt

    r7161 r7171  
    3939      </td>
    4040      <td class="field">
    41         <div class="widget"
    42              tal:content="view/context/certificate/__parent__/__parent__/longtitle">
    43           <input type="text" />
    44         </div>
     41        <a tal:attributes="href python: view.url(view.department)" class="widget"
     42             tal:content="view/department/longtitle">
     43          DEPARTMENT
     44        </a>
    4545      </td>
    4646    </tr>
     
    5252      </td>
    5353      <td class="field">
    54         <div class="widget"
    55              tal:content="view/context/certificate/__parent__/__parent__/__parent__/longtitle">
    56           <input type="text" />
    57         </div>
     54        <a tal:attributes="href python: view.url(view.faculty)" class="widget"
     55             tal:content="view/faculty/longtitle">
     56          FACULTY
     57        </a>
    5858      </td>
    5959    </tr>
Note: See TracChangeset for help on using the changeset viewer.