Changeset 2240:2553775ae2fe
- Timestamp:
- 10/04/13 09:19:33 (12 years ago)
- Branch:
- dcRepo
- Parents:
- 2237:911f18a5b287 (diff), 2239:cd7100fa57db (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:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/index.php
r2216 r2240 74 74 $__dashboard_icons = new ArrayObject(); 75 75 76 # Dashboard favorites 77 $post_count = $core->blog->getPosts(array(),true)->f(0); 78 $str_entries = ($post_count > 1) ? __('%d entries') : __('%d entry'); 79 80 $comment_count = $core->blog->getComments(array(),true)->f(0); 81 $str_comments = ($comment_count > 1) ? __('%d comments') : __('%d comment'); 82 83 $ws = $core->auth->user_prefs->addWorkspace('favorites'); 84 $count = 0; 85 foreach ($ws->dumpPrefs() as $k => $v) { 86 // User favorites only 87 if (!$v['global']) { 88 $fav = unserialize($v['value']); 89 if (($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)) { 90 if (dc_valid_fav($fav['url'])) { 91 $count++; 92 $title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 93 ($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title'])); 94 $__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon'])); 95 96 # Let plugins set their own title for favorite on dashboard 97 $core->callBehavior('adminDashboardFavsIcon',$core,$fav['name'],$__dashboard_icons[$fav['name']]); 98 } 99 } 100 } 101 } 102 if (!$count) { 103 // Global favorites if any 104 foreach ($ws->dumpPrefs() as $k => $v) { 105 $fav = unserialize($v['value']); 106 if (($fav['permissions'] == '*') || $core->auth->check($fav['permissions'],$core->blog->id)) { 107 if (dc_valid_fav($fav['url'])) { 108 $count++; 109 $title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 110 ($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title'])); 111 $__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon'])); 112 113 # Let plugins set their own title for favorite on dashboard 114 $core->callBehavior('adminDashboardFavsIcon',$core,$fav['name'],$__dashboard_icons[$fav['name']]); 115 } 116 } 117 } 118 } 119 if (!$count) { 120 // No user or global favorites, add "user pref" and "new entry" fav 121 if ($core->auth->check('usage,contentadmin',$core->blog->id)) { 122 $__dashboard_icons['new_post'] = new ArrayObject(array(__('New entry'),'post.php','images/menu/edit-b.png')); 123 } 124 $__dashboard_icons['prefs'] = new ArrayObject(array(__('My preferences'),'preferences.php','images/menu/user-pref-b.png')); 125 } 76 $favs = $core->favs->getUserFavorites(); 77 $core->favs->appendDashboardIcons($__dashboard_icons); 126 78 127 79 # Check plugins and themes update from repository … … 146 98 147 99 # Latest news for dashboard 148 $__dashboard_items = new ArrayObject(array(new ArrayObject ,new ArrayObject));100 $__dashboard_items = new ArrayObject(array(new ArrayObject(),new ArrayObject())); 149 101 150 102 $dashboardItem = 0; … … 168 120 foreach ($feed->items as $item) 169 121 { 170 $dt = isset($item->link) ? '<a href="'.$item->link.'" title="'.$item->title.' ('.__('new window').')">'.122 $dt = isset($item->link) ? '<a href="'.$item->link.'" class="outgoing" title="'.$item->title.'">'. 171 123 $item->title.' <img src="images/outgoing-blue.png" alt="" /></a>' : $item->title; 172 124 … … 199 151 200 152 foreach ($__resources['doc'] as $k => $v) { 201 $doc_links .= '<li><a href="'.$v.'" title="'.$k.' ('.__('new window').')">'.$k.153 $doc_links .= '<li><a class="outgoing" href="'.$v.'" title="'.$k.'">'.$k. 202 154 ' <img src="images/outgoing-blue.png" alt="" /></a></li>'; 203 155 } … … 326 278 if ($core->auth->isSuperAdmin()) 327 279 { 328 $list = array(); 329 foreach ($core->plugins->getErrors() as $k => $error) { 330 $list[] = '<li>'.$error.'</li>'; 331 } 332 333 if (count($list) > 0) { 280 $list = $core->plugins->getErrors(); 281 if (!empty($list)) { 334 282 echo 335 '<div class="error" id="module-errors" class="error"><p>'.__(' Some plugins are installed twice:').'</p> '.336 '<ul> '.implode("\n",$list).'</ul></div>';283 '<div class="error" id="module-errors" class="error"><p>'.__('Errors have occured with following plugins:').'</p> '. 284 '<ul><li>'.implode("</li>\n<li>", $list).'</li></ul></div>'; 337 285 } 338 286 } -
admin/index.php
r2239 r2240 76 76 $favs = $core->favs->getUserFavorites(); 77 77 $core->favs->appendDashboardIcons($__dashboard_icons); 78 79 # Check plugins and themes update from repository 80 function dc_check_store_update($mod, $url, $img, $icon) 81 { 82 $repo = new dcStore($mod, $url); 83 $upd = $repo->get(true); 84 if (!empty($upd)) { 85 $icon[0] .= '<br />'.sprintf(__('An update is available', '%s updates are available.', count($upd)),count($upd)); 86 $icon[1] .= '#update'; 87 $icon[2] = 'images/menu/'.$img.'-b-update.png'; 88 } 89 } 90 if (isset($__dashboard_icons['plugins'])) { 91 dc_check_store_update($core->plugins, $core->blog->settings->system->store_plugin_url, 'plugins', $__dashboard_icons['plugins']); 92 } 93 if (isset($__dashboard_icons['blog_theme'])) { 94 $themes = new dcThemes($core); 95 $themes->loadModules($core->blog->themes_path, null); 96 dc_check_store_update($themes, $core->blog->settings->system->store_theme_url, 'blog-theme', $__dashboard_icons['blog_theme']); 97 } 78 98 79 99 # Latest news for dashboard -
admin/style/default.css
r2237 r2240 1202 1202 padding-right: 34px; 1203 1203 } 1204 .line img { 1205 vertical-align: middle; 1206 } 1204 1207 tr.line img.expand, th img.expand { 1205 1208 margin-right: 6px; … … 1286 1289 #filters-form { 1287 1290 border: 1px dashed #999; 1288 border-radius: . 5em;1291 border-radius: .3em; 1289 1292 margin-bottom: 2em; 1290 1293 padding: .5em 1em 0; … … 1315 1318 #filters-form select { 1316 1319 width: 14em; 1320 vertical-align: middle; 1317 1321 } 1318 1322 #filters-form h4 { … … 1447 1451 text-align: center; 1448 1452 } 1453 .no-js .outgoing img { 1454 display: none; 1455 } 1449 1456 #dashboard-boxes .box { 1450 1457 padding: 10px; … … 1525 1532 li.user_super, li.user_admin { 1526 1533 margin-left: 0; 1527 padding-left: 1em;1534 padding-left: 20px; 1528 1535 list-style: none; 1529 background: transparent url(../images/superadmin.png) no-repeat -2px 2px;1536 background: transparent url(../images/superadmin.png) no-repeat 0 .3em; 1530 1537 } 1531 1538 li.user_admin { -
admin/style/default.css
r2225 r2240 158 158 -moz-box-sizing: border-box; 159 159 -webkit-box-sizing: border-box; 160 box-sizing: border-box; 160 box-sizing: border-box; 161 text-align: left; 161 162 } 162 163 .two-boxes { … … 1108 1109 } 1109 1110 #help-button { 1110 background: transparent url( ../images/page_help.png) no-repeat 6px center;1111 background: transparent url(help-mini.png) no-repeat 6px center; 1111 1112 position: absolute; 1112 1113 top: 0; … … 1539 1540 } 1540 1541 /* ------------------------------------------------------------------- blog_theme.php */ 1541 #themes { 1542 margin: 0; 1543 width: 100%; 1544 padding: 0; 1545 } 1546 .theme-details { 1547 border-top: 1px solid #ccc; 1548 padding: 12px; 1549 display: inline-block; 1550 vertical-align: top; 1551 width: 284px; 1552 } 1553 .theme-details.current-theme { 1554 background: #eef; 1555 } 1556 .theme-details:hover { 1557 background: #f3f3f3; 1558 } 1559 .theme-shot img { 1560 display: block; 1561 border: 1px solid #ccc; 1562 margin-bottom: 1.5em; 1563 } 1564 span.theme-desc { 1565 display: block; 1566 } 1567 span.theme-version { 1568 color: #676e78; 1569 } 1570 .theme-css { 1571 display: block; 1572 } 1573 #themes-actions { 1574 border-bottom: 1px solid #999; 1575 margin-bottom: 3em; 1576 } 1577 /* Themes list, JS version */ 1578 #themes-wrapper { 1579 display: table; 1580 } 1581 #themes-wrapper #themes { 1582 display: table-cell; 1583 vertical-align: top; 1584 padding-left: 1em; 1585 } 1586 #theme-box { 1587 display: table-cell; 1588 vertical-align: top; 1589 padding: 0; 1590 width: 312px; 1591 border: 1px solid #ccc; 1592 border-radius: 3px; 1593 } 1594 #theme-box .theme-shot, 1595 #theme-box .theme-info, 1596 #theme-box .theme-actions { 1597 background: #eef; 1598 padding: 1em 16px; 1599 margin: 0; 1600 } 1601 #theme-box .theme-shot img { 1602 display: block; 1603 width: 280px; 1604 height: 245px; 1605 border: 1px solid #ccc; 1606 } 1607 #theme-box h4 { 1608 color: #000; 1609 background: #eef; 1610 } 1611 #theme-box span.theme-version { 1612 color: #676e78; 1613 } 1614 #theme-box span.theme-parent-ok { 1615 color: #676e78; 1616 } 1617 #theme-box span.theme-parent-missing { 1618 color: #c00; 1619 font-weight:bold; 1620 } 1621 #theme-box .theme-actions { 1622 border-bottom: 1px solid #ccc; 1623 } 1624 #themes .theme-details-js { 1542 .box.theme { 1543 margin: .5em; 1544 padding: 1em 1em .5em 1em; 1545 border: 1px solid #ccc; 1546 } 1547 #theme-new .box.theme { 1548 width: 280px; 1549 } 1550 .module-name { 1551 margin-bottom: .5em; 1552 } 1553 .module-sshot img { 1554 border: 1px solid #ddd; 1555 padding: .5em; 1556 background: #f7f7f7; 1557 box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); 1558 } 1559 .module-actions { 1560 margin-top: 1em; 1561 } 1562 .bloc-toggler { 1563 text-align: right; 1564 } 1565 .box.current-theme { 1566 width: 652px; 1567 margin: .5em; 1568 padding: 1em 0 .5em 1em; 1569 background: #FCFDFD; 1570 border: 1px solid #9AC123; 1571 -webkit-border-radius: .5em; 1572 border-radius: .5em; 1573 min-height: 330px; 1574 } 1575 .current-theme .module-sshot img { 1625 1576 float: left; 1626 width: 120px; 1627 height: 150px; 1628 margin: 0 12px 24px; 1629 padding: 12px 12px 0; 1630 text-align: center; 1631 background: #f3f3f3; 1632 border: 1px solid #ddd; 1633 cursor: pointer; 1634 border-radius: 4px; 1635 } 1636 #themes .theme-details-js label { 1637 cursor: pointer; 1638 } 1639 #themes .theme-details-js.theme-selected { 1640 background: #e7e7e7; 1641 border: 1px solid #999; 1642 } 1643 #themes .theme-details-js .theme-shot img { 1644 width: 120px; 1645 height: 105px; 1646 border: 1px solid #fff; 1647 } 1648 #themes a:focus div, #themes a:hover div, 1649 #themes a:focus div.current-theme, #themes a:hover div.current-theme { 1650 background: #bee74b; 1651 } 1577 margin-right: 2em; 1578 margin-bottom: 1em; 1579 } 1580 .current-theme .module-name { 1581 color: #D33800; 1582 margin-bottom: 1em; 1583 font-size: 1.33em; 1584 } 1652 1585 /* ------------------------------------------------------------------ categories.php */ 1653 1586 #categories { … … 1954 1887 } 1955 1888 /* -------------------------------------------------------------------- plugins.php */ 1956 #plugins td.action {1889 .modules td.module-actions, .modules td.module-icon { 1957 1890 vertical-align: middle; 1958 1891 } 1959 .distrib img { 1892 .modules td.module-icon img:last-child { 1893 width: 16px; 1894 height: 16px; 1895 } 1896 .modules td.module-icon img.expand { 1897 margin-bottom: 3px; 1898 } 1899 .modules td.module-distrib img { 1960 1900 display: block; 1961 1901 float: right; 1962 margin-top: -1em; 1902 } 1903 .modules dt { 1904 font-weight: bold; 1905 } 1906 .modules a.module-details { 1907 background: transparent url(search.png) no-repeat 2px 2px; 1908 padding: 4px 4px 0 20px; 1909 } 1910 .modules a.module-support { 1911 background: transparent url(help12.png) no-repeat 2px 2px; 1912 padding: 4px 4px 0 20px; 1913 } 1914 #m_search { 1915 background: transparent url(search.png) no-repeat 4px center; 1916 padding-left: 20px; 1917 } 1918 .modules tr.expand, .modules td.expand { 1919 background: #f7f7f7; 1920 border-color: #bee74b; 1921 } 1922 .modules tr.expand td:first-child { 1923 font-weight: bold; 1924 background: #DFE5E7; 1925 } 1926 .modules td.expand { 1927 padding: 0; 1928 } 1929 .mod-more, .mod-more li { 1930 margin: .25em 0 0 1em; 1931 padding: 0; 1932 list-style-type: none; 1933 } 1934 .mod-more { 1935 padding-top: .5em; 1963 1936 } 1964 1937 /* ---------------------------------------------------------- post.php, page.php */ … … 2383 2356 } 2384 2357 .debug { 2385 background: #FF6;2358 background: #ff6; 2386 2359 padding: 3px 0.5em 2px; 2387 2360 } 2388 2361 /* ---------------------------------------------- Couleurs ajoutées via javascript 2389 2362 /* color-picker.js */ -
inc/admin/lib.dc.page.php
r2217 r2240 136 136 '<form action="index.php" method="post" id="top-info-blog">'. 137 137 $blog_box. 138 '<p><a href="'.$core->blog->url.'" onclick="window.open(this.href);return false;" title="'.__('Go to site').139 ' ('.__('new window').')'.'">'.__('Go to site').'<img src="images/outgoing.png" alt="" /></a>'.138 '<p><a href="'.$core->blog->url.'" class="outgoing" title="'.__('Go to site'). 139 '">'.__('Go to site').'<img src="images/outgoing.png" alt="" /></a>'. 140 140 '</p></form>'. 141 141 '<ul id="top-info-user">'. … … 588 588 self::jsVar('dotclear.msg.help', 589 589 __('Need help?')). 590 self::jsVar('dotclear.msg.new_window', 591 __('new window')). 590 592 self::jsVar('dotclear.msg.help_hide', 591 593 __('Hide')). -
inc/admin/lib.dc.page.php
r2225 r2240 580 580 self::jsVar('dotclear.img_menu_on','images/menu_on.png'). 581 581 self::jsVar('dotclear.img_menu_off','images/menu_off.png'). 582 583 self::jsVar('dotclear.img_plus_theme_src','images/plus-theme.png'). 584 self::jsVar('dotclear.img_plus_theme_alt',__('uncover')). 585 self::jsVar('dotclear.img_minus_theme_src','images/minus-theme.png'). 586 self::jsVar('dotclear.img_minus_theme_alt',__('hide')). 582 587 583 588 self::jsVar('dotclear.msg.help', … … 667 672 self::jsVar('dotclear.msg.load_enhanced_uploader', 668 673 __('Loading enhanced uploader, please wait.')). 674 675 self::jsVar('dotclear.msg.module_author', 676 __('Author:')). 677 self::jsVar('dotclear.msg.module_details', 678 __('Details')). 679 self::jsVar('dotclear.msg.module_support', 680 __('Support')). 681 self::jsVar('dotclear.msg.module_help', 682 __('Help:')). 683 self::jsVar('dotclear.msg.module_section', 684 __('Section:')). 685 self::jsVar('dotclear.msg.module_tags', 686 __('Tags:')). 669 687 "\n//]]>\n". 670 688 "</script>\n"; -
inc/prepend.php
r2216 r2240 49 49 $__autoload['dcStoreReader'] = dirname(__FILE__).'/core/class.dc.store.reader.php'; 50 50 $__autoload['dcStoreParser'] = dirname(__FILE__).'/core/class.dc.store.parser.php'; 51 $__autoload['dcFavorites'] = dirname(__FILE__).'/admin/class.dc.favorites.php'; 51 52 52 53 $__autoload['rsExtPost'] = dirname(__FILE__).'/core/class.dc.rs.extensions.php'; -
inc/prepend.php
r2236 r2240 46 46 $__autoload['dcWorkspace'] = dirname(__FILE__).'/core/class.dc.workspace.php'; 47 47 $__autoload['dcPrefs'] = dirname(__FILE__).'/core/class.dc.prefs.php'; 48 $__autoload['dcStore'] = dirname(__FILE__).'/core/class.dc.store.php'; 49 $__autoload['dcStoreReader'] = dirname(__FILE__).'/core/class.dc.store.reader.php'; 50 $__autoload['dcStoreParser'] = dirname(__FILE__).'/core/class.dc.store.parser.php'; 48 51 $__autoload['dcFavorites'] = dirname(__FILE__).'/admin/class.dc.favorites.php'; 49 52 … … 62 65 $__autoload['dcPager'] = dirname(__FILE__).'/admin/lib.pager.php'; 63 66 $__autoload['dcAdminCombos'] = dirname(__FILE__).'/admin/lib.admincombos.php'; 67 $__autoload['adminModulesList'] = dirname(__FILE__).'/admin/lib.moduleslist.php'; 68 $__autoload['adminThemesList'] = dirname(__FILE__).'/admin/lib.moduleslist.php'; 64 69 65 70 $__autoload['dcTemplate'] = dirname(__FILE__).'/public/class.dc.template.php';
Note: See TracChangeset
for help on using the changeset viewer.