home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Freeware / Miro 1.0 / Miro_Installer.exe / Miro_Downloader.exe / compiled_templates / channelfoldertab.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2007-11-12  |  4.1 KB  |  80 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.5)
  3.  
  4. from template import Handle, fillAttr, quoteAndFillAttr, fillStaticTemplate
  5. from StringIO import StringIO
  6. from xhtmltools import urlencode
  7. from templatehelper import quoteattr, escape
  8. from string import Template
  9. import app
  10. import views
  11. import sorts
  12. import indexes
  13. import filters
  14. import resources
  15. import gtcache
  16. _ = gtcache.gettext
  17.  
  18. def fillTemplate(domHandler, dtvPlatform, eventCookie, bodyTagExtra, *args, **kargs):
  19.     localvars = locals()
  20.     localvars.update(globals())
  21.     handle = Handle(domHandler, localvars, onUnlink = (lambda : None))
  22.     out = StringIO()
  23.     out.write(u'<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n')
  24.     out.write(u'<html xmlns:t="http://www.participatorypolitics.org/" xmlns:i18n="http://www.participatoryculture.org/i18n">\n<head>\n</head>\n<body')
  25.     out.write(u' ' + bodyTagExtra)
  26.     out.write(u'>\n\n<div dragdestdata="channelfolder-')
  27.     out.write(quoteattr(this.objID()))
  28.     out.write(u'" dragdesttype="channelfolder" class="tab-drop-target" drageffectchannelfolder="move">\n<div class="dnd-reorder-indicator circle"></div>\n<div class="dnd-reorder-indicator line"></div>\n<div dragdestdata="channelfolder-')
  29.     out.write(quoteattr(this.objID()))
  30.     out.write(u'" dragdesttype="channel" drageffectchannel="move" class="tab-container-drop-target">\n<div class="dnd-container-drop-indicator left"></div>\n<div class="dnd-container-drop-indicator mid"></div>\n<div class="dnd-container-drop-indicator right"></div>\n<a dragsourcetype="channelfolder" dragicon="channel-tnail-')
  31.     out.write(quoteattr(this.objID()))
  32.     out.write(u'" class="feeditem noselect draggable folder" dragsourcedata="tablist-')
  33.     out.write(quoteattr(this.objID()))
  34.     out.write(u'">\n')
  35.     if not this.obj.getExpanded():
  36.         out.write(u'<img src="')
  37.         out.write(quoteattr(resources.url(u'images/tab-arrow-up.png')))
  38.         out.write(u'" alt="expanded" onmousedown="return eventURL(\'action:toggleExpand?id=\' + ')
  39.         out.write(quoteattr(this.objID()))
  40.         out.write(u');" class="expanded-triangle"></img>')
  41.     
  42.     out.write(u'\n')
  43.     if not not this.obj.getExpanded():
  44.         out.write(u'<img src="')
  45.         out.write(quoteattr(resources.url(u'images/tab-arrow-down.png')))
  46.         out.write(u'" alt="unexpanded" class="expanded-triangle" onmousedown="return eventURL(\'action:toggleExpand?id=\' + ')
  47.         out.write(quoteattr(this.objID()))
  48.         out.write(u');"></img>')
  49.     
  50.     out.write(u'\n')
  51.     if not not this.obj.showA():
  52.         out.write(u'<div class="left-bubble blue ')
  53.         if not this.obj.showU() or 'second':
  54.             pass
  55.         out.write(quoteattr(''))
  56.         out.write(u'">\n <div class="right-bubble blue">\n  <div class="number-count blue">')
  57.         out.write(escape(this.obj.numAvailable()))
  58.         out.write(u'</div>\n </div>\n</div>')
  59.     
  60.     out.write(u'\n')
  61.     if not not this.obj.showU():
  62.         out.write(u'<div class="left-bubble green">\n <div class="right-bubble green">\n  <div class="number-count green">')
  63.         out.write(escape(this.obj.numUnwatched()))
  64.         out.write(u'</div>\n </div>\n <div href="#" class="new-video-play-button" onclick="return playNewVideos(event, ')
  65.         out.write(quoteattr(this.objID()))
  66.         out.write(u');">\n     <img src="')
  67.         out.write(quoteattr(resources.url(u'images/play.png')))
  68.         out.write(u'"></img>\n </div>\n</div>')
  69.     
  70.     out.write(u'\n<img src="')
  71.     out.write(quoteattr(resources.url(u'images/folder-icon-tablist.png')))
  72.     out.write(u'" id="channel-tnail-')
  73.     out.write(quoteattr(this.objID()))
  74.     out.write(u'" class="icon"></img><div class="name">')
  75.     out.write(escape(this.obj.getTitle()))
  76.     out.write(u'</div>\n</a>\n</div>\n</div>\n</body>\n</html>')
  77.     out.seek(0)
  78.     return (out, handle)
  79.  
  80.