[LON-CAPA-cvs] cvs: loncom /interface lonmsgdisplay.pm

bisitz bisitz at source.lon-capa.org
Fri Nov 30 09:57:17 EST 2012


bisitz		Fri Nov 30 14:57:17 2012 EDT

  Modified files:              
    /loncom/interface	lonmsgdisplay.pm 
  Log:
  Improved messages/communication page design and usability:
  - Avoid wrong click by separating "New Folder" and other functions
  - Better clarification of actions at top and bottom of message list
  - Improved layout of action list at bottom ("Message Actions")
  - Navigation links in menu at top of page now separated from other functions
  - Actions for "No critical messages": actionbox
  - Corrected unbalanced tags ("Destination folder")
  
  
  
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.161 loncom/interface/lonmsgdisplay.pm:1.162
--- loncom/interface/lonmsgdisplay.pm:1.161	Tue Oct  2 16:42:07 2012
+++ loncom/interface/lonmsgdisplay.pm	Fri Nov 30 14:57:17 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.161 2012/10/02 16:42:07 bisitz Exp $
+# $Id: lonmsgdisplay.pm,v 1.162 2012/11/30 14:57:17 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -222,6 +222,8 @@
 
     $output .= '
 <form method="post" action="/adm/email" name="folderlist">
+   <div class="LC_columnSection"><fieldset>
+   <legend>'.&mt('Folder Actions').'</legend>
    <table border="0" cellspacing="2" cellpadding="8">
     <tr>
      <td><b>'.$lt{'fold'}.'</b><br />'."\n".
@@ -241,7 +243,9 @@
          '" onclick="javascript:folder_choice(this.form,'."'change'".');" />
          </span>
      </td>
-     <td><b>'.&mt('New Folder').'</b><br />'."\n".'
+    </tr>
+    <tr>
+     <td colspan="4"><b>'.&mt('New Folder').'</b><br />'."\n".'
          <span class="LC_nobreak">
          <input type="text" size="15" name="newfolder" value="" />
          <input type="button" value="'.$lt{'go'}.
@@ -250,6 +254,7 @@
      </td>
     </tr>
    </table>
+   </fieldset></div>
 '."\n".
     '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" />'.
     '<input type="hidden" name="renamed" value="" />'.
@@ -877,8 +882,9 @@
             '<p class="LC_info">'.
             &mt('You have no critical messages.').
             '</p>'.
-            '<a href="/adm/roles">'.&mt('Select a course').'</a><br />'.
-            '<a href="/adm/email">'.&mt('Communicate').'</a>';
+            &Apache::lonhtmlcommon::actionbox(
+                ['<a href="/adm/roles">'.&mt('Select a course').'</a>',
+                 '<a href="/adm/email">'.&mt('Communicate').'</a>']);
     } else {
         $r->print($header);
     }
@@ -1232,17 +1238,17 @@
 
 
     # Bottom Functions
