Changeset 1847

Show
Ignore:
Timestamp:
04/10/08 23:52:17 (8 months ago)
Author:
bchoate
Message:

Show enabled archive types on template edit screen. BugId:79270

Files:

Legend:

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

    r1828 r1847  
    235235            # Populate template maps for this template 
    236236            my $maps = _populate_archive_loop( $app, $blog, $obj ); 
    237             $param->{object_loop} = $param->{template_map_loop} = $maps 
    238               if @$maps; 
     237            if (@$maps) { 
     238                $param->{object_loop} = $param->{template_map_loop} = $maps 
     239                  if @$maps; 
     240                my %archive_types = map { $_->{archive_label} => () } @$maps; 
     241                $param->{enabled_archive_types} = join(", ", sort keys %archive_types); 
     242            } 
    239243        } 
    240244        # publish options 
  • branches/release-34/tmpl/cms/edit_template.tmpl

    r1843 r1847  
    552552            <__trans phrase="Output file: <strong>[_1]</strong>" params="<mt:var name="outfile" escape="html">"> 
    553553</mt:if> 
    554 <mt:ignore> 
    555     <mt:if name="type" eq="archive"> 
    556         <__trans phrase="Enabled Mappings: [_1]" params="Monthly, Author-Monthly, Yearly"> 
    557     </mt:if> 
    558 </mt:ignore> 
     554<mt:if name="enabled_archive_types"> 
     555            <__trans phrase="Enabled Mappings: [_1]" params="<mt:var name="enabled_archive_types">"> 
     556</mt:if> 
    559557        </div> 
    560558    </div>