Updating final user views
This commit is contained in:
parent
bedd80d555
commit
cb0f203f82
|
@ -15,6 +15,7 @@ class HomeController < ApplicationController
|
|||
end
|
||||
|
||||
# Fun Stats
|
||||
@featured_resource = Resource.where("picture_file_name IS NOT NULL").sample
|
||||
|
||||
@num_certs = UserCertification.count
|
||||
@recent_certs = UserCertification.where("created_at > ?", DateTime.now - 7.days).count
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<%= simple_format Setting.welcome_body %>
|
||||
<% end %>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<% if ((can? :read, User) && (@recent_user_names.count > 1)) then %>
|
||||
<% if ((can? :read, User) && (@recent_user_names.count > 1)) then %>
|
||||
<div class="col-sm-4">
|
||||
<h2>New People: <em>(say hi!)</em></h2>
|
||||
<ul>
|
||||
<% @recent_user_names.each do |user| %>
|
||||
|
@ -13,8 +13,8 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<h2>Cool Stats:</h2>
|
||||
|
@ -43,3 +43,8 @@
|
|||
<% end %>
|
||||
<%= simple_format Setting.member_resources_inset %>
|
||||
</div>
|
||||
|
||||
<span class="col-sm-4">
|
||||
<h3>Featured item:</h3>
|
||||
<%= render @featured_resource unless @featured_resource.blank? %>
|
||||
</span>
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
|
||||
<h2><a name="new_users"></a>New Users</h2>
|
||||
<table>
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Member Level</th>
|
||||
|
@ -25,22 +25,22 @@
|
|||
<td><% if user.created_at.present? %>
|
||||
<%= distance_of_time_in_words(DateTime.now, user.created_at.to_date)+" ago" %>
|
||||
<% else %>
|
||||
<span class="alert">×</span>
|
||||
<span class="label label-danger">×</span>
|
||||
<% end %></td>
|
||||
<td><% if user.waiver.present? %>
|
||||
<%= distance_of_time_in_words(DateTime.now, user.waiver.to_date)+" ago" %>
|
||||
<% else %>
|
||||
<span class="alert">×</span>
|
||||
<span class="label label-danger">×</span>
|
||||
<% end %></td>
|
||||
<td><% if user.orientation.present? %>
|
||||
<%= distance_of_time_in_words(DateTime.now, user.orientation.to_date)+" ago" %>
|
||||
<% else %>
|
||||
<span class="alert">×</span>
|
||||
<span class="label label-danger">×</span>
|
||||
<% end %></td>
|
||||
<td><% if user.payments.present? %>
|
||||
<%= distance_of_time_in_words(Date.today, user.payments.maximum(:date))+" ago" %>
|
||||
<% else %>
|
||||
<span class="alert">×</span>
|
||||
<span class="label label-danger">×</span>
|
||||
<% end %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
@ -48,7 +48,7 @@
|
|||
</table>
|
||||
|
||||
<h2><a name="members_without_cards"></a>Basic+ Members Without Cards</h2>
|
||||
<table>
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Account Created</th>
|
||||
|
@ -67,19 +67,19 @@
|
|||
<td><% if user.payments.present? %>
|
||||
<% last_payment = user.payments.maximum(:date) %>
|
||||
<% if Date.today-last_payment > 60 %>
|
||||
<span class="alert">
|
||||
<span class="label label-danger">
|
||||
<% else %>
|
||||
<span class="notice">
|
||||
<span class="label label-success">
|
||||
<% end %>
|
||||
<%= distance_of_time_in_words(Date.today, user.payments.maximum(:date))+" ago" %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="alert">×</span>
|
||||
<span class="label label-danger">×</span>
|
||||
<% end %></td>
|
||||
<td><% if user.cards.present? %>
|
||||
<span class="notice">✓</span>
|
||||
<span class="label label-success">✓</span>
|
||||
<% else %>
|
||||
<span class="alert">×</span>
|
||||
<span class="label label-danger">×</span>
|
||||
<% end %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
@ -88,7 +88,7 @@
|
|||
|
||||
|
||||
<h2><a name="logins"></a>Logins</h2>
|
||||
<table>
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Current Sign In</th>
|
||||
|
@ -118,7 +118,7 @@
|
|||
|
||||
<h2><a name="zombies"></a>Never-Logged-In Members</h2>
|
||||
<em>Excluding non-members</em>
|
||||
<table>
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Member Level</th>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<h1>Inactive Users</h1>
|
||||
|
||||
<table>
|
||||
<table class="table table-hover">
|
||||
<col />
|
||||
<col />
|
||||
<% if current_user.admin? then %><col /><% end %>
|
||||
|
@ -24,14 +24,12 @@
|
|||
<th>Desired Level</th>
|
||||
<th>Last Payment</th>
|
||||
<th>Joined</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% if !@users.blank? %>
|
||||
<% @users.each do |user| %>
|
||||
<tr<%= " class='hidden'" if user.hidden? %>>
|
||||
<td><%= image_tag user.gravatar_url(:default => "http://members.heatsynclabs.org/assets/nil.png"), :class => :avatar %></td>
|
||||
<td><%= image_tag user.gravatar_url(:size => 25, :default => "http://members.heatsynclabs.org/assets/nil.png"), :class => :avatar %></td>
|
||||
<td><%= link_to user.name, user %></td>
|
||||
<% if current_user.admin? then %><td><%= user.email %></td><% end %>
|
||||
<td><% user.certifications.each do |c| %>
|
||||
|
@ -51,8 +49,6 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<td><%= user.created_at.to_date %></td>
|
||||
<td><%= link_to 'Edit', edit_user_path(user) if can? :update, user %></td>
|
||||
<td><%= link_to 'Destroy', user, :confirm => 'Are you sure? WARNING: THIS DOES NOT REMOVE THE USER FROM THE DOOR SYSTEM! DISABLE THEM FIRST.', :method => :delete if can? :destroy, user %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<% if !@users.blank? %>
|
||||
<% @users.each do |user| %>
|
||||
<tr<%= ' class=hidden' if user.hidden? %>>
|
||||
<td><%= image_tag user.gravatar_url(:size => 25,:default => "http://members.heatsynclabs.org/assets/nil.png"), :class => :avatar %></td>
|
||||
<td><%= image_tag user.gravatar_url(:size => 25, :default => "http://members.heatsynclabs.org/assets/nil.png"), :class => :avatar %></td>
|
||||
<td><%= link_to user.name, user %></td>
|
||||
<td><%= raw(user.member_status_symbol) %></td>
|
||||
<% if current_user.admin? then %><td><%= user.email %></td><% end %>
|
||||
|
|
Loading…
Reference in New Issue
Block a user