Changeset 1718:5bbbd8bb73fb for admin/index.php
- Timestamp:
- 09/04/13 14:28:18 (12 years ago)
- Branch:
- default
- Children:
- 1719:b8c48f380463, 1720:f23f530dfb4a
- Parents:
- 1717:9df047961e9c (diff), 1710:f6287a0366e3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/index.php
r1708 r1718 63 63 $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean'); 64 64 } 65 66 // Handle folded/unfolded sections in admin from user preferences 67 $ws = $core->auth->user_prefs->addWorkspace('toggles'); 68 if (!$core->auth->user_prefs->toggles->prefExists('unfolded_sections')) { 69 $core->auth->user_prefs->toggles->put('unfolded_sections','','string','Folded sections in admin',null,true); 70 } 71 65 72 66 73 # Dashboard icons … … 121 128 $__dashboard_items = new ArrayObject(array(new ArrayObject,new ArrayObject)); 122 129 123 # Documentation links124 130 $dashboardItem = 0; 125 if ($core->auth->user_prefs->dashboard->doclinks) {126 if (!empty($__resources['doc']))127 {128 $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>';129 130 foreach ($__resources['doc'] as $k => $v) {131 $doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>';132 }133 134 $doc_links .= '</ul>';135 $__dashboard_items[$dashboardItem][] = $doc_links;136 $dashboardItem++;137 }138 }139 131 140 132 if ($core->auth->user_prefs->dashboard->dcnews) { … … 180 172 } 181 173 174 # Documentation links 175 if ($core->auth->user_prefs->dashboard->doclinks) { 176 if (!empty($__resources['doc'])) 177 { 178 $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>'; 179 180 foreach ($__resources['doc'] as $k => $v) { 181 $doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>'; 182 } 183 184 $doc_links .= '</ul>'; 185 $__dashboard_items[$dashboardItem][] = $doc_links; 186 $dashboardItem++; 187 } 188 } 189 182 190 $core->callBehavior('adminDashboardItems', $core, $__dashboard_items); 183 191 … … 193 201 dcPage::jsLoad('js/_index.js'). 194 202 # --BEHAVIOR-- adminDashboardHeaders 195 $core->callBehavior('adminDashboardHeaders') 203 $core->callBehavior('adminDashboardHeaders'), 204 dcPage::breadcrumb( 205 array( 206 '<span class="page-title">'.__('Dashboard').' : '.html::escapeHTML($core->blog->name).'</span>' => '' 207 ), 208 false) 196 209 ); 197 210 198 echo '<h2>'.html::escapeHTML($core->blog->name).' › <span class="page-title">'.__('Dashboard').'</span></h2>'; 211 # Dotclear updates notifications 212 if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) 213 { 214 $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 215 $new_v = $updater->check(DC_VERSION); 216 $version_info = $new_v ? $updater->getInfoURL() : ''; 217 218 if ($updater->getNotify() && $new_v) { 219 echo 220 '<div class="dc-update"><h3>'.sprintf(__('Dotclear %s is available!'),$new_v).'</h3> '. 221 '<p><a class="button submit" href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a> '. 222 '<a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. 223 ($version_info ? ' </p>'. 224 '<p><a href="'.$version_info.'" class="info">'.__('information about this version').'</a>' : '').'</p>'. 225 '</div>'; 226 } 227 } 199 228 200 229 if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) { … … 204 233 205 234 if ($core->blog->status == 0) { 206 echo '<p class="static-msg">'.__('This blog is offline').' </p>';235 echo '<p class="static-msg">'.__('This blog is offline').'.</p>'; 207 236 } elseif ($core->blog->status == -1) { 208 echo '<p class="static-msg">'.__('This blog is removed').' </p>';237 echo '<p class="static-msg">'.__('This blog is removed').'.</p>'; 209 238 } 210 239 … … 313 342 if ($i->count() > 0) 314 343 { 315 $dashboardItems .= '<div >';344 $dashboardItems .= '<div class="db-item">'; 316 345 foreach ($i as $v) { 317 346 $dashboardItems .= $v; … … 347 376 } 348 377 } catch (Exception $e) { } 349 378 350 379 echo 351 380 '<div id="quick">'. 352 381 '<h3>'.__('Quick entry').'</h3>'. 353 '<form id="quick-entry" action="post.php" method="post" >'.354 '< fieldset><legend>'.__('New entry').'</legend>'.355 '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:'). 382 '<form id="quick-entry" action="post.php" method="post" class="fieldset">'. 383 '<h4>'.__('New entry').'</h4>'. 384 '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. 356 385 form::field('post_title',20,255,'','maximal'). 357 '</ label></p>'.386 '</p>'. 358 387 '<p class="area"><label class="required" '. 359 388 'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 360 389 form::textarea('post_content',50,7). 361 390 '</p>'. 362 '<p><label for="cat_id" class="classic">'.__('Category:').' '.363 form::combo('cat_id',$categories_combo).'</ label></p>'.391 '<p><label for="cat_id" class="classic">'.__('Category:').'</label> '. 392 form::combo('cat_id',$categories_combo).'</p>'. 364 393 ($core->auth->check('categories', $core->blog->id) 365 394 ? '<div>'. 366 '<p id="new_cat">'.__('Add a new category').'</p>'. 395 '<p id="new_cat" class="q-cat">'.__('Add a new category').'</p>'. 396 '<p class="q-cat"><label for="new_cat_title">'.__('Title:').'</label> '. 397 form::field('new_cat_title',30,255,'','').'</p>'. 398 '<p class="q-cat"><label for="new_cat_parent">'.__('Parent:').'</label> '. 399 form::combo('new_cat_parent',$categories_combo,'',''). 400 '</p>'. 367 401 '<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'. 368 '<p><label for="new_cat_title">'.__('Title:').' '.369 form::field('new_cat_title',30,255,'','maximal').'</label></p>'.370 '<p><label for="new_cat_parent">'.__('Parent:').' '.371 form::combo('new_cat_parent',$categories_combo,'','maximal').372 '</label></p>'.373 402 '</div>' 374 403 : ''). … … 384 413 form::hidden('post_notes',''). 385 414 '</p>'. 386 '</fieldset>'.387 415 '</form>'. 388 416 '</div>'; -
admin/index.php
r1699 r1718 257 257 258 258 # Check cache directory 259 if (!is_dir(DC_TPL_CACHE)) { 260 $err[] = '<p>'.sprintf(__('Cache directory %s does not exist.'),DC_TPL_CACHE).'</p>'; 261 } else if (!is_writable(DC_TPL_CACHE)) { 262 $err[] = '<p>'.sprintf(__('Cache directory %s is not writable.'),DC_TPL_CACHE).'</p>'; 259 if ( $core->auth->isSuperAdmin() ) { 260 if (!is_dir(DC_TPL_CACHE) || !is_writable(DC_TPL_CACHE)) { 261 $err[] = '<p>'.__("The cache directory does not exist or is not writable. You must create this directory with sufficient rights and affect this location to \"DC_TPL_CACHE\" in inc/config.php file.").'</p>'; 262 } 263 } else { 264 if (!is_dir(DC_TPL_CACHE) || !is_writable(DC_TPL_CACHE)) { 265 $err[] = '<p>'.__("The cache directory does not exist or is not writable. You should contact your administrator.").'</p>'; 266 } 263 267 } 264 268 265 269 # Check public directory 266 if (!is_dir($core->blog->public_path)) { 267 $err[] = '<p>'.sprintf(__('Directory %s does not exist.'),$core->blog->public_path).'</p>'; 268 } else if (!is_writable($core->blog->public_path)) { 269 $err[] = '<p>'.sprintf(__('Directory %s is not writable.'),$core->blog->public_path).'</p>'; 270 if ( $core->auth->isSuperAdmin() ) { 271 if (!is_dir($core->blog->public_path) || !is_writable($core->blog->public_path)) { 272 $err[] = '<p>'.__("There is no writable directory /public/ at the location set in about:config \"public_path\". You must create this directory with sufficient rights (or change this setting).").'</p>'; 273 } 274 } else { 275 if (!is_dir($core->blog->public_path) || !is_writable($core->blog->public_path)) { 276 $err[] = '<p>'.__("There is no writable root directory for the media manager. You should contact your administrator.").'</p>'; 277 } 270 278 } 271 279
Note: See TracChangeset
for help on using the changeset viewer.