summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMrYummy <elemental428@gmail.com>2017-10-26 22:21:00 +0200
committerMrYummy <elemental428@gmail.com>2017-10-26 22:21:00 +0200
commit2223f88d7bd94c98108e03307b5e52f26e8437ff (patch)
tree814c9f692c7198535d7ba43cf4bc95986abde35d
parentbd85a2c3ae8e7b58691c23439189d1d34d67fa7f (diff)
minor edits
-rw-r--r--app/controllers/users_controller.rb2
-rw-r--r--app/views/users/show.html.erb7
2 files changed, 6 insertions, 3 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index e188d01..cc77c44 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -6,6 +6,8 @@ class UsersController < ApplicationController
before_filter :set_user, except: [:index, :new, :create, :lost_password, :reset_password, :suggestions]
+ caches_action :show, expires_in: 10.seconds, layout: false
+
def index
if params[:role]
if params[:role].downcase == "staff"
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 3d9dcfe..de784a2 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -16,9 +16,10 @@
<div class="clear"></div>
<% if @ban_json %>
- <span class="user-banned">This user is banned for "<%=@ban_json["reason"]%>"<%=" until #{@ban_json["expires"]}" unless @ban_json["expires"] == "forever"%></span>
- <% elsif @user.banned? %>
- <span class="user-banned">This user is banned!</span>
+ <span class="user-banned">This user is banned on the server for "<%=@ban_json["reason"]%>"<%=" until #{@ban_json["expires"]}" unless @ban_json["expires"] == "forever"%></span>
+ <% end %>
+ <% if @user.banned? %>
+ <span class="user-banned">This user is banned on the website!</span>
<% end %>
<br>
<% if !@user.confirmed? %>