Sha256: f1c2b0a74a1b60ffeb97bb471f0aabe92d41b58718bdb047c618593b1b4224ce

Contents?: true

Size: 1.65 KB

Versions: 38

Compression:

Stored size: 1.65 KB

Contents

<%= content_for :breadcrumbs do %>
  <%= breadcrumbs_for_discussion @discussion, @debatable %>
<% end %>

<div>
  <div class="discussion-context">
    <%= render partial: 'exercises/read_only', locals: {exercise: @debatable} %>
  </div>
</div>

<% if @discussion.has_messages? || @discussion.commentable_by?(current_user) %>
  <hr class="message-divider">

  <div>
    <h3>
      <%= t :messages %>
      <% if @discussion.last_moderator_access_visible_for?(current_user) %>
        <small class="pull-right">
          <span><%= t :last_seen, name: @discussion.last_moderator_access_by.full_name %></span>
          <span><%= t :time_since, time: time_ago_in_words(@discussion.last_moderator_access_at) %></span>
        </small>
      <% end %>
    </h3>
  </div>

  <% if @discussion.has_messages? %>
    <div class="discussion-messages">
      <% if @discussion.description.present? %>
        <%= render partial: 'discussions/description_message', locals: {discussion: @discussion} %>
      <% end %>
      <% @discussion.messages.each do |message| %>
        <%= render partial: 'discussions/message', locals: {user: message.sender_user, message: message} %>
      <% end %>
      <% if @discussion.commentable_by?(current_user) %>
        <hr class="message-divider">
      <% end %>
    </div>
  <% end %>

  <%= render partial: 'discussions/new_message', locals: {user: current_user} if @discussion.commentable_by?(current_user) %>

<% end %>

<% if current_user&.moderator_here? %>
  <div class="discussion-actions">
    <% @discussion.reachable_statuses_for(current_user).each do |status| %>
      <%= discussion_update_status_button(status) %>
    <% end %>
  </div>
<% end %>

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
mumuki-laboratory-9.0.6 app/views/discussions/show.html.erb
mumuki-laboratory-9.0.5 app/views/discussions/show.html.erb
mumuki-laboratory-9.0.4 app/views/discussions/show.html.erb
mumuki-laboratory-9.0.3 app/views/discussions/show.html.erb
mumuki-laboratory-9.0.2 app/views/discussions/show.html.erb
mumuki-laboratory-9.0.1 app/views/discussions/show.html.erb
mumuki-laboratory-9.0.0 app/views/discussions/show.html.erb
mumuki-laboratory-8.6.1 app/views/discussions/show.html.erb
mumuki-laboratory-8.6.0 app/views/discussions/show.html.erb
mumuki-laboratory-8.5.0 app/views/discussions/show.html.erb
mumuki-laboratory-8.4.0 app/views/discussions/show.html.erb
mumuki-laboratory-8.3.0 app/views/discussions/show.html.erb
mumuki-laboratory-8.2.1 app/views/discussions/show.html.erb
mumuki-laboratory-8.2.0 app/views/discussions/show.html.erb
mumuki-laboratory-8.1.3 app/views/discussions/show.html.erb
mumuki-laboratory-8.1.2 app/views/discussions/show.html.erb
mumuki-laboratory-8.1.1 app/views/discussions/show.html.erb
mumuki-laboratory-8.1.0 app/views/discussions/show.html.erb
mumuki-laboratory-7.12.3 app/views/discussions/show.html.erb
mumuki-laboratory-8.0.0 app/views/discussions/show.html.erb