Changeset 152:cab8de13f64e for admin
- Timestamp:
- 05/04/11 23:55:34 (14 years ago)
- Branch:
- userprefs
- Parents:
- 151:f677be1de397 (diff), 150:9302f6bed60c (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
r112 r152 44 44 45 45 # Check dashboard module prefs 46 $core->auth->user_prefs->loadPrefs();47 48 // Set favorites menu49 $ws = $core->auth->user_prefs->addWorkspace('favorites');50 $count = 0;51 foreach ($ws->dumpPrefs() as $k => $v) {52 // User favorites only53 if (!$v['global']) {54 $count++;55 $fav = unserialize($v['value']);56 $_menu['Favorites']->addItem($fav['title'],$fav['url'],$fav['small-icon'],57 preg_match('/'.$fav['url'].'(\?.*)?$/',$_SERVER['REQUEST_URI']),58 (($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)),$fav['id'],$fav['class']);59 }60 }61 if (!$count) {62 // Global favorites if any63 foreach ($ws->dumpPrefs() as $k => $v) {64 $count++;65 $fav = unserialize($v['value']);66 $_menu['Favorites']->addItem($fav['title'],$fav['url'],$fav['small-icon'],67 preg_match('/'.$fav['url'].'(\?.*)?$/',$_SERVER['REQUEST_URI']),68 (($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)),$fav['id'],$fav['class']);69 }70 }71 if (!$count) {72 // No user or global favorites, add "new entry" fav73 $_menu['Favorites']->addItem(__('New entry'),'post.php','images/menu/edit.png',74 preg_match('/post.php$/',$_SERVER['REQUEST_URI']),75 $core->auth->check('usage,contentadmin',$core->blog->id),'menu-new-post',null);76 }77 $core->auth->user_prefs->addWorkspace('dashboard');78 46 if (!$core->auth->user_prefs->dashboard->prefExists('doclinks')) { 79 47 if (!$core->auth->user_prefs->dashboard->prefExists('doclinks',true)) { … … 116 84 ($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title'])); 117 85 $__dashboard_icons[$fav['name']] = new ArrayObject(array($title,$fav['url'],$fav['large-icon'])); 86 87 # Let plugins set their own title for favorite on dashboard 88 $core->callBehavior('adminDashboardFavsIcon',$core,$fav['name'],$__dashboard_icons[$fav['name']]); 118 89 } 119 90 } … … 128 99 ($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title'])); 129 100 $__dashboard_icons[$fav['name']] = new ArrayObject(array($title,$fav['url'],$fav['large-icon'])); 101 102 # Let plugins set their own title for favorite on dashboard 103 $core->callBehavior('adminDashboardFavsIcon',$core,$fav['name'],$__dashboard_icons[$fav['name']]); 130 104 } 131 105 } … … 298 272 299 273 # Dashboard icons 274 <<<<<<< local 275 echo '<div id="dashboard-main"'.($dashboardItems ? '' : ' class="fullwidth"').'><div id="icons">'; 276 ======= 300 277 echo '<div id="dashboard-main"><div id="icons"'.($dashboardItems ? '' : 'class="fullwidth"').'>'; 278 >>>>>>> other 301 279 foreach ($__dashboard_icons as $i) 302 280 { -
admin/index.php
r142 r152 272 272 273 273 # Dashboard icons 274 <<<<<<< local 274 275 echo '<div id="dashboard-main"'.($dashboardItems ? '' : ' class="fullwidth"').'><div id="icons">'; 276 ======= 277 echo '<div id="dashboard-main"><div id="icons"'.($dashboardItems ? '' : 'class="fullwidth"').'>'; 278 >>>>>>> other 275 279 foreach ($__dashboard_icons as $i) 276 280 {
Note: See TracChangeset
for help on using the changeset viewer.