Fix file list style in repository viewer

This commit is contained in:
takezoe
2014-05-11 02:55:43 +09:00
parent 6ecabe4588
commit 4f4bc0321b
2 changed files with 59 additions and 61 deletions

View File

@@ -27,71 +27,68 @@
<a href="@url(repository)/new/@encodeRefName(branch)/@pathList.mkString("/")"><img src="@assets/common/images/newfile.png"/></a> <a href="@url(repository)/new/@encodeRefName(branch)/@pathList.mkString("/")"><img src="@assets/common/images/newfile.png"/></a>
} }
</div> </div>
<div class="box"> <table class="table table-file-list">
<table class="table table-file-list" style="border: 1px solid silver;"> <tr>
<tr> <th colspan="4" style="font-weight: normal;">
<th colspan="4" style="font-weight: normal;"> <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> @if(latestCommit.description.isDefined){
@if(latestCommit.description.isDefined){ <a href="javascript:void(0)" onclick="$('#description-@latestCommit.id').toggle();" class="omit">...</a>
<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>
<pre id="description-@latestCommit.id" class="commit-description" style="display: none;">@link(latestCommit.description.get, repository)</pre> }
} </th>
</th> </tr>
</tr> <tr>
<tr> <td colspan="4" class="latest-commit">
<td colspan="4" class="latest-commit"> <div>
<div> @avatar(latestCommit, 20)
@avatar(latestCommit, 20) @user(latestCommit.committer, latestCommit.mailAddress, "username strong")
@user(latestCommit.committer, latestCommit.mailAddress, "username strong") <span class="muted">@datetime(latestCommit.time)</span>
<span class="muted">@datetime(latestCommit.time)</span> <div class="pull-right align-right monospace">
<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>
<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> </div>
</tr> </td>
@if(pathList.size > 0){ </tr>
<tr> @if(pathList.size > 0){
<td width="16"></td> <tr>
<td><a href="@url(repository)@if(pathList.size > 1){/tree/@encodeRefName(branch)/@pathList.init.mkString("/")}">..</a></td> <td width="16"></td>
<td></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>
} </tr>
@files.map { file => }
<tr> @files.map { file =>
<td width="16"> <tr>
@if(file.isDirectory){ <td width="16">
@if(file.linkUrl.isDefined){ @if(file.isDirectory){
<img src="@assets/common/images/folder_link.png"/> @if(file.linkUrl.isDefined){
} else { <img src="@assets/common/images/folder_link.png"/>
<img src="@assets/common/images/folder.png"/>
}
} else { } else {
<img src="@assets/common/images/file.png"/> <img src="@assets/common/images/folder.png"/>
} }
</td> } else {
<td> <img src="@assets/common/images/file.png"/>
@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>
} }
</table> </td>
</div> <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>
}
</table>
@readme.map { case(filePath, content) => @readme.map { case(filePath, content) =>
<div id="readme" class="box"> <div id="readme" class="box">
<div class="box-header">@filePath.reverse.head</div> <div class="box-header">@filePath.reverse.head</div>

View File

@@ -504,6 +504,7 @@ a.header-link:hover {
table.table-file-list { table.table-file-list {
margin-bottom: 0px; margin-bottom: 0px;
border: 1px solid #ddd;
} }
table.table-file-list th, table.table-file-list td { table.table-file-list th, table.table-file-list td {