[LON-CAPA-cvs] cvs: loncom /interface lonpickcourse.pm
bisitz
lon-capa-cvs-allow@mail.lon-capa.org
Wed, 06 Aug 2008 10:45:37 -0000
bisitz Wed Aug 6 06:45:37 2008 EDT
Modified files:
/loncom/interface lonpickcourse.pm
Log:
- Optimized some &mt() calls
- Wrapped course selection items in LON-CAPA standard table
Index: loncom/interface/lonpickcourse.pm
diff -u loncom/interface/lonpickcourse.pm:1.73 loncom/interface/lonpickcourse.pm:1.74
--- loncom/interface/lonpickcourse.pm:1.73 Wed Jun 4 18:48:54 2008
+++ loncom/interface/lonpickcourse.pm Wed Aug 6 06:45:36 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Pick a course
#
-# $Id: lonpickcourse.pm,v 1.73 2008/06/04 22:48:54 bisitz Exp $
+# $Id: lonpickcourse.pm,v 1.74 2008/08/06 10:45:36 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -228,7 +228,7 @@
$menuchk = ' checked="checked" ';
}
$r->print(
- '<table class="LC_pick_box">'.
+ &Apache::lonhtmlcommon::start_pick_box().
'<tr class="LC_pick_box_row">'.
'<td class="LC_pick_box_title" rowspan="2">'.&mt('Action').'</td>'.
'<td class="LC_evenrow_value">'.
@@ -243,7 +243,7 @@
'<input type="radio" name="phase" value="menu"'.$menuchk.'/> '.
&mt('View or modify course settings which only a [_1] may modify.',$dctitle).
'</label></span>'.
- '</td></tr></table>'.
+ '</td></tr>'.&Apache::lonhtmlcommon::end_pick_box().
'<br />');
}
}
@@ -436,12 +436,12 @@
'15552000','31104000']));
my %lt = (
- 'cac' => &mt('[_1] Activity',$type),
- 'cde' => &mt('[_1] Description',$type),
- 'cdo' => &mt('[_1] Domain',$type),
+ 'cac' => &mt("$type Activity"),
+ 'cde' => &mt("$type Description"),
+ 'cdo' => &mt("$type Domain"),
'cin' => &mt('Course Institutional Code'),
- 'cow' => &mt("[_1] Owner's Username",$type),
- 'cod' => &mt("[_1] Owner's Domain", $type),
+ 'cow' => &mt("$type Owner's Username"),
+ 'cod' => &mt("$type Owner's Domain"),
'cog' => &mt('Course Type')
);
@@ -481,34 +481,50 @@
$output .= '<input type="hidden" name="setroles" value="'.$env{'form.setroles'}.'" />';
}
}
+
+ $output .= "<br />\n".&Apache::lonhtmlcommon::start_pick_box();
if ($sincefilterform) {
- $output .= $lt{'cac'}.': '.$sincefilterform.'<br />'."\n";
+ $output .= &Apache::lonhtmlcommon::row_title($lt{'cac'})
+ .$sincefilterform
+ .&Apache::lonhtmlcommon::row_closure();
}
if ($domainselectform) {
- $output .= $lt{'cdo'}.': '.$domainselectform.'<br />'."\n";
+ $output .= &Apache::lonhtmlcommon::row_title($lt{'cdo'})
+ .$domainselectform
+ .&Apache::lonhtmlcommon::row_closure();
}
if ($typeselectform) {
- $output .= $lt{'cog'}.': '.$typeselectform.'<br />'."\n";
+ $output .= &Apache::lonhtmlcommon::row_title($lt{'cog'})
+ .$typeselectform
+ .&Apache::lonhtmlcommon::row_closure();
}
if ($instcodeform) {
- $output .= $lt{'cin'}.': '.$instcodeform.'<br />'."\n";
+ $output .= &Apache::lonhtmlcommon::row_title($lt{'cin'})
+ .$instcodeform
+ .&Apache::lonhtmlcommon::row_closure();
}
if (exists($filter->{'ownerfilter'})) {
- $output .= $lt{'cow'}.': '.
- '<input type="text" name="ownerfilter" size="10" value="'.
- $list->{'ownerfilter'}.'" /><br />'."\n".
- $lt{'cod'}.': '.$ownerdomselectform.'<br />'."\n";
+ $output .= &Apache::lonhtmlcommon::row_title($lt{'cow'})
+ .'<input type="text" name="ownerfilter" size="10" value="'
+ .$list->{'ownerfilter'}.'" />'
+ .&Apache::lonhtmlcommon::row_closure()
+ .&Apache::lonhtmlcommon::row_title($lt{'cod'})
+ .$ownerdomselectform
+ .&Apache::lonhtmlcommon::row_closure();
}
if (exists($filter->{'coursefilter'})) {
- $output .= &mt('LON-CAPA course ID').': '.
- '<input type="text" name="coursefilter" size="25" value="'.
- $list->{'coursefilter'}.'" /><br />';
+ $output .= &Apache::lonhtmlcommon::row_title(&mt('LON-CAPA course ID'))
+ .'<input type="text" name="coursefilter" size="25" value="'
+ .$list->{'coursefilter'}.'" />'
+ .&Apache::lonhtmlcommon::row_closure();
}
if (exists($filter->{'descriptfilter'})) {
- $output .=$lt{'cde'}.': '.
- '<input type="text" name="descriptfilter" size="40" value="'.
- $list->{'descriptfilter'}.'" />'."\n";
+ $output .= &Apache::lonhtmlcommon::row_title($lt{'cde'})
+ .'<input type="text" name="descriptfilter" size="40" value="'
+ .$list->{'descriptfilter'}.'" />'
+ .&Apache::lonhtmlcommon::row_closure(1);
}
+ $output .= &Apache::lonhtmlcommon::end_pick_box();
$output .= '<p><input type="submit" name="gosearch" value="'.
&mt('Search').'" /></p>'."\n".'</form>'."\n".'<hr />'."\n";
return $output;