Commit 936d4e80 authored by Camil Staps's avatar Camil Staps

Add starring date to overview of starrers

parent 71fd79c8
......@@ -95,7 +95,11 @@
}
}
.card-body .user {
color: $gl-text-color;
font-weight: $gl-font-weight-bold;
.card-body .user-info {
float: left;
.user {
color: $gl-text-color;
font-weight: $gl-font-weight-bold;
}
}
......@@ -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
- 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)
......@@ -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: 'shared/users/usercell', collection: @starrers, as: :user
= render partial: 'starrer', collection: @starrers, as: :user
- 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")
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