(refs #865)Fix presentation of file finder and blow view

This commit is contained in:
Naoki Takezoe
2015-08-08 21:11:34 +09:00
parent bb10365b8b
commit 687a4f14e1
2 changed files with 43 additions and 50 deletions

View File

@@ -47,16 +47,11 @@
} }
} }
</div> </div>
<div class="box-header">
<table class="table table-bordered blobview">
<tr>
<th style="font-weight: normal;">
<div class="pull-left">
@avatar(latestCommit, 20) @avatar(latestCommit, 20)
@user(latestCommit.authorName, latestCommit.authorEmailAddress, "username strong") @user(latestCommit.authorName, latestCommit.authorEmailAddress, "username strong")
<span class="muted">@helper.html.datetimeago(latestCommit.commitTime)</span> <span class="muted">@helper.html.datetimeago(latestCommit.commitTime)</span>
<a href="@url(repository)/commit/@latestCommit.id" class="commit-message">@link(latestCommit.summary, repository)</a> <a href="@url(repository)/commit/@latestCommit.id" class="commit-message">@link(latestCommit.summary, repository)</a>
</div>
<div class="btn-group pull-right"> <div class="btn-group pull-right">
@if(hasWritePermission && content.viewType == "text" && repository.branchList.contains(branch)){ @if(hasWritePermission && content.viewType == "text" && repository.branchList.contains(branch)){
<a class="btn btn-mini" href="@url(repository)/edit/@encodeRefName(branch)/@pathList.mkString("/")">Edit</a> <a class="btn btn-mini" href="@url(repository)/edit/@encodeRefName(branch)/@pathList.mkString("/")">Edit</a>
@@ -70,34 +65,32 @@
<a class="btn btn-mini btn-danger" href="@url(repository)/remove/@encodeRefName(branch)/@pathList.mkString("/")">Delete</a> <a class="btn btn-mini btn-danger" href="@url(repository)/remove/@encodeRefName(branch)/@pathList.mkString("/")">Delete</a>
} }
</div> </div>
</th> </div>
</tr>
<tr>
<td>
@if(content.viewType == "text"){ @if(content.viewType == "text"){
@defining(isRenderable(pathList.reverse.head)){ isRrenderable => @defining(isRenderable(pathList.reverse.head)){ isRrenderable =>
@if(!isBlame && isRrenderable) { @if(!isBlame && isRrenderable) {
<div class="box-content markdown-body" style="border: none; padding-left: 16px; padding-right: 16px;"> <div class="box-content-bottom markdown-body" style="border: none; padding-left: 16px; padding-right: 16px;">
@renderMarkup(pathList, content.content.get, branch, repository, false, false, true) @renderMarkup(pathList, content.content.get, branch, repository, false, false, true)
</div> </div>
} else { } else {
<div class="box-content-bottom">
<pre class="prettyprint linenums blob @if(!isRrenderable){ no-renderable } ">@content.content.get</pre> <pre class="prettyprint linenums blob @if(!isRrenderable){ no-renderable } ">@content.content.get</pre>
</div>
} }
} }
} }
@if(content.viewType == "image"){ @if(content.viewType == "image"){
<div class="box-content-bottom">
<img src="?raw=true"/> <img src="?raw=true"/>
</div>
} }
@if(content.viewType == "large" || content.viewType == "binary"){ @if(content.viewType == "large" || content.viewType == "binary"){
<div style="text-align: center; padding-top: 20px; padding-bottom: 20px;"> <div class="box-content-bottom" style="text-align: center; padding-top: 20px; padding-bottom: 20px;">
<a href="?raw=true">View Raw</a><br> <a href="?raw=true">View Raw</a><br>
<br> <br>
(Sorry about that, but we can't show files that are this big right now) (Sorry about that, but we can't show files that are this big right now)
</div> </div>
} }
</td>
</tr>
</table>
} }
} }
<script src="@assets/vendors/jquery/jquery.ba-hashchange.js"></script> <script src="@assets/vendors/jquery/jquery.ba-hashchange.js"></script>

View File

@@ -28,7 +28,7 @@
<tbody class="tree-browser-result-template"> <tbody class="tree-browser-result-template">
<tr class="tree-browser-result"> <tr class="tree-browser-result">
<td class="icon"><span class="icon icon-chevron-right"></span></td> <td class="icon"><span class="icon icon-chevron-right"></span></td>
<td class="icon"><img src="@assets/common/images/file.png"/></td> <td class="icon"><i class="octicon octicon-file-text"></i></td>
<td> <td>
<a href="@url(repository)/blob/@encodeRefName(branch)"></a> <a href="@url(repository)/blob/@encodeRefName(branch)"></a>
</td> </td>