summaryrefslogtreecommitdiff
path: root/README.rdoc
diff options
context:
space:
mode:
authorhukl <hukl@eight.local>2009-02-15 21:08:02 +0100
committerhukl <hukl@eight.local>2009-02-15 21:08:02 +0100
commitab939244c26743512763f64c5f4292826e4470c2 (patch)
treeac556e992c330fb5f7006b698a32785a4fb659ec /README.rdoc
parentc9d0f429b4ae6f82172b94282ff39734e1df8964 (diff)
renamed readme so it will render nicely on github
Diffstat (limited to 'README.rdoc')
-rw-r--r--README.rdoc120
1 files changed, 120 insertions, 0 deletions
diff --git a/README.rdoc b/README.rdoc
new file mode 100644
index 0000000..c52596f
--- /dev/null
+++ b/README.rdoc
@@ -0,0 +1,120 @@
1=CCCMS
2
3==Setup
4
5git clone git://github.com/hukl/cccms.git
6
7git checkout --track -b poc1 origin/poc1
8
9git submodule init
10
11git submodule update
12
13==Import old xml files
14
15extract db/updates.tbz
16
17start a script/console and execute the following commands:
18
19i = UpdateImporter.new("#{RAILS_ROOT}/db/updates")
20i.import_xml
21
22==Documentation
23
24User stories in doc/success_stories.txt
25
26execute: rake doc:app on the command line to get a html api documentation in
27doc/app
28
29==General
30
31===Nodes
32
33The whole structure of the website is built from nodes. They live within a
34nested set structure. Therefor a given node has parents, children, descendants
35etc.
36
37The position of a node within the nested set corresponds directly to the URL
38under which that node is accessible:
39
40root
41 \__updates
42 \__2009
43 \___ultra_important_news
44
45http://domain/de/updates/2009/ultra_important_news
46
47Note that the first parameter after the domain is the locale. Everything after
48the locale identifier is the unique path of a given node. The unique path itself
49is generated from the slugs of the ancestors of a node. The last part of the
50unique path is taken from the slug of the node.
51
52Once a node is added to the nested set or moved within, the unique path of that
53node is generated from all its ancestors up to the root node. The computed path
54is then saved on the node object itself, allowing the system to retrieve a
55node simply by looking for the right url in the unique_path column. This is a
56lot faster then walking down the tree.
57
58Nodes are really just proxy objects. They point to information but they don't
59hold that information themselves. Instead they have pages associated to them.
60When you want to render a particular node, you actually render a page associated
61to that node. When multiple pages are attached to a node, they act as one page
62with many revisions. The node itself holds the pointer to current or head
63revision.
64
65===Pages
66
67Although there is really one Page class, the pages associated to one node differ
68slightly. Obviously there is a slight difference between the head and the other
69revisions. While the head is always the most recent page which is publicly
70available, all the older revisions are only kind of a history.
71
72Now when a user wants to modify or edit the content of the head revision he or
73she is editing a new revision instead. This new revision is considered a draft
74and has the current content of the head revision copied onto itself.
75
76====Draft
77
78A draft has an author attached to it which makes sure that only the creator of
79that draft is able to edit it. This is a form of pessimistic locking as it
80prevents more than one user from editing and saving the same page.
81
82However, if an author should choose to abandon his draft or to let somebody else
83finish it, the author can withdraw his lock. In this case, the draft has no
84longer an author associated to itself which enables another user to edit this
85draft.
86
87To abandon or revert a draft, the author can also delete it entirely so that
88when another user is editing, he or she would get a fresh copy from the current
89head revision.
90
91Of course a admin user can always override or remove locks on drafts. In case
92an author created a draft but simply didn't care anymore, an admin could remove
93that draft or the lock on it, enabling other users to edit that page again.
94
95===Tags
96
97Pages of course come with meta data attatched to them. Tags are one kind of
98meta data. They can be understood and used as keywords, categories, tags or any
99similar concept.
100
101===Templates
102
103Althought there is only one, simple and unified, template for editing pages, it
104is possible to select from different templates for public display. This
105selection of templates allows slight alterations of the layout. For example one
106template would display every attribute of a page (like date, author, abstract)
107while another template would hide this information away. One would show the tags
108of a page, another wouldn't.
109
110===Aggregation
111
112Keywords and other meta data can be used to aggregate any ammount of pages
113into the body of another page.
114
115<aggregate
116 tags="update pressemitteilung"
117 limit="20"
118 order_by="published_at"
119 order_direction="DESC"
120/> \ No newline at end of file