-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spam waves: add time tooltips; renew, edit, cancel buttons
- Loading branch information
Showing
2 changed files
with
17 additions
and
10 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 |
---|---|---|
@@ -1,10 +1,17 @@ | ||
<div class="spam-wave" data-id="<%= wave.id %>"> | ||
<h3><%= link_to wave.name, spam_wave_path(wave) %></h3> | ||
<p class="text-muted">Created by <%= wave.user.username %> <%= time_ago_in_words(wave.created_at) %> ago.</p> | ||
<p class="text-muted">Created by <%= wave.user.username %> <span title="<%= wave.created_at %>"><%= time_ago_in_words(wave.created_at) %></span> ago.</p> | ||
<% if wave.expiry.past? %> | ||
<p>Expired.</p> | ||
<p title="<%= wave.expiry %>">Expired.</p> | ||
<% else %> | ||
<p>Expires in <%= distance_of_time_in_words(DateTime.now, wave.expiry) %>.</p> | ||
<p>Expires in <span title="<%= wave.expiry %>"><%= distance_of_time_in_words(DateTime.now, wave.expiry) %></span>.</p> | ||
<% end %> | ||
<span class="button-container"> | ||
<%= link_to 'Edit', edit_spam_wave_path(@wave), class: 'btn btn-primary' %> | ||
<%= link_to 'Renew Wave', renew_spam_wave_path(@wave), class: 'btn btn-warning', method: :post %> | ||
<% if wave.expiry.past? %> | ||
<%= link_to 'Cancel Wave', cancel_spam_wave_path(@wave), class: 'btn btn-danger', method: :post %> | ||
<% end %> | ||
</span> | ||
</div> | ||
<hr/> |
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