mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-02 11:36:05 +01:00
75 lines
2.8 KiB
HTML
75 lines
2.8 KiB
HTML
@(pageName: String,
|
|
page: service.WikiService.WikiPageInfo,
|
|
pages: List[String],
|
|
repository: service.RepositoryService.RepositoryInfo,
|
|
hasWritePermission: Boolean)(implicit context: app.Context)
|
|
@import context._
|
|
@import service.WikiService._
|
|
@import view.helpers._
|
|
@html.main(s"${pageName} - ${repository.owner}/${repository.name}", Some(repository)){
|
|
@html.menu("wiki", repository){
|
|
<ul class="nav nav-tabs fill-width pull-left">
|
|
<li>
|
|
<h1 class="wiki-title">@pageName</h1>
|
|
<div class="small">
|
|
<span class="muted"><strong>@page.committer</strong> edited this page at @datetime(page.time)</span>
|
|
</div>
|
|
</li>
|
|
<li class="pull-right">
|
|
<div class="btn-group">
|
|
@if(hasWritePermission){
|
|
<a class="btn btn-small" href="@url(repository)/wiki/_new">New Page</a>
|
|
<a class="btn btn-small" href="@url(repository)/wiki/@urlEncode(pageName)/_edit">Edit Page</a>
|
|
}
|
|
<a class="btn btn-small" href="@url(repository)/wiki/@urlEncode(pageName)/_history">Page History</a>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<div style="width: 200px;" class="pull-right">
|
|
<table class="table table-bordered">
|
|
<tr>
|
|
<th class="metal">Pages <span class="label">@pages.length</span></th>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<ul style="margin-left: 0px; margin-bottom: 0px;">
|
|
@pages.map { page =>
|
|
<li style="margin-left:0px; list-style-type: none;"><a href="@url(repository)/wiki/@urlEncode(page)">@page</a></li>
|
|
}
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="small">
|
|
<strong>Clone this wiki locally</strong>
|
|
</div>
|
|
@helper.html.copy("repository-url-copy", repository.httpUrl){
|
|
<input type="text" value="@httpUrl(repository)" id="repository-url" style="width: 160px;" readonly>
|
|
}
|
|
@if(settings.ssh && loginAccount.isDefined){
|
|
<div class="small">
|
|
<span class="mute">You can clone <a href="javascript:void(0);" id="repository-url-http">HTTP</a> or <a href="javascript:void(0);" id="repository-url-ssh">SSH</a>.</span>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div style="margin-right: 220px;">
|
|
<div class="markdown-body">
|
|
@markdown(page.content, repository, true, false)
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
@if(settings.ssh && loginAccount.isDefined){
|
|
<script>
|
|
$(function(){
|
|
$('#repository-url-http').click(function(){
|
|
$('#repository-url').val('@httpUrl(repository)');
|
|
$('#repository-url-copy').attr('data-clipboard-text', $('#repository-url').val());
|
|
});
|
|
$('#repository-url-ssh').click(function(){
|
|
$('#repository-url').val('@sshUrl(repository, settings, loginAccount.get.userName)');
|
|
$('#repository-url-copy').attr('data-clipboard-text', $('#repository-url').val());
|
|
});
|
|
});
|
|
</script>
|
|
} |