gitlabhq/app/views/widgets/_project_member.html.haml

55 lines
1.8 KiB
Plaintext
Raw Normal View History

2012-02-05 20:26:04 +01:00
- member = @project.team_member_by_id(current_user.id)
.widget
.media-grid
%li
= link_to project_team_member_path(@project, member), :title => current_user.name do
2012-02-18 13:12:48 +01:00
= image_tag gravatar_icon(current_user.email, 60), :class => "thumbnail", :width => 60
%h4
2012-02-21 21:46:34 +01:00
Hey,
#{truncate current_user.first_name, :lenght => 24}!
2012-02-18 13:12:48 +01:00
%p
- if @project.issues_enabled
2012-02-21 21:51:18 +01:00
%span
Assigned Issues:
2012-02-21 21:51:18 +01:00
= current_user.assigned_issues.opened.count
2012-02-18 13:12:48 +01:00
%br
- if @project.merge_requests_enabled
2012-02-21 21:51:18 +01:00
%span
Assigned Requests:
2012-02-21 21:51:18 +01:00
= current_user.assigned_merge_requests.opened.count
2012-02-21 21:46:34 +01:00
%br
%br
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
2012-02-21 22:09:46 +01:00
= link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "btn small padded" do
2012-02-21 21:46:34 +01:00
Merge Request
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
2012-02-21 21:46:34 +01:00
= link_to new_project_issue_path(@project), :title => "New Issue", :class => "btn small" do
Issue
%hr
%p
Your access level in this project is
%code #{member.project_access_human}
%br
Visit member card for more information
2012-02-18 13:12:48 +01:00
.link_holder
= link_to project_team_member_path(@project, member), :title => current_user.name do
2012-02-21 21:46:34 +01:00
= "Member Card »"
2012-02-05 20:26:04 +01:00
2012-02-18 13:12:48 +01:00
-#- if can? current_user, :write_project, @project
.widget
- if @project.issues_enabled && @project.merge_requests_enabled
.span3
%p You have access to create new issue or merge request.
%div
= link_to new_project_issue_path(@project), :title => "New Issue", :class => "" do
New Issue »
%div
= link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "" do
New Merge Request »
2012-02-05 20:26:04 +01:00