Skip to content

Commit

Permalink
Tweaking html
Browse files Browse the repository at this point in the history
  • Loading branch information
cozmo committed Mar 24, 2013
1 parent e7973e2 commit 9d06521
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion js/views/CommunityAreaMonthlySummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ function($, Backbone, PageView,
return x.get('area_number') == this.options.community
}, this));


this.$el.empty();
this.$el.append(this.template({
community: community.attributes,
month_crimes: month_crimes,
prior_year_month_crimes: prior_year_month_crimes,
month_name: this.month_from_number(this.options.month),
month_name: this.month_from_number(Number(this.options.month)),
totals_month: this.total_crimes(month_crimes),
totals_prior_year_month: this.total_crimes(prior_year_month_crimes)
}));
Expand Down
2 changes: 1 addition & 1 deletion js/views/CrimeAppView.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function($, Backbone, async, DateSummaryCollection, CommunityAreaCollection, Pag
})
}
},function(err, results){
communityAreaMonthlySummary.show({community:community_num});
communityAreaMonthlySummary.show({community:community_num,month:month});
})
});
}
Expand Down
5 changes: 3 additions & 2 deletions templates/summary.jst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<h1>Summery of <%= month_name %></h1>
<p>
In <%= community.wikipedia %> for the month of
In <%= community.wikipedia %> for the month of <%= month_name %>
<%= totals_month %> crimes were reported, a
<%= ((totals_month - totals_prior_year_month)/totals_month*100).toFixed(2) %>%
<% if(totals_month > totals_prior_year_month){ %>increase<% } else {%> decrease <% } %>
Expand All @@ -25,6 +26,6 @@
<%= last_crime %> crimes reported this month.
</p>

<p>This information is gathered from the City of Chicago data portal and calculated by the Chicago Tribune.</p>
<small>This information is gathered from the City of Chicago data portal and calculated by the Chicago Tribune.</small>


0 comments on commit 9d06521

Please sign in to comment.