Browse Source

change public to static_file

pull/347/head
呱呱呱 2 years ago
parent
commit
d5fb8587ee
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      app/models/page.rb
  2. +1
    -1
      app/models/page_theme.rb
  3. +1
    -1
      app/views/admins/page_themes/_form_modal.html.erb

+ 1
- 1
app/models/page.rb View File

@@ -28,7 +28,7 @@ class Page < ApplicationRecord
belongs_to :project

# language_frame 前端语言框架
enum language_frame: { hugo: 0, jekyll: 1, hexo: 2, public: 3}
enum language_frame: { hugo: 0, jekyll: 1, hexo: 2, static_file: 3}
after_create do
PageService.genernate_user(user_id)


+ 1
- 1
app/models/page_theme.rb View File

@@ -13,7 +13,7 @@
#

class PageTheme < ApplicationRecord
enum language_frame: { hugo: 0, jeklly: 1, hexo: 2}
enum language_frame: { hugo: 0, jeklly: 1, hexo: 2, static_file:3}
validates :name, presence: {message: "主题名不能为空"}, uniqueness: {message: "主题名已存在",scope: :language_frame},length: {maximum: 255}

def image


+ 1
- 1
app/views/admins/page_themes/_form_modal.html.erb View File

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


Loading…
Cancel
Save