public
Description: Provides history, diffs, and dev-only drafts to Radiant CMS
Homepage:
Clone URL: git://github.com/jgarber/radiant-chronicle-extension.git
name age message
file .gitmodules Fri Aug 07 11:51:51 -0700 2009 Paginate the history page. Closes #20. [Jason Garber]
file LICENSE Tue Mar 24 07:25:46 -0700 2009 Initial commit. [Jason Garber]
file README.textile Fri Aug 07 11:53:53 -0700 2009 Remove code tags from things that aren't code i... [Jason Garber]
file Rakefile Fri Aug 07 14:04:04 -0700 2009 Pull features out of the specs task [Jason Garber]
file TODO Wed Apr 15 14:56:49 -0700 2009 Refactored the timeline helper and added the "t... [Jason Garber]
directory app/ Mon Sep 07 13:23:44 -0700 2009 Add ability to revert layouts. [Jason Garber]
file chronicle_extension.rb Tue Jul 14 14:17:09 -0700 2009 Make children, parent, and find Radius tags ret... [Jason Garber]
directory db/ Mon Sep 21 12:55:27 -0700 2009 Try that migration one more time. You see, bef... [Jason Garber]
directory features/ Mon Sep 07 13:23:44 -0700 2009 Add ability to revert layouts. [Jason Garber]
directory lib/ Mon Sep 07 13:16:42 -0700 2009 Add ability to revert snippets. [Jason Garber]
directory public/ Mon Jun 29 11:46:03 -0700 2009 Small CSS fix for Safari 4. [Jason Garber]
directory spec/ Mon Sep 07 12:46:13 -0700 2009 Add rollback for pages. [Jason Garber]
directory vendor/ Fri Aug 07 11:51:51 -0700 2009 Paginate the history page. Closes #20. [Jason Garber]
README.textile

Chronicle

In an enterprise production environment, it’s critical that content editors, designers, and developers be able to edit pages and preview their changes without affecting the live version and that site administrators be able to see who changed what and roll back if necessary.

This extension adds versioning to pages, snippets, and layouts and uses their status to determine its visibility. The most recent published or hidden version is visible in live mode and the most recent version, a.k.a. the “current version,” is visible in dev mode regardless of its status. Thus, you can work on a draft in dev mode, preview exactly how it will look, and then make it live when you are ready by changing its status to published.

An example

Look at the revision history of the home page of example.com:

...22  23  24  25
---*---*---*---@
           ^   ^
   Published   Draft
  (live mode)  (dev mode)

If you went to example.com/ you would see version 24. If you went to dev.example.com/ you would see version 25.

Many people overlook the dev mode feature of Radiant. If you don’t know about it, see How to Setup Dev Mode on the Radiant wiki. You can also set a live.host configuration option if you don’t access Radiant admin at the live host.

Some terminology used in the specs:

  • The “current version” is the highest-numbered version, a.k.a. the “current dev” version.
  • The “current live” version is the most recent Published or Hidden page.
  • A page “is a draft” when its status is set to Draft.
  • A page “has a draft” when its current version is a draft.
  • When a page’s current version is Published, the page “does not have a draft”.

Features:

  • Simple graph showing the change history of pages, snippets, and layouts
  • Check a box to view the page in a new window/tab after saving
  • See what changed in a given version
  • Control how many versions are shown in the history by setting Radiant::Config[‘chronicle.history.per_page’]
  • TODO Roll back to a previous version by creating a new one based on it
  • TODO Integration with the Dashboard extension so you can see what has changed recently and what pages have unpublished changes (drafts ahead of published versions)
  • TODO Lines in the change graph showing ancestry when a page is rolled back
  • TODO Versioning including page attachments
  • Should be compatible with (and version the extra page attributes of) most extensions!

Someday/maybe:

  • Git interface

Installation

./script/extension install chronicle

- OR -

(from the radiant application root)

git clone git://github.com/jgarber/radiant-chronicle-extension.git vendor/extensions/chronicle
cd vendor/extensions/chronicle
git submodule init
git submodule update
cd ../../..
rake RAILS_ENV=production radiant:extensions:chronicle:migrate
rake RAILS_ENV=production radiant:extensions:chronicle:update

Acknowledgements

Written by Jason Garber for Eastern Mennonite University Thanks to Anton Astashov and Brenton Cheng for the PageVersioning extension, which provided some inspiration for Chronicle