Julio Montoya 12 éve
szülő
commit
5b4d94f450

+ 5 - 5
main/admin/configure_plugin.php

@@ -37,9 +37,9 @@ if (isset($plugin_info['settings_form'])) {
     if (isset($form)) {
         //We override the form attributes
         $attributes = array('action'=>api_get_self().'?name='.$plugin_name, 'method'=>'POST');
-        $form->updateAttributes($attributes);     
+        $form->updateAttributes($attributes);
         $content = Display::page_header($plugin_info['title']);
-        $content .= $form->toHtml();        
+        $content .= $form->toHtml();
     }
 } else {
     $message = Display::return_message(get_lang('NoConfigurationSettingsForThisPlugin'), 'warning');
@@ -55,13 +55,13 @@ if (isset($form)) {
                                     array('Plugins', $access_url_id, $plugin_name, 'setting', "status")));
         foreach ($values as $key => $value) {
             $key = Database::escape_string($plugin_name.'_'.$key);
-            api_add_setting($value, $key, $plugin_name, 'setting', 'Plugins', $plugin_name, null, null, null, $_configuration['access_url'], 1);        
+            api_add_setting($value, $key, $plugin_name, 'setting', 'Plugins', $plugin_name, null, null, null, $_configuration['access_url'], 1);
+            
         }
         $message = Display::return_message(get_lang('Updated'), 'success');
     }
 }
-
-$tpl = new Template($tool_name);
+$tpl = new Template($tool_name, true, true, false, true, false);
 $tpl->assign('actions', $actions);
 $tpl->assign('message', $message);
 $tpl->assign('content', $content);

+ 12 - 11
main/admin/index.php

