[% IF page == 'help'; pagetitle = "HELP" | string; PROCESS helpheader.html noCrumbList=1; WRAPPER helpTopicList; "
"; FOREACH link = additionalLinks.help; title = link.key | string | html; href = link.value; PROCESS helpTopic; END; END; PROCESS helpfooter.html; ELSE %] [% extJsScripts = BLOCK %]
[% END %] [% my_musicItems = BLOCK; orderedLinks = ['BROWSE_BY_ARTIST', 'BROWSE_BY_ALBUM', 'BROWSE_BY_GENRE', 'BROWSE_BY_YEAR', 'BROWSE_NEW_MUSIC', 'PLUGIN_RANDOMPLAY']; FOREACH item = orderedLinks; IF additionalLinks.browse.exists(item); link = { key=item, value=additionalLinks.browse.$item }; PROCESS menuItem; END; END; FOREACH link = additionalLinks.browse; IF link.key.search('\W') || (link.key != 'FAVORITES' && !orderedLinks.grep(link.key).size); additionalLinks.icons.${link.key} = additionalLinks.icons.${link.key} || 'html/images/plugin.png'; PROCESS menuItem; ELSIF link.key == 'FAVORITES'; useFavorites = 1; END; END; FOREACH link = additionalLinks.search; IF link.key == 'SEARCHMUSIC'; control = BLOCK %] [% END; PROCESS menuItem; END; END; END; radioItems = BLOCK; FOREACH item = additionalLinkOrder.radios; IF additionalLinks.radios.exists(item); link.value = additionalLinks.radios.item(item); link.key = item; control = ''; IF link.value.match('search'); control = BLOCK %] [% END; END; PROCESS menuItem; END; END; FOREACH link = additionalLinks.radios; IF !additionalLinkOrder.radios.grep(link.key).size; additionalLinks.icons.${link.key} = additionalLinks.icons.${link.key} || 'html/images/plugin.png'; PROCESS menuItem; END; END; additionalLinks.icons.RADIO_TUNEIN = 'html/images/ServiceProviders/tuneinurl.png'; control = BLOCK %] [% WRAPPER playlink %]onclick="Home.tuneInUrl('play');"[% END %] [% WRAPPER addlink %]onclick="Home.tuneInUrl('add');"[% END %] [% END; PROCESS menuItem link={ key='RADIO_TUNEIN', value='tunein.html?' }; END; my_appsItems = BLOCK; FOREACH item = additionalLinkOrder.my_apps; IF additionalLinks.my_apps.exists(item); link.value = additionalLinks.my_apps.$item; link.target = additionalLinks.my_apps.$item.match('^http:') ? "mysb" : ""; link.key = item; PROCESS menuItem; END; END; FOREACH link = additionalLinks.apps; IF !additionalLinkOrder.my_apps.grep(link.key).size; additionalLinks.icons.${link.key} = additionalLinks.icons.${link.key} || 'html/images/plugin.png'; PROCESS menuItem; END; END; END; pluginsItems = BLOCK; FOREACH link = additionalLinks.plugins; IF link.key == 'ALARM'; NEXT UNLESS player; NEXT IF (nosetup || noserver); link.value = webroot _ 'settings/index.html?activePage=ALARM&'; link.target = 'sc_settings'; END; IF link.key == 'PLUGIN_LINE_OUT'; NEXT UNLESS player; link.value = webroot _ 'settings/index.html?activePage=AUDIO_SETTINGS&'; link.target = 'sc_settings'; END; IF link.key == 'PLUGIN_LINE_IN'; link.value = 'PLUGIN_LINE_IN_IN_USE' | getstring; link.value = "javascript:Home.setLineIn('" _ link.value _"');\" \""; END; # we want an icon for every item in the Extras menu... additionalLinks.icons.${link.key} = additionalLinks.icons.${link.key} || 'html/images/plugin.png'; PROCESS menuItem; END; END %] [% BLOCK menuItem %]
[% string = link.key; stringUC = link.key | upper; IF string == stringUC; string = link.key | getstring; END; %] [% IF expandable %] [% ELSE %] [% END %] [% IF (additionalLinks.icons.item(link.key) || link.icon) && !noIcon; link.icon = additionalLinks.icons.item(link.key) || link.icon; # have local artwork resized UNLESS link.icon.match('^http:'); link.icon = webroot _ link.icon.replace('.png', "_25x25_f.png"); END %] [% IF link.icon.match("^http") %] [%# Remote icon, use imageproxy to resize %] [% ELSE %] [% END %]
[% END %] [% IF dontGetString; link.key; ELSE; string; END %] [% IF link.icon && !noIcon %]
[% END %] [% IF !expandable %] [% END %] [% IF control %] [% control %] [% END %]
[% control=''; END %] [% pagetitle = "HOME" | string %] [% menu = BLOCK %]
[% IF hasLibrary %] [% PROCESS menuItem link.key="MY_MUSIC" link.value="home.html?" expandable="my_music" noIcon=1 %]
[%- my_musicItems -%]
[% END %] [% PROCESS menuItem link.key="RADIO" link.value="home.html?" expandable="radio" noIcon=1 %]
[%- radioItems -%]
[% IF additionalLinks.my_apps %] [% PROCESS menuItem link.key="PLUGIN_MY_APPS_MODULE_NAME" link.value="home.html?" expandable="my_apps" noIcon=1 %]
[%- my_appsItems -%]
[% END %] [% IF favorites; control = BLOCK; WRAPPER editlink noTarget=1; 'href="' _ webroot _ 'plugins/Favorites/index.html?fav"'; END; END; PROCESS menuItem expandable=1 noIcon=1 link = { key = 'FAVORITES', value = additionalLinks.browse.FAVORITES } %]
[% expandable = 0; dontGetString = 1; FOREACH entry = favorites; control = BLOCK; IF entry.type == "audio"; WRAPPER playlink noTarget=1 -%] href="javascript:void(0);" onClick="SqueezeJS.UI.setProgressCursor();SqueezeJS.Controller.urlRequest('[% webroot %]plugins/Favorites/index.html?action=play&index=[% loop.index %]&player=[% player | uri %]', true, SqueezeJS.string('connecting_for'));" [%- END; WRAPPER addlink noTarget=1 -%] href="javascript:void(0);" onClick="SqueezeJS.UI.setProgressCursor();SqueezeJS.Controller.urlRequest('[% webroot %]plugins/Favorites/index.html?action=add&index=[% loop.index %]&player=[% player | uri %]', true, SqueezeJS.string('connecting_for'));" [%- END; ELSE; PROCESS dummylink; PROCESS dummylink; END; END; PROCESS menuItem noIcon=!entry.icon link = { icon = entry.icon, key = entry.text, value = webroot _ "plugins/Favorites/index.html?sess=1&index=" _ loop.index _ "&player=" _ playerURI }; END; noIcon=1 dontGetString = 0; %]
[% END %] [% IF additionalLinks.plugins %] [% PROCESS menuItem link.key="PLUGINS" link.value="home.html?" expandable="plugins"; expandable = 0 %]
[%- pluginsItems -%]
[% END %]
[% END %] [% PROCESS pageheader.html noHomeLink=1 useSpecialExt="-browse" %] [% menu %] [% IF NOT warn AND (album_count OR artistcount OR song_count) %] [% infoTab = BLOCK %] [% album_count %] [% "WITH" | string -%] [%- song_count %] [% "BY" | string -%] [% artist_count %]. [% END %] [% END %]
[% PROCESS pagefooter.html %] [% END %]