Show
Ignore:
Timestamp:
09/27/07 11:45:51 (2 years ago)
Author:
jallen
Message:

Can you hook a brother up with an icon? Why, yes, yes I can

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/RebuildQueue/plugins/RebuildQueue/RebuildQueue-List.pl

    r244 r327  
    3232                'MT::App::CMS::AppTemplateSource.list_blog' => \&add_queue_list_link, 
    3333                'MT::App::CMS::AppTemplateParam.menu' => \&verify_permission, 
     34                'MT::App::CMS::AppTemplateSource.header' => \&that_damn_icon, 
    3435        }, 
    3536}); 
     
    3738MT->add_plugin($plugin); 
    3839MT->add_plugin_action('blog','../../mt.cgi?__mode=rq_list', "Show rebuild queue for this blog"); 
    39  
    4040 
    4141sub init { 
     
    193193} 
    194194 
     195sub that_damn_icon { 
     196        my ($cb, $app, $tmpl) = @_; 
     197    (my $static = $app->static_path) =~ s!/$!!; 
     198    my $css = '.box ul.nav li#nav-queue ' 
     199            . '{ background-image: url(%s/%s/rebuildq.gif); }'; 
     200    $app->tmpl_append( 
     201        $tmpl, 'head', 'style',sprintf($css, $static, $plugin->envelope) 
     202    ); 
     203    # You're welcome... 
     204} 
     205 
    195206sub verify_permission { 
    196207    my ($eh, $app, $param, $tmpl) = @_;