Pimki 1.6.092 → 1.7.092
Sign up to get free protection for your applications and to get access to all the features.
- data/README-PIMKI +13 -4
- data/app/controllers/wiki.rb +157 -62
- data/app/models/chunks/acronym.rb +19 -0
- data/app/models/chunks/category.rb +4 -2
- data/app/models/chunks/todo.rb +0 -1
- data/app/models/chunks/wiki.rb +19 -5
- data/app/models/revision.rb +2 -0
- data/app/models/web.rb +38 -38
- data/app/models/web_test.rb +1 -1
- data/app/models/wiki_service.rb +8 -7
- data/app/models/wiki_words.rb +3 -2
- data/app/models/wiki_words_test.rb +10 -0
- data/app/views/error.rhtml +4 -2
- data/app/views/menu.rhtml +1 -5
- data/app/views/navigation.rhtml +6 -6
- data/app/views/static_style_sheet.rhtml +25 -5
- data/app/views/textile_help.rhtml +1 -1
- data/app/views/top.rhtml +59 -57
- data/app/views/wiki/adv_search.rhtml +2 -2
- data/app/views/wiki/authors.rhtml +1 -1
- data/app/views/wiki/bliki.rhtml +7 -5
- data/app/views/wiki/bliki_edit.rhtml +2 -1
- data/app/views/wiki/bliki_new.rhtml +2 -1
- data/app/views/wiki/bliki_revision.rhtml +12 -19
- data/app/views/wiki/edit.rhtml +4 -4
- data/app/views/wiki/edit_menu.rhtml +2 -1
- data/app/views/wiki/edit_web.rhtml +83 -21
- data/app/views/wiki/export.rhtml +7 -0
- data/app/views/wiki/feeds.rhtml +7 -3
- data/app/views/wiki/glossary.rhtml +27 -0
- data/app/views/wiki/list.rhtml +5 -1
- data/app/views/wiki/login.rhtml +1 -0
- data/app/views/wiki/mind.rhtml +14 -2
- data/app/views/wiki/new_system.rhtml +3 -3
- data/app/views/wiki/new_web.rhtml +5 -1
- data/app/views/wiki/page.rhtml +1 -8
- data/app/views/wiki/published.rhtml +38 -0
- data/app/views/wiki/recently_revised.rhtml +6 -0
- data/app/views/wiki/rss_feed.rhtml +46 -0
- data/app/views/wiki/test.rhtml +25 -0
- data/app/views/wiki/todo.rhtml +5 -2
- data/app/views/wiki/web_list.rhtml +5 -1
- data/libraries/secure_web_controller_server.rb +106 -0
- data/pimki.rb +11 -7
- metadata +11 -4
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
# This chunk is supposed to pick up acronyms that have been defined on another
|
3
|
+
# page and define them on this page. See glossary for more details.
|
4
|
+
class Acronym < Chunk::Abstract
|
5
|
+
def self.pattern() %r{([A-Z]+)(<\/acronym>)?} end
|
6
|
+
|
7
|
+
def initialize(match_data, revision)
|
8
|
+
super(match_data, revision)
|
9
|
+
@acronym, @defined = match_data[1], match_data[2]
|
10
|
+
end
|
11
|
+
|
12
|
+
def unmask(content)
|
13
|
+
return self if @defined
|
14
|
+
|
15
|
+
definitions = revision.page.web.glossary_items.inject({}) { |hsh, (ac,df), pg| hsh[ac] = df }
|
16
|
+
return self if content.gsub!( Regexp.new(mask(content)), "<acronym title='#{definitions[@acronym]}'>#{@acronym}</acronym>" )
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
@@ -25,7 +25,9 @@ class Category < Chunk::Abstract
|
|
25
25
|
# If the chunk is hidden, erase the mask and return this chunk
|
26
26
|
# otherwise, surround it with a 'div' block.
|
27
27
|
def unmask(content)
|
28
|
-
replacement = ( hidden ? '' : '<div class="property">category:\1</div>' )
|
29
|
-
self if content.sub!( Regexp.new( pre_mask+'(.*)?'+post_mask )
|
28
|
+
#replacement = ( hidden ? '' : '<div class="property">category:\1</div>' )
|
29
|
+
self if content.sub!( Regexp.new( pre_mask+'(.*)?'+post_mask ) ) {
|
30
|
+
"<div class='property'>category:#{$1.split(',').map { |c| c.strip!; "<a href='../list/?category=#{c}'>#{c}</a> " }}</div>"
|
31
|
+
}
|
30
32
|
end
|
31
33
|
end
|
data/app/models/chunks/todo.rb
CHANGED
data/app/models/chunks/wiki.rb
CHANGED
@@ -80,21 +80,27 @@ module WikiChunk
|
|
80
80
|
else
|
81
81
|
@page_name, @link_text = match_data[1], match_data[1]
|
82
82
|
end
|
83
|
+
|
84
|
+
@link_text = WikiWords.separate(@link_text) if @link_text.match /^#{WikiWords::WIKI_WORD_PATTERN}$/
|
83
85
|
end
|
84
86
|
end
|
85
87
|
|
86
88
|
# This chunk handles [bliki[entry name]].
|
87
|
-
# This format
|
89
|
+
# This format has been extended for some other pre-configured redirection.
|
90
|
+
# Probably a bad name now, as we're using this for any link outside the current
|
91
|
+
# web, but if I change the class name it'll break existing storages.
|
88
92
|
class BlikiLink < WikiLink
|
89
93
|
def self.pattern() /\[(\w+)\[([\w\d\s]+)\]\]/ end
|
90
94
|
|
91
95
|
attr_reader :page_name, :link_text, :entry
|
92
|
-
|
96
|
+
|
93
97
|
def initialize(match_data, revision)
|
94
98
|
super(match_data, revision)
|
95
99
|
@target, @page_name, @link_text = match_data[1], match_data[2], match_data[2]
|
96
100
|
end
|
97
101
|
|
102
|
+
def mask(content) pre_mask + post_mask end
|
103
|
+
|
98
104
|
def unmask(content)
|
99
105
|
return self if content.sub!(regexp) { |match|
|
100
106
|
case @target
|
@@ -102,14 +108,22 @@ module WikiChunk
|
|
102
108
|
web = revision.page.web
|
103
109
|
entry = web.bliki[page_name]
|
104
110
|
if entry.nil?
|
105
|
-
"<span style='background:lightgrey;font-style:italic'>Unknown Bliki entry: '#{page_name}'</span>"
|
111
|
+
#"<span style='background:lightgrey;font-style:italic'>Unknown Bliki entry: '#{page_name}'</span>"
|
112
|
+
"<a class='newWikiWord' href='/#{web.address}/bliki_new/?entry_name=#{CGI::escape page_name}'>Bliki::#{page_name}</a>"
|
106
113
|
else
|
107
|
-
"<a class='existingWikiWord' href='/#{web.address}/bliki_revision/#{entry.name}?rev=#{entry.revisions.size-1}'
|
114
|
+
"<a class='existingWikiWord' href='/#{web.address}/bliki_revision/#{entry.name}?rev=#{entry.revisions.size-1}'>Bliki::#{entry.name}</a>"
|
108
115
|
end
|
109
116
|
|
110
117
|
when 'c2'
|
111
118
|
"<a href='http://c2.com/cgi/wiki?#{@page_name}'>C2::#{@page_name}</a>"
|
112
|
-
|
119
|
+
|
120
|
+
else
|
121
|
+
if web = WikiService.instance.webs[@target]
|
122
|
+
"<a href='/#{web.address}@/show/#@page_name'>#{web.name}::#@page_name</a>"
|
123
|
+
else
|
124
|
+
"<i>#@text</i>"
|
125
|
+
end
|
126
|
+
end
|
113
127
|
}
|
114
128
|
end
|
115
129
|
end
|
data/app/models/revision.rb
CHANGED
@@ -45,6 +45,8 @@ class Revision
|
|
45
45
|
def wiki_words
|
46
46
|
unless @wiki_words_cache
|
47
47
|
wiki_chunks = display_content.find_chunks(WikiChunk::WikiLink)
|
48
|
+
# BlikiLinks are used to link outside the wiki, so are not WikiLinks.
|
49
|
+
wiki_chunks.reject! { |chunk| chunk.kind_of? WikiChunk::BlikiLink }
|
48
50
|
@wiki_words_cache = wiki_chunks.map { |c| ( c.escaped_text ? nil : c.page_name ) }.compact.uniq
|
49
51
|
end
|
50
52
|
@wiki_words_cache
|
data/app/models/web.rb
CHANGED
@@ -6,8 +6,8 @@ require "zip/zip"
|
|
6
6
|
|
7
7
|
class Web
|
8
8
|
attr_accessor :pages, :name, :address, :password, :menu_type, :menu_content, :rendered_menu, :menu_limit, :menu_category
|
9
|
-
attr_accessor :markup, :color, :safe_mode, :additional_style, :published, :brackets_only, :count_pages
|
10
|
-
attr_accessor :mind_map_size, :symbols_map, :links_map, :enable_dclick_edit, :check_pass_on_edit
|
9
|
+
attr_accessor :markup, :color, :safe_mode, :additional_style, :published, :default_to_published, :brackets_only, :count_pages
|
10
|
+
attr_accessor :mind_map_size, :symbols_map, :links_map, :enable_dclick_edit, :check_pass_on_edit, :enable_menu
|
11
11
|
|
12
12
|
# Mind Map defaults
|
13
13
|
attr_accessor :mm_prog, :mm_graph_type, :mm_show_missing, :mm_show_authors, :mm_show_leaves, :mm_selected_categories
|
@@ -96,8 +96,10 @@ class Web
|
|
96
96
|
def color() @color || "008B26" end
|
97
97
|
def brackets_only() @brackets_only || false end
|
98
98
|
def count_pages() @count_pages || false end
|
99
|
+
def enable_menu() @enable_menu || true end
|
99
100
|
def menu_content() @menu_content || nil end
|
100
101
|
def menu_limit() @menu_limit || 20 end
|
102
|
+
def default_to_published() @default_to_published || false end
|
101
103
|
def menu_type()
|
102
104
|
(@menu_type.nil? || @menu_type.empty?) ? 'linkers' : @menu_type
|
103
105
|
end
|
@@ -108,9 +110,9 @@ class Web
|
|
108
110
|
def mm_show_authors() @mm_show_authors || false end
|
109
111
|
def mm_show_leaves() @mm_show_leaves || true end
|
110
112
|
def mm_selected_categories() @mm_selected_categories || [] end
|
111
|
-
|
113
|
+
|
112
114
|
# create a Mind Map graph and return the PNG and HTML map files generated
|
113
|
-
def create_mind_map(prog, missing, show_authors, show_leaves, selected_categories)
|
115
|
+
def create_mind_map(prog, missing, show_authors, show_leaves, selected_categories, mm_size)
|
114
116
|
dotFile = File.expand_path("#{WikiService.storage_path}/graph.dot")
|
115
117
|
mapFile = File.expand_path("#{WikiService.storage_path}/graph.map")
|
116
118
|
pngFile = File.expand_path("#{WikiService.storage_path}/map.png")
|
@@ -118,12 +120,7 @@ class Web
|
|
118
120
|
File.open(dotFile, "w") do |file|
|
119
121
|
|
120
122
|
# Graph properties:
|
121
|
-
file
|
122
|
-
file.puts "size=\"#{mind_map_size}\";"
|
123
|
-
file.puts 'ratio=fill;'
|
124
|
-
file.puts 'concentrate=true;'
|
125
|
-
file.puts 'node [fontsize=10,fontname="Tahoma"];'
|
126
|
-
file.puts 'edge [len=1.5];'
|
123
|
+
output_graph_header_to file, mm_size
|
127
124
|
|
128
125
|
# Links and node properties:
|
129
126
|
nodes = filter_categories(pages.values, selected_categories)
|
@@ -140,14 +137,14 @@ class Web
|
|
140
137
|
end
|
141
138
|
|
142
139
|
# Page Special nodes properties:
|
143
|
-
file.puts "
|
140
|
+
file.puts %{"Home Page" [color=\"##{color}\",style=bold];} if nodes.map{ |p| p.name }.include? "HomePage"
|
144
141
|
|
145
142
|
nodes.each do |page|
|
146
|
-
file.puts "#{page.
|
143
|
+
file.puts %{"#{page.plain_name}" [URL=\"../show/#{page.name}\"];}
|
147
144
|
page.references.each do |referer|
|
148
145
|
unless page.name == referer.name or not nodes.include? referer
|
149
146
|
unless !show_authors and auths.include? referer.name
|
150
|
-
file.puts "#{referer.
|
147
|
+
file.puts %{"#{referer.plain_name}" -> "#{page.plain_name}";}
|
151
148
|
end
|
152
149
|
end
|
153
150
|
end
|
@@ -159,17 +156,17 @@ class Web
|
|
159
156
|
nodes.each do |page|
|
160
157
|
missing.each do |wanted|
|
161
158
|
if page.content =~ /#{wanted}/
|
162
|
-
file.puts "#{page.
|
159
|
+
file.puts %{"#{page.plain_name}" -> "#{WikiWords.separate wanted}";}
|
163
160
|
shown_missing << wanted
|
164
161
|
end
|
165
162
|
end
|
166
163
|
end
|
167
164
|
shown_missing.each do |wanted|
|
168
|
-
file.puts "#{wanted} [URL
|
165
|
+
file.puts %{"#{WikiWords.separate wanted}" [URL="/#{@address}/show/#{wanted}", fontsize=10,style=filled,color=grey];}
|
169
166
|
end
|
170
167
|
end
|
171
168
|
|
172
|
-
file
|
169
|
+
output_graph_footer_to file
|
173
170
|
end
|
174
171
|
|
175
172
|
call_graphviz(prog, dotFile, mapFile, pngFile)
|
@@ -177,7 +174,7 @@ class Web
|
|
177
174
|
[pngFile, mapFile]
|
178
175
|
end
|
179
176
|
|
180
|
-
def create_author_graph(prog, selected_categories)
|
177
|
+
def create_author_graph(prog, selected_categories, mm_size)
|
181
178
|
dotFile = File.expand_path("#{WikiService.storage_path}/graph.dot")
|
182
179
|
mapFile = File.expand_path("#{WikiService.storage_path}/graph.map")
|
183
180
|
pngFile = File.expand_path("#{WikiService.storage_path}/map.png")
|
@@ -185,29 +182,24 @@ class Web
|
|
185
182
|
File.open(dotFile, "w") do |file|
|
186
183
|
|
187
184
|
# Graph properties:
|
188
|
-
file
|
189
|
-
file.puts "size=\"#{mind_map_size}\";" if mind_map_size
|
190
|
-
#file.puts 'ratio=fill;'
|
191
|
-
file.puts 'concentrate=true;'
|
192
|
-
file.puts 'node [fontsize=10,fontname="Tahoma"];'
|
193
|
-
file.puts 'edge [len=1.5];'
|
185
|
+
output_graph_header_to file, mm_size
|
194
186
|
|
195
187
|
# Links and node properties:
|
196
188
|
auths = authors # avoid repeated selects
|
197
189
|
auths.each do |auth|
|
198
|
-
file.puts "#{auth} [style=filled,color=grey,URL
|
190
|
+
file.puts %{"#{auth}" [style=filled,color=grey,URL="../show/#{auth}"];}
|
199
191
|
end
|
200
192
|
|
201
193
|
nodes = pages.values.reject { |entry| auths.include? entry.name }
|
202
194
|
nodes = filter_categories(nodes, selected_categories)
|
203
195
|
nodes.each do |page|
|
204
|
-
file.puts "#{page.
|
196
|
+
file.puts %{"#{page.plain_name}" [URL="../show/#{page.name}"];}
|
205
197
|
page.authors.each do |auth|
|
206
|
-
file.puts "#{auth} -> #{page.
|
198
|
+
file.puts %{"#{auth}" -> "#{page.plain_name}";}
|
207
199
|
end
|
208
200
|
end
|
209
201
|
|
210
|
-
file
|
202
|
+
output_graph_footer_to file
|
211
203
|
end
|
212
204
|
|
213
205
|
call_graphviz(prog, dotFile, mapFile, pngFile)
|
@@ -215,24 +207,19 @@ class Web
|
|
215
207
|
[pngFile, mapFile]
|
216
208
|
end
|
217
209
|
|
218
|
-
def create_category_graph(prog, show_authors, selected_categories) #{{{
|
210
|
+
def create_category_graph(prog, show_authors, selected_categories, mm_size) #{{{
|
219
211
|
dotFile = File.expand_path("#{WikiService.storage_path}/graph.dot")
|
220
212
|
mapFile = File.expand_path("#{WikiService.storage_path}/graph.map")
|
221
213
|
pngFile = File.expand_path("#{WikiService.storage_path}/map.png")
|
222
214
|
|
223
215
|
File.open(dotFile, "w") do |file|
|
224
216
|
# Graph properties:
|
225
|
-
file
|
226
|
-
file.puts "size=\"#{mind_map_size}\";" if mind_map_size
|
227
|
-
#file.puts 'ratio=fill;'
|
228
|
-
file.puts 'concentrate=true;'
|
229
|
-
file.puts 'node [fontsize=10,fontname="Tahoma"];'
|
230
|
-
file.puts 'edge [len=1.5];'
|
217
|
+
output_graph_header_to file, mm_size
|
231
218
|
|
232
219
|
# Page Special nodes properties:
|
233
220
|
categs = selected_categories.empty? ? categories : selected_categories
|
234
221
|
categs.each do |category|
|
235
|
-
file.puts "#{category} [fontsize=20,style=filled,color=grey,comment
|
222
|
+
file.puts %{"#{category}" [fontsize=20,style=filled,color=grey,comment="#{category}",URL="../list/?category=#{category}"];}
|
236
223
|
end
|
237
224
|
|
238
225
|
# Links and node properties:
|
@@ -244,13 +231,13 @@ class Web
|
|
244
231
|
}
|
245
232
|
end
|
246
233
|
nodes.each do |page|
|
247
|
-
file.puts "#{page.
|
234
|
+
file.puts %{"#{page.plain_name}" [URL=\"../show/#{page.name}\"];}
|
248
235
|
page.categories.each do |category|
|
249
|
-
file.puts "#{category} -> #{page.
|
236
|
+
file.puts %{"#{category}" -> "#{page.plain_name}";}
|
250
237
|
end
|
251
238
|
end
|
252
239
|
|
253
|
-
file
|
240
|
+
output_graph_footer_to file
|
254
241
|
end
|
255
242
|
|
256
243
|
call_graphviz(prog, dotFile, mapFile, pngFile)
|
@@ -258,6 +245,19 @@ class Web
|
|
258
245
|
[pngFile, mapFile]
|
259
246
|
end #}}}
|
260
247
|
|
248
|
+
def output_graph_header_to file, mm_size
|
249
|
+
file.puts "digraph G {"
|
250
|
+
file.puts "size=\"#{mm_size}\";" if mm_size
|
251
|
+
file.puts 'ratio=fill;'
|
252
|
+
file.puts 'concentrate=true;'
|
253
|
+
file.puts 'node [fontsize=10,fontname="Tahoma"];'
|
254
|
+
file.puts 'edge [len=1.5];'
|
255
|
+
end
|
256
|
+
|
257
|
+
def output_graph_footer_to file
|
258
|
+
file.puts "}"
|
259
|
+
end
|
260
|
+
|
261
261
|
def filter_categories(pages, selected_categories) #{{{
|
262
262
|
nodes = pages
|
263
263
|
unless selected_categories.empty?
|
data/app/models/web_test.rb
CHANGED
data/app/models/wiki_service.rb
CHANGED
@@ -7,6 +7,7 @@ require "author"
|
|
7
7
|
|
8
8
|
class WikiService < MadeleineService
|
9
9
|
attr_reader :webs, :system
|
10
|
+
attr_accessor :default_web
|
10
11
|
|
11
12
|
# These methods do not change the state of persistent objects, and
|
12
13
|
# should not be logged by Madeleine
|
@@ -21,7 +22,7 @@ class WikiService < MadeleineService
|
|
21
22
|
end
|
22
23
|
|
23
24
|
def authenticate(password)
|
24
|
-
password == (@system["password"] || "
|
25
|
+
password == (@system["password"] || "pimki")
|
25
26
|
end
|
26
27
|
|
27
28
|
def setup(password, web_name, web_address)
|
@@ -34,10 +35,10 @@ class WikiService < MadeleineService
|
|
34
35
|
end
|
35
36
|
|
36
37
|
def update_web(old_address, new_address, name, markup, color, additional_style, safe_mode = false,
|
37
|
-
password = nil, published = false,
|
38
|
-
mind_map_size="7,7", symbols_map=nil, links_map=nil,
|
38
|
+
password = nil, published = false, default_to_published = false, brackets_only = false,
|
39
|
+
count_pages = false, mind_map_size="7,7", symbols_map=nil, links_map=nil,
|
39
40
|
snapshots_interval = 1,
|
40
|
-
enable_dclick_edit=nil, check_pass_on_edit=false,
|
41
|
+
enable_dclick_edit=nil, enable_menu=true, check_pass_on_edit=false,
|
41
42
|
prog=nil, graph_type=nil, missing=nil, show_authors=nil, show_leaves=nil, selected_categories=nil)
|
42
43
|
|
43
44
|
if old_address != new_address
|
@@ -54,10 +55,10 @@ class WikiService < MadeleineService
|
|
54
55
|
web.name, web.markup, web.color, web.additional_style, web.safe_mode =
|
55
56
|
name, markup, color, additional_style, safe_mode
|
56
57
|
|
57
|
-
web.password, web.published, web.brackets_only, web.count_pages =
|
58
|
-
password, published, brackets_only, count_pages
|
58
|
+
web.password, web.published, web.default_to_published, web.brackets_only, web.count_pages =
|
59
|
+
password, published, default_to_published, brackets_only, count_pages
|
59
60
|
|
60
|
-
web.enable_dclick_edit, web.check_pass_on_edit = enable_dclick_edit, check_pass_on_edit
|
61
|
+
web.enable_dclick_edit, web.enable_menu, web.check_pass_on_edit = enable_dclick_edit, enable_menu, check_pass_on_edit
|
61
62
|
|
62
63
|
web.mind_map_size, web.mm_prog, web.mm_graph_type, web.mm_show_missing =
|
63
64
|
mind_map_size, prog, graph_type, missing
|
data/app/models/wiki_words.rb
CHANGED
@@ -17,12 +17,13 @@ module WikiWords
|
|
17
17
|
DIGITS = "0123456789"
|
18
18
|
|
19
19
|
WIKI_WORD_PATTERN = '[A-Z' + I18N_HIGHER_CASE_LETTERS + ']+[a-z' + I18N_LOWER_CASE_LETTERS + ']+[a-z' + I18N_LOWER_CASE_LETTERS + DIGITS + ']*[A-Z' + I18N_HIGHER_CASE_LETTERS + DIGITS + ']\w+'
|
20
|
+
CAMEL_CASED_WORD_BORDER = /([a-z#{I18N_LOWER_CASE_LETTERS}#{DIGITS}]|[A-Z#{I18N_HIGHER_CASE_LETTERS}]{2,})(?=[A-Z#{I18N_HIGHER_CASE_LETTERS}]\B)/u
|
20
21
|
|
21
22
|
def self.separate(wiki_word, ignore_separation = false)
|
22
|
-
if ignore_separation
|
23
|
+
if ignore_separation or wiki_word.match(/^[A-Z#{I18N_HIGHER_CASE_LETTERS}]+$/) or wiki_word.match(/\s/)
|
23
24
|
wiki_word
|
24
25
|
else
|
25
|
-
wiki_word.gsub(
|
26
|
+
wiki_word.gsub(CAMEL_CASED_WORD_BORDER, '\1 \2').gsub(/(.)(\d+)/u) { $1 == '_' ? "#$1#$2" : "#$1 #$2" }
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
@@ -9,4 +9,14 @@ class WikiWordsTest < Test::Unit::TestCase
|
|
9
9
|
assert_equal "Æe ÅØle Øen", WikiWords.separate("ÆeÅØleØen")
|
10
10
|
assert_equal "Legetøj", WikiWords.separate("Legetøj")
|
11
11
|
end
|
12
|
+
|
13
|
+
def test_pimki_wiki_words
|
14
|
+
assert_equal "XYZ", WikiWords.separate("XYZ")
|
15
|
+
assert_equal "WXYZ", WikiWords.separate("WXYZ")
|
16
|
+
assert_equal "XYZ to XML", WikiWords.separate("XYZ to XML")
|
17
|
+
assert_equal "WXYZ to XML", WikiWords.separate("WXYZ to XML")
|
18
|
+
assert_equal "XML Schema Stuff", WikiWords.separate("XMLSchemaStuff")
|
19
|
+
assert_equal "Schema XML Stuff", WikiWords.separate("SchemaXMLStuff")
|
20
|
+
assert_equal "Schema Stuff XML", WikiWords.separate("SchemaStuffXML")
|
21
|
+
end
|
12
22
|
end
|
data/app/views/error.rhtml
CHANGED
@@ -24,8 +24,10 @@
|
|
24
24
|
|
25
25
|
<p><b>Action:</b> <%= @action_name %></p>
|
26
26
|
|
27
|
-
<p><b>
|
28
|
-
|
27
|
+
<p><b>Request:</b> <%= @req %></p>
|
28
|
+
|
29
|
+
<p><b>Backtrace:</b></p>
|
30
|
+
<p><table border="0">
|
29
31
|
<% for line in @error_details.backtrace %>
|
30
32
|
<tr><td><code><%= line.sub(/(.*)\/(\w+\.rb):(\d+):in (.*)/, '\1/<b>\2</b>:\3:in <b>\4</b>') %></code></td></tr>
|
31
33
|
<% end %>
|
data/app/views/menu.rhtml
CHANGED
@@ -1,14 +1,10 @@
|
|
1
1
|
<div id="Menu" width="150">
|
2
|
-
<p>
|
3
2
|
<table>
|
4
3
|
<% published = @action_name =~ /published/
|
5
4
|
show_by = published ? '../published/' : '../show/'
|
6
5
|
begin %>
|
7
6
|
<tr><th><%= @web.name %> Quick Links</th></tr>
|
8
|
-
|
9
|
-
<tr><td><a href='<%= "/#{web.address}/edit_menu/" %>' style="font-size: 9px;">Edit Menu Contents</a></td></tr>
|
10
|
-
<% end %>
|
11
|
-
<tr><td> </td></tr>
|
7
|
+
<tr><th> </th></tr>
|
12
8
|
<% if @menu_pages.nil? %>
|
13
9
|
<tr><td><%= @menu_content %></td></tr>
|
14
10
|
<% else %>
|
data/app/views/navigation.rhtml
CHANGED
@@ -11,17 +11,17 @@ end
|
|
11
11
|
<form id="navigationForm" class="navigation" action="../search/" method="get" style="font-size: 10px">
|
12
12
|
<%= list_item "Home Page", "../show/HomePage", "Home, Sweet Home", "H" %> |
|
13
13
|
<%= list_item "All Pages", "../list/", "Alphabetically sorted list of pages", "A" %> |
|
14
|
-
<% if
|
14
|
+
<% if OPTIONS[:graphviz_available] %>
|
15
15
|
<%= list_item "Mind Map", "../mind/", "A 'Mind Map' graph of wiki pages", "M" %> |
|
16
16
|
<% end %>
|
17
17
|
<%= list_item "Bliki", "../bliki/", "Bliki", "B" %> |
|
18
18
|
<%= list_item "ToDo", "../todo/", "Todo items from all pages", "T" %> |
|
19
19
|
<%= list_item "Recently Revised", "../recently_revised/", "Pages sorted by when they were last changed", "U" %> |
|
20
|
-
|
21
|
-
<%= list_item "
|
22
|
-
<%= list_item "
|
20
|
+
<%= list_item "Authors", "../authors/", "Who wrote what" %> |
|
21
|
+
<%= list_item "Feeds", "../feeds/", "Subscribe to changes by RSS" %> |
|
22
|
+
<%= list_item "Glossary", "../glossary/", "Acronyms used in this web" %> |
|
23
|
+
<%= list_item "Web Setup", "../edit_web/", "Edit this web's options" %> |
|
23
24
|
<%= list_item "Export", "../export/", "Download a zip with all the pages in this wiki", "X" %> |
|
24
|
-
-->
|
25
25
|
<input type="text" id="searchField" name="query" style="font-size: 10px" value="Search" onClick="this.value == 'Search' ? this.value = '' : true">
|
26
|
-
|
26
|
+
<%= list_item "<small>(Adv)</small>", "../adv_search/", "Advanced Search" %>
|
27
27
|
</form>
|
@@ -3,6 +3,7 @@
|
|
3
3
|
margin: 0 auto;
|
4
4
|
text-align: left;
|
5
5
|
width: 180px;
|
6
|
+
margin-top: 15px;
|
6
7
|
}
|
7
8
|
|
8
9
|
#Menu a, existingWikiWord, newWikiWord {
|
@@ -16,11 +17,22 @@
|
|
16
17
|
text-align: left
|
17
18
|
}
|
18
19
|
|
20
|
+
#Menu a {
|
21
|
+
text-decoration:none;
|
22
|
+
color: #555;
|
23
|
+
}
|
24
|
+
#Menu a:hover {
|
25
|
+
color: #fff;
|
26
|
+
}
|
27
|
+
#Menu td {
|
28
|
+
line-height: 90%;
|
29
|
+
}
|
30
|
+
|
19
31
|
#Container {
|
20
32
|
float: left;
|
21
33
|
margin: 0 auto;
|
22
|
-
text-align:
|
23
|
-
|
34
|
+
text-align: left;
|
35
|
+
padding-left: <%= web && web.enable_menu ? "10px" : "180px" %>;
|
24
36
|
}
|
25
37
|
|
26
38
|
#Content {
|
@@ -51,7 +63,7 @@ a:hover { color: #fff; background-color:#000; }
|
|
51
63
|
|
52
64
|
|
53
65
|
h1, h2, h3 { color: #333; font-family: georgia, verdana; }
|
54
|
-
h1 { font-size:
|
66
|
+
h1 { font-size: 24px; color: blue }
|
55
67
|
h2 { font-size: 19px; color: darkblue }
|
56
68
|
h3 { font-size: 16px; color: darkblue }
|
57
69
|
|
@@ -107,7 +119,7 @@ li { margin-bottom: 7px }
|
|
107
119
|
.inputBox {
|
108
120
|
font-family: verdana, arial, helvetica, sans-serif;
|
109
121
|
font-size: 11px;
|
110
|
-
background-color: #
|
122
|
+
background-color: #eef;
|
111
123
|
padding: 5px;
|
112
124
|
margin-bottom: 20px;
|
113
125
|
}
|
@@ -141,7 +153,8 @@ ol.setup li {
|
|
141
153
|
font-size: 10px;
|
142
154
|
font-style: italic;
|
143
155
|
margin-bottom: 10px;
|
144
|
-
|
156
|
+
padding-left: 5px;
|
157
|
+
color: grey;
|
145
158
|
}
|
146
159
|
|
147
160
|
.references {
|
@@ -162,6 +175,13 @@ ins.diffmod {
|
|
162
175
|
background: lightgreen;
|
163
176
|
}
|
164
177
|
|
178
|
+
#TextileHelp {
|
179
|
+
float: right;
|
180
|
+
width: 250px;
|
181
|
+
margin-top: 5px
|
182
|
+
padding-left: 5px
|
183
|
+
}
|
184
|
+
|
165
185
|
#TextileHelp table {
|
166
186
|
margin-bottom: 0;
|
167
187
|
}
|