Bug 28177: Add date column and column configuration to uploads
This patch adds a "Date added" column to the table showing uploaded files. Column configuration is added to the table, and the date column is hidden by default. To test, apply the patch and restart all. - Go to Tools -> Upload. - If necessary, upload multiple files with the same category. - Use the "Search uploads by category" form to find those uploads. - In the table of uploads, confirm that table settings and other DataTable controls work correctly, including the option to show the "Date added" column. - Go to Administration -> Table settings -> Tools -> upload. - Change the settings for the uploads table. - Return to Uploads and confirm that your changes are reflected in the display of the uploads table. Signed-off-by: Salman Ali <salman.ali@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
2f6877d616
commit
ae79ba3e25
|
|
@ -1594,6 +1594,28 @@ modules:
|
|||
cannot_be_toggled: 1
|
||||
cannot_be_modified: 1
|
||||
|
||||
upload:
|
||||
uploadresults:
|
||||
columns:
|
||||
-
|
||||
columnname: filename
|
||||
-
|
||||
columnname: size
|
||||
-
|
||||
columnname: hashvalue
|
||||
-
|
||||
columnname: date
|
||||
is_hidden: 1
|
||||
-
|
||||
columnname: category
|
||||
-
|
||||
columnname: public
|
||||
-
|
||||
columnname: temporary
|
||||
-
|
||||
columnname: actions
|
||||
cannot_be_toggled: 1
|
||||
cannot_be_modified: 1
|
||||
pos:
|
||||
pay:
|
||||
invoices:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[% USE raw %]
|
||||
[% USE Asset %]
|
||||
[% USE Koha %]
|
||||
[% USE KohaDates %]
|
||||
[% USE TablesSettings %]
|
||||
[% USE AuthorisedValues %]
|
||||
[% SET footerjs = 1 %]
|
||||
|
|
@ -202,6 +203,7 @@
|
|||
<th>Filename</th>
|
||||
<th>Size</th>
|
||||
<th>Hashvalue</th>
|
||||
<th>Date added</th>
|
||||
<th>Category</th>
|
||||
[% IF !plugin %]<th>Public</th>[% END %]
|
||||
[% IF !plugin %]<th>Temporary</th>[% END %]
|
||||
|
|
@ -214,6 +216,7 @@
|
|||
<td>[% record.filename | html %]</td>
|
||||
<td>[% record.filesize | html %]</td>
|
||||
<td>[% record.hashvalue | html %]</td>
|
||||
<td data-order="[% record.dtcreated | html %]">[% record.dtcreated | $KohaDates %]</td>
|
||||
<td>
|
||||
<a href="/cgi-bin/koha/tools/upload.pl?op=browse&browsecategory=[% record.uploadcategorycode | uri %]">[% AuthorisedValues.GetByCode( 'UPLOAD', record.uploadcategorycode ) | html %]</a>
|
||||
</td>
|
||||
|
|
@ -456,8 +459,11 @@
|
|||
[% END %]
|
||||
window.close();
|
||||
}
|
||||
var columns_settings = [% TablesSettings.GetColumns( 'tools', 'upload', 'uploadresults', 'json' ) | $raw %];
|
||||
$(document).ready(function() {
|
||||
KohaTable("uploadresults",{});
|
||||
KohaTable("uploadresults",{
|
||||
}, columns_settings);
|
||||
|
||||
[% IF msg %]
|
||||
ShowAlerts( [% msg | html %] );
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue