Improve repository presentation.

This commit is contained in:
takezoe
2013-06-18 19:59:03 +09:00
parent 3fc468bd33
commit b72bbb6dcd
4 changed files with 52 additions and 35 deletions

View File

@@ -10,53 +10,55 @@
<a href="@path/@repository.owner/@repository.name/tree/@branch/@pathList.take(i + 1).mkString("/")">@section</a> /
}
</div>
<table class="table table-file-list">
<tr>
<th colspan="4" style="font-weight: normal;">
<div>
<strong><a href="">@latestCommit.committer</a></strong>
@helpers.cut(latestCommit.message, 100)
<div class="box">
<table class="table table-file-list" style="border: 1px solid silver;">
<tr>
<th colspan="4" style="font-weight: normal;">
<div>
<strong><a href="@path/@repository.owner/@repository.name/@latestCommit.committer">@latestCommit.committer</a></strong>
<a href="@path/@repository.owner/@repository.name/commit/@latestCommit.id" class="commit-message">@helpers.cut(latestCommit.message, 100)</a>
<div class="pull-right align-right">
@helpers.datetime(latestCommit.time)
<a href="@path/@repository.owner/@repository.name/commit/@latestCommit.id">@latestCommit.id.substring(0, 10)</a>
</div>
</div>
</th>
</tr>
@if(pathList.size > 0){
<tr>
<td width="16"></td>
<td><a href="@path/@repository.owner/@repository.name@if(pathList.size > 1){/tree/@branch/@pathList.init.mkString("/")}">..</a></td>
<td></td>
<td></td>
</tr>
}
@files.map { file =>
<tr>
<td width="16">
</div>
</th>
</tr>
@if(pathList.size > 0){
<tr>
<td width="16"></td>
<td><a href="@path/@repository.owner/@repository.name@if(pathList.size > 1){/tree/@branch/@pathList.init.mkString("/")}">..</a></td>
<td></td>
<td></td>
</tr>
}
@files.map { file =>
<tr>
<td width="16">
@if(file.isDirectory){
<img src="@path/assets/common/images/folder.png"/>
} else {
<img src="@path/assets/common/images/file.png"/>
}
</td>
<td>
</td>
<td>
@if(file.isDirectory){
<a href="@path/@repository.owner/@repository.name/tree@{(branch :: pathList).mkString("/", "/", "/")}@file.name">@file.name</a>
} else {
<a href="@path/@repository.owner/@repository.name/blob@{(branch :: pathList).mkString("/", "/", "/")}@file.name">@file.name</a>
}
</td>
<td>@helpers.datetime(file.time)</td>
<td>@helpers.cut(file.message, 60) [<a href="@path/@file.committer">@file.committer</a>]</td>
</tr>
}
</table>
</td>
<td>@helpers.datetime(file.time)</td>
<td><a href="@path/@repository.owner/@repository.name/commit/@file.commitId" class="commit-message">@helpers.cut(file.message, 60)</a> [<a href="@path/@file.committer">@file.committer</a>]</td>
</tr>
}
</table>
</div>
@readme.map { content =>
<table class="table table-bordered">
<tr>
<td>@helpers.markdown(content, repository, false, true, true)</td>
</tr>
</table>
<div class="box">
<div class="box-header">README.md</div>
<div class="box-content">@helpers.markdown(content, repository, false, true, true)</div>
</div>
}
}