From bb89655f7d9dfa0859442ceedefd789d498fc1ae Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Tue, 4 Sep 2007 20:10:17 +0000 Subject: [PATCH] Unviewed requests now have brighter view/edit links. --- application/views/home.xhtml | 20 +++++++++++++++++--- document_root/css/home.oss | 4 ++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/application/views/home.xhtml b/application/views/home.xhtml index 40df0856..e40c742e 100755 --- a/application/views/home.xhtml +++ b/application/views/home.xhtml @@ -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) { ?> diff --git a/document_root/css/home.oss b/document_root/css/home.oss index e79c6c80..aa6f8695 100755 --- a/document_root/css/home.oss +++ b/document_root/css/home.oss @@ -4,4 +4,8 @@ width: 700px; } + .requestLinkNew { + color: #f00; + } + } \ No newline at end of file -- GitLab