Commit 0414b2ae authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Remove projects page from dashboard

parent 83f7e98d
...@@ -23,28 +23,6 @@ class DashboardController < ApplicationController ...@@ -23,28 +23,6 @@ class DashboardController < ApplicationController
end end
end end
def projects
@projects = case params[:scope]
when 'personal' then
current_user.namespace.projects
when 'joined' then
current_user.authorized_projects.joined(current_user)
when 'owned' then
current_user.owned_projects
else
current_user.authorized_projects
end
@projects = @projects.where(namespace_id: Group.find_by(name: params[:group])) if params[:group].present?
@projects = @projects.includes(:namespace, :forked_from_project, :tags)
@projects = @projects.tagged_with(params[:tag]) if params[:tag].present?
@projects = @projects.sort(@sort = params[:sort])
@projects = @projects.page(params[:page]).per(30)
@tags = current_user.authorized_projects.tags_on(:tags)
@groups = current_user.authorized_groups
end
def merge_requests def merge_requests
@merge_requests = get_merge_requests_collection @merge_requests = get_merge_requests_collection
@merge_requests = @merge_requests.page(params[:page]).per(20) @merge_requests = @merge_requests.page(params[:page]).per(20)
......
%h3.page-title
My Projects
= link_to new_project_path, class: "btn btn-new pull-right" do
%i.fa.fa-plus
New Project
%p.light
All projects you have access to are listed here. Public projects are not included here unless you are a member
%hr
.side-filters
= render "projects_filter"
.dash-projects
%ul.bordered-list.my-projects.top-list
- @projects.each do |project|
%li.my-project-row
%h4.project-title
.pull-left
= project_icon(project, alt: '', class: 'avatar project-avatar s60')
.project-access-icon
= visibility_level_icon(project.visibility_level)
= link_to project_path(project), class: dom_class(project) do
%strong= project.name_with_namespace
- if project.forked_from_project
&nbsp;
%small
%i.fa.fa-code-fork
Forked from:
= link_to project.forked_from_project.name_with_namespace, namespace_project_path(project.namespace, project.forked_from_project)
- if current_user.can_leave_project?(project)
.pull-right
= link_to leave_namespace_project_team_members_path(project.namespace, project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do
%i.fa.fa-sign-out
Leave
.project-info
.pull-right
- if project.archived?
%span.label
%i.fa.fa-archive
Archived
- project.tags.each do |tag|
%span.label.label-info
%i.fa.fa-tag
= tag.name
- if project.description.present?
%p= truncate project.description, length: 100
.last-activity
%span.light Last activity:
%span.date= project_last_activity(project)
- if @projects.blank?
%li
.nothing-here-block There are no projects here.
.bottom
= paginate @projects, theme: "gitlab"
...@@ -2,11 +2,6 @@ ...@@ -2,11 +2,6 @@
= nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do = nav_link(path: 'dashboard#show', html_options: {class: 'home'}) do
= link_to root_path, title: 'Home', class: 'shortcuts-activity' do = link_to root_path, title: 'Home', class: 'shortcuts-activity' do
%i.fa.fa-dashboard %i.fa.fa-dashboard
%span
Activity
= nav_link(path: 'dashboard#projects') do
= link_to projects_dashboard_path, title: 'Projects', class: 'shortcuts-projects' do
%i.fa.fa-cube
%span %span
Projects Projects
= nav_link(path: 'projects#starred') do = nav_link(path: 'projects#starred') do
......
...@@ -208,7 +208,6 @@ Gitlab::Application.routes.draw do ...@@ -208,7 +208,6 @@ Gitlab::Application.routes.draw do
# #
resource :dashboard, controller: 'dashboard', only: [:show] do resource :dashboard, controller: 'dashboard', only: [:show] do
member do member do
get :projects
get :issues get :issues
get :merge_requests get :merge_requests
end end
......
@dashboard
Feature: Dashboard Projects
Background:
Given I sign in as a user
And I own project "Shop"
And I visit dashboard projects page
Scenario: I should see projects list
Then I should see projects list
class Spinach::Features::DashboardProjects < Spinach::FeatureSteps
include SharedAuthentication
include SharedPaths
include SharedProject
step 'I should see projects list' do
@user.authorized_projects.all.each do |project|
page.should have_link project.name_with_namespace
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment