When a user hasn't made any blocks or been blocked don't display a
skeleton table. Just a <p> saying there's nothing here.
This commit is contained in:
parent
268a2cd474
commit
8d6d7b51e8
4 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
<% unless @user_blocks.empty? %>
|
||||||
<table id="block_list" cellpadding="3">
|
<table id="block_list" cellpadding="3">
|
||||||
<tr>
|
<tr>
|
||||||
<% if show_user_name %>
|
<% if show_user_name %>
|
||||||
|
@ -15,5 +16,8 @@
|
||||||
<th></th>
|
<th></th>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<%= render :partial => 'block', :locals => {:show_revoke_link => show_revoke_link, :show_user_name => show_user_name, :show_creator_name => show_creator_name }, :collection => @user_blocks unless @user_blocks.nil? %>
|
<%= render :partial => 'block', :locals => {:show_revoke_link => show_revoke_link, :show_user_name => show_user_name, :show_creator_name => show_creator_name }, :collection => @user_blocks %>
|
||||||
</table>
|
</table>
|
||||||
|
<% else %>
|
||||||
|
<p><%= t "user_block.#{blocks_by_on}.empty", :name => h(@this_user.display_name) %></p>
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<% @title = t('user_block.blocks_by.title', :name => h(@this_user.display_name)) %>
|
<% @title = t('user_block.blocks_by.title', :name => h(@this_user.display_name)) %>
|
||||||
<h1><%= t('user_block.blocks_by.heading', :name => link_to(h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name})) %></h1>
|
<h1><%= t('user_block.blocks_by.heading', :name => link_to(h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name})) %></h1>
|
||||||
|
|
||||||
<%= render :partial => 'blocks', :locals => { :show_revoke_link => (@user and @user.moderator?), :show_user_name => true, :show_creator_name => false } %>
|
<%= render :partial => 'blocks', :locals => { :blocks_by_on => 'blocks_by', :show_revoke_link => (@user and @user.moderator?), :show_user_name => true, :show_creator_name => false } %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<% @title = t('user_block.blocks_on.title', :name => h(@this_user.display_name)) %>
|
<% @title = t('user_block.blocks_on.title', :name => h(@this_user.display_name)) %>
|
||||||
<h1><%= t('user_block.blocks_on.heading', :name => link_to(h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name})) %></h1>
|
<h1><%= t('user_block.blocks_on.heading', :name => link_to(h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name})) %></h1>
|
||||||
|
|
||||||
<%= render :partial => 'blocks', :locals => { :show_revoke_link => (@user and @user.moderator?), :show_user_name => false, :show_creator_name => true } %>
|
<%= render :partial => 'blocks', :locals => { :blocks_by_on => 'blocks_on', :show_revoke_link => (@user and @user.moderator?), :show_user_name => false, :show_creator_name => true } %>
|
||||||
|
|
|
@ -1090,9 +1090,11 @@ en:
|
||||||
blocks_on:
|
blocks_on:
|
||||||
title: "Blocks on {{name}}"
|
title: "Blocks on {{name}}"
|
||||||
heading: "List of blocks on {{name}}"
|
heading: "List of blocks on {{name}}"
|
||||||
|
empty: "{{name}} has not made any blocks yet."
|
||||||
blocks_by:
|
blocks_by:
|
||||||
title: "Blocks by {{name}}"
|
title: "Blocks by {{name}}"
|
||||||
heading: "List of blocks by {{name}}"
|
heading: "List of blocks by {{name}}"
|
||||||
|
empty: "{{name}} has not been blocked yet."
|
||||||
show:
|
show:
|
||||||
heading: "Block on {{block_on}} by {{block_by}}"
|
heading: "Block on {{block_on}} by {{block_by}}"
|
||||||
time_future: "Ends in {{time}}"
|
time_future: "Ends in {{time}}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue