Sha256: ecf82d71acb3cc217abe836a23030dd94227a18182d6b5af9c0ee4e74c730fbf

Contents?: true

Size: 1.29 KB

Versions: 3

Compression:

Stored size: 1.29 KB

Contents

<h1>Recent Questions</h1>

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

<div id="page_content">
    <div id="questions">
      <% if @questions.empty? %>
        <h3>No questions have been asked.</h3>

      <% else %>

        <% @questions.each do |question| %>
          <div class="question">
            <h3 class="title"><%= link_to question.title, question %></h3>
            <cite>
              Asked by <%= question.user.name %>
              <%= link_to 'edit', edit_question_path(question) if can? :manage, question %>
            </cite>
            <div class="text">
              <% if question.details.length > 250 %>
                <%= simple_format(
                  truncate(question.details, length: 250) +
                  link_to("view more", question, class: "view_more")
                ) %>

              <% else %>
                <%= simple_format(question.details) %>
              <% end %>
            </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>
        <% end %>

      <% end %>
    </div><!-- questions -->


</div><!--page_content-->

Version data entries

3 entries across 3 versions & 1 rubygems

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