Show
Ignore:
Timestamp:
04/14/08 02:38:34 (20 months ago)
Author:
bchoate
Message:

Updates to support publish profile dialog operation. BugId:76495

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-34/lib/MT/CMS/Template.pm

    r1875 r1877  
     1# Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd. 
     2# This program is distributed under the terms of the 
     3# GNU General Public License, version 2. 
     4# 
     5# $Id$ 
     6 
    17package MT::CMS::Template; 
    28 
     
    7682          (      ( $obj->type eq 'index' ) 
    7783              && ( ( $blog->custom_dynamic_templates || "" ) ne 'all' ) ); 
    78         $param->{custom_dynamic} = 
    79           $blog && ( $blog->custom_dynamic_templates || "" ) eq 'custom'; 
    80         $param->{has_build_options} = 
    81           ( $param->{custom_dynamic} || $param->{has_rebuild} ); 
    8284 
    8385        # FIXME: enumeration of types 
     
    243245        } 
    244246        # publish options 
    245         $param->{publish_queue} = $blog->publish_queue if $blog; 
     247        $param->{publish_queue_available} = eval 'require List::Util; require Scalar::Util; 1;'; 
    246248        $param->{build_type} = $obj->build_type; 
    247249        $param->{ 'build_type_' . ( $obj->build_type || 0 ) } = 1; 
     
    563565    $params->{published} = $app->param('published'); 
    564566    $params->{saved_copied} = $app->param('saved_copied'); 
     567    $params->{saved_deleted} = $app->param('saved_deleted'); 
     568    $params->{saved} = $app->param('saved'); 
    565569 
    566570    # determine list of system template types: 
     
    652656            $app->param( 'filter_key', 'email_templates' ); 
    653657        } 
     658        elsif ( $tmpl_type eq 'module' ) { 
     659            $app->param( 'filter_key', 'module_templates' ); 
     660        } 
    654661        $terms->{type} = $types{$tmpl_type}->{type}; 
    655662        my $tmpl_param = $app->listing( 
     
    10621069                name    => $name, 
    10631070                value   => $_->{template}, 
    1064                 default => ( $_->{default} || 0 ) 
     1071                default => ( $_->{default} || 0 ), 
    10651072              }; 
    10661073        } 
     
    11831190    my ( $app, $obj ) = @_; 
    11841191 
    1185     $obj->rebuild_me(0)  
    1186       if $app->param('current_rebuild_me') 
    1187       && !$app->param('rebuild_me'); 
    1188     $obj->build_dynamic(0) 
    1189       if $app->param('current_build_dynamic') 
    1190       && !$app->param('build_dynamic'); 
    1191  
    11921192    ## Strip linefeed characters. 
    11931193    ( my $text = $obj->text ) =~ tr/\r//d; 
     
    14291429 
    14301430    my $param = {}; 
     1431    my $blog = $app->blog; 
     1432    $param->{dynamicity} = $blog->custom_dynamic_templates || 'none'; 
    14311433    $param->{screen_id} = "publishing-profile-dialog"; 
     1434    $param->{return_args} = $app->param('return_args'); 
    14321435 
    14331436    $app->build_page('dialog/publishing_profile.tmpl',