We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 757d009 commit 3de5945Copy full SHA for 3de5945
1 file changed
app/views/abilities/index.html.erb
@@ -1,10 +1,16 @@
1
-<% if @user.present? && @user.id == current_user&.id %>
2
- <h1>Your Abilities</h1>
3
-<% elsif @user.present? %>
4
- <h1>Abilities of <%= @user.username %></h1>
5
-<% else %>
6
- <h1>Abilities</h1>
7
-<% end %>
+<%
+ title = if @user&.same_as?(current_user)
+ 'Your Abilities'
+ elsif @user.present?
+ sanitize("Abilities for #{user_link(@user)}")
+ else
+ 'Abilities'
8
+ end
9
+%>
10
+
11
+<% content_for :title, strip_tags(title) %>
12
13
+<h1><%= title %></h1>
14
15
<p class="is-lead">Abilities show what the community trusts you to do. You earn them by writing good posts, suggesting
16
good edits or raising good flags.</p>
@@ -39,4 +45,4 @@
39
45
</td>
40
46
</tr>
41
47
<% end %>
42
-</table>
48
+</table>
0 commit comments