% # expects "prompt", if index is passed will use that in title if none exists, if suppress_claims is true will ignore %>
<%= ts("Tags") %>
<% if prompt.optional_tag_set && !prompt.optional_tag_set.tags.empty? %>
<%= ts("Optional Tags:") %>
<% end %>
<% unless prompt.description.blank? %>
<%= ts("Summary") %>
<%=raw sanitize_field(prompt, :description) %>
<% end %>
<% unless prompt.url.blank? %>
<% url_label = prompt.collection.challenge.send("request_url_label") %><%= url_label.blank? ? ts("URL:") : url_label %>
<%= link_to(prompt.url, prompt.url) %>
<% end %>
<% if logged_in? %>
<%= render "prompts/prompt_controls", :challenge_signup => prompt.challenge_signup, :prompt => prompt %>
<% end %>
<% unless (suppress_claims ||= false) %>
<% # if prompt has been claimed list by whom %>
<% unless prompt.unfulfilled_claims.empty? %>
<%= ts("Claimed By")%>
<% if prompt.collection.anonymous? %>
<%= ts("%{count} anonymous claimants", :count => prompt.unfulfilled_claims.count) %>
<% else %>
<%= User.for_claims(prompt.unfulfilled_claims.pluck(:id)).pluck(:login).map {|user| content_tag(:li, user)}.join("\n").html_safe %>
<% end %>
<% end %>
<% # if prompt has been fulfilled list works %>
<% unless prompt.unfulfilled? %>
<%= ts("Fulfilled By")%>
<% prompt.fulfilled_claims.map(&:creation).each do |creation| %>
<% if creation.is_a?(Work) %>
<%= render "works/work_blurb", :work => creation %>
<% end %>
<% end %>
<% end %>
<% end %>