Merge branch 'master' into user

This commit is contained in:
Las Zenow 2014-02-03 23:35:05 +01:00
commit 2d30b6a370
2 changed files with 4 additions and 7 deletions

View file

@ -237,7 +237,7 @@ func (m *MR) GetHourDownloads(start time.Time, statsColl *mgo.Collection) ([]Vis
this.date.getUTCMonth(),
this.date.getUTCDate(),
this.date.getUTCHours());
emit({date: date}, 1);
emit(date, 1);
}
}`
mr.Reduce = `function(date, vals) {
@ -265,7 +265,7 @@ func (m *MR) GetDayDowloads(start time.Time, statsColl *mgo.Collection) ([]Visit
var date = Date.UTC(this.date.getUTCFullYear(),
this.date.getUTCMonth(),
this.date.getUTCDate());
emit({date: date}, 1);
emit(date, 1);
}
}`
mr.Reduce = `function(date, vals) {
@ -292,7 +292,7 @@ func (m *MR) GetMonthDowloads(start time.Time, statsColl *mgo.Collection) ([]Vis
if (this.section == "download") {
var date = Date.UTC(this.date.getUTCFullYear(),
this.date.getUTCMonth());
emit({date: date}, 1);
emit(date, 1);
}
}`
mr.Reduce = `function(date, vals) {

View file

@ -16,6 +16,7 @@
<span class="pull-right">
<small>(<a href="/search/?q=">more</a>)</small>
<a href="/search/?fmt=rss&q="><img src="/img/feed.png"/></a>
</span>
</h4>
</div>
@ -35,10 +36,8 @@
</ul>
<div class="row">
<div class="span8">
<h4>Most visited books:</h4>
</div>
</div>
<ul class="row thumbnails">
{{with .VisitedBooks}}
{{range .}}
@ -55,10 +54,8 @@
</ul>
<div class="row">
<div class="span8">
<h4>Most downloaded books:</h4>
</div>
</div>
<ul class="row thumbnails">
{{with .DownloadedBooks}}
{{range .}}