[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3621] trunk
- Subject: SF.net SVN: ledger-smb:[3621] trunk
- From: ..hidden..
- Date: Wed, 03 Aug 2011 21:36:35 +0000
Revision: 3621
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3621&view=rev
Author: einhverfr
Date: 2011-08-03 21:36:34 +0000 (Wed, 03 Aug 2011)
Log Message:
-----------
File attachments now work for Journal Entries
Modified Paths:
--------------
trunk/LedgerSMB/GL.pm
trunk/UI/journal/journal_entry.html
Modified: trunk/LedgerSMB/GL.pm
===================================================================
--- trunk/LedgerSMB/GL.pm 2011-08-03 20:57:19 UTC (rev 3620)
+++ trunk/LedgerSMB/GL.pm 2011-08-03 21:36:34 UTC (rev 3621)
@@ -50,7 +50,7 @@
my ($self, $form, $locale) = @_;
my $file = LedgerSMB::File->new();
$file->new_dbobject({base => $form, locale => $locale});
- @{$form->{files}} = $file->list({ref_key => $self->{id}, file_class => 1});
+ @{$form->{files}} = $file->list({ref_key => $form->{id}, file_class => 1});
@{$form->{file_links}} = $file->list_links(
{ref_key => $form->{id}, file_class => 1}
);
Modified: trunk/UI/journal/journal_entry.html
===================================================================
--- trunk/UI/journal/journal_entry.html 2011-08-03 20:57:19 UTC (rev 3620)
+++ trunk/UI/journal/journal_entry.html 2011-08-03 21:36:34 UTC (rev 3621)
@@ -313,10 +313,12 @@
</tr>
<?lsmb FOREACH file IN form.files ?>
<tr>
-<td><?lsmb file.file_name() ?></td>
-<td><?lsmb file.mime_type_text() ?></td>
-<td><?lsmb file.attached_at() ?></td>
-<td><?lsmb file.attached_by() ?></td>
+<td><a href="file.pl?action=get&file_class=1&ref_key=<?lsmb form.id
+ ?>&id=<?lsmb file.id ?>"
+ ><?lsmb file.file_name ?></a></td>
+<td><?lsmb file.mime_type ?></td>
+<td><?lsmb file.uploaded_at ?></td>
+<td><?lsmb file.uploaded_by_name ?></td>
</tr>
<?lsmb END ?>
</table>
@@ -338,8 +340,8 @@
aclass="Order";
END; ?>
<tr>
-<td><?lsmb file.file_name() ?></td>
-<td><?lsmb file.mime_type_text() ?></td>
+<td><?lsmb file.file_name ?></td>
+<td><?lsmb file.mime_type ?></td>
<td><?lsmb aclass ?></td>
<td><?lsmb file.reference() ?></td>
<td><?lsmb file.attached_at() ?></td>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.