Hello,
I liked to be able to see the attachments in the
www_view routine of USS.pm. I mean I wanted to see
attachments in USS main view just like you can see
them as you click on the submission. So I added the
template vars to the www_view routine. From now on it
is possible to
use "submission.attachment.box", "submission.attachment
.url", "submission.attachment.icon", "submission.attachme
nt.name" in the "Template" just like it was already
possible in "Submission Template".
These are the diffs:
=======================================
/data/WebGUI/lib/WebGUI/Wobject # diff USS_org.pm USS.pm
766c766
< USS_submission.endDate, page.urlizedTitle
---
> USS_submission.endDate, page.urlizedTitle, USS_submission.attachment
837a838,844
> if ($page->[$i]->{attachment} ne "") {
> my $file = WebGUI::Attachment->new
($page->[$i]->{attachment},$_[0]->wid,$submission->
{"submission.id"});
> $submission->
{"submission.attachment.box"} = $file->box;
> $submission->
{"submission.attachment.url"} = $file->getURL;
> $submission->
{"submission.attachment.icon"} = $file->getIcon;
> $submission->
{"submission.attachment.name"} = $file->getFilename;
> }
=======================================
Very simple :) Why wasn't this in the routine to start
with???
MAG,
Milo