mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-12 16:35:52 +01:00
66 lines
2.4 KiB
HTML
66 lines
2.4 KiB
HTML
@(active: String, repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
|
|
@import context._
|
|
@import view.helpers._
|
|
|
|
@if(repository.commitCount > 0){
|
|
<div class="pull-right">
|
|
<div class="input-prepend">
|
|
<a href="@path/@repository.owner/@repository.name/fork" class="btn" style="margin-bottom: 10px;">Fork</a>
|
|
<span class="add-on count"><a href="@url(repository)/network/members">@repository.forkedCount</a></span>
|
|
</div>
|
|
</div>
|
|
}
|
|
<div class="head">
|
|
@helper.html.repositoryicon(repository, true)
|
|
<a href="@url(repository.owner)">@repository.owner</a> / <a href="@url(repository)" class="strong">@repository.name</a>
|
|
|
|
@defining(repository.repository){ x =>
|
|
@if(repository.repository.originRepositoryName.isDefined){
|
|
<div class="forked">
|
|
forked from <a href="@path/@x.parentUserName/@x.parentRepositoryName">@x.parentUserName/@x.parentRepositoryName</a>
|
|
</div>
|
|
}
|
|
}
|
|
</div>
|
|
@repository.repository.description.map { description =>
|
|
<p>@description</p>
|
|
}
|
|
<table class="global-nav box-header">
|
|
<tr>
|
|
<th class="box-header@if(active=="code"){ active}">
|
|
<a href="@url(repository)">Code</a>
|
|
</th>
|
|
<th class="box-header@if(active=="issues"){ active}">
|
|
<a href="@url(repository)/issues">Issues</a>
|
|
@if(repository.issueCount > 0){
|
|
<span class="badge">@repository.issueCount</span>
|
|
}
|
|
</th>
|
|
<th class="box-header@if(active=="pulls"){ active}">
|
|
<a href="@url(repository)/pulls">Pull Requests</a>
|
|
@if(repository.pullCount > 0){
|
|
<span class="badge">@repository.pullCount</span>
|
|
}
|
|
</th>
|
|
<th class="box-header@if(active=="wiki"){ active}">
|
|
<a href="@url(repository)/wiki">Wiki</a>
|
|
</th>
|
|
<th class="box-header@if(active=="network"){ active}">
|
|
<a href="@url(repository)/network/members">Network</a>
|
|
</th>
|
|
@if(loginAccount.isDefined && (loginAccount.get.isAdmin || repository.managers.contains(loginAccount.get.userName))){
|
|
<th class="box-header@if(active=="settings"){ active}">
|
|
<a href="@url(repository)/settings">Settings</a>
|
|
</th>
|
|
}
|
|
</tr>
|
|
</table>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
$('table.global-nav th.box-header').click(function(){
|
|
location.href = $(this).find('a').attr('href');
|
|
return false;
|
|
});
|
|
});
|
|
</script>
|