Changeset 334


Ignore:
Timestamp:
07/03/09 16:20:53 (5 years ago)
Author:
brent
Message:

Fixed image full screen view and back link.

Location:
enpraxis.staticsite/trunk/enpraxis/staticsite
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • enpraxis.staticsite/trunk/enpraxis/staticsite/profiles/default/propertiestool.xml

    r331 r334  
    7676    </property> 
    7777    <property name="views_to_add" type="lines"> 
     78      <element value="view" /> 
     79      <element value="image_fullscreen_view" /> 
    7880      <element value="accessibility-info" /> 
    7981      <element value="sitemap" /> 
  • enpraxis.staticsite/trunk/enpraxis/staticsite/utilities/staticsiteutility.py

    r333 r334  
    135135            print 'vvv '+  aurl 
    136136            self.processDocument(url + '/view', portal, dpath, ssprops, alturl=aurl) 
     137            if ctype in ['Image']: 
     138                aurl = urlparse(url) 
     139                aurl = urlunparse((aurl[0], aurl[1], aurl[2] + '-image_view_fullscreen.html', aurl[3], aurl[4], aurl[5])) 
     140                print 'iii '+  aurl 
     141                self.processDocument(url + '/image_view_fullscreen', portal, dpath, ssprops, alturl=aurl) 
     142 
    137143 
    138144    def _getDeploymentPath(self, sp): 
     
    254260        self.filterDocActionImages(soup, portal.portal_url(), current) 
    255261        self.filterCSSLinks(soup, current) 
    256         self.filterJSLinks(soup, current)                 
     262        self.filterJSLinks(soup, current) 
     263        self.filterImageFullscreenBackLink(soup, current) 
    257264        links = self.getDocumentLinks(soup) 
    258265        for x in links: 
     
    339346                    links.append(tag) 
    340347        return links 
     348 
     349    def filterImageFullscreenBackLink(self, soup, current): 
     350        if 'image_view_fullscreen' in current: 
     351            back = soup.find('a') 
     352            if back: 
     353                lt = back.find('span') 
     354                if lt: 
     355                    lt.contents[0].replaceWith('Back to Image') 
     356                if back.has_key('href'): 
     357                    back['href'] = current.replace('image_view_fullscreen.html', 'view.html') 
    341358 
    342359    def filterDocumentLink(self, link, current, portal, views): 
Note: See TracChangeset for help on using the changeset viewer.