forked from Gitlink/forgeplus
后台项目增加镜像项目查询
This commit is contained in:
parent
6584b69dc1
commit
6f7aad06c6
|
|
@ -16,6 +16,8 @@ class Admins::ProjectsController < Admins::BaseController
|
|||
projects = projects.where.not(forked_from_project_id: nil)
|
||||
when 'original'
|
||||
projects = projects.where(forked_from_project_id: nil, project_type: 'common')
|
||||
when 'mirror'
|
||||
projects = projects.where(project_type: 'mirror')
|
||||
end
|
||||
@projects = paginate projects.includes(:owner, :members, :issues, :versions, :attachments, :project_score)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<input type="reset" class="btn btn-secondary clear-btn" value="清空"/>
|
||||
<div class="form-group mr-2 pull-right" style='margin-left:auto'>
|
||||
<label for="status">项目类别:</label>
|
||||
<% type_options = [['全部项目', ''], ['公开项目', 'public'], ['私有项目', 'private'], ['Fork项目', 'fork'], ['原创项目', 'original']] %>
|
||||
<% type_options = [['全部项目', ''], ['公开项目', 'public'], ['私有项目', 'private'], ['Fork项目', 'fork'], ['原创项目', 'original'], ['镜像项目', 'mirror']] %>
|
||||
<%= select_tag(:category, options_for_select(type_options, params[:category]), class: 'form-control', id: 'project-category') %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Reference in New Issue