webif/var/mongoose/include/menuicons.jim

109 lines
2.6 KiB
Plaintext
Raw Normal View History

#!/mod/bin/jimsh
source /mod/webif/lib/setup
require system.class settings.class plugin
proc menuitem {title icon link {width 217} {height 0} {extra ""}} {{num 0}} {
if {$title eq "-reset"} {
set num 0
return
}
incr num
if {$title eq ""} return
if {$num > 4} {
puts {</div><div style="clear: both; padding-top: 1em">}
set num 1
}
if {$extra ne ""} { append extra " " }
puts -nonewline "
<div class=left num=$num>
<center>
<a href=$link>
<img src=$icon ${extra}border=0 "
if {$width} { puts -nonewline " width=$width" }
if {$height} { puts -nonewline " height=$height" }
puts -nonewline ">
</a>
<br>
<a href=$link>
<b>$title</b>
</a>
<br>
</center>
</div>
"
}
set settings [settings]
if {[$settings epg_style] eq "grid"} {
set epglink "/cgi-bin/xepg.jim"
} else {
set epglink "/epg/list.jim"
}
puts {<div style="clear: both">}
menuitem "Browse Media Files" "/images/323_1_10_Menu_Video.png" \
/browse/index.jim 217 228
menuitem "Scheduled Events" "/images/321_1_00_Menu_CHList.png" \
/sched/sched.jim 217 228
menuitem "EPG" "/images/328_1_26_Menu_TV_Guide.png" \
$epglink 217 228
if {[file exists "/mod/bin/ir"]} {
menuitem "Remote" "/img/remote.png" /plugin/ir/remote.jim 217 228
}
if {[[settings] nomobile] eq "0"} {
menuitem "Mobile Version" "/img/mobile.png" /m/ 217 228
}
menuitem "Service Management" "/img/spanner.png" \
/services/index.jim 217 228
menuitem "Package Management" "/img/packages.png" \
/pkg/index.jim 217 228
menuitem "Settings" "/images/326_1_00_Menu_Settings.png" \
/settings/settings.jim 217 228
menuitem "Diagnostics" "/img/diagnostics.png" \
/diag/diag.jim 217 228
eval_plugins menu
if {[$settings notwitfeed] == 0} {
puts {
<script type="text/javascript" async=true
src='http://twitcker.com/ticker/HummyPkg.js?open=true&container=own-container&own-container=twitfeed&speed=3&count=5&background=cccccc'>
</script>
<div id=twitfeed
style="clear: both; padding-top: 3em; width: 100%">
</div>
}
}
if {[$settings nohelplinks] == 0} {
menuitem "-reset" "" ""
puts {</div><div style="clear: both; padding-top: 2em">}
menuitem "hummy.tv<br>Forums" "/img/forum.png" \
"http://hummy.tv/ target=_blank" 0 100 \
"style=\"padding: 1em\""
menuitem "hummy.tv<br>Wiki" "/img/wiki.png" \
"http://wiki.hummy.tv/ target=_blank" 0 100 \
"style=\"padding: 1em\""
menuitem "Things Every<br>Owner Should Know" "/img/started.png" \
"http://hummy.tv/forum/threads/1858/ target=_blank" 0 100 \
"style=\"padding: 1em\""
menuitem "Twitter<br>Feed" "/img/silver-twitter-bird-button.png" \
"http://twitter.com/HummyPkg target=_blank" 0 100 \
"style=\"padding: 1em\""
}