Bugzilla – Attachment 28394 Details for
Bug 3050
Add an option to upload scanned invoices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 3050: QA follow-up
Bug-3050-QA-follow-up.patch (text/plain), 5.51 KB, created by
Jonathan Druart
on 2014-05-21 10:10:06 UTC
(
hide
)
Description:
Bug 3050: QA follow-up
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-05-21 10:10:06 UTC
Size:
5.51 KB
patch
obsolete
>From de31d838c4bacbf81b475c027fc4ea74b1befd03 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 21 May 2014 12:08:00 +0200 >Subject: [PATCH] Bug 3050: QA follow-up > >1/ Use the usual way for ordering dates in table >2/ Add a confirmation dialog box on deleting a file >3/ Add some UTs > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > .../intranet-tmpl/prog/en/modules/acqui/invoice-files.tt | 11 ++++++++--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt | 6 ++++-- > t/db_dependent/Koha_Misc_Files.t | 9 ++++++--- > 3 files changed, 18 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >index 1121536..08ca3cd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt >@@ -11,13 +11,16 @@ > $("#invoice_files_details_table").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ > { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, >- { "aTargets": [ 3 ], "sType": "natural" } >+ { "aTargets": [ "title-string" ], "sType": "title-string" } > ], > bInfo: false, > bPaginate: false, > bFilter: false, > sDom: "t" > })); >+ $("a.delete_file").click(function(){ >+ return ( confirm( _("Are you sure you want to delete this file ?") ) ); >+ }); > }); > //]]> > </script> >@@ -62,9 +65,11 @@ > <td><a href="?invoiceid=[% invoiceid %]&op=download&view=1&file_id=[% f.file_id %]">[% f.file_name | html %]</a></td> > <td>[% f.file_type | html %]</td> > <td>[% f.file_description | html %]</td> >- <td><!-- [% f.date_uploaded %] -->[% f.date_uploaded | $KohaDates %]</td> >+ <td class="title-string"> >+ <span title="[% f.date_uploaded %]">[% f.date_uploaded | $KohaDates %]</span> >+ </td> > <td>[% f.file_size %]</td> >- <td><a href="?invoiceid=[% invoiceid %]&op=delete&file_id=[% f.file_id %]">Delete</a></td> >+ <td><a class="delete_file" href="?invoiceid=[% invoiceid %]&op=delete&file_id=[% f.file_id %]">Delete</a></td> > <td><a href="?invoiceid=[% invoiceid %]&op=download&file_id=[% f.file_id %]">Download</a></td> > </tr> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >index 911ff81..8056c1d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >@@ -31,7 +31,7 @@ > [% IF ( (Koha.Preference('AcqEnableFiles')) && files ) %] > $("#invoice_files_table").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ >- { "aTargets": [ 3 ], "sType": "natural" } >+ { "aTargets": [ "title-string" ], "sType": "title-string" } > ], > bInfo: false, > bPaginate: false, >@@ -229,7 +229,9 @@ > <td><a href="/cgi-bin/koha/acqui/invoice-files.pl?invoiceid=[% invoiceid %]&op=download&view=1&file_id=[% f.file_id %]">[% f.file_name | html %]</a></td> > <td>[% f.file_type | html %]</td> > <td>[% f.file_description | html %]</td> >- <td><!-- [% f.date_uploaded %] -->[% f.date_uploaded | $KohaDates %]</td> >+ <td class="title-string"> >+ <span title="[% f.date_uploaded %]">[% f.date_uploaded | $KohaDates %]</span> >+ </td> > </tr> > [% END %] > </tbody> >diff --git a/t/db_dependent/Koha_Misc_Files.t b/t/db_dependent/Koha_Misc_Files.t >index d88da5c..6a51126 100755 >--- a/t/db_dependent/Koha_Misc_Files.t >+++ b/t/db_dependent/Koha_Misc_Files.t >@@ -5,7 +5,7 @@ > > use Modern::Perl; > use C4::Context; >-use Test::More tests => 27; >+use Test::More tests => 30; > > BEGIN { > use_ok('Koha::Misc::Files'); >@@ -16,6 +16,7 @@ $dbh->{AutoCommit} = 0; > $dbh->{RaiseError} = 1; > > ## new() parameter handling check >+is(Koha::Misc::Files->new(), undef, "new() param check test/0"); > is(Koha::Misc::Files->new(recordid => 12), undef, "new() param check test/1"); > is(Koha::Misc::Files->new(recordid => 'aa123', tabletag => 'ttag_a'), undef, "new() param check test/2"); > >@@ -76,10 +77,12 @@ $files_a_123_infos = $mf_a_123->GetFilesInfo(); > is(scalar @$files_a_123_infos, 3, "GetFilesInfo() result count after DelFile()"); > > ## DelAllFiles() tests >-$mf_a_123->DelAllFiles(); >+my $number_of_deleted_files_a_123 = $mf_a_123->DelAllFiles(); >+is( $number_of_deleted_files_a_123, 3, "DelAllFiles returns the number of deleted files/1" ); > $files_a_123_infos = $mf_a_123->GetFilesInfo(); > is(scalar @$files_a_123_infos, 0, "GetFilesInfo() result count after DelAllFiles()/1"); >-$mf_b_221->DelAllFiles(); >+my $number_of_deleted_files_b_221 = $mf_b_221->DelAllFiles(); >+is( $number_of_deleted_files_b_221, 1, "DelAllFiles returns the number of deleted files/2" ); > is(scalar @{$mf_b_221->GetFilesInfo()}, 0, "GetFilesInfo() result count after DelAllFiles()/2"); > > $dbh->rollback; >-- >2.0.0.rc2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 3050
:
25253
|
25306
|
26724
|
28123
|
28124
|
28125
|
28362
|
28363
|
28364
|
28391
|
28392
|
28393
| 28394