diff --git a/.gitignore b/.gitignore index 5fff1d9..dff137a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +.idea pkg diff --git a/app/controllers/podcasts_controller.rb b/app/controllers/podcasts_controller.rb index 5e5d6df..9668685 100644 --- a/app/controllers/podcasts_controller.rb +++ b/app/controllers/podcasts_controller.rb @@ -2,7 +2,6 @@ class PodcastsController < ApplicationController before_filter :find_all_podcasts before_filter :find_page - before_filter :set_content_permissions, :only => [:show] def index respond_to do |format| @@ -16,7 +15,6 @@ def index def show @podcast = Podcast.find(params[:id]) - check_content_availability(@podcast) end protected diff --git a/app/models/podcast.rb b/app/models/podcast.rb index 74092a2..580a970 100644 --- a/app/models/podcast.rb +++ b/app/models/podcast.rb @@ -1,16 +1,22 @@ class Podcast < ActiveRecord::Base - acts_as_indexed :fields => [:title, :author, :subtitle, :duration, :keywords, :summary, :content_type_tags, :genre_tags, :topic_tags] + acts_as_indexed :fields => [:title, :author, :subtitle, :duration, :keywords, :summary, :content_types, :genres, :topics] validates :title, :presence => true, :uniqueness => true belongs_to :file, :class_name => 'Resource' + #TODO: setup some js to take care of the tags + acts_as_taggable_on :genres, :content_types, :topics + belongs_to :photo, :class_name => 'Image' + #not sure what these are has_many :author_resources, :as => :favoriteable, :dependent => :destroy - default_scope :order => "published DESC" + FEED_FIELDS = %w(podcast_title podcast_author podcast_explicit_flag podcast_description podcast_owner_name podcast_owner_email podcast_category podcast_subcategory) + def episode_number + #TODO: make the starting episode configurable episode = 0 Podcast.find(:all, :order => "published ASC").each do |p| @@ -20,5 +26,5 @@ def episode_number episode end - + end diff --git a/app/views/admin/podcasts/_form.html.erb b/app/views/admin/podcasts/_form.html.erb index 9e84a93..cd13043 100644 --- a/app/views/admin/podcasts/_form.html.erb +++ b/app/views/admin/podcasts/_form.html.erb @@ -3,55 +3,84 @@ :object => @podcast, :include_object_name => true } %> + +
+ + NOTE: Please update Refinery Settings prefixed with podcast to properly build your podcast feed. + +
diff --git a/app/views/admin/podcasts/new.html.erb b/app/views/admin/podcasts/new.html.erb index 2872e82..42509a2 100644 --- a/app/views/admin/podcasts/new.html.erb +++ b/app/views/admin/podcasts/new.html.erb @@ -1 +1 @@ -<%= render :partial => "form" %> +<%= render :partial => "form" %> \ No newline at end of file diff --git a/app/views/podcasts/index.rss.builder b/app/views/podcasts/index.rss.builder index 229f675..5c43032 100644 --- a/app/views/podcasts/index.rss.builder +++ b/app/views/podcasts/index.rss.builder @@ -3,31 +3,31 @@ xml.instruct! xml.rss 'xmlns:itunes' => 'http://www.itunes.com/dtds/podcast-1.0.dtd', :version => '2.0', 'xmlns:atom' => 'http://www.w3.org/2005/Atom' do xml.channel do # NOTE: Fill in everything with your own data down to the categories. - xml.title 'Your Podcast Title' + xml.title RefinerySetting.get('podcast_title') # Points to your website (e.g. http://yoursite.com/) xml.link root_url # Points to your podcast feed (e.g. http://yoursite.com/podcast.rss) - xml.tag!('atom:link', :href => podcast_url, :rel => 'self', :type => 'application/rss+xml') + xml.tag!('atom:link', :href => podcasts_url(:format => 'rss'), :rel => 'self', :type => 'application/rss+xml') # Accepted values are those in the ISO 639-1 Alpha-2 list (two-letter language codes, some with possible modifiers, such as 'en-us'). xml.language 'en-us' - xml.copyright "© #{Time.now.year} Jack & Jill" - xml.tag!('itunes:subtitle', 'A show about everything') + xml.copyright "© #{Time.now.year} #{RefinerySetting.get('site_name')}" + xml.tag!('itunes:subtitle', RefinerySetting.get('motto')) # The content of this tag is shown in the Artist column in iTunes. - xml.tag!('itunes:author', 'John Doe') + xml.tag!('itunes:author', RefinerySetting.get('podcast_author')) # This tag should be used to indicate whether or not your podcast contains # explicit material. The three values for this tag are "yes", "no", and "clean". - xml.tag!('itunes:explicit', 'no') + xml.tag!('itunes:explicit', [false,'false',0,''].include?(RefinerySetting.get('podcast_explicit_flag')) ) # The contents of this tag are shown in a separate window that appears when the # "circled i" in the Description column is clicked. It also appears on the iTunes # page for your podcast. This field can be up to 4000 characters. - description = "All About Everything is a show about everything. Each week we dive into any subject known to man and talk about it as much as we can. Look for our Podcast in the iTunes Store" + description = RefinerySetting.get('podcast_description') xml.tag!('itunes:summary', description) xml.description description @@ -35,8 +35,8 @@ xml.rss 'xmlns:itunes' => 'http://www.itunes.com/dtds/podcast-1.0.dtd', :version # This tag contains information that will be used to contact the owner of the podcast # for communication specifically about their podcast. It will not be publicly displayed. xml.tag!('itunes:owner') do |owner| - xml.tag!('itunes:name', 'John Doe') - xml.tag!('itunes:email', 'john.doe@example.com') + xml.tag!('itunes:name', RefinerySetting.get('podcast_owner_name')) + xml.tag!('itunes:email', RefinerySetting.get('podcast_owner_email')) end # upload an image to your resources tab and link it in here @@ -45,11 +45,11 @@ xml.rss 'xmlns:itunes' => 'http://www.itunes.com/dtds/podcast-1.0.dtd', :version # select from the list of categories here: # http://www.apple.com/itunes/podcasts/specs.html#categories - xml.tag!('itunes:category', :text => "Technology") do |category| - xml.tag!('itunes:category', :text => "Software How-To") + xml.tag!('itunes:category', :text => RefinerySetting.get('podcast_category')) do |category| + xml.tag!('itunes:category', :text => RefinerySetting.get('podcast_subcategory')) end - @items.each do |item| + @items.select{|item| item.file}.each do |item| xml.item do xml.title item.title xml.tag!('itunes:author', item.author) diff --git a/config/locales/bg.yml b/config/locales/bg.yml new file mode 100644 index 0000000..3c232c7 --- /dev/null +++ b/config/locales/bg.yml @@ -0,0 +1,24 @@ +bg: + shared: + admin: + image_picker: + image: изображение + plugins: + podcasts: + title: Подкасти + admin: + podcasts: + index: + title: Подкасти + create_new: Добавяне на нов подкаст + reorder: Пренареждане на подкастите + reorder_done: Запис на текущото подреждане на подкастите + sorry_no_results: За съжаление нищо не бе намерено. + no_items_yet: Все още няма подкасти. Натиснете "Добавяне на нов подкаст", за да въведете нов. + podcast: + view_live_html: Преглед на този подкаст