From a8db15d1e5dd2cfba43ee26f708e21526f303061 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Wed, 13 Aug 2008 21:20:47 +0200 Subject: [PATCH] Added a warning when adding a comment to a closed issue. The warning is only displayed for the simple users. --- src/IDF/Views/Issue.php | 2 ++ src/IDF/templates/issues/view.html | 4 ++++ www/media/idf/img/warning.png | Bin 0 -> 603 bytes 3 files changed, 6 insertions(+) create mode 100644 www/media/idf/img/warning.png diff --git a/src/IDF/Views/Issue.php b/src/IDF/Views/Issue.php index 60a2231..0ccdd3a 100644 --- a/src/IDF/Views/Issue.php +++ b/src/IDF/Views/Issue.php @@ -237,6 +237,7 @@ class IDF_Views_Issue $title = Pluf_Template::markSafe(sprintf(__('Issue %d: %s'), $url, $issue->id, $issue->summary)); $form = false; // The form is available only if logged in. $starred = false; + $closed = in_array($issue->status, $prj->getTagIdsByStatus('closed')); if (!$request->user->isAnonymous()) { $starred = Pluf_Model_InArray($request->user, $issue->get_interested_list()); $params = array( @@ -300,6 +301,7 @@ class IDF_Views_Issue 'form' => $form, 'starred' => $starred, 'page_title' => $title, + 'closed' => $closed, ), $arrays), $request); diff --git a/src/IDF/templates/issues/view.html b/src/IDF/templates/issues/view.html index cc9fa47..f29def8 100644 --- a/src/IDF/templates/issues/view.html +++ b/src/IDF/templates/issues/view.html @@ -42,6 +42,10 @@ {/if} +{if $closed and (!$isOwner and !$isMember)} +

 {blocktrans}This issue is marked as closed, add a comment only if you think this issue is still valid and more work is needed to fully fix it.{/blocktrans}

+ +{/if}
diff --git a/www/media/idf/img/warning.png b/www/media/idf/img/warning.png new file mode 100644 index 0000000000000000000000000000000000000000..a9e4ff3991cb0ad2a99cc25e2d13c35e52c680c8 GIT binary patch literal 603 zcmV-h0;K(kP)J2V5SdEtMnl9PhCxc2Fa&}~V}o=Tx)35=bmuS|@d;cT zbY;Loz(q+`1+A}82tI&NTm%Y*7F^UoNilyn))L6H_Q1W1%i%j`bA(=?F!-5EVN!MFB_9*XAp~_l%n771CUH65fQk#;c9J-59jBDOQ<*CorDm33|CLV znm<0~VYP}<3Z)daS`C19yN!q-BK$Z#V4_~XOaDE<2tY)*Zne1F+TuNYlS3Fj19`yz=_l|J pl>P}02k>Sh;xD3f4Z|KZe*u@?eFz-1;S&G=002ovPDHLkV1mMw_G175 literal 0 HcmV?d00001