@@ -268,19 +268,20 @@ if (api_is_platform_admin()) {
     
     //Skills
     
-    $blocks['skills']['icon']  = Display::return_icon('logo.gif', get_lang('Skills'), array(), ICON_SIZE_SMALL, false);
-    $blocks['skills']['label'] = get_lang('Skills');
-    
-    $items = array();
-    $items[] = array('url'=>'skills.php',           'label' => get_lang('SkillsTree'));
-    $items[] = array('url'=>'skills_profile.php',   'label' => get_lang('SkillsProfile'));
-    $items[] = array('url'=>'skills_gradebook.php', 'label' => get_lang('SkillsAndGradebooks'));   
-    
-    $blocks['skills']['items'] = $items;
-    $blocks['skills']['extra'] = null;
-    $blocks['skills']['search_form'] = null;
+    if (api_get_setting('allow_skills_tool') == 'true') {
     
+        $blocks['skills']['icon']  = Display::return_icon('logo.gif', get_lang('Skills'), array(), ICON_SIZE_SMALL, false);
+        $blocks['skills']['label'] = get_lang('Skills');
 
+        $items = array();
+        $items[] = array('url'=>'skills.php',           'label' => get_lang('SkillsTree'));
+        $items[] = array('url'=>'skills_profile.php',   'label' => get_lang('SkillsProfile'));
+        $items[] = array('url'=>'skills_gradebook.php', 'label' => get_lang('SkillsAndGradebooks'));   
+
+        $blocks['skills']['items'] = $items;
+        $blocks['skills']['extra'] = null;
+        $blocks['skills']['search_form'] = null;
+    }
 	
 	/* Chamilo.org */
 	

+ 4 - 0
main/admin/skills.php

@@ -17,6 +17,10 @@ $this_section = SECTION_PLATFORM_ADMIN;
 
 api_protect_admin_script();
 
+if (api_get_setting('allow_skills_tool') != 'true') {
+    api_not_allowed();
+}
+
 //Adds the JS needed to use the jqgrid
 $htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');
 $htmlHeadXtra[] = api_get_js('skills.js');

+ 5 - 0
main/admin/skills_gradebook.php

@@ -16,6 +16,11 @@ require_once api_get_path(LIBRARY_PATH).'gradebook.lib.php';
 $this_section = SECTION_PLATFORM_ADMIN;
 
 api_protect_admin_script();
+
+if (api_get_setting('allow_skills_tool') != 'true') {
+    api_not_allowed();
+}
+
 //Adds the JS needed to use the jqgrid
 $htmlHeadXtra[] = api_get_jqgrid_js();
 

+ 4 - 0
main/admin/skills_profile.php

@@ -15,6 +15,10 @@ $this_section = SECTION_PLATFORM_ADMIN;
 
 api_protect_admin_script();
 
+if (api_get_setting('allow_skills_tool') != 'true') {
+    api_not_allowed();
+}
+
 $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
 $htmlHeadXtra[] = '<link  href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
 

+ 11 - 8
main/gradebook/lib/fe/catform.class.php

@@ -168,16 +168,19 @@ class CatForm extends FormValidator {
         $this->addRule('weight',get_lang('ThisFieldIsRequired'),'required');
 
         if (api_is_platform_admin() || api_is_drh()) {
-            //the magic should be here            
-            $skills = $this->category_object->get_skills();    
-            $this->addElement('select', 'skills', array(get_lang('Skills'), get_lang('SkillsAchievedWhenAchievingThisGradebook')), null, array('id'=>'skills', 'multiple'=>'multiple'));
-            $content = '';
-            if (!empty($skills)) {
-                foreach($skills as $skill) {                    
-                    $content .= Display::tag('li', $skill['name'].'<a id="deleteskill_'.$skill['id'].'" class="closebutton" href="#"></a>', array('id'=>'skill_'.$skill['id'], 'class'=>'bit-box')); 
+            if (api_get_setting('allow_skills_tool') == 'true') {
+            
+                //the magic should be here            
+                $skills = $this->category_object->get_skills();    
+                $this->addElement('select', 'skills', array(get_lang('Skills'), get_lang('SkillsAchievedWhenAchievingThisGradebook')), null, array('id'=>'skills', 'multiple'=>'multiple'));
+                $content = '';
+                if (!empty($skills)) {
+                    foreach($skills as $skill) {                    
+                        $content .= Display::tag('li', $skill['name'].'<a id="deleteskill_'.$skill['id'].'" class="closebutton" href="#"></a>', array('id'=>'skill_'.$skill['id'], 'class'=>'bit-box')); 
+                    }
                 }
+                $this->addElement('label', null, Display::tag('ul', $content, array('class'=>'holder holder_simple')));            
             }
-            $this->addElement('label', null, Display::tag('ul', $content, array('class'=>'holder holder_simple')));            
         }
         
 		if (isset($this->category_object) && $this->category_object->get_parent_id() == 0) {					

+ 12 - 11
main/inc/lib/plugin.lib.php

@@ -128,9 +128,9 @@ class AppPlugin {
         return $this->plugin_regions;
     }
     
-    function load_region($region, $main_template) {
+    function load_region($region, $main_template, $forced = false) {
         ob_start();		
-        $this->get_all_plugin_contents_by_region($region, $main_template);		
+        $this->get_all_plugin_contents_by_region($region, $main_template, $forced);
         $content = ob_get_contents();
         ob_end_clean();
         return $content;
@@ -142,7 +142,7 @@ class AppPlugin {
      * @todo add caching
      * @param string $plugin_name 
      */
-    function load_plugin_lang_variables($plugin_name) {
+    function load_plugin_lang_variables($plugin_name) {        
         global $language_interface;
         $root = api_get_path(SYS_PLUGIN_PATH);                                    
 
@@ -150,10 +150,11 @@ class AppPlugin {
         $english_path = $root.$plugin_name."/lang/english.php";  
         
         if (is_readable($english_path)) {                        
-            include $english_path;            
+            include $english_path;
+            
             foreach ($strings as $key => $string) {                                            
                 //$$key = $string;
-                $GLOBALS[$key] = $string;                
+                $GLOBALS[$key] = $string;  
             }                        
         }
 
@@ -180,15 +181,15 @@ class AppPlugin {
      * @param obj   template obj
      * @todo improve this function
      */
-    function get_all_plugin_contents_by_region($region, $template) {
+    function get_all_plugin_contents_by_region($region, $template, $forced = false) {
         global $_plugins;
         if (isset($_plugins[$region]) && is_array($_plugins[$region])) {
         //if (1) {
-            foreach ($_plugins[$region] as $plugin_name) {
-                //Load the plugin information
+            //Load the plugin information
+            foreach ($_plugins[$region] as $plugin_name) {                
                 
                 //The plugin_info variable is available inside the plugin index                
-                $plugin_info = $this->get_plugin_info($plugin_name);                
+                $plugin_info = $this->get_plugin_info($plugin_name, $forced);                
                 
                 //We also know where the plugin is
                 $plugin_info['current_region'] = $region;    
@@ -237,7 +238,6 @@ class AppPlugin {
     }
     
     /**
-     *
      * Loads plugin info 
      * @staticvar array $plugin_data
      * @param string plugin name
@@ -250,7 +250,8 @@ class AppPlugin {
         if (isset($plugin_data[$plugin_name]) && $forced == false) {            
             return $plugin_data[$plugin_name]; 
         } else {
-            $plugin_file = api_get_path(SYS_PLUGIN_PATH)."$plugin_name/plugin.php";            
+            $plugin_file = api_get_path(SYS_PLUGIN_PATH)."$plugin_name/plugin.php";
+            
             $plugin_info = array();
             if (file_exists($plugin_file)) {
                 require $plugin_file;            

+ 32 - 28
main/inc/lib/template.lib.php

@@ -5,10 +5,7 @@
  *  @todo better organization of the class, methods and variables 
  * 
  **/
-
-require_once api_get_path(LIBRARY_PATH).'course_home.lib.php';
 require_once api_get_path(LIBRARY_PATH).'banner.lib.php';
-require_once api_get_path(LIBRARY_PATH).'plugin.lib.php';
 require_once api_get_path(LIBRARY_PATH).'symfony/Twig/Autoloader.php';
 
 class Template {
@@ -27,9 +24,18 @@ class Template {
     var $user_is_logged_in = false;
     var $twig = null;
     
+    /* Loads chamilo plugins */
+    var $load_plugins = false;
+    
     var $params = array();
 	
-	function __construct($title = '', $show_header = true, $show_footer = true, $show_learnpath = false, $hide_global_chat = false) {
+	function __construct($title = '', $show_header = true, $show_footer = true, $show_learnpath = false, $hide_global_chat = false, $load_plugins = true) {
+        
+        //Page title
+		$this->title                = $title;        
+		$this->show_learnpath       = $show_learnpath;
+        $this->hide_global_chat     = $hide_global_chat;
+        $this->load_plugins         = $load_plugins;
                 
         //Twig settings        
         Twig_Autoloader::register();
@@ -70,7 +76,7 @@ class Template {
         $this->twig->addFilter('var_dump',       new Twig_Filter_Function('var_dump'));        
         $this->twig->addFilter('return_message', new Twig_Filter_Function('Display::return_message_and_translate'));
         
-        $this->twig->addFilter('display_page_header', new Twig_Filter_Function('Display::page_header_and_translate'));
+        $this->twig->addFilter('display_page_header',    new Twig_Filter_Function('Display::page_header_and_translate'));
         $this->twig->addFilter('display_page_subheader', new Twig_Filter_Function('Display::page_subheader_and_translate'));
         
         /*
@@ -81,12 +87,7 @@ class Template {
             //'tag_variable' => array('{$', '}'),
         ));        
         $this->twig->setLexer($lexer);*/
-   
-        //Page title
-		$this->title = $title;        
-		$this->show_learnpath = $show_learnpath;
-        $this->hide_global_chat = $hide_global_chat;
-        		
+   		
 		//Setting system variables
 		$this->set_system_parameters();	
 		
@@ -107,20 +108,22 @@ class Template {
         
         //Chamilo plugins
         if ($this->show_header) {
-            
-            $this->plugin = new AppPlugin();
-            
-            //1. Showing installed plugins in regions
-            $plugin_regions = $this->plugin->get_plugin_regions();                  
-            foreach ($plugin_regions as $region) {
-                $this->set_plugin_region($region);
-            }  
-            
-            //2. Loading the course plugin info
-            global $course_plugin;           
-            if (isset($course_plugin) && !empty($course_plugin) && !empty($this->course_id)) {                
-                //Load plugin get_langs
-                $this->plugin->load_plugin_lang_variables($course_plugin);                
+            if ($this->load_plugins) {
+                
+                $this->plugin = new AppPlugin();
+
+                //1. Showing installed plugins in regions
+                $plugin_regions = $this->plugin->get_plugin_regions();                  
+                foreach ($plugin_regions as $region) {
+                    $this->set_plugin_region($region);
+                }  
+
+                //2. Loading the course plugin info
+                global $course_plugin;           
+                if (isset($course_plugin) && !empty($course_plugin) && !empty($this->course_id)) {                
+                    //Load plugin get_langs
+                    $this->plugin->load_plugin_lang_variables($course_plugin);                
+                }
             }
         }
 	}
@@ -289,6 +292,7 @@ class Template {
 		$_p = array('web' 			=> api_get_path(WEB_PATH),
 					'web_course'	=> api_get_path(WEB_COURSE_PATH),
 					'web_main' 		=> api_get_path(WEB_CODE_PATH),
+                    'web_css' 		=> api_get_path(WEB_CSS_PATH),
 					'web_ajax' 		=> api_get_path(WEB_AJAX_PATH),
                     'web_img' 		=> api_get_path(WEB_IMG_PATH),
                     'web_plugin'    => api_get_path(WEB_PLUGIN_PATH),
@@ -637,8 +641,8 @@ class Template {
     
     /* Sets the plugin content in a template variable */
     function set_plugin_region($plugin_region) {
-        if (!empty($plugin_region)) {          
-            $content = $this->plugin->load_region($plugin_region, $this);    
+        if (!empty($plugin_region)) {            
+            $content = $this->plugin->load_region($plugin_region, $this, $this->force_plugin_load);    
             $this->assign('plugin_'.$plugin_region, $content);                
         }
         return null;
@@ -653,7 +657,7 @@ class Template {
         $this->params[$tpl_var] = $value;
     }
     
-    public function display($template = null, $cache_id = null, $compile_id = null, $parent = null) {        
+    public function display($template = null, $cache_id = null, $compile_id = null, $parent = null) {    
         echo $this->twig->render($template, $this->params);
     }
 }

+ 1 - 1
main/inc/lib/usermanager.lib.php

@@ -2947,7 +2947,7 @@ class UserManager {
 	public static function get_search_form($query) {
 		return '
 		<form method="GET" class="well form-search" action="'.api_get_path(WEB_PATH).'main/social/search.php">				
-				<input placeholder="'.get_lang('UsersGroups').'" type="text" size="25" value="'.api_htmlentities(Security::remove_XSS($query)).'" name="q"/> &nbsp;
+				<input placeholder="'.get_lang('UsersGroups').'" type="text" class="input-medium" value="'.api_htmlentities(Security::remove_XSS($query)).'" name="q"/> &nbsp;
 				<button class="btn" type="submit" value="search">'.get_lang('Search').'</button>
 		</form>';
 	}

+ 7 - 4
main/inc/lib/userportal.lib.php

@@ -353,10 +353,13 @@ class IndexManager {
 	}
 	    
     function return_skills_links() {
-        $content = '<ul class="menulist">';      
-        $content .= Display::tag('li', Display::url(get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/skills_tree.php'));
-        $content .= '</ul>';        
-        $html = self::show_right_block(get_lang("Skills"), $content, 'skill_block');
+        $html = '';
+        if (api_get_setting('allow_skills_tool') == 'true') {
+            $content = '<ul class="menulist">';      
+            $content .= Display::tag('li', Display::url(get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/skills_tree.php'));
+            $content .= '</ul>';        
+            $html = self::show_right_block(get_lang("Skills"), $content, 'skill_block');
+        }
         return $html;
     }
 	

+ 5 - 2
main/install/db_main.sql

@@ -862,7 +862,8 @@ VALUES
 ('gradebook_locking_enabled', NULL, 'radio', 'Gradebook', 'false', 'GradebookEnableLockingTitle', 'GradebookEnableLockingComment', NULL, NULL, 0),
 ('gradebook_default_grade_model_id', NULL, 'select', 'Gradebook', '', 'GradebookDefaultGradeModelTitle', 'GradebookDefaultGradeModelComment', NULL, NULL, 1),
 ('allow_session_admins_to_see_all_sessions', NULL, 'radio', 'Session', 'false', 'AllowSessionAdminsToSeeAllSessionsTitle', 'AllowSessionAdminsToSeeAllSessionsComment', NULL, NULL, 1),
-('chamilo_database_version',NULL,'textfield',NULL, '1.9.0.18035','DatabaseVersion','', NULL, NULL, 0);
+('allow_skills_tool', NULL, 'radio', 'Platform', 'false', 'AllowSkillsToolTitle', 'AllowSkillsToolComment', NULL, NULL, 1),
+('chamilo_database_version',NULL,'textfield',NULL, '1.9.0.18037','DatabaseVersion','', NULL, NULL, 0);
 
 /*
 ('show_tabs', 'custom_tab_1', 'checkbox', 'Platform', 'true', 'ShowTabsTitle', 'ShowTabsComment', NULL, 'TabsCustom1', 1),
@@ -1206,7 +1207,9 @@ VALUES
 ('gradebook_enable_grade_model', 'true', 'Yes'),
 ('gradebook_enable_grade_model', 'false', 'No'),
 ('allow_session_admins_to_see_all_sessions', 'true', 'Yes'),
-('allow_session_admins_to_see_all_sessions', 'false', 'No');
+('allow_session_admins_to_see_all_sessions', 'false', 'No'),
+('allow_skills_tool', 'true', 'Yes'),
+('allow_skills_tool', 'false', 'No');
 
 UNLOCK TABLES;
 /*

+ 6 - 2
main/install/migrate-db-1.8.8-1.9.0-pre.sql

@@ -203,7 +203,11 @@ INSERT INTO settings_options(variable,value,display_text) VALUES ('page_after_lo
 
 ALTER TABLE settings_current ADD COLUMN access_url_locked INTEGER NOT NULL DEFAULT 0;
 
--- skills
+-- Skills
+
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('allow_skills_tool', NULL, 'radio', 'Platform', 'false', 'AllowSkillsToolTitle', 'AllowSkillsToolComment', NULL, NULL, 1);
+INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_skills_tool', 'true', 'Yes');
+INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_skills_tool', 'false', 'No');
 
 CREATE TABLE IF NOT EXISTS skill ( id int NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, short_code varchar(100) NOT NULL, description TEXT NOT NULL, access_url_id int NOT NULL, icon varchar(255) NOT NULL, PRIMARY KEY (id));
 INSERT INTO skill (name) VALUES ('Root');
@@ -224,7 +228,7 @@ ALTER TABLE course MODIFY COLUMN disk_quota bigint unsigned DEFAULT NULL;
 ALTER TABLE user MODIFY COLUMN username VARCHAR(100) NOT NULL;
 
 -- Do not move this query
-UPDATE settings_current SET selected_value = '1.9.0.18035' WHERE variable = 'chamilo_database_version';
+UPDATE settings_current SET selected_value = '1.9.0.18037' WHERE variable = 'chamilo_database_version';
 
 -- xxSTATSxx
 ALTER TABLE track_e_exercices ADD COLUMN questions_to_check TEXT NOT NULL DEFAULT '';

+ 31 - 28
main/social/home.php

@@ -59,42 +59,45 @@ if (api_get_setting('profile', 'picture') == 'true') {
 
 $user_info = UserManager :: get_user_info_by_id(api_get_user_id());
 
-$social_left_content = SocialManager::show_social_menu('home');	
-$social_right_content .= '<div class="span5">';            
+$social_left_content = SocialManager::show_social_menu('home');
+
+$social_right_content .= '<div class="span5">';
+
 $social_right_content .= '<div class="social-groups-home-title">'.get_lang('ContactInformation').'</div>';
-			
+
+$list = array(
+                array('title' => get_lang('Name'), 'content' => api_get_person_name($user_info['firstname'], $user_info['lastname'])),
+                array('title' => get_lang('Email'), 'content' => $user_info['email']),
+        );
 // information current user		       
-$social_right_content .= '<div>
-    <p><strong>'.get_lang('Name').'</strong><br />
-    <span class="social-groups-text4">'.api_get_person_name($user_info['firstname'], $user_info['lastname']).'</span></p>
-    </div>
-    <div>
-    <p><strong>'.get_lang('Email').'</strong><br /><span class="social-groups-text4">'.($user_info['email']?$user_info['email']:'').'</span></p>
-    </div>
-    <div class="box_description_group_actions">
+$social_right_content .= '<div>'.Display::description($list).'</div>';
+$social_right_content .= '
+    <div class="form-actions">
     <a class="btn" href="'.api_get_path(WEB_PATH).'main/auth/profile.php">
         '.get_lang('EditProfile').'
     </a>
     </div>';
-                  
-            $skill = new Skill();
-            $skills =  $skill->get_user_skills(api_get_user_id(), true);
-            
-            $social_right_content .= '<div class="clear"></div>';            
-                $social_right_content .= '<div class="social-groups-home-title">'.get_lang('Skills').'</div>';
-                $lis = '';
-                if (!empty($skills)) {
-                    foreach($skills as $skill) {
-                        $lis .= Display::tag('li', Display::span($skill['name'], array('class'=>'label_tag skill')));
-                    }                
-                    $social_right_content .= Display::tag('ul', $lis);
-                }
-                $url = api_get_path(WEB_CODE_PATH).'social/skills_tree.php';            
-                $social_right_content .= Display::url(get_lang('ViewSkillsTree'), $url);                
-            $social_right_content .= '</div>';
+    
+    if (api_get_setting('allow_skills_tool') == 'true') {
+        $skill = new Skill();
+        $skills =  $skill->get_user_skills(api_get_user_id(), true);            
+
+        $social_right_content .= '<div class="social-groups-home-title">'.get_lang('Skills').'</div>';
+        $lis = '';
+        if (!empty($skills)) {
+            foreach($skills as $skill) {
+                $lis .= Display::tag('li', Display::span($skill['name'], array('class'=>'label_tag skill')));
+            }                
+            $social_right_content .= Display::tag('ul', $lis);
+        }
+        $url = api_get_path(WEB_CODE_PATH).'social/skills_tree.php';            
+        $social_right_content .= Display::url(get_lang('ViewSkillsTree'), $url);
+    }
+    
+    $social_right_content .= '</div>';
                  
             //Search box
-			$social_right_content .= '<div class="span4">';					
+			$social_right_content .= '<div class="span4">';
     			$social_right_content .= UserManager::get_search_form('');
     			$social_right_content .= '<br />';
     			

+ 4 - 0
main/social/skills_tree.php

@@ -17,6 +17,10 @@ $this_section = SECTION_MYPROFILE;
 
 api_block_anonymous_users();
 
+if (api_get_setting('allow_skills_tool') != 'true') {
+    api_not_allowed();
+}
+
 //Adds the JS needed to use the jqgrid
 $htmlHeadXtra[] = api_get_jqgrid_js();
 $htmlHeadXtra[] = api_get_js('jquery.jsPlumb.all.js');

+ 1 - 5
main/template/default/layout/head.tpl

@@ -7,17 +7,13 @@
 <link rel="apple-touch-icon" sizes="72x72" href="{{ _p.web}}apple-touch-icon-72x72-precomposed.png" />
 <link rel="apple-touch-icon" sizes="114x114" href="{{ _p.web}}apple-touch-icon-114x114-precomposed.png" />
 <meta name="apple-mobile-web-app-capable" content="yes" />
-{# This fires some HTML5 errors #}
-{# <link rel="top"	href="{{ _p.web_main}}index.php" title="" />
-<link rel="courses" href="{{ _p.web_main}}auth/courses.php" title="{{"OtherCourses"|get_lang}}"/>
-<link rel="profil"  href="{{ _p.web_main}}auth/profile.php" title="{{"ModifyProfile"|get_lang}}"/>  #}
 <meta name="Generator" content="{{ _s.software_name }} {{ _s.system_version|slice(0,1) }}" /> 
 {#  Use the latest engine in ie8/ie9 or use google chrome engine if available  #}
 {#  Improve usability in portal devices #}
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <!--[if ie]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
 <title>{{ title_string }}</title>
-<style type="text/css" media="screen">
+<style type="text/css" media="screen"> 
 /*<![CDATA[*/
 {{ css_style }}
 /*]]>*/

+ 2 - 5
plugin/rss/index.php

@@ -9,16 +9,13 @@ $title = $title ? "<h4>$title</h4>" : '';
 
 $css = $plugin->get_css();
 $css = $css ? "<style type=\"text/css\" scoped=\"scoped\">$css</style>" : '';
-
 $bullet = api_get_path(WEB_PLUGIN_PATH) . '/rss/resources/arrow-bullet.png';
 
-if (empty($rss))
-{
-    echo get_lang('no_rss');
+if (empty($rss)) {
+    Display::display_warning_message(get_lang('no_rss'));
     return;
 }
 
-
 echo<<<EOT
 <div class="well sidebar-nav rss">
      $css

+ 1 - 1
plugin/rss/lang/english.php

@@ -9,7 +9,7 @@
 $strings['plugin_title'] = "RSS";
 $strings['plugin_comment'] = "Display RSS content.";
 
-$strings['rss'] = "Rss";
+$strings['rss'] = "RSS";
 $strings['block_title'] = "Block title";
 
 $strings['title'] = "Title";