Changeset 2392
- Timestamp:
- 07/05/07 17:22:21 (1 year ago)
- Files:
-
- worklogplugin/0.10/worklog/manager.py (added)
- worklogplugin/0.10/worklog/templates/webadminui.cs (modified) (2 diffs)
- worklogplugin/0.10/worklog/uihooks_ticket.py (modified) (2 diffs)
- worklogplugin/0.10/worklog/webadminui.py (modified) (1 diff)
- worklogplugin/0.10/worklog/webui.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
worklogplugin/0.10/worklog/templates/webadminui.cs
r2380 r2392 4 4 <fieldset> 5 5 <legend>Options:</legend> 6 <p style="font-weight: bold"> 7 NONE of these options currently work as intended and they should all be disabled.<br> 8 If they are enabled they will change how things operate in which will break several logical things and leave you 9 with a potentially very confused database.<br> 10 Implementations will come in time, please be patient! 11 </p> 6 12 <div class="field"> 7 13 <input type="checkbox" id="timingandestimation" name="timingandestimation" value="1" <?cs var:settings.timingandestimation ?>> … … 17 23 </div> 18 24 <div class="field"> 19 <input type="checkbox" id="autoaccept" name="autoaccept" value="1" <?cs var:settings.autoaccept ?>> 20 <label for="autoaccept">Change state to 'Accepted' automatically when starting work?</label> 25 <input type="checkbox" id="autoreassignaccept" name="autoreassignaccept" value="1" <?cs var:settings.autoreassignaccept ?>> 26 <label for="autoreassignaccept">Automatically reassign and accept (if necessary) when starting work?</label> 27 </div> 28 <div class="field"> 29 <input type="checkbox" id="autostopstart" name="autostopstart" value="1" <?cs var:settings.autostop ?>> 30 <label for="autostopstart">Allow users to start working on a different ticket (i.e. automatically stop working on current ticket)?</label> 21 31 </div> 22 32 </fieldset> worklogplugin/0.10/worklog/uihooks_ticket.py
r2380 r2392 19 19 20 20 if re.search('ticket', req.path_info): 21 return "ticket-addon"21 return 'ticket-worklog-addon' 22 22 else: 23 return ""23 return '' 24 24 25 25 … … 80 80 if not task or not task['endtime'] == 0: 81 81 # Display a "Work on Link" button. 82 yield 'mainnav', "ticket-addon", self.get_javascript(req, ticket, 0)82 yield 'mainnav', 'ticket-worklog-addon', self.get_javascript(req, ticket, 0) 83 83 return 84 84 85 85 # We are working on SOMETHING, but not this ticket... 86 86 if task and task['ticket'] == ticket: 87 yield 'mainnav', "ticket-addon", self.get_javascript(req, ticket, 1)87 yield 'mainnav', 'ticket-worklog-addon', self.get_javascript(req, ticket, 1) worklogplugin/0.10/worklog/webadminui.py
r2380 r2392 24 24 25 25 bools = [ "timingandestimation", "comment", 26 "autostop", "auto accept" ]26 "autostop", "autostopstart", "autoreassignaccept" ] 27 27 28 28 if req.method == 'POST' and req.args.has_key('update'): worklogplugin/0.10/worklog/webui.py
r2380 r2392 5 5 from datetime import tzinfo, timedelta, datetime 6 6 from usermanual import * 7 from manager import WorkLogManager 7 8 from trac.log import logger_factory 8 9 from trac.core import * … … 96 97 tckt_link = Markup('<a href="%s" title="%s">%s</a>' % \ 97 98 (req.href.ticket(ticket), tckt['summary'], "#" + ticket)) 98 tckt_link = Markup('#' + ticket)99 tckt_link = '#' + ticket 99 100 100 task = get_latest_task(self.env.get_db_cnx(), authname) 101 if task and task['endtime'] == 0: 102 addMessage("You cannot work on ticket " + tckt_link + " as you seem to already be working on another ticket.") 103 return 104 105 if not authname == tckt['owner']: 106 addMessage("You cannot work on ticket " + tckt_link + " as you are not the owner.") 107 return 108 109 if "closed" == tckt['status']: 110 addMessage("You cannot work on ticket " + tckt_link + " as it is currently in a closed state.") 101 mgr = WorkLogManager(self.env, self.config, req.authname) 102 if not mgr.can_work_on(ticket): 103 addMessage(mgr.get_explanation()) 111 104 return 112 105
