|
|
|
@@ -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> |