-    $r->print('<table border="0" cellspacing="2" cellpadding="8">
+    $r->print('
+<div class="LC_columnSection"><fieldset>
+<legend>'.&mt('Message Actions').'</legend>
+<table border="0" cellspacing="2" cellpadding="8">
  <tr>
-  <td>
-   <fieldset>
-   <legend>'.&mt('Select').'</legend>
+  <td><b>'.&mt('Select Messages').'</b><br />
    <span class="LC_nobreak">
    <input type="button" onclick="javascript:checkAll(document.disall.delmark)" value="'.&mt('Check All').'" />'."\n".
   ' <input type="button" onclick="javascript:uncheckAll(document.disall.delmark)" value="'.&mt('Uncheck All').'" />'."\n".
   '<input type="hidden" name="sortedby" value="'.$env{'form.sortedby'}.'" />
   </span>
-  </fieldset>
   </td>'."\n".
   '<td><b>'.&mt('Action').'</b><br />'."\n".
   '  <select name="checkedaction">'."\n");
@@ -1266,7 +1272,7 @@
     $r->print("\n".'</select></td>'."\n");
 
     if (keys(%gotfolders) > 0) {
-        $r->print('<td><b>'.&mt('Destination folder').'<b><br />');
+        $r->print('<td><b>'.&mt('Destination folder').'</b><br />');
 	my %userfolders;
         foreach my $key (keys(%gotfolders)) {
             $userfolders{$key} = $key;
@@ -1275,10 +1281,12 @@
         $r->print(&Apache::loncommon::select_form('','movetofolder',\%userfolders).
                   '</td>');
     }
-    $r->print('<td>'.
+    $r->print('<td style="vertical-align:bottom;">'.
               '<input type="button" name="go" value="'.&mt('Go').
               '" onclick="javascript:validate_checkedaction()"/></td>'."\n".
-              '</tr></table>');
+              '</tr></table>'."\n".
+              '</fieldset></div>'."\n"
+    );
     my $postedstartdis=$startdis+1;
     $r->print('<input type="hidden" name="folder" value="'.$folder.'" /><input type="hidden" name="startdis" value="'.$postedstartdis.'" /><input type="hidden" name="interdis" value="'.$env{'form.interdis'}.'" /><input type="hidden" name="msgstatus" value="'.$msgstatus.'" /><input type="hidden" name="markedaction" value="" /></form>');
     if ($numblocked > 0) {
@@ -2129,19 +2137,22 @@
     push(@functionlist,'<a href="/adm/email?markdel='.&escape($msgid).$sqs.'">'
                   .&mt('Delete')
                   .'</a>');
-    push(@functionlist,'<a href="/adm/email?'.$sqs.'">'
-                  .&mt('Back to Folder Display')
-                  .'</a>');
+
+# Prepare available navigation
+    my @navigationlist;
     if ($counter > 0){
-        push(@functionlist,'<a href="/adm/email?display='.$messages[$counter-1]->[5].$sqs.'">'
+        push(@navigationlist,'<a href="/adm/email?display='.$messages[$counter-1]->[5].$sqs.'">'
                           .&mt('Previous')
                           .'</a>');
     }
     if ($counter < $number_of_messages - 1){
-        push(@functionlist,'<a href="/adm/email?display='.$messages[$counter+1]->[5].$sqs.'">'
+        push(@navigationlist,'<a href="/adm/email?display='.$messages[$counter+1]->[5].$sqs.'">'
                           .&mt('Next')
                           .'</a>');
     }
+    push(@navigationlist,'<a href="/adm/email?'.$sqs.'">'
+                  .&mt('Back to Folder Display')
+                  .'</a>');
 
 # Prepare available actions
     my $symb;
@@ -2150,7 +2161,7 @@
     } elsif (defined($content{'baseurl'})) {
         $symb=&Apache::lonnet::symbread($content{'baseurl'});
     }
-        my @actionlist;
+    my @actionlist;
     if ($env{'user.adv'}) {
 
 	if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) {
@@ -2178,7 +2189,7 @@
 	}
     }
 
-# Print functionlist and actionlist in page header
+# Print functionlist, navigationlist, and actionlist in page header
         my $functions='<div class="LC_columnSection">';
 
         # Functionlist
@@ -2188,10 +2199,18 @@
         }
         $functions .= &Apache::lonhtmlcommon::end_funclist();
 
+        # Navigationlist
+        $functions.=&Apache::lonhtmlcommon::start_funclist(
+                    &mt('Navigation'));
+        foreach my $item (@navigationlist) {
+            $functions.=&Apache::lonhtmlcommon::add_item_funclist($item);
+        }
+        $functions .= &Apache::lonhtmlcommon::end_funclist();
+
         # Actionlist
         if (@actionlist) {
-            my $legendtext=&mt('Currently available actions (will open extra window)');
-            $functions.=&Apache::lonhtmlcommon::start_funclist($legendtext);
+            $functions.=&Apache::lonhtmlcommon::start_funclist(
+                            &mt('Currently available actions (will open extra window)'));
             foreach my $item (@actionlist) {
                 $functions.=&Apache::lonhtmlcommon::add_item_funclist($item);
             }




More information about the LON-CAPA-cvs mailing list