Sha256: 11e89a9f0fe33c3fd9322c1ef074951a4eefde9229c0858abe846c2c53ec6583

Contents?: true

Size: 1.54 KB

Versions: 3

Compression:

Stored size: 1.54 KB

Contents

<h1><%= @question.title %></h1>

<%= render 'rostra/shared/sidebar' %>

<div id="page_content">

  <div class="question">
    <%= render 'rostra/shared/votes' %>
    <h3 class="title"><%= @question.title %></h3>

    <cite>
      Asked by <%= @question.user.name %>
      <%= link_to 'edit', edit_question_path(@question) if can? :manage, @question %>
    </cite>
    <div class="text"><%= simple_format(@question.details) %></div>
    <div class="timestamp"><%= time_ago_in_words(@question.updated_at) %> ago</div>
    <div class="tags">
      Tags:
      <% @question.tags.each do |tag| %>
        <%= link_to tag, "" %>
      <% end %>
    </div>
  </div>

  <% unless @answers.empty? %>
    <h3 id="answer_count"><%= pluralize(@answers.size, 'Answer') %></h3>
    <div id="answers">
      <% @answers.each do |answer| %>
        <div class="answer" id="<%= dom_id(answer) %>">
          <%= render partial: 'rostra/shared/answers_votes', locals: {answer: answer} %>
          <cite>
            <%= answer.user.name %> says:
            <%= link_to('edit', edit_question_answer_path(@question, answer)) if can? :manage, answer %>
          </cite>
          <div class="text"><%= simple_format(answer.text) %></div>
          <div class="timestamp"><%= time_ago_in_words(answer.updated_at) %> ago</div>
        </div>
      <% end %>
    </div>
  <% end %>

  <% if user_signed_in? %>
    <%= render 'rostra/answers/form' %>
  <% else %>
    <%= link_to "Login to answer this question", main_app.new_user_session_path, class: 'button' %>
  <% end %>
</div><!-- page_content -->

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rostra-0.0.3 app/views/rostra/questions/show.html.erb
rostra-0.0.2 app/views/rostra/questions/show.html.erb
rostra-0.0.1 app/views/rostra/questions/show.html.erb