Browse Source

Removing <center> tag + some fixes when editing the course introduction

Julio Montoya 13 years ago
parent
commit
a51dda2f0d

+ 6 - 2
main/css/base.css

@@ -2242,9 +2242,13 @@ input.maininput:focus {
 }
 
 /* Big icons course home page styles */ 
-.big_icon {
-    /*width:205px; */
+#course_tools .big_icon {    
     padding:10px;   
+    text-align:center;
+}
+
+#course_tools .content {
+    text-align:center;
 }
 
 .big_icon img {     

+ 13 - 0
main/css/responsive.css

@@ -109,11 +109,24 @@
     /* only for the course tools */
     #course_tools .row > [class*="span"], #course_tools  .row-fluid > [class*="span"] {     
         float: left;     
+    }    
+}
+
+@media (min-width: 980px) and (max-width: 1024px) {
+    /* fixes tabs */
+    #header3 .nav-tabs > li > a, #header3 .nav-pills > li > a {
+        padding-left: 6px;
+        padding-right: 6px;
     }
     
+    /* only for the course tools */
+    #course_tools .row > [class*="span"], #course_tools  .row-fluid > [class*="span"] {     
+        float: left;     
+    }    
 }
 
 
+
 @media (max-width: 980px) {
 
   /* Remove any padding from the body */

+ 2 - 2
main/inc/introductionSection.inc.php

@@ -96,7 +96,7 @@ if ($intro_editAllowed) {
 			if (!empty($intro_content)) {
 				$sql = "REPLACE $TBL_INTRODUCTION SET c_id = $course_id, id='$moduleId',intro_text='".Database::escape_string($intro_content)."', session_id='".intval($session_id)."'";				
 				Database::query($sql);
-				Display::display_confirmation_message(get_lang('IntroductionTextUpdated'), false);
+				$introduction_section .= Display::return_message(get_lang('IntroductionTextUpdated'),'confirmation', false);
 			} else {
 				$intro_cmdDel = true;	// got to the delete command
 			}
@@ -108,7 +108,7 @@ if ($intro_editAllowed) {
 	/* Delete Command */
 	if ($intro_cmdDel) {
 		Database::query("DELETE FROM $TBL_INTRODUCTION WHERE c_id = $course_id AND id='".$moduleId."' AND session_id='".intval($session_id)."'");
-		$introduction_section .= Display::return_message(get_lang('IntroductionTextDeleted'),'confirmation');
+		$introduction_section .= Display::return_message(get_lang('IntroductionTextDeleted'), 'confirmation');
 	}
 }
 

+ 8 - 14
main/inc/lib/course_home.lib.php

@@ -752,28 +752,23 @@ class CourseHome {
             foreach($items as $item) {     
                 switch($theme) {
                     case 'activity_big':
-                        $data = '';                
-                        
-                        $html .=  '<div class="span4">';
-                        
+                        $data = '';                                        
+                        $html .=  '<div class="span4">';                        
                         $image = (substr($item['tool']['image'], 0, strpos($item['tool']['image'], '.'))).'.png';
-                        $image = Display::tag('center', Display::return_icon($image, $item['name'], array('id'=>'toolimage_'.$item['tool']['id']), 64));
+                        $image = Display::return_icon($image, $item['name'], array('id'=>'toolimage_'.$item['tool']['id']), 64);
                         $data .= Display::url($image , $item['url_params']['href'], $item['url_params']);
-                        $html .=  Display::div($data, array('class'=>'big_icon')); //box-image reflection
-                        $html .=  Display::tag('center', Display::div('<h4>'.$item['visibility'].$item['extra'].$item['link'].'</h4>', array('class'=>'content')));
-                        
+                        $html .= Display::div($data, array('class'=>'big_icon')); //box-image reflection
+                        $html .= Display::div('<h4>'.$item['visibility'].$item['extra'].$item['link'].'</h4>', array('class'=>'content'));                        
                         $html .=  '</div>';
                         
                         break;
                     case 'activity':  
-                        $html .=  '<div class="span6">';
-                        
+                        $html .=  '<div class="span6">';                        
                             $html .=  $item['extra']; 
                             $html .=  $item['visibility'];
                             $html .=  $item['icon'];
                             $html .=  $item['link'];                        
-                        $html .=  '</div>';                        
-                                       
+                        $html .=  '</div>';
                         break;
                     case 'vertical_activity':
                         if ($i == 0) {
@@ -792,8 +787,7 @@ class CourseHome {
                         break;    
                 }   
                 $i++;         
-            }
-            
+            }            
         }
         return $html;
     }

+ 2 - 2
main/template/default/layout/main_footer.tpl

@@ -1,6 +1,6 @@
 
-</div> <!-- end of #main" started at the end of banner.inc.php -->
-    </div> <!-- end of #main" started at the end of banner.inc.php -->
+        </div> <!-- end of #row" -->
+    </div> <!-- end of #main" -->
     <div class="push"></div>
 </div> <!-- end of #wrapper section -->
 {include file="default/layout/footer.tpl"}

+ 4 - 3
main/template/default/layout/main_header.tpl

@@ -18,6 +18,7 @@
     </ul>
 </div>    
 <div id="wrapper">
+    
     {* Bug and help notifications *}		
     <ul id="navigation" class="notification-panel">
         {$help_content}
@@ -26,7 +27,8 @@
     
     {* topbar *}
     {include file="default/layout/topbar.tpl"}    
-    <div id="main" class="container">        
+    
+    <div id="main" class="container">     
         <header> 
             {* header1 - logo *}
             <div id="header1">                
@@ -51,6 +53,5 @@
 
         {* breadcrumb *}
         {$breadcrumb}
-        <div class="row">
-            
+        <div class="row">            
 {/if}