Indefero

Indefero Commit Details


Date:2008-11-15 14:10:37 (16 years 1 month ago)
Author:Nicolas Lassalle
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:5c32145e13f653beb28c851a9a9ea1002b9059e2
Parents: 99a2e2b83f42cbcdce290ceb3297032a22870e8d
Message:Added diff pretty print in the commit.

Changes:

File differences

src/IDF/Diff.php
115115
116116
117117
118
119
120
121
122
123
124
118125
119126
120127
......
128135
129136
130137
131
138
132139
133140
134141
{
$out = '';
foreach ($this->files as $filename=>$file) {
$openPre = '';
$closePre = '';
$fileinfo = IDF_Views_Source::getMimeType($filename);
if (IDF_Views_Source::isSupportedExtension($fileinfo[2])) {
$openPre = '<pre class="prettyprint">';
$closePre = '</pre>';
}
$out .= "\n".'<table class="diff" summary="">'."\n";
$out .= '<tr id="diff-'.md5($filename).'"><th colspan="3">'.Pluf_esc($filename).'</th></tr>'."\n";
$cc = 1;
$class = 'diff-a';
}
$line_content = self::padLine(Pluf_esc($line[2]));
$out .= sprintf('<tr class="diff-line"><td class="diff-lc">%s</td><td class="diff-lc">%s</td><td class="%s mono">%s</td></tr>'."\n", $line[0], $line[1], $class, $line_content);
$out .= sprintf('<tr class="diff-line"><td class="diff-lc">%s</td><td class="diff-lc">%s</td><td class="%s mono">%s%s%s</td></tr>'."\n", $line[0], $line[1], $class, $openPre, $line_content, $closePre);
}
if (count($file['chunks']) > $cc)
$out .= '<tr class="diff-next"><td>...</td><td>...</td><td>&nbsp;</td></tr>'."\n";
src/IDF/templates/source/commit.html
11
2
23
34
45
......
4344
4445
4546
47
48
49
50
51
52
{extends "source/base.html"}
{block extraheader}<link rel="stylesheet" type="text/css" href="{media '/idf/css/prettify.css'}" />{/block}
{block docclass}yui-t1{assign $inCommit=true}{/block}
{block body}
<table class="commit" summary="">
{/if}
{/block}
{block javascript}
<script type="text/javascript" src="{media '/idf/js/prettify.js'}"></script>
<script type="text/javascript">
prettyPrint();
</script>
{/block}

Archive Download the corresponding diff file

Page rendered in 0.08179s using 13 queries.