<& /RTFM/Article/Elements/Tabs, Article => $ArticleObj, current_subtab => "RTFM/Article/Delete.html?id=".$ArticleObj->Id , id => $id, Title => $title &> % if ($ARGS{'Delete'}) { <%$title%> <& /Elements/ListActions, actions => \@results &> % } else { <&|/l&>Are you sure you want to delete this article?
% } <%INIT> my @results; my $title; my $ArticleObj = RT::FM::Article->new( $session{'CurrentUser'} ); $ArticleObj->Load($id); unless ( $ArticleObj->id ) { $m->comp("/RTFM/Elements/Error", Why => loc("Unable to load article") ); } unless ( $ArticleObj->CurrentUserHasRight('ModifyArticle') ) { $m->comp("/RTFM/Elements/Error", Why => "No permission to modify article"); } if ($ARGS{'Delete'} eq 'yes') { $ArticleObj->Delete(); $title = loc('Article #[_1] deleted', $ArticleObj->Id); } else { $title = loc('Delete article #[_1]', $ArticleObj->Id); } <%ARGS> $id => undef