Diff for /loncom/interface/lonfeedback.pm between versions 1.333 and 1.334

version 1.333, 2012/01/10 14:52:57 version 1.334, 2012/01/10 20:06:07
Line 1155  sub build_posting_display { Line 1155  sub build_posting_display {
                                 @{$$namesort{$lastname}{$firstname}} = ("$idx");                                  @{$$namesort{$lastname}{$firstname}} = ("$idx");
                             }                              }
                             if ($outputtarget ne 'tex') {                              if ($outputtarget ne 'tex') {
   # Add karma stars
                                 my $karma=&userkarma($contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'});                                  my $karma=&userkarma($contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'});
                                 for (my $i=1;$i<=$karma;$i++) {                                  for (my $i=1;$i<=$karma;$i++) {
                                     $sender.='<img border="0" src="/res/adm/pages/star.gif" alt="'.&mt('Contributor Kudos').'" />';                                      $sender.='<img border="0" src="/res/adm/pages/star.gif" alt="'.&mt('Contributor Kudos').'" />';
                                 }                                  }
                                 unless ($likes{$symb.':'.$idx.':likers'}=~/\,\Q$thisuser\E\,/) {  # Can people edit this?
                                     $sender.='&nbsp;'.&discussion_link($symb,'<img border="0" src="/res/adm/pages/thumbsup.png" alt="'.&mt('Like').'" />','like',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Like this posting"));  
                                 }  
                                 unless ($likes{$symb.':'.$idx.':unlikers'}=~/\,\Q$thisuser\E\,/) {  
                                     $sender.='&nbsp;'.&discussion_link($symb,'<img border="0" src="/res/adm/pages/thumbsdown.png" alt="'.&mt('Unlike').'" />',,'unlike',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Unlike this posting"));  
                                 }  
                                 my $thislikes=$likes{$symb.':'.$idx.':likes'};  
                                 if ($thislikes>0) {   
                                     $sender.='&nbsp;('.&mt("[_1] likes",$thislikes).')';  
                                 } elsif ($thislikes<0) {  
                                     $sender.='&nbsp;('.&mt("[_1] unlikes",abs($thislikes)).')';  
                                 }  
                                 if (&editing_allowed($escsymb.':::'.$idx,$group)) {                                  if (&editing_allowed($escsymb.':::'.$idx,$group)) {
                                     if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) {                                      if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) {
                                         $sender.=' '.                                          $sender.=' '.
Line 1366  sub build_posting_display { Line 1356  sub build_posting_display {
                             } elsif ($thislikes<$oneminus) {                              } elsif ($thislikes<$oneminus) {
                                 $likesize="75";                                  $likesize="75";
                             }                              }
   # Actually glue in the message itself
                             $$discussionitems[$idx].= '<br /><blockquote>'.                              $$discussionitems[$idx].= '<br /><blockquote>'.
                                     "<div style='font-size:$likesize%'>".                                      "<div style='font-size:$likesize%'>".
                                     $message.                                      $message.
                                     '</div></blockquote>';                                      '</div></blockquote>';
   # Put in the like and unlike buttons
                               unless ($likes{$symb.':'.$idx.':likers'}=~/\,\Q$thisuser\E\,/) {
                                   $$discussionitems[$idx].='&nbsp;'.&discussion_link($symb,'<img border="0" src="/res/adm/pages/thumbsup.png" alt="'.&mt('Like').'" />','like',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Like this posting"));
                               } else {
                                   $$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsup_gray.png" alt="'.&mt('You like this posting').'" />';
                               }
                               unless ($likes{$symb.':'.$idx.':unlikers'}=~/\,\Q$thisuser\E\,/) {
                                   $$discussionitems[$idx].='&nbsp;'.&discussion_link($symb,'<img border="0" src="/res/adm/pages/thumbsdown.png" alt="'.&mt('Unlike').'" />',,'unlike',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Unlike this posting"));
                               } else {
                                   $$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsdown_gray.png" alt="'.&mt('You unlike this posting').'" />';
                               }
                               my $thislikes=$likes{$symb.':'.$idx.':likes'};
                               if ($thislikes>0) {
                                   $$discussionitems[$idx].='&nbsp;('.&mt("[_1] likes",$thislikes).')';
                               } elsif ($thislikes<0) {
                                   $$discussionitems[$idx].='&nbsp;('.&mt("[_1] unlikes",abs($thislikes)).')';
                               }
   # If there is any history to this post, inform the reader
                             if ($contrib{$idx.':history'}) {                              if ($contrib{$idx.':history'}) {
                                 my @postversions = ();                                  my @postversions = ();
                                 $$discussionitems[$idx] .= &mt('This post has been edited by the author.');                                  $$discussionitems[$idx] .= '&nbsp;&nbsp;'.&mt('This post has been edited by the author.');
                                 if ($seeid) {                                  if ($seeid) {
                                     $$discussionitems[$idx] .= '&nbsp;&nbsp;'.                                      $$discussionitems[$idx] .= '&nbsp;&nbsp;'.
                                          &discussion_link($symb,&mt('Display all versions'),'allversions',$idx,$$newpostsflag,$prevread,&group_args($group));                                           &discussion_link($symb,&mt('Display all versions'),'allversions',$idx,$$newpostsflag,$prevread,&group_args($group));

Removed from v.1.333  
changed lines
  Added in v.1.334


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