Sha256: b6673701e50687a220d6321b2291ebc02a8259e805c70e6cb1b48df9b54ba0a1

Contents?: true

Size: 1.9 KB

Versions: 6

Compression:

Stored size: 1.9 KB

Contents

<%= 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">

            <div class="stats">
              <div class="vote_count">
                <span class="count"><%= question.plusminus %></span>
                <span class="type"><%= question.plusminus.abs == 1 ? 'vote' : 'votes' %></span>
              </div>
              <div class="answer_count">
                <span class="count"><%= question.answer_count %></span>
                <span class="type"><%= question.answer_count.abs == 1 ? 'answer' : 'answers' %></span>
              </div>
              <div class="views_count">
                <span class="count"><%= question.unique_page_views %></span>
                <span class="type"><%= question.unique_page_views.abs == 1 ? 'view' : 'views' %></span>
              </div>
            </div>

            <%= rostra_user_avatar(question.user) %>

            <h3 class="title"><%= link_to question.title, question %></h3>
            <cite>
              Asked by <%= link_to_profile(question.user) %>
              <%= link_to 'edit', edit_question_path(question) if can? :manage, question %>
            </cite>
            <div class="text">
              <% if question.details.length > 500 %>
                <%= strip_tags(truncate(question.details, length: 500)) + link_to("view more", question, class: "view_more") %>
              <% else %>
                <%= strip_tags(question.details) %>
              <% end %>
            </div>
            <div class="timestamp"><%= time_ago_in_words(question.updated_at) %> ago</div>
            <%= tag_list(question) %>
          </div>
        <% end %>

        <%= paginate @questions %>

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


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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rostra-0.1.4 app/views/rostra/questions/index.html.erb
rostra-0.1.3 app/views/rostra/questions/index.html.erb
rostra-0.1.2 app/views/rostra/questions/index.html.erb
rostra-0.1.1 app/views/rostra/questions/index.html.erb
rostra-0.0.17 app/views/rostra/questions/index.html.erb
rostra-0.0.16 app/views/rostra/questions/index.html.erb