Dotclear


Ignore:
Timestamp:
08/30/13 10:37:08 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Parents:
1619:5d925866b5b3 (diff), 1593:0c884219a872 (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.
Message:

Merge 2.5 into default

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/index.php

    r1591 r1620  
    121121$__dashboard_items = new ArrayObject(array(new ArrayObject,new ArrayObject)); 
    122122 
    123 # Documentation links 
    124123$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 } 
    139124 
    140125if ($core->auth->user_prefs->dashboard->dcnews) { 
     
    180165} 
    181166 
     167# Documentation links 
     168if ($core->auth->user_prefs->dashboard->doclinks) { 
     169     if (!empty($__resources['doc'])) 
     170     { 
     171          $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>'; 
     172      
     173          foreach ($__resources['doc'] as $k => $v) { 
     174               $doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>'; 
     175          } 
     176      
     177          $doc_links .= '</ul>'; 
     178          $__dashboard_items[$dashboardItem][] = $doc_links; 
     179          $dashboardItem++; 
     180     } 
     181} 
     182 
    182183$core->callBehavior('adminDashboardItems', $core, $__dashboard_items); 
    183184 
     
    193194     dcPage::jsLoad('js/_index.js'). 
    194195     # --BEHAVIOR-- adminDashboardHeaders 
    195      $core->callBehavior('adminDashboardHeaders') 
     196     $core->callBehavior('adminDashboardHeaders'), 
     197     dcPage::breadcrumb( 
     198          array( 
     199          '<span class="page-title">'.__('Dashboard').' : '.html::escapeHTML($core->blog->name).'</span>' => '' 
     200          ), 
     201          false) 
    196202); 
    197203 
    198 echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Dashboard').'</span></h2>'; 
     204# Dotclear updates notifications 
     205if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) 
     206{ 
     207     $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 
     208     $new_v = $updater->check(DC_VERSION); 
     209     $version_info = $new_v ? $updater->getInfoURL() : ''; 
     210 
     211     if ($updater->getNotify() && $new_v) { 
     212          $message = 
     213          '<div><p>'.sprintf(__('Dotclear %s is available!'),$new_v).'</p> '. 
     214          '<ul><li><strong><a href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a></strong>'. 
     215          '</li><li><a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. 
     216          ($version_info ? ' </li><li><a href="'.$version_info.'">'.__('information about this version').'</a>' : ''). 
     217          '</li></ul></div>'; 
     218          dcPage::message($message,false,true); 
     219     } 
     220} 
    199221 
    200222if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) { 
     
    204226 
    205227if ($core->blog->status == 0) { 
    206      echo '<p class="static-msg">'.__('This blog is offline').'</p>'; 
     228     echo '<p class="static-msg">'.__('This blog is offline').'.</p>'; 
    207229} elseif ($core->blog->status == -1) { 
    208      echo '<p class="static-msg">'.__('This blog is removed').'</p>'; 
     230     echo '<p class="static-msg">'.__('This blog is removed').'.</p>'; 
    209231} 
    210232 
     
    305327     if ($i->count() > 0) 
    306328     { 
    307           $dashboardItems .= '<div>'; 
     329          $dashboardItems .= '<div class="db-item">'; 
    308330          foreach ($i as $v) { 
    309331               $dashboardItems .= $v; 
     
    339361               } 
    340362          } catch (Exception $e) { } 
    341            
     363      
    342364          echo 
    343365          '<div id="quick">'. 
    344366          '<h3>'.__('Quick entry').'</h3>'. 
    345           '<form id="quick-entry" action="post.php" method="post">'. 
    346           '<fieldset><legend>'.__('New entry').'</legend>'. 
    347           '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:'). 
     367          '<form id="quick-entry" action="post.php" method="post" class="fieldset">'. 
     368          '<h4>'.__('New entry').'</h4>'. 
     369          '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. 
    348370          form::field('post_title',20,255,'','maximal'). 
    349           '</label></p>'. 
     371          '</p>'. 
    350372          '<p class="area"><label class="required" '. 
    351373          'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 
    352374          form::textarea('post_content',50,7). 
    353375          '</p>'. 
    354           '<p><label for="cat_id" class="classic">'.__('Category:').' '. 
    355           form::combo('cat_id',$categories_combo).'</label></p>'. 
     376          '<p><label for="cat_id" class="classic">'.__('Category:').'</label> '. 
     377          form::combo('cat_id',$categories_combo).'</p>'. 
    356378          ($core->auth->check('categories', $core->blog->id) 
    357379               ? '<div>'. 
    358                '<p id="new_cat">'.__('Add a new category').'</p>'. 
     380               '<p id="new_cat" class="q-cat">'.__('Add a new category').'</p>'. 
     381               '<p class="q-cat"><label for="new_cat_title">'.__('Title:').'</label> '. 
     382               form::field('new_cat_title',30,255,'','').'</p>'. 
     383               '<p class="q-cat"><label for="new_cat_parent">'.__('Parent:').'</label> '. 
     384               form::combo('new_cat_parent',$categories_combo,'',''). 
     385               '</p>'. 
    359386               '<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'. 
    360                '<p><label for="new_cat_title">'.__('Title:').' '. 
    361                form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 
    362                '<p><label for="new_cat_parent">'.__('Parent:').' '. 
    363                form::combo('new_cat_parent',$categories_combo,'','maximal'). 
    364                '</label></p>'. 
    365387               '</div>' 
    366388               : ''). 
     
    376398          form::hidden('post_notes',''). 
    377399          '</p>'. 
    378           '</fieldset>'. 
    379400          '</form>'. 
    380401          '</div>'; 
  • admin/index.php

    r1558 r1620  
    247247} 
    248248 
     249$err = array(); 
     250 
     251# Check cache directory 
     252if (!is_dir(DC_TPL_CACHE)) { 
     253     $err[] = '<p>'.sprintf(__('Cache directory %s does not exist.'),DC_TPL_CACHE).'</p>'; 
     254} else if (!is_writable(DC_TPL_CACHE)) { 
     255     $err[] = '<p>'.sprintf(__('Cache directory %s is not writable.'),DC_TPL_CACHE).'</p>'; 
     256} 
     257 
     258# Check public directory 
     259if (!is_dir($core->blog->public_path)) { 
     260     $err[] = '<p>'.sprintf(__('Directory %s does not exist.'),$core->blog->public_path).'</p>'; 
     261} else if (!is_writable($core->blog->public_path)) { 
     262     $err[] = '<p>'.sprintf(__('Directory %s is not writable.'),$core->blog->public_path).'</p>'; 
     263} 
     264 
     265# Error list 
     266if (count($err) > 0) { 
     267     echo '<div class="error"><p><strong>Erreur&nbsp;:</strong></p>'. 
     268     '<ul><li>'.implode("</li><li>",$err).'</li></ul></div>'; 
     269} 
     270 
    249271# Plugins install messages 
    250272if (!empty($plugins_install['success'])) 
     
    267289# Dashboard columns (processed first, as we need to know the result before displaying the icons.) 
    268290$dashboardItems = ''; 
     291 
     292# Dotclear updates notifications 
     293if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) 
     294{ 
     295     $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 
     296     $new_v = $updater->check(DC_VERSION); 
     297     $version_info = $new_v ? $updater->getInfoURL() : ''; 
     298      
     299     if ($updater->getNotify() && $new_v) { 
     300          $dashboardItems .= 
     301          '<div id="upg-notify" class="static-msg"><p>'.sprintf(__('Dotclear %s is available!'),$new_v).'</p> '. 
     302          '<ul><li><strong><a href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a></strong>'. 
     303          '</li><li><a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. 
     304          ($version_info ? ' </li><li>'.sprintf(__('<a href=\"%s\">Information about this version</a>.'),$version_info) : ''). 
     305          '</li></ul></div>'; 
     306     } 
     307} 
    269308 
    270309# Errors modules notifications 
Note: See TracChangeset for help on using the changeset viewer.

Sites map