profiles: add account upgrade link.

This commit is contained in:
evazion
2019-08-15 12:51:51 -05:00
parent 01c4395105
commit a64cd50be4
2 changed files with 6 additions and 5 deletions

View File

@@ -13,10 +13,6 @@ class UserPresenter
user.created_at.strftime("%Y-%m-%d") user.created_at.strftime("%Y-%m-%d")
end end
def level
user.level_string
end
def ban_reason def ban_reason
if user.is_banned? if user.is_banned?
"#{user.recent_ban.reason}; expires #{user.recent_ban.expires_at} (#{user.bans.count} bans total)" "#{user.recent_ban.reason}; expires #{user.recent_ban.expires_at} (#{user.bans.count} bans total)"

View File

@@ -18,7 +18,12 @@
<tr> <tr>
<th>Level</th> <th>Level</th>
<td><%= presenter.level %></td> <td>
<%= user.level_string %>
<% if CurrentUser.user == user && !CurrentUser.is_gold? %>
(<%= link_to "upgrade", new_user_upgrade_path %>)
<% end %>
</td>
</tr> </tr>
<tr> <tr>