Created
April 26, 2011 20:51
-
-
Save leemcalilly/943114 to your computer and use it in GitHub Desktop.
memberships partial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- user = membership.user | |
%p | |
= link_to image_tag(user.avatar.url(:mini), :size => "30x40"), user, :title => p(user, :name) | |
= link_to_user user | |
= p(user, :current_job_title) unless p(user, :current_job_title).nil? | |
= p(user, :current_company_name) unless p(user, :current_company_name).nil? | |
%a{:href => '#'} Status: | |
&= group_status(membership.group, membership) | |
.summary | |
- if membership.accepted? | |
Member since | |
= membership.updated_at.to_s(:date) | |
- unless membership.verified? | |
(Unverified) | |
= text_to 'Verify', verify_group_member_path(membership.group, membership), :method => :post, :confirm => "Are you sure you want to verify #{p(membership.user, :name)}?" if !membership.verified? && current_user.can_manage_members?(membership.group) | |
= text_to 'Remove from group', group_member_path(membership.group, membership), :method => :delete, :confirm => "Are you sure you want to remove #{p(membership.user, :name)} from the group?" if current_user.can_delete?(membership) | |
- elsif membership.pending? | |
Requested on | |
= membership.created_at.to_s(:date) | |
= text_to 'Accept', accept_group_member_path(membership.group, membership), :method => :post, :confirm => "Are you sure you want to accept #{p(membership.user, :name)} as a member of the group?" if current_user.can_accept?(membership) | |
= text_to 'Reject', reject_group_member_path(membership.group, membership), :method => :post, :confirm => "Are you sure you want to reject #{p(membership.user, :name)}'s membership request?" if current_user.can_reject?(membership) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment