[Koha-bugs] [Bug 24201] Attach desk to intranet session

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jul 20 14:53:07 CEST 2020


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

--- Comment #59 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Comment on attachment 107093
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107093
Bug 24201: (follow-up) add desk choice with library choice

Review of attachment 107093:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=24201&attachment=107093)
-----------------------------------------------------------------

Signing off the set.. this is a really nice and elegant solution, well done !

Minor note which I'm drawing the QAers attention to, but not a direct failure..
more of a slight code style wonder from my point.

::: koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc
@@ +25,5 @@
>  [% Asset.js("lib/jquery/plugins/jquery.validate.min.js") | $raw %]
>  <!-- koha core js -->
>  [% Asset.js("js/staff-global.js") | $raw %]
> +[% IF setdesk %]
> +[% Asset.js("js/desk_selection.js") | $raw %]

I'm wondering about the logic here.. could we not just include the Asset line
where it's required rather than setting a TT variable to then look for here?

::: koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt
@@ +5,4 @@
>  [% USE Categories %]
>  [% SET footerjs = 1 %]
> +[% IF Desks.all %]
> +    [% SET setdesk = 1 %]

I think it would be clearer to just include the asset in the JS includes at the
bottom of the template here rather than set a variable to be caught to add it
in in the js_includes block.

::: koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt
@@ +3,3 @@
>  [% USE Koha %]
> +[% IF Desks.all %]
> +    [% SET setdesk = 1 %]

I think it would be clearer to just include the asset in the JS includes at the
bottom of the template here rather than set a variable to be caught to add it
in in the js_includes block.

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


More information about the Koha-bugs mailing list