Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/assets/builds/tailwind.css

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions app/avo/resources/audio_tour.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
class Avo::Resources::AudioTour < Avo::BaseResource
self.icon = "tabler/outline/headphones"
self.title = :display_title
self.includes = [ :location ]
self.find_record_method = -> { id.is_a?(Array) ? query.where(uuid: id) : query.find_by!(uuid: id) }
self.search = {
query: -> { query.joins(:location).where("locations.name ILIKE :q", q: "%#{params[:q]}%") }
}

def fields
field :location, as: :belongs_to, name: I18n.t("admin.audio_tours.place"), searchable: false
field :locale, as: :select, name: I18n.t("admin.audio_tours.language"),
options: -> { ::AudioTour::SUPPORTED_LOCALES.to_h { |code, name| [ name, code.to_s ] } }
field :audio_file, as: :file, name: I18n.t("admin.audio_tours.audio"), accept: "audio/*"
field :script, as: :textarea, name: I18n.t("admin.audio_tours.script"), rows: 16, hide_on: :index
field :duration, as: :text, hide_on: :index
field :voice_id, as: :text, hide_on: :index
field :tts_provider, as: :text, hide_on: :index
field :word_count, as: :number, readonly: true, hide_on: :forms
end
end
3 changes: 3 additions & 0 deletions app/controllers/avo/audio_tours_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Avo::AudioToursController < Avo::ResourcesController
include AdminResource
end
72 changes: 0 additions & 72 deletions app/controllers/curator/admin/content_changes_controller.rb

This file was deleted.

128 changes: 0 additions & 128 deletions app/controllers/curator/audio_tours_controller.rb

This file was deleted.

11 changes: 0 additions & 11 deletions app/controllers/curator/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,5 @@ def record_activity(action, recordable: nil, metadata: {})
current_user.increment_activity_count!
current_user.check_spam_activity!
end

# Find pending proposal for a resource (for display on show/edit pages)
def pending_proposal_for(resource)
return nil unless resource.present?

ContentChange.pending.find_by(
changeable_type: resource.class.name,
changeable_id: resource.id
)
end
helper_method :pending_proposal_for
end
end
3 changes: 0 additions & 3 deletions app/controllers/curator/dashboard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ def index
@recent_activities = CuratorActivity.includes(:user, :recordable)
.recent
.limit(10)

# Pending proposals count for the badge
@pending_proposals_count = ContentChange.pending.count
end

private
Expand Down
141 changes: 0 additions & 141 deletions app/controllers/curator/experiences_controller.rb

This file was deleted.

Loading
Loading