get rid of sidebar

This commit is contained in:
Dmitriy Zaporozhets 2012-03-03 13:03:03 +02:00
parent 62707bb730
commit d6b051c5be
12 changed files with 28 additions and 121 deletions

View file

@ -20,7 +20,7 @@
= link_to project_issue_path(issue.project, issue) do = link_to project_issue_path(issue.project, issue) do
%p.row_title= truncate(issue.title, :length => 60) %p.row_title= truncate(issue.title, :length => 100)

View file

@ -1,8 +0,0 @@
%aside.project-right
- if content_for? :sidebar_all
= render :sidebar_all
- else
- if content_for? :sidebar_top_block
= yield :sidebar_top_block
= render "widgets/project_member"
= render "widgets/recent_projects"

View file

@ -1,21 +0,0 @@
%aside.projects
- if current_user.can_create_project?
.widget
You can create up to
= current_user.projects_limit
projects. Click on link below to add a new one
.link_holder
= link_to new_project_path, :class => "" do
New Project »
- if current_user.is_admin?
.widget
You have administrator privilegies. You can configure application following this button:
.link_holder
= link_to admin_root_path, :class => "", :title => "Admin" do
Visit Admin Area »
- if current_user.projects.count > 0
= render "widgets/recent_projects"

View file

@ -13,6 +13,4 @@
= link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do = link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do
SSH Keys SSH Keys
.content .content
.row = yield
.span12= yield
.sidebar= render "layouts/projects_side"

View file

@ -7,10 +7,5 @@
.container .container
= render :partial => "layouts/project_menu" = render :partial => "layouts/project_menu"
.content .content
- if @full_content
= yield = yield
- else
.row
.span12= yield
.sidebar= render "layouts/project_side_right"

View file

@ -10,4 +10,4 @@
→ →
%span.label= merge_request.target_branch %span.label= merge_request.target_branch
= link_to project_merge_request_path(merge_request.project, merge_request) do = link_to project_merge_request_path(merge_request.project, merge_request) do
%p.row_title= truncate(merge_request.title, :length => 60) %p.row_title= truncate(merge_request.title, :length => 100)

View file

@ -2,11 +2,6 @@
%li{ :class => "#{'active' if current_page?(project_path(@project)) }" } %li{ :class => "#{'active' if current_page?(project_path(@project)) }" }
= link_to project_path(@project), :class => "activities-tab tab" do = link_to project_path(@project), :class => "activities-tab tab" do
Show Show
- if can? current_user, :admin_project, @project
%li{ :class => "#{'active' if current_page?(edit_project_path(@project)) }" }
= link_to edit_project_path(@project), :class => "stat-tab tab " do
Edit
%li{ :class => " #{'active' if (controller.controller_name == "team_members") || current_page?(team_project_path(@project)) }" } %li{ :class => " #{'active' if (controller.controller_name == "team_members") || current_page?(team_project_path(@project)) }" }
= link_to team_project_path(@project), :class => "team-tab tab" do = link_to team_project_path(@project), :class => "team-tab tab" do
Team Team
@ -18,11 +13,15 @@
Snippets Snippets
- if can? current_user, :admin_project, @project - if can? current_user, :admin_project, @project
%li{:class => "#{'active' if controller.controller_name == "hooks" }"} %li.right{:class => "#{'active' if controller.controller_name == "deploy_keys"}"}
= link_to project_hooks_path(@project) do
%span
Hooks
%li{:class => "#{'active' if controller.controller_name == "deploy_keys"}"}
= link_to project_deploy_keys_path(@project) do = link_to project_deploy_keys_path(@project) do
%span %span
Deploy Keys Deploy Keys
%li.right{:class => "#{'active' if controller.controller_name == "hooks" }"}
= link_to project_hooks_path(@project) do
%span
Hooks
%li.right{ :class => "#{'active' if current_page?(edit_project_path(@project)) }" }
= link_to edit_project_path(@project), :class => "stat-tab tab " do
Edit

View file

@ -1,4 +1,4 @@
%ul.media-grid %ul.unstyled.ui-box
- @project.users_projects.each do |up| - @project.users_projects.each do |up|
= render(:partial => 'team_members/show', :locals => {:member => up}) = render(:partial => 'team_members/show', :locals => {:member => up})

View file

@ -1,8 +1,15 @@
= render "project_head" = render "project_head"
%h3 %h3
= @project.name = @project.name
%span.right
- if can? current_user, :download_code, @project - if can? current_user, :download_code, @project
= link_to "Download", archive_project_repository_path(@project), :class => "btn small right" = link_to "Download", archive_project_repository_path(@project), :class => "btn small padded"
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
= link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "btn small padded" do
Merge Request
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
= link_to new_project_issue_path(@project), :title => "New Issue", :class => "btn small" do
Issue
.back_link .back_link
= link_to projects_path do = link_to projects_path do
← To projects list ← To projects list

View file

@ -1,12 +1,14 @@
- user = member.user - user = member.user
- allow_admin = can? current_user, :admin_project, @project - allow_admin = can? current_user, :admin_project, @project
%li{:id => dom_id(member), :class => "team_member_row"} %li{:id => dom_id(member), :class => "team_member_row wll"}
.left
= link_to project_team_member_path(@project, member), :title => user.name do = link_to project_team_member_path(@project, member), :title => user.name do
= image_tag gravatar_icon(user.email, 60), :class => "thumbnail" = image_tag gravatar_icon(user.email, 60), :class => "styled_image"
.row .row
.span8 .span8
%h4 %h4
= truncate(user.name, :lenght => 24) = truncate(user.name, :lenght => 24)
%br
%small= truncate user.email, :lenght => 24 %small= truncate user.email, :lenght => 24
.span3 .span3

View file

@ -1,54 +0,0 @@
- 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, 60), :class => "thumbnail", :width => 60
%h4
Hey,
#{truncate current_user.first_name, :lenght => 24}!
%p
- if @project.issues_enabled
%span
Assigned Issues:
= current_user.assigned_issues.opened.count
%br
- if @project.merge_requests_enabled
%span
Assigned Requests:
= current_user.assigned_merge_requests.opened.count
%br
%br
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
= link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "btn small padded" do
Merge Request
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
= 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
= "Member Card »"
-#- 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 »

View file

@ -1,11 +0,0 @@
- 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_holder
= link_to "Projects » ", projects_path