<p><a href="tasks?tasks_new=1">Commission a new feature/update</a> • <a href="tasks?tasks_new_bug=1">Report a problem</a><!-- • <a href="pay">Pay Jason</a>--></p>
<!--~needs_attention start~-->
- <div class="task_list needs_attention">
- <h3 class="left">Tasks needing your attention:</h3>
+ <h3>Tasks needing your attention:</h3>
<!--~needs_attention_row start~-->
<div><a href="tasks?tasks_edit_id=~task_id~">Task #~task_id~: ~task_title.html~</a> (~task_state~)</div>
<!--~end~-->
<!--~end~-->
<!--~queue start~-->
- <div class="task_list queue">
<h3>Prioritized queue</h3>
<p>Use the arrows on the left to change the order.</p>
<!--~queue_row start~-->
- <div><a href="tasks?id=~task_id~">Task #~task_id~: ~task_title.html~</a> (~task_price.money~)</div>
+ <div><a href="tasks?tasks_id=~task_id~">Task #~task_id~: ~task_title.html~</a> (~task_price.money~)</div>
<!--~end~-->
<!--~end~-->
<!--~jason start~-->
- <div class="task_list jason_working">
<h3>Tasks waiting for Jason:</h3>
<!--~jason_row start~-->
- <div><a href="tasks?id=~task_id~">Task #~task_id~: ~task_title.html~</a> (~task_state~)</div>
+ <div><a href="tasks?tasks_id=~task_id~">Task #~task_id~: ~task_title.html~</a> (~task_state~)</div>
<!--~end~-->
<!--~end~-->
<!--~jason_working start~-->
- <div class="task_list jason_working">
<h3>Jason is currently working on:</h3>
<!--~jason_working_row start~-->
- <div><a href="tasks?id=~task_id~">Task #~task_id~: ~task_title.html~</a> (~task_price.money~)</div>
+ <div><a href="tasks?tasks_id=~task_id~">Task #~task_id~: ~task_title.html~</a> (~task_price.money~)</div>
<!--~end~-->
<!--~end~-->
<!--~finished_unpaid start~-->
- <div class="task_list finished_unpaid">
<h3>Finished tasks (unpaid)</h3>
<!--~finished_unpaid_row start~-->
- <div><a href="tasks?id=~task_id~">Task #~task_id~: ~task_title.html~</a> (~task_price.money~)</div>
+ <div><a href="tasks?tasks_id=~task_id~">Task #~task_id~: ~task_title.html~</a> (~task_price.money~)</div>
<!--~end~-->
<div>Total: ~task_total.money~</div>
<!--~end~-->
<!--~finished_paid start~-->
- <div class="task_list finished_paid">
<h3>Finished and paid for</h3>
<!--~finished_paid_row start~-->
- <div><a href="tasks?id=~task_id~">Task #~task_id~: ~task_title.html~</div>
+ <div><a href="tasks?tasks_id=~task_id~">Task #~task_id~: ~task_title.html~</div>
<!--~end~-->
<!--~finished_paid_and_more start~-->
<div>...</div>
function _index_main() {
task_summary('needs_attention', 'where state=' . TASK_DRAFT . ' || state=' . TASK_NEEDS_CLARIFICATION . ' || state=' . TASK_NEEDS_GO_AHEAD . ' || state=' . TASK_NEEDS_TESTING . ' order by id');
- task_summary('queue', 'where state=' . TASK_QUEUED . ' || state='. TASK_BUG . ' order by ord');
+ task_summary('queue', 'where state=' . TASK_QUEUED . ' order by ord');
task_summary('jason', 'where state=' . TASK_NEEDS_QUOTE . ' || state=' . TASK_WORKING . ' || state=' . TASK_BUG . ' order by id desc');
#task_summary('jason_pricing', 'where state=' . TASK_NEEDS_QUOTE . ' order by id desc');
#task_summary('jason_working', 'where state=' . TASK_WORKING . ' order by id desc');
<!--~main_body start~-->
<!--~form start~-->
- <h2><!--~new_msg start~-->Add a new entry<!--~end~--><!--~edit_msg start~-->Edit entry "~client_id.html~"<!--~end~--></h2>
+ <h3><!--~new_msg start~-->Add a new task<!--~end~--><!--~edit_msg start~-->Edit task #~tasks_edit_id~ "~title.html~"<!--~end~--></h3>
<form action="tasks" method="post"><!--~editing start~--><input type="hidden" name="tasks_edit_id" value="~tasks_edit_id.attr~" /><!--~end~-->
<table cellspacing="0" cellpadding="4" border="0" summary="">
<tr><td class="caption">Url: </td><td class="field"><input type="text" name="url" value="~url.attr~" /></td></tr>
<tr><td class="caption">Description: </td><td class="field"><textarea rows="9" cols="22" name="description">~description.html~</textarea></td></tr>
-
- <tr><td class="submit_row" colspan="2"><input type="submit" name="save" value="Save" /></td></tr>
+<!--~normal_submits start~-->
+ <tr><td class="submit_row" colspan="2"><input type="submit" name="save" value="Save and Request Price" /></td></tr>
+ <tr><td class="submit_row" colspan="2"><input type="submit" name="save_draft" value="Save Draft" /></td></tr>
+<!--~end~-->
+<!--~bug_submit start~-->
+ <tr><td class="submit_row" colspan="2"><input type="submit" name="save_bug" value="Send Problem Report" /></td></tr>
+<!--~end~-->
</table>
</form>
<!--~end~-->
tem_show('editing');
}
+ if(isset($_REQUEST['tasks_new_bug'])) {
+ tem_show('bug_submit');
+ } else {
+ tem_show('normal_submits');
+ }
+
$delete_id = format_int($_REQUEST['tasks_delete_id']);
unset($_REQUEST['tasks_delete_id']);
if($delete_id) {
if(isset($_REQUEST['title'])) {
list($title, $url, $description) = tasks_get_fields();
+ # FIXME
+ if(isset($_REQUEST['save_draft'])) {
+ $state = TASK_DRAFT;
+ } elseif(isset($_REQUEST['save_bug'])) {
+ $state = TASK_BUG;
+ } else {
+ $state = TASK_NEEDS_QUOTE;
+ }
+
if("you're happy with the POSTed values") {
if($edit_id) {
- db_update('tasks', 'title,url,description,state', $title, $url, $description, $state, $paid = 0, 'where id=%i', $edit_id);
+ db_update('tasks', 'title,url,description,state', $title, $url, $description, $state, 'where id=%i', $edit_id);
message('Task updated.');
} else {
# new task
$paid = 0;
- if(isset($_REQUEST['save_draft'])) {
- $state = TASK_DRAFT;
- } else {
- $state = TASK_NEEDS_QUOTE;
- }
$client_id = 4; # FIXME
db_insert('tasks', 'client_id,title,url,description,state,paid', $client_id, $title, $url, $description, $state, $paid);
message('Task saved.');
- return './';
}
if($GLOBALS['tasks_form_recipient'] != "fixme@example.com") {
$to = $GLOBALS['tasks_form_recipient'];
}
}
if($error !== true) {
- tem_show('thankyou');
- return;
+ return './';
}
}
# otherwise, we display the form again. tasks_get_fields() has