Pimki 1.8.092 → 1.8.200
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/wiki.rb +7 -1
- data/app/models/chunks/category.rb +1 -1
- data/app/models/wiki_content.rb +1 -1
- data/app/views/wiki/authors.rhtml +3 -1
- data/app/views/wiki/bliki_edit.rhtml +1 -1
- data/app/views/wiki/bliki_new.rhtml +1 -1
- data/app/views/wiki/edit.rhtml +1 -1
- data/app/views/wiki/list.rhtml +1 -1
- data/app/views/wiki/new.rhtml +1 -1
- data/app/views/wiki/rollback.rhtml +1 -1
- data/libraries/bluecloth.rb +3 -3
- data/libraries/erb.rb +1 -1
- data/pimki.rb +16 -14
- metadata +152 -157
- data/app/views/wiki/list.rhtml.bak +0 -175
data/app/controllers/wiki.rb
CHANGED
@@ -914,7 +914,13 @@ class WikiController < ActionControllerServlet
|
|
914
914
|
end
|
915
915
|
|
916
916
|
def convert_tex_to_pdf(tex_path)
|
917
|
-
|
917
|
+
if RUBY_PLATFORM =~ /mswin/
|
918
|
+
cmd = "cd #{File.dirname(tex_path)} & pdflatex -interaction=nonstopmode #{File.basename(tex_path)}"
|
919
|
+
cmd.gsub!("/","\\")
|
920
|
+
`cmd /c #{cmd}`
|
921
|
+
else
|
922
|
+
`cd #{File.dirname(tex_path)}; pdflatex --interaction=scrollmode '#{File.basename(tex_path)}'`
|
923
|
+
end
|
918
924
|
end
|
919
925
|
|
920
926
|
def truncate(text, length = 30, truncate_string = "...")
|
@@ -27,7 +27,7 @@ class Category < Chunk::Abstract
|
|
27
27
|
def unmask(content)
|
28
28
|
#replacement = ( hidden ? '' : '<div class="property">category:\1</div>' )
|
29
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>"
|
30
|
+
"<div class='property' #{'style="display: none"' if hidden}>category:#{$1.split(',').map { |c| c.strip!; "<a href='../list/?category=#{c}'>#{c}</a> " }}</div>"
|
31
31
|
}
|
32
32
|
end
|
33
33
|
end
|
data/app/models/wiki_content.rb
CHANGED
@@ -72,7 +72,7 @@ class WikiContent < String
|
|
72
72
|
@options[:engine_opts] = DEFAULT_OPTS[:engine_opts]
|
73
73
|
case @options[:engine].name
|
74
74
|
when 'Engines::Textile'
|
75
|
-
if
|
75
|
+
if %W{3.0.0 3.0.1 3.0.2 3.0.3}.include?(RedCloth::VERSION)
|
76
76
|
# RedCloth v3 changes the default behaviour from not folding lines.
|
77
77
|
@options[:engine_opts] += [:hard_breaks]
|
78
78
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<% @title = "Authors" %><%= sub_template "top" %>
|
2
2
|
|
3
|
-
|
3
|
+
<% if OPTIONS[:graphviz_available] %>
|
4
|
+
<p>You can also see a graph of authors->pages in the <a href="../mind/?draw_type=neato&graph_type=author&Go=Redraw">Mind Map<a> section.<p>
|
5
|
+
<% end %>
|
4
6
|
|
5
7
|
<ul id="authorList">
|
6
8
|
<% for author in @authors %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
<form action="../bliki_save/<%= @page.name %>" method="post">
|
13
13
|
<p>
|
14
|
-
<textarea name="content" style="width: 450px; height:
|
14
|
+
<textarea name="content" style="width: 450px; height: 450px"><%= @page.content %></textarea>
|
15
15
|
</p>
|
16
16
|
<p>
|
17
17
|
<% if @web.check_pass_on_edit %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<th align="right"><small><%= Date.today.strftime("%d %b %Y") %></small></th>
|
18
18
|
</tr>
|
19
19
|
<tr>
|
20
|
-
<td colspan="2"><textarea name="content" style="width: 450px; height:
|
20
|
+
<td colspan="2"><textarea name="content" style="width: 450px; height: 450px"></textarea></td>
|
21
21
|
</tr>
|
22
22
|
<tr style="background-color:efe">
|
23
23
|
<th colspan="2" align="right">
|
data/app/views/wiki/edit.rhtml
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<div id='main'>
|
15
15
|
<form style="float:left" id="editForm" action="../save/<%= @page.name %>" method="post" onSubmit="cleanAuthorName();">
|
16
16
|
<p>
|
17
|
-
<textarea name="content" style="width: 550px; height:
|
17
|
+
<textarea name="content" style="width: 550px; height: 450px"><%= @page.content %></textarea>
|
18
18
|
</p>
|
19
19
|
<p style="font-size: smaller;">This change is a...
|
20
20
|
<input type="radio" name="edit_type" value="minor">Minor Edit</input>
|
data/app/views/wiki/list.rhtml
CHANGED
data/app/views/wiki/new.rhtml
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
<form action="../save/<%= @page_name %>" method="post" onSubmit="cleanAuthorName();">
|
13
13
|
<p>
|
14
|
-
<textarea name="content" style="width: 550px; height:
|
14
|
+
<textarea name="content" style="width: 550px; height: 450px"></textarea>
|
15
15
|
</p>
|
16
16
|
<p>
|
17
17
|
<% if @web.check_pass_on_edit %>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
<form id="editForm" action="../save/<%= @page.name %>" method="post" onSubmit="cleanAuthorName();">
|
12
12
|
<p>
|
13
|
-
<textarea name="content" style="font-size: 12px; width: 450px; height:
|
13
|
+
<textarea name="content" style="font-size: 12px; width: 450px; height: 450px"><%= @revision.content %></textarea>
|
14
14
|
</p>
|
15
15
|
<p>
|
16
16
|
<% if @web.check_pass_on_edit %>
|
data/libraries/bluecloth.rb
CHANGED
@@ -52,7 +52,7 @@
|
|
52
52
|
#
|
53
53
|
# == Version
|
54
54
|
#
|
55
|
-
# $Id: bluecloth.rb
|
55
|
+
# $Id: bluecloth.rb 293 2006-03-23 10:35:27Z assaph $
|
56
56
|
#
|
57
57
|
|
58
58
|
require 'digest/md5'
|
@@ -85,10 +85,10 @@ class BlueCloth < String
|
|
85
85
|
Version = '0.0.3'
|
86
86
|
|
87
87
|
# SVN Revision
|
88
|
-
SvnRev = %q$Rev:
|
88
|
+
SvnRev = %q$Rev: 293 $
|
89
89
|
|
90
90
|
# SVN Id tag
|
91
|
-
SvnId = %q$Id: bluecloth.rb
|
91
|
+
SvnId = %q$Id: bluecloth.rb 293 2006-03-23 10:35:27Z assaph $
|
92
92
|
|
93
93
|
# SVN URL
|
94
94
|
SvnUrl = %q$URL: svn+ssh://cvs.faeriemud.org/var/svn/BlueCloth/trunk/lib/bluecloth.rb $
|
data/libraries/erb.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# You can redistribute it and/or modify it under the same terms as Ruby.
|
4
4
|
|
5
5
|
class ERB
|
6
|
-
Revision = '$Date: 2004
|
6
|
+
Revision = '$Date: 2004-11-09 13:01:56 +1100 (Tue, 09 Nov 2004) $' #'
|
7
7
|
|
8
8
|
def self.version
|
9
9
|
"erb.rb [2.0.4 #{ERB::Revision.split[1]}]"
|
data/pimki.rb
CHANGED
@@ -9,12 +9,12 @@ end
|
|
9
9
|
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), "libraries")
|
10
10
|
begin
|
11
11
|
require 'rubygems'
|
12
|
-
require_gem 'madeleine'
|
12
|
+
require_gem 'madeleine', '=0.7.1'
|
13
13
|
require_gem 'BlueCloth'
|
14
14
|
require_gem 'rubyzip'
|
15
15
|
require 'zip/zip'
|
16
16
|
|
17
|
-
rescue LoadError => detail
|
17
|
+
rescue LoadError, NoMethodError => detail
|
18
18
|
# no rubygems, so load from the libraries directory
|
19
19
|
p detail if $DEBUG
|
20
20
|
puts 'Unable to load libraries through RubyGems. Loading from ./libraries directory'
|
@@ -61,16 +61,16 @@ ARGV.options do |opts|
|
|
61
61
|
opts.separator ""
|
62
62
|
|
63
63
|
opts.on("-p", "--port=port", Integer,
|
64
|
-
"Runs
|
64
|
+
"Runs Pimki on the specified port.",
|
65
65
|
"Default: 2500\n") { |OPTIONS[:port]| }
|
66
66
|
opts.on("-s", "--simple", "--simple-server",
|
67
|
-
"Forces
|
67
|
+
"Forces Pimki not to run as a Daemon if fork is available.\n"
|
68
68
|
) { OPTIONS[:server_type] = SimpleServer }
|
69
69
|
opts.on("-t", "--storage=storage", String,
|
70
|
-
"Makes
|
70
|
+
"Makes Pimki use the specified directory for storage.",
|
71
71
|
"Default: [cwd]/storage/[port]\n") { |OPTIONS[:storage]| }
|
72
72
|
opts.on("-r", "--redcloth VERSION", String,
|
73
|
-
"Makes
|
73
|
+
"Makes Pimki use the specified RedCloth version.",
|
74
74
|
"You can specify major version only (2 or 3)",
|
75
75
|
"Default: 2.0.11\n") { |OPTIONS[:redcloth]| }
|
76
76
|
|
@@ -94,14 +94,16 @@ begin
|
|
94
94
|
else
|
95
95
|
require_gem 'RedCloth', "~> #{OPTIONS[:redcloth]}"
|
96
96
|
end
|
97
|
-
end
|
98
|
-
|
99
|
-
rescue LoadError, NoMethodError => detail
|
100
|
-
if OPTIONS[:redcloth] < '3'
|
101
|
-
require 'redcloth_2.0.11'
|
102
97
|
else
|
103
|
-
|
98
|
+
if OPTIONS[:redcloth] < '3'
|
99
|
+
require 'redcloth_2.0.11'
|
100
|
+
else
|
101
|
+
require 'redcloth'
|
102
|
+
end
|
104
103
|
end
|
104
|
+
rescue LoadError, NoMethodError => detail
|
105
|
+
# just try our luck
|
106
|
+
require 'redcloth'
|
105
107
|
end
|
106
108
|
|
107
109
|
# Remove the "caps" spanning:
|
@@ -151,8 +153,8 @@ if ['3.0.0', '3.0.1'].include? RedCloth::VERSION
|
|
151
153
|
retrieve text
|
152
154
|
hard_break text # PIMKI: this is the missing bit!
|
153
155
|
|
154
|
-
text.gsub!( /<\/?notextile>/, '' )
|
155
|
-
text.gsub!( /x%x%/, '&' )
|
156
|
+
text.gsub!( %r/<\/?notextile>/, '' )
|
157
|
+
text.gsub!( %r/x%x%/, '&' )
|
156
158
|
text.strip!
|
157
159
|
text
|
158
160
|
end #}}}
|
metadata
CHANGED
@@ -3,182 +3,177 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: Pimki
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.8.
|
7
|
-
date:
|
8
|
-
summary:
|
6
|
+
version: 1.8.200
|
7
|
+
date: 2006-06-04 00:00:00 +10:00
|
8
|
+
summary: A Personal Information Manager (PIM) based on Instiki's Wiki technology.
|
9
9
|
require_paths:
|
10
|
-
|
10
|
+
- libraries
|
11
11
|
email: assaph@gmail.com
|
12
12
|
homepage: http://pimki.rubyforge.org
|
13
13
|
rubyforge_project: pimki
|
14
|
-
description: "Pimki in a Personal Information Manager based on Instiki's Wiki technology.
|
15
|
-
Besides all the rich features and excellent look of Instiki, a few features have
|
16
|
-
been added, such as: a personal blog, todo lists, graphical mapping,
|
17
|
-
quick-links, advanced search and others."
|
14
|
+
description: "Pimki in a Personal Information Manager based on Instiki's Wiki technology. Besides all the rich features and excellent look of Instiki, a few features have been added, such as: a personal blog, todo lists, graphical mapping, quick-links, advanced search and others."
|
18
15
|
autorequire:
|
19
16
|
default_executable: pimki.rb
|
20
|
-
bindir:
|
17
|
+
bindir: .
|
21
18
|
has_rdoc: false
|
22
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
23
20
|
requirements:
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
version: 0.0.0
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
28
24
|
version:
|
29
25
|
platform: ruby
|
30
26
|
signing_key:
|
31
27
|
cert_chain:
|
32
28
|
authors:
|
33
|
-
|
29
|
+
- Assaph Mehr (based on work by David Heinemeier Hansson)
|
34
30
|
files:
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
- libraries/madeleine/zmarshal.rb
|
31
|
+
- pimki.rb
|
32
|
+
- README-PIMKI
|
33
|
+
- favicon.png
|
34
|
+
- ./pimki.rb
|
35
|
+
- app/controllers
|
36
|
+
- app/models
|
37
|
+
- app/views
|
38
|
+
- app/controllers/wiki.rb
|
39
|
+
- app/models/author.rb
|
40
|
+
- app/models/chunks
|
41
|
+
- app/models/page.rb
|
42
|
+
- app/models/page_lock.rb
|
43
|
+
- app/models/page_set.rb
|
44
|
+
- app/models/page_test.rb
|
45
|
+
- app/models/revision.rb
|
46
|
+
- app/models/revision_test.rb
|
47
|
+
- app/models/web.rb
|
48
|
+
- app/models/web_test.rb
|
49
|
+
- app/models/wiki_content.rb
|
50
|
+
- app/models/wiki_service.rb
|
51
|
+
- app/models/wiki_service_test.rb
|
52
|
+
- app/models/wiki_words.rb
|
53
|
+
- app/models/wiki_words_test.rb
|
54
|
+
- app/models/chunks/category.rb
|
55
|
+
- app/models/chunks/category_test.rb
|
56
|
+
- app/models/chunks/chunk.rb
|
57
|
+
- app/models/chunks/engines.rb
|
58
|
+
- app/models/chunks/include.rb
|
59
|
+
- app/models/chunks/literal.rb
|
60
|
+
- app/models/chunks/match.rb
|
61
|
+
- app/models/chunks/nowiki.rb
|
62
|
+
- app/models/chunks/nowiki_test.rb
|
63
|
+
- app/models/chunks/test.rb
|
64
|
+
- app/models/chunks/todo.rb
|
65
|
+
- app/models/chunks/uri.rb
|
66
|
+
- app/models/chunks/uri_test.rb
|
67
|
+
- app/models/chunks/wiki.rb
|
68
|
+
- app/models/chunks/wiki_symbols.rb
|
69
|
+
- app/models/chunks/wiki_test.rb
|
70
|
+
- app/views/bottom.rhtml
|
71
|
+
- app/views/error.rhtml
|
72
|
+
- app/views/markdown_help.rhtml
|
73
|
+
- app/views/menu.rhtml
|
74
|
+
- app/views/navigation.rhtml
|
75
|
+
- app/views/rdoc_help.rhtml
|
76
|
+
- app/views/static_style_sheet.rhtml
|
77
|
+
- app/views/style.rhtml
|
78
|
+
- app/views/textile_help.rhtml
|
79
|
+
- app/views/top.rhtml
|
80
|
+
- app/views/wiki
|
81
|
+
- app/views/wiki_words_help.rhtml
|
82
|
+
- app/views/wiki/adv_search.rhtml
|
83
|
+
- app/views/wiki/authors.rhtml
|
84
|
+
- app/views/wiki/bliki.rhtml
|
85
|
+
- app/views/wiki/bliki_edit.rhtml
|
86
|
+
- app/views/wiki/bliki_new.rhtml
|
87
|
+
- app/views/wiki/bliki_revision.rhtml
|
88
|
+
- app/views/wiki/edit.rhtml
|
89
|
+
- app/views/wiki/edit_menu.rhtml
|
90
|
+
- app/views/wiki/edit_web.rhtml
|
91
|
+
- app/views/wiki/export.rhtml
|
92
|
+
- app/views/wiki/feeds.rhtml
|
93
|
+
- app/views/wiki/glossary.rhtml
|
94
|
+
- app/views/wiki/list.rhtml
|
95
|
+
- app/views/wiki/locked.rhtml
|
96
|
+
- app/views/wiki/login.rhtml
|
97
|
+
- app/views/wiki/mind.rhtml
|
98
|
+
- app/views/wiki/new.rhtml
|
99
|
+
- app/views/wiki/new_system.rhtml
|
100
|
+
- app/views/wiki/new_web.rhtml
|
101
|
+
- app/views/wiki/page.rhtml
|
102
|
+
- app/views/wiki/print.rhtml
|
103
|
+
- app/views/wiki/published.rhtml
|
104
|
+
- app/views/wiki/recently_revised.rhtml
|
105
|
+
- app/views/wiki/revision.rhtml
|
106
|
+
- app/views/wiki/rollback.rhtml
|
107
|
+
- app/views/wiki/rss_feed.rhtml
|
108
|
+
- app/views/wiki/search.rhtml
|
109
|
+
- app/views/wiki/tex.rhtml
|
110
|
+
- app/views/wiki/tex_web.rhtml
|
111
|
+
- app/views/wiki/todo.rhtml
|
112
|
+
- app/views/wiki/web_list.rhtml
|
113
|
+
- libraries/action_controller_servlet.rb
|
114
|
+
- libraries/bluecloth.rb
|
115
|
+
- libraries/diff
|
116
|
+
- libraries/erb.rb
|
117
|
+
- libraries/madeleine
|
118
|
+
- libraries/madeleine_service.rb
|
119
|
+
- libraries/rdocsupport.rb
|
120
|
+
- libraries/redcloth_2.0.11.rb
|
121
|
+
- libraries/redcloth_for_tex.rb
|
122
|
+
- libraries/redcloth_for_tex_test.rb
|
123
|
+
- libraries/view_helper.rb
|
124
|
+
- libraries/web_controller_server.rb
|
125
|
+
- libraries/diff/diff.rb
|
126
|
+
- libraries/diff/diff_test.rb
|
127
|
+
- libraries/madeleine/automatic.rb
|
128
|
+
- libraries/madeleine/clock.rb
|
129
|
+
- libraries/madeleine/files.rb
|
130
|
+
- libraries/madeleine/zmarshal.rb
|
136
131
|
test_files: []
|
132
|
+
|
137
133
|
rdoc_options: []
|
134
|
+
|
138
135
|
extra_rdoc_files: []
|
136
|
+
|
139
137
|
executables:
|
140
|
-
|
138
|
+
- pimki.rb
|
141
139
|
extensions: []
|
140
|
+
|
142
141
|
requirements:
|
143
|
-
|
142
|
+
- none
|
144
143
|
dependencies:
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
- ">="
|
182
|
-
- !ruby/object:Gem::Version
|
183
|
-
version: 0.7.1
|
184
|
-
version:
|
144
|
+
- !ruby/object:Gem::Dependency
|
145
|
+
name: RedCloth
|
146
|
+
version_requirement:
|
147
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: 2.0.11
|
152
|
+
version:
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: BlueCloth
|
155
|
+
version_requirement:
|
156
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: 1.0.0
|
161
|
+
version:
|
162
|
+
- !ruby/object:Gem::Dependency
|
163
|
+
name: rubyzip
|
164
|
+
version_requirement:
|
165
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: 0.5.5
|
170
|
+
version:
|
171
|
+
- !ruby/object:Gem::Dependency
|
172
|
+
name: madeleine
|
173
|
+
version_requirement:
|
174
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
175
|
+
requirements:
|
176
|
+
- - "="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: 0.7.1
|
179
|
+
version:
|
@@ -1,175 +0,0 @@
|
|
1
|
-
<% @title = "All Pages" %>
|
2
|
-
<%= sub_template "top" %>
|
3
|
-
|
4
|
-
<!-- Categories Menu -->
|
5
|
-
<% unless @categories.empty? %>
|
6
|
-
<div id="categories">
|
7
|
-
<p><strong>Categories</strong>:
|
8
|
-
|
9
|
-
<% if @params["category"].nil? %>
|
10
|
-
[<span class='selected'>Any</span>]
|
11
|
-
<% else %>
|
12
|
-
<a href=".">Any</a>
|
13
|
-
<% end %>
|
14
|
-
|
15
|
-
<% if @params["category"] == 'none' %>
|
16
|
-
[<span class='selected'>None</span>]
|
17
|
-
<% else %>
|
18
|
-
<a href="?category=none">None</a>
|
19
|
-
<% end %>
|
20
|
-
|
21
|
-
<%= @category_links.join(', ') %>
|
22
|
-
</p>
|
23
|
-
</div>
|
24
|
-
<% end %>
|
25
|
-
|
26
|
-
<!-- Main Page List -->
|
27
|
-
<div id="listsContainer" style="float: left; width: 300px;">
|
28
|
-
<% unless @pages_that_are_orphaned.empty? && @page_names_that_are_wanted.empty? %>
|
29
|
-
<h2>
|
30
|
-
All Pages
|
31
|
-
<br/><small style="font-size: 12px"><i>All pages in <%= @set_name %> listed alphabetically</i></small>
|
32
|
-
</h2>
|
33
|
-
<% end %>
|
34
|
-
|
35
|
-
<ul><% for page in @pages_by_name.sort_by { |p| p.name } %><li><a href="../show/<%= page.name %>"><%= truncate(page.plain_name, 35) %></a></li><% end %></ul>
|
36
|
-
|
37
|
-
<% if @web.count_pages %>
|
38
|
-
<% total_chars = @pages_in_category.characters %>
|
39
|
-
<p><small>All content: <%= total_chars %> chars / <%= sprintf("%-.1f", (total_chars / 2275 )) %> pages</small></p>
|
40
|
-
<% end %>
|
41
|
-
|
42
|
-
|
43
|
-
<!-- Missing Pages -->
|
44
|
-
<% unless @page_names_that_are_wanted.empty? %>
|
45
|
-
<h2>
|
46
|
-
Wanted Pages
|
47
|
-
<br/><small style="font-size: 12px"><i>Unexisting pages that other pages in <%= @set_name %> reference</i></small>
|
48
|
-
</h2>
|
49
|
-
|
50
|
-
<ul style="margin-bottom: 10px">
|
51
|
-
<% for page_name in @page_names_that_are_wanted.sort_by { |pname| pname } %>
|
52
|
-
<li>
|
53
|
-
<a href="../show/<%= page_name %>"><%= truncate(WikiWords.separate(page_name), 35) %></a>
|
54
|
-
wanted by
|
55
|
-
<%= web.select.pages_that_reference(page_name).collect { |page| page.link }.join(", ") %>
|
56
|
-
</li>
|
57
|
-
<% end %>
|
58
|
-
</ul>
|
59
|
-
<% end %>
|
60
|
-
|
61
|
-
<!-- Orphaned Pages -->
|
62
|
-
<% unless @pages_that_are_orphaned.empty? %>
|
63
|
-
<h2>
|
64
|
-
Orphaned Pages
|
65
|
-
<br/><small style="font-size: 12px"><i>Pages in <%= @set_name %> that no other page reference</i></small>
|
66
|
-
</h2>
|
67
|
-
|
68
|
-
<ul style="margin-bottom: 35px">
|
69
|
-
<% for page in @pages_that_are_orphaned.sort_by { |p| p.name } %><li><a href="../show/<%= page.name %>"><%= truncate(page.plain_name, 35) %></a></li><% end %>
|
70
|
-
</ul>
|
71
|
-
<% end %>
|
72
|
-
</div>
|
73
|
-
<!-- Page Administration -->
|
74
|
-
<div id="pageAdmin"style="float: right; width: 280px; vertical-align: top;">
|
75
|
-
<script language="JavaScript1.2">
|
76
|
-
function validateSelection(fieldID) {
|
77
|
-
var selection = document.getElementById(fieldID).value;
|
78
|
-
if (selection == "noselect") {
|
79
|
-
alert("Please make a selection");
|
80
|
-
return false;
|
81
|
-
}
|
82
|
-
return true;
|
83
|
-
}
|
84
|
-
function validatePageName(fieldID) {
|
85
|
-
if (/^([A-Z]+[a-z]+[A-Z]\w+)$/.test(document.getElementById(fieldID).value)) {
|
86
|
-
return true;
|
87
|
-
} else {
|
88
|
-
alert('You wrote "' + document.getElementById(fieldID).value + '" as a page name, but it needs to be a wiki word.');
|
89
|
-
return false;
|
90
|
-
}
|
91
|
-
}
|
92
|
-
function verifyDelete() {
|
93
|
-
var del = confirm("Are you sure you want to delete " + document.getElementById('sel_delete').value + "?")
|
94
|
-
return del;
|
95
|
-
}
|
96
|
-
function verifyRename() {
|
97
|
-
if (!validatePageName('ren_newpage')) {
|
98
|
-
return false;
|
99
|
-
}
|
100
|
-
var ren = confirm("Are you sure you want to rename '" + document.getElementById('sel_rename').value +
|
101
|
-
"' to '" + document.getElementById('ren_newpage').value +
|
102
|
-
"'?\nNOTE: Links in other pages will have to be manually translated!")
|
103
|
-
return ren;
|
104
|
-
}
|
105
|
-
</script>
|
106
|
-
|
107
|
-
<!-- hr -->
|
108
|
-
<h2>Page Administration</h2>
|
109
|
-
|
110
|
-
<table border="0" style="font-size:10px">
|
111
|
-
<form class="navigation" action="list/" action="get">
|
112
|
-
<% if @web.check_pass_on_edit %>
|
113
|
-
<tr>
|
114
|
-
<td colspan="2">Enter edit Password <input type="password" name="password" id="password" size="11"> and...</td>
|
115
|
-
</tr>
|
116
|
-
<% end %>
|
117
|
-
<!-- Delete Page -->
|
118
|
-
<tr>
|
119
|
-
<td>Delete page:</td>
|
120
|
-
<td><select id="del_sel_page_name" name="del_sel_page_name" size="1" style="width:195">
|
121
|
-
<option value="noselect">------------</option>
|
122
|
-
<% for page in @pages_by_name %>
|
123
|
-
<option value="<%= page.name %>"><%= page.name %></option>
|
124
|
-
<% end %>
|
125
|
-
</select>
|
126
|
-
</td>
|
127
|
-
</tr>
|
128
|
-
<tr>
|
129
|
-
<td> </td>
|
130
|
-
<td align="right">
|
131
|
-
<input type="submit" name="Action" value="Delete" onClick="return validateSelection('sel_delete') && verifyDelete();">
|
132
|
-
</td>
|
133
|
-
</tr>
|
134
|
-
<!-- Rename Page -->
|
135
|
-
<tr>
|
136
|
-
<td>Rename:</td>
|
137
|
-
<td><select id="ren_sel_page_name" name="ren_sel_page_name" size="1" style="width:195">
|
138
|
-
<option value="noselect">------------</option>
|
139
|
-
<% for page in @pages_by_name %>
|
140
|
-
<option value="<%= page.name %>"><%= page.name %></option>
|
141
|
-
<% end %>
|
142
|
-
</select>
|
143
|
-
</td>
|
144
|
-
</tr>
|
145
|
-
<tr>
|
146
|
-
<td align="center">To:</td>
|
147
|
-
<td>
|
148
|
-
<input type="text" name="ren_newpage" id="ren_newpage" size="28">
|
149
|
-
</td>
|
150
|
-
</tr>
|
151
|
-
<tr>
|
152
|
-
<td> </td>
|
153
|
-
<td align="right">
|
154
|
-
<input type="submit" name="Action" value="Rename" onClick="return validateSelection('sel_rename') && verifyRename() && validatePageName('ren_newpage');">
|
155
|
-
</td>
|
156
|
-
</tr>
|
157
|
-
<!-- Create Page -->
|
158
|
-
<tr>
|
159
|
-
<td>Create New Page:</td>
|
160
|
-
<td>
|
161
|
-
<input type="text" name="newpage" id="newpage" size="28">
|
162
|
-
</td>
|
163
|
-
</tr>
|
164
|
-
<tr>
|
165
|
-
<td> </td>
|
166
|
-
<td align="right">
|
167
|
-
<input type="submit" name="Action" value="Create" onClick="return validatePageName('newpage');">
|
168
|
-
</td>
|
169
|
-
</td>
|
170
|
-
</tr>
|
171
|
-
</form>
|
172
|
-
</table>
|
173
|
-
</div>
|
174
|
-
|
175
|
-
<%= sub_template "bottom" %>
|