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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
936d4e80
Commit
936d4e80
authored
Jan 27, 2019
by
Camil Staps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add starring date to overview of starrers
parent
71fd79c8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
17 deletions
+31
-17
app/assets/stylesheets/pages/users.scss
app/assets/stylesheets/pages/users.scss
+7
-3
app/controllers/projects/starrers_controller.rb
app/controllers/projects/starrers_controller.rb
+4
-1
app/views/projects/starrers/_starrer.html.haml
app/views/projects/starrers/_starrer.html.haml
+19
-0
app/views/projects/starrers/index.html.haml
app/views/projects/starrers/index.html.haml
+1
-1
app/views/shared/users/_usercell.html.haml
app/views/shared/users/_usercell.html.haml
+0
-12
No files found.
app/assets/stylesheets/pages/users.scss
View file @
936d4e80
...
...
@@ -95,7 +95,11 @@
}
}
.card-body
.user
{
.card-body
.user-info
{
float
:
left
;
.user
{
color
:
$gl-text-color
;
font-weight
:
$gl-font-weight-bold
;
}
}
app/controllers/projects/starrers_controller.rb
View file @
936d4e80
...
...
@@ -2,16 +2,19 @@
class
Projects::StarrersController
<
Projects
::
ApplicationController
include
SortingHelper
#
# Authorize
before_action
:require_non_empty_project
# rubocop: disable CodeReuse/ActiveRecord
def
index
@sort
=
params
[
:sort
].
presence
||
sort_value_name
params
[
:has_starred
]
=
@project
@starrers
=
UsersFinder
.
new
(
current_user
,
params
).
execute
@starrers
=
@starrers
.
joins
(
:users_star_projects
).
select
(
'"users".*, "users_star_projects"."created_at" as "starred_since"'
)
@starrers
=
@starrers
.
sort_by_attribute
(
@sort
)
end
# rubocop: enable CodeReuse/ActiveRecord
end
app/views/projects/starrers/_starrer.html.haml
0 → 100644
View file @
936d4e80
-
user
=
local_assigns
.
fetch
(
:user
)
.col-lg-3.col-md-4.col-sm-12
.card
.card-body
=
image_tag
avatar_icon_for_user
(
user
,
40
),
class:
"avatar s40"
,
alt:
''
.user-info
.block-truncated
=
link_to
user
.
name
,
user_path
(
user
),
class:
'user js-user-link'
,
data:
{
user_id:
user
.
id
}
.block-truncated
%span
.cgray
=
user
.
to_reference
-
if
user
==
current_user
%span
.badge.badge-success.prepend-left-5
=
_
(
"It's you"
)
.block-truncated
=
time_ago_with_tooltip
(
user
.
starred_since
)
app/views/projects/starrers/index.html.haml
View file @
936d4e80
...
...
@@ -22,4 +22,4 @@
=
link_to
filter_user_path
(
sort:
value
),
class:
(
"is-active"
if
@sort
==
value
)
do
=
title
.row.prepend-top-10
=
render
partial:
's
hared/users/usercell
'
,
collection:
@starrers
,
as: :user
=
render
partial:
's
tarrer
'
,
collection:
@starrers
,
as: :user
app/views/shared/users/_usercell.html.haml
deleted
100644 → 0
View file @
71fd79c8
-
user
=
local_assigns
.
fetch
(
:user
)
.col-lg-3.col-md-4.col-sm-12
.card
.card-body
=
image_tag
avatar_icon_for_user
(
user
,
40
),
class:
"avatar s40"
,
alt:
''
.block-truncated
=
link_to
user
.
name
,
user_path
(
user
),
class:
'user js-user-link'
,
data:
{
user_id:
user
.
id
}
%span
.cgray
=
user
.
to_reference
-
if
user
==
current_user
%span
.badge.badge-success.prepend-left-5
=
_
(
"It's you"
)
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