Diff for /loncom/interface/lonrss.pm between versions 1.52 and 1.55

version 1.52, 2013/05/25 21:50:19 version 1.55, 2016/12/01 16:37:53
Line 129  sub advertisefeeds { Line 129  sub advertisefeeds {
     if ($feeds) {      if ($feeds) {
  return '<h4>'.&mt('Available RSS Feeds and Blogs').'</h4><ul>'.$feeds.'</ul>';   return '<h4>'.&mt('Available RSS Feeds and Blogs').'</h4><ul>'.$feeds.'</ul>';
     } else {      } else {
         return '';          return '<h4>'.&mt('No available RSS Feeds and Blogs').'</h4>';
     }      }
 }  }
   
Line 345  sub handler { Line 345  sub handler {
 # my $title = $displayfeedname?$displayfeedname:"Available RSS Feeds and Blogs";  # my $title = $displayfeedname?$displayfeedname:"Available RSS Feeds and Blogs";
         my $title = "My Space";          my $title = "My Space";
  my $rss_link = &Apache::lonrss::rss_link($uname,$udom);   my $rss_link = &Apache::lonrss::rss_link($uname,$udom);
       my $head_extra = $rss_link.'<script type="text/javascript"
                                   src="/res/adm/includes/file_upload.js"></script>';
  my $brcrumb = [{href=>$rss_link,text=>"Available RSS Feeds and Blogs"}];   my $brcrumb = [{href=>$rss_link,text=>"Available RSS Feeds and Blogs"}];
  $r->print(&Apache::loncommon::start_page($title,$rss_link,   $r->print(&Apache::loncommon::start_page($title,$head_extra,
  {'bread_crumbs'   => $brcrumb,   {'bread_crumbs'   => $brcrumb,
   'domain'         => $udom,    'domain'         => $udom,
   'force_register' => $env{'form.register'}}).    'force_register' => $env{'form.register'}}).
Line 534  sub handler { Line 536  sub handler {
    'title' => 'Title',     'title' => 'Title',
    'link' => 'Link',     'link' => 'Link',
    'description' => 'Description',     'description' => 'Description',
                                                            'enc' => 'Podcasted enclosure');                                 'enc' => 'Podcasted enclosure');
                         my $uploadlink;              my $uploadlink;
                         if ($entry==$newid) {              if ($entry==$newid) {
 # Generate upload link only for last (new) entry  # Generate upload link only for last (new) entry
     $uploadlink=&Apache::inputtags::file_selector(0,0,'*','both');                  # Calculate the quota space available in the user's portfolio
                   my $disk_quota = &Apache::loncommon::get_user_quota($env{'user.name'},
                                       $env{'user.domain'}); # expressed in MB
                   my $portfolio_root = '/userfiles/portfolio';
                   my $getpropath = 1;
                   my $current_disk_usage = &Apache::lonnet::diskusage(
                           $env{'user.domain'}, $env{'user.name'}, 
                           $portfolio_root, $getpropath); # Expressed in kB
                   # Convert to MB for use in file_selector()
                   my $free_space = $disk_quota - ($current_disk_usage / 1024.); 
                   # Format this number since it will be displayed onscreen
                   $free_space = sprintf("%.1f", $free_space);
                   $uploadlink=&Apache::inputtags::file_selector(0,0,'*','both','',$free_space);
  } else {   } else {
 # Otherwise, display  # Otherwise, display
                             $uploadlink='<tt>'.$newsfeed{$id.'_enclosureurl'}.'</tt>'.                              $uploadlink='<tt>'.$newsfeed{$id.'_enclosureurl'}.'</tt>'.
Line 552  sub handler { Line 566  sub handler {
 <li>  <li>
 <label><input name='$id\_modified' type='checkbox' value="modified" /> $lt{'store'}</label>  <label><input name='$id\_modified' type='checkbox' value="modified" /> $lt{'store'}</label>
 &nbsp;&nbsp;  &nbsp;&nbsp;
 <label><input name='$id\_status' type="radio" value="public" $status{'public'} onClick="changed(this.form,'$id');" /> $lt{'public'}</label>  <label><input name='$id\_status' type="radio" value="public" $status{'public'} onclick="changed(this.form,'$id');" /> $lt{'public'}</label>
 &nbsp;&nbsp;  &nbsp;&nbsp;
 <label><input name='$id\_status' type="radio" value="private" $status{'private'} onClick="changed(this.form,'$id');" /> $lt{'private'}</label>  <label><input name='$id\_status' type="radio" value="private" $status{'private'} onclick="changed(this.form,'$id');" /> $lt{'private'}</label>
 &nbsp;&nbsp;  &nbsp;&nbsp;
 <label><input name='$id\_status' type="radio" value="hidden" $status{'hidden'} onClick="changed(this.form,'$id');" /> $lt{'hidden'}</label>  <label><input name='$id\_status' type="radio" value="hidden" $status{'hidden'} onclick="changed(this.form,'$id');" /> $lt{'hidden'}</label>
 &nbsp;&nbsp;  &nbsp;&nbsp;
 <label><input name='$id\_status' type="radio" value="deleted" onClick="changed(this.form,'$id');" /> $lt{'delete'}</label>  <label><input name='$id\_status' type="radio" value="deleted" onclick="changed(this.form,'$id');" /> $lt{'delete'}</label>
 <br />  <br />
 $lt{'title'}:  $lt{'title'}:
 <input name='$id\_title' type='text' size='60' value='$newsfeed{$id.'_title'}' onChange="changed(this.form,'$id');" /><br />  <input name='$id\_title' type='text' size='60' value='$newsfeed{$id.'_title'}' onchange="changed(this.form,'$id');" /><br />
 $lt{'description'}:<br />  $lt{'description'}:<br />
 <textarea name='$id\_description' rows="6" cols="80" onChange="changed(this.form,'$id');">$newsfeed{$id.'_description'}</textarea><br />  <textarea name='$id\_description' rows="6" cols="80" onchange="changed(this.form,'$id');">$newsfeed{$id.'_description'}</textarea><br />
 $lt{'link'}:  $lt{'link'}:
 <input name='$id\_link' type='text' size='60' value='$newsfeed{$id.'_link'}' onChange="changed(this.form,'$id');" /><br />  <input name='$id\_link' type='text' size='60' value='$newsfeed{$id.'_link'}' onchange="changed(this.form,'$id');" /><br />
 $lt{'enc'} -  $lt{'enc'} -
 $uploadlink  $uploadlink
 <hr /></li>  <hr /></li>

Removed from v.1.52  
changed lines
  Added in v.1.55


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>