Bug 28874 - We need JavaScript equivalents to many of our TT plugins
Summary: We need JavaScript equivalents to many of our TT plugins
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 24455 29575
Blocks:
  Show dependency treegraph
 
Reported: 2021-08-18 08:23 UTC by Martin Renvoize
Modified: 2023-07-04 07:51 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2021-08-18 08:23:12 UTC
We have some really great TT plugins and includes.. but with a slow but steady move to using ajax for various things, many of these TT specific snippets would benefit from a javascript equivalent.

Some examples off the top of my head:
* AuthorisedValues
* Biblio title
* Accountline type
Comment 1 Jonathan Druart 2021-08-18 10:39:08 UTC
What do you mean by "javascript equivalent"? Using a REST API route?
Comment 2 Martin Renvoize 2021-08-18 14:58:06 UTC Comment hidden (obsolete)
Comment 3 Martin Renvoize 2021-08-18 14:58:15 UTC
As in a nice simple way to construct display options from data returned from the API.

Example, if we want to replace some of our data tables with Ajax equivalents using the API, for anything that includes Biblio title we can't easily replicate the structure returned by the biblio-title.inc template.. i.e a nice linked title consisting of multiple fields from the bib record. Yes, we can add a custom render function but we should keep it dry/reusable in the same way the template include is.

Similarly, I'm not sure what route we've taken with regards av displays and the API. We return lots of codes.. is the intention to use embeds to get descriptions and even then, are we distinguishing between opac and staff and translations?  Having a nice easy to call tender function that takes the code and converts it for display the way we have for TT would aid in the route to modernising the front end with load on demand and things.
Comment 4 David Cook 2021-08-19 02:30:55 UTC
I've been thinking about this same topic for another project of mine. 

I actually ended up making specific DataTables controllers and had it send back descriptions instead of codes. (Of course, that through a little spanner in the search functionality, but it mostly works.)
Comment 5 Katrin Fischer 2023-07-01 13:12:45 UTC
Which ones are missing still? Dependent bugs have been resolved.
Comment 6 Jonathan Druart 2023-07-04 07:51:54 UTC
js-biblio-format.inc added by bug 28854.

AVs should/could be retrieved using the REST API route

TableSettings is still missing but should be retrieved from the REST API.

We can close and reopen later if needed.