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.You are not allowed to attach a file to this page.