Ignore:
Timestamp:
6 Feb 2014, 08:54:59 (11 years ago)
Author:
Henrik Bettermann
Message:

Use absolute URLs. Otherwise images and files might not be found.

Location:
main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/templates/filedisplay.pt

    r8106 r11058  
    44  </td>
    55  <td>
    6     <a tal:attributes="href viewlet/download_name"
     6    <a tal:attributes="href python: view.url(context, viewlet.download_name)"
    77       tal:content="viewlet/download_name"
    88       target="image">
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/browser/templates/fileupload.pt

    r11026 r11058  
    55  <td>
    66    <tal:file tal:condition="viewlet/file_exists">
    7       <a tal:attributes="href viewlet/download_name"
     7      <a tal:attributes="href python: view.url(context, viewlet.download_name)"
    88         tal:content="viewlet/title"
    99         target="image">
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/students/browser_templates/imagedisplay.pt

    r7459 r11058  
    44  </td>
    55  <td>
    6       <img height="125px" tal:attributes="src viewlet/download_name" />
     6      <img height="125px"
     7         tal:attributes="src python: view.url(context, viewlet.download_name)" />
    78      <br />
    89  </td>
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/students/browser_templates/imageupload.pt

    r11013 r11058  
    55  <td>
    66    <img align="middle" height="125px"
    7          tal:attributes="src viewlet/download_name" />
     7         tal:attributes="src python: view.url(context, viewlet.download_name)" />
    88    <input type="submit" tal:condition="viewlet/file_exists"
    99     tal:attributes="id python:('delete_%s' % viewlet.input_name);
  • main/waeup.kofa/branches/uli-diazo-themed/src/waeup/kofa/students/tests/test_browser.py

    r11028 r11058  
    613613        # There is a correct <img> link included
    614614        self.assertTrue(
    615             '<a target="image" href="birth_certificate">'
     615            'href="http://localhost/app/students/K1000000/birth_certificate"'
    616616            in self.browser.contents)
    617617        # Browsing the link shows a real image
     
    673673            name='upload_passportuploadmanage').click()
    674674        self.assertTrue(
    675             '<img align="middle" height="125px" src="passport.jpg" />'
     675            'src="http://localhost/app/students/K1000000/passport.jpg"'
    676676            in self.browser.contents)
    677677        # We remove the passport file again
     
    22682268            name='upload_passportuploadedit').click()
    22692269        self.assertTrue(
    2270             '<img align="middle" height="125px" src="passport.jpg" />'
     2270            'src="http://localhost/app/students/K1000000/passport.jpg"'
    22712271            in self.browser.contents)
    22722272        # Students can open admission letter
     
    23262326            name='upload_birthcertificateupload').click()
    23272327        self.assertTrue(
    2328             '<a target="image" href="birth_certificate">Birth Certificate Scan</a>'
     2328            'href="http://localhost/app/students/K1000000/birth_certificate"'
    23292329            in self.browser.contents)
    23302330        # Students can open clearance slip
Note: See TracChangeset for help on using the changeset viewer.