Changeset 2227:bfa7b3467627 for admin
- Timestamp:
- 10/03/13 13:47:05 (12 years ago)
- Branch:
- dcRepo
- Location:
- admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/blog_theme.php
r2222 r2227 62 62 63 63 # -- Display module configuration page -- 64 if ($list->setConfiguration File($core->blog->settings->system->theme)) {64 if ($list->setConfiguration($core->blog->settings->system->theme)) { 65 65 66 66 # Get content before page headers 67 include $list-> getConfigurationFile();67 include $list->includeConfiguration(); 68 68 69 69 # Gather content 70 $list-> setConfigurationContent();70 $list->getConfiguration(); 71 71 72 72 # Display page … … 81 81 array( 82 82 html::escapeHTML($core->blog->name) => '', 83 __('Blog appearance') => 'blog_theme.php',83 __('Blog appearance') => $list->getURL('',false), 84 84 '<span class="page-title">'.__('Theme configuration').'</span>' => '' 85 85 )) … … 87 87 88 88 # Display previously gathered content 89 $list-> getConfigurationContent();89 $list->displayConfiguration(); 90 90 91 91 dcPage::close(); … … 107 107 dcPage::jsLoad('js/_blog_theme.js'). 108 108 dcPage::jsPageTabs(). 109 dcPage::jsColorPicker() ,109 dcPage::jsColorPicker(). 110 110 111 111 # --BEHAVIOR-- themesToolsHeaders … … 120 120 121 121 # -- Display modules lists -- 122 if ($core->auth->isSuperAdmin() && $list->is PathWritable()) {122 if ($core->auth->isSuperAdmin() && $list->isWritablePath()) { 123 123 124 124 # Updated modules from repo … … 129 129 '<h3>'.html::escapeHTML(__('Update themes')).'</h3>'. 130 130 '<p>'.sprintf( 131 __('There is one theme to update available from %2$s.', 'There are %s themes to update available from %s.', count($modules)), 132 count($modules), 133 '<a href="http://dotaddict.org/dc2/themes">Dotaddict</a>' 131 __('There is one theme to update available from repository.', 'There are %s themes to update available from repository.', count($modules)), 132 count($modules) 134 133 ).'</p>'; 135 134 136 135 $list 137 ->newList('theme-update') 136 ->initList('theme-update') 137 ->setTab('themes') 138 138 ->setModules($modules) 139 ->setPageTab('themes') 140 ->displayModulesList( 139 ->displayModules( 141 140 /*cols */ array('sshot', 'name', 'desc', 'author', 'version', 'current_version', 'parent'), 142 141 /* actions */ array('update', 'delete') 143 );144 145 echo146 '</div>';147 }148 }149 150 # List all active plugins151 echo152 '<div class="multi-part" id="themes" title="'.__('Installed themes').'">';153 154 $modules = $list->modules->getModules();155 if (!empty($modules)) {156 157 echo158 '<h3>'.__('Activated themes').'</h3>'.159 '<p>'.__('Manage installed themes from this list.').'</p>';160 161 $list162 ->newList('theme-activate')163 ->setModules($modules)164 ->setPageTab('themes')165 ->displayModulesList(166 /* cols */ array('sshot', 'distrib', 'name', 'config', 'desc', 'author', 'version', 'parent'),167 /* actions */ array('select', 'deactivate', 'delete')168 );169 }170 171 $modules = $list->modules->getDisabledModules();172 if (!empty($modules)) {173 174 echo175 '<h3>'.__('Deactivated themes').'</h3>'.176 '<p>'.__('Deactivated themes are installed but not usable. You can activate them from here.').'</p>';177 178 $list179 ->newList('theme-deactivate')180 ->setModules($modules)181 ->setPageTab('themes')182 ->displayModulesList(183 /* cols */ array('name', 'distrib'),184 /* actions */ array('activate', 'delete')185 );186 }187 188 echo189 '</div>';190 191 if ($core->auth->isSuperAdmin() && $list->isPathWritable()) {192 193 # New modules from repo194 $search = $list->getSearchQuery();195 $modules = $search ? $list->store->search($search) : $list->store->get();196 197 if (!empty($search) || !empty($modules)) {198 echo199 '<div class="multi-part" id="new" title="'.__('Add themes from Dotaddict').'">'.200 '<h3>'.__('Add themes from Dotaddict repository').'</h3>';201 202 $list203 ->newList('theme-new')204 ->setModules($modules)205 ->setPageTab('new')206 ->displaySearchForm()207 ->displayNavMenu()208 ->displayModulesList(209 /* cols */ array('expander', 'sshot', 'name', 'score', 'config', 'desc', 'author', 'version', 'parent', 'details', 'support'),210 /* actions */ array('install'),211 /* nav limit */ true212 142 ); 213 143 … … 221 151 '</div>'; 222 152 } 153 } 154 155 # Activated modules 156 $modules = $list->modules->getModules(); 157 if (!empty($modules)) { 158 159 echo 160 '<div class="multi-part" id="themes" title="'.__('Installed themes').'">'. 161 '<h3>'.__('Installed themes').'</h3>'. 162 '<p>'.__('You can configure and manage installed themes from this list.').'</p>'; 163 164 $list 165 ->initList('theme-activate') 166 ->setTab('themes') 167 ->setModules($modules) 168 ->displayModules( 169 /* cols */ array('sshot', 'distrib', 'name', 'config', 'desc', 'author', 'version', 'parent'), 170 /* actions */ array('select', 'deactivate', 'delete') 171 ); 172 173 echo 174 '</div>'; 175 } 176 177 # Deactivated modules 178 $modules = $list->modules->getDisabledModules(); 179 if (!empty($modules)) { 180 181 echo 182 '<div class="multi-part" id="deactivate" title="'.__('Deactivated themes').'">'. 183 '<h3>'.__('Deactivated themes').'</h3>'. 184 '<p>'.__('Deactivated themes are installed but not usable. You can activate them from here.').'</p>'; 185 186 $list 187 ->initList('theme-deactivate') 188 ->setTab('themes') 189 ->setModules($modules) 190 ->displayModules( 191 /* cols */ array('name', 'distrib'), 192 /* actions */ array('activate', 'delete') 193 ); 194 195 echo 196 '</div>'; 197 } 198 199 if ($core->auth->isSuperAdmin() && $list->isWritablePath()) { 200 201 # New modules from repo 202 $search = $list->getSearch(); 203 $modules = $search ? $list->store->search($search) : $list->store->get(); 204 205 if (!empty($search) || !empty($modules)) { 206 echo 207 '<div class="multi-part" id="new" title="'.__('Add themes').'">'. 208 '<h3>'.__('Add themes from repository').'</h3>'. 209 '<p>'.__('You can search and install themes directly from repository.').'</p>'; 210 211 $list 212 ->initList('theme-new') 213 ->setTab('new') 214 ->setModules($modules) 215 ->displaySearch() 216 ->displayIndex() 217 ->displayModules( 218 /* cols */ array('expander', 'sshot', 'name', 'score', 'config', 'desc', 'author', 'version', 'parent', 'details', 'support'), 219 /* actions */ array('install'), 220 /* nav limit */ true 221 ); 222 223 echo 224 '<p class="info vertical-separator">'.sprintf( 225 __("Visit %s repository, the resources center for Dotclear."), 226 '<a href="http://dotaddict.org/dc2/themes">Dotaddict</a>' 227 ). 228 '</p>'. 229 230 '</div>'; 231 } 223 232 224 233 # Add a new plugin 225 234 echo 226 235 '<div class="multi-part" id="addtheme" title="'.__('Install or upgrade manually').'">'. 236 '<h3>'.__('Add themes from a package').'</h3>'. 227 237 '<p>'.__('You can install themes by uploading or downloading zip files.').'</p>'; 228 238 -
admin/plugins.php
r2222 r2227 56 56 57 57 # -- Display module configuration page -- 58 if ($list->setConfiguration File()) {58 if ($list->setConfiguration()) { 59 59 60 60 # Get content before page headers 61 include $list-> getConfigurationFile();61 include $list->includeConfiguration(); 62 62 63 63 # Gather content 64 $list-> setConfigurationContent();64 $list->getConfiguration(); 65 65 66 66 # Display page … … 73 73 array( 74 74 html::escapeHTML($core->blog->name) => '', 75 '<a href="'.$list->getPageURL().'">'.__('Plugins management').'</a>' => '',75 __('Plugins management') => $list->getURL('',false), 76 76 '<span class="page-title">'.__('Plugin configuration').'</span>' => '' 77 77 )) … … 79 79 80 80 # Display previously gathered content 81 $list-> getConfigurationContent();81 $list->displayConfiguration(); 82 82 83 83 dcPage::close(); … … 125 125 '<li>'.$k.'</li>'; 126 126 } 127 echo 128 127 128 echo 129 129 '</ul></div>'; 130 130 } … … 143 143 144 144 # -- Display modules lists -- 145 if ($core->auth->isSuperAdmin() && $list->is PathWritable()) {145 if ($core->auth->isSuperAdmin() && $list->isWritablePath()) { 146 146 147 147 # Updated modules from repo … … 152 152 '<h3>'.html::escapeHTML(__('Update plugins')).'</h3>'. 153 153 '<p>'.sprintf( 154 __('There is one plugin to update available from %2$s.', 'There are %s plugins to update available from %s.', count($modules)), 155 count($modules), 156 '<a href="http://dotaddict.org/dc2/plugins">Dotaddict</a>' 154 __('There is one plugin to update available from repository.', 'There are %s plugins to update available from repository.', count($modules)), 155 count($modules) 157 156 ).'</p>'; 158 157 159 158 $list 160 ->newList('plugin-update') 159 ->initList('plugin-update') 160 ->setTab('update') 161 161 ->setModules($modules) 162 ->setPageTab('update') 163 ->displayModulesList( 162 ->displayModules( 164 163 /*cols */ array('icon', 'name', 'version', 'current_version', 'desc'), 165 164 /* actions */ array('update') 166 );167 168 echo169 '</div>';170 }171 }172 173 # List all active plugins174 echo175 '<div class="multi-part" id="plugins" title="'.__('Installed plugins').'">';176 177 $modules = $list->modules->getModules();178 if (!empty($modules)) {179 echo180 '<h3>'.__('Activated plugins').'</h3>'.181 '<p>'.__('Manage installed plugins from this list.').'</p>';182 183 $list184 ->newList('plugin-activate')185 ->setModules($modules)186 ->setPageTab('plugins')187 ->displayModulesList(188 /* cols */ array('expander', 'icon', 'name', 'config', 'version', 'desc', 'distrib'),189 /* actions */ array('deactivate', 'delete')190 );191 }192 193 # Deactivated modules194 $modules = $list->modules->getDisabledModules();195 if (!empty($modules)) {196 echo197 '<h3>'.__('Deactivated plugins').'</h3>'.198 '<p>'.__('Deactivated plugins are installed but not usable. You can activate them from here.').'</p>';199 200 $list201 ->newList('plugin-deactivate')202 ->setModules($modules)203 ->setPageTab('plugins')204 ->displayModulesList(205 /* cols */ array('icon', 'name', 'distrib'),206 /* actions */ array('activate', 'delete')207 );208 }209 210 echo211 '</div>';212 213 if ($core->auth->isSuperAdmin() && $list->isPathWritable()) {214 215 # New modules from repo216 $search = $list->getSearchQuery();217 $modules = $search ? $list->store->search($search) : $list->store->get();218 219 if (!empty($search) || !empty($modules)) {220 echo221 '<div class="multi-part" id="new" title="'.__('Add plugins from Dotaddict').'">'.222 '<h3>'.__('Add plugins from Dotaddict repository').'</h3>';223 224 $list225 ->newList('plugin-new')226 ->setModules($modules)227 ->setPageTab('new')228 ->displaySearchForm()229 ->displayNavMenu()230 ->displayModulesList(231 /* cols */ array('expander', 'name', 'score', 'version', 'desc'),232 /* actions */ array('install'),233 /* nav limit */ true234 165 ); 235 166 … … 243 174 '</div>'; 244 175 } 176 } 177 178 echo 179 '<div class="multi-part" id="plugins" title="'.__('Installed plugins').'">'; 180 181 # Activated modules 182 $modules = $list->modules->getModules(); 183 if (!empty($modules)) { 184 185 echo 186 '<h3>'.($core->auth->isSuperAdmin() ?__('Activated plugins') : __('Installed plugins')).'</h3>'. 187 '<p>'.__('You can configure and manage installed plugins from this list.').'</p>'; 188 189 $list 190 ->initList('plugin-activate') 191 ->setTab('plugins') 192 ->setModules($modules) 193 ->displayModules( 194 /* cols */ array('expander', 'icon', 'name', 'config', 'version', 'desc', 'distrib'), 195 /* actions */ array('deactivate', 'delete') 196 ); 197 } 198 199 # Deactivated modules 200 if ($core->auth->isSuperAdmin()) { 201 $modules = $list->modules->getDisabledModules(); 202 if (!empty($modules)) { 203 echo 204 '<h3>'.__('Deactivated plugins').'</h3>'. 205 '<p>'.__('Deactivated plugins are installed but not usable. You can activate them from here.').'</p>'; 206 207 $list 208 ->initList('plugin-deactivate') 209 ->setTab('plugins') 210 ->setModules($modules) 211 ->displayModules( 212 /* cols */ array('icon', 'name', 'distrib'), 213 /* actions */ array('activate', 'delete') 214 ); 215 } 216 } 217 218 echo 219 '</div>'; 220 221 if ($core->auth->isSuperAdmin() && $list->isWritablePath()) { 222 223 # New modules from repo 224 $search = $list->getSearch(); 225 $modules = $search ? $list->store->search($search) : $list->store->get(); 226 227 if (!empty($search) || !empty($modules)) { 228 echo 229 '<div class="multi-part" id="new" title="'.__('Add plugins').'">'. 230 '<h3>'.__('Add plugins from repository').'</h3>'. 231 '<p>'.__('You can search and install plugins directly from repository.').'</p>'; 232 233 $list 234 ->initList('plugin-new') 235 ->setTab('new') 236 ->setModules($modules) 237 ->displaySearch() 238 ->displayIndex() 239 ->displayModules( 240 /* cols */ array('expander', 'name', 'score', 'version', 'desc'), 241 /* actions */ array('install'), 242 /* nav limit */ true 243 ); 244 245 echo 246 '<p class="info vertical-separator">'.sprintf( 247 __("Visit %s repository, the resources center for Dotclear."), 248 '<a href="http://dotaddict.org/dc2/plugins">Dotaddict</a>' 249 ). 250 '</p>'. 251 252 '</div>'; 253 } 245 254 246 255 # Add a new plugin 247 256 echo 248 257 '<div class="multi-part" id="addplugin" title="'.__('Install or upgrade manually').'">'. 258 '<h3>'.__('Add plugins from a package').'</h3>'. 249 259 '<p>'.__('You can install plugins by uploading or downloading zip files.').'</p>'; 250 260 … … 259 269 260 270 # -- Notice for super admin -- 261 if ($core->auth->isSuperAdmin() && !$list->is PathWritable()) {271 if ($core->auth->isSuperAdmin() && !$list->isWritablePath()) { 262 272 echo 263 273 '<p class="warning">'.__('Some functions are disabled, please give write access to your plugins directory to enable them.').'</p>'; -
admin/services.php
r2216 r2227 485 485 } 486 486 487 $module = adminModulesList:: parseModuleInfo($id, $module);487 $module = adminModulesList::sanitizeModule($id, $module); 488 488 489 489 $rsp = new xmlTag('module'); -
admin/style/default.css
r2221 r2227 2348 2348 display: block; 2349 2349 } 2350 .debug { 2351 background: #ff6; 2352 padding: 3px 0.5em 2px; 2353 } 2350 2354 /* ---------------------------------------------- Couleurs ajoutées via javascript 2351 2355 /* color-picker.js */
Note: See TracChangeset
for help on using the changeset viewer.