Merge remote-tracking branch 'origin/standalone_develop' into standalone_develop
This commit is contained in:
commit
63db6624e1
|
@ -28,7 +28,7 @@ class Page < ApplicationRecord
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
|
||||||
# language_frame 前端语言框架
|
# language_frame 前端语言框架
|
||||||
enum language_frame: { hugo: 0, jekyll: 1, hexo: 2}
|
enum language_frame: { hugo: 0, jekyll: 1, hexo: 2, files: 3}
|
||||||
|
|
||||||
after_create do
|
after_create do
|
||||||
PageService.genernate_user(user_id)
|
PageService.genernate_user(user_id)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
class PageTheme < ApplicationRecord
|
class PageTheme < ApplicationRecord
|
||||||
enum language_frame: { hugo: 0, jeklly: 1, hexo: 2}
|
enum language_frame: { hugo: 0, jeklly: 1, hexo: 2, files:3}
|
||||||
validates :name, presence: {message: "主题名不能为空"}, uniqueness: {message: "主题名已存在",scope: :language_frame},length: {maximum: 255}
|
validates :name, presence: {message: "主题名不能为空"}, uniqueness: {message: "主题名已存在",scope: :language_frame},length: {maximum: 255}
|
||||||
|
|
||||||
def image
|
def image
|
||||||
|
|
|
@ -47,7 +47,7 @@ class PageService
|
||||||
repo_link = project.repository.url
|
repo_link = project.repository.url
|
||||||
repo = project.repository.identifier
|
repo = project.repository.identifier
|
||||||
branch = branch
|
branch = branch
|
||||||
script_path =page.build_script_path
|
script_path = branch == "gh-pages" ? "files_build" : page.build_script_path
|
||||||
if script_path.present?
|
if script_path.present?
|
||||||
uri = URI.parse("http://gitlink.#{@deploy_domain}/gitlink_execute_script?key=#{@deploy_key}&script_path=#{script_path}&project_dir=#{project_dir}&repo=#{repo}&repo_link=#{repo_link}&branch=#{branch}&owner=#{owner}")
|
uri = URI.parse("http://gitlink.#{@deploy_domain}/gitlink_execute_script?key=#{@deploy_key}&script_path=#{script_path}&project_dir=#{project_dir}&repo=#{repo}&repo_link=#{repo_link}&branch=#{branch}&owner=#{owner}")
|
||||||
response = Net::HTTP.get_response(uri)
|
response = Net::HTTP.get_response(uri)
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<label>
|
<label>
|
||||||
建站工具 <span class="ml10 color-orange mr20">*</span>
|
建站工具 <span class="ml10 color-orange mr20">*</span>
|
||||||
</label>
|
</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') %>
|
<%= select_tag('page_theme[language_frame]', options_for_select(state_options), class: 'form-control') %>
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<%= form_tag(admins_page_themes_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
|
<%= form_tag(admins_page_themes_path, method: :get, class: 'form-inline search-form flex-1', remote: true) do %>
|
||||||
<div class="form-group mr-2">
|
<div class="form-group mr-2">
|
||||||
<label for="language_frame">建站工具:</label>
|
<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') %>
|
<%= select_tag(:language_frame, options_for_select(state_options), class: 'form-control') %>
|
||||||
</div>
|
</div>
|
||||||
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
|
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
|
||||||
|
|
Loading…
Reference in New Issue