~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/templates/offering.html

  • Committer: William Grant
  • Date: 2010-02-04 00:44:06 UTC
  • Revision ID: grantw@unimelb.edu.au-20100204004406-vdxu1j86oz15zxcv
Don't render an offering's projects as <a>s unless they actually have a URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
                            if project.has_deadline_passed(req.user)
39
39
                            else {'class': 'project'}"
40
40
                  py:with="principal = project.project_set.get_submission_principal(req.user)">
41
 
                <a href="${project.url}">${project.name}</a> &ndash;
 
41
                <py:choose test="project.url not in (None, '')">
 
42
                  <a py:when="True" href="${project.url}">${project.name}</a>
 
43
                  <span py:otherwise="">${project.name}</span> 
 
44
                </py:choose>
 
45
                &ndash;
42
46
                <span py:content="format_submission_principal(req.user, principal)" /> &ndash;
43
47
                <span title="${format_datetime(project.deadline)}">
44
48
                  ${'closed' if project.has_deadline_passed(req.user) else 'due'} ${format_datetime_short(project.deadline)}