Sha256: 412ffbfafbf38d44befa1b83ffb7c7a63489f9e31991549e0253f58f7fd9d68c
Contents?: true
Size: 2 KB
Versions: 1
Compression:
Stored size: 2 KB
Contents
<%= render 'rostra/shared/sidebar' %> <div id="page_content"> <div id="questions"> <% if Rostra::Question.count.zero? %> <h3>Sorry! No questions have been asked.</h3> <% elsif @questions.empty? %> <h3>Sorry! No questions found.</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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rostra-0.1.5 | app/views/rostra/questions/index.html.erb |