From 928ab739e2b4b40077610a7913adb0cf086f2ee1 Mon Sep 17 00:00:00 2001 From: jan Date: Thu, 31 Dec 2015 11:24:43 +0100 Subject: =?UTF-8?q?material=20icons=20sind=20jetzt=20immer=20pr=C3=A4sent.?= =?UTF-8?q?=20listen=20werden=20jetzt=20nach=20der=20'order'=20des=20grils?= =?UTF-8?q?=20sortiert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/modules/lists/lists.go b/modules/lists/lists.go index b77120e..8957c5f 100644 --- a/modules/lists/lists.go +++ b/modules/lists/lists.go @@ -66,7 +66,7 @@ func (m *Module) Init(g *grilist.Grilist) { } func (m *Module) getListGrils(list *List) error { - rows, err := m.g.DB.Query(`SELECT gril_id, "order" FROM grilist.lists_grils WHERE list_id = $1`, list.ID) + rows, err := m.g.DB.Query(`SELECT gril_id, "order" FROM grilist.lists_grils WHERE list_id = $1 ORDER BY "order" ASC`, list.ID) if err != nil { return err } @@ -268,10 +268,10 @@ func (m *Module) displayCreateList(w http.ResponseWriter, r *http.Request, p htt http.Redirect(w, r, "/", 302) return } - + data := m.g.Renderer.DefaultData() data["user"] = user - + m.g.Renderer.RenderPage("create_list", w, data) } @@ -282,7 +282,7 @@ func (m *Module) createList(w http.ResponseWriter, r *http.Request, p httprouter http.Error(w, "500", http.StatusInternalServerError) return } - + values, err := readBody(r) if err != nil { log.Println(err) @@ -297,7 +297,7 @@ func (m *Module) createList(w http.ResponseWriter, r *http.Request, p httprouter http.Error(w, "500", http.StatusInternalServerError) return } - + http.Redirect(w, r, fmt.Sprintf("/list/%d", id), 302) } diff --git a/views/create_list.html b/views/create_list.html index 375dddd..ead61dd 100644 --- a/views/create_list.html +++ b/views/create_list.html @@ -3,7 +3,6 @@ {{ template "materialize" }} grilist - diff --git a/views/list.html b/views/list.html index daa56cd..fa58f91 100644 --- a/views/list.html +++ b/views/list.html @@ -7,7 +7,6 @@ grilist - @@ -15,7 +14,8 @@ {{ template "navbar" . }}
-

{{ $list.Name }}von {{ $list.Owner.GetName }}


+

{{ $list.Name }}von {{ $list.Owner.GetName }}

+
{{ $list.Description }}

    diff --git a/views/login.html b/views/login.html index 6014d4d..65c4857 100644 --- a/views/login.html +++ b/views/login.html @@ -3,7 +3,6 @@ Grilist - Login {{ template "materialize" }} -
    diff --git a/views/materialize.html b/views/materialize.html index 3648dc5..7c40c0d 100644 --- a/views/materialize.html +++ b/views/materialize.html @@ -1,5 +1,6 @@ {{define "materialize"}} + {{end}} \ No newline at end of file diff --git a/views/register.html b/views/register.html index 3c78f46..b946518 100644 --- a/views/register.html +++ b/views/register.html @@ -3,7 +3,6 @@ Grilist - Registration {{ template "materialize" }} -
    diff --git a/views/tag.html b/views/tag.html index bc21fc3..d0d4180 100644 --- a/views/tag.html +++ b/views/tag.html @@ -4,7 +4,6 @@ {{ template "materialize" }} grilist - -- cgit v0.10.1