]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
moved admin messages into admin page shell
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 26 Feb 2011 22:29:07 +0000 (22:29 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 26 Feb 2011 22:29:07 +0000 (22:29 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8498 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/admin.php
views/default/css/admin.php
views/default/page/admin.php

index 0ea029cdc5cd94a1ffbd99464b638429a7bad337..1e4b63cdd83fbfd17fb792b2d3a5925cff174923 100644 (file)
@@ -280,14 +280,12 @@ function admin_pagesetup() {
  * @return void
  */
 function admin_settings_page_handler($page) {
-       global $CONFIG;
 
        admin_gatekeeper();
        elgg_admin_add_plugin_settings_menu();
        elgg_set_context('admin');
 
        elgg_unregister_css('elgg');
-
        $url = elgg_get_simplecache_url('js', 'admin');
        elgg_register_js($url, 'admin');
 
@@ -313,9 +311,7 @@ function admin_settings_page_handler($page) {
                $view = 'admin/plugin_settings';
                $plugin = elgg_get_plugin_from_id($page[1]);
                $vars['plugin'] = $plugin;
-               
-               // @todo ???
-               $title = elgg_echo("admin:plugin_settings:{$page[1]}");
+
                $title = elgg_echo("admin:{$page[0]}");
        } else {
                $view = 'admin/' . implode('/', $page);
@@ -325,21 +321,12 @@ function admin_settings_page_handler($page) {
                }
        }
 
-       // allow a place to store helper views outside of the web-accessible views
+       // gets content and prevents direct access to 'components' views
        if ($page[0] == 'components' || !($content = elgg_view($view, $vars))) {
                $title = elgg_echo('admin:unknown_section');
                $content = elgg_echo('admin:unknown_section');
        }
 
-       $notices_html = '';
-       if ($notices = elgg_get_admin_notices()) {
-               foreach ($notices as $notice) {
-                       $notices_html .= elgg_view_entity($notice);
-               }
-
-               $content = "<div class=\"admin_notices\">$notices_html</div>$content";
-       }
-
        $body = elgg_view_layout('admin', array('content' => $content, 'title' => $title));
        echo elgg_view_page($title, $body, 'admin');
 }
index 0b8aec774750987d7f52e25706cf5dd6a415740c..a6e1c1e850f061ff54686e38e01d01a64e5bc26b 100644 (file)
@@ -203,7 +203,7 @@ table.mceLayout {
        content: "";
 }
 
-.elgg-system-messages {
+.elgg-page-messages {
        padding: 20px 40px 0;
        width: 500px;
        margin-bottom: -10px;
index ba09071f79709a6a606549357a86e88f6d09e86b..fcf188af1c9941f8961af2ae7e0a0ab99c7a657d 100644 (file)
@@ -26,6 +26,16 @@ if (count_messages()) {
                system_messages(null, "");
        }
 }
+
+$notices_html = '';
+if ($notices = elgg_get_admin_notices()) {
+       foreach ($notices as $notice) {
+               $notices_html .= elgg_view_entity($notice);
+       }
+
+       $notices_html = "<div class=\"admin_notices\">$notices_html</div>";
+}
+
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
@@ -41,6 +51,7 @@ if (count_messages()) {
                </div>
                <div class="elgg-page-messages">
                        <?php echo elgg_view('page/elements/messages', array('object' => $messages)); ?>
+                       <?php echo $notices_html; ?>
                </div>
                <div class="elgg-page-body">
                        <div class="elgg-inner">