Fix wiki styles

This commit is contained in:
takezoe
2014-05-11 01:38:12 +09:00
parent 743b9b759a
commit 259637ce3c
5 changed files with 59 additions and 10 deletions

View File

@@ -1,8 +1,10 @@
@(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){
@@ -21,11 +23,54 @@
</div>
</li>
</ul>
<div class="markdown-body">
@markdown(page.content, repository, true, false)
<div style="width: 200px;" class="pull-right">
<table class="table table-bordered">
<tr>
<th class="metal">Pages</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 class="small">
<span class="muted">Last edited by @page.committer at @datetime(page.time)</span>
<div style="margin-right: 200px;">
<div class="markdown-body">
@markdown(page.content, repository, true, false)
</div>
<div class="small">
<span class="muted">Last edited by @page.committer at @datetime(page.time)</span>
</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>
}