[Rt-commit] [svn] r1045 - in RT-Journal: . trunk/html
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Wed Jun 9 22:41:01 EDT 2004
Author: jesse
Date: Wed Jun 9 22:41:00 2004
New Revision: 1045
Added:
RT-Journal/trunk/html/Article.html
Modified:
RT-Journal/ (props changed)
Log:
----------------------------------------------------------------------
r1768 at debian: jesse | 2004-06-10T10:51:33.465280Z
----------------------------------------------------------------------
r1769 at debian: jesse | 2004-06-10T11:44:44.853035Z
Added back "Article.html"
----------------------------------------------------------------------
Added: RT-Journal/trunk/html/Article.html
==============================================================================
--- (empty file)
+++ RT-Journal/trunk/html/Article.html Wed Jun 9 22:41:00 2004
@@ -0,0 +1,97 @@
+
+This is Article.html, reconstructed from the mason component cache,
+which appears to have been the last extant copy. It almost definitely
+has blatant errors, since I transformed it back to mason source with
+regexps ;)
+
+
+<%args>
+$id => undef
+$comment => undef
+</%args>
+<%init>
+my $post = RT::Ticket->new( $session{'CurrentUser'} );
+my @Actions;
+if ( $ARGS{'id'} eq 'new' ) { # new ticket?
+ my $q = RT::Queue->new( $session{'CurrentUser'} );
+ $q->Load('Journal');
+ $ARGS{'Queue'} = $q->id;
+ $ARGS{'Owner'} = $session{'CurrentUser'}->id;
+ $ARGS{'Status'} = 'new';
+
+ my $cat = RT::CustomField->new( $session{'CurrentUser'} );
+ $cat->LoadByNameAndQueue( Queue => $q->Id, Name => 'Category');
+
+ $ARGS{ 'CustomField-' . $cat->Id } = $ARGS{'Category'};
+
+ #$ARGS{'Attachments'}{'Upload'} = $ARGS{'Attach'};
+ delete $ARGS{'Attach'};
+
+ ( $post, @Actions ) = CreateTicket(%ARGS);
+
+}
+else {
+ $post->Load($id);
+ if ($comment) {
+ $post->Comment( Content => $comment );
+ }
+}
+</%init>
+%$m->comp( 'Elements/Tabs', Title => $post->CreatorObj->Name.": ".$post->Subject );
+
+<h1> <%$post->Subject%> </h1>
+( <%$post->CreatedObj->AsString%>)<br>
+
+<%$post->FirstCustomFieldValue('Category')%>
+<br>
+<%perl>
+ my $content = $post->Transactions->First->Content;
+ $content =~ s/-- (.*)$//gism;
+ $content =~ s/\n/<br>/gi;
+% $m->print( $content );
+
+ my $refto = $post->RefersTo;
+</%perl>
+<div align="right">
+
+% while( my $link = $refto->Next ) {
+<A href=" <%$link->TargetURI->Resolver->HREF%> "> <%$link->TargetURI->Resolver->HREF%> </a><br>
+
+% }
+</div>
+
+% #Todo, only let the right person edit
+% if ($session{'CurrentUser'} ) {
+[<a href=" <%$RT::WebPath%> /Journal/Edit.html?id= <%$post->Id%> ">Edit</a>]
+
+% }
+<hr>
+
+% my $history = $post->Transactions();
+% $history->Limit(FIELD => 'Type', VALUE => 'Comment');
+% while (my $comment = $history->Next) {
+% my $attach = $comment->Attachments;
+
+
+<%$comment->CreatorObj->Name%> - ( <%$post->CreatedObj->AsString%>)<br>
+
+<%$comment->Content%>
+
+
+% $attach->Limit(FIELD => 'ContentType', OPERATOR => 'LIKE', VALUE => 'image/jpeg');
+% while (my $file = $attach->Next) {
+Found : <%$attach->id%> / <%$attach->Filename%>
+
+% }
+<hr>
+
+%}
+<hr>
+<form action="Article.html" method="post">
+<input type=hidden name="id" value="<%$post->id%>">
+<textarea name="comment" rows=10 cols=70></textarea>
+<input type="submit">
+</form>
+
+--
+
More information about the Rt-commit
mailing list