mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
新增:后台管理项目列表项目类别筛选
This commit is contained in:
@@ -3,10 +3,15 @@
|
||||
<% end %>
|
||||
|
||||
<div class="box search-form-container project-list-form">
|
||||
<%= form_tag(admins_projects_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
|
||||
<%= form_tag(admins_projects_path, method: :get, class: 'form-inline search-form flex-1', id: 'project-list-form', remote: true) do %>
|
||||
<%= text_field_tag(:search, params[:search], class: 'form-control col-12 col-md-2 mr-3', placeholder: '项目名称/标识检索') %>
|
||||
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
|
||||
<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']] %>
|
||||
<%= select_tag(:category, options_for_select(type_options, params[:category]), class: 'form-control', id: 'project-category') %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -16,3 +21,9 @@
|
||||
|
||||
<div id="projects-modals">
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$("#project-category").on('change', function() {
|
||||
$("#project-list-form").submit()
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user