Commit 9803e0885e87c4e578d651bd1b1ce300a03f88a7
1 parent
1c22d4f5
Exists in
master
and in
4 other branches
Project sidebar improved
Showing
3 changed files
with
25 additions
and
9 deletions
Show diff stats
app/controllers/admin/projects_controller.rb
... | ... | @@ -52,7 +52,7 @@ class Admin::ProjectsController < ApplicationController |
52 | 52 | def update |
53 | 53 | @admin_project = Project.find_by_code(params[:id]) |
54 | 54 | |
55 | - owner_id = params[:project][:owner_id] | |
55 | + owner_id = params[:project].delete(:owner_id) | |
56 | 56 | |
57 | 57 | if owner_id |
58 | 58 | @admin_project.owner = User.find(owner_id) | ... | ... |
app/views/projects/show.html.haml
... | ... | @@ -14,9 +14,9 @@ |
14 | 14 | = text_field_tag :project_clone, @project.url_to_repo, :class => "xlarge one_click_select git_clone_url" |
15 | 15 | |
16 | 16 | = simple_format @project.description |
17 | - | |
18 | -.ui-box | |
19 | - %h5.cgray Recent Activity | |
20 | - .content_list= render "feed" | |
17 | +- unless @activities.blank? | |
18 | + .ui-box | |
19 | + %h5.cgray Recent Activity | |
20 | + .content_list= render "feed" | |
21 | 21 | |
22 | 22 | ... | ... |
app/views/widgets/_project_member.html.haml
... | ... | @@ -5,9 +5,9 @@ |
5 | 5 | = link_to project_team_member_path(@project, member), :title => current_user.name do |
6 | 6 | = image_tag gravatar_icon(current_user.email, 60), :class => "thumbnail", :width => 60 |
7 | 7 | %h4 |
8 | - Hi, | |
9 | - = truncate current_user.first_name, :lenght => 24 | |
10 | - ! | |
8 | + Hey, | |
9 | + #{truncate current_user.first_name, :lenght => 24}! | |
10 | + | |
11 | 11 | %p |
12 | 12 | - if @project.issues_enabled |
13 | 13 | Assigned issues: |
... | ... | @@ -19,9 +19,25 @@ |
19 | 19 | %br |
20 | 20 | Your merge requests: |
21 | 21 | = current_user.assigned_merge_requests.opened.count |
22 | + %br | |
23 | + %br | |
24 | + - if @project.merge_requests_enabled | |
25 | + = link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "btn small" do | |
26 | + Merge Request | |
27 | + - if @project.issues_enabled | |
28 | + = link_to new_project_issue_path(@project), :title => "New Issue", :class => "btn small" do | |
29 | + Issue | |
30 | + | |
31 | + %hr | |
32 | + %p | |
33 | + Your access level in this project is | |
34 | + %code #{member.project_access_human} | |
35 | + %br | |
36 | + Visit member card for more information | |
37 | + | |
22 | 38 | .link_holder |
23 | 39 | = link_to project_team_member_path(@project, member), :title => current_user.name do |
24 | - = "Access: #{member.project_access_human} »" | |
40 | + = "Member Card »" | |
25 | 41 | |
26 | 42 | |
27 | 43 | ... | ... |