<% # Copyright (C) 2011 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see . %> <% hide_entry ||= false entry_context ||= entry ? entry.context : parent_entry.context %>
" style="<%= hidden unless entry %>" class="communication_sub_message <%= 'toggled_communication_sub_message' if hide_entry %> <%= 'blank' unless entry %> can_be_marked_as_read <%= entry ? entry.read_state(@current_user) : 'read' %>" data-mark-read-url="<%= entry && context_url(entry_context, :api_v1_context_discussion_topic_discussion_entry_mark_read_url, entry.discussion_topic, entry)%>">
<%= avatar(entry.try_rescue(:user_id), context_code: entry_context.asset_string, size: 30) %>
<%= user_content(entry.try_rescue(:message)) || nbsp %>
<% if !entry %> <%= form_for :discussion_entry, :url => context_url(entry_context, :context_discussion_entries_url), :html => {:class => "add_sub_message_form"} do |f| %> <%= f.hidden_field :discussion_topic_id, :value => parent_entry.discussion_topic_id %> <%= f.hidden_field :parent_id, :value => parent_entry.id, :class => "parent_id" %> <%= f.text_area :message, :style => "height: 200px;", :class => "rich_text" %>
<% end %> <% end %>