Bugzilla – Attachment 110682 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.28 KB, created by
ByWater Sandboxes
on 2020-09-24 17:03:05 UTC
(
hide
)
Description:
Bug 26145: Add the "Cover image" column to the table settings
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-09-24 17:03:05 UTC
Size:
3.28 KB
patch
obsolete
>From c50370dfad1950a74dabfd922586cc1d1f2ab44a 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 > >Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> >--- > 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 >@@ -273,6 +273,8 @@ modules: > cannot_be_toggled: 1 > cannot_be_modified: 1 > - >+ columnname: holdings_cover_image >+ - > columnname: holdings_itype > - > columnname: holdings_holdingbranch >@@ -328,6 +330,8 @@ modules: > cannot_be_toggled: 1 > cannot_be_modified: 1 > - >+ columnname: otherholdings_cover_image >+ - > columnname: otherholdings_itype > - > columnname: otherholdings_holdingbranch >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.11.0
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