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
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="TextileHelp"
|
1
|
+
<div id="TextileHelp">
|
2
2
|
<h3>Textile formatting tips (<a href="#" onClick="quickRedReference(); return false;">advanced</a>)</h3>
|
3
3
|
<table cellspacing="0" cellpadding="0">
|
4
4
|
<tr><td>_your text_</td><td class="arrow">→</td><td><em>your text</em></td></tr>
|
data/app/views/top.rhtml
CHANGED
@@ -1,57 +1,59 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
-
<head>
|
4
|
-
<title>
|
5
|
-
<% if @web && @page && @page.name == "HomePage" && %( show published print ).include?(@action_name) %>
|
6
|
-
<%= @web.name %>
|
7
|
-
<% elsif @web %>
|
8
|
-
<%= @title %> in <%= @web.name %>
|
9
|
-
<% else %>
|
10
|
-
<%= @title %>
|
11
|
-
<% end %>
|
12
|
-
</title>
|
13
|
-
|
14
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
15
|
-
|
16
|
-
<style type="text/css">
|
17
|
-
h1#pageName, .newWikiWord a, a.existingWikiWord, .newWikiWord a:hover, #TextileHelp h3 {
|
18
|
-
color: #<%= @web ? @web.color : "393" %>;
|
19
|
-
}
|
20
|
-
|
21
|
-
#Container, #Content {
|
22
|
-
width: <%= @content_width || "600" %>px;
|
23
|
-
}
|
24
|
-
<%= sub_template("static_style_sheet") if @inline_style %>
|
25
|
-
</style>
|
26
|
-
|
27
|
-
<link rel="Stylesheet" href="../static_style_sheet/" type="text/css" media="screen" />
|
28
|
-
|
29
|
-
<style type="text/css">
|
30
|
-
<%= @style_additions %>
|
31
|
-
<%= @web ? web.additional_style : "" %>
|
32
|
-
</style>
|
33
|
-
</head>
|
34
|
-
|
35
|
-
<% if @web && @page && @web.enable_dclick_edit && @action_name
|
36
|
-
<body ondblclick="location.href='../edit/<%= @page.name %>'">
|
37
|
-
<% else %>
|
38
|
-
<body>
|
39
|
-
<% end %>
|
40
|
-
|
41
|
-
<%= sub_template "menu"
|
42
|
-
|
43
|
-
<div id="Container">
|
44
|
-
<div id="Content">
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<title>
|
5
|
+
<% if @web && @page && @page.name == "HomePage" && %( show published print ).include?(@action_name) %>
|
6
|
+
<%= @web.name %>
|
7
|
+
<% elsif @web %>
|
8
|
+
<%= @title %> in <%= @web.name %>
|
9
|
+
<% else %>
|
10
|
+
<%= @title %>
|
11
|
+
<% end %>
|
12
|
+
</title>
|
13
|
+
|
14
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
15
|
+
|
16
|
+
<style type="text/css">
|
17
|
+
h1#pageName, .newWikiWord a, a.existingWikiWord, .newWikiWord a:hover, #TextileHelp h3 {
|
18
|
+
color: #<%= @web ? @web.color : "393" %>;
|
19
|
+
}
|
20
|
+
|
21
|
+
#Container, #Content {
|
22
|
+
width: <%= @content_width || "600" %>px;
|
23
|
+
}
|
24
|
+
<%= sub_template("static_style_sheet") if @inline_style %>
|
25
|
+
</style>
|
26
|
+
|
27
|
+
<link rel="Stylesheet" href="../static_style_sheet/" type="text/css" media="screen" />
|
28
|
+
|
29
|
+
<style type="text/css">
|
30
|
+
<%= @style_additions %>
|
31
|
+
<%= @web ? web.additional_style : "" %>
|
32
|
+
</style>
|
33
|
+
</head>
|
34
|
+
|
35
|
+
<% if @web && @page && @web.enable_dclick_edit && !%( new edit revision bliki bliki_new bliki_edit bliki_revision published ).include?(@action_name) %>
|
36
|
+
<body ondblclick="location.href='../edit/<%= @page.name %>'">
|
37
|
+
<% else %>
|
38
|
+
<body>
|
39
|
+
<% end %>
|
40
|
+
|
41
|
+
<%= sub_template "menu" if web && web.enable_menu && !@hide_menu %>
|
42
|
+
|
43
|
+
<div id="Container">
|
44
|
+
<div id="Content">
|
45
|
+
|
46
|
+
<div id="Head">
|
47
|
+
<h1 id="pageName">
|
48
|
+
<% if @web && @page && @page.name == "HomePage" && %( show published print ).include?(@action_name) %>
|
49
|
+
<%= @web.name %>
|
50
|
+
<% elsif @web %>
|
51
|
+
<small><%= @web.name %></small><br />
|
52
|
+
<%= @title %>
|
53
|
+
<% else %>
|
54
|
+
<%= @title %>
|
55
|
+
<% end %>
|
56
|
+
</h1>
|
57
|
+
|
58
|
+
<%= ('<hr />' + sub_template("navigation")) unless @web.nil? || @hide_navigation %>
|
59
|
+
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% @title = "Advanced Search Options" %>
|
2
2
|
<%= sub_template "top" %>
|
3
|
-
|
3
|
+
<div class='content-box'>
|
4
4
|
<h3>Advanced Search Options:</h3>
|
5
5
|
|
6
6
|
<form action="../search/" method="post">
|
@@ -55,7 +55,7 @@
|
|
55
55
|
</tr>
|
56
56
|
</table>
|
57
57
|
</form>
|
58
|
-
|
58
|
+
</div>
|
59
59
|
|
60
60
|
<%= sub_template "bottom" %>
|
61
61
|
|
data/app/views/wiki/bliki.rhtml
CHANGED
@@ -13,11 +13,9 @@
|
|
13
13
|
<br /><a href="../bliki/" class="navlink" accesskey="R">Remove Filter</a>
|
14
14
|
<% end %>
|
15
15
|
|
16
|
-
<p><a href="../bliki_new/" class="navlink" accesskey="E">New Entry</a></p>
|
17
|
-
|
18
16
|
<% if @entries.length > 0 %>
|
19
|
-
<table width="100%">
|
20
17
|
<% (@entries.length > 3 ? 3 : @entries.length).times do |idx| %>
|
18
|
+
<table width="100%" class='content-box' ondblclick="location.href='../bliki_edit/<%= @entries[idx].name %>'">
|
21
19
|
<tr>
|
22
20
|
<td width="70%"><h3 style="color:<%= @color %>"><%= @entries[idx].plain_name %></h3></td>
|
23
21
|
</tr>
|
@@ -50,13 +48,17 @@
|
|
50
48
|
</td>
|
51
49
|
<th align="right"><small><%= @entries[idx].author_link %></small></th>
|
52
50
|
</tr>
|
53
|
-
<tr
|
54
|
-
|
51
|
+
<tr>
|
52
|
+
<td colspan="2"><hr /></td>
|
53
|
+
</tr>
|
55
54
|
</table>
|
55
|
+
<% end %>
|
56
56
|
<% else %>
|
57
57
|
<p><strong>No entries found.</strong></p>
|
58
58
|
<% end %>
|
59
59
|
|
60
|
+
<p><a href="../bliki_new/" class="navlink" accesskey="E">Create New Entry</a></p>
|
61
|
+
|
60
62
|
<h2>All Entries:</h2>
|
61
63
|
<ul>
|
62
64
|
<% @entries.each do |page| %>
|
@@ -3,6 +3,7 @@
|
|
3
3
|
@content_width = 720
|
4
4
|
@hide_navigation = true
|
5
5
|
@hide_menu = true
|
6
|
+
@style_additions = "#Content, #Container {padding-left:100px;}"
|
6
7
|
%>
|
7
8
|
<%= sub_template "top" %>
|
8
9
|
|
@@ -12,7 +13,7 @@
|
|
12
13
|
<form action="../bliki_save/" method="post" onSubmit="return validateWikiWords();">
|
13
14
|
<table width="450">
|
14
15
|
<tr style="background-color:dfd">
|
15
|
-
<td width="70%">Title: <input size="40%" type="text" name="pagename" id="newPageName"></td>
|
16
|
+
<td width="70%">Title: <input size="40%" type="text" name="pagename" id="newPageName" value='<%= @entry_name %>'></td>
|
16
17
|
<th align="right"><small><%= Date.today.strftime("%d %b %Y") %></small></th>
|
17
18
|
</tr>
|
18
19
|
<tr>
|
@@ -1,17 +1,13 @@
|
|
1
1
|
<% @title = "#{@page.plain_name} (Rev ##{@revision.number})" %>
|
2
2
|
<%= sub_template "top" %>
|
3
3
|
|
4
|
-
<table width="100%">
|
5
|
-
<tr style="background-color:dfd">
|
6
|
-
<td width="70%"><h4><%= @revision.page.name %></h4></td>
|
7
|
-
<th><small><%= @revision.pretty_created_at %></small></th>
|
8
|
-
</tr>
|
4
|
+
<table width="100%" class='content-box'>
|
9
5
|
<tr>
|
10
6
|
<td colspan="2">
|
11
|
-
<div id="revision">
|
7
|
+
<div id="revision-content">
|
12
8
|
<%= @revision.display_content %>
|
13
9
|
</div>
|
14
|
-
<div id="changes" style="display: none">
|
10
|
+
<div id="changes-content" style="display: none">
|
15
11
|
<p style="background: #eee; padding: 3px; border: 1px solid silver">
|
16
12
|
<small>
|
17
13
|
Showing changes from revision #<%= @page.number - 1 %> to #<%= @page.number %>:
|
@@ -23,16 +19,13 @@
|
|
23
19
|
</div>
|
24
20
|
</td>
|
25
21
|
</tr>
|
26
|
-
<tr style="
|
27
|
-
<
|
22
|
+
<tr style="font-style:italic;">
|
23
|
+
<td style="padding-left:5px"><small>Revision <%= @revision.number+1 %> of <%= @page.revisions.length %> from
|
24
|
+
<%= @revision.pretty_created_at %></small></td>
|
25
|
+
<td style="font-weight:bold;text-align:right;padding-right:5px"><small><%= web.make_link(@page.revisions.first.author, nil, {}) %></small></td>
|
28
26
|
</tr>
|
29
27
|
</table>
|
30
28
|
|
31
|
-
<div class="byline">
|
32
|
-
<%= "Revision from #{@revision.pretty_created_at} by" %>
|
33
|
-
<%# @page.web.pages[@revision.author] ? WikiWords.existing_page_link(@revision.author) : WikiWords.unexisting_page_link(@revision.author) %>
|
34
|
-
</div>
|
35
|
-
|
36
29
|
<div class="navigation">
|
37
30
|
<a href="../bliki_edit/<%= @page.name %>" class="navlink">Edit</a> |
|
38
31
|
<% if @revision.previous_revision %>
|
@@ -74,14 +67,14 @@
|
|
74
67
|
|
75
68
|
<script language="Javascript">
|
76
69
|
function toggleChanges() {
|
77
|
-
if (document.getElementById("changes").style.display == "none") {
|
78
|
-
document.getElementById("changes").style.display = "block";
|
79
|
-
document.getElementById("revision").style.display = "none";
|
70
|
+
if (document.getElementById("changes-content").style.display == "none") {
|
71
|
+
document.getElementById("changes-content").style.display = "block";
|
72
|
+
document.getElementById("revision-content").style.display = "none";
|
80
73
|
document.getElementById("show_changes").style.display = "none";
|
81
74
|
document.getElementById("hide_changes").style.display = "inline";
|
82
75
|
} else {
|
83
|
-
document.getElementById("changes").style.display = "none";
|
84
|
-
document.getElementById("revision").style.display = "block";
|
76
|
+
document.getElementById("changes-content").style.display = "none";
|
77
|
+
document.getElementById("revision-content").style.display = "block";
|
85
78
|
document.getElementById("show_changes").style.display = "inline";
|
86
79
|
document.getElementById("hide_changes").style.display = "none";
|
87
80
|
}
|
data/app/views/wiki/edit.rhtml
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
@content_width = 810
|
4
4
|
@hide_navigation = true
|
5
5
|
@hide_menu = true
|
6
|
-
@style_additions = "#Content, #Container {padding-left:100px;}"
|
6
|
+
@style_additions = "#Content, #Container {width = 820px; padding-left:100px;}"
|
7
7
|
%>
|
8
8
|
<%= sub_template "top" %>
|
9
9
|
|
@@ -12,16 +12,16 @@
|
|
12
12
|
<%= render_markup_help %>
|
13
13
|
|
14
14
|
<div id='main'>
|
15
|
-
<form style="float:
|
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: 400px"><%= @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>
|
21
21
|
<input type="radio" name="edit_type" value="major">Major Edit</input>
|
22
22
|
<input type="radio" name="edit_type" value="default" checked>Default</input>
|
23
23
|
<br />
|
24
|
-
Learn more on the concept of <a href='.' onClick="alert('The default behaviour when revising a page is of a \'
|
24
|
+
Learn more on the concept of <a href='.' onClick="alert('The default behaviour when revising a page is of a \'Continuous Edit\'.\nThis means that if the previous edit was done by the same author and less than 30 minutes ago, this edit is minor and only the latest version will be kept as the revision. Otherwise (different author and/or more than 30 minutes ago) this edit will create a new revision of the page.\nThis default behaviour can be overriden by specifying a major/minor edit.');return false;">continuous edit</a>.
|
25
25
|
</p>
|
26
26
|
<p>
|
27
27
|
<% if @web.check_pass_on_edit %>
|
@@ -3,12 +3,13 @@
|
|
3
3
|
@content_width = 700
|
4
4
|
@hide_navigation = true
|
5
5
|
@hide_menu = true
|
6
|
+
@style_additions = "#Container { margin-left: 100px;}"
|
6
7
|
%>
|
7
8
|
<%= sub_template "top" %>
|
8
9
|
|
9
10
|
<%= render_markup_help %>
|
10
11
|
|
11
|
-
<form id="editForm" action="
|
12
|
+
<form id="editForm" action="./save_menu" method="post">
|
12
13
|
<p>Please choose the format you prefer for the left-size menu:</p>
|
13
14
|
<p><input type="radio" name="type" value="linkers" <%= 'checked' if @menu_type == 'linkers' %>>Only pages that link other pages (default)</p>
|
14
15
|
<p><input type="radio" name="type" value="all" <%= 'checked' if @menu_type == 'all' %>>All Pages</p>
|
@@ -1,6 +1,9 @@
|
|
1
|
-
<% @title = "
|
1
|
+
<% @title = "Web Setup"
|
2
2
|
@hide_menu = true
|
3
|
-
@style_additions = "
|
3
|
+
@style_additions = "
|
4
|
+
#Container { width: 600px; margin-left: 180px;}
|
5
|
+
input { vertical-align: bottom }
|
6
|
+
"
|
4
7
|
%>
|
5
8
|
<%= sub_template "top" %>
|
6
9
|
|
@@ -20,11 +23,25 @@
|
|
20
23
|
</div>
|
21
24
|
|
22
25
|
<h2 style="margin-bottom: 3px">Specialize</h2>
|
26
|
+
<script>
|
27
|
+
function see_styles() {
|
28
|
+
document.getElementById('additionalStyle').style.display='block';
|
29
|
+
document.getElementById('see_styles').style.display='none';
|
30
|
+
document.getElementById('hide_styles').style.display='inline';
|
31
|
+
return false;
|
32
|
+
}
|
33
|
+
function hide_styles() {
|
34
|
+
document.getElementById('additionalStyle').style.display='none';
|
35
|
+
document.getElementById('see_styles').style.display='inline';
|
36
|
+
document.getElementById('hide_styles').style.display='none';
|
37
|
+
return false;
|
38
|
+
}
|
39
|
+
</script>
|
23
40
|
<div class="help">
|
24
41
|
Turning safe mode on will strip HTML tags and stylesheet options from the content of all pages.
|
25
42
|
Turning on "brackets only" will require all wiki words to be as [[wiki word]] and WikiWord won't work.
|
26
|
-
Additions to the stylesheet take precedence over the existing styles. <i>Hint:</i> View source on a page you want to
|
27
|
-
|
43
|
+
Additions to the stylesheet take precedence over the existing styles. <i>Hint:</i> View source on a page you want to style to find ID names on individual tags.
|
44
|
+
|
28
45
|
</div>
|
29
46
|
<div class="inputBox">
|
30
47
|
Markup:
|
@@ -42,6 +59,8 @@
|
|
42
59
|
|
43
60
|
|
44
61
|
|
62
|
+
<br />
|
63
|
+
|
45
64
|
<small>
|
46
65
|
|
47
66
|
<input type="checkbox" name="safe_mode"<%= " CHECKED" if @web.safe_mode %>> Safe mode
|
@@ -56,7 +75,10 @@
|
|
56
75
|
|
57
76
|
</small>
|
58
77
|
|
59
|
-
<
|
78
|
+
<br />
|
79
|
+
<a style='font-size:smaller;' id='see_styles' href="#" onClick="return see_styles();">See styles >></a>
|
80
|
+
<a style='font-size:smaller; display:none;' id='hide_styles' href="#" onClick="return hide_styles();">Hide styles <<</a>
|
81
|
+
<textarea id="additionalStyle" style="display: none; margin-top: 10px; margin-bottom: 5px; width: 100%; height: 200px" name="additional_style"><%= @web.additional_style %></textarea>
|
60
82
|
</div>
|
61
83
|
|
62
84
|
<h2 style="margin-bottom: 3px">Persistence Options (all webs)</h2>
|
@@ -68,24 +90,49 @@
|
|
68
90
|
<input align='right' type="text" name="snapshots_interval" value='<%= @snapshot_interval %>' /> hour(s).
|
69
91
|
</div>
|
70
92
|
|
71
|
-
<h2 style="margin-bottom: 3px">Password protection for this
|
93
|
+
<h2 style="margin-bottom: 3px">Password protection for this PIM (<%= @web.name %>)</h2>
|
72
94
|
<div class="help">
|
73
95
|
This is the password that visitors need to login to view and edit this web. Setting the password to nothing will remove the password protection.
|
74
96
|
</div>
|
75
97
|
<div class="inputBox">
|
76
98
|
Password: <input type="password" id="password" name="password" value="<%= @web.password %>">
|
77
99
|
Verify: <input type="password" id="password_check" value="<%= @web.password %>" name="password_check"><br />
|
78
|
-
|
79
|
-
<input type="radio" id="check_pass_on_edit" name="check_pass_on_edit" value='
|
100
|
+
<!--
|
101
|
+
<input type="radio" id="check_pass_on_edit" name="check_pass_on_edit" value='each_edit' <%= 'checked' if @web.password && @web.check_pass_on_edit %>>Require password for each edit
|
102
|
+
<input type="radio" id="check_pass_on_edit" name="check_pass_on_edit" value='login_only' <%= 'checked' if @web.password && !@web.check_pass_on_edit %>>Require password once on logon
|
103
|
+
-->
|
80
104
|
</div>
|
81
105
|
|
82
106
|
<h2 style="margin-bottom: 3px">Publish read-only version of this web (<%= @web.name %>)</h2>
|
83
107
|
<div class="help">
|
84
108
|
You can turn on a read-only version of this web that's accessible even when the regular web is password protected.
|
85
|
-
The published version is accessible through URLs like /wiki/published/HomePage
|
109
|
+
The published version is accessible through URLs like /wiki/published/HomePage.<br /><br />
|
110
|
+
|
111
|
+
Defaulting non-localhost requests to the 'published' version means that requests coming from other machines to the root (e.g. http://host:2500/) will be passed to /web/published and not /web/show.<br />
|
112
|
+
|
113
|
+
Other machines can still explicitly request the /web/show versions, for which you need to set editing password etc. This is just to make referring colleagues to your PIM easier.
|
86
114
|
</div>
|
87
115
|
<div class="inputBox">
|
88
|
-
<
|
116
|
+
<script>
|
117
|
+
function checkPublished() {
|
118
|
+
if (!document.getElementById("published").checked) {
|
119
|
+
document.getElementById("default_to_published").checked = false;
|
120
|
+
document.getElementById("default_to_published").disabled = true;
|
121
|
+
} else {
|
122
|
+
document.getElementById("default_to_published").disabled = false;
|
123
|
+
}
|
124
|
+
};
|
125
|
+
function checkPublishedDefault() {
|
126
|
+
if (document.getElementById("default_to_published").checked) {
|
127
|
+
document.getElementById("published").checked = true;
|
128
|
+
}
|
129
|
+
};
|
130
|
+
</script>
|
131
|
+
<input type="checkbox" id="published" name="published" onClick='return checkPublished();' <%= "CHECKED" if @web.published %>> Publish this web
|
132
|
+
<br />
|
133
|
+
<input type="checkbox" id="default_to_published" name="default_to_published" onClick='return checkPublishedDefault();'
|
134
|
+
<%= "disabled" unless @web.published %>
|
135
|
+
<%= "checked" if @web.default_to_published %>> Default non-localhost requests to the 'published' version
|
89
136
|
</div>
|
90
137
|
|
91
138
|
<h2 style="margin-bottom: 3px">Customise this PIM</h2>
|
@@ -94,8 +141,11 @@
|
|
94
141
|
</div>
|
95
142
|
<div class="inputBox">
|
96
143
|
<h4>Interface Options</h4>
|
97
|
-
<input type="checkbox" name="enable_dclick_edit" <%= "checked" if @web.enable_dclick_edit %>> Edit page on double click.
|
98
144
|
|
145
|
+
<input type="checkbox" name="enable_dclick_edit" <%= "checked" if @web.enable_dclick_edit %>> Edit page on double click.<br />
|
146
|
+
|
147
|
+
<input type="checkbox" name="enable_menu" <%= "checked" if @web.enable_menu %>> Enable menu on left. Don't forget to <a href='../edit_menu'>set the menu contents</a>.
|
148
|
+
|
99
149
|
<h4>Mind Map</h4>
|
100
150
|
<i>Size</i>:<br />
|
101
151
|
Limit the size of the Mind Map image. Format is "width,height" in inches. Leave blank for no size limit.<br />
|
@@ -166,9 +216,15 @@
|
|
166
216
|
</p>
|
167
217
|
</form>
|
168
218
|
|
219
|
+
<p style='font-size: 10px; text-align: right;'>...or forget all your changes and <a href="/new_web/">create a new web</a>.<br />
|
220
|
+
<% num_webs = WikiService.instance.webs.length %>
|
221
|
+
(There <%= num_webs > 1 ? 'are' : 'is' %> currently <a href='/web_list/'><%= WikiService.instance.webs.length %> web<%= 's' if num_webs > 1 %></a>)</p>
|
222
|
+
|
223
|
+
<hr />
|
169
224
|
<br/>
|
225
|
+
|
170
226
|
<h2>Other administrative tasks</h2>
|
171
|
-
<form action="../administrate" id="administrate" method="post">
|
227
|
+
<form action="../administrate" id="administrate" method="post" class="inputBox">
|
172
228
|
<p style="font-size: 10px;">
|
173
229
|
Clean up by entering system password
|
174
230
|
<input type="password" id="system_password" name="system_password">
|
@@ -179,21 +235,27 @@
|
|
179
235
|
<input type="submit" name='action' value="Clear Render Cache"><br/>
|
180
236
|
<input type="submit" name='action' value="Force Data Snapshot"><br/>
|
181
237
|
<input type="submit" name='action' value="Clean Storage"><br/>
|
238
|
+
<% if wiki.webs.size > 1 %>
|
239
|
+
<input type="submit" name='action' value="Make This Web Default"><br/>
|
240
|
+
<% end %>
|
241
|
+
<br/>
|
242
|
+
<input type="submit" name='action' value="Remove This Web" onClick="return confirm('Are you absolutely sure you want to delete the \'<%= web.name %>\' web?')"><br/>
|
182
243
|
</p>
|
183
244
|
</form>
|
184
245
|
|
185
|
-
<
|
246
|
+
<hr />
|
247
|
+
<br/>
|
186
248
|
|
187
249
|
<h2>Stop Pimki</h2>
|
188
|
-
<p style="color:red">Please note that stopping the server will stop all pimki webs running on this server
|
250
|
+
<p style="color:red">Please note that stopping the server will stop all pimki webs running on this server!</p>
|
189
251
|
<form action="../stop" id="stop" method="post">
|
190
|
-
<p style="font-size: 10px;">
|
252
|
+
<p style="font-size: 10px;" class="inputBox">
|
191
253
|
Enter system password
|
192
254
|
<input type="password" id="system_password" name="system_password">
|
193
255
|
and
|
194
256
|
<input type="submit" name='stop' value="Stop Pimki">
|
195
257
|
in
|
196
|
-
<input type="text" name='seconds' value=
|
258
|
+
<input type="text" name='seconds' value="3" size='5' style="text-align:right;">
|
197
259
|
seconds.
|
198
260
|
</p>
|
199
261
|
</form>
|
@@ -231,11 +293,11 @@ function validateSetup() {
|
|
231
293
|
return false;
|
232
294
|
}
|
233
295
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
296
|
+
if (document.getElementById('mind_map_size').value != "" &&
|
297
|
+
!(/^\d+,\d+$/.test(document.getElementById('mind_map_size').value))) {
|
298
|
+
alert("The Mind Map size must be in the format of 'digit(s),digit(s)'!");
|
299
|
+
return false;
|
300
|
+
}
|
239
301
|
|
240
302
|
return true;
|
241
303
|
}
|