mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Add design page
This commit is contained in:
parent
1b7fcf804d
commit
ed2a54229a
4 changed files with 25 additions and 0 deletions
4
app/controllers/design_elements_controller.rb
Normal file
4
app/controllers/design_elements_controller.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
class DesignElementsController < ApplicationController
|
||||
def index
|
||||
end
|
||||
end
|
17
app/javascript/vue/shared/modal_mixin.js
Normal file
17
app/javascript/vue/shared/modal_mixin.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
export default {
|
||||
mounted() {
|
||||
$(this.$refs.modal).modal('show');
|
||||
$(this.$refs.modal).on('hidden.bs.modal', () => {
|
||||
this.$emit('close');
|
||||
});
|
||||
},
|
||||
beforeUnmount() {
|
||||
$(this.$refs.modal).modal('hide');
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('close');
|
||||
$(this.$refs.modal).modal('hide');
|
||||
}
|
||||
},
|
||||
}
|
0
app/views/design_elements/index.html.erb
Normal file
0
app/views/design_elements/index.html.erb
Normal file
|
@ -1018,4 +1018,8 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
resources :gene_sequence_assets, only: %i(new create edit update)
|
||||
|
||||
if Rails.env.development? || ENV['ENABLE_DESIGN_ELEMENTS'] == 'true'
|
||||
resources :design_elements, only: %i(index)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue