<html>
 <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
 </head>
<body>
<!-- here comes the SA -->

<IMPERIA lang=perl>
use strict;
require Imperia::TagStore;
use Imperia::Util::String::JSON qw(to_json);
use Dynamic::ViewImport::TagStore;

use Data::Dumper;

my $ts = Imperia::TagStore->new();

my $realm = $FORM->{REALM};
my $tag = $FORM->{TAG};
# Locale::Messages::turn_utf_8_off($tag);
# Locale::Messages::turn_utf_8_off($realm);

my $html = '';
 if ($realm && $tag) {

        $html .= '<div class="listViewContainer">';
        $html .= "<ul><label>$realm - $tag</label>";
               
        my @urilist = $ts->getURIsByTagAndRealm($tag, $realm);
        @urilist = sort @urilist;
        foreach my $uri (@urilist) {
            $html .= qq{<li><a href=\"$uri" >}.$uri.'</a></li>';
        }
                       
                
        $html .= '</div>';

}
print $html;

</IMPERIA>
</body>
</html>