aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/lists/lists.go10
-rw-r--r--views/create_list.html1
-rw-r--r--views/list.html4
-rw-r--r--views/login.html1
-rw-r--r--views/materialize.html1
-rw-r--r--views/register.html1
-rw-r--r--views/tag.html1
7 files changed, 8 insertions, 11 deletions
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) {
66} 66}
67 67
68func (m *Module) getListGrils(list *List) error { 68func (m *Module) getListGrils(list *List) error {
69 rows, err := m.g.DB.Query(`SELECT gril_id, "order" FROM grilist.lists_grils WHERE list_id = $1`, list.ID) 69 rows, err := m.g.DB.Query(`SELECT gril_id, "order" FROM grilist.lists_grils WHERE list_id = $1 ORDER BY "order" ASC`, list.ID)
70 if err != nil { 70 if err != nil {
71 return err 71 return err
72 } 72 }
@@ -268,10 +268,10 @@ func (m *Module) displayCreateList(w http.ResponseWriter, r *http.Request, p htt
268 http.Redirect(w, r, "/", 302) 268 http.Redirect(w, r, "/", 302)
269 return 269 return
270 } 270 }
271 271
272 data := m.g.Renderer.DefaultData() 272 data := m.g.Renderer.DefaultData()
273 data["user"] = user 273 data["user"] = user
274 274
275 m.g.Renderer.RenderPage("create_list", w, data) 275 m.g.Renderer.RenderPage("create_list", w, data)
276} 276}
277 277
@@ -282,7 +282,7 @@ func (m *Module) createList(w http.ResponseWriter, r *http.Request, p httprouter
282 http.Error(w, "500", http.StatusInternalServerError) 282 http.Error(w, "500", http.StatusInternalServerError)
283 return 283 return
284 } 284 }
285 285
286 values, err := readBody(r) 286 values, err := readBody(r)
287 if err != nil { 287 if err != nil {
288 log.Println(err) 288 log.Println(err)
@@ -297,7 +297,7 @@ func (m *Module) createList(w http.ResponseWriter, r *http.Request, p httprouter
297 http.Error(w, "500", http.StatusInternalServerError) 297 http.Error(w, "500", http.StatusInternalServerError)
298 return 298 return
299 } 299 }
300 300
301 http.Redirect(w, r, fmt.Sprintf("/list/%d", id), 302) 301 http.Redirect(w, r, fmt.Sprintf("/list/%d", id), 302)
302} 302}
303 303
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 @@
3 <head> 3 <head>
4 {{ template "materialize" }} 4 {{ template "materialize" }}
5 <title>grilist</title> 5 <title>grilist</title>
6 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
7 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
8 </head> 7 </head>
9 <body> 8 <body>
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 @@
7 <title>grilist</title> 7 <title>grilist</title>
8 <link rel="stylesheet" href="/assets/css/list.css" /> 8 <link rel="stylesheet" href="/assets/css/list.css" />
9 <link rel="stylesheet" href="/assets/css/search.css" /> 9 <link rel="stylesheet" href="/assets/css/search.css" />
10 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
11 <script src="/assets/js/search.js"></script> 10 <script src="/assets/js/search.js"></script>
12 <script src="/assets/js/list.js"></script> 11 <script src="/assets/js/list.js"></script>
13 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> 12 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
@@ -15,7 +14,8 @@
15 <body> 14 <body>
16 {{ template "navbar" . }} 15 {{ template "navbar" . }}
17 <div class="container"> 16 <div class="container">
18 <h1>{{ $list.Name }}<small>von {{ $list.Owner.GetName }}</small></h1><br /> 17 <h1>{{ $list.Name }}<small>von {{ $list.Owner.GetName }}</small></h1>
18 <blockquote>{{ $list.Description }}</blockquote><br />
19 <div class="row"> 19 <div class="row">
20 <div class="col s12 {{ if ($user) and eq $user.ID $list.Owner.ID }}l8{{ end }}"> 20 <div class="col s12 {{ if ($user) and eq $user.ID $list.Owner.ID }}l8{{ end }}">
21 <ul class="gril-list"> 21 <ul class="gril-list">
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 @@
3 <head> 3 <head>
4 <title>Grilist - Login</title> 4 <title>Grilist - Login</title>
5 {{ template "materialize" }} 5 {{ template "materialize" }}
6 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
7 </head> 6 </head>
8 <body> 7 <body>
9 <div class="row"> 8 <div class="row">
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 @@
1{{define "materialize"}} 1{{define "materialize"}}
2 <link rel="stylesheet" href="/assets/css/materialize.css"> 2 <link rel="stylesheet" href="/assets/css/materialize.css">
3 <script src="/assets/js/materialize.min.js"></script> 3 <script src="/assets/js/materialize.min.js"></script>
4 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
4 <meta name="viewport" content="width=device_width, initial-scale=1.0" /> 5 <meta name="viewport" content="width=device_width, initial-scale=1.0" />
5{{end}} \ No newline at end of file 6{{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 @@
3 <head> 3 <head>
4 <title>Grilist - Registration</title> 4 <title>Grilist - Registration</title>
5 {{ template "materialize" }} 5 {{ template "materialize" }}
6 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
7 </head> 6 </head>
8 <body> 7 <body>
9 <div class="row"> 8 <div class="row">
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 @@
4 <head> 4 <head>
5 {{ template "materialize" }} 5 {{ template "materialize" }}
6 <title>grilist</title> 6 <title>grilist</title>
7 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
8 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
9 </head> 8 </head>
10 <body> 9 <body>