<h4>Your custom dashboard</h4>
<p>http://joss.theoj.org/dashboard/<%= @editor %></p>

<% if @assigned_issues.any? %>
<h4>Here are the papers you are currently editing:</h4>

  <% @assigned_issues.each do |issue| %>
<ul>
  <li><%= issue.title %></li>
  <li>Submitted: <%= issue.created_at.strftime('%F') %></li>
  <li>Total comments: <%= issue.comment_count %></li>
  <li>Last comment: by @<%= issue.last_comment['user']['login']%> <%= time_ago_in_words(issue.last_comment['created_at']) %> ago</li>
  <li>https://github.com/<%= Rails.application.settings["reviews"] %>/issues/<%= issue.number %></li>
</ul>
  <% end %>
<% else %>
<p>You don't seem to be editing any papers. Please consider volunteering to edit one of the pending papers above.</p>
<% end %>

<% if @closed_issues.any? %>
<h4>Published papers this week</h4>

  <% @closed_issues.each do |issue| %>
  <ul>
    <li><%= issue.title %></li>
    <li>Submitted: <%= issue.created_at.strftime('%F') %></li>
    <li>https://github.com/<%= Rails.application.settings["reviews"] %>/issues/<%= issue.number %></li>
    <li>Editor: <%= issue.editor %></li>
  </ul>
  <% end %>
<% end %>

<% if @pending_issues.any? %>
<h4>Here are the papers currently without an editor</h4>
<p><em>Please consider volunteering to edit one (or more) of these papers</em></p>

  <% @pending_issues.each do |issue| %>
<ul>
  <li><%= issue.title %></li>
  <li>Submitted: <%= issue.created_at.strftime('%F') %></li>
  <li>https://github.com/<%= Rails.application.settings["reviews"] %>/issues/<%= issue.number %></li>
</ul>
  <% end %>
<% end %>
