Bug 2292 - Remove [% PERL %] block from RandomMix page
: Remove [% PERL %] block from RandomMix page
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.2.0
: All All
: P2 normal (vote)
: ---
Assigned To: Max Spicer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-15 02:17 UTC by Max Spicer
Modified: 2008-09-15 14:37 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Spicer 2005-10-15 02:17:45 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.
Comment 1 Robert Moser II 2005-10-16 15:11:56 UTC
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.

Comment 2 Chris Owens 2006-06-16 14:41:34 UTC
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.