Merge branch 'standalone_develop' into trustie_server
This commit is contained in:
commit
f80a33c9df
|
@ -20,6 +20,7 @@ class Users::ProjectService
|
|||
|
||||
projects = category_filter(projects)
|
||||
projects = status_filter(projects)
|
||||
projects = by_project_topic(projects)
|
||||
|
||||
custom_sort(projects, params[:sort_by], params[:sort_direction])
|
||||
end
|
||||
|
@ -45,6 +46,14 @@ class Users::ProjectService
|
|||
end
|
||||
end
|
||||
|
||||
def by_project_topic(items)
|
||||
if params[:topic_name].present?
|
||||
items.with_project_topic_name(params[:topic_name].to_s.split(","))
|
||||
else
|
||||
items.with_project_topic(params[:topic_id])
|
||||
end
|
||||
end
|
||||
|
||||
def self_or_admin?
|
||||
User.current.id == user.id || User.current.admin?
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue