[Koha-bugs] [Bug 35716] New: Duplicated assets in both koha-tmpl/intra-tmpl and koha-tmpl/opac-tmpl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 5 18:09:09 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35716

            Bug ID: 35716
           Summary: Duplicated assets in both koha-tmpl/intra-tmpl and
                    koha-tmpl/opac-tmpl
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: pedro.amorim at ptfs-europe.com
        QA Contact: testopia at bugs.koha-community.org
                CC: jonathan.druart+koha at gmail.com,
                    julian.maurice at biblibre.com, m.de.rooy at rijksmuseum.nl,
                    martin.renvoize at ptfs-europe.com, tomascohen at gmail.com

There are some JS assets duplicated in koha-tmpl/intra-tmpl and
koha-tmpl/opac-tmpl.

100% match:
./koha-tmpl/opac-tmpl/bootstrap/js/i18n.js
./koha-tmpl/intranet-tmpl/js/i18n.js

100% match:
./koha-tmpl/opac-tmpl/bootstrap/js/Gettext.js
./koha-tmpl/intranet-tmpl/js/Gettext.js

~95% match:
./koha-tmpl/opac-tmpl/bootstrap/js/coce.js
./koha-tmpl/intranet-tmpl/js/coce.js

~95% match:
./koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js
./koha-tmpl/intranet-tmpl/prog/js/cookieconsent.js

~80% match:
./koha-tmpl/opac-tmpl/bootstrap/js/ill-availability.js
./koha-tmpl/intranet-tmpl/prog/js/ill-availability.js

~50% match:
./koha-tmpl/opac-tmpl/bootstrap/js/basket.js
./koha-tmpl/intranet-tmpl/prog/js/basket.js

Some of the differences in the above pairs may have been due to requirements
specific to only staff or to only OPAC, or it may also have been the case that
they have fallen out of sync over the years with some enhancements being added
to one of the pair and not the other.

I don't know what the best solution for this would be (if one is needed) but
developing bug 35604 I need to have the same JS file on both intra and OPAC and
feels bad to have to copy the same file to 2 different places.

I'm only looking for JS files but I know this is also the case for images,
maybe some CSS and other assets.

Could we consider having a koha-tmpl/shared-tmpl directory, or have some of
these overlapping assets only exist once and have them be duplicated for each
interface during build, or yet another better option?

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list