-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 #3577 from consul/proposal-show
Extract partial with mobile sticky content
- Loading branch information
Showing
2 changed files
with
50 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<% if proposal.selected? %> | ||
<div class="callout success"> | ||
<strong><%= t("proposals.proposal.selected") %></strong> | ||
</div> | ||
<% else %> | ||
<div id="proposal_sticky" data-sticky-container> | ||
<div class="sticky fixed-mobile-content" | ||
data-sticky | ||
data-stick-to="bottom" | ||
data-sticky-on="small" | ||
data-top-anchor="0" | ||
data-btm-anchor="sticky_stop" | ||
data-check-every="0"> | ||
<div class="fixed-mobile-content"> | ||
<div class="sidebar-divider"></div> | ||
<h2><%= t("votes.supports") %></h2> | ||
|
||
<div id="<%= dom_id(proposal) %>_votes"> | ||
<% if proposal.draft? %> | ||
<div class="callout primary"> | ||
<p class="text-center small"><strong><%= t("proposals.show.draft") %></strong></p> | ||
</div> | ||
<% elsif proposal.successful? %> | ||
<div class="supports text-center"> | ||
<%= render "supports", proposal: proposal %> | ||
</div> | ||
<% elsif proposal.archived? %> | ||
<div class="padding text-center"> | ||
<p> | ||
<strong><%= t("proposals.proposal.supports", count: proposal.total_votes) %></strong> | ||
</p> | ||
<p><%= t("proposals.proposal.archived") %></p> | ||
</div> | ||
<% else %> | ||
<%= render "votes", { proposal: proposal, vote_url: vote_proposal_path(proposal, value: "yes") } %> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div id="sticky_stop"></div> | ||
<% 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