Updating payment and front page status alerts to work properly
This commit is contained in:
@@ -13,6 +13,7 @@ class Ability
|
|||||||
can :read_details, Mac
|
can :read_details, Mac
|
||||||
can [:update], Mac, :user_id => nil
|
can [:update], Mac, :user_id => nil
|
||||||
can [:create,:update], Mac, :user_id => user.id
|
can [:create,:update], Mac, :user_id => user.id
|
||||||
|
can :read, Payment, :user_id => user.id
|
||||||
can [:read,:new_member_report], User, :id => user.id #TODO: why can users update themselves? Maybe because Devise doesn't check users/edit?
|
can [:read,:new_member_report], User, :id => user.id #TODO: why can users update themselves? Maybe because Devise doesn't check users/edit?
|
||||||
can :read, UserCertification, :user_id => user.id
|
can :read, UserCertification, :user_id => user.id
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="payment_links <%= "payment-highlighted" if params[:flash] == "welcome_msg" %>">
|
<div class="payment_links <%= "payment-highlighted" if params[:flash] == "welcome_msg" %>">
|
||||||
|
|
||||||
<%= render '/statistics/index' %>
|
<%= render '/statistics/index' %>
|
||||||
<% if can? :read, resource.payments then %>
|
<% if can? :read, resource.payments.first then %>
|
||||||
<h3>Recorded Payments:</h3>
|
<h3>Recorded Payments:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<% resource.payments.sort_by(&:date).reverse!.each do |payment| %>
|
<% resource.payments.sort_by(&:date).reverse!.each do |payment| %>
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
<% if user_signed_in? && current_user.orientation.blank? then %>
|
<% if user_signed_in? && current_user.orientation.blank? then %>
|
||||||
<p class="alert">There's a lot more to see here, but our records show you haven't completed the new member orientation yet. If that's incorrect, please contact a volunteer.</p>
|
<p class="alert">There's a lot more to see here, but our records show you haven't completed the new member orientation yet. If that's incorrect, please contact a volunteer.</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if user_signed_in? && current_user.member.to_i < current_user.member_level.to_i then %>
|
<% if user_signed_in? && current_user.member_status.between?(2,100) then %>
|
||||||
|
<%= current_user.member.inspect %>
|
||||||
|
<%= current_user.member_level.inspect %>
|
||||||
<p class="alert">Looks like we haven't acknowledged a recent payment for you yet. This could be because we're slow, or this app just got started, but if in doubt please see your profile for payment instructions, or consider updating your membership level to something accurate.<br/>Thanks for supporting HeatSync!</p>
|
<p class="alert">Looks like we haven't acknowledged a recent payment for you yet. This could be because we're slow, or this app just got started, but if in doubt please see your profile for payment instructions, or consider updating your membership level to something accurate.<br/>Thanks for supporting HeatSync!</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
Reference in New Issue
Block a user