diff --git a/app/controllers/tasks/sounds/browse_controller.rb b/app/controllers/tasks/sounds/browse_controller.rb new file mode 100644 index 0000000000..04d9edb752 --- /dev/null +++ b/app/controllers/tasks/sounds/browse_controller.rb @@ -0,0 +1,4 @@ +class Tasks::Sounds::BrowseController < ApplicationController + include TaskControllerConfiguration + +end \ No newline at end of file diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 5603d109dd..1c162dbfcc 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -117,3 +117,4 @@ import '../vue/tasks/unify/objects/main.js' import '../vue/tasks/images/new_filename_depicting_image/main.js' import '../vue/tasks/biological_associations/new/main.js' import '../vue/tasks/otus/duplicates/main.js' +import '../vue/tasks/sounds/browse/main.js' \ No newline at end of file diff --git a/app/javascript/vue/routes/endpoints/Sound.js b/app/javascript/vue/routes/endpoints/Sound.js new file mode 100644 index 0000000000..0890215359 --- /dev/null +++ b/app/javascript/vue/routes/endpoints/Sound.js @@ -0,0 +1,12 @@ +import baseCRUD from './base' + +const permitParams = { + sound: { + name: Number, + sound_file: String + } +} + +export const Sound = { + ...baseCRUD('sounds', permitParams) +} diff --git a/app/javascript/vue/routes/endpoints/index.js b/app/javascript/vue/routes/endpoints/index.js index 463dc80697..a48cfdb24c 100644 --- a/app/javascript/vue/routes/endpoints/index.js +++ b/app/javascript/vue/routes/endpoints/index.js @@ -58,6 +58,7 @@ export { ProtocolRelationship } from './ProtocolRelationship' export { Repository } from './Repository' export { Serial } from './Serial' export { SoftValidation } from './SoftValidation' +export { Sound } from './Sound' export { Source } from './Source' export { SqedDepiction } from './SqedDepiction' export { Tag } from './Tag' diff --git a/app/javascript/vue/tasks/sounds/browse/App.vue b/app/javascript/vue/tasks/sounds/browse/App.vue new file mode 100644 index 0000000000..45d89e788a --- /dev/null +++ b/app/javascript/vue/tasks/sounds/browse/App.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/javascript/vue/tasks/sounds/browse/components/SoundList.vue b/app/javascript/vue/tasks/sounds/browse/components/SoundList.vue new file mode 100644 index 0000000000..2c7eea5d7b --- /dev/null +++ b/app/javascript/vue/tasks/sounds/browse/components/SoundList.vue @@ -0,0 +1,26 @@ + + + diff --git a/app/javascript/vue/tasks/sounds/browse/main.js b/app/javascript/vue/tasks/sounds/browse/main.js new file mode 100644 index 0000000000..83ca61902b --- /dev/null +++ b/app/javascript/vue/tasks/sounds/browse/main.js @@ -0,0 +1,16 @@ +import { createApp } from 'vue' +import App from './App.vue' + +function initApp(element) { + const app = createApp(App) + + app.mount(element) +} + +document.addEventListener('turbolinks:load', () => { + const el = document.querySelector('#vue-browse-sound') + + if (el) { + initApp(el) + } +}) diff --git a/app/views/tasks/sounds/browse/index.html.erb b/app/views/tasks/sounds/browse/index.html.erb new file mode 100644 index 0000000000..78296dfae1 --- /dev/null +++ b/app/views/tasks/sounds/browse/index.html.erb @@ -0,0 +1 @@ +
diff --git a/config/interface/hub/user_tasks.yml b/config/interface/hub/user_tasks.yml index 25ed0454a3..f8665ebbf7 100644 --- a/config/interface/hub/user_tasks.yml +++ b/config/interface/hub/user_tasks.yml @@ -1006,3 +1006,10 @@ summarize_projects_controlled_vocabulary_terms_task: categories: status: prototype description: 'Visualize controlled vocabulary terms across the projects you are a member of.' +browse_sounds_task: + hub: true + name: 'Browse sounds' + related: + categories: + status: prototype + description: 'TODO: Task description' diff --git a/config/routes/tasks.rb b/config/routes/tasks.rb index 0931b8ca33..32ca72aaca 100644 --- a/config/routes/tasks.rb +++ b/config/routes/tasks.rb @@ -1,4 +1,10 @@ scope :tasks do + scope :sounds do + scope :browse, controller: 'tasks/sounds/browse' do + get '/', action: :index, as: 'browse_sounds_task' + end + end + scope :controlled_vocabulary_terms do scope :projects_summary, controller: 'tasks/controlled_vocabulary_terms/projects_summary' do get '/', action: :index, as: 'summarize_projects_controlled_vocabulary_terms_task'