Bug 31742 - Highlight logged-in library holdings on add/edit items screen (additem.pl)
Summary: Highlight logged-in library holdings on add/edit items screen (additem.pl)
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-12 14:51 UTC by Jason Robb
Modified: 2023-09-27 21:25 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Robb 2022-10-12 14:51:39 UTC
It would be helpful in a consortia setting where many different libraries are sharing a single record to make items owned by the logged-in library stand out in the table at additem.pl. Highlighting an item's home library if it matches logged-in library is an easy visual indicator.

I wrote some JS for this using the currentlibrary class added with bug 10902:

  var loggedBranch = $("#logged-in-info-full .logged-in-branch-name").text();
  var colIndex = $('#cat_additem th:contains("Home library")').index() + 1;
  
  $('#cat_additem tr td:nth-child(' + colIndex + ')').each(function () {
    if (this.textContent == loggedBranch) {
      $(this).wrapInner('<span class="currentlibrary"></span>');
    }
  });
Comment 1 Katrin Fischer 2022-11-14 22:14:06 UTC
I like the idea, this would be similar to how we highlight users of the logged-in library in patron search now.
Comment 2 Fridolin Somers 2023-09-27 21:24:45 UTC
> th:contains("Home library")
One must adapt this for translated templates right ?

One may use data-colname="homebranch"