mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-08-01 15:24:56 +08:00
parent
761a1555de
commit
62c29b2398
@ -116,14 +116,13 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
<table width="100%" class="table table-hover">
|
<table width="100%" class="table table-hover">
|
||||||
{{ $path := .Path }}
|
{{ $path := .Path }}
|
||||||
{{ $limit := .Limit }}
|
|
||||||
{{ $showDirDel := .ShowDirectoryDelete }}
|
{{ $showDirDel := .ShowDirectoryDelete }}
|
||||||
{{ range $entry_index, $entry := .Entries }}
|
{{ range $entry_index, $entry := .Entries }}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{{ if $entry.IsDirectory }}
|
{{ if $entry.IsDirectory }}
|
||||||
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
|
||||||
<a href="{{ printpath $path "/" $entry.Name "/" "?" "limit" "=" }}{{ print $limit }}" >
|
<a href="{{ printpath $path "/" $entry.Name "/"}}" >
|
||||||
{{ $entry.Name }}
|
{{ $entry.Name }}
|
||||||
</a>
|
</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@ -9,15 +9,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func printpath(parts ...string) string {
|
func printpath(parts ...string) string {
|
||||||
var escapedParts []string
|
concat := strings.Join(parts, "")
|
||||||
for _, p := range parts {
|
escaped := url.PathEscape(concat)
|
||||||
if len(p) == 1 {
|
return strings.ReplaceAll(escaped, "%2F", "/")
|
||||||
escapedParts = append(escapedParts, p)
|
|
||||||
} else {
|
|
||||||
escapedParts = append(escapedParts, url.PathEscape(p))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return strings.Join(escapedParts, "")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var funcMap = template.FuncMap{
|
var funcMap = template.FuncMap{
|
||||||
|
Loading…
Reference in New Issue
Block a user