Bugzilla – Attachment 110351 Details for
Bug 26145
Add the ability to attach a cover image at item level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26145: Add the "Cover image" column to the table settings
Bug-26145-Add-the-Cover-image-column-to-the-table-.patch (text/plain), 3.21 KB, created by
Jonathan Druart
on 2020-09-18 10:23:38 UTC
(
hide
)
Description:
Bug 26145: Add the "Cover image" column to the table settings
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-09-18 10:23:38 UTC
Size:
3.21 KB
patch
obsolete
>From ae302768aab46272ac5d365e76d378e326d42c64 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 18 Aug 2020 16:16:50 +0200 >Subject: [PATCH] Bug 26145: Add the "Cover image" column to the table settings > >The new column can now be hidden by the table settings >--- > admin/columns_settings.yml | 4 ++++ > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 +++++- > 2 files changed, 9 insertions(+), 1 deletion(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 96b3a31a68..b8ba081de4 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -272,6 +272,8 @@ modules: > columnname: holdings_checkbox > cannot_be_toggled: 1 > cannot_be_modified: 1 >+ - >+ columnname: holdings_cover_image > - > columnname: holdings_itype > - >@@ -327,6 +329,8 @@ modules: > columnname: otherholdings_checkbox > cannot_be_toggled: 1 > cannot_be_modified: 1 >+ - >+ columnname: otherholdings_cover_image > - > columnname: otherholdings_itype > - >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index ea0de4e55c..63f9d43ac7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -284,7 +284,7 @@ > <tr> > [% IF (StaffDetailItemSelection) %]<th id="[% tab | html %]_checkbox" data-colname="[% tab | html %]_checkbox" class="NoSort"></th>[% END %] > [% IF Koha.Preference('LocalCoverImages') && ( tab == 'holdings' && itemloop_has_images || tab == 'otherholdings' && otheritemloop_has_images ) %] >- <th id="[% tab | html %]_cover" data-colname="[% tab | html %]_cover">Cover image</th> >+ <th id="[% tab | html %]_cover_image" data-colname="[% tab | html %]_cover_image">Cover image</th> > [% END %] > [% IF ( item_level_itypes ) %]<th id="[% tab | html %]_itype" data-colname="[% tab | html %]_itype">Item type</th>[% END %] > <th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> >@@ -1270,8 +1270,12 @@ Note that permanent location is a code, and location may be an authval. > $(document).ready(function() { > var ids = ['holdings_table', 'otherholdings_table']; > var columns_settings = [ [% TablesSettings.GetColumns('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetColumns('catalogue', 'detail','otherholdings_table','json') | $raw %] ]; >+ var has_images = ["[% itemloop_has_images %]", "[% otheritemloop_has_images %]"]; > for (var i in ids) { > var id = ids[i]; >+ if ( !has_images[i] ) { // remove the cover_image column >+ columns_settings.splice(1,1); >+ } > var dt_parameters = { > 'sDom': 't', > 'bPaginate': false, >-- >2.20.1
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 26145
:
109225
|
109226
|
110342
|
110343
|
110344
|
110345
|
110346
|
110347
|
110348
|
110349
|
110350
|
110351
|
110352
|
110353
|
110354
|
110675
|
110676
|
110677
|
110678
|
110679
|
110680
|
110681
|
110682
|
110683
|
110684
|
110685
|
110800
|
110861
|
110862
|
110863
|
110864
|
110865
|
110866
|
110867
|
110868
|
110869
|
110870
|
110871
|
110872
|
110873
|
110874
|
110875
|
111446
|
111447
|
111448
|
111449
|
111450
|
111451
|
111452
|
111453
|
111454
|
111455
|
111456
|
111457
|
111458