/[Frey]/trunk/lib/Frey/Web.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/Web.pm

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

revision 480 by dpavlin, Thu Nov 20 14:39:43 2008 UTC revision 507 by dpavlin, Tue Nov 25 00:26:15 2008 UTC
# Line 12  use File::Slurp; Line 12  use File::Slurp;
12    
13  use Frey::Bookmarklet;  use Frey::Bookmarklet;
14  use Frey::ClassBrowser;  use Frey::ClassBrowser;
15    use Frey::SVK;
16    
17  has 'head' => (  has 'head' => (
18          is => 'rw',          is => 'rw',
# Line 188  sub page { Line 189  sub page {
189                  $body = '<!-- no body -->';                  $body = '<!-- no body -->';
190          }          }
191    
192            my $warn_colors = {
193                    '#'  => '#444',
194                    '##' => '#888',
195            };
196    
197          $status_line          $status_line
198                  .= qq|<span class="frey-popup">warn<code>|                  .= qq|<span class="frey-popup">warn<span>|
199                  . $self->editor_links( join("", $self->warnings ) )                  . $self->editor_links(
200                  . qq|</code></span>|                          join("", map {
201                                    warn "# $_";
202                                    my $style = '';
203                                    $style = $warn_colors->{$1}
204                                            ? ' style="color:' . $warn_colors->{$1} . '"'
205                                            : ''
206                                            if m{^(#+)};
207                                    qq|<tt$style>$_</tt><br/>|; # XXX <tt> should be <code> but CSS hates me
208                            } $self->warnings )
209                    )
210                    . qq|</span></span>|
211                  if $self->warnings;                  if $self->warnings;
212    
213          my      ($exit,$description) = ('exit','stop server');          my      ($exit,$description) = ('exit','stop server');
# Line 206  sub page { Line 222  sub page {
222                          </span>                          </span>
223                  |;                  |;
224    
225            my $revision = Frey::SVK->info->{Revision} || '';
226    
227          my $html = join("\n",          my $html = join("\n",
228                  qq|<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html><head>|,                  qq|<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html><head>|,
229                  $self->_head_html,                  $self->_head_html,
# Line 216  sub page { Line 234  sub page {
234                  </head><body>                  </head><body>
235                  $body                  $body
236                  <div class="frey-status-line">                  <div class="frey-status-line">
237                          <a href="/">Frey</a> $Frey::VERSION                          <a href="/">Frey</a> $Frey::VERSION $revision
238                          $status_line                          $status_line
239                          $right                          $right
240                  </div>                  </div>
# Line 281  sub error { Line 299  sub error {
299                  ;                  ;
300  }  }
301    
302    sub add_status {
303            my ( $self, $data ) = @_;
304            push @{ $self->status }, $data;
305            warn "## current status ", $#{ $self->status }, " elements";
306    }
307    
308  1;  1;

Legend:
Removed from v.480  
changed lines
  Added in v.507

  ViewVC Help
Powered by ViewVC 1.1.26