Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
3ebbed25
Commit
3ebbed25
authored
Aug 10, 2015
by
Artem Sidorenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow listing of archived projects
Resolves #9285
parent
3659d3b5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
1 deletion
+9
-1
CHANGELOG
CHANGELOG
+1
-0
app/controllers/admin/projects_controller.rb
app/controllers/admin/projects_controller.rb
+1
-0
app/controllers/explore/projects_controller.rb
app/controllers/explore/projects_controller.rb
+2
-0
app/models/project.rb
app/models/project.rb
+1
-1
app/views/admin/projects/index.html.haml
app/views/admin/projects/index.html.haml
+4
-0
No files found.
CHANGELOG
View file @
3ebbed25
...
@@ -5,6 +5,7 @@ v 8.0.0 (unreleased)
...
@@ -5,6 +5,7 @@ v 8.0.0 (unreleased)
- Better performance for web editor (switched from satellites to rugged)
- Better performance for web editor (switched from satellites to rugged)
- Faster merge
- Faster merge
- Ability to fetch merge requests from refs/merge-requests/:id
- Ability to fetch merge requests from refs/merge-requests/:id
- Allow displaying of archived projects in the admin interface (Artem Sidorenko)
v 7.14.0 (unreleased)
v 7.14.0 (unreleased)
- Update default robots.txt rules to disallow crawling of irrelevant pages (Ben Bodenmiller)
- Update default robots.txt rules to disallow crawling of irrelevant pages (Ben Bodenmiller)
...
...
app/controllers/admin/projects_controller.rb
View file @
3ebbed25
...
@@ -9,6 +9,7 @@ class Admin::ProjectsController < Admin::ApplicationController
...
@@ -9,6 +9,7 @@ class Admin::ProjectsController < Admin::ApplicationController
@projects
=
@projects
.
where
(
"visibility_level IN (?)"
,
params
[
:visibility_levels
])
if
params
[
:visibility_levels
].
present?
@projects
=
@projects
.
where
(
"visibility_level IN (?)"
,
params
[
:visibility_levels
])
if
params
[
:visibility_levels
].
present?
@projects
=
@projects
.
with_push
if
params
[
:with_push
].
present?
@projects
=
@projects
.
with_push
if
params
[
:with_push
].
present?
@projects
=
@projects
.
abandoned
if
params
[
:abandoned
].
present?
@projects
=
@projects
.
abandoned
if
params
[
:abandoned
].
present?
@projects
=
@projects
.
non_archived
unless
params
[
:with_archived
].
present?
@projects
=
@projects
.
search
(
params
[
:name
])
if
params
[
:name
].
present?
@projects
=
@projects
.
search
(
params
[
:name
])
if
params
[
:name
].
present?
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
includes
(
:namespace
).
order
(
"namespaces.path, projects.name ASC"
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
@projects
=
@projects
.
includes
(
:namespace
).
order
(
"namespaces.path, projects.name ASC"
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
...
...
app/controllers/explore/projects_controller.rb
View file @
3ebbed25
...
@@ -7,6 +7,7 @@ class Explore::ProjectsController < Explore::ApplicationController
...
@@ -7,6 +7,7 @@ class Explore::ProjectsController < Explore::ApplicationController
@tags
=
@projects
.
tags_on
(
:tags
)
@tags
=
@projects
.
tags_on
(
:tags
)
@projects
=
@projects
.
tagged_with
(
params
[
:tag
])
if
params
[
:tag
].
present?
@projects
=
@projects
.
tagged_with
(
params
[
:tag
])
if
params
[
:tag
].
present?
@projects
=
@projects
.
where
(
visibility_level:
params
[
:visibility_level
])
if
params
[
:visibility_level
].
present?
@projects
=
@projects
.
where
(
visibility_level:
params
[
:visibility_level
])
if
params
[
:visibility_level
].
present?
@projects
=
@projects
.
non_archived
@projects
=
@projects
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@projects
=
@projects
.
search
(
params
[
:search
])
if
params
[
:search
].
present?
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
sort
(
@sort
=
params
[
:sort
])
@projects
=
@projects
.
includes
(
:namespace
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
@projects
=
@projects
.
includes
(
:namespace
).
page
(
params
[
:page
]).
per
(
PER_PAGE
)
...
@@ -14,6 +15,7 @@ class Explore::ProjectsController < Explore::ApplicationController
...
@@ -14,6 +15,7 @@ class Explore::ProjectsController < Explore::ApplicationController
def
trending
def
trending
@trending_projects
=
TrendingProjectsFinder
.
new
.
execute
(
current_user
)
@trending_projects
=
TrendingProjectsFinder
.
new
.
execute
(
current_user
)
@trending_projects
=
@trending_projects
.
non_archived
@trending_projects
=
@trending_projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
@trending_projects
=
@trending_projects
.
page
(
params
[
:page
]).
per
(
PER_PAGE
)
end
end
...
...
app/models/project.rb
View file @
3ebbed25
...
@@ -215,7 +215,7 @@ class Project < ActiveRecord::Base
...
@@ -215,7 +215,7 @@ class Project < ActiveRecord::Base
end
end
def
search
(
query
)
def
search
(
query
)
joins
(
:namespace
).
where
(
'projects.archived = ?'
,
false
).
joins
(
:namespace
).
where
(
'LOWER(projects.name) LIKE :query OR
where
(
'LOWER(projects.name) LIKE :query OR
LOWER(projects.path) LIKE :query OR
LOWER(projects.path) LIKE :query OR
LOWER(namespaces.name) LIKE :query OR
LOWER(namespaces.name) LIKE :query OR
...
...
app/views/admin/projects/index.html.haml
View file @
3ebbed25
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
=
label_tag
:abandoned
do
=
label_tag
:abandoned
do
=
check_box_tag
:abandoned
,
1
,
params
[
:abandoned
]
=
check_box_tag
:abandoned
,
1
,
params
[
:abandoned
]
%span
No activity over 6 month
%span
No activity over 6 month
.checkbox
=
label_tag
:with_archived
do
=
check_box_tag
:with_archived
,
1
,
params
[
:with_archived
]
%span
Show archived projects
%fieldset
%fieldset
%strong
Visibility level:
%strong
Visibility level:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment