[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6849] trunk/LedgerSMB/Report/File



Revision: 6849
          http://sourceforge.net/p/ledger-smb/code/6849
Author:   einhverfr
Date:     2014-02-12 07:30:20 +0000 (Wed, 12 Feb 2014)
Log Message:
-----------
fix for text on internal report button.  Adding incoming file report

Modified Paths:
--------------
    trunk/LedgerSMB/Report/File/Internal.pm

Added Paths:
-----------
    trunk/LedgerSMB/Report/File/Incoming.pm

Copied: trunk/LedgerSMB/Report/File/Incoming.pm (from rev 6848, trunk/LedgerSMB/Report/File/Internal.pm)
===================================================================
--- trunk/LedgerSMB/Report/File/Incoming.pm	                        (rev 0)
+++ trunk/LedgerSMB/Report/File/Incoming.pm	2014-02-12 07:30:20 UTC (rev 6849)
@@ -0,0 +1,136 @@
+=head1 NAME
+
+LedgerSMB::Report::File::Incoming - Files for LSMB processes.
+
+=head1 SYNPOSIS
+
+ LedgerSMB::Report::File::Internal->new(%$request)->render($request);
+
+=cut
+
+package LedgerSMB::Report::File::Incoming;
+use Moose;
+extends 'LedgerSMB::Report';
+with 'LedgerSMB::Report::File', 'LedgerSMB::I18N';
+
+sub _set_file_class { return 7; }
+sub _set_ref_key { return 0; }
+
+=head1 DESCRIPTION
+
+This is for queued incoming files.
+
+=head1 CRITERIA
+
+None
+
+=head1 STATIC METHODS
+
+=head2 columns
+
+=over
+
+=back
+
+=cut
+
+sub columns {
+    return [
+     { col_id => 'select',
+         type => 'select',
+         name => '', },
+     { col_id => 'file_name',
+         type => 'href',
+    href_base => 'file.pl?action=get&file_class=' . _set_file_class() . 
+                 "&id=",
+         name => text('File Name'), },
+     { col_id => 'description',
+         type => 'text',
+         name => text('Description'), },
+     { col_id => 'mime_type',
+         type => 'text',
+         name => text('Mime Type'), },
+     { col_id => 'uploaded_at',
+         type => 'text',
+         name => text('Uploaded At'), },
+     { col_id => 'uploaded_by_name',
+         type => 'text',
+         name => text('Uploaded By'), },
+    ];
+}
+
+=head2 header_lines
+
+None
+
+=cut
+
+sub header_lines { return []; }
+
+=head2 name
+
+Internal Files (localized)
+
+=cut
+
+sub name { return text('Incoming Files'); }
+
+=head2 set_buttons
+
+=over
+
+=item add_incoming_file
+
+button, set to add a new file.
+
+=item attach
+
+Removes a file from the queue and attaches it to the current document.
+
+=back
+
+=cut
+
+sub set_buttons {
+    return [
+        { name => 'action',
+         value => 'add_incoming_file',
+          type => 'submit',
+         class => 'submit',
+          text => text('Add'),
+        },
+        { name => 'action',
+         value => 'attach_incoming_file',
+          type => 'submit',
+         class => 'submit',
+          text => text('Attach'),
+        },
+    ];
+}
+
+=head1 METHODS
+
+=head2 run_report
+
+Sets the rows.  This is just a wrapper around LedgerSMB::Report::File->list
+
+=cut
+
+sub run_report {
+    my ($self) = $_;
+    my @rows = $self->list;
+    $_->{row_id} = $_->{id} for @rows;
+    $self->rows(\@rows);
+}
+
+=head1 COPYRIGHT
+
+Copyright (C) 2014 The LedgerSMB Core Team
+
+This file may be re-used under the terms of the GNU General Public License 
+version 2 or at your option any later version.  Please see the included 
+LICENSE.txt file for more information.
+
+=cut
+
+__PACKAGE__->meta->make_immutable;

Modified: trunk/LedgerSMB/Report/File/Internal.pm
===================================================================
--- trunk/LedgerSMB/Report/File/Internal.pm	2014-02-12 07:24:43 UTC (rev 6848)
+++ trunk/LedgerSMB/Report/File/Internal.pm	2014-02-12 07:30:20 UTC (rev 6849)
@@ -85,6 +85,7 @@
          value => 'add_internal_file',
           type => 'submit',
          class => 'submit',
+          text => text('Add'),
         },
     ];
 }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits