Campsite users should have the ability to view and work with previous versions of an article’s texts. The handling of such texts could be managed from a version control server such as Subversion.
A distinction should be made between a Campsite ‘article’ and its text fields. In theory, each text field should have the ability to have version tracking.
Each of the article fields could refer to the article’s unique identifier with their own identifier in a methodology similar to that of a ‘node’ in Drupal; an article in Campsite is not just the text of a single field, but the grouping of all of its associated fields, as well as any photos or multimedia attached.
Instead of storing the article text in a database table, the Campsite database would simply provide a pointer to the individual text file on the version control system, which would be served and managed accordingly.
Because the article in its latest version would be the default, the latest version would be cached if the user has enabled caching; this would then resolve any performance issues that may occur from using a version control server in addition to the other Campsite features.
An interface (possibly similar to that used by the template versioning feature described in #2556 would allow users (either writers or editors) to view a versioning control menu with history for each of the text fields in an article.
As with the template versioning, users should be able to:
— view the latest version of a file (this should be the default view that appears in the article edit interface
— view previous versions in a ‘timeline’ or history view
— perform diff comparisons on versions
— allow rollback to previous versions as selected by the user
Rights to the versioning interface would have to be inherited from Campsite, which would include the following rights. This list is admittedly incomplete, and will probably have to be added to:
— A user who is the author of an article should be able to view version history, including diff comparisons between versions
— A user with edit rights should have the ability to roll back the version of a text and publish with the selected version
— A user with admin rights should have the ability to grant write access to the version control feature
The Trac wiki interface and its history view could provide an inspiration for the user interface for this feature.
TODO: Decide whether such a feature should be handled as a plugin or as a core feature.