Story #9589

Updated by Brett Smith over 3 years ago

When the user is viewing an expiring collection (one where @expires_at@ is not null):

* The leftmost information pane should include this sentence in bold: "This the following, directly under the collection title: "_This collection will expire in &lt;duration&gt;." <duration>._ Immediately after that sentence is an [Undelete]" The Undelete button, button should be a normal Bootstrap button using the "fa-recycle":http://fontawesome.io/icon/recycle/ icon (this needs to be consistent with #9587). Pressing the Undelete button should update the collection to set its @expires_at@ attribute to null. After successful undeletion, this sentence and button should be removed from the information pane.
* If the user presses "Create sharing link," or the file "Browse" button on the Upload tab, a confirmation alert should appear. It says, "This collection will expire in &lt;duration&gt;. <duration>. Are you sure you want to edit it?" If the user presses OK in the confirmation, the requested action proceeds as normal. If the user presses Cancel, nothing happens, as if the user never pressed the first button.

Use "Rails' @distance_of_time_in_words@ method":http://api.rubyonrails.org/v3.2.17/classes/ActionView/Helpers/DateHelper.html#method-i-distance_of_time_in_words to format &lt;duration&gt; <duration> in the messages above. @from_time@ is the current time, and @to_time@ is the collection's @expires_at@ value.

Back