Changeset 9341
- Timestamp:
- Oct 22, 2010, 9:36:50 AM (13 years ago)
- Location:
- fullblogplugin/0.11/tracfullblog
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
fullblogplugin/0.11/tracfullblog/macros.py
r3131 r9341 35 35 * `format=` - type of display (see below for details) 36 36 * `max_size=` - max. number of characters to render for each post 37 * `meta=` - use `=off` to hide date, author and categories (default 'on') 37 38 38 39 Example showing some available named arguments: … … 72 73 heading = args_dict.get('heading', '') 73 74 max_size = int(args_dict.get('max_size', 0)) 75 show_meta = args_dict.get('meta', '') != 'off' and True or False 74 76 75 77 # Get blog posts … … 99 101 data = {'heading': heading, 100 102 'posts': post_list, 103 'show_meta': show_meta, 101 104 'execute_blog_macro': True} 102 105 return Chrome(self.env).render_template(formatter.req, … … 105 108 elif format == 'full': 106 109 return self._render_full_format(formatter, post_list, 107 post_instances, heading, max_size)110 post_instances, heading, max_size, show_meta) 108 111 109 112 elif format == 'float': 110 113 # Essentially a 'full' list - just wrapped inside a new div 111 114 return tag.div(self._render_full_format(formatter, post_list, 112 post_instances, heading, max_size),115 post_instances, heading, max_size, show_meta), 113 116 class_="blogflash") 114 117 … … 117 120 118 121 def _render_full_format(self, formatter, post_list, post_instances, heading, 119 max_size ):122 max_size, metadata): 120 123 """ Renters full blog posts. """ 121 124 out = tag.div(class_="blog") … … 124 127 data = {'post': post, 125 128 'list_mode': True, 129 'show_meta': show_meta, 126 130 'execute_blog_macro': True} 127 131 if max_size: -
fullblogplugin/0.11/tracfullblog/templates/fullblog_macro_monthlist.html
r7225 r9341 8 8 <li py:for="name, version, time, author, title, body, categories in posts"> 9 9 <a href="${req.href.blog(name)}">${title}</a> 10 <span class="metainfo" >10 <span class="metainfo" py:if="not defined('show_meta') and True or show_meta"> 11 11 -- Posted on ${format_datetime(time, '%Y-%m-%d %H:%M')} 12 12 <py:if test="not blog_personal_blog"> -
fullblogplugin/0.11/tracfullblog/templates/fullblog_macro_post.html
r7225 r9341 12 12 <p py:if="do_shorten"><a href="${href.blog(post.name)}">(Read more)</a></p> 13 13 </div> 14 <ul class="metainfo" >14 <ul class="metainfo" py:if="not defined('show_meta') and True or show_meta"> 15 15 <li class="metadates">Posted: ${format_datetime(post.publish_time, '%Y-%m-%d %H:%M')} 16 16 <span class="metaupdated" py:if="len(post.versions) > 1">
Note: See TracChangeset
for help on using the changeset viewer.