mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 06:55:54 +01:00
Global navigation moves to side menu.
This commit is contained in:
@@ -8,91 +8,94 @@
|
||||
@import context._
|
||||
@import view.helpers._
|
||||
@html.main(s"${repository.owner}/${repository.name}", Some(repository)) {
|
||||
@html.header("code", repository)
|
||||
@tab(branch, repository, "files")
|
||||
<div class="head">
|
||||
<div class="pull-right">
|
||||
@defining(repository.commitCount){ commitCount =>
|
||||
<a href="@url(repository)/commits/@encodeRefName(branch)">@if(commitCount > 10000){ 10000+ } else { @commitCount } @plural(commitCount, "commit")</a>
|
||||
@html.header("code", repository, Some(branch)){
|
||||
@tab(branch, repository, "files")
|
||||
<div class="head">
|
||||
@*
|
||||
<div class="pull-right">
|
||||
@defining(repository.commitCount){ commitCount =>
|
||||
<a href="@url(repository)/commits/@encodeRefName(branch)">@if(commitCount > 10000){ 10000+ } else { @commitCount } @plural(commitCount, "commit")</a>
|
||||
}
|
||||
</div>
|
||||
*@
|
||||
<a href="@url(repository)/tree/@encodeRefName(branch)">@repository.name</a> /
|
||||
@pathList.zipWithIndex.map { case (section, i) =>
|
||||
<a href="@url(repository)/tree/@encodeRefName(branch)/@pathList.take(i + 1).mkString("/")">@section</a> /
|
||||
}
|
||||
@if(hasWritePermission){
|
||||
<a href="@url(repository)/new/@encodeRefName(branch)/@pathList.mkString("/")"><img src="@assets/common/images/newfile.png"/></a>
|
||||
}
|
||||
</div>
|
||||
<a href="@url(repository)/tree/@encodeRefName(branch)">@repository.name</a> /
|
||||
@pathList.zipWithIndex.map { case (section, i) =>
|
||||
<a href="@url(repository)/tree/@encodeRefName(branch)/@pathList.take(i + 1).mkString("/")">@section</a> /
|
||||
}
|
||||
@if(hasWritePermission){
|
||||
<a href="@url(repository)/new/@encodeRefName(branch)/@pathList.mkString("/")"><img src="@assets/common/images/newfile.png"/></a>
|
||||
}
|
||||
</div>
|
||||
<div class="box">
|
||||
<table class="table table-file-list" style="border: 1px solid silver;">
|
||||
<tr>
|
||||
<th colspan="4" style="font-weight: normal;">
|
||||
<a href="@url(repository)/commit/@latestCommit.id" class="commit-message">@link(latestCommit.summary, repository)</a>
|
||||
@if(latestCommit.description.isDefined){
|
||||
<a href="javascript:void(0)" onclick="$('#description-@latestCommit.id').toggle();" class="omit">...</a>
|
||||
<pre id="description-@latestCommit.id" class="commit-description" style="display: none;">@link(latestCommit.description.get, repository)</pre>
|
||||
}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="latest-commit">
|
||||
<div>
|
||||
@avatar(latestCommit, 20)
|
||||
@user(latestCommit.committer, latestCommit.mailAddress, "username strong")
|
||||
<span class="muted">@datetime(latestCommit.time)</span>
|
||||
<div class="pull-right align-right monospace">
|
||||
<a href="@url(repository)/commit/@latestCommit.id" class="commit-id"><span class="muted">latest commit</span> @latestCommit.id.substring(0, 10)</a>
|
||||
<div class="box">
|
||||
<table class="table table-file-list" style="border: 1px solid silver;">
|
||||
<tr>
|
||||
<th colspan="4" style="font-weight: normal;">
|
||||
<a href="@url(repository)/commit/@latestCommit.id" class="commit-message">@link(latestCommit.summary, repository)</a>
|
||||
@if(latestCommit.description.isDefined){
|
||||
<a href="javascript:void(0)" onclick="$('#description-@latestCommit.id').toggle();" class="omit">...</a>
|
||||
<pre id="description-@latestCommit.id" class="commit-description" style="display: none;">@link(latestCommit.description.get, repository)</pre>
|
||||
}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="latest-commit">
|
||||
<div>
|
||||
@avatar(latestCommit, 20)
|
||||
@user(latestCommit.committer, latestCommit.mailAddress, "username strong")
|
||||
<span class="muted">@datetime(latestCommit.time)</span>
|
||||
<div class="pull-right align-right monospace">
|
||||
<a href="@url(repository)/commit/@latestCommit.id" class="commit-id"><span class="muted">latest commit</span> @latestCommit.id.substring(0, 10)</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@if(pathList.size > 0){
|
||||
<tr>
|
||||
<td width="16"></td>
|
||||
<td><a href="@url(repository)@if(pathList.size > 1){/tree/@encodeRefName(branch)/@pathList.init.mkString("/")}">..</a></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
}
|
||||
@files.map { file =>
|
||||
<tr>
|
||||
<td width="16">
|
||||
@if(file.isDirectory){
|
||||
@if(file.linkUrl.isDefined){
|
||||
<img src="@assets/common/images/folder_link.png"/>
|
||||
} else {
|
||||
<img src="@assets/common/images/folder.png"/>
|
||||
}
|
||||
} else {
|
||||
<img src="@assets/common/images/file.png"/>
|
||||
</td>
|
||||
</tr>
|
||||
@if(pathList.size > 0){
|
||||
<tr>
|
||||
<td width="16"></td>
|
||||
<td><a href="@url(repository)@if(pathList.size > 1){/tree/@encodeRefName(branch)/@pathList.init.mkString("/")}">..</a></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
@if(file.isDirectory){
|
||||
@if(file.linkUrl.isDefined){
|
||||
<a href="@file.linkUrl">@file.name</a>
|
||||
@files.map { file =>
|
||||
<tr>
|
||||
<td width="16">
|
||||
@if(file.isDirectory){
|
||||
@if(file.linkUrl.isDefined){
|
||||
<img src="@assets/common/images/folder_link.png"/>
|
||||
} else {
|
||||
<img src="@assets/common/images/folder.png"/>
|
||||
}
|
||||
} else {
|
||||
<a href="@url(repository)/tree@{(encodeRefName(branch) :: pathList).mkString("/", "/", "/")}@file.name">@file.name</a>
|
||||
<img src="@assets/common/images/file.png"/>
|
||||
}
|
||||
} else {
|
||||
<a href="@url(repository)/blob@{(encodeRefName(branch) :: pathList).mkString("/", "/", "/")}@file.name">@file.name</a>
|
||||
</td>
|
||||
<td>
|
||||
@if(file.isDirectory){
|
||||
@if(file.linkUrl.isDefined){
|
||||
<a href="@file.linkUrl">@file.name</a>
|
||||
} else {
|
||||
<a href="@url(repository)/tree@{(encodeRefName(branch) :: pathList).mkString("/", "/", "/")}@file.name">@file.name</a>
|
||||
}
|
||||
} else {
|
||||
<a href="@url(repository)/blob@{(encodeRefName(branch) :: pathList).mkString("/", "/", "/")}@file.name">@file.name</a>
|
||||
}
|
||||
</td>
|
||||
<td class="mute">
|
||||
<a href="@url(repository)/commit/@file.commitId" class="commit-message">@link(file.message, repository)</a>
|
||||
[@user(file.committer, file.mailAddress)]
|
||||
</td>
|
||||
<td style="text-align: right;">@datetime(file.time)</td>
|
||||
</tr>
|
||||
}
|
||||
</td>
|
||||
<td>@datetime(file.time)</td>
|
||||
<td>
|
||||
<a href="@url(repository)/commit/@file.commitId" class="commit-message">@link(file.message, repository)</a>
|
||||
[@user(file.committer, file.mailAddress)]
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@readme.map { case(filePath, content) =>
|
||||
<div id="readme" class="box">
|
||||
<div class="box-header">@filePath.reverse.head</div>
|
||||
<div class="box-content markdown-body">@renderMarkup(filePath, content, branch, repository, false, false)</div>
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@readme.map { case(filePath, content) =>
|
||||
<div id="readme" class="box">
|
||||
<div class="box-header">@filePath.reverse.head</div>
|
||||
<div class="box-content markdown-body">@renderMarkup(filePath, content, branch, repository, false, false)</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user