diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-05-15 03:59:27 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-05-15 03:59:27 -0700 |
commit | 779631d5dc46afbc765ee138a79bab962f11312b (patch) | |
tree | b856fbad147119c69e088e9785bc1844130b8d44 /system/admin/handlers.go | |
parent | 8f12938f28c0637a9261c7fcb4b0e311b8ba3b40 (diff) |
flush csv writer and fix ui
Diffstat (limited to 'system/admin/handlers.go')
-rw-r--r-- | system/admin/handlers.go | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 2a76e58..2d8b814 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -1496,21 +1496,19 @@ func contentsHandler(res http.ResponseWriter, req *http.Request) { btn := `<div class="col s3"> <a href="/admin/edit?type=` + t + `" class="btn new-post waves-effect waves-light"> New ` + t + ` - </a> - </div>` + </a>` html = html + b.String() + btn if _, ok := pt.(format.CSVFormattable); ok { - btn = `<div class="col s3"> - <a href="/admin/edit/export?type=` + t + `&format=csv" class="green darken-4 btn export-post waves-effect waves-light"> + btn = `<br/> + <a href="/admin/contents/export?type=` + t + `&format=csv" class="green darken-4 btn export-post waves-effect waves-light"> <i class="material-icons left">system_update_alt</i> .CSV - </a> - </div>` + </a>` html = html + b.String() + btn } - html += `</div>` + script + html += `</div></div>` + script adminView, err := Admin([]byte(html)) if err != nil { @@ -2527,21 +2525,19 @@ func searchHandler(res http.ResponseWriter, req *http.Request) { btn := `<div class="col s3"> <a href="/admin/edit?type=` + t + `" class="btn new-post waves-effect waves-light"> New ` + t + ` - </a> - </div>` + </a>` html = html + b.String() + btn if _, ok := post.(format.CSVFormattable); ok { - btn = `<div class="col s3"> - <a href="/admin/edit/export?type=` + t + `&format=csv" class="green darken-4 btn export-post waves-effect waves-light"> + btn = `<br/> + <a href="/admin/contents/export?type=` + t + `&format=csv" class="green darken-4 btn export-post waves-effect waves-light"> <i class="material-icons left">system_update_alt</i> .CSV - </a> - </div>` + </a>` html = html + b.String() + btn } - html += `</div>` + html += `</div></div>` adminView, err := Admin([]byte(html)) if err != nil { |