Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (34 sloc) 1.21 KB
<div class="page-container">
<span><%= link_to 'User List', users_path, class: "btn btn-small btn-primary" %>
</span>
<% unless current_user.blank? %>
<span><%= link_to 'Your Timeline', timeline_path(current_user.id), class: "btn btn-small btn-primary" %>
</span>
<% end %>
<span><%= form_tag("/search", method: "get") do %>
<%= label_tag(:word, "Search for:") %>
<%= text_field_tag(:word) %>
<%= submit_tag("Search") %>
<% end %></span>
</div>
<div class="content">
<% @twixts.each do |twixt| %>
<div class="twixt">
<% if twixt.user.avatar? %>
<img class="avatar" src="<%= twixt.user.avatar.medium_avatar %>">
<% else %>
<%= image_tag "default_avatar.png", size: "50x50", class: "avatar" %>
<% end %>
<h2><%= twixt.content %></h2>
<p class="author">Submitted <%= time_ago_in_words(twixt.created_at) %> ago by <%= twixt.user.name %></p>
<br>
<%= link_to 'User Profile', user_path(twixt.user.id), class: "btn btn-small btn-primary" %>
<%= link_to 'Show Twixt', twixt_path(twixt), class: "btn btn-small btn-primary" %>
<br>
</div>
<% end %>
</div>
<div class="link row clearfix">
<%= paginate @twixts %>
</div>
</div>