Changeset 3957
- Timestamp:
- 07/04/08 03:38:47 (2 months ago)
- Files:
-
- ticketboxmacro/0.10/TicketBox.py (modified) (5 diffs)
- ticketboxmacro/0.11/TicketBox.py (modified) (5 diffs)
- ticketboxmacro/0.9/TicketBox.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ticketboxmacro/0.10/TicketBox.py
r3423 r3957 19 19 [[TicketBox(\"Other Title\",#1,#2)]] ... likewise 20 20 [[TicketBox('%d tickets',#1,#2)]] ... embed ticket count in title 21 [[TicketBox({1}, nosort)]] ... display numbers without sort 21 22 }}} 22 23 … … 57 58 r"\[report:(?P<rptnum2>\d+)(?P<dv>\?.*)?\]", 58 59 r"(?P<width>\d+(pt|px|%))", 59 r"(?P<summary>summary)", 60 r"(?P<inline>inline)", 60 r"(?P<keyword>nosort|summary|inline)", 61 61 r"(?P<title1>'.*')", 62 62 r'(?P<title2>".*")'] … … 80 80 show_summary = False 81 81 inline = False 82 nosort = False 82 83 title = "Tickets" 83 84 args_re = re.compile("^(?:" + string.join(args_pat, "|") + ")$") … … 95 96 elif match.group('tktnum'): 96 97 items.append(int(match.group('tktnum'))) 97 elif match.group('summary'): 98 show_summary = True 99 elif match.group('inline'): 100 inline = True 98 elif match.group('keyword'): 99 kw = match.group('keyword').lower() 100 if kw == 'summary': 101 show_summary = True 102 elif kw == 'inline': 103 inline = True 104 elif kw == 'nosort': 105 nosort = True 101 106 elif match.group('rptnum') or match.group('rptnum2'): 102 107 num = match.group('rptnum') or match.group('rptnum2') … … 145 150 db.close() 146 151 items = uniq(items) 147 items.sort() 152 if not nosort: 153 items.sort() 148 154 html = '' 149 155 ticketboxmacro/0.11/TicketBox.py
r3822 r3957 19 19 [[TicketBox(\"Other Title\",#1,#2)]] ... likewise 20 20 [[TicketBox('%d tickets',#1,#2)]] ... embed ticket count in title 21 [[TicketBox({1}, nosort)]] ... display numbers without sort 21 22 }}} 22 23 … … 47 48 r"\[report:(?P<rptnum2>\d+)(?P<dv>\?.*)?\]", 48 49 r"(?P<width>\d+(pt|px|%))", 49 r"(?P<summary>summary)", 50 r"(?P<inline>inline)", 50 r"(?P<keyword>nosort|summary|inline)", 51 51 r"(?P<title1>'.*')", 52 52 r'(?P<title2>".*")'] … … 73 73 show_summary = False 74 74 inline = False 75 nosort = False 75 76 title = "Tickets" 76 77 args_re = re.compile("^(?:" + string.join(args_pat, "|") + ")$") … … 88 89 elif match.group('tktnum'): 89 90 items.append(int(match.group('tktnum'))) 90 elif match.group('summary'): 91 show_summary = True 92 elif match.group('inline'): 93 inline = True 91 elif match.group('keyword'): 92 kw = match.group('keyword').lower() 93 if kw == 'summary': 94 show_summary = True 95 elif kw == 'inline': 96 inline = True 97 elif kw == 'nosort': 98 nosort = True 94 99 elif match.group('rptnum') or match.group('rptnum2'): 95 100 num = match.group('rptnum') or match.group('rptnum2') … … 131 136 db.close() 132 137 items = uniq(items) 133 items.sort() 138 if not nosort: 139 items.sort() 134 140 html = '' 135 141 if show_summary: ticketboxmacro/0.9/TicketBox.py
r3423 r3957 19 19 [[TicketBox(\"Other Title\",#1,#2)]] ... likewise 20 20 [[TicketBox('%d tickets',#1,#2)]] ... embed ticket count in title 21 [[TicketBox({1}, nosort)]] ... display numbers without sort 21 22 }}} 22 23 … … 53 54 r"\[report:(?P<rptnum2>\d+)(?P<dv>\?.*)?\]", 54 55 r"(?P<width>\d+(pt|px|%))", 55 r"(?P<summary>summary)", 56 r"(?P<inline>inline)", 56 r"(?P<keyword>nosort|summary|inline)", 57 57 r"(?P<title1>'.*')", 58 58 r'(?P<title2>".*")'] … … 76 76 show_summary = False 77 77 inline = False 78 nosort = False 78 79 title = "Tickets" 79 80 args_re = re.compile("^(?:" + string.join(args_pat, "|") + ")$") … … 91 92 elif match.group('tktnum'): 92 93 items.append(int(match.group('tktnum'))) 93 elif match.group('summary'): 94 show_summary = True 95 elif match.group('inline'): 96 inline = True 94 elif match.group('keyword'): 95 kw = match.group('keyword').lower() 96 if kw == 'summary': 97 show_summary = True 98 elif kw == 'inline': 99 inline = True 100 elif kw == 'nosort': 101 nosort = True 97 102 elif match.group('rptnum') or match.group('rptnum2'): 98 103 num = match.group('rptnum') or match.group('rptnum2') … … 135 140 db.close() 136 141 items = uniq(items) 137 items.sort() 142 if not nosort: 143 items.sort() 138 144 html = '' 139 145
