Sha256: 37e541e288e9efe94d7b96046b7cf317297fa9b588884a910ec56594d3facb3e

Contents?: true

Size: 1.87 KB

Versions: 10

Compression:

Stored size: 1.87 KB

Contents

<% topic = @posts.topic %>
<% content_for :thredded_page_title, topic.title %>
<% content_for :thredded_page_id, 'thredded--topic-show' %>
<% content_for :thredded_breadcrumbs, render('thredded/shared/breadcrumbs') %>

<%= thredded_page do %>
  <%= content_tag :section,
                  id: dom_id(topic),
                  class: ['thredded--main-section', 'thredded--topic', *topic_css_classes(topic)] do %>

    <%= render 'thredded/topics/header', topic: topic %>
    <%= view_hooks.posts_common.pagination_top.render(self, posts: @posts) do %>
      <footer class="thredded--pagination-top"><%= paginate @posts %></footer>
    <% end %>
    <%= render_posts @posts,
                     partial: 'thredded/posts/post',
                     content_partial: 'thredded/posts/content',
                     locals: { actions: { quote: true } } %>
    <%= view_hooks.posts_common.pagination_bottom.render(self, posts: @posts) do %>
      <footer class="thredded--pagination-bottom"><%= paginate @posts %></footer>
    <% end %>

    <% if policy(@new_post.post).create? %>
      <div class="thredded--post-form--wrapper">
        <h3 class="thredded--post-form--title"><%= t('thredded.posts.form.title_label') %></h3>
        <%= render 'thredded/posts/form',
                   post:        @new_post,
                   button_text: t('thredded.posts.form.create_btn'),
                   button_submitting_text: t('thredded.posts.form.create_btn_submitting') %>
      </div>
    <% end %>

    <% if topic.can_destroy? %>
      <div class="thredded--topic-delete--wrapper">
        <%= button_to t('thredded.topics.delete_topic'), topic.destroy_path, method: :delete,
                      form_class: 'thredded--topic-delete-form',
                      class: 'thredded--button',
                      'data-confirm' => t('thredded.topics.delete_confirm') %>
      </div>
    <% end %>
  <% end %>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
thredded-0.13.5 app/views/thredded/topics/show.html.erb
thredded-0.13.4 app/views/thredded/topics/show.html.erb
thredded-0.13.3 app/views/thredded/topics/show.html.erb
thredded-0.13.2 app/views/thredded/topics/show.html.erb
thredded-0.13.1 app/views/thredded/topics/show.html.erb
thredded-0.13.0 app/views/thredded/topics/show.html.erb
thredded-0.12.4 app/views/thredded/topics/show.html.erb
thredded-0.12.3 app/views/thredded/topics/show.html.erb
thredded-0.12.2 app/views/thredded/topics/show.html.erb
thredded-0.12.1 app/views/thredded/topics/show.html.erb