<commit_before><%
  content_for :page_title, join_title( t(:topic, "Topic"), @topic.title)
  @presenter = DiscussionTopicPresenter.new(@topic, @current_user)
%>

<% content_for :auto_discovery do %>
  <% if @context_enrollment %>
    <%= auto_discovery_link_tag(:atom, feeds_topic_format_path(@topic.id, @context_enrollment.feed_code, :atom), {:title => t(:discussion_atom_feed_title, "Discussion Atom Feed")}) %>
    <% if @topic.podcast_enabled %>
      <%= auto_discovery_link_tag(:rss, feeds_topic_format_path(@topic.id, @context_enrollment.feed_code, :rss), {:title => t(:discussion_podcast_feed_title, "Discussion Podcast Feed")}) %>
    <% end %>
  <% elsif @context.available? %>
    <%= auto_discovery_link_tag(:atom, feeds_topic_format_path(@topic.id, @context.feed_code, :atom), {:title => t(:discussion_atom_feed_title, "Discussion Atom Feed")}) %>
    <% if @topic.podcast_enabled %>
      <%= auto_discovery_link_tag(:rss, feeds_topic_format_path(@topic.id, @context.feed_code, :rss), {:title => t(:discussion_podcast_feed_title, "Discussion Podcast Feed")}) %>
    <% end %>
  <% end %>
<% end %>

<% if @headers || !@locked %>
  <% content_for :right_side do %>
    <div id="sidebar_content" class="rs-margin-all">
    </div>
    <%= render :partial => "shared/wiki_sidebar" %>
  <% end %>
<% end %>
<% if !@headers %>
  <div style="width: 600px; margin: 10px auto;">
  <h2><%= @topic.title %></h2>
<% end %>
<%
  js_bundle :discussion
  jammit_css :tinymce, :discussions, :learning_outcomes
%>

<% if @topic.draft_state_enabled? && @unlock_at && @unlock_at > Time.now && !can_do(@context, @current_user, :moderate_forum) %>
  <div id="discussion-managebar" class="toolbarView">
    <div class="headerBar">
      <div class="topic">
        <div class="entry-content">
         <h1 class="discussion-title"><%= @topic.title %></h1>
         <div class="discussion-fyi">
           <% if @topic.is_a?(Announcement) %>
             <%= t(:announcement_locked_until, "This announcement is locked until %{time}", time: @unlock_at.strftime('%b %d, at %l%P')) %>
           <% else %>
             <%= @locked.is_a?(Hash) ? lock_explanation(@locked, 'topic', @context) : t(:topic_time_locked, "This topic is locked until %{time}", time: @unlock_at.strftime('%b %d, at %l%P')) %>
           <% end %>
         </div>
        </div>
      </div>
    </div>
  </div>
<% else %>
  <div id="discussion-managebar" class="toolbarView">
    <div class="headerBar">
      <div class="row-fluid form-inline" style="overflow: visible;">
        <div class="pull-right">
          <% if @topic.draft_state_enabled? && can_do(@context, @current_user, :moderate_forum) %>
            <button
              id="topic_publish_button"
              data-id='<%= @topic.id %>'
              class='btn <%= "published" if @topic.published? %> <%= "disabled" if @topic.published? && !@topic.can_unpublish? %>'>
            </button>
          <% end %>

          <% if @topic.grants_right?(@current_user, :update) %>
            <a href="<%= context_url(@topic.context,
                                     :edit_context_discussion_topic_url,
                                     @topic) %>"
               class="btn edit-btn" role="button">
                 <i class="icon-edit" aria-hidden="true"></i>
                 <%= t(:edit, 'Edit') %>
            </a>
          <% end %>

          <% if @current_user.present? %>
            <div class="admin-links">
              <a class="al-trigger btn" href="#">
                <i class="icon-settings"></i><i class="icon-mini-arrow-down"></i>
                <span class="screenreader-only"><%= t :manage_discussion, 'Manage Discussion' %></span>
              </a>
              <ul class="al-options">
                <li><a href="#" class="mark_all_as_read"><i class="icon-mark-as-read" aria-hidden="hidden"></i> <%= t :mark_all_as_read, 'Mark All as Read' %></a></li>
                <% if false # keep this command out of the interface for now %>
                  <li><a href="#" class="mark_all_as_unread"><%#= <i class="icon-mark-as-unread" aria-hidden="hidden"></i> %> <%= t :mark_all_as_unread, 'Mark All as Unread' %></a></li>
                <% end %>
<commit_msg>[NVDA] Manage Announcement is no longer Manage discussion<commit_after><%
  content_for :page_title, join_title( t(:topic, "Topic"), @topic.title)
  @presenter = DiscussionTopicPresenter.new(@topic, @current_user)
%>

<% content_for :auto_discovery do %>
  <% if @context_enrollment %>
    <%= auto_discovery_link_tag(:atom, feeds_topic_format_path(@topic.id, @context_enrollment.feed_code, :atom), {:title => t(:discussion_atom_feed_title, "Discussion Atom Feed")}) %>
    <% if @topic.podcast_enabled %>
      <%= auto_discovery_link_tag(:rss, feeds_topic_format_path(@topic.id, @context_enrollment.feed_code, :rss), {:title => t(:discussion_podcast_feed_title, "Discussion Podcast Feed")}) %>
    <% end %>
  <% elsif @context.available? %>
    <%= auto_discovery_link_tag(:atom, feeds_topic_format_path(@topic.id, @context.feed_code, :atom), {:title => t(:discussion_atom_feed_title, "Discussion Atom Feed")}) %>
    <% if @topic.podcast_enabled %>
      <%= auto_discovery_link_tag(:rss, feeds_topic_format_path(@topic.id, @context.feed_code, :rss), {:title => t(:discussion_podcast_feed_title, "Discussion Podcast Feed")}) %>
    <% end %>
  <% end %>
<% end %>

<% if @headers || !@locked %>
  <% content_for :right_side do %>
    <div id="sidebar_content" class="rs-margin-all">
    </div>
    <%= render :partial => "shared/wiki_sidebar" %>
  <% end %>
<% end %>
<% if !@headers %>
  <div style="width: 600px; margin: 10px auto;">
  <h2><%= @topic.title %></h2>
<% end %>
<%
  js_bundle :discussion
  jammit_css :tinymce, :discussions, :learning_outcomes
%>

<% if @topic.draft_state_enabled? && @unlock_at && @unlock_at > Time.now && !can_do(@context, @current_user, :moderate_forum) %>
  <div id="discussion-managebar" class="toolbarView">
    <div class="headerBar">
      <div class="topic">
        <div class="entry-content">
         <h1 class="discussion-title"><%= @topic.title %></h1>
         <div class="discussion-fyi">
           <% if @topic.is_a?(Announcement) %>
             <%= t(:announcement_locked_until, "This announcement is locked until %{time}", time: @unlock_at.strftime('%b %d, at %l%P')) %>
           <% else %>
             <%= @locked.is_a?(Hash) ? lock_explanation(@locked, 'topic', @context) : t(:topic_time_locked, "This topic is locked until %{time}", time: @unlock_at.strftime('%b %d, at %l%P')) %>
           <% end %>
         </div>
        </div>
      </div>
    </div>
  </div>
<% else %>
  <div id="discussion-managebar" class="toolbarView">
    <div class="headerBar">
      <div class="row-fluid form-inline" style="overflow: visible;">
        <div class="pull-right">
          <% if @topic.draft_state_enabled? && can_do(@context, @current_user, :moderate_forum) %>
            <button
              id="topic_publish_button"
              data-id='<%= @topic.id %>'
              class='btn <%= "published" if @topic.published? %> <%= "disabled" if @topic.published? && !@topic.can_unpublish? %>'>
            </button>
          <% end %>

          <% if @topic.grants_right?(@current_user, :update) %>
            <a href="<%= context_url(@topic.context,
                                     :edit_context_discussion_topic_url,
                                     @topic) %>"
               class="btn edit-btn" role="button">
                 <i class="icon-edit" aria-hidden="true"></i>
                 <%= t(:edit, 'Edit') %>
            </a>
          <% end %>

          <% if @current_user.present? %>
            <div class="admin-links">
              <a class="al-trigger btn" href="#">
                <i class="icon-settings"></i><i class="icon-mini-arrow-down"></i>
                <span class="screenreader-only">
                   <% if @topic.is_a?(Announcement) %>
                    <%= t :manage_announcement, 'Manage Announcement' %>
                   <% else %>
                    <%= t :manage_discussion, 'Manage Discussion' %>
                   <% end %>
                  </span>
              </a>
              <ul class="al-options">
                <li><a href="#" class="mark_all_as_read"><i class="icon-mark-as-read" aria-hidden="hidden"></i> <%= t :mark_all_as_read, 'Mark All as Read' %></a></li>
                <% if false # keep this command out of the interface for now %>
                  <li><a href="#" class="mark_all_as_unread"><%#= <i class="icon-mark-as-unread" aria-hidden="hidden"></i> %> <%= t :mark_all_as_unread, 'Mark All as Unread' %></a></li>
                <% end %>

{'fraction_non_alphanumeric': 0.18505338078291814, 'fraction_numerical': 0.002066352887154173, 'mean_word_length': 2.794425087108014, 'pattern_counts': {'":': 0, '<': 199, '<?xml version=': 0, '>': 211, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4542243', 'n_tokens_mistral': 3062, 'n_tokens_neox': 2743, 'n_words': 539}