Changeset 5259
- Timestamp:
- Mar 22, 2010, 4:03:43 PM (14 years ago)
- Location:
- trunk/admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/themes.class.php
r5258 r5259 81 81 break; 82 82 } 83 84 $missing_parent = $this->missing_parent_theme($theme_id); 85 if (isset($missing_parent)) 86 { 87 array_push( 88 $errors, 89 sprintf( 90 l10n('Impossible to activate this theme, the parent theme is missing: %s'), 91 $missing_parent 92 ) 93 ); 94 95 break; 96 } 83 97 84 98 $query = " … … 167 181 } 168 182 return $errors; 183 } 184 185 function missing_parent_theme($theme_id) 186 { 187 if (!isset($this->fs_themes[$theme_id]['parent'])) 188 { 189 return null; 190 } 191 192 $parent = $this->fs_themes[$theme_id]['parent']; 193 194 if ('default' == $parent) 195 { 196 return null; 197 } 198 199 if (!isset($this->fs_themes[$parent])) 200 { 201 return $parent; 202 } 203 204 return $this->missing_parent_theme($parent); 169 205 } 170 206 -
trunk/admin/themes/default/template/themes_installed.tpl
r5258 r5259 34 34 <div class="themeShot"><img src="{$theme.screenshot}"></div> 35 35 <div class="themeActions"> 36 37 {if $theme.activable} 36 38 <a href="{$activate_baseurl}{$theme.id}" title="{'Make this theme available to users'|@translate}">{'Activate'|@translate}</a> 39 {else} 40 <span title="{$theme.activate_tooltip}">{'Activate'|@translate}</span> 41 {/if} 42 37 43 | 44 38 45 {if $theme.deletable} 39 46 <a href="{$delete_baseurl}{$theme.id}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');" title="{'Delete this theme'|@translate}">{'Delete'|@translate}</a> … … 41 48 <span title="{$theme.delete_tooltip}">{'Delete'|@translate}</span> 42 49 {/if} 50 43 51 </div> 44 52 -
trunk/admin/themes_installed.php
r5258 r5259 90 90 else 91 91 { 92 // is the theme "activable" ? 93 $fs_theme['activable'] = true; 94 95 $missing_parent = $themes->missing_parent_theme($theme_id); 96 if (isset($missing_parent)) 97 { 98 $fs_theme['activable'] = false; 99 100 $fs_theme['activate_tooltip'] = sprintf( 101 l10n('Impossible to activate this theme, the parent theme is missing: %s'), 102 $missing_parent 103 ); 104 } 105 106 // is the theme "deletable" ? 92 107 $children = $themes->get_children_themes($theme_id); 108 109 $fs_theme['deletable'] = true; 93 110 94 111 if (count($children) > 0) … … 100 117 implode(', ', $children) 101 118 ); 102 }103 else104 {105 $fs_theme['deletable'] = true;106 119 } 107 120
Note: See TracChangeset
for help on using the changeset viewer.