-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Progress bar stubs and required resources
- Loading branch information
Nick Barnwell
committed
May 13, 2015
1 parent
896a7ec
commit af6764b
Showing
6 changed files
with
118 additions
and
41 deletions.
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
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
module CityHelper | ||
def progress_bar(val, max) | ||
raw(render partial: 'cities/show/progress_bar', locals: {val: val, max: max}) | ||
end | ||
end |
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 @@ | ||
<%= render partial: 'cities/show/required_resources' %> |
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,12 @@ | ||
<div class="progress-bar-block"> | ||
<p class="description"> | ||
<% if val < max %> | ||
<%= val %> of <%= max %> filled | ||
<% else %> | ||
Filled | ||
<% end %> | ||
</p> | ||
<div class="progress-bar <%= 'green' if (val >= max ) %>"> | ||
<span class="bar" style='width: <%= (val.to_f / max) * 100 %>%;'></span> | ||
</div> | ||
</div> |
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,27 @@ | ||
<h3>What we need to get going</h3> | ||
<div class="city-resources"> | ||
<div class="city-resource"> | ||
<div class="block"> | ||
<span class="number">1</span> | ||
<p class="description">superstar community leader</p> | ||
<a class="button" href="#">I'm interested</a> | ||
</div> | ||
<%= progress_bar(1, 1) %> | ||
</div> | ||
<div class="city-resource"> | ||
<div class="block"> | ||
<span class="number">8</span> | ||
<p class="description">hosts to bring teatime together</p> | ||
<%= progress_bar(@city.hosts.count, 8) %> | ||
</div> | ||
<a class="button" href="#">I'm interested</a> | ||
</div> | ||
<div class="city-resource"> | ||
<div class="block"> | ||
<span class="number">200</span> | ||
<p class="description">strangers ready to share at tea time</p> | ||
<%= progress_bar(0, 200) %> | ||
</div> | ||
<a class="button" href="#">Spread the Word</a> | ||
</div> | ||
</div> |