upload limits: show full upload limits on upload page.

This commit is contained in:
evazion
2017-08-10 23:54:59 -05:00
parent 1ef363dd68
commit 6797f8564d
2 changed files with 5 additions and 1 deletions

View File

@@ -942,4 +942,8 @@ class User < ApplicationRecord
self.enable_sequential_post_navigation = true
self.enable_auto_complete = true
end
def presenter
@presenter ||= UserPresenter.new(self)
end
end

View File

@@ -8,7 +8,7 @@
</div>
<% unless CurrentUser.can_upload_free? %>
<p>You can upload <strong><%= pluralize CurrentUser.upload_limit, "more post" %></strong> today.</p>
<p>Upload limit: <strong><%= CurrentUser.user.presenter.upload_limit(self) %></strong>.</p>
<% end %>
<%= render "image" %>