121 |
$diff =~ s{^(\-.+?)$}{<span class="del">$1</span>}gm; |
$diff =~ s{^(\-.+?)$}{<span class="del">$1</span>}gm; |
122 |
sub form { |
sub form { |
123 |
my ( $path, $action ) = @_; |
my ( $path, $action ) = @_; |
124 |
qq|<form class="inline"><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>|; |
125 |
}; |
}; |
126 |
$diff =~ s{^(===\s+)(\S+)$}{$1 . form($2,'revert') . qq| <a name="$2" target="editor" href="/editor+$2+1">$2</a> | . form($2,'postpone') }gem; |
$diff =~ s{^(===\s+)(\S+)$}{$1 . form($2,'revert') . qq| <a name="$2" target="editor" href="/editor+$2+1">$2</a> | . form($2,'postpone') }gem; |
127 |
|
|
128 |
$diff = qq|<pre>$diff</pre>|; |
$diff = qq|<pre>$diff</pre>| if $diff; |
129 |
warn "diff_as_markup ",length($diff)," bytes"; |
warn "diff_as_markup ",length($diff)," bytes"; |
130 |
return $diff; |
return $diff; |
131 |
} |
} |
162 |
|
|
163 |
return qq| |
return qq| |
164 |
Command <tt>$cmd</tt> produced output: |
Command <tt>$cmd</tt> produced output: |
165 |
<code style="background: #ff8;"> |
<pre style="background: #ff8;"> |
166 |
$out |
$out |
167 |
</code> |
</pre> |
168 |
|; |
|; |
169 |
} |
} |
170 |
|
|
177 |
|
|
178 |
$self->title( 'svk' . ( $self->action ? ' - ' . $self->action : '' ) ); # XXX without this we get wrong icon and title |
$self->title( 'svk' . ( $self->action ? ' - ' . $self->action : '' ) ); # XXX without this we get wrong icon and title |
179 |
|
|
180 |
$html .= $self->commit_as_markup . $self->diff_as_markup; |
$html .= $self->commit_as_markup . $self->diff_as_markup || |
181 |
|
qq|No changes in tracked files|; |
182 |
|
|
183 |
warn "as_markup ",length($html)," bytes"; |
warn "as_markup ",length($html)," bytes"; |
184 |
|
|