[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm portfolio.pm /localize/localize de.pm

bisitz bisitz@source.lon-capa.org
Fri, 28 Nov 2008 18:18:40 -0000


This is a MIME encoded message

--bisitz1227896320
Content-Type: text/plain

bisitz		Fri Nov 28 18:18:40 2008 EDT

  Modified files:              
    /loncom/localize/localize	de.pm 
    /loncom/interface	loncommon.pm portfolio.pm 
  Log:
  Optimized layout for actions "Upload File" and "Create Subdirectory":
  - Replaced hardcoded table by fieldsets
  - Removed now unused styles from loncommon.pm
    (LC_portfolio_actions, LC_portfolio_upload, LC_label, LC_value)
  - Added missing/Updated translations
  - Use common "%lt" instead of "%text" for localized texthash
  - Wrapped "Delete Directory" and "Delete Selected" button in paragraph
  
  
--bisitz1227896320
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20081128181840.txt"

Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.162 loncom/localize/localize/de.pm:1.163
--- loncom/localize/localize/de.pm:1.162	Fri Nov 28 17:04:31 2008
+++ loncom/localize/localize/de.pm	Fri Nov 28 18:18:33 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.162 2008/11/28 17:04:31 bisitz Exp $
+# $Id: de.pm,v 1.163 2008/11/28 18:18:33 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5791,8 +5791,17 @@
    'Create Subdirectory'
 => 'Erzeuge Unterverzeichnis',
 
-   'Create subdirectory in current directory:'
-=> 'Im aktuellen Verzeichnis neues Unterverzeichnis erzeugen:',
+   'Upload file to current directory'
+=> 'Datei in aktuelles Verzeichnis laden',
+
+   'Create subdirectory in current directory'
+=> 'Im aktuellen Verzeichnis neues Unterverzeichnis erzeugen',
+
+   'If HTML file, upload embedded images/multimedia/css/linked files'
+=> 'Bei HTML-Dateien:<br />Eingebettete Bilder/Multimedia-Dateien/CSS/verlinkte Dateien mit hochladen',
+
+   'Delete Selected'
+=> 'Ausgewählte löschen',
 
    'Critical'
 => 'Wichtig',
@@ -5854,9 +5863,6 @@
    'Upload'
 => 'Hochladen',
 
-   'Upload file to current directory:'
-=> 'Datei in aktuelles Verzeichnis laden:',
-
    'View Folder'
 => 'Verzeichnis betrachten',
 
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.696 loncom/interface/loncommon.pm:1.697
--- loncom/interface/loncommon.pm:1.696	Fri Nov 28 16:10:20 2008
+++ loncom/interface/loncommon.pm	Fri Nov 28 18:18:39 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.696 2008/11/28 16:10:20 bisitz Exp $
+# $Id: loncommon.pm,v 1.697 2008/11/28 18:18:39 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4819,24 +4819,6 @@
 table.LC_mail_list tr.LC_mail_odd {
 }
 
-
-table#LC_portfolio_actions {
-  width: auto;
-  background: $pgbg;
-  border: 0px;
-  border-spacing: 2px 2px;
-  padding: 0px;
-  margin: 0px;
-  border-collapse: separate;
-}
-table#LC_portfolio_actions td.LC_label {
-  background: $tabbg;
-  text-align: right;
-}
-table#LC_portfolio_actions td.LC_value {
-  background: $tabbg;
-}
-
 table#LC_cstr_controls {
   width: 100%;
   border-collapse: collapse;
Index: loncom/interface/portfolio.pm
diff -u loncom/interface/portfolio.pm:1.198 loncom/interface/portfolio.pm:1.199
--- loncom/interface/portfolio.pm:1.198	Fri Nov 28 17:04:25 2008
+++ loncom/interface/portfolio.pm	Fri Nov 28 18:18:39 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # portfolio browser
 #
-# $Id: portfolio.pm,v 1.198 2008/11/28 17:04:25 bisitz Exp $
+# $Id: portfolio.pm,v 1.199 2008/11/28 18:18:39 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -87,13 +87,12 @@
         my $groupitem = &group_form_data();
 
         my $iconpath= $r->dir_config('lonIconsURL') . "/";
-        my %text=&Apache::lonlocal::texthash(
+        my %lt=&Apache::lonlocal::texthash(
 					 'upload' => 'Upload',
-					 'upload_label' =>  
-					 'Upload file to current directory:',
+					 'upload_label' => 'Upload file to current directory',
 					 'createdir' => 'Create Subdirectory',
 					 'createdir_label' => 
-					 'Create subdirectory in current directory:',
+					 'Create subdirectory in current directory',
                                          'parse' => 'If HTML file, upload embedded images/multimedia/css/linked files'
                                             );
         my $escuri = &HTML::Entities::encode($r->uri,'&<>"');
@@ -108,50 +107,51 @@
             $parse_check = <<"END";
         <br />
         <span class="LC_nobreak">
-         <label>$text{'parse'}
+         <label>$lt{'parse'}
          <input type="checkbox" name="parserflag" checked="checked" />
          </label>
         </span>
 END
         }
-        $r->print(<<"TABLE"); 
-<table id="LC_portfolio_actions">
-  <tr id="LC_portfolio_upload">
-    <td class="LC_label">
-      $text{'upload_label'}
-    </td>
-    <td class="LC_value">
-      <form method="post" enctype="multipart/form-data" action="$escuri">
-        $groupitem 
-        <input name="uploaddoc" type="file" />
-	<input type="hidden" name="currentpath" value="$current_path" />
-	<input type="hidden" name="action" value="$env{"form.action"}" />
-	<input type="hidden" name="fieldname" value="$env{"form.fieldname"}" />
-	<input type="hidden" name="mode" value="$env{"form.mode"}" />
-	<input type="submit" name="storeupl" value="$text{'upload'}" />
-$help_fileupload
-$parse_check
-      </form>
-    </td>
-  </tr>
-  <tr id="LC_portfolio_createdir">
-    <td class="LC_label">
-      $text{'createdir_label'}
-    </td>
-    <td class="LC_value">
-      <form method="post" action="$escuri">
-        <input name="newdir" type="input" />$groupitem
-        <input type="hidden" name="currentpath" value="$current_path" />
-        <input type="hidden" name="action" value="$env{"form.action"}" />
-        <input type="hidden" name="fieldname" value="$env{"form.fieldname"}" />
-        <input type="hidden" name="mode" value="$env{"form.mode"}" />
-        <input type="submit" name="createdir" value="$text{'createdir'}" />$help_createdir
-      </form>
-    </td>
-  </tr>
-</table>
-TABLE
-    }
+
+        $r->print('<div>');
+        # Upload File
+        $r->print('<div class="LC_left_float">'
+                 .'<form method="post" enctype="multipart/form-data" action="'.$escuri.'">'
+                 .'<fieldset>'
+                 .'<legend>'.$lt{'upload_label'}.'</legend>'
+                 .$groupitem 
+                 .'<input name="uploaddoc" type="file" />'
+                 .'<input type="hidden" name="currentpath" value="'.$current_path.'" />'
+                 .'<input type="hidden" name="action" value="'.$env{"form.action"}.'" />'
+                 .'<input type="hidden" name="fieldname" value="'.$env{"form.fieldname"}.'" />'
+                 .'<input type="hidden" name="mode" value="'.$env{"form.mode"}.'" />'
+                 .'<input type="submit" name="storeupl" value="'.$lt{'upload'}.'" />'
+                 .$help_fileupload
+                 .$parse_check
+                 .'</fieldset>'
+                 .'</form>'
+                 .'</div>'
+        );
+        # Create Subdirectory
+        $r->print('<div class="LC_left_float">'
+                 .'<form method="post" action="'.$escuri.'">'
+                 .'<fieldset>'
+                 .'<legend>'.$lt{'createdir_label'}.'</legend>'
+                 .'<input name="newdir" type="input" />'.$groupitem
+                 .'<input type="hidden" name="currentpath" value="'.$current_path.'" />'
+                 .'<input type="hidden" name="action" value="'.$env{"form.action"}.'" />'
+                 .'<input type="hidden" name="fieldname" value="'.$env{"form.fieldname"}.'" />'
+                 .'<input type="hidden" name="mode" value="'.$env{"form.mode"}.'" />'
+                 .'<input type="submit" name="createdir" value="'.$lt{'createdir'}.'" />'
+                 .$help_createdir
+                 .'</fieldset>'
+                 .'</form>'
+                 .'</div>'
+        );
+        $r->print('</div>');
+    } # end "if can_upload"
+
     my @tree = split (/\//,$current_path);
     my %anchor_fields = (
         'selectfile'    => $port_path,
@@ -271,7 +271,9 @@
         $display_out = '<form method="post" action="'.$url.'">'.
 	    &group_form_data().
         '<input type="hidden" name="action" value="deletedir" />'.
+        '<p>'.
         '<input type="submit" name="deletedir" value="'.&mt("Delete Directory").'" />'.
+        '</p>'.
         '<input type="hidden" name="selectfile" value="" />'.
         '<input type="hidden" name="currentpath" value="'.$current_path.'" />'.
         '</form>';
@@ -487,8 +489,10 @@
         $r->print(&Apache::loncommon::end_data_table());
         if ($can_delete) {
             $r->print('
+        <p>
         <input type="submit" name="doit" value="'.&mt('Delete Selected').'" />'.
 	&Apache::loncommon::help_open_topic('Portfolio DeleteFile').'
+        </p>
         <input type="hidden" name="action" value="delete" />
         <input type="hidden" name="currentpath" value="'.$current_path.'" />
         </form>'

--bisitz1227896320--