|
3 | 3 | <% content_for :auto_discovery do %> |
4 | 4 | <% if @context_enrollment %> |
5 | 5 | <%= auto_discovery_link_tag(:atom, feeds_topic_format_path(@topic.id, @context_enrollment.feed_code, :atom), {:title => "Discussion Atom Feed"}) %> |
| 6 | + <% if @topic.podcast_enabled %> |
| 7 | + <%= auto_discovery_link_tag(:rss, feeds_topic_format_path(@topic.id, @context_enrollment.feed_code, :rss), {:title => "Discussion Podcast Feed"}) %> |
| 8 | + <% end %> |
6 | 9 | <% elsif @context.available? %> |
7 | 10 | <%= auto_discovery_link_tag(:atom, feeds_topic_format_path(@topic.id, @context.feed_code, :atom), {:title => "Discussion Atom Feed"}) %> |
| 11 | + <% if @topic.podcast_enabled %> |
| 12 | + <%= auto_discovery_link_tag(:rss, feeds_topic_format_path(@topic.id, @context.feed_code, :rss), {:title => "Discussion Podcast Feed"}) %> |
| 13 | + <% end %> |
8 | 14 | <% end %> |
9 | 15 | <% end %> |
10 | 16 |
|
|
30 | 36 | <% else %> |
31 | 37 | <div class="rs-margin-all"> |
32 | 38 | <div id="sidebar_content"> |
33 | | - <p> |
34 | | - <b><span class="message_count"><%= @entries.length %></span> <span class="message_count_text"><%= @entries.length == 1 ? 'post' : 'posts' %></span></b> |
35 | | - <% if @entries.length > 0 && !@topic_agglomerated %> |
36 | | - <span style="font-size: 0.8em; padding-left: 10px;">( <span class="total_message_count"><%= @topic.discussion_entries.active.length %></span> including subtopics )</span> |
37 | | - <% end %> |
38 | | - </p> |
39 | | - <p> |
40 | | - <% if @topic_agglomerated %> |
41 | | - This view shows all the messages from all this topic's group topics. If you want to |
42 | | - comment or edit posts, you'll have to visit each topic individually. |
43 | | - <ul class="unstyled_list" style="line-height: 1.8em; margin: 5px 20px 10px;"> |
44 | | - <% @groups.select{|g| can_do(g, @current_user, :read) }.each do |group| %> |
45 | | - <li class="unstyled_list"> |
46 | | - <% cnt = (@topics || []).find{|t| t.context == group}.discussion_entries.count rescue 0 %> |
47 | | - <b><a href="<%= context_url(group, :context_discussion_topics_url, :root_discussion_topic_id => @topic.id) %>"><%= group.name %></a></b> - <%= pluralize(cnt, 'Post') %> |
48 | | - </li> |
| 39 | + <p> |
| 40 | + <b><span class="message_count"><%= @entries.length %></span> <span class="message_count_text"><%= @entries.length == 1 ? 'post' : 'posts' %></span></b> |
| 41 | + <% if @entries.length > 0 && !@topic_agglomerated %> |
| 42 | + <span style="font-size: 0.8em; padding-left: 10px;">( <span class="total_message_count"><%= @topic.discussion_entries.active.length %></span> including subtopics )</span> |
49 | 43 | <% end %> |
50 | | - </ul> |
51 | | - <% else %> |
52 | | - <% end %> |
53 | | - </p> |
54 | | - <p> |
55 | | - <% if can_do(@topic, @current_user, :update) %> |
56 | | - <a href="#" class="edit_topic_link button button-sidebar-wide"><%= image_tag "edit.png", :alt => "" %> Edit Topic</a> |
57 | | - <% end %> |
58 | | - <% if can_do(@topic, @current_user, :reply) && !params[:combined] %> |
59 | | - <a href="#" class="add_entry_link button button-sidebar-wide"><%= image_tag "add.png", :alt => "" %> Add New Entry</a> |
60 | | - <% end %> |
61 | | - <% if can_do(@topic, @current_user, :delete) && !params[:combined] %> |
62 | | - <a href="#" class="delete_topic_link button button-sidebar-wide"><%= image_tag "delete.png", :alt => "" %> Delete Topic</a> |
63 | | - <% end %> |
64 | | - </p> |
| 44 | + </p> |
| 45 | + <p> |
| 46 | + <% if @topic_agglomerated %> |
| 47 | + This view shows all the messages from all this topic's group topics. If you want to |
| 48 | + comment or edit posts, you'll have to visit each topic individually. |
| 49 | + <ul class="unstyled_list" style="line-height: 1.8em; margin: 5px 20px 10px;"> |
| 50 | + <% @groups.select{|g| can_do(g, @current_user, :read) }.each do |group| %> |
| 51 | + <li class="unstyled_list"> |
| 52 | + <% cnt = (@topics || []).find{|t| t.context == group}.discussion_entries.count rescue 0 %> |
| 53 | + <b><a href="<%= context_url(group, :context_discussion_topics_url, :root_discussion_topic_id => @topic.id) %>"><%= group.name %></a></b> - <%= pluralize(cnt, 'Post') %> |
| 54 | + </li> |
| 55 | + <% end %> |
| 56 | + </ul> |
| 57 | + <% else %> |
| 58 | + <% end %> |
| 59 | + </p> |
| 60 | + <p> |
| 61 | + <% if can_do(@topic, @current_user, :update) %> |
| 62 | + <a href="#" class="edit_topic_link button button-sidebar-wide"><%= image_tag "edit.png", :alt => "" %> Edit Topic</a> |
| 63 | + <% end %> |
| 64 | + <% if can_do(@topic, @current_user, :reply) && !params[:combined] %> |
| 65 | + <a href="#" class="add_entry_link button button-sidebar-wide"><%= image_tag "add.png", :alt => "" %> Add New Entry</a> |
| 66 | + <% end %> |
| 67 | + <% if can_do(@topic, @current_user, :delete) && !params[:combined] %> |
| 68 | + <a href="#" class="delete_topic_link button button-sidebar-wide"><%= image_tag "delete.png", :alt => "" %> Delete Topic</a> |
| 69 | + <% end %> |
| 70 | + </p> |
| 71 | + <div id="podcast_link_holder" style="<%= hidden unless @topic.podcast_enabled %>"> |
| 72 | + <% if @context_enrollment %> |
| 73 | + <p> |
| 74 | + <a class="feed" href="<%= feeds_topic_format_path(@topic.id, @context_enrollment.feed_code, :rss) %>">Topic Podcast Feed</a> |
| 75 | + </p> |
| 76 | + <% elsif @context.available? %> |
| 77 | + <p> |
| 78 | + <a class="feed" href="<%= feeds_topic_format_path(@topic.id, @context.feed_code, :rss) %>">Topic Podcast Feed</a> |
| 79 | + </p> |
| 80 | + <% end %> |
| 81 | + </div> |
65 | 82 | </div> |
66 | 83 | </div> |
67 | 84 | <%= render :partial => "shared/wiki_sidebar" %> |
|
0 commit comments