Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 344
- Log:
Massive changeset which brings the old, ROOL customised Instiki
version up to date, but without any ROOL customisations in this
latest checked-in version (which is 0.19.1). This is deliberate,
so that it's easy to see the changes made for the ROOL version
in a subsequent changeset. The 'app/views/shared' directory is not
part of Instiki but is kept to maintain the change history with
updated ROOL customisations, some of which involve the same files
in that same directory.
- Author:
- rool
- Date:
- Sat Mar 19 19:52:13 +0000 2011
- Size:
- 1304 Bytes
1 | require 'chunks/chunk' |
2 | require 'instiki_stringsupport' |
3 | |
4 | # The category chunk looks for "category: news" on a line by |
5 | # itself and parses the terms after the ':' as categories. |
6 | # Other classes can search for Category chunks within |
7 | # rendered content to find out what categories this page |
8 | # should be in. |
9 | # |
10 | # Category lines can be hidden using ':category: news', for example |
11 | class Category < Chunk::Abstract |
12 | |
13 | CATEGORY_PATTERN = /^(:)?category\s*:(.*)$/i |
14 | def self.pattern() CATEGORY_PATTERN end |
15 | |
16 | attr_reader :hidden, :list |
17 | |
18 | def initialize(match_data, content) |
19 | super(match_data, content) |
20 | @content = content |
21 | @hidden = match_data[1] |
22 | @list = match_data[2].split(',').map { |c| clean = c.purify.strip.escapeHTML; clean if clean != ''} |
23 | @list.compact! |
24 | @unmask_text = '' |
25 | if @hidden |
26 | @unmask_text = '' |
27 | else |
28 | category_urls = @list.map { |category| url(category) }.join(', ') |
29 | @unmask_text = '<div class="property"> category: ' + category_urls + '</div>' |
30 | end |
31 | end |
32 | |
33 | # TODO move presentation of page metadata to controller/view |
34 | def url(category) |
35 | %{<a class="category_link" href="#{@content.url_generator.url_for :web => @content.web.address, |
36 | :action => 'list', :only_path => true}/#{CGI.escape(category)}">#{category}</a>} |
37 | end |
38 | end |