diff --git a/include/staff/task-view.inc.php b/include/staff/task-view.inc.php
new file mode 100644
index 0000000000000000000000000000000000000000..a6b140481ad83effa08d99218803327a19c814e4
--- /dev/null
+++ b/include/staff/task-view.inc.php
@@ -0,0 +1,5 @@
+<div id="task_content">
+<?php
+require STAFFINC_DIR.'templates/task-view.tmpl.php';
+?>
+</div>
diff --git a/include/staff/tasks.inc.php b/include/staff/tasks.inc.php
index 665008c548d7b78762e371212f69fc2c3db07fdc..cd07dfa21bbd3edb44012f34cba80a06ecc9dd37 100644
--- a/include/staff/tasks.inc.php
+++ b/include/staff/tasks.inc.php
@@ -37,25 +37,12 @@ case 'search':
     // Consider basic search
     if ($_REQUEST['query']) {
         $results_type=__('Search Results');
-        // Use an index if possible
-        if (Validator::is_email($_REQUEST['query'])) {
-            $tickets = $tickets->filter(array(
-                'user__emails__address' => $_REQUEST['query'],
-            ));
-        }
-        else {
-            $tickets = $tickets->filter(Q::any(array(
-                'number__startswith' => $_REQUEST['query'],
-                'user__emails__address__contains' => $_REQUEST['query'],
-            )));
-        }
+        $tasks = $tasks->filter(Q::any(array(
+            'number__startswith' => $_REQUEST['query'],
+            'cdata__title__contains' => $_REQUEST['query'],
+        )));
         break;
-    }
-    elseif (isset($_GET['uid'])) {
-        // Apply user filter
-        $tickets->filter(array('user__id'=>$_GET['uid']));
-    }
-    elseif (isset($_SESSION['advsearch'])) {
+    } elseif (isset($_SESSION['advsearch'])) {
         // XXX: De-duplicate and simplify this code
         $form = $search->getFormFromSession('advsearch');
         $form->loadState($_SESSION['advsearch']);
@@ -222,44 +209,9 @@ if ($thisstaff->hasPerm(Task::PERM_DELETE)) {
 <?php } ?>
             </select>
             </span>
-            <?php
-            if ($thisstaff->canManageTickets()) {
-                echo TicketStatus::status_options();
-            }
-            if ($actions) { ?>
-            <span
-                class="action-button"
-                data-dropdown="#action-dropdown-moreoptions">
-                <i class="icon-caret-down pull-right"></i>
-                <a class="tasks-action"
-                    href="#moreoptions"><i
-                    class="icon-reorder"></i> <?php
-                    echo __('Options'); ?></a>
-            </span>
-            <div id="action-dropdown-moreoptions"
-                class="action-dropdown anchor-right">
-                <ul>
-            <?php foreach ($actions as $a => $action) { ?>
-                    <li>
-                        <a class="no-pjax tasks-action"
-                            <?php
-                            if ($action['dialog'])
-                                echo sprintf("data-dialog='%s'", $action['dialog']);
-                            if ($action['redirect'])
-                                echo sprintf("data-redirect='%s'", $action['redirect']);
-                            ?>
-                            href="<?php
-                            echo sprintf('#tasks/mass/%s', $a); ?>"
-                            ><i class="icon-fixed-width <?php
-                            echo $action['icon'] ?: 'icon-tag'; ?>"></i> <?php
-                            echo $action['action']; ?></a>
-                    </li>
-                <?php
-                } ?>
-                </ul>
-            </div>
-            <?php
-           } ?>
+           <?php
+            Task::getAgentActions($thisstaff, array('status' => $status));
+            ?>
         </div>
 </div>
 <div class="clear" style="margin-bottom:10px;"></div>
@@ -291,7 +243,7 @@ if ($thisstaff->hasPerm(Task::PERM_DELETE)) {
         <?php
         // Setup Subject field for display
         $total=0;
-        $title_field = TaskForm::objects()->one()->getField('title');
+        $title_field = TaskForm::getInstance()->getField('title');
         $ids=($errors && $_POST['tids'] && is_array($_POST['tids']))?$_POST['tids']:null;
         foreach ($tasks as $T) {
             $T['isopen'] = ($T['flags'] & TaskModel::ISOPEN != 0); //XXX:
@@ -429,5 +381,22 @@ $(function() {
         }
         return false;
     });
+    $(document).off('.task-action');
+    $(document).on('click.task-action', 'a.task-action', function(e) {
+        e.preventDefault();
+        var url = 'ajax.php/'
+        +$(this).attr('href').substr(1)
+        +'?_uid='+new Date().getTime();
+        var $options = $(this).data('dialog');
+        var $redirect = $(this).data('redirect');
+        $.dialog(url, [201], function (xhr) {
+            if ($redirect)
+                window.location.href = $redirect;
+            else
+                $.pjax.reload('#pjax-container');
+        }, $options);
+
+        return false;
+    });
 });
 </script>
diff --git a/include/staff/templates/task-view.tmpl.php b/include/staff/templates/task-view.tmpl.php
index 8369a396b0a763d31cb8ed199910faa8fa3fe20e..7cd928b8a15e05921fe7e612fffd2e477fde94a2 100644
--- a/include/staff/templates/task-view.tmpl.php
+++ b/include/staff/templates/task-view.tmpl.php
@@ -4,13 +4,51 @@ if (!defined('OSTSCPINC')
     || !($role = $thisstaff->getRole($task->getDeptId())))
     die('Invalid path');
 
-$more = array();
+$actions = array();
+
+$actions += array(
+        'print' => array(
+            'href' => sprintf('tasks.php?id=%d&a=print', $task->getId()),
+            'class' => 'none',
+            'icon' => 'icon-print',
+            'label' => __('Print')
+        ));
+
+if ($role->hasPerm(Task::PERM_EDIT)) {
+    $actions += array(
+            'edit' => array(
+                'href' => sprintf('#tasks/%d/edit', $task->getId()),
+                'icon' => 'icon-edit',
+                'dialog' => '{"size":"large"}',
+                'label' => __('Edit')
+            ));
+}
+
+if ($role->hasPerm(Task::PERM_ASSIGN)) {
+    $actions += array(
+            'assign' => array(
+                'href' => sprintf('#tasks/%d/assign', $task->getId()),
+                'icon' => 'icon-user',
+                'label' => $task->isAssigned() ? __('Reassign') : __('Assign')
+            ));
+}
+
+if ($role->hasPerm(Task::PERM_TRANSFER)) {
+    $actions += array(
+            'transfer' => array(
+                'href' => sprintf('#tasks/%d/transfer', $task->getId()),
+                'icon' => 'icon-share',
+                'label' => __('Transfer')
+            ));
+}
+
+
 if ($role->hasPerm(Task::PERM_DELETE)) {
-    $more += array(
+    $actions += array(
             'delete' => array(
+                'href' => sprintf('#tasks/%d/delete', $task->getId()),
                 'icon' => 'icon-trash',
-                'redirect' => 'tasks.php',
-                'action' => __('Delete Task')
+                'label' => __('Delete')
             ));
 }
 
@@ -24,240 +62,198 @@ if ($task->isOverdue())
 <table width="940" cellpadding="2" cellspacing="0" border="0">
     <tr>
         <td width="20%" class="has_bottom_border">
-            <h2><a href="tasks.php?id=<?php echo $task->getId(); ?>"><i class="icon-refresh"></i> <?php
+            <h2><a
+                id="reload-task"
+                href="tasks.php?id=<?php echo $task->getId(); ?>"
+                <?php
+                if ($ticket) {
+                    echo ' class="preview" ';
+                    echo sprintf('data-preview="#tasks/%d/preview" ', $task->getId());
+                    echo sprintf('href="#tasks/%d" ', $task->getId());
+                } else { ?>
+                    href="tasks.php?id=<?php echo $task->getId(); ?>"
+                <?php
+                } ?>
+                ><i class="icon-refresh"></i> <?php
                 echo sprintf(__('Task #%s'), $task->getNumber()); ?></a>
             </h2>
         </td>
         <td width="auto" class="flush-right has_bottom_border">
-            <a class="action-button"
-                href="tasks.php?id=<?php echo $task->getId(); ?>&a=print"><i class="icon-print"></i> <?php
-                echo __('Print'); ?></a>
             <?php
-            if ($role->hasPerm(Task::PERM_EDIT)) { ?>
-                <a class="action-button task-action"
-                    href="tasks.php?id=<?php echo $task->getId(); ?>&a=edit"><i class="icon-edit"></i> <?php
-                    echo __('Edit'); ?></a>
-            <?php
-            }
-            if ($role->hasPerm(Task::PERM_ASSIGN)) { ?>
-                <a class="action-button task-action"
-                    href="#tasks/<?php echo $task->getId(); ?>/assign"><i
-                    class="icon-user"></i> <?php
-                    echo $task->isAssigned() ? __('Reassign') : __('Assign');
-                ?></a>
-            <?php
-            }
-            if ($role->hasPerm(Task::PERM_TRANSFER)) { ?>
-                <a class="action-button task-action"
-                    href="#tasks/<?php echo $task->getId(); ?>/transfer"><i
-                    class="icon-share"></i> <?php
-                    echo __('Transfer');
-                ?></a>
-            <?php
-            }
-            if ($more) { ?>
+            if ($ticket) { ?>
             <span
                 class="action-button"
-                data-dropdown="#action-dropdown-moreoptions">
+                data-dropdown="#action-dropdown-task-options">
                 <i class="icon-caret-down pull-right"></i>
                 <a class="task-action"
-                    href="#moreoptions"><i
+                    href="#task-options"><i
                     class="icon-reorder"></i> <?php
-                    echo __('More'); ?></a>
+                    echo __('Options'); ?></a>
             </span>
-            <div id="action-dropdown-moreoptions"
+            <div id="action-dropdown-task-options"
                 class="action-dropdown anchor-right">
                 <ul>
-            <?php foreach ($more as $a => $action) { ?>
+            <?php foreach ($actions as $a => $action) { ?>
                     <li>
-                        <a class="no-pjax task-action"
+                        <a class="no-pjax <?php
+                            echo $action['class'] ?: 'task-action'; ?>"
                             <?php
                             if ($action['dialog'])
                                 echo sprintf("data-dialog='%s'", $action['dialog']);
                             if ($action['redirect'])
                                 echo sprintf("data-redirect='%s'", $action['redirect']);
                             ?>
-                            href="<?php
-                            echo sprintf('#tasks/%d/%s', $task->getId(), $a); ?>"
+                            href="<?php echo $action['href']; ?>"
                             ><i class="<?php
                             echo $action['icon'] ?: 'icon-tag'; ?>"></i> <?php
-                            echo $action['action']; ?></a>
+                            echo  $action['label']; ?></a>
                     </li>
                 <?php
                 } ?>
                 </ul>
             </div>
             <?php
-           } ?>
-        </td>
-    </tr>
-</table>
-<table class="ticket_info" cellspacing="0" cellpadding="0" width="940" border="0">
-    <tr>
-        <td width="50%">
-            <table border="0" cellspacing="" cellpadding="4" width="100%">
-                <tr>
-                    <th width="100"><?php echo __('Status');?>:</th>
-                    <td><?php echo $task->getStatus(); ?></td>
-                </tr>
-                <tr>
-                    <th><?php echo __('Department');?>:</th>
-                    <td><?php echo Format::htmlchars($task->dept->getName()); ?></td>
-                </tr>
-                <?php
-                if ($task->isOpen()) { ?>
-                <tr>
-                    <th width="100"><?php echo __('Assigned To');?>:</th>
-                    <td>
-                        <?php
-                        if ($assigned=$task->getAssigned())
-                            echo Format::htmlchars($assigned);
-                        else
-                            echo '<span class="faded">&mdash; '.__('Unassigned').' &mdash;</span>';
-                        ?>
-                    </td>
-                </tr>
-                <?php
-                } else { ?>
-                <tr>
-                    <th width="100"><?php echo __('Closed By');?>:</th>
-                    <td>
-                        <?php
-                        if (0 && ($staff = $task->getStaff()))
-                            echo Format::htmlchars($staff->getName());
-                        else
-                            echo '<span class="faded">&mdash; '.__('Unknown').' &mdash;</span>';
-                        ?>
-                    </td>
-                </tr>
-                <?php
-                } ?>
-            </table>
-        </td>
-        <td width="50%" style="vertical-align:top">
-            <table cellspacing="0" cellpadding="4" width="100%" border="0">
-                <tr>
-                    <th><?php echo __('SLA Plan');?>:</th>
-                    <td><?php echo $sla?Format::htmlchars($sla->getName()):'<span class="faded">&mdash; '.__('None').' &mdash;</span>'; ?></td>
-                </tr>
-                <tr>
-                    <th><?php echo __('Create Date');?>:</th>
-                    <td><?php echo Format::datetime($task->getCreateDate()); ?></td>
-                </tr>
-                <?php
-                if($task->isOpen()){ ?>
-                <tr>
-                    <th><?php echo __('Due Date');?>:</th>
-                    <td><?php echo $task->duedate ?
-                    Format::datetime($task->duedate) : '<span
-                    class="faded">&mdash; '.__('None').' &mdash;</span>'; ?></td>
-                </tr>
-                <?php
-                }else { ?>
-                <tr>
-                    <th><?php echo __('Close Date');?>:</th>
-                    <td><?php echo 0 ?
-                    Format::datetime($task->getCloseDate()) : ''; ?></td>
-                </tr>
-                <?php
+           } else {
+                foreach ($actions as $action) {?>
+                <a class="action-button <?php
+                    echo $action['class'] ?: 'task-action'; ?>"
+                    <?php
+                    if ($action['dialog'])
+                        echo sprintf("data-dialog='%s'", $action['dialog']);
+                    ?>
+                    href="<?php echo $action['href']; ?>"><i
+                    class="<?php
+                    echo $action['icon'] ?: 'icon-tag'; ?>"></i> <?php
+                    echo $action['label'];
+                ?></a>
+           <?php
                 }
-                ?>
-            </table>
+           } ?>
         </td>
     </tr>
 </table>
-<br>
-<br>
-<table class="ticket_info" cellspacing="0" cellpadding="0" width="940" border="0">
+
 <?php
-$idx = 0;
-foreach (DynamicFormEntry::forObject($task->getId(),
-            ObjectModel::OBJECT_TYPE_TASK) as $form) {
-    $answers = array_filter($form->getAnswers(), function ($a) {
-            return $a->getField()->isStorable();
-        });
-    if (count($answers) == 0)
-        continue;
-    ?>
+if (!$ticket) { ?>
+    <table class="ticket_info" cellspacing="0" cellpadding="0" width="940" border="0">
         <tr>
-        <td colspan="2">
-            <table cellspacing="0" cellpadding="4" width="100%" border="0">
-            <?php foreach($answers as $a) {
-                if (!($v = $a->display())) continue; ?>
-                <tr>
-                    <th width="100"><?php
-                        echo $a->getField()->get('label');
-                    ?>:</th>
-                    <td><?php
-                        echo $v;
-                    ?></td>
-                </tr>
-                <?php
-            } ?>
-            </table>
-        </td>
+            <td width="50%">
+                <table border="0" cellspacing="" cellpadding="4" width="100%">
+                    <tr>
+                        <th width="100"><?php echo __('Status');?>:</th>
+                        <td><?php echo $task->getStatus(); ?></td>
+                    </tr>
+                    <tr>
+                        <th><?php echo __('Department');?>:</th>
+                        <td><?php echo Format::htmlchars($task->dept->getName()); ?></td>
+                    </tr>
+                    <?php
+                    if ($task->isOpen()) { ?>
+                    <tr>
+                        <th width="100"><?php echo __('Assigned To');?>:</th>
+                        <td>
+                            <?php
+                            if ($assigned=$task->getAssigned())
+                                echo Format::htmlchars($assigned);
+                            else
+                                echo '<span class="faded">&mdash; '.__('Unassigned').' &mdash;</span>';
+                            ?>
+                        </td>
+                    </tr>
+                    <?php
+                    } else { ?>
+                    <tr>
+                        <th width="100"><?php echo __('Closed By');?>:</th>
+                        <td>
+                            <?php
+                            if (0 && ($staff = $task->getStaff()))
+                                echo Format::htmlchars($staff->getName());
+                            else
+                                echo '<span class="faded">&mdash; '.__('Unknown').' &mdash;</span>';
+                            ?>
+                        </td>
+                    </tr>
+                    <?php
+                    } ?>
+                </table>
+            </td>
+            <td width="50%" style="vertical-align:top">
+                <table cellspacing="0" cellpadding="4" width="100%" border="0">
+                    <tr>
+                        <th><?php echo __('SLA Plan');?>:</th>
+                        <td><?php echo $sla?Format::htmlchars($sla->getName()):'<span class="faded">&mdash; '.__('None').' &mdash;</span>'; ?></td>
+                    </tr>
+                    <tr>
+                        <th><?php echo __('Create Date');?>:</th>
+                        <td><?php echo Format::datetime($task->getCreateDate()); ?></td>
+                    </tr>
+                    <?php
+                    if($task->isOpen()){ ?>
+                    <tr>
+                        <th><?php echo __('Due Date');?>:</th>
+                        <td><?php echo $task->duedate ?
+                        Format::datetime($task->duedate) : '<span
+                        class="faded">&mdash; '.__('None').' &mdash;</span>'; ?></td>
+                    </tr>
+                    <?php
+                    }else { ?>
+                    <tr>
+                        <th><?php echo __('Close Date');?>:</th>
+                        <td><?php echo 0 ?
+                        Format::datetime($task->getCloseDate()) : ''; ?></td>
+                    </tr>
+                    <?php
+                    }
+                    ?>
+                </table>
+            </td>
         </tr>
+    </table>
+    <br>
+    <br>
+    <table class="ticket_info" cellspacing="0" cellpadding="0" width="940" border="0">
     <?php
-    $idx++;
+    $idx = 0;
+    foreach (DynamicFormEntry::forObject($task->getId(),
+                ObjectModel::OBJECT_TYPE_TASK) as $form) {
+        $answers = $form->getAnswers()->exclude(Q::any(array(
+            'field__flags__hasbit' => DynamicFormField::FLAG_EXT_STORED
+        )));
+        if (!$answers || count($answers) == 0)
+            continue;
+
+        ?>
+            <tr>
+            <td colspan="2">
+                <table cellspacing="0" cellpadding="4" width="100%" border="0">
+                <?php foreach($answers as $a) {
+                    if (!($v = $a->display())) continue; ?>
+                    <tr>
+                        <th width="100"><?php
+                            echo $a->getField()->get('label');
+                        ?>:</th>
+                        <td><?php
+                            echo $v;
+                        ?></td>
+                    </tr>
+                    <?php
+                } ?>
+                </table>
+            </td>
+            </tr>
+        <?php
+        $idx++;
+    } ?>
+    </table>
+<?php
 } ?>
-</table>
 <div class="clear"></div>
 <div id="task_thread_container">
-    <div id="task_thread_content">
+    <div id="task_thread_content" data-thread-id="<?php echo
+    $task->getThread()->getId(); ?>" class="tab_content">
     <?php
-    $threadTypes=array('M'=>'message','R'=>'response', 'N'=>'note');
-    /* -------- Messages & Responses & Notes (if inline)-------------*/
-    $types = array('M', 'R', 'N');
-    if(($thread=$task->getThreadEntries($types))) {
-       foreach($thread as $entry) { ?>
-        <table class="thread-entry <?php echo $threadTypes[$entry->type]; ?>" cellspacing="0" cellpadding="1" width="940" border="0">
-            <tr>
-                <th colspan="4" width="100%">
-                <div>
-                    <span class="pull-left">
-                    <span style="display:inline-block"><?php
-                        echo Format::datetime($entry->created);?></span>
-                    <span style="display:inline-block;padding:0 1em" class="faded title"><?php
-                        echo Format::truncate($entry->title, 100); ?></span>
-                    </span>
-                    <span class="pull-right" style="white-space:no-wrap;display:inline-block">
-                        <span style="vertical-align:middle;" class="textra"></span>
-                        <span style="vertical-align:middle;"
-                            class="tmeta faded title"><?php
-                            echo Format::htmlchars($entry->getName()); ?></span>
-                    </span>
-                </div>
-                </th>
-            </tr>
-            <tr><td colspan="4" class="thread-body" id="thread-id-<?php
-                echo $entry->getId(); ?>"><div><?php
-                echo $entry->getBody()->toHtml(); ?></div></td></tr>
-            <?php
-            $urls = null;
-            if($entry->has_attachments
-                    && ($urls = $tentry->getAttachmentUrls())
-                    && ($links = $tentry->getAttachmentsLinks())) {?>
-            <tr>
-                <td class="info" colspan="4"><?php echo $links; ?></td>
-            </tr> <?php
-            }
-            if ($urls) { ?>
-                <script type="text/javascript">
-                    $('#thread-id-<?php echo $entry->getId(); ?>')
-                        .data('urls', <?php
-                            echo JsonDataEncoder::encode($urls); ?>)
-                        .data('id', <?php echo $entry['id']; ?>);
-                </script>
-<?php
-            } ?>
-        </table>
-        <?php
-        if ($entry->type == 'M')
-            $msgId = $entry->getId();
-       }
-    } else {
-        echo '<p>'.__('Error fetching thread - get technical help.').'</p>';
-    }?>
+    $task->getThread()->render(array('M', 'R', 'N'));
+    ?>
    </div>
 </div>
 <div class="clear" style="padding-bottom:10px;"></div>
@@ -267,11 +263,18 @@ foreach (DynamicFormEntry::forObject($task->getId(),
     <div id="msg_notice"><?php echo $msg; ?></div>
 <?php }elseif($warn) { ?>
     <div id="msg_warning"><?php echo $warn; ?></div>
-<?php } ?>
+<?php }
+
+if ($ticket)
+    $action = sprintf('#tickets/%d/tasks/%d',
+            $ticket->getId(), $task->getId());
+else
+    $action = 'tasks.php?id='.$task->getId();
+?>
 <div id="response_options">
     <ul class="tabs"></ul>
-    <form id="task_note"
-        action="tasks.php?id=<?php echo $task->getId(); ?>"
+    <form id="<?php echo $ticket? 'ticket_task_note': 'task_note'; ?>"
+        action="<?php echo $action; ?>"
         name="task_note"
         method="post" enctype="multipart/form-data">
         <?php csrf_token(); ?>
@@ -334,6 +337,13 @@ foreach (DynamicFormEntry::forObject($task->getId(),
 
 <script type="text/javascript">
 $(function() {
+    $(document).on('click', 'li.active a#ticket_tasks', function(e) {
+        e.preventDefault();
+        $('div#task_content').hide().empty();
+        $('div#tasks_content').show();
+        return false;
+     });
+
     $(document).off('.task-action');
     $(document).on('click.task-action', 'a.task-action', function(e) {
         e.preventDefault();
@@ -351,5 +361,26 @@ $(function() {
 
         return false;
     });
+
+    $(document).off('.tf');
+    $(document).on('submit.tf', 'form#ticket_task_note', function(e) {
+        e.preventDefault();
+        var $form = $(this);
+        var $container = $('div#task_content');
+        $.ajax({
+            type:  $form.attr('method'),
+            url: 'ajax.php/'+$form.attr('action').substr(1),
+            data: $form.serialize(),
+            cache: false,
+            success: function(resp, status, xhr) {
+                $container.html(resp);
+                $('#msg_notice, #msg_error',$container)
+                .delay(5000)
+                .slideUp();
+            }
+        })
+        .done(function() { })
+        .fail(function() { });
+     });
 });
 </script>
diff --git a/include/staff/ticket-tasks.inc.php b/include/staff/ticket-tasks.inc.php
index 3dec2c3867c99f6db91ef277667ddc9219450160..802ea24989c6da9017493a42e418291722395c4e 100644
--- a/include/staff/ticket-tasks.inc.php
+++ b/include/staff/ticket-tasks.inc.php
@@ -4,9 +4,12 @@ global $thisstaff;
 $role = $thisstaff->getRole($ticket->getDeptId());
 
 $tasks = Task::objects()
-    ->select_related('dept', 'staff')
+    ->select_related('dept', 'staff', 'team')
     ->order_by('-created');
 
+$tasks->filter(array(
+            'object_id' => $ticket->getId(),
+            'object_type' => 'T'));
 
 $count = $tasks->count();
 $pageNav = new Pagenate($count,1, 100000); //TODO: support ajax based pages
@@ -14,7 +17,7 @@ $showing = $pageNav->showing().' '._N('task', 'tasks', $count);
 
 ?>
 <div id="tasks_content" style="display:block;">
-<div style="width:700px; float:left;">
+<div class="pull-left">
    <?php
     if ($count) {
         echo '<strong>'.$showing.'</strong>';
@@ -24,24 +27,28 @@ $showing = $pageNav->showing().' '._N('task', 'tasks', $count);
     }
    ?>
 </div>
-<div style="float:right;text-align:right;padding-right:5px;">
+<div class="pull-right">
     <?php
     if ($role && $role->hasPerm(Task::PERM_CREATE)) { ?>
         <a
-        class="Icon newTicket task-action"
+        class="action-button ticket-task-action"
         data-url="tickets.php?id=<?php echo $ticket->getId(); ?>#tasks"
         data-dialog='{"size":"large"}'
         href="#tickets/<?php
-            echo $ticket->getId(); ?>/add-task"> <?php
+            echo $ticket->getId(); ?>/add-task">
+            <i class="icon-plus-sign"></i> <?php
             print __('Add New Task'); ?></a>
     <?php
-    } ?>
+    }
+    Task::getAgentActions($thisstaff, array('morelabel' => __('Options')));
+    ?>
 </div>
 <br/>
 <div>
 <?php
 if ($count) { ?>
-<form action="#tickets/<?php echo $ticket->getId(); ?>/tasks" method="POST" name='tasks' style="padding-top:10px;">
+<form action="#tickets/<?php echo $ticket->getId(); ?>/tasks" method="POST"
+    name='tasks' id="tasks" style="padding-top:7px;">
 <?php csrf_token(); ?>
  <input type="hidden" name="a" value="mass_process" >
  <input type="hidden" name="do" id="action" value="" >
@@ -49,8 +56,7 @@ if ($count) { ?>
     <thead>
         <tr>
             <?php
-            //TODO: support mass actions.
-            if (0) {?>
+            if (1) {?>
             <th width="8px">&nbsp;</th>
             <?php
             } ?>
@@ -76,21 +82,20 @@ if ($count) { ?>
         $title = Format::htmlchars(Format::truncate($task->getTitle(),40));
         $threadcount = $task->getThread() ?
             $task->getThread()->getNumEntries() : 0;
+
+        $viewhref = sprintf('#tickets/%d/tasks/%d/view',
+                $ticket->getId(), $id);
+
         ?>
         <tr id="<?php echo $id; ?>">
-            <?php
-            //Implement mass  action....if need be.
-            if (0) { ?>
             <td align="center" class="nohover">
                 <input class="ckb" type="checkbox" name="tids[]"
                 value="<?php echo $id; ?>" <?php echo $sel?'checked="checked"':''; ?>>
             </td>
-            <?php
-            } ?>
             <td align="center" nowrap>
               <a class="Icon no-pjax preview"
                 title="<?php echo __('Preview Task'); ?>"
-                href="#tasks/<?php echo $id; ?>/view"
+                href="<?php echo $viewhref; ?>"
                 data-preview="#tasks/<?php echo $id; ?>/preview"
                 ><?php echo $task->getNumber(); ?></a></td>
             <td align="center" nowrap><?php echo
@@ -98,7 +103,7 @@ if ($count) { ?>
             <td><?php echo $status; ?></td>
             <td><a <?php if ($flag) { ?> class="no-pjax"
                     title="<?php echo ucfirst($flag); ?> Task" <?php } ?>
-                    href="#tasks/<?php echo $id; ?>/view"><?php
+                    href="<?php echo $viewhref; ?>"><?php
                 echo $title; ?></a>
                  <?php
                     if ($threadcount>1)
diff --git a/scp/ajax.php b/scp/ajax.php
index 70c92db226f885958efe0d5c9c3bd9a4a2b2388d..f6e2f36de5eb6a966eca31a4980cae32ea8406d9 100644
--- a/scp/ajax.php
+++ b/scp/ajax.php
@@ -159,6 +159,8 @@ $dispatcher = patterns('',
         url_post('^status/(?P<state>\w+)$', 'setSelectedTicketsStatus'),
         url_get('^(?P<tid>\d+)/tasks$', 'tasks'),
         url('^(?P<tid>\d+)/add-task$', 'addTask'),
+        url_get('^(?P<tid>\d+)/tasks/(?P<id>\d+)/view$', 'task'),
+        url_post('^(?P<tid>\d+)/tasks/(?P<id>\d+)$', 'task'),
         url_get('^lookup', 'lookup'),
         url('^search', patterns('ajax.search.php:SearchAjaxAPI',
             url_get('^$', 'getAdvancedSearchDialog'),
@@ -183,6 +185,7 @@ $dispatcher = patterns('',
         url_post('^(?P<tid>\d+)/delete$', 'delete'),
         url_get('^(?P<tid>\d+)/view$', 'task'),
         url_post('^(?P<tid>\d+)$', 'task'),
+        url('^add$', 'add'),
         url_get('^mass/(?P<action>[\w.]+)', 'massProcess'),
         url_post('^mass/(?P<action>[\w.]+)', 'massProcess')
     )),
diff --git a/scp/tasks.php b/scp/tasks.php
index c80a28ec45a9b6421cc364d031f5db19fa0ae801..f7edead6c04a82fdd0eed918ff9323b79e5b0ef0 100644
--- a/scp/tasks.php
+++ b/scp/tasks.php
@@ -156,7 +156,7 @@ $ost->addExtraHeader('<meta name="tip-namespace" content="tasks.queue" />',
 if($task) {
     $ost->setPageTitle(sprintf(__('Task #%s'),$task->getNumber()));
     $nav->setActiveSubMenu(-1);
-    $inc = 'templates/task-view.tmpl.php';
+    $inc = 'task-view.inc.php';
     if ($_REQUEST['a']=='edit'
             && $task->checkStaffPerm($thisstaff, TaskModel::PERM_EDIT)) {
         $inc = 'task-edit.inc.php';