Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions app/views/challenge_assignments/_assignment_blurb.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
<dd>
<% # link to the work %>
<% if assignment.creation %>
<%= link_to (assignment.creation.try(:title) || assignment.creation.class.name), assignment.creation, :class => "work" %>
<%= link_to (assignment.creation.try(:title) || assignment.creation.class.name), assignment.creation, class: "work" %>
<% if !assignment.posted? %>
<%= t(".draft_header") %>
<% end %>
<% end %>

<% if @collection && @collection.user_is_maintainer?(current_user) %>
Expand All @@ -26,21 +29,26 @@

<!--stats-->
<dl class="stats">
<dt><%= ts("Status:") %></dt>
<dt><%= t(".stats.status.header") %></dt>
<dd>
<% # status can be: unposted (no creation), unapproved (creation but it hasn't been approved), complete %>
<% if !assignment.posted? %>
<%= ts("Unposted") %>
<%= t(".stats.status.unposted") %>
<% elsif !assignment.fulfilled? %>
<strong><%= ts("Unapproved") %><!-- BACK END add approve button for mod --></strong>
<strong><%= t(".stats.status.unfullfilled") %><!-- BACK END add approve button for mod --></strong>
<% else %>
<%= ts("Complete!") %>
<%= t(".stats.status.fullfilled") %>
<% end %>
</dd>

<% if assignment.creation %>
<dt><%= ts("Posted:") %></dt>
<dd class="datetime"><%= assignment.creation.published_at %></dd>
<% if assignment.posted? %>
<dt> <%= t(".stats.creation.posted") %> </dt>
<dd class="datetime"><%= assignment.creation.published_at %></dd>
<% else %>
<dt> <%= t(".stats.creation.unposted") %> </dt>
<dd class="datetime"><%= assignment.creation.created_at %></dd>
<% end %>

<% if assignment.creation.respond_to?(:word_count) %>
<dt><%= ts("Words:") %></dt>
Expand Down
11 changes: 11 additions & 0 deletions config/locales/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,17 @@ en:
challenge_requests:
fandom: Fandom %{allowed_fandom_count}
challenge_assignments:
assignment_blurb:
draft_header: " (draft)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should be the best way to do this? should I put the space in the view instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include the link in locale as a variable

stats:
creation:
posted: 'Posted:'
unposted: 'Created:'
status:
fullfilled: Complete!
header: 'Status:'
unfullfilled: Unapproved
unposted: Unposted
to_default:
button: Default
confirmation: Are you sure? This will mark you as having defaulted and notify the collection maintainer! It cannot be undone.
Expand Down
22 changes: 22 additions & 0 deletions features/gift_exchanges/challenge_giftexchange.feature
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,28 @@ Feature: Gift Exchange Challenge
Then I should see "My Assignments"
And I should not see "Awesome Gift Exchange"

Scenario: Information regarding the status of an assignment is not confusing (AO3-7140)
Given everyone has their assignments for "Non Confusing Exchange"
When I am logged in as "myname1"
And I go to the assignments page for "myname1"
Then I should see "My Assignments"
And I should see "Non Confusing Exchange"
When I follow "Fulfill"
And I fill in the basic work information for "InProgress"
And I press "Preview"
And I go to the assignments page for "myname1"
Then I should see "(draft)"
And I should see "Status: Unposted"
And I should see "Created"
When I post the work "InProgress"
And I go to the assignments page for "myname1"
And I follow "Completed Assignments"
Then I should see "InProgress"
And I should not see "Status: Unposted"
And I should not see "Created"
And I should not see "(draft)"
And I should see "Status: Complete"

Scenario: A mod can purge assignments after they have been sent, but must
first confirm the action
Given everyone has their assignments for "Bad Gift Exchange"
Expand Down
Loading