Jasig/uPortal — pull request #203 by apetro (2014-01-16 02:53:38+00:00)
Title: Users can un-favorite items from favorites portlet

Add un-favorite functionality to Favorites portlet via EDIT portlet mode.

# Known shortcomings, deferred work, and technical debt

* This implementation doesn't align perfectly with the locally-at-UW-developed functionality for favoriting. Needs merge.
* This implementation hard-codes messages in the Java and JSP layers. Should instead use message bundles.
* Lacks automated tests for much of the functionality.

# Big picture design

* Favorites is just another view on traditional layout as regards tabs ("collections of favorites).
* Individually favorited items are represented as portlets in folders of `type="favorites"`
* Un-favoriting is removing from layout

* UI for editing favorites is implemented as the actual EDIT mode of the Favorites portlet.
* Un-favoriting clicks are real `ActionRequest`s generated via ``s (not AJAX)

# Edit UI features

![real_edit_favorites](https://f.cloud.github.com/assets/952283/1927309/42c4269a-7e57-11e3-9e23-c515b9785539.png)

* Edit UI reflects whether favorites are delete-able by the user per DLM (lock glyph, only deleteable items appear to be clickable hyperlinks). Help text displayed explaining meaning of lock glyph (only shown if lock glyph is shown).
* Edit UI provides a link to exit EDIT mode (return to VIEW mode).

![lack_permission_to_un-favorite](https://f.cloud.github.com/assets/952283/1927311/4c7f8cb0-7e57-11e3-8c66-838c21e3c47a.png)

* Non-delete-ability of non-delete-able favorites is communicated via tool-tip on hover (click on touchscreens).
* Backing controller filters delete requests for target node being in-layout, user permission to delete, signaling appropriate error messages to UI, and signaling success to UI when node successfully deleted from layout ("un-favorited').
* Edit UI displays error and success messages so signaled (translated to model `errorMessage` and `successMessage` by the edit mode RenderRequest handler).

# Backing code

* `UserLayoutFolderDescription` now reflects the underlying `folder` `type` attribute rather than being constrained to four hard-coded possible values. This is how `type="favorites"` is visible to the Favorites portlet.
* Layout node classes now have richer `toString()`s to facilitate detailed logging at `trace` level in the Edit controller.