From 4c722f858a12918b8b8a41a2ed74b30668c05db4 Mon Sep 17 00:00:00 2001 From: Miguel Michelson Date: Tue, 6 Aug 2024 01:06:57 -0400 Subject: [PATCH] podcaster info site --- .DS_Store | Bin 10244 -> 10244 bytes .../stylesheets/application.tailwind.css | 13 +- app/controllers/application_controller.rb | 4 + app/controllers/podcasts_controller.rb | 31 +- app/controllers/tracks_controller.rb | 1 + app/controllers/user_settings_controller.rb | 7 +- app/helpers/application_helper.rb | 2 + app/helpers/tailwind_form_builder.rb | 10 + app/models/podcaster_info.rb | 34 ++ app/models/track.rb | 2 + app/models/user.rb | 1 + app/validators/url_validator.rb | 19 + app/views/articles/_article_highlights.erb | 2 +- .../articles/_categories_section.html.erb | 2 +- app/views/articles/index.html.erb | 2 +- app/views/events/index.html.erb | 4 +- app/views/layouts/application.html.erb | 7 +- app/views/podcasts/_footer.html.erb | 6 +- app/views/podcasts/_graph_icon.erb | 119 +++++ app/views/podcasts/_header.erb | 97 ++++ app/views/podcasts/_podcast.erb | 82 +++- app/views/podcasts/_podcast_icons.erb | 19 + app/views/podcasts/about.erb | 34 ++ app/views/podcasts/edit.html.erb | 13 - app/views/podcasts/index.html.erb | 464 ++---------------- app/views/podcasts/index.rss.builder | 31 ++ app/views/podcasts/show.html.erb | 216 +------- app/views/tracks/_form.html.erb | 10 +- app/views/tracks/_track_item.html.erb | 2 +- app/views/user_settings/_podcast_form.erb | 42 ++ .../user_settings/_profile_form.html.erb | 2 +- app/views/user_settings/index.html.erb | 23 +- config/locales/en.yml | 10 +- config/locales/es.yml | 2 + config/routes.rb | 8 +- .../20240728040213_add_podcast_to_tracks.rb | 5 + ...40806030744_add_data_to_podcaster_infos.rb | 5 + db/schema.rb | 4 +- 38 files changed, 623 insertions(+), 712 deletions(-) create mode 100644 app/validators/url_validator.rb create mode 100644 app/views/podcasts/_graph_icon.erb create mode 100644 app/views/podcasts/_header.erb create mode 100644 app/views/podcasts/_podcast_icons.erb create mode 100644 app/views/podcasts/about.erb delete mode 100644 app/views/podcasts/edit.html.erb create mode 100644 app/views/podcasts/index.rss.builder create mode 100644 app/views/user_settings/_podcast_form.erb create mode 100644 db/migrate/20240728040213_add_podcast_to_tracks.rb create mode 100644 db/migrate/20240806030744_add_data_to_podcaster_infos.rb diff --git a/.DS_Store b/.DS_Store index 7cdede6ae4b17db28dcc02fdf7749d70fe906b14..d3c41a4272445bfbc729fcec535a2c0cb835fd0c 100644 GIT binary patch delta 62 zcmZn(XbG6$C7U^hRb%4Qw`UPft7h9rhWhGd3phGK>iAS<0AH7%t$IVnFsXS1l_ RWxmbq3cpx3KN4YP1^^ZB5zqht delta 37 tcmZn(XbG6$gHU^hRb@@5_ZUdGK9g6H`rHpp*gSNO%USwWPU835%b3r7F| diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index aedcbfb..0822877 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -208,12 +208,12 @@ } textarea { - @apply block w-full rounded-md border-0 py-1.5 dark:bg-gray-900 dark:text-gray-100 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6; + @apply block w-full rounded-md border-0 py-1.5 bg-muted text-default shadow-sm ring-1 ring-inset ring-subtle placeholder:text-subtle focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6; } .select, select { - @apply block w-full rounded-md border-0 px-3 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-brand-600 sm:text-sm sm:leading-6; + @apply block w-full rounded-md border-0 px-3 pl-3 pr-10 text-default ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-brand-600 sm:text-sm sm:leading-6; } label { @@ -221,22 +221,23 @@ } input[type="number"] { - @apply block w-full rounded-md border-0 px-3 pl-3 dark:bg-gray-900 dark:text-gray-100 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-brand-600 sm:text-sm sm:leading-6; + @apply block w-full rounded-md border-0 py-1.5 bg-muted text-default shadow-sm ring-1 ring-inset ring-subtle placeholder:text-subtle focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6; } input[type="date"], input[type="datetime-local"] { - @apply block w-full rounded-md border-0 px-3 pl-3 pr-10 dark:bg-gray-900 dark:text-gray-100 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-brand-600 sm:text-sm sm:leading-6; + @apply block w-full rounded-md border-0 py-1.5 bg-muted text-default shadow-sm ring-1 ring-inset ring-subtle placeholder:text-subtle focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6; } input[type="text"], + input[type="url"], input[type="email"], input[type="password"] { - @apply block w-full rounded-md border-0 px-3 pl-3 pr-10 dark:bg-gray-900 dark:text-gray-100 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-brand-600 sm:text-sm sm:leading-6; + @apply block w-full rounded-md border-0 py-1.5 bg-muted text-default shadow-sm ring-1 ring-inset ring-subtle placeholder:text-subtle focus:ring-2 focus:ring-inset focus:ring-brand-600 sm:text-sm sm:leading-6; } select { - @apply shadow-sm focus:ring-brand-500 focus:border-brand-500 block w-full sm:text-sm border-gray-300 dark:border-gray-600 rounded-md dark:bg-gray-900 dark:text-gray-100; + @apply shadow-sm focus:ring-brand-500 focus:border-brand-500 block w-full sm:text-sm border-muted rounded-md dark:bg-default; } label { diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cba0733..31cbcd9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -44,4 +44,8 @@ def become redirect_to root_url, error: "not allowed" end end + + def disable_footer + @disable_footer = true + end end diff --git a/app/controllers/podcasts_controller.rb b/app/controllers/podcasts_controller.rb index 0a56b3d..d70b2ff 100644 --- a/app/controllers/podcasts_controller.rb +++ b/app/controllers/podcasts_controller.rb @@ -1,32 +1,29 @@ class PodcastsController < ApplicationController + before_action :find_user + before_action :unset_user_menu + before_action :disable_footer - def show - @user = User.find_by(username: params[:user_id]) + def index + @collection = @user.tracks.published.podcasts.page(params[:page]).per(10) end - def edit - @user = User.find_by(username: params[:user_id]) - @info = @user.podcaster_info || @user.build_podcaster_info + def show + @podcast = @user.tracks.published.podcasts.friendly.find(params[:id]) end - def update - @user = User.find_by(username: params[:user_id]) - @info = @user.podcaster_info || @user.build_podcaster_info - @info.update(podcaster_params) - redirect_to user_podcast_path(@user.username) + def about end + private - def create - @user = User.find_by(username: params[:user_id]) - @info = @user.podcaster_info || @user.build_podcaster_info - @info.update(podcaster_params) - redirect_to user_podcast_path(@user.username) + def unset_user_menu + @disable_user_menu = true end - - private + def find_user + @user = User.find_by(username: params[:user_id]) + end def podcaster_params params.require(:podcaster_info).permit(:about, :title, :description) diff --git a/app/controllers/tracks_controller.rb b/app/controllers/tracks_controller.rb index ee30e92..e656052 100644 --- a/app/controllers/tracks_controller.rb +++ b/app/controllers/tracks_controller.rb @@ -119,6 +119,7 @@ def track_params :display_comments, :display_stats, :include_in_rss, :offline_listening, :enable_app_playblack, :cover, + :podcast, :copyright, :attribution, :noncommercial, :copies, tags: [] ) diff --git a/app/controllers/user_settings_controller.rb b/app/controllers/user_settings_controller.rb index c2e844d..494c689 100644 --- a/app/controllers/user_settings_controller.rb +++ b/app/controllers/user_settings_controller.rb @@ -1,5 +1,6 @@ class UserSettingsController < ApplicationController before_action :authenticate_user! + before_action :disable_footer def show @section = params[:section] || "profile" @@ -47,7 +48,11 @@ def user_attributes :new_message_app, :profile_header, :like_and_plays_on_your_post_email, - :tbk_commerce_code, :pst_enabled, :tbk_test_mode + :tbk_commerce_code, :pst_enabled, :tbk_test_mode, + podcaster_info_attributes: [ + :title, :about, :description, :avatar, :id, + :spotify_url, :apple_podcasts_url, :google_podcasts_url, :stitcher_url, :overcast_url, :pocket_casts_url + ] ) end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3ca4f3c..b4879fb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -502,6 +502,8 @@ def icon_for(kind) HTML + when :podcast + heroicon("microphone") else "" end diff --git a/app/helpers/tailwind_form_builder.rb b/app/helpers/tailwind_form_builder.rb index afa2ae4..f86b535 100644 --- a/app/helpers/tailwind_form_builder.rb +++ b/app/helpers/tailwind_form_builder.rb @@ -38,6 +38,16 @@ def text_field(attribute, options = {}) end end + def url_field(attribute, options = {}) + @template.content_tag :div, class: "w-full sm:w-full" do + [ + options[:label].is_a?(FalseClass) ? @template.content_tag(:div) : @template.label_tag(tr(options[:label] || attribute), nil), + super(attribute, options.reverse_merge(class: "input")), + field_details(attribute, object, options) + ].join.html_safe + end + end + def email_field(attribute, options = {}) @template.content_tag :div, class: "w-full sm:w-full" do [ diff --git a/app/models/podcaster_info.rb b/app/models/podcaster_info.rb index 278d9b4..010011f 100644 --- a/app/models/podcaster_info.rb +++ b/app/models/podcaster_info.rb @@ -1,3 +1,37 @@ class PodcasterInfo < ApplicationRecord belongs_to :user + has_one_attached :avatar + + + store_accessor :data, :spotify_url + store_accessor :data, :apple_podcasts_url + store_accessor :data, :google_podcasts_url + store_accessor :data, :stitcher_url + store_accessor :data, :overcast_url + store_accessor :data, :pocket_casts_url + + # You can add validations for these fields if needed + validates :spotify_url, url: true, allow_blank: true + validates :apple_podcasts_url, url: true, allow_blank: true + validates :google_podcasts_url, url: true, allow_blank: true + validates :stitcher_url, url: true, allow_blank: true + validates :overcast_url, url: true, allow_blank: true + validates :pocket_casts_url, url: true, allow_blank: true + + # You can add custom methods to work with these fields + def has_podcast_links? + spotify_url.present? || apple_podcasts_url.present? || google_podcasts_url.present? || + stitcher_url.present? || overcast_url.present? || pocket_casts_url.present? + end + + def podcast_links + { + spotify: spotify_url, + apple_podcasts: apple_podcasts_url, + google_podcasts: google_podcasts_url, + stitcher: stitcher_url, + overcast: overcast_url, + pocket_casts: pocket_casts_url + }.compact + end end diff --git a/app/models/track.rb b/app/models/track.rb index c69e561..d2a191e 100644 --- a/app/models/track.rb +++ b/app/models/track.rb @@ -40,6 +40,8 @@ def check_label # scope :private, -> { where.not(:private => true)} scope :latests, -> { order("id desc") } + scope :podcasts, -> {where(podcast: true)} + # store_attribute :metadata, :ratio, :integer, limit: 1 # store_attribute :metadata, :login_at, :datetime # #store_attribute :metadata, :active, :boolean diff --git a/app/models/user.rb b/app/models/user.rb index 7526d03..19c88e1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -71,6 +71,7 @@ class User < ApplicationRecord store_attribute :settings, :tbk_test_mode, :boolean accepts_nested_attributes_for :photos, allow_destroy: true + accepts_nested_attributes_for :podcaster_info, allow_destroy: true scope :artists, -> { where(role: "artist").where.not(username: nil) } diff --git a/app/validators/url_validator.rb b/app/validators/url_validator.rb new file mode 100644 index 0000000..dc1422e --- /dev/null +++ b/app/validators/url_validator.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class UrlValidator < ActiveModel::EachValidator + def validate_each(record, attribute, value) + record.errors.add(attribute, (options[:message] || "must be a valid URL")) unless url_valid?(value) + end + + # a URL may be technically well-formed but may + # not actually be valid, so this checks for both. + def url_valid?(url) + encoded_url = URI::DEFAULT_PARSER.escape(url) + url = begin + URI.parse(encoded_url) + rescue StandardError + false + end + url.is_a?(URI::HTTP) || url.is_a?(URI::HTTPS) + end +end diff --git a/app/views/articles/_article_highlights.erb b/app/views/articles/_article_highlights.erb index bfcfa97..b1c86fb 100644 --- a/app/views/articles/_article_highlights.erb +++ b/app/views/articles/_article_highlights.erb @@ -4,7 +4,7 @@
<% if posts.any? %> -
+

<%= t("articles.recent_publications") %> diff --git a/app/views/articles/_categories_section.html.erb b/app/views/articles/_categories_section.html.erb index e3af301..d80676d 100644 --- a/app/views/articles/_categories_section.html.erb +++ b/app/views/articles/_categories_section.html.erb @@ -1,5 +1,5 @@
-
+

Reviews

diff --git a/app/views/articles/index.html.erb b/app/views/articles/index.html.erb index 962fb70..a8a970a 100644 --- a/app/views/articles/index.html.erb +++ b/app/views/articles/index.html.erb @@ -1,5 +1,5 @@
-
+

<%= t("articles.recent_publications") %> diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index e3e4c15..27b9afa 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -1,5 +1,5 @@
-
+
<% if @upcoming_events.any? %>

@@ -40,7 +40,7 @@ <% end %>

-
+

<%= t("events.past") %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index ead1eaf..3bbf92c 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -28,7 +28,10 @@ - <%= render "shared/user_menu" %> + + <% if !@disable_user_menu %> + <%= render "shared/user_menu" %> + <% end %> <%= yield %> @@ -68,7 +71,9 @@ <% end %> + <% unless @disable_footer %> <%= render("shared/footer", assigns) %> + <% end %> <% if ENV["GA_ID"] %> diff --git a/app/views/podcasts/_footer.html.erb b/app/views/podcasts/_footer.html.erb index fe0a7f5..a2561b9 100644 --- a/app/views/podcasts/_footer.html.erb +++ b/app/views/podcasts/_footer.html.erb @@ -15,8 +15,10 @@ - Hosted by + <%= t("podcasts.hosted_by") %>

-
Eric Gordon Wes Mantooth
+
+ +
> \ No newline at end of file diff --git a/app/views/podcasts/_graph_icon.erb b/app/views/podcasts/_graph_icon.erb new file mode 100644 index 0000000..2fca5bf --- /dev/null +++ b/app/views/podcasts/_graph_icon.erb @@ -0,0 +1,119 @@ + \ No newline at end of file diff --git a/app/views/podcasts/_header.erb b/app/views/podcasts/_header.erb new file mode 100644 index 0000000..a139249 --- /dev/null +++ b/app/views/podcasts/_header.erb @@ -0,0 +1,97 @@ +
+ +
+ + <% if @user.podcaster_info.avatar.present? %> + <%= image_tag @user.podcaster_info.avatar, class: "w-full", style: "color:transparent" %> + <% elsif @user.avatar.present? %> + <%= image_tag @user.avatar_url(:medium), class: "w-full", style: "color:transparent" %> + <% end %> + + +
+
+
+

+ <%= link_to @user.podcaster_info.title, user_podcasts_path %> +

+

+ <%= @user.podcaster_info.description %> +

+
+ +
+

+ + + <%= t("podcast.listen") %> + +

+
+
    + + + <% if @user.podcaster_info %> + <% podcast_links = { + spotify: @user.podcaster_info.spotify_url, + apple_podcasts: @user.podcaster_info.apple_podcasts_url, + overcast: @user.podcaster_info.overcast_url, + google_podcasts: @user.podcaster_info.google_podcasts_url, + stitcher: @user.podcaster_info.stitcher_url, + pocket_casts: @user.podcaster_info.pocket_casts_url + } %> + + <% podcast_links.compact.each do |platform, url| %> + <% if url.present? %> +
  • + + <%= render partial: "podcast_icons", locals: { platform: platform } %> + + +
  • + <% end %> + <% end %> + <% end %> + + +
  • + <%= link_to user_rss_podcast_path, class: "group flex items-center", "aria-label": "RSS Feed" do %> + + + <% end %> +
  • +
+
+
+
\ No newline at end of file diff --git a/app/views/podcasts/_podcast.erb b/app/views/podcasts/_podcast.erb index ac1bc6e..8cea2c0 100644 --- a/app/views/podcasts/_podcast.erb +++ b/app/views/podcasts/_podcast.erb @@ -3,26 +3,90 @@
+

- <%= link_to track.title, "#" %> + <%= link_to track.title, user_podcast_path(@user.username, track), data: {turbo_frame: "_top"} %>

-
diff --git a/app/views/podcasts/_podcast_icons.erb b/app/views/podcasts/_podcast_icons.erb new file mode 100644 index 0000000..39a3fdd --- /dev/null +++ b/app/views/podcasts/_podcast_icons.erb @@ -0,0 +1,19 @@ +<% case platform %> +<% when :spotify %> + +<% when :apple_podcasts %> + +<% when :overcast %> + +<% else %> + + +<% end %> \ No newline at end of file diff --git a/app/views/podcasts/about.erb b/app/views/podcasts/about.erb new file mode 100644 index 0000000..c84ba8b --- /dev/null +++ b/app/views/podcasts/about.erb @@ -0,0 +1,34 @@ +
+ + <%= render "header" %> + +
+ + <%= render "graph_icon" %> + +
+
+
+
+
+

+ <%= @user.podcaster_info.title %> +

+
+
+
+
+
+ <%= @user.podcaster_info.description %> + <%= @user.podcaster_info.about %> +
+
+
+
+
+ + <% # render "footer" %> + + <% # render "player" %> + +
diff --git a/app/views/podcasts/edit.html.erb b/app/views/podcasts/edit.html.erb deleted file mode 100644 index c2cfe24..0000000 --- a/app/views/podcasts/edit.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -
- - <%= form_for @info, url: user_podcast_path(@user.username) do |f| %> - - <%= f.text_field :title %> - <%= f.text_area :about %> - <%= f.text_area :description %> - - <%= f.submit %> - - <% end %> - -
\ No newline at end of file diff --git a/app/views/podcasts/index.html.erb b/app/views/podcasts/index.html.erb index 4d6ca20..cf84710 100644 --- a/app/views/podcasts/index.html.erb +++ b/app/views/podcasts/index.html.erb @@ -1,451 +1,43 @@
-
- -
- - -
-
-
-

- Their Side -

-

Conversations with the most tragically misunderstood people of our time.

-
- -
-

- - Listen -

-
- -
-
-
+ + <%= render "header" %> +
- + + <%= render "graph_icon" %> +
-

Episodes

+

+ <%= t("podcasts.episodes")%> +

-
-
-
-
-
-
-

- 5: Bill Lumbergh -

- -

He’s going to need you to go ahead and come in on Saturday, but there’s a lot more to the story than you think.

-
- - - Show notes -
-
-
-
-
-
-
-
-
-
-
-

- 4: Shooter McGavin -

- -

When golf-obsessed terrorists kidnapped his family and held them hostage in exchange for a Golden Jacket, Shooter had no choice but to win the tour at any cost.

-
- - - Show notes -
-
-
-
-
-
-
-
-
-
-
-

- 3: The Wet Bandits -

- -

The Christmas of 1989 wasn’t the first time Harry and Marv crossed paths with the McCallisters. The real story starts in 1973, when Peter tripped Marv in the highschool locker room.

-
- - - Show notes -
-
-
-
-
-
-
-
-
-
-
-

- 2: Hank Scorpio -

- -

What looks to outsiders like a malicious plan to conquer the east coast, was actually a story of liberation and freedom if you get it straight from the source.

-
- - - Show notes -
-
-
-
-
-
-
-
-
-
-
-

- 1: Skeletor -

- -

You know him as an evil supervillain, but his closest friends call him Jeff, and he's just doing his best to find his way in a world that doesn't know what to do with a talking skeleton.

-
- - - Show notes -
-
-
-
-
-
-
-
-
-
-
-
-
-

- - About -

-

In this show, Eric and Wes dig deep to get to the facts with guests who have been labeled villains by a society quick to judge, without actually getting the full story. Tune in every Thursday to get to the truth with another misunderstood outcast as they share the missing context in their tragic tale.

- -
-

- - Hosted by -

-
Eric Gordon Wes Mantooth
-
-
-
-
- -
- 5: Bill Lumbergh -
-
- -
-
- -
- -
- -
-
- -
-
-
-
-
- -
-
-
-
- -
-
-
- -
- +
+ + + <%= turbo_frame_tag "paginated-list", class: 'flex flex-col-reverse' do %> + <% @collection.each do |track| %> + <%= render "podcast", track: track %> + <% end %> + <% end %> + + +
-
- + + + <% # render "footer" %> + + <% # render "player" %> +
diff --git a/app/views/podcasts/index.rss.builder b/app/views/podcasts/index.rss.builder new file mode 100644 index 0000000..2777ec2 --- /dev/null +++ b/app/views/podcasts/index.rss.builder @@ -0,0 +1,31 @@ +xml.instruct! :xml, version: "1.0", encoding: "UTF-8" +xml.rss version: "2.0" do + xml.channel do + xml.title @user.podcaster_info.title + xml.link root_url + xml.description @user.podcaster_info.description + xml.language "es-es" + + #xml.itunes :author, @user.full_name + #xml.itunes :subtitle, "Subtítulo del Podcast" + #xml.itunes :summary, @user.podcaster_info.description + + #xml.itunes :owner do + # xml.itunes :name, "Nombre del Propietario" + # xml.itunes :email, "email@ejemplo.com" + #end + + xml.itunes :image, href: "http://www.ejemplo.com/imagen.jpg" + xml.itunes :category, text: "Categoría del Podcast" + + @collection.each do |track| + xml.item do + xml.title track.title + xml.description track.description + xml.enclosure url: track.mp3_audio.url, type: "audio/mp3" + xml.pubDate track.created_at + xml.guid track.mp3_audio.url + end + end + end +end \ No newline at end of file diff --git a/app/views/podcasts/show.html.erb b/app/views/podcasts/show.html.erb index 4c80e11..4434ae9 100644 --- a/app/views/podcasts/show.html.erb +++ b/app/views/podcasts/show.html.erb @@ -1,229 +1,31 @@
-
- -
- - <%= image_tag @user.avatar_url(:medium), class: "w-full", style: "color:transparent" %> - - -
-
-
-

- <%= @user.podcaster_info.title %> -

-

- <%= @user.podcaster_info.description %> -

-
- -
-

- - Listen -

-
- -
-
-
+ + <%= render "header" %>
- + <%= render "graph_icon" %>
-

Episodes

+

+ <%= t("podcasts.episodes")%> +

- <% @user.tracks.each do |track| %> - <%= render "podcast", track: track %> - <% end %> + <%= render "podcast", track: @podcast, expanded: true %>
- <%= render "footer" %> + <% # render "footer" %> - <%= render "player" %> + <% # render "player" %>
diff --git a/app/views/tracks/_form.html.erb b/app/views/tracks/_form.html.erb index 19030cd..39953ef 100644 --- a/app/views/tracks/_form.html.erb +++ b/app/views/tracks/_form.html.erb @@ -55,7 +55,6 @@ <%= form.text_field :title, label: false %>
-
<% if impersonating?(@track.user) %> @@ -90,6 +89,15 @@
+
+ <%= form.label :podcast %> +
+
+ <%= form.check_box :podcast, label: false %> +
+
+
+
<%= form.label :cover %> diff --git a/app/views/tracks/_track_item.html.erb b/app/views/tracks/_track_item.html.erb index ef2e932..9f20bde 100644 --- a/app/views/tracks/_track_item.html.erb +++ b/app/views/tracks/_track_item.html.erb @@ -135,7 +135,7 @@ From: "transform opacity-100 scale-100" To: "transform opacity-0 scale-95" --> -