Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop

This commit is contained in:
2024-05-07 14:08:56 +08:00
18 changed files with 53 additions and 21 deletions

View File

@@ -14,7 +14,7 @@
<label>
建站工具 <span class="ml10 color-orange mr20">*</span>
</label>
<% state_options = [['hugo', "hugo"], ['jeklly', "jeklly"],['hexo',"hexo"]] %>
<% state_options = [['hugo', "hugo"], ['jeklly', "jeklly"],['hexo',"hexo"],['files',"files"]] %>
<%= select_tag('page_theme[language_frame]', options_for_select(state_options), class: 'form-control') %>
</div>
<% end%>

View File

@@ -6,7 +6,7 @@
<%= form_tag(admins_page_themes_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
<div class="form-group mr-2">
<label for="language_frame">建站工具:</label>
<% state_options = [['全部',nil], ['hugo', 0], ['jeklly', 1],['hexo',2]] %>
<% state_options = [['全部',nil], ['hugo', 0], ['jeklly', 1],['hexo',2],['files',3]] %>
<%= select_tag(:language_frame, options_for_select(state_options), class: 'form-control') %>
</div>
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>

View File

@@ -4,7 +4,7 @@
<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 %>
<%= text_field_tag(:search, params[:search], class: 'form-control col-12 col-md-2 mr-3', placeholder: '项目名称检索') %>
<%= 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="清空"/>
<% end %>

View File

@@ -36,7 +36,8 @@ json.setting do
json.subject_banner_url default_setting.subject_banner_url&.[](1..-1)
json.course_banner_url default_setting.course_banner_url&.[](1..-1)
json.competition_banner_url default_setting.competition_banner_url&.[](1..-1)
json.competition_banner_url EduSetting.get("competition_banner_url").to_s
json.competition_banner_href EduSetting.get("competition_banner_href").to_s
json.moop_cases_banner_url default_setting.moop_cases_banner_url&.[](1..-1)
json.oj_banner_url default_setting.oj_banner_url&.[](1..-1)

View File

@@ -16,6 +16,12 @@ json.user_login user&.login
json.image_url user.present? ? url_to_avatar(user) : ""
json.attachments do
json.array! version.try(:attachments) do |attachment|
json.partial! "attachments/attachment_simple", locals: {attachment: attachment}
# json.partial! "attachments/attachment_simple", locals: {attachment: attachment}
json.id attachment.id
json.title attachment.title
json.filesize number_to_human_size attachment.filesize
json.description attachment.description
json.is_pdf attachment.is_pdf?
json.url "/#{@owner.login}/#{@repository.identifier}/releases/download/#{version&.tag_name}/#{attachment.filename}"
end
end