upload limits: show full upload limits on upload page.
This commit is contained in:
@@ -942,4 +942,8 @@ class User < ApplicationRecord
|
|||||||
self.enable_sequential_post_navigation = true
|
self.enable_sequential_post_navigation = true
|
||||||
self.enable_auto_complete = true
|
self.enable_auto_complete = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def presenter
|
||||||
|
@presenter ||= UserPresenter.new(self)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% unless CurrentUser.can_upload_free? %>
|
<% 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 %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "image" %>
|
<%= render "image" %>
|
||||||
|
|||||||
Reference in New Issue
Block a user