composer/packagist — pull request #253 by mvriel (2012-11-29 20:18:23+00:00)
Title: Add delete button to versions

@seldaek indicated on IRC that he would very much love to be able to delete
versions using the web interface of packagist. Since I figured it shouldn't
be much work and he just deleted a version for me I decided to throw some time
against the issue and behold! A new button!

The button only appears if the current user is maintainer or has the
ROLE_EDIT_PACKAGES role; the action executing this code is also protected using
same credentials.

This button replicates the behaviour of the clearVersionsCommand as indicated
by Seldaek.

I have tested this in a local setup.

p.s. the button is explicitly disabled on the first version as that is the main version
and it will only show when expanding the foldout. I assumed the interface would
become too cluttered if I placed it in the top.