-
Notifications
You must be signed in to change notification settings - Fork 0
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 #89 from uwent/improve-map-images
Improve map images
- Loading branch information
Showing
12 changed files
with
127 additions
and
126 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
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,50 +1,49 @@ | ||
<div class="box"> | ||
<b>Browse single-day maps:</b> | ||
<div class="map-form"> | ||
<div class="form-row"> | ||
<div class="map-form"> | ||
<div class="map-form-row"> | ||
<div> | ||
<%= form_tag do %> | ||
Change date: | ||
<label><%= submit_tag "Prev: #{@date - 1}", name: :date %></label> | ||
<% if @date < Date.current - 2.days %> | ||
<label><%= submit_tag "Next: #{@date + 1}", name: :date %></label> | ||
<% end %> | ||
<% if @date < Date.yesterday %> | ||
<label><%= submit_tag "Latest: #{Date.yesterday}", name: :date %></label> | ||
<% end %> | ||
Browse daily maps: | ||
<button type=submit name=date value=<%= @date - 1 %>><== Prev</button> | ||
<button type=submit name=date value=<%= @date + 1 %> <%= @date < Date.yesterday ? "" : "disabled" %>>Next ==></button> | ||
<button type=submit name=date value=<%= Date.yesterday %>>Latest</button> | ||
<%= hidden_field_tag :units, @units %> | ||
<% end %> | ||
</div> | ||
<div class="form-row"> | ||
|
||
<div> | ||
<%= form_tag do %> | ||
<%= hidden_field_tag :units, @units %> | ||
Or enter a specific date: | ||
<%= text_field_tag :date %> <%= submit_tag "Go" %> | ||
<% end %> | ||
</div> | ||
</div> | ||
|
||
<div class="form-row"> | ||
<%= form_tag do %> | ||
<%= hidden_field_tag :date, @date %> | ||
<% if @unit_opts %> | ||
<span style="margin-right: 2em;"> | ||
Units: | ||
<% @unit_opts.each do |unit| %> | ||
<label><%= radio_button_tag :units, unit, @units == unit, onchange: "this.form.submit()" %><%= unit %></label> | ||
<% end %> | ||
</span> | ||
<% end %> | ||
<%= form_tag do %> | ||
<div class="map-form-row"> | ||
<%= hidden_field_tag :date, @date %> | ||
|
||
<div> | ||
<label>Wisconsin only? <%= check_box_tag :wi_only, true, @wi_only, onchange: "this.form.submit()" %></label> | ||
<% if @stat_opts %> | ||
<p> | ||
</div> | ||
|
||
<% if @unit_opts %> | ||
<div> | ||
Units: | ||
<% @unit_opts.each do |unit| %> | ||
<label><%= radio_button_tag :units, unit, @units == unit, onchange: "this.form.submit()" %><%= unit %></label> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
<% if @stat_opts %> | ||
<div> | ||
Summary statistic: | ||
<% @stat_opts.each do |stat| %> | ||
<label><%= radio_button_tag :stat, stat, @stat == stat, onchange: "this.form.submit()" %><%= stat %></label> | ||
<% end %> | ||
</p> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
<% end %> | ||
</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
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,9 @@ | ||
<% if @start_date %> | ||
<h3 id="map"> | ||
Cumulative map for <%= @start_date.strftime("%b %-d, %Y") %> to <%= @date.strftime("%b %-d, %Y") %> (<%= pluralize((@start_date..@date).count, "day") %>) | ||
</h3> | ||
<% else %> | ||
<h3 id="map"> | ||
Daily map for <%= @date.strftime("%b %-d, %Y") %> (<%= pluralize((Date.current - @date).to_i, "day") %> ago) | ||
</h3> | ||
<% 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
Oops, something went wrong.