Changeset 1828

Show
Ignore:
Timestamp:
04/10/08 02:18:49 (8 months ago)
Author:
auno
Message:

Removed 'Clone Template' action for system and email templates. BugzID:78613

Files:

Legend:

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

    r1786 r1828  
    664664                code => "${pkg}Template::clone_templates", 
    665665                permission => 'edit_templates', 
     666                condition => sub { 
     667                    my $app       = MT->app; 
     668                    my $tmpl_type = $app->param('filter_key'); 
     669                    return $tmpl_type eq 'system_templates' ? 0 
     670                      : $tmpl_type    eq 'email_templates'  ? 0 
     671                      :                                       1; 
     672                }, 
    666673                order => 400, 
    667674            }, 
  • branches/release-34/lib/MT/CMS/Template.pm

    r1823 r1828  
    644644            $app->param( 'filter_key', 'archive_templates' ); 
    645645        } 
     646        elsif ( $tmpl_type eq 'system' ) { 
     647            $filter = 'system_templates'; 
     648            $app->param( 'filter_key', 'system_templates' ); 
     649        } 
     650        elsif ( $tmpl_type eq 'email' ) { 
     651            $filter = 'email_templates'; 
     652            $app->param( 'filter_key', 'email_templates' ); 
     653        } 
    646654        $terms->{type} = $types{$tmpl_type}->{type}; 
    647655        my $tmpl_param = $app->listing(