Wiki Page
Site Infrastructure / Wiki Page

[show modes: view edit]

[begin mode abbr]
<li><a href="/?id=[$_id]"><b>[$_title]</b></a>
<br><i>[$_subtitle]</i>
</li>
[end mode abbr]

[begin mode view]
[
page("view", 278);

	_wiki_format(getv("body"));
]

<div style="clear: both"></div>

<br>

[
	page("floatpic", $_parent);
]

<div style="clear: both"></div>
[end mode view]

[begin mode edit]
[if(can_edit()) {
<form method="post" action="/">
<input type="hidden" name="mode" value="submit_edit">
<input type="hidden" name="id" value="[$_id]">
<textarea name="body" rows="15">[edit_display(getv("body"))]</textarea>
<br>
<span style="font-size: 80%">You can use some formatting here. See <a href="/?Formatting and Markup" target="_new">this page</a> for more details.</span>
<br>
<center><input type="submit" value="Submit" width="auto !important;"></center>
</form>
};

if(can_direct()) {
[msg_start()]
<h2>Page Control</h2>
<style type="text/css">
input["["]type="text"["]"], textarea {
	width: 100%;
}
</style>
<form method="post" action="/">
	<input type="hidden" name="mode" value="submit_direct">
	<input type="hidden" name="id" value="[$_id]">

	Title:<br><input type="text" name="title" value="[edit_display($_title)]"><br>
	Subtitle:<br><input type="text" name="subtitle" value="[edit_display($_subtitle)]"><br>

	<input type="checkbox" value="1" name="pr" id="pr" [if(getv("pr") == "1") {checked}] width="auto !important;">
		<label for="pr">visible to the public</label><br>
<!--	<input type="checkbox" value="1" name="ge" id="ge" [if(getv("ge") == "1") {checked}] width="auto !important;">
		<label for="ge">editable by group</label><br>
	<input type="checkbox" value="1" name="gd" id="gd" [if(getv("gd") == "1") {checked}] width="auto !important;">
		<label for="gd">group can access these controls</label><br>
-->
	<input type="submit" value="Update Page Control" width="auto !important;">

	<a href="/?id=[$_id]&mode=delete">Delete this page</a>
</form>
[msg_end()]};]
[end mode edit]

[begin mode submit_edit]
[
putv("body", $_params.body);
]
<h2>Update complete.</h2>
<a href="/?id=[$_id]">Click here to return to the page</a>.
[end mode submit_edit]

[begin mode submit_direct]
[
$_title = $_params.title;
$_subtitle = $_params.subtitle;

$pr = $_params.pr; if($pr == "") $pr = "0"; putv("pr", $pr);
// $ge = $_params.ge; if($ge == "") $ge = "0"; putv("ge", $ge);
// $gd = $_params.gd; if($gd == "") $gd = "0"; putv("gd", $gd);
$gd = 1;
$ge = 1;

$_permissions = {cadre[iif($ge == 1, "ca", "--")][iif($gd == 1, "d", "-")]r[iif($ge == 1, "e", "-")]c-dr----[iif($pr == 1, "r", "-")]-};

]
<h2>Update complete.</h2>
<a href="/?id=[$_id]">Click here to return to the page</a>.
[end mode submit_direct]

[begin mode delete]
[msg_start()]
<p>This is the deletion page! There is no way to get a page back once it is deleted. Do you really want to do this?</p>
<p><a href="/?id=[$_id]">No! This idea was bad and I should feel bad!</a></p>
<p><a href="/?id=[$_id]&mode=delete_submit">Yes! Kill it with fire!</a></p>
[msg_end()]
[end mode delete]

[begin mode delete_submit]
[children("delete", $_id);
$n = delete_page($_id);
if($n == "1") {
	<p><b>[$_title]</b> has been removed from 
	<b>[get_title($_parent)]</b>.</p>
} else {
	<p><b>[$_title]</b> could not be removed from 
	<b>[get_title($_parent)]</b> by you ([$_viewer.name]). If you 
	feel that should be able to do so, now might be a good time to
	<a href="mailto:[$_globals.ADMIN_EMAIL]?Subject=Can't delete 
	project page">complain</a>.</p>
}]
<p><a href="/?id=[$_parent]">Return to [get_title($_parent)]</p>
[end mode delete_submit]