aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/user/show.rhtml63
1 files changed, 33 insertions, 30 deletions
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 46ca8c751..902de1004 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -108,9 +108,12 @@
<% end %>
<% end %>
- <% if @is_you and not @track_things.empty? %>
- <h2 id="email_subscriptions">
- Your <%=pluralize(@track_things.size, "email subscription") %>
+ <% if @is_you %>
+ <% if @track_things.empty? %>
+ <h2 id="email_subscriptions"> Your email subscriptions</h2>
+ <p>None made.</p>
+ <% else %>
+ <h2 id="email_subscriptions"> Your <%=pluralize(@track_things.size, "email subscription") %> </h2>
<% if @track_things_grouped.size == 1 %>
<% form_tag :controller => 'track', :action => 'delete_all_type' do %>
<h3>
@@ -124,36 +127,36 @@
</h3>
<% end %>
<% end %>
- </h2>
- <% for track_type, track_things in @track_things_grouped %>
- <% if @track_things_grouped.size > 1 %>
- <% form_tag :controller => 'track', :action => 'delete_all_type' do %>
- <h3>
- <%=TrackThing.track_type_description(track_type)%>
- <%= hidden_field_tag 'track_type', track_type %>
- <%= hidden_field_tag 'user', @display_user.id %>
- <%= hidden_field_tag 'r', request.request_uri %>
- <% if track_things.size > 1 %>
- <%= submit_tag "unsubscribe all" %>
- <% end %>
- </h3>
+ <% for track_type, track_things in @track_things_grouped %>
+ <% if @track_things_grouped.size > 1 %>
+ <% form_tag :controller => 'track', :action => 'delete_all_type' do %>
+ <h3>
+ <%=TrackThing.track_type_description(track_type)%>
+ <%= hidden_field_tag 'track_type', track_type %>
+ <%= hidden_field_tag 'user', @display_user.id %>
+ <%= hidden_field_tag 'r', request.request_uri %>
+ <% if track_things.size > 1 %>
+ <%= submit_tag "unsubscribe all" %>
+ <% end %>
+ </h3>
+ <% end %>
<% end %>
- <% end %>
- <ul>
- <% for track_thing in track_things %>
- <li>
- <% form_tag :controller => 'track', :action => 'update', :track_id => track_thing.id do %>
- <div>
- <%= track_thing.params[:list_description] %>
- <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
- <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %>
- <%= submit_tag "unsubscribe" %>
- </div>
- <% end %>
- </li>
+ <ul>
+ <% for track_thing in track_things %>
+ <li>
+ <% form_tag :controller => 'track', :action => 'update', :track_id => track_thing.id do %>
+ <div>
+ <%= track_thing.params[:list_description] %>
+ <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
+ <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %>
+ <%= submit_tag "unsubscribe" %>
+ </div>
+ <% end %>
+ </li>
+ <% end %>
+ </ul>
<% end %>
- </ul>
<% end %>
<% end %>