Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from TeaWithStrangers/admin-overview-improvem…
…ents Add shitty host overview page
- Loading branch information
Showing
4 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.container | ||
%table | ||
%tr | ||
%th Host Name | ||
%th # TTs | ||
%th Last Tea | ||
%th Next Tea | ||
%th Total Attendees | ||
- @hosts.each do |h| | ||
%tr | ||
%td= link_to h.name, host_city_path(h, h.home_city) | ||
%th= h.tea_times.count | ||
- t = h.tea_times.where('start_time <= ?', Time.now.utc).last || "No tea time" | ||
%th= link_to(t, tea_time_path(t)) | ||
%th= link_to h.tea_times.where('start_time >= ?', Time.now.utc).first || "No teas scheduled" | ||
%th= h.tea_times.map {|t| t.attendances.count}.inject(0, &:+) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters