Widen the administration interface
This commit is contained in:
@@ -196,6 +196,11 @@ type page struct {
|
||||
// page agrees about who you are without any script involved.
|
||||
User string
|
||||
Admin bool
|
||||
|
||||
// Wide widens the page for content that is a table rather than a form.
|
||||
// The reading measure that suits the upload page is far too narrow for a
|
||||
// listing, which otherwise ends up behind a horizontal scrollbar.
|
||||
Wide bool
|
||||
}
|
||||
|
||||
// page builds the common fields, resolving the session so the header can show
|
||||
@@ -261,3 +266,10 @@ func (s *Server) fail(w http.ResponseWriter, r *http.Request, status int, msg st
|
||||
func (s *Server) handleNotFound(w http.ResponseWriter, r *http.Request) {
|
||||
s.fail(w, r, http.StatusNotFound, "No such page.")
|
||||
}
|
||||
|
||||
// widePage is page for content that is a listing rather than a form.
|
||||
func (s *Server) widePage(r *http.Request, title string) page {
|
||||
p := s.page(r, title, true)
|
||||
p.Wide = true
|
||||
return p
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user