(refs #120) URL encode tag name

URL encode tag name URL like branch name.
And rename encodeBranchName to encodeRefName.
This commit is contained in:
Tomofumi Tanaka
2013-10-09 09:59:30 +09:00
parent 72b25591a5
commit f74f2c47d3
9 changed files with 25 additions and 25 deletions

View File

@@ -9,12 +9,12 @@
@html.header("code", repository)
@tab(branch, repository, "files")
<div class="head">
<a href="@url(repository)/tree/@encodeBranchName(branch)">@repository.name</a> /
<a href="@url(repository)/tree/@encodeRefName(branch)">@repository.name</a> /
@pathList.zipWithIndex.map { case (section, i) =>
@if(i == pathList.length - 1){
@section
} else {
<a href="@url(repository)/tree/@encodeBranchName(branch)/@pathList.take(i + 1).mkString("/")">@section</a> /
<a href="@url(repository)/tree/@encodeRefName(branch)/@pathList.take(i + 1).mkString("/")">@section</a> /
}
}
</div>
@@ -30,7 +30,7 @@
</div>
<div class="btn-group pull-right">
<a class="btn btn-mini" href="?raw=true">Raw</a>
<a class="btn btn-mini" href="@url(repository)/commits/@encodeBranchName(branch)/@pathList.mkString("/")">History</a>
<a class="btn btn-mini" href="@url(repository)/commits/@encodeRefName(branch)/@pathList.mkString("/")">History</a>
</div>
</th>
</tr>