|
1 | 1 | <%= render 'users/tabs', user: current_user %> |
2 | 2 |
|
3 | 3 | <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> |
5 | 8 |
|
6 | 9 | <% @subscriptions.group_by(&:type).flat_map do |type, subs| |
7 | 10 | subs.each_with_index.map do |sub, index| |
8 | 11 | [ |
9 | | - sub.created_at, |
| 12 | + sub.created_at, |
10 | 13 | [sub.name.present? ? sub.name : "#{type.capitalize} subscription #{index + 1}",sub] |
11 | 14 | ] |
12 | 15 | end |
13 | 16 | end.sort_by { |a| a }.map { |_, v| v }.each do |name, sub| %> |
14 | 17 | <details data-sub-id="<%= sub.id %>"> |
15 | 18 | <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> |
17 | 23 | <%= check_box_tag :enabled, 1, sub.enabled, class: 'js-enable-subscription' %> |
18 | 24 | <%= label_tag :enabled, 'Enabled?' %> · |
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> |
20 | 26 | </details> |
21 | 27 | <% end %> |
0 commit comments