Permalink
Browse files

Adds support for author related tags and controls

  • Loading branch information...
1 parent 1711be3 commit 53ebadcbf3398adf7902ce2c5053adefa4ee5334 davidray committed Dec 29, 2010
@@ -2,15 +2,22 @@ class PodcastsController < ApplicationController
before_filter :find_all_podcasts
before_filter :find_page
-
+ before_filter :set_content_permissions, :only => [:show]
parndt
parndt Jun 24, 2012 Collaborator

where is the corresponding method?

+
def index
respond_to do |format|
format.rss do
@items = Podcast.all
render :layout => false
end
+ format.html {}
end
end
+
+ def show
+ @podcast = Podcast.find(params[:id])
+ check_content_availability(@podcast)
parndt
parndt Jun 24, 2012 Collaborator

where is the corresponding method?

+ end
protected
View
@@ -1,6 +1,6 @@
class Podcast < ActiveRecord::Base
- acts_as_indexed :fields => [:title, :author, :subtitle, :duration, :keywords, :summary]
+ acts_as_indexed :fields => [:title, :author, :subtitle, :duration, :keywords, :summary, :content_type_tags, :genre_tags, :topic_tags]
validates :title, :presence => true, :uniqueness => true
@@ -1 +1 @@
-= link_to podcast.title, podcast
+<%= link_to podcast.title, podcast %>
@@ -1 +0,0 @@
-= link_to podcast.title, podcast
@@ -1,4 +1,11 @@
-#podcasts
- %ul
- - @podcasts.each do |podcast|
- %li= render "podcast", :podcast => podcast
+<% content_for :body_content_left do %>
+ <ul id="podcasts">
+ <% @podcasts.each do |podcast| %>
+ <li>
+ <%= link_to podcast.title, podcast %>
+ </li>
+ <% end %>
+ </ul>
+<% end %>
+
+<%= render :partial => "/shared/content_page" %>
@@ -1,4 +0,0 @@
-#podcasts
- %ul
- - @podcasts.each do |podcast|
- %li= render "podcast", :podcast => podcast
@@ -0,0 +1,36 @@
+<% content_for :body_content_title do %>
+ <%= @podcast.title %>:<%= @podcast.subtitle %>
+<% end %>
+
+<% content_for :body_content_left do %>
+
+ <section>
+ <h1>Summary</h1>
+ <p>
+ <%=raw @podcast.summary %>
+ </p>
+ </section>
+
+ <section>
+ <h1>Author</h1>
+ <p>
+ <%=raw @podcast.author %>
+ </p>
+ </section>
+
+<% end %>
+
+<% content_for :body_content_right do %>
+<aside>
+ <h2><%= t('.other') %></h2>
+ <ul id="partner_events">
+ <% @podcasts.each do |podcast| %>
+ <li>
+ <%= link_to podcast.title, podcast %>
+ </li>
+ <% end %>
+ </ul>
+</aside>
+<% end %>
+
+<%= render :partial => "/shared/content_page" %>
View
@@ -10,5 +10,5 @@
end
end
- match '/podcast.rss' => "podcasts/#index", :as => :podcast, :format => 'rss'
+ #match '/podcast.rss' => "podcasts/#index", :as => :podcast, :format => 'rss'
end
Binary file not shown.

0 comments on commit 53ebadc

Please sign in to comment.