rendered paste body<h4>Listing <%= @tutorial_list.size %> tutorials</h4><% if @tutorials.size > 0 %><% for tutorial in @tutorials %><div> <%= link_to tutorial.title, :action => "show", :id => tutorial.id %></div> <div><small>posted in: <%= tutorial.category %> by <%= tutorial.username %> on <%= tutorial.date %><% if session[:id] != nil %>[<% if User.find(session[:id]).username == tutorial.username || User.find(session[:id]).group == "administrator" %> <%= link_to 'Edit', :action => 'edit', :id => tutorial.id%> <% end %> <% if User.find(session[:id]).group == "administrator" %> | <%= link_to 'Delete', { :action => 'destroy', :id => tutorial.id}, :confirm => 'Are you sure?', :method => :post %> <% end %> ]<% end %></small></div><% end %><%= link_to 'Previous page', { :page => @tutorial_pages.current.previous } if @tutorial_pages.current.previous %><%= link_to 'Next page', { :page => @tutorial_pages.current.next } if @tutorial_pages.current.next %> <% if session[:id] != nil %><% if User.find(session[:id]).group != "member" %><p><%= link_to 'New tutorial', :action => 'new' %></p><% end %><% end %><% else %> <p> <b>Sorry. No tutorials at the Moment.</b> </p> <br /> <% if session[:id] != nil %><% if User.find(session[:id]).group != "member" %><%= link_to 'New Tutorial', :action => 'new' %><% end %><% end %><% end %>