Merge branch 'develop' into standalone_develop

This commit is contained in:
yystopf 2022-11-10 11:03:08 +08:00
commit 6dc06fc088
2 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@ class IssueTagsController < ApplicationController
def index
issue_tags = @project.issue_tags.reorder("#{order_name} #{order_type}")
issue_tags = @project.issue_tags.includes(:issues).reorder("issue_tags.#{order_name} #{order_type}")
@user_admin_or_member = current_user.present? && (current_user.admin || @project.member?(current_user))
@page = params[:page] || 1
@limit = params[:limit] || 15

View File

@ -4,6 +4,7 @@ json.user_admin_or_member @user_admin_or_member
json.issue_tags do
json.array! @issue_tags.each.to_a do |tag|
json.extract! tag, :id, :name, :description, :color, :issues_count, :project_id, :gid, :gitea_url
json.extract! tag, :id, :name, :description, :color, :project_id, :gid, :gitea_url
json.issues_count tag.issues_count - tag.issues.closed.size
end
end