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
Boxiang Sun
gitlab-ce
Commits
14394e8b
Commit
14394e8b
authored
Jan 15, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pulls in all user projects
parent
90400104
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+8
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+5
-8
No files found.
app/assets/stylesheets/framework/header.scss
View file @
14394e8b
...
...
@@ -92,8 +92,16 @@ header {
display
:
inline-block
;
}
.dropdown-menu
{
max-height
:
300px
;
overflow
:
auto
;
}
.dropdown-toggle-caret
{
position
:
relative
;
top
:
-2px
;
margin-left
:
5px
;
font-size
:
10px
;
}
.dropdown-item
{
...
...
app/helpers/projects_helper.rb
View file @
14394e8b
...
...
@@ -54,22 +54,19 @@ module ProjectsHelper
link_to
(
simple_sanitize
(
owner
.
name
),
user_path
(
owner
))
end
all_projects
=
if
project
.
group
project
.
group
.
projects
else
PersonalProjectsFinder
.
new
(
project
.
namespace
.
owner
).
execute
(
current_user
)
end
all_projects
=
current_user
.
authorized_projects
.
sorted_by_activity
.
non_archived
project_link
=
content_tag
:div
,
{
class:
"dropdown"
}
do
output
=
content_tag
:a
,
{
class:
"dropdown-toggle"
,
href:
"#"
,
data:
{
toggle:
"dropdown"
}}
do
btnOutput
=
simple_sanitize
(
project
.
name
)
btnOutput
+=
content_tag
:span
,
nil
,
{
class:
"
caret
dropdown-toggle-caret"
}
btnOutput
+=
content_tag
:span
,
nil
,
{
class:
"
fa fa-chevron-down
dropdown-toggle-caret"
}
end
list
=
all_projects
.
map
do
|
project
|
content_tag
:li
,
{
class:
"dropdown-item
#{
"active"
if
project_id
==
project
.
id
}
"
}
do
link_to
(
simple_sanitize
(
project
.
name
),
project_path
(
project
),
{
class:
"dropdown-link"
})
link_to
project_path
(
project
),
{
class:
"dropdown-link"
}
do
project
.
owner
.
name
+
' / '
+
simple_sanitize
(
project
.
name
)
end
end
end
...
...
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