<% if Rostra::Question.count.zero? %>
Sorry! No questions have been asked.
<% elsif @questions.empty? %>
Sorry! No questions found.
<% else %>
<% @questions.each do |question| %>
<%= question.plusminus %>
<%= question.plusminus.abs == 1 ? 'vote' : 'votes' %>
<%= question.answer_count %>
<%= question.answer_count.abs == 1 ? 'answer' : 'answers' %>
<%= question.unique_page_views %>
<%= question.unique_page_views.abs == 1 ? 'view' : 'views' %>
<%= rostra_user_avatar(question.user) %>
<%= link_to question.title, question %>
Asked by <%= link_to_profile(question.user) %>
<%= link_to 'edit', edit_question_path(question) if can? :manage, question %>
<% 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 %>
<%= time_ago_in_words(question.updated_at) %> ago
<%= tag_list(question) %>
<% end %>
<%= paginate @questions %>
<% end %>