package Eludia::Presentation::Skins::Classic;
use Data::Dumper;
BEGIN {
require Eludia::Presentation::Skins::Generic;
delete $INC {"Eludia/Presentation/Skins/Generic.pm"};
our $lrt_bar = '\n";
our $replacement = {
error => 'JS',
redirect => 'JS',
};
}
################################################################################
sub options {
return {};
}
################################################################################
sub _icon_path {
-r $r -> document_root . "/i/_skins/Classic/$_[0].gif" ?
"$_REQUEST{__static_url}/$_[0].gif?$_REQUEST{__static_salt}" :
"/i/buttons/$_[0].gif"
}
################################################################################
sub register_hotkey {
my ($_SKIN, $hashref) = @_;
$hashref -> {label} =~ s{\&(.)}{$1} or return undef;
my $c = $1;
if ($c eq '<') {
return 37;
}
elsif ($c eq '>') {
return 39;
}
elsif (lc $c eq 'æ') {
return 186;
}
elsif (lc $c eq 'ý') {
return 222;
}
else {
$c =~ y{ÉÖÓÊÅÍÃØÙÇÕÚÔÛÂÀÏÐÎËÄÆÝß×ÑÌÈÒÜÁÞéöóêåíãøùçõúôûâàïðîëäæýÿ÷ñìèòüáþ}{qwertyuiop[]asdfghjkl;'zxcvbnm,.qwertyuiop[]asdfghjkl;'zxcvbnm,.};
return (ord ($c) - 32);
}
}
################################################################################
sub static_path {
my ($package, $file) = @_;
my $path = __FILE__;
$path =~ s{\.pm}{/$file};
return $path;
};
################################################################################
sub draw_hr {
my ($_SKIN, $options) = @_;
return <
 |
EOH
}
################################################################################
sub draw_calendar {
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime (time);
$year += 1900;
$_REQUEST {__clock_separator} ||= ':';
return <$i18n->{today}: $mday $i18n->{months}->[$mon] $year
EOH
}
################################################################################
sub draw_auth_toolbar {
my ($_SKIN, $options) = @_;
my $calendar = draw_calendar ();
my $subset_selector = '';
if (@{$_SKIN -> {subset} -> {items}} > 1) {
$subset_selector = <
';
}
return <
 |
 |
$$options{top_banner}
EOH
}
################################################################################
sub draw_window_title {
my ($_SKIN, $options) = @_;
return ''
if $_REQUEST {select};
return <|