project membership widget. css fixes
This commit is contained in:
parent
96b53a9f59
commit
e64a174968
7 changed files with 54 additions and 41 deletions
28
app/views/widgets/_project_member.html.haml
Normal file
28
app/views/widgets/_project_member.html.haml
Normal file
|
@ -0,0 +1,28 @@
|
|||
- 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
|
||||
= image_tag gravatar_icon(current_user.email, 90), :class => "thumbnail"
|
||||
.row
|
||||
.span4
|
||||
%h4
|
||||
= truncate(current_user.name, :lenght => 24)
|
||||
- if @project.owner == current_user
|
||||
%span.label Project Owner
|
||||
|
||||
.span3
|
||||
%span.label= member.project_access_human
|
||||
%span.label= member.repo_access_human
|
||||
|
||||
- if can? current_user, :write_project, @project
|
||||
%hr
|
||||
.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 »
|
||||
|
10
app/views/widgets/_recent_projects.html.haml
Normal file
10
app/views/widgets/_recent_projects.html.haml
Normal file
|
@ -0,0 +1,10 @@
|
|||
- if current_user.projects.count > 0
|
||||
%div.widget
|
||||
%h4
|
||||
Recent Projects:
|
||||
%ul
|
||||
- current_user.projects.order("id DESC").limit(5).each do |project|
|
||||
%li
|
||||
= link_to project_path(project) do
|
||||
= project.name
|
||||
= link_to "More » ", projects_path
|
Loading…
Add table
Add a link
Reference in a new issue