uchicago-sg / caravel

A Re-Re-Refresh the UChicago Marketplace
https://marketplace.uchicago.edu
16 stars 3 forks source link

Add unpublish button #216

Closed fatlotus closed 8 years ago

fatlotus commented 8 years ago

Currently, listings cannot be unpublished. This change adds it for signed in users, and allows unsigned edits with moderation.

Remaining things to do:

georgeteo commented 8 years ago

Am not sure what you mean by point 2. I've commented a line that I think makes it such that if you don't have a cnet id (and hence cannot login) or are not logged in, then you can't mark things as Sold. Is that the case? Or can anyone mark things as sold, it just sends the listing to different places depending on current_user status?

georgeteo commented 8 years ago

Also do we want to implement a auto expire feature after x days and auto delete after y days?

If so, may want to abstract "sold" to "unpublish: sold", "unpublish:expire" so that one mixin can be used? (Not entirely sure but the two behaviors seem very similar.)

fatlotus commented 8 years ago

Right now, you're right — that's a TODO for the next commit. The auto-expiration feature sounds like a good idea, but that might be out of scope for this PR.