[Rt-commit] r9667 - in rtfm/branches/2.3-EXPERIMENTAL: .
falcone at bestpractical.com
falcone at bestpractical.com
Wed Nov 14 17:03:23 EST 2007
Author: falcone
Date: Wed Nov 14 17:03:21 2007
New Revision: 9667
Modified:
rtfm/branches/2.3-EXPERIMENTAL/ (props changed)
rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Article/Display.html
Log:
r26584 at ketch: falcone | 2007-11-14 16:41:25 -0500
* simplify the article display for unprivileged users
Modified: rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Article/Display.html
==============================================================================
--- rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Article/Display.html (original)
+++ rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Article/Display.html Wed Nov 14 17:03:21 2007
@@ -16,4 +16,28 @@
%#
%# END LICENSE BLOCK
<& /SelfService/Elements/Header, Title => loc('Display Article ' . $ARGS{id} ) &>
-<& /RTFM/Article/Display.html, id => $ARGS{id}, SelfService => 1 &>
+<span class="label"><%$article->Name || loc("(no name)")%></span><br />
+<em><span class="value"><%$article->Summary%></span></em>
+<& /Elements/ShowCustomFields, Object => $article &>
+
+<%init>
+
+my $article = RT::FM::Article->new( $session{'CurrentUser'} );
+if ($id) {
+ $article->Load($id);
+}
+unless ( $article->Id ) {
+ $m->comp( "/Elements/Error", Why => loc("Article not found") );
+}
+
+unless ( $article->CurrentUserHasRight('ShowArticle') ) {
+ $m->comp( "/RTFM/Elements/Error", Why => loc("Permission Denied") );
+}
+my $title = loc( "Article #[_1]: [_2]", $article->Id, $article->Name || loc("(no name)"));
+
+$id = $article->id;
+
+</%init>
+<%args>
+$id => undef
+</%args>
More information about the Rt-commit
mailing list