Introduction
The purpose of this template is to enable information office workers to self-restore documents that are incidentally deleted from a protected document library using the document library interface in the browser where the deletion occurred. Users can delete items and subsequently restore them without requiring a recent database backup or the restoration of the entire content database. This functionality is packaged in an all encompassing STP file that can be imported into a list template gallery so Web Designers+ within a site collection can immediately begin creating protected document libraries.
The goal was to achieve this without any changes to the Web Servers (like altering Site Definitions or deploying Event Handlers), without any changes to the SharePoint databases (like triggers), without any dependencies on the resulting document libraries (like a mirror document libraries), and without post-provisioning configuration of the resulting document libraries (like pointing to an Event Handler).
Features
Easy to deploy (no server touch). All functionality bundled up in a custom list template that appears on the Create page:

Optionally allows multiple New Document Template smart menu (enabled by default).

Replace built-in Delete functionality with Delete (restorable) functionality integrated into the smart menu.

Like any Office application, access to Delete (permanent) functionality via the <Shift> key.

Delete (restorable) functionality on View Properties page of all documents.

Delete (restorable) functionality on Edit Properties page of all documents.

Like Outlook, there is a Deleted Items view. Note that Edit in Datasheet is provided for mass non-restorable deletes. The list is for all documents anywhere in this document library so the document’s icon sports a tool tip that indicates what folder the document was deleted from.

The Deleted Items Document Library supports the restoration of deleted folders on the Deleted Folders view.

Full support for content approval. Yes, document deletions can now be moderated.

Full support for version history (a version is even created for each delete/restore). No loss of who created/altered a document at any time.

Edit in Datasheet is still allowed for mass non-restorable deletes from all views including the Deleted Items view. However, the user is warned the first time they use Edit in Datasheet each session so that they know the results of their actions.


Explorer View is still allowed for Windows Explorer functionality including non-restorable deletes but the user is warned the first time they use Explorer View each session.


Some non-visual features:
- A Document Library Event Sink can be written to handle deleted documents because the documents are only renamed (rather than removed). So, if you want to do some kind of server processing on deleted documents, they are still there and easy to identify when the event handler fires.
- Alerts will still be fired notifying users that someone has altered the document. Unlike alerts that are fired when someone deletes a document using the built-in document library, the alerts fired using this document library will have complete information about the deletion including a link to the deleted document.
- Delete (restorable) functionality is automatically added to new listviews.
- Easy to add to or remove from existing document libraries (see the document called Manually Add or Remove Self-Restore Functionality).
- All source code is included in the STP and could be altered by your programmers.
- Easy to upgrade when new functionality is made available.
- Several options can be toggled on or off (see the Constants.js file in the Forms folder):
§ Enable Multiple Templates
§ Show Folder Tool tip
§ Warn About Datasheet
§ Warn About Explorer View
§ Silence Errors
- Full error handling throughout the solution.
- Constants used for most strings so this could readily be globalized for another locale.
While other features could probably be cataloged, this list is relatively complete.
This labor of love has cost countless hours of sleep and a few grey hairs but the solution will likely save many people countless hours of sleep and their own grey hairs.
Download FREE
Download the bits (documentation and source) in the Software section of Mindsharp's Premium Content area.
<Todd />