Skip to content

Commit 7e21641

Browse files
committed
restored qualifier names to subscription list
1 parent 4ae7fbd commit 7e21641

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

app/helpers/subscriptions_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def frequency_choice
1616
def phrase_for(type)
1717
phrase_map = {
1818
all: 'all new questions',
19-
tag: 'new questions in the tag',
19+
tag: 'new questions with the tag',
2020
user: 'new questions by the user',
2121
interesting: 'new questions classed as interesting',
2222
category: 'new questions in the category',
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
<%= render 'users/tabs', user: current_user %>
22

33
<h1>Your Subscriptions</h1>
4-
<p>These are all the email subscriptions you're currently signed up for. You can turn them off or remove them entirely from here.</p>
4+
<p>
5+
These are all the email subscriptions you're currently signed up for.
6+
You can turn them off or remove them entirely from here.
7+
</p>
58

69
<% @subscriptions.group_by(&:type).flat_map do |type, subs|
710
subs.each_with_index.map do |sub, index|
811
[
9-
sub.created_at,
12+
sub.created_at,
1013
[sub.name.present? ? sub.name : "#{type.capitalize} subscription #{index + 1}",sub]
1114
]
1215
end
1316
end.sort_by { |a| a }.map { |_, v| v }.each do |name, sub| %>
1417
<details data-sub-id="<%= sub.id %>">
1518
<summary><%= name %></summary>
16-
<p>Subscription to <%= phrase_for(sub.type) %>, emailed every <%= pluralize(sub.frequency, 'day') %>.</p>
19+
<p>
20+
Subscription to <%= phrase_for(sub.type) %><%= " '#{sub.qualifier_name}'" if sub.qualifier_name.present? %>,
21+
emailed every <%= pluralize(sub.frequency, 'day') %>.
22+
</p>
1723
<%= check_box_tag :enabled, 1, sub.enabled, class: 'js-enable-subscription' %>
1824
<%= label_tag :enabled, 'Enabled?' %> &middot;
19-
<a href="#" class="js-remove-subscription text-danger">Remove</a>
25+
<a href="javascript:void(0)" class="js-remove-subscription text-danger">Remove</a>
2026
</details>
2127
<% end %>

0 commit comments

Comments
 (0)