Attachment 'LessHeader.py'

Download

   1 # -*- coding: iso-8859-1 -*-
   2 #||<tablestyle="width: 100%; background: #f39036;"> '''[[DisplayDate]]''' ||<style="font-size: 0.8em"> [[EditIcon]][[ReadMore]] ||
   3 #{u'tablestyle': u'"width: 100%; font-size: 0.8em;"', 'align': '"center"', 'rowspan': u'"7"', 'colspan': u'"4"'}
   4  
   5 """
   6     MoinMoin - ReadMore Macro
   7 """
   8 Dependencies = []
   9 
  10 def execute(macro, args):
  11     themedict = macro.request.themedict
  12     theme = macro.request.theme
  13     pagename = macro.request.themedict['q_page_name']
  14     display_date = pagename.split('/')[1]
  15     iconlink = theme.make_iconlink('edit', themedict ) + theme.make_iconlink('up', themedict ) + theme.make_iconlink('attachments', themedict ) + theme.make_iconlink('view', themedict )
  16     formatter = macro.request.formatter
  17     attrs = {u'tablestyle': u'"width: 100%; background: ' + args + u';', 'align': '"center"'}
  18     result = formatter.table(True, attrs)
  19     result += formatter.table_row(True)
  20     cell_attrs = {'align': '"center"'}
  21     result += formatter.table_cell(True, cell_attrs)
  22     result += formatter.strong(True)
  23     result += display_date
  24     result += formatter.strong(False)
  25     result += formatter.table_cell(False)
  26     result += formatter.table_cell(True)
  27     result += iconlink
  28     result += formatter.table_cell(False)
  29     result += formatter.table_row(False)
  30     result += formatter.table(False)
  31     return result

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2006-04-07 09:24:29, 24.9 KB) [[attachment:IMG_2408.sized.jpg]]
  • [get | view] (2006-06-05 09:11:43, 1.3 KB) [[attachment:LessHeader.py]]
  • [get | view] (2006-06-05 09:11:30, 1.3 KB) [[attachment:NinePages.py]]
  • [get | view] (2006-06-05 09:20:02, 74.4 KB) [[attachment:flower.jpg]]
  • [get | view] (2005-12-28 14:11:52, 32.1 KB) [[attachment:frankie_and_lok.jpg]]
  • [get | view] (2006-05-19 08:12:10, 15.6 KB) [[attachment:logo-sell-in-may3.jpg]]
  • [get | view] (2006-05-02 16:45:45, 11.9 KB) [[attachment:logo-stockcat.gif]]
  • [get | view] (2006-01-25 11:51:59, 1.2 KB) [[attachment:siteredirect.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.