Indefero

Indefero Commit Details


Date:2009-05-26 14:47:54 (15 years 6 months ago)
Author:Loic d'Anterroches
Branch: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:bc434504b177ac0dfedee0cbded44971d85c208e
Parents: 88ce10b8e6b5d744e036e1012ead514df53d5994
Message:Fixed issue 210, sub-tabs links not follows the active branche in Source view.

Changes:

File differences

src/IDF/Template/IssueComment.php
126126
127127
128128
129
130
131
132
133
134
135
136129
130
131
132
137133
138134
139135
......
141137
142138
143139
144
145
140
146141
147
148
149
150
142
151143
152144
153145
154146
155
147
156148
157149
158150
*/
function callbackCommit($m)
{
try {
if ('commit' != $this->scm->testHash($m[0])) {
return $m[0]; // not a commit.
}
} catch (IDF_Scm_Exception $e) {
return $m[0]; // commit not found.
}
$co = $this->scm->getCommit($m[0]);
if (!$co) {
return $m[0]; // not a commit.
}
return '<a href="'
.Pluf_HTTP_URL_urlForView('IDF_Views_Source::commit', array($this->project->shortname, $co->commit))
.'">'.$m[0].'</a>';
function callbackSource($m)
{
$branches = $this->scm->getBranches();
if (count($branches) == 0) return $m[0];
if (!$this->scm->isAvailable()) return $m[0];
$file = $m[2];
if ('commit' != $this->scm->testHash($branches[0], $file)) {
return $m[0];
}
$request_file_info = $this->scm->getFileInfo($file, $branches[0]);
$request_file_info = $this->scm->getPathInfo($file);
if (!$request_file_info) {
return $m[0];
}
if ($request_file_info->type != 'tree') {
return $m[1].'<a href="'.Pluf_HTTP_URL_urlForView('IDF_Views_Source::tree', array($this->project->shortname, $branches[0], $file)).'">'.$m[2].'</a>';
return $m[1].'<a href="'.Pluf_HTTP_URL_urlForView('IDF_Views_Source::tree', array($this->project->shortname, $this->scm->getMainBranch(), $file)).'">'.$m[2].'</a>';
}
return $m[0];
}
src/IDF/Views/Source.php
8888
8989
9090
91
9192
9293
9394
......
9596
9697
9798
99
98100
99101
100102
......
128130
129131
130132
131
132133
133134
134135
}
$rchanges = new Pluf_Template_ContextVars($rchanges);
$scmConf = $request->conf->getVal('scm', 'git');
$in_branches = $scm->inBranches($commit, '');
return Pluf_Shortcuts_RenderToResponse('idf/source/changelog.html',
array(
'page_title' => $title,
'changes' => $rchanges,
'commit' => $commit,
'branches' => $branches,
'tree_in' => $in_branches,
'scm' => $scmConf,
),
$request);
$res = new Pluf_Template_ContextVars($scm->getTree($commit));
$cache->set($key, $res);
}
//$tree_in = in_array($commit, $branches);
$scmConf = $request->conf->getVal('scm', 'git');
$props = $scm->getProperties($commit);
return Pluf_Shortcuts_RenderToResponse('idf/source/'.$scmConf.'/tree.html',
src/IDF/templates/idf/source/base.html
11
22
33
4
45
5
6
6
7
78
89
910
{extends "idf/base.html"}
{block tabsource} class="active"{/block}
{block subtabs}
{if array_key_exists($commit, $branches)}{assign $currentCommit = $commit}{else}{assign $currentCommit = $project.getScmRoot()}{/if}
<div id="sub-tabs">
<a {if $inSourceTree}class="active" {/if}href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $project.getScmRoot())}">{trans 'Source Tree'}</a> |
<a {if $inChangeLog}class="active" {/if}href="{url 'IDF_Views_Source::changeLog', array($project.shortname, $project.getScmRoot())}">{trans 'Change Log'}</a>
<a {if $inSourceTree}class="active" {/if}href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $currentCommit)}">{trans 'Source Tree'}</a> |
<a {if $inChangeLog}class="active" {/if}href="{url 'IDF_Views_Source::changeLog', array($project.shortname, $currentCommit)}">{trans 'Change Log'}</a>
{if $inCommit}| {trans 'Commit'}{/if} |
<a {if $inHelp}class="active" {/if}href="{url 'IDF_Views_Source::help', array($project.shortname)}">{trans 'How To Get The Code'}</a>
</div>
src/IDF/templates/idf/source/changelog.html
2727
2828
2929
30
3031
3132
3233
33
34
35
34
35
36
3637
3738
3839
</tbody>
</table>
{/block}
{block context}
{if $scm != 'svn'}
<p><strong>{trans 'Branches:'}</strong><br />
{foreach $branches as $branch}
{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $branch)}
<span class="label{if $commit == $branch} active{/if}"><a href="{$url}" class="label">{$branch}</a></span><br />
{foreach $branches as $branch => $path}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label">{$branch}</a></span><br />
{/foreach}
</p>
{else}

Archive Download the corresponding diff file

Page rendered in 0.09138s using 14 queries.