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 => ( |
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; |
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; |