Bugzilla – Bug 2292
Remove [% PERL %] block from RandomMix page
Last modified: 2008-09-15 14:37:04 UTC
RandomMix currently uses a perl block in its web page to layout the genre checkboxes. Apparently, the skins are no place for Perl blocks, so this should be changed. Comments from kdf: look at the setup code for pluginlist (it's a checkbox list too) in Setup.pm create the hash for the list, and use fillTemplate to create an [% genre_lsit %] that can be referenced by the main template. Don't worry too much about layout in that section. THe stylesheets should take care of the important stuff. ------- Quoting "max.spicer": > > A briefish look through Setup.pm revealed not a lot, I'm afraid. I > couldn't even find the term checkbox. Could you point me at line > numbers? pluginlist setup block is at Setup.pm 1344. That calls a couple of other funcitons, getPluginState and processPluginsList, which should be easy enough to find :) Then you should look at buildHTTP(). at lin 2683, the call is made to filltemplatefile() for the inputTemplate. This fills the inputTemplate given in teh setup block, setup_input_array_chk.html. You could copy this template file to the plugin dir, if you need. > One concern I have here is that the two column format might not work > well with things like Handheld. I'd therefore have to code it so the > skin can request the number of columns. look at the player setings for menus in the fishbone skin. Depending on how wide you make the left side, the display will set up columns. This is done via a customisation of the setup_input_array_add.html and setu_input_array_udr.html templates. Handheld can do something similar.
Changed this to use TT code to handle formatting the hash of genres into a two column list, see change 4650. Basically, create a list for the first column using <hash>.keys.sort. Then pop half of those off into a second list for the second column. Use a FOREACH to process the first column list and the loop.index property to get the corresponding entry in the second column list.
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006. I am setting them to targets of 6.2.1 to keep them from showing up in my queries.