-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make signature count graph accessible by using a progress element
- Loading branch information
Showing
5 changed files
with
66 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<div class="signature-count"> | ||
<p class="signature-count-number" role="status" aria-atomic="true"> | ||
<%= signature_count(:default, petition.signature_count) %> | ||
</p> | ||
|
||
<label class="signature-count-progress"> | ||
<span class="visuallyhidden">Progress of the petition towards its next target:</span> | ||
<% if petition.response_threshold_reached_at? || petition.government_response_at? %> | ||
<%= tag.progress(value: petition.signature_count, max: Site.threshold_for_debate) do %> | ||
<%= number_with_delimiter(petition.signature_count) %> of <%= Site.formatted_threshold_for_debate %> signatures required to be considered for a debate in Parliament | ||
<% end %> | ||
<% else %> | ||
<%= tag.progress(value: petition.signature_count, max: Site.threshold_for_response) do %> | ||
<%= number_with_delimiter(petition.signature_count) %> of <%= Site.formatted_threshold_for_response %> signatures required to get a government response | ||
<% end %> | ||
<% end %> | ||
</label> | ||
|
||
<p class="signatures-on-a-map"> | ||
<a href="https://petitionmap.unboxedconsulting.com/?petition=<%= petition.id %>"> | ||
Show on a map | ||
<span class="visuallyhidden">the geographical breakdown of signatures by constituency</span> | ||
</a> | ||
</p> | ||
|
||
<p class="signature-count-goal"> | ||
<%= number_with_delimiter(current_threshold(petition)) %> | ||
|
||
<% if petition.response_threshold_reached_at? || petition.government_response_at? %> | ||
<span class="visuallyhidden"> signatures required to be considered for a debate in Parliament</span> | ||
<% else %> | ||
<span class="visuallyhidden"> signatures required to get a government response</span> | ||
<% end %> | ||
</p> | ||
</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
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