Skip to content
Snippets Groups Projects
Commit bb89655f authored by Tim Steiner's avatar Tim Steiner
Browse files

Unviewed requests now have brighter view/edit links.

parent 5088b284
No related branches found
No related tags found
No related merge requests found
......@@ -196,12 +196,26 @@
}
?> </td>
<td>
<a href="/Request/View/<?php echo $request->getPrimaryKey(); ?>">View</a>
<?php
$lastViewTime = RequestViewTimes::getInstance()->getViewTimeForUserAndRequest($this->user, $request);
if ($lastViewTime instanceof Nmc_Date_Null) {
$linkClass = 'Viewed';
} else {
$linkClass = 'New';
}
?>
<a class="requestLink<?php echo $linkClass; ?>"
href="/Request/View/<?php echo $request->getPrimaryKey(); ?>">
View
</a>
/
<a href="/Request/Load/<?php echo $request->getPrimaryKey(); ?>">Edit</a> </td>
<a class="requestLink<?php echo $linkClass; ?>"
href="/Request/Load/<?php echo $request->getPrimaryKey(); ?>">
Edit
</a>
</td>
<td>
<?php
$lastViewTime = RequestViewTimes::getInstance()->getViewTimeForUserAndRequest($this->user, $request);
$newCommentCount = RequestComments::getInstance()->fetchWithRequestAndAfterTime($request, $lastViewTime)->count();
if ($newCommentCount > 0) {
?>
......
......@@ -4,4 +4,8 @@
width: 700px;
}
.requestLinkNew {
color: #f00;
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment