[LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm

bisitz bisitz@source.lon-capa.org
Mon, 08 Feb 2010 13:28:40 -0000


bisitz		Mon Feb  8 13:28:40 2010 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
  Log:
  - Corrected floating of domain description text: Always display text below logo.
  - Optimized line breaks in loginInfo box: only break if content exists.
  - No additional line breaks for contact block (too many variations are possible)
  - Moved version number from contact block to server info box.
  - Same alginment of server info box as elements above.
  - Header: Replaced HTML table by simple div.
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.131 loncom/auth/lonlogin.pm:1.132
--- loncom/auth/lonlogin.pm:1.131	Fri Dec  4 13:50:48 2009
+++ loncom/auth/lonlogin.pm	Mon Feb  8 13:28:40 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.131 2009/12/04 13:50:48 jms Exp $
+# $Id: lonlogin.pm,v 1.132 2010/02/08 13:28:40 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -274,7 +274,7 @@
 my $mainbg=&Apache::loncommon::designparm('login.mainbg',$domain);
 my $logo=&Apache::loncommon::designparm('login.logo',$domain);
 my $img=&Apache::loncommon::designparm('login.img',$domain);
-my $domainlogo=&Apache::loncommon::domainlogo($domain);
+my $domainlogo='<div>'.&Apache::loncommon::domainlogo($domain).'</div>';
 my $login=&Apache::loncommon::designparm('login.login',$domain);
 if ($login eq '') {
 $login = $iconpath.'/'.&mt('userauthentication.gif');
@@ -363,7 +363,9 @@
 # -------------------------------------------------- Change password field name
 
 my $forgotpw = &forgotpwdisplay(%lt);
+$forgotpw .= '<br />' if $forgotpw;
 my $loginhelp = &loginhelpdisplay(%lt);
+$loginhelp .= '<br />' if $loginhelp;
 
 # ---------------------------------------------------- Serve out DES JavaScript
 {
@@ -395,11 +397,11 @@
 ENDSERVERFORM
 my $coursecatalog;
 if (($showcoursecat eq '') || ($showcoursecat)) {
-    $coursecatalog = &coursecatalog_link($lt{'catalog'});
+    $coursecatalog = &coursecatalog_link($lt{'catalog'}).'<br />';
 }
 my $newuserlink;
 if ($shownewuserlink) {
-    $newuserlink = &newuser_link($lt{'newuser'});
+    $newuserlink = &newuser_link($lt{'newuser'}).'<br />';
 }
 my $logintitle;
 if ($loginheader eq 'text') {
@@ -414,7 +416,7 @@
                     .'</b></span></noscript>';
 my $helpdeskscript;
 my $contactblock = &contactdisplay(\%lt,$servadm,$showadminmail,
-                            $version,$authdomain,\$helpdeskscript);
+                                   $authdomain,\$helpdeskscript);
 
 my $loginform=(<<LFORM);
 <form name="client" action="" onsubmit="return(send())">
@@ -433,13 +435,9 @@
     if ($showbanner) {
         $r->print(<<HEADER);
 <!-- The LON-CAPA Header -->
-<table border="0" align="left" width="100%" cellspacing="0" cellpadding="1">
- <tr>
-  <td align="left" valign="top" bgcolor="$pgbg">
-      <img src="$img" border="0" alt="The Learning Online Network with CAPA" />
-  </td>
- </tr>
-</table>
+<div style="background:$pgbg;margin:0;width:100%;">
+  <img src="$img" border="0" alt="The Learning Online Network with CAPA" />
+</div>
 HEADER
     }
     $r->print(<<ENDTOP);
@@ -458,12 +456,10 @@
 </div>
   
 <div class="LC_loginpage_loginInfo">
-  $loginhelp<br />
-  $forgotpw<br />
-  <br />
-  $contactblock<br />
-  <br />
-  $newuserlink<br />
+  $loginhelp
+  $forgotpw
+  $contactblock
+  $newuserlink
   $coursecatalog
 </div>
 </div>
@@ -481,7 +477,7 @@
      <table border="0" cellspacing="0" cellpadding="0">
       <tr>
        <td  align="left" valign="top">
-        <small><b>&nbsp;&nbsp;&nbsp;$lt{'dom'}:&nbsp;</b></small>
+        <small><b>$lt{'dom'}:&nbsp;</b></small>
        </td>
        <td  align="left" valign="top">
         <small><tt>&nbsp;$domain</tt></small>
@@ -489,7 +485,7 @@
       </tr>
       <tr>
        <td  align="left" valign="top">
-        <small><b>&nbsp;&nbsp;&nbsp;$lt{'serv'}:&nbsp;</b></small>
+        <small><b>$lt{'serv'}:&nbsp;</b></small>
        </td>
        <td align="left" valign="top">
         <small><tt>&nbsp;$lonhost ($role)</tt></small>
@@ -497,7 +493,7 @@
       </tr>
       <tr>
        <td align="left" valign="top">
-        <small><b>&nbsp;&nbsp;&nbsp;$lt{'load'}:&nbsp;</b></small>
+        <small><b>$lt{'load'}:&nbsp;</b></small>
        </td>
        <td align="left" valign="top">
         <small><tt>&nbsp;$loadpercent $lt{'perc'}</tt></small>
@@ -505,12 +501,17 @@
       </tr>
       <tr>
        <td align="left" valign="top">
-        <small><b>&nbsp;&nbsp;&nbsp;$lt{'userload'}:&nbsp;</b></small>
+        <small><b>$lt{'userload'}:&nbsp;</b></small>
        </td>
        <td align="left" valign="top">
         <small><tt>&nbsp;$userloadpercent $lt{'perc'}</tt></small>
        </td>
       </tr>
+      <tr>
+       <td colspan="2" align="left">
+        <small>$version</small>
+       </td>
+      </tr>
      </table>
  </div>
 
@@ -543,7 +544,7 @@
 }
 
 sub contactdisplay {
-    my ($lt,$servadm,$showadminmail,$version,$authdomain,$helpdeskscript) = @_;
+    my ($lt,$servadm,$showadminmail,$authdomain,$helpdeskscript) = @_;
     my $contactblock;
     my $showhelpdesk = 0;
     my $requestmail = $Apache::lonnet::perlvar{'lonSupportEMail'};
@@ -573,7 +574,6 @@
 </script>
 ENDSCRIPT
     }
-    $contactblock .= $version;
     return $contactblock;
 }