Added support of subversion.
This commit is contained in:
committed by
Loic d'Anterroches
parent
763d7ca7f6
commit
ccc41c86b0
@@ -44,7 +44,7 @@
|
||||
<a accesskey="1" href="{url 'IDF_Views_Project::home', array($project.shortname)}"{block tabhome}{/block}>{trans 'Project Home'}</a>
|
||||
{if $hasIssuesAccess} <a href="{url 'IDF_Views_Issue::index', array($project.shortname)}"{block tabissues}{/block}>{trans 'Issues'}</a>{/if}
|
||||
{if $hasDownloadsAccess} <a href="{url 'IDF_Views_Download::index', array($project.shortname)}"{block tabdownloads}{/block}>{trans 'Downloads'}</a>{/if}
|
||||
{if $hasSourceAccess} <a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, 'master')}"{block tabsource}{/block}>{trans 'Source'}</a>{/if}
|
||||
{if $hasSourceAccess} <a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $project.getScmRoot())}"{block tabsource}{/block}>{trans 'Source'}</a>{/if}
|
||||
{if $isOwner}
|
||||
<a href="{url 'IDF_Views_Project::admin', array($project.shortname)}"{block tabadmin}{/block}>{trans 'Administer'}</a>{/if}{/if}
|
||||
</div>
|
||||
|
@@ -2,8 +2,8 @@
|
||||
{block tabsource} class="active"{/block}
|
||||
{block subtabs}
|
||||
<div id="sub-tabs">
|
||||
<a {if $inSourceTree}class="active" {/if}href="{url 'IDF_Views_Source::treeBase', array($project.shortname, 'master')}">{trans 'Source Tree'}</a> |
|
||||
<a {if $inChangeLog}class="active" {/if}href="{url 'IDF_Views_Source::changeLog', array($project.shortname, 'master')}">{trans 'Change Log'}</a>
|
||||
<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>
|
||||
{if $inCommit}| {trans 'Commit'}{/if}
|
||||
</div>
|
||||
{/block}
|
||||
|
@@ -29,11 +29,21 @@
|
||||
</table>
|
||||
{/block}
|
||||
{block context}
|
||||
{if $scm == 'git'}
|
||||
<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}
|
||||
</p>
|
||||
{/if}
|
||||
{if $scm == 'svn'}
|
||||
<p><strong>{trans 'Revison:'} {$commit}</strong><br />
|
||||
<form class="star" action="{url 'IDF_Views_Source::changelogRev', array($project.shortname)}" method="get">
|
||||
<input accesskey="4" type="text" value="{$commit}" name="rev" size="20" />
|
||||
<input type="submit" name="s" value="{trans 'Go to revision'}" />
|
||||
</form>
|
||||
</p>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
|
@@ -36,11 +36,13 @@
|
||||
{/if}
|
||||
{/block}
|
||||
{block context}
|
||||
{if $scm == 'git'}
|
||||
<p><strong>{trans 'Branches:'}</strong><br />
|
||||
{foreach $branches as $branch}
|
||||
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $branch)}
|
||||
<span class="label{if $commit == $branch} active{/if}"><a href="{$url}" class="label">{$branch}</a></span><br />
|
||||
{/foreach}
|
||||
</p>
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
|
71
src/IDF/templates/source/svn/tree.html
Normal file
71
src/IDF/templates/source/svn/tree.html
Normal file
@@ -0,0 +1,71 @@
|
||||
{extends "source/base.html"}
|
||||
{block docclass}yui-t1{assign $inSourceTree=true}{/block}
|
||||
{block body}
|
||||
<h2><a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $commit)}">{trans 'Root'}</a><span class="sep">/</span>{if $breadcrumb}{$breadcrumb|safe}{/if}</h2>
|
||||
|
||||
<table summary="" class="tree-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">{trans 'File'}</th>
|
||||
<th>{trans 'Age'}</th>
|
||||
<th>{trans 'Rev'}</th>
|
||||
<th>{trans 'Message'}</th>
|
||||
<th>{trans 'Size'}</th>
|
||||
</tr>
|
||||
</thead>{if !$tree_in || $props}
|
||||
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $commit)}
|
||||
<tfoot>
|
||||
{if $props}
|
||||
<tr><th colspan="6">
|
||||
<ul>
|
||||
{foreach $props as $prop => $val}
|
||||
<li>{trans 'Property'} <strong>{$prop}</strong> {trans 'set to:'} <em>{$val}</em></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</th></tr>
|
||||
{/if}
|
||||
{if !$tree_in}
|
||||
<tr><th colspan="6">{blocktrans}Source at commit <a class="mono" href="{$url}">{$commit}</a> created {$cobject.date|dateago}.{/blocktrans}<br />
|
||||
<span class="smaller">{blocktrans}By {$cobject.author|strip_tags|trim}, {$cobject.title}{/blocktrans}</span>
|
||||
</th></tr>
|
||||
{/if}
|
||||
</tfoot>
|
||||
{/if}<tbody>
|
||||
{if $base}
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="{url 'IDF_Views_Source::tree', array($project.shortname, $commit, $prev)}">..</a></td>
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{foreach $files as $file}
|
||||
{aurl 'url', 'IDF_Views_Source::tree', array($project.shortname, $commit, $file.fullpath)}
|
||||
<tr>
|
||||
<td class="fileicon"><img src="{media '/idf/img/'~$file.type~'.png'}" alt="{$file.type}" /></td>
|
||||
|
||||
<td><a href="{$url}">{$file.file}</a></td>
|
||||
<td><span class="smaller">{$file.date|dateago:"wihtout"}</span></td>
|
||||
<td>{$file.rev}</td>
|
||||
<td{if $file.type != 'blob'} colspan="2"{/if}><span class="smaller">{$file.log|nl2br}</span></td>
|
||||
{if $file.type == 'blob'}
|
||||
<td>{$file.size|size}</td>
|
||||
{/if}
|
||||
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="right soft"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <kbd>svn checkout {$project.getSvnDaemonUrl()}@{$commit}</kbd></p>
|
||||
|
||||
|
||||
{/block}
|
||||
{block context}
|
||||
<p><strong>{trans 'Revison:'} {$commit}</strong><br />
|
||||
<form class="star" action="{url 'IDF_Views_Source::treeRev', array($project.shortname)}" method="get">
|
||||
<input accesskey="4" type="text" value="{$commit}" name="rev" size="20" />
|
||||
<input type="hidden" name="sourcefile" value="{$base}"/>
|
||||
<input type="submit" name="s" value="{trans 'Go to revision'}" />
|
||||
</form>
|
||||
</p>
|
||||
{/block}
|
Reference in New Issue
Block a user