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

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

revision 591 by dpavlin, Fri Nov 28 16:39:37 2008 UTC revision 598 by dpavlin, Fri Nov 28 18:29:59 2008 UTC
# Line 7  with 'Frey::Web'; Line 7  with 'Frey::Web';
7  has commit_path => (  has commit_path => (
8          documentation => 'path to commit',          documentation => 'path to commit',
9          is => 'rw',          is => 'rw',
10          isa => 'Str',          isa => 'ArrayRef|Str',
11  );  );
12    
13  has message => (  has message => (
# Line 57  sub as_data { Line 57  sub as_data {
57  sub status_as_markup {  sub status_as_markup {
58          my ($self) = @_;          my ($self) = @_;
59          my $status = `svk status -q`;          my $status = `svk status -q`;
60          $status =~ s{^(\w+\s+)(\S+)$}{$1<a href="#$2">$2</a>}gm;          $status =~ s{^(\w+\s+)(\S+)$}{$1<input name="commit_path" value="$2" type="checkbox"><a href="#$2">$2</a>}gm;
61          $self->add_css( qq| pre.l a { text-decoration: none; } | );          $self->add_css( qq| pre.l a { text-decoration: none; } | );
62          $status = qq|<pre class="l">$status</pre>|;          $status = qq|
63                    <form>
64                    <div style="background: #ffd; float: right; padding: 1em;">
65                            <textarea name="message" width=20 height=4></textarea>
66                            <br><input type="submit" value="Commit">
67                    </div>
68                    <pre class="l">$status</pre>
69                    </form>
70            |;
71          $self->add_status( $status );          $self->add_status( $status );
72          warn "status_as_markup ",length($status)," bytes";          warn "status_as_markup ",length($status)," bytes";
73          return $status;          return $status;
# Line 92  sub as_markup { Line 100  sub as_markup {
100                  $self->TODO( "Frey::Web role missing" );                  $self->TODO( "Frey::Web role missing" );
101          }          }
102    
103          my $html = $self->status_as_markup . $self->diff_as_markup;          my $html
104                    = ( $self->status_as_markup || $self->error('no status_or_markup output') )
105                    . ( $self->diff_as_markup   || $self->error('no diff_as_markup output') )
106                    ;
107          warn "as_markup ",length($html)," bytes";          warn "as_markup ",length($html)," bytes";
108    
109          return $html;          return $html;

Legend:
Removed from v.591  
changed lines
  Added in v.598

  ViewVC Help
Powered by ViewVC 1.1.26