/[Frey]/trunk/lib/Frey/SVN.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/SVN.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1012 by dpavlin, Sat Jan 10 21:42:00 2009 UTC revision 1013 by dpavlin, Sat Jan 24 19:35:41 2009 UTC
# Line 157  sub as_markup { Line 157  sub as_markup {
157                  del { color: #c88 }                  del { color: #c88 }
158          |);          |);
159    
160            my $max_path_len = 0;
161            my $path_count;
162    
163          $self->iterator( sub {          $self->iterator( sub {
164                  my $e = shift;                  my $e = shift;
165    
# Line 185  sub as_markup { Line 188  sub as_markup {
188                          } else {                          } else {
189                                  push @files, $path;                                  push @files, $path;
190                          }                          }
191    
192                            $max_path_len = length $path if length $path > $max_path_len;
193                            $path_count->{$path}++;
194                  }                  }
195    
196                  $html .= qq|                  $html .= qq|
# Line 196  sub as_markup { Line 202  sub as_markup {
202                                  |                                  |
203                                  . join("<br>\n",                                  . join("<br>\n",
204                                          map {                                          map {
205                                                  qq|<a href="?repository=$repository;path=$_">$_</a>|                                                  my $path = $_;
206                                                    $path =~ s{<[^>]+>}{}g;
207                                                    qq|<a href="?repository=$repository;path=$path" title="$path ##">$_</a>|
208                                          } @files                                          } @files
209                                  )                                  )
210                                  . qq|                                  . qq|
# Line 207  sub as_markup { Line 215  sub as_markup {
215    
216          });          });
217    
218            $self->add_css(qq|
219                    .files {
220                            width: ${max_path_len}ex;
221                    }
222            |);
223    
224            $html =~ s[title="(\S+) ##"]['title="' . $path_count->{$1} . '"']gse;
225    
226          return $html;          return $html;
227  }  }
228    

Legend:
Removed from v.1012  
changed lines
  Added in v.1013

  ViewVC Help
Powered by ViewVC 1.1.26