Render polochon movies
This commit is contained in:
parent
dab68faac6
commit
d59064a82a
@ -96,7 +96,8 @@ func FromPolochon(env *web.Env, w http.ResponseWriter, r *http.Request) error {
|
||||
|
||||
env.Log.Info(movies)
|
||||
|
||||
return nil
|
||||
web.SetData(r, "movies", movies)
|
||||
return env.Rends(w, r, "movies/library")
|
||||
}
|
||||
|
||||
func ExplorePopular(env *web.Env, w http.ResponseWriter, r *http.Request) error {
|
||||
|
@ -1,6 +1,10 @@
|
||||
{{ if $.Data.error }}
|
||||
|
||||
{{ if eq $.Data.error "Invalid address"}}
|
||||
<div class="alert alert-danger" role="alert">The polochon API adress specified in your configuration is invalid or unreachable, <a href="{{ URL "users.edit"}}">change it</a></div>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
The polochon API adress specified in your configuration is invalid or unreachable,
|
||||
<a href="{{ URL "users.edit"}}">change it</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
@ -22,7 +26,21 @@
|
||||
<div class="col-xs-7 col-md-4">
|
||||
{{ range $.Data.movies}}
|
||||
<div id="{{.ImdbID}}-detail" class="hidden movie-detail affix">
|
||||
<h1>{{.Title}}</h1>
|
||||
<h1 class="hidden-xs">{{ .Title }}</h1>
|
||||
<h3 class="visible-xs">{{ .Title }}</h3>
|
||||
<h4 class="hidden-xs">{{ .Year }}</h4>
|
||||
|
||||
<p>
|
||||
<i class="fa fa-clock-o"></i>
|
||||
{{ .Runtime }} min
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<i class="fa fa-star-o"></i>
|
||||
{{ .Rating }} <small>({{ .Votes }} counts)</small>
|
||||
</p>
|
||||
|
||||
<p>{{ .Plot }}</p>
|
||||
</div>
|
||||
{{ end}}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user