summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-21 22:46:34 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-21 22:46:34 +0200
commit9803e0885e87c4e578d651bd1b1ce300a03f88a7 (patch)
tree872851e46b2e070d982c425e7ca200a45acf39fc
parent1c22d4f50f6a89c85b17e6b5351bcf351bf35e27 (diff)
downloadgitlab-ce-9803e0885e87c4e578d651bd1b1ce300a03f88a7.tar.gz
Project sidebar improved
-rw-r--r--app/controllers/admin/projects_controller.rb2
-rw-r--r--app/views/projects/show.html.haml8
-rw-r--r--app/views/widgets/_project_member.html.haml24
3 files changed, 25 insertions, 9 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb
index 2c6363c6f3e..868bec7c9fe 100644
--- a/app/controllers/admin/projects_controller.rb
+++ b/app/controllers/admin/projects_controller.rb
@@ -52,7 +52,7 @@ class Admin::ProjectsController < ApplicationController
def update
@admin_project = Project.find_by_code(params[:id])
- owner_id = params[:project][:owner_id]
+ owner_id = params[:project].delete(:owner_id)
if owner_id
@admin_project.owner = User.find(owner_id)
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 91828006df5..04ffa53b68e 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -14,9 +14,9 @@
= text_field_tag :project_clone, @project.url_to_repo, :class => "xlarge one_click_select git_clone_url"
= simple_format @project.description
-
-.ui-box
- %h5.cgray Recent Activity
- .content_list= render "feed"
+- unless @activities.blank?
+ .ui-box
+ %h5.cgray Recent Activity
+ .content_list= render "feed"
diff --git a/app/views/widgets/_project_member.html.haml b/app/views/widgets/_project_member.html.haml
index cbe8ce54037..cdaa726c7b7 100644
--- a/app/views/widgets/_project_member.html.haml
+++ b/app/views/widgets/_project_member.html.haml
@@ -5,9 +5,9 @@
= link_to project_team_member_path(@project, member), :title => current_user.name do
= image_tag gravatar_icon(current_user.email, 60), :class => "thumbnail", :width => 60
%h4
- Hi,
- = truncate current_user.first_name, :lenght => 24
- !
+ Hey,
+ #{truncate current_user.first_name, :lenght => 24}!
+
%p
- if @project.issues_enabled
Assigned issues:
@@ -19,9 +19,25 @@
%br
Your merge requests:
= current_user.assigned_merge_requests.opened.count
+ %br
+ %br
+ - if @project.merge_requests_enabled
+ = link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "btn small" do
+ Merge Request
+ - if @project.issues_enabled
+ = 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
+
.link_holder
= link_to project_team_member_path(@project, member), :title => current_user.name do
- = "Access: #{member.project_access_human} »"
+ = "Member Card »"