<%=tr("Discussion Topics") %>
<% if @topics.any? %> <% @topics.each do |topic| %> <% style = (topic == @topics.last ? "" : "border-bottom:1px dotted #ccc;" ) %> <% end %>
<%=tr("Author", "Forum column header")%> <%=tr("Topic", "Forum column header")%> <%=tr("Posts", "Forum column header")%> <%=tr("Last Post", "Forum column header")%>
<%=platform_user_mugshot_tag(topic.user, :linked => true)%> <%=platform_user_tag(topic.user, :linked => true)%>
<%=topic.created_at.trl(:date_time) %>
<% if topic.user == platform_current_user %> <%=link_to(tr("Delete", "Link to delete forum topic"), {:controller => '/platform/forum', :action => :delete_topic, :topic_id => topic.id}, {:confirm => trl("Are you sure you want to delete this topic and all of the messages under it?")})%> <% end %>
<%=link_to(topic.topic, :controller => '/platform/apps', :action => :view, :sec => 'Discussions', :topic_id => topic.id, :id => @app.id)%>
<%=topic.post_count %> <% if topic.last_post %>
<%=topic.last_post.created_at.trl(:date_time) %> <% if topic.user %>
<%=tr("by {user}", "Name of the publisher", :user => [topic.user, platform_user_tag(topic.user, :linked => true)])%> <% end %>
<% message = topic.last_post.message[0..60] message << "..." if topic.last_post.message.length > 60 %>
"<%=link_to(h(message), :controller => '/platform/apps', :action => :view, :id => @app.id, :sec => 'Discussions', :topic_id =>topic.id, :last_page => true)%>"
<% end %>  
<%= platform_paginator_tag(@topics, :subject => "forum topic") %> <% else %>
<%= tr("This application does not have any discussions. Be the first one to start a new discussion.") %>
<% end %>
<%= render :partial => "/platform/forum/new_topic", :locals => {:include_cancel_button => false} %>