aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjan <jan@ruken.pw>2015-12-29 18:53:04 (UTC)
committerjan <jan@ruken.pw>2015-12-29 18:53:04 (UTC)
commit0189b471cab18ec565bfa5605015d6f994cdde00 (patch)
tree4856f4b1590e5b07c6db50503e02296819e346be
parentb46c72a602cc9b3780c6f01f4275703e6b3e5b2e (diff)
parent5fc85b069844a4a4f242559ae76ba900bccd7ba3 (diff)
Merge branch 'master' of https://bitbucket.org/Rukenshia/grilist
-rw-r--r--modules/grils/grils.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/grils/grils.go b/modules/grils/grils.go
index 7cbec77..9bfd6e6 100644
--- a/modules/grils/grils.go
+++ b/modules/grils/grils.go
@@ -184,6 +184,16 @@ func (m *GrilsModule) viewGril(w http.ResponseWriter, r *http.Request, p httprou
184 break 184 break
185 } 185 }
186 } 186 }
187
188 if len(imagePath) == 0 {
189 for _, ext := range exts {
190 path := fmt.Sprintf("assets/img/gril/%d/1.%s", gril.ID, ext)
191 if _, err := os.Stat(path); err == nil {
192 imagePath = path
193 break
194 }
195 }
196 }
187 data["imagePath"] = "/" + imagePath 197 data["imagePath"] = "/" + imagePath
188 198
189 m.g.Renderer.RenderPage("gril", w, data) 199 m.g.Renderer.RenderPage("gril", w, data)