Changeset 1877

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

Updates to support publish profile dialog operation. BugId:76495

Location:
branches/release-34
Files:
9 modified

Legend:

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

    r1866 r1877  
    1313 
    1414    if ($id) { 
    15         require MT::IPBanList; 
    1615        my $output = $param->{output} ||= 'cfg_prefs.tmpl'; 
    1716        $param->{need_full_rebuild}  = 1 if $q->param('need_full_rebuild'); 
     
    233232                } 
    234233            } 
     234            require MT::Template; 
     235            $param->{dynamic_enabled} = MT::Template->exist( { blog_id => $obj->id, build_dynamic => 1 }); 
    235236            eval "require List::Util; require Scalar::Util;"; 
    236237            unless ($@) { 
     
    12011202        } 
    12021203        elsif ( $screen eq 'cfg_archives' ) { 
    1203             @fields = qw( file_extension ); 
    12041204        } 
    12051205        elsif ( $screen eq 'cfg_templatemaps' ) { 
     
    13851385        } 
    13861386        if ( $screen eq 'cfg_archives' ) { 
    1387             if ( my $dcty = $app->param('dynamicity') ) { 
    1388                 $obj->custom_dynamic_templates($dcty); 
    1389             } 
    13901387            $obj->include_system( $app->param('include_system') || '' ); 
    13911388            if ( !$app->param('enable_archive_paths') ) { 
    13921389                $obj->archive_url(''); 
    13931390                $obj->archive_path(''); 
     1391            } 
     1392        } 
     1393        if ( $screen eq 'cfg_publish_profile' ) { 
     1394            if ( my $dcty = $app->param('dynamicity') ) { 
     1395                $obj->custom_dynamic_templates($dcty); 
    13941396            } 
    13951397        } 
     
    14461448 
    14471449    my $screen = $app->param('cfg_screen') || ''; 
    1448     if ( $screen eq 'cfg_archives' ) { 
     1450    if ( $screen eq 'cfg_publish_profile' ) { 
    14491451        if ( my $dcty = $app->param('dynamicity') ) { 
    1450             my $dcty_changed = $dcty ne $original->custom_dynamic_templates ? 1 : 0; 
    1451  
    1452             if ($dcty_changed) { 
    1453  
    1454                 # Apply publishing rules for templates based on 
    1455                 # publishing method selected: 
    1456                 #     none (0% publish queue, all static) 
    1457                 #     async_all (100% publish queue) 
    1458                 #     async_partial (high-priority templates publish synchronously (main index, preferred indiv. archives, feed templates)) 
    1459                 #     all (100% dynamic) 
    1460                 #     archives (archives dynamic, static indexes) 
    1461                 #     custom (custom configuration) 
    1462  
    1463                 if ( $dcty eq 'none' ) { 
    1464                     require MT::Template; 
    1465                     my @tmpls = MT::Template->load({ 
    1466                         blog_id       => $obj->id, 
    1467                         build_dynamic => 1, 
    1468                     }); 
    1469                     for my $tmpl (@tmpls) { 
    1470                         $tmpl->build_dynamic(0); 
    1471                         $tmpl->save; 
    1472                     } 
    1473                 } 
    1474                 update_dynamicity( 
    1475                     $app, 
    1476                     $obj, 
    1477                     $app->param('dynamic_cache')       ? 1 : 0, 
    1478                     $app->param('dynamic_conditional') ? 1 : 0 
    1479                 ); 
    1480             } 
    1481  
    1482             if (!$dcty_changed || $dcty eq 'custom') { 
    1483                 # do nothing 
    1484             } 
    1485             elsif ($dcty eq 'none') { 
     1452            # Apply publishing rules for templates based on 
     1453            # publishing method selected: 
     1454            #     none (0% publish queue, all static) 
     1455            #     async_all (100% publish queue) 
     1456            #     async_partial (high-priority templates publish synchronously (main index, preferred indiv. archives, feed templates)) 
     1457            #     all (100% dynamic) 
     1458            #     archives (archives dynamic, static indexes) 
     1459            #     custom (custom configuration) 
     1460 
     1461            update_publishing_profile( 
     1462                $app, 
     1463                $obj 
     1464            ); 
     1465 
     1466            if (($dcty eq 'none') || ($dcty =~ m/^async/)) { 
    14861467                _update_finfos($app, 0); 
    14871468            } 
     
    14941475                _update_finfos($app, 0, { templatemap_id => \'is null' }); 
    14951476            } 
    1496  
    1497             # If either of the publishing paths changed, rebuild the fileinfos. 
    1498             my $path_changed = 0; 
    1499             for my $path_field (qw( site_path archive_path site_url archive_url )) { 
    1500                 $path_changed = 1 && last if $app->param($path_field) 
    1501                     && $app->param($path_field) ne $original->$path_field(); 
    1502             } 
    1503  
    1504             if ($path_changed) { 
    1505                 $app->rebuild( BlogID => $obj->id, NoStatic => 1 ) 
    1506                     or return $app->publish_error(); 
    1507             } 
     1477        } 
     1478 
     1479        cfg_publish_profile_save($app, $obj) or return; 
     1480    } 
     1481    if ( $screen eq 'cfg_archives' ) { 
     1482        # update the dynamic publishing options if they changed 
     1483        update_dynamicity( 
     1484            $app, 
     1485            $obj 
     1486        ); 
     1487 
     1488        # If either of the publishing paths changed, rebuild the fileinfos. 
     1489        my $path_changed = 0; 
     1490        for my $path_field (qw( site_path archive_path site_url archive_url )) { 
     1491            $path_changed = 1 && last if $app->param($path_field) 
     1492                && $app->param($path_field) ne $original->$path_field(); 
     1493        } 
     1494 
     1495        if ($path_changed) { 
     1496            $app->rebuild( BlogID => $obj->id, NoStatic => 1 ) 
     1497                or return $app->publish_error(); 
    15081498        } 
    15091499 
     
    18471837 
    18481838sub _switch_publish_options { 
    1849     my ( $blog, $current, $new ) = @_; 
     1839    my ( $blog, $current, $new, $dcty ) = @_; 
    18501840    require MT::Template; 
    18511841    require MT::TemplateMap; 
    18521842    my @tmpl = MT::Template->load( { blog_id => $blog->id } ); 
     1843    my $pref_at = $blog->archive_type_preferred || ''; 
    18531844    for my $tmpl (@tmpl) { 
     1845        # FIXME: enumeration of types 
    18541846        next 
    1855           if !( $tmpl->type =~ m/^(individual|page|category|archive|index)$/ ); 
    1856         if ( $tmpl->build_type == $current ) { 
    1857             $tmpl->build_type($new); 
    1858             $tmpl->save; 
    1859         } 
     1847          if !( $tmpl->type =~ m/^(individual|page|category|archive)$/ ); 
     1848        # if ( $tmpl->build_type == $current ) { 
     1849        #     $tmpl->build_type($new); 
     1850        #     $tmpl->save; 
     1851        # } 
    18601852        my @tmpl_maps = MT::TemplateMap->load( { template_id => $tmpl->id } ); 
    18611853        foreach my $tmpl_map (@tmpl_maps) { 
    1862             if ( $tmpl_map->build_type == $current ) { 
     1854            if ($dcty eq 'async_partial') { 
     1855                # build the preferred archive type synchronously 
     1856                if (($tmpl_map->archive_type eq $pref_at) && 
     1857                    ($tmpl_map->is_preferred)) { 
     1858                    $tmpl_map->build_type(MT::PublishOption::ONDEMAND()); 
     1859                    $tmpl_map->save; 
     1860                    next; 
     1861                } 
     1862            } 
     1863            if ( $tmpl_map->build_type != $new ) { 
    18631864                $tmpl_map->build_type($new); 
    18641865                $tmpl_map->save; 
     
    18751876    my $at = $app->param('preferred_archive_type'); 
    18761877    $blog->archive_type_preferred($at); 
    1877     my $pq = $app->param('publish_queue'); 
    1878     $blog->publish_queue( $pq ? 1 : 0 ); 
    18791878    $blog->include_cache( $app->param('include_cache') ? 1 : 0 ); 
     1879    $blog->save 
     1880      or return $app->error( 
     1881        $app->translate( "Saving blog failed: [_1]", $blog->errstr ) ); 
     1882 
     1883    1; 
     1884} 
     1885 
     1886sub cfg_publish_profile_save { 
     1887    my $app = shift; 
     1888    my ($blog) = @_; 
     1889 
     1890    my $dcty = $app->param('dynamicity') || 'none'; 
     1891    my $pq = $dcty =~ m/^async/ ? 1 : 0; 
     1892    $blog->publish_queue( $pq ); 
    18801893    $blog->save 
    18811894      or return $app->error( 
     
    18871900            $blog, 
    18881901            MT::PublishOption::ONDEMAND(), 
    1889             MT::PublishOption::ASYNC() 
     1902            MT::PublishOption::ASYNC(), 
     1903            $dcty, 
    18901904        ); 
    18911905    } 
     
    18941908            $blog, 
    18951909            MT::PublishOption::ASYNC(), 
    1896             MT::PublishOption::ONDEMAND() 
     1910            MT::PublishOption::ONDEMAND(), 
     1911            $dcty, 
    18971912        ); 
    18981913    } 
     1914 
     1915    1; 
    18991916} 
    19001917 
     
    19051922    my @tms = MT::TemplateMap->load( 
    19061923        { 
    1907             archive_type => $archive_type, 
    1908             blog_id      => $blog_id 
     1924            archive_type  => $archive_type, 
     1925            blog_id       => $blog_id 
    19091926        } 
    19101927    ); 
    1911     grep { $_->text =~ /<MT:?IfRegistration/i } 
     1928    grep { !$_->build_dynamic && ($_->text =~ /<MT:?IfRegistration/i) } 
    19121929      map { MT::Template->load( $_->template_id ) } @tms; 
    19131930} 
    19141931 
    1915 sub update_dynamicity { 
     1932sub update_publishing_profile { 
    19161933    my $app = shift; 
    1917     my ( $blog, $cache, $conditional ) = @_; 
     1934    my ( $blog ) = @_; 
     1935 
    19181936    my $dcty = $blog->custom_dynamic_templates; 
    19191937 
    1920     if ( ($dcty eq 'async_partial') || ($dcty eq 'async_all') ) { 
    1921         # these behave like static publishing 
    1922         $dcty = 'none'; 
    1923     } 
    1924  
    1925     if ( $dcty eq 'none' ) { 
    1926         require MT::Template; 
    1927         my @templates = MT::Template->load( { blog_id => $blog->id } ); 
     1938    require MT::PublishOption; 
     1939    require MT::Template; 
     1940 
     1941    if ( ($dcty eq 'none') || ($dcty =~ m/^async/) ) { 
     1942        my @templates = MT::Template->load( { 
     1943            blog_id => $blog->id, 
     1944            # FIXME: enumeration of types 
     1945            type => 
     1946              [ 'index', 'archive', 'individual', 'page', 'category' ], 
     1947          } ); 
    19281948        for my $tmpl (@templates) { 
     1949            my $bt = $tmpl->build_type || 0; 
     1950            # Do not make automatic modifications to templates with these 
     1951            # manually configured build types 
     1952            next if $bt == MT::PublishOption::DISABLED(); 
     1953            next if $bt == MT::PublishOption::MANUALLY(); 
     1954            next if $bt == MT::PublishOption::SCHEDULED(); 
     1955 
     1956            if ($dcty eq 'async_partial') { 
     1957                # these should be build synchronously 
     1958                if (($tmpl->identifier || '') =~ m/^(main_index|feed_recent)$/) { 
     1959                    $tmpl->build_type(MT::PublishOption::ONDEMAND()); 
     1960                } else { 
     1961                    $tmpl->build_type(MT::PublishOption::ASYNC()); 
     1962                } 
     1963            } elsif ($dcty eq 'async_all') { 
     1964                $tmpl->build_type(MT::PublishOption::ASYNC()); 
     1965            } else { 
     1966                $tmpl->build_type(MT::PublishOption::ONDEMAND()); 
     1967            } 
    19291968            $tmpl->build_dynamic(0); 
    19301969            $tmpl->save(); 
     
    19321971    } 
    19331972    elsif ( $dcty eq 'archives' ) { 
    1934         require MT::Template; 
    1935         my @templates = MT::Template->load( { blog_id => $blog->id } ); 
     1973        my @templates = MT::Template->load( { 
     1974            blog_id => $blog->id, 
     1975            # FIXME: enumeration of types 
     1976            type => 
     1977              [ 'index', 'archive', 'individual', 'page', 'category' ], 
     1978          } ); 
    19361979        for my $tmpl (@templates) { 
     1980            $tmpl->build_type( $tmpl->type ne 'index' ? MT::PublishOption::DYNAMIC() : MT::PublishOption::ONDEMAND() ); 
    19371981            $tmpl->build_dynamic( $tmpl->type ne 'index' ? 1 : 0 ); 
    19381982            $tmpl->save(); 
    19391983        } 
    19401984    } 
    1941     elsif ( $dcty eq 'custom' ) { 
    1942     } 
    19431985    elsif ( $dcty eq 'all' ) { 
    1944         require MT::Template; 
    19451986        my @templates = MT::Template->load( 
    19461987            { 
     
    19531994        ); 
    19541995        for my $tmpl (@templates) { 
     1996            $tmpl->build_type( MT::PublishOption::DYNAMIC() ); 
    19551997            $tmpl->build_dynamic(1); 
    19561998            $tmpl->save(); 
    19571999        } 
    19582000    } 
    1959  
    1960     if ( $dcty ne 'none' ) { 
    1961         prepare_dynamic_publishing($app, @_, $blog->site_path, $blog->site_url); 
     2001    return 1; 
     2002} 
     2003 
     2004sub update_dynamicity { 
     2005    my $app = shift; 
     2006    my ( $blog ) = @_; 
     2007 
     2008    my $cache       = $app->param('dynamic_cache')       ? 1 : 0; 
     2009    my $conditional = $app->param('dynamic_conditional') ? 1 : 0; 
     2010 
     2011    require MT::Template; 
     2012    my $dynamic_enabled = MT::Template->exist( { blog_id => $blog->id, 
     2013        build_dynamic => 1 }); 
     2014 
     2015    # dynamic publishing enabled 
     2016    if ( $dynamic_enabled ) { 
     2017        prepare_dynamic_publishing($app, $blog, $cache, $conditional, $blog->site_path, $blog->site_url); 
    19622018        if ( $blog->archive_path ) { 
    1963             prepare_dynamic_publishing($app, @_, $blog->archive_path, $blog->archive_url); 
     2019            prepare_dynamic_publishing($app, $blog, $cache, $conditional, $blog->archive_path, $blog->archive_url); 
    19642020        } 
    19652021        my $compiled_template_path = 
     
    19872043        } 
    19882044    } 
    1989     $app->add_return_arg( dynamic_set => 1 ); 
    19902045} 
    19912046 
     
    20042059      && ( -f $mtview_path ); 
    20052060    return 1 if ( 'none' eq $blog->custom_dynamic_templates ); 
    2006  
    2007     require File::Spec; 
    20082061 
    20092062    # IIS itself does not handle .htaccess, 
  • 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', 
  • branches/release-34/lib/MT/Template.pm

    r1823 r1877  
    568568    return undef unless $tmpl->outfile; 
    569569    return undef unless ($tmpl->type eq 'index'); 
    570      
     570 
    571571    my $blog = $tmpl->blog; 
    572572    return undef unless $blog; 
  • branches/release-34/tmpl/cms/cfg_archives.tmpl

    r1850 r1877  
    292292 
    293293<mt:unless name="hide_build_option"> 
     294<mt:if name="dynamic_enabled"> 
    294295<fieldset> 
    295296    <h3><__trans phrase="Dynamic Publishing Options"></h3> 
     
    312313 
    313314</fieldset> 
     315</mt:if> 
    314316</mt:unless> 
    315317 
  • branches/release-34/tmpl/cms/dialog/publishing_profile.tmpl

    r1852 r1877  
    3434<mt:include name="dialog/header.tmpl"> 
    3535<form name="publishing_profiles_form" id="publishing_profiles_form" method="post" action="<mt:var name="script_url">" target="_top" onsubmit="return false"> 
     36    <input type="hidden" name="blog_id" value="<mt:var name="blog_id">" /> 
     37    <input type="hidden" name="__mode" value="save" /> 
     38    <input type="hidden" name="_type" value="blog" /> 
     39    <input type="hidden" name="id" value="<mt:var name="blog_id">" /> 
     40    <input type="hidden" name="cfg_screen" value="cfg_publish_profile" /> 
     41    <input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" /> 
     42    <input type="hidden" name="magic_token" value="<mt:var name="magic_token">" /> 
    3643 
    3744    <div id="profile-panel" class="hidden panel"> 
    38          
     45 
    3946        <p><__trans phrase="Choose the profile that best matches the requirements for this blog."></p> 
    40          
     47 
    4148        <mtapp:setting 
    4249            id="dynamicity" 
     
    8794    </div> 
    8895    <div id="confirm-panel" class="hidden panel"> 
    89         <p><__trans phrase="This new publishing profile will update all of you templates."></p> 
     96        <p><__trans phrase="This new publishing profile will update all of your templates."></p> 
    9097 
    9198        <p><strong><__trans phrase="Are you sure you wish to continue?"></strong></p> 
  • branches/release-34/tmpl/cms/edit_template.tmpl

    r1847 r1877  
    160160    <mt:unless name="new_object"> 
    161161        <mt:unless name="build_dynamic"> 
    162         <mt:unless name="build_type_0"> 
    163             <mt:if name="has_rebuild"> 
    164                 <mt:if name="can_rebuild"> 
     162            <mt:if name="can_rebuild"> 
     163                <mt:unless name="archive_types"> 
    165164    <button 
    166165        type="submit" 
     
    170169        onclick="return validate(this.form, 1);" 
    171170        ><__trans phrase="Save &amp; Publish"></button> 
    172                 </mt:if> 
     171                </mt:unless> 
    173172            </mt:if> 
    174         </mt:unless> 
    175173        </mt:unless> 
    176174    </mt:unless> 
     
    626624    </mtapp:setting> 
    627625<mt:else> 
    628     <mt:if name="has_build_options"> 
    629         <mtapp:setting 
    630             id="build_dynamic" 
    631             label="<__trans phrase="Publish Options">" 
    632             help_page="templates" 
    633             help_section="enable_dynamic_publishing"> 
    634             <mt:if name="custom_dynamic"><mt:if name="build_dynamic"><input type="hidden" name="current_build_dynamic" value="1" /></mt:if></mt:if> 
    635             <mt:unless name="build_dynamic"><mt:if name="has_rebuild"><mt:if name="rebuild_me"><input type="hidden" name="current_rebuild_me" value="1" /></mt:if></mt:if></mt:unless> 
     626    <mtapp:setting 
     627        id="build_dynamic" 
     628        label="<__trans phrase="Publish Options">" 
     629        help_page="templates" 
     630        help_section="enable_dynamic_publishing"> 
    636631        <select name="build_type" id="build-type" class="full-width"> 
    637632            <option value="1"<mt:if name="build_type_1"> selected="selected"</mt:if>><__trans phrase="Statically"></option> 
    638             <mt:if name="custom_dynamic"> 
    639633            <option value="3"<mt:if name="build_type_3"> selected="selected"</mt:if>><__trans phrase="Dynamically"></option> 
    640             </mt:if> 
    641             <mt:if name="publish_queue"> 
    642             <option value="4"<mt:if name="build_type_4"> selected="selected"</mt:if>><__trans phrase="Asynchronously"></option> 
     634            <mt:if name="publish_queue_available"> 
     635            <option value="4"<mt:if name="build_type_4"> selected="selected"</mt:if>><__trans phrase="Background"></option> 
    643636    <mt:ignore> 
    644637        <!-- untested features --> 
     
    655648    </mt:ignore> 
    656649            </mt:if> 
    657             <option value="2"<mt:if name="build_type_2"> selected="selected"</mt:if>><__trans phrase="Manually"></option> 
    658             <option value="0"<mt:if name="build_type_0"> selected="selected"</mt:if>><__trans phrase="Disabled"></option> 
     650            <option value="2"<mt:if name="build_type_2"> selected="selected"</mt:if><mt:if name="build_type_0"> selected="selected"</mt:if>><__trans phrase="Manually"></option> 
    659651        </select> 
    660         </mtapp:setting> 
    661     </mt:if> 
     652    </mtapp:setting> 
    662653</mt:if> 
    663654<mt:if name="template_group" like="(module|widget)"> 
     
    730721    }, 
    731722 
    732  
    733723    autoSave: function() { 
    734724        arguments.callee.applySuper( this, arguments ); 
  • branches/release-34/tmpl/cms/include/archive_maps.tmpl

    r1632 r1877  
    2828            </td> 
    2929            <td class="publish-options"> 
    30                 <select name="build_type" id="build-type" class="half-width"> 
    31                     <option value="1"<mt:if name="build_type_1"> selected="selected"</mt:if>><__trans phrase="Statically"></option> 
    32  
    33                 <mt:if name="custom_dynamic"> 
    34                     <option value="3"<mt:if name="build_type_3"> selected="selected"</mt:if>><__trans phrase="Dynamically"></option> 
    35                 </mt:if> 
    36                 <mt:if name="publish_queue"> 
    37                     <option value="4"<mt:if name="build_type_4"> selected="selected"</mt:if>><__trans phrase="Asynchronously"></option> 
     30                <select name="map_build_type_<mt:var name="map_id">" id="build-type" class="half-width"> 
     31                    <option value="1"<mt:if name="map_build_type_1"> selected="selected"</mt:if>><__trans phrase="Statically"></option> 
     32                    <option value="3"<mt:if name="map_build_type_3"> selected="selected"</mt:if>><__trans phrase="Dynamically"></option> 
     33    <mt:if name="publish_queue_available"> 
     34                    <option value="4"<mt:if name="map_build_type_4"> selected="selected"</mt:if>><__trans phrase="Background"></option> 
    3835        <mt:ignore> 
    3936            <!-- untested features --> 
    40                     <option value="5"<mt:if name="build_type_5"> selected="selected"</mt:if>><__trans phrase="On a schedule"></option> 
     37                    <option value="5"<mt:if name="map_build_type_5"> selected="selected"</mt:if>><__trans phrase="On a schedule"></option> 
    4138                    <mt:ignore> 
    4239                        <!-- This code needs to be shown if the "On a schedule" has been selected --> 
     
    4946                    </mt:ignore> 
    5047        </mt:ignore> 
    51                 </mt:if> 
    52                     <option value="2"<mt:if name="build_type_2"> selected="selected"</mt:if>><__trans phrase="Manually"></option> 
    53                     <option value="0"<mt:if name="build_type_0"> selected="selected"</mt:if>><__trans phrase="Disabled"></option> 
     48    </mt:if> 
     49                    <option value="2"<mt:if name="map_build_type_2"> selected="selected"</mt:if><mt:if name="map_build_type_0"> selected="selected"</mt:if>><__trans phrase="Manually"></option> 
    5450                </select> 
    5551            </td> 
  • branches/release-34/tmpl/cms/include/template_table.tmpl

    r1786 r1877  
    8080            <mt:loop name="archive_types"> 
    8181                <mt:loop name="archive_tmpl_loop"> 
    82                         <li><mt:if name="selected"><mt:var name="name" escape="html"></mt:if></li> 
     82                        <li><mt:if name="selected"><mt:var name="name" escape="html"><mt:var name="build_type" value="$map_build_type"></mt:if></li> 
    8383                </mt:loop> 
    8484            </mt:loop> 
     
    9494    <mt:if name="template_type" like="/(index|archive)/"> 
    9595                <td class="publishing-method"> 
    96                     <mt:if name="build_type" eq="0"><__trans phrase="Disabled"> 
    97                     <mt:else name="build_type" eq="2"><__trans phrase="Manual"> 
    98                     <mt:else name="build_type" eq="3"><__trans phrase="Dynamic"> 
    99                     <mt:else name="build_type" eq="4"><__trans phrase="Asynchronous"> 
    100                     <mt:else name="build_type" eq="5"><__trans phrase="Scheduled"> 
     96                    <mt:if name="build_dynamic"><__trans phrase="Dynamic"><mt:else> 
     97                    <mt:if name="build_type" eq="0"><__trans phrase="Manual"> 
     98                    <mt:elseif name="build_type" eq="2"><__trans phrase="Manual"> 
     99                    <mt:elseif name="build_type" eq="3"><__trans phrase="Dynamic"> 
     100                    <mt:elseif name="build_type" eq="4"><__trans phrase="Background"> 
     101                    <mt:elseif name="build_type" eq="5"><__trans phrase="Scheduled"> 
    101102                    <mt:else><__trans phrase="Static"> 
    102                     </mt:if> 
     103                    </mt:if></mt:if> 
    103104                </td> 
    104105    </mt:if> 
  • branches/release-34/tmpl/cms/list_template.tmpl

    r1875 r1877  
    7171        </mtapp:statusmsg> 
    7272    </mt:if> 
    73     <mt:if name="dynamic_set"> 
     73    <mt:if name="saved"> 
    7474        <mtapp:statusmsg 
    75             id="dynamic-set" 
     75            id="saved-settings" 
    7676            class="success"> 
    7777            <__trans phrase="Your settings have been saved.">