aboutsummaryrefslogtreecommitdiff
path: root/modules/grils
diff options
context:
space:
mode:
Diffstat (limited to 'modules/grils')
-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)