94 |
<form class="commit" method="post"> |
<form class="commit" method="post"> |
95 |
<pre class="l">$status</pre> |
<pre class="l">$status</pre> |
96 |
<textarea name="commit_message" cols=40 rows=4></textarea> |
<textarea name="commit_message" cols=40 rows=4></textarea> |
97 |
<br><input type="submit" name="action" value="commit"> |
<br> |
98 |
|
<a target="Frey::Test::Runner" href="/Frey::Test::Runner/as_markup" title="run tests for all changes" style="float: right;">test</a> |
99 |
|
<input type="submit" name="action" value="commit"> |
100 |
</form> |
</form> |
101 |
|; |
|; |
102 |
$self->add_status( status => $status ); |
$self->add_status( status => $status ); |
113 |
|
|
114 |
$diff = $self->html_escape( $diff ); |
$diff = $self->html_escape( $diff ); |
115 |
$self->add_css( qq| |
$self->add_css( qq| |
116 |
|
pre span.add, |
117 |
|
pre span.del { |
118 |
|
float: left; |
119 |
|
width: 100%; |
120 |
|
} |
121 |
pre span.add { background: #dfd } |
pre span.add { background: #dfd } |
122 |
pre span.del { background: #fdd } |
pre span.del { background: #fdd } |
123 |
pre form.inline { display: inline } |
pre form.inline { display: inline } |
124 |
| ); |
| ); |
125 |
$diff =~ s{^(\+.+?)$}{<span class="add">$1</span>}gm; |
$diff =~ s{^(\+.*?)$}{<span class="add">$1</span>}gm; |
126 |
$diff =~ s{^(\-.+?)$}{<span class="del">$1</span>}gm; |
$diff =~ s{^(\-.*?)$}{<span class="del">$1</span>}gm; |
127 |
sub form { |
sub form { |
128 |
my ( $path, $action ) = @_; |
my ( $path, $action ) = @_; |
129 |
qq|<form class="inline" method="post"><input type="hidden" name="path" value="$path"><input type="submit" name="action" value="$action"></form>|; |
qq|<form class="inline" method="post"><input type="hidden" name="path" value="$path"><input type="submit" name="action" value="$action"></form>|; |
173 |
return qq| |
return qq| |
174 |
Command <tt>$cmd</tt> produced output: |
Command <tt>$cmd</tt> produced output: |
175 |
<pre style="background: #ff8;">$out</pre> |
<pre style="background: #ff8;">$out</pre> |
176 |
|
<a href="">reload page</a> to prevent this post from triggering again<br> |
177 |
|; |
|; |
178 |
} |
} |
179 |
|
|