=== modified file 'IkiWiki/Plugin/inline.pm'
--- IkiWiki/Plugin/inline.pm	
+++ IkiWiki/Plugin/inline.pm	
@@ -46,6 +46,7 @@
 	} else {
 		$desc = $config{wikiname};
 	}
+	my $actions=exists $params{actions} ? yesno($params{actions}) : 0;
 
 	my @list;
 	foreach my $page (keys %pagesources) {
@@ -86,6 +87,8 @@
 	) unless $raw;
 	
 	foreach my $page (@list) {
+		my $file = $pagesources{$page};
+		my $type = pagetype($file);
 		if (! $raw) {
 			# Get the content before populating the template,
 			# since getting the content uses the same template
@@ -104,6 +107,16 @@
 			$template->param(content => $content);
 			$template->param(ctime => displaytime($pagectime{$page}));
 
+			if ($actions && $template->query(name => "have_actions")) {
+				$template->param(have_actions => 1);
+				if ($config{discussion}) {
+					$template->param(discussionlink => htmllink($page, $page, "Discussion", 1, 1));
+				}
+				if (length $config{cgiurl} && defined $type) {
+					$template->param(editurl => cgiurl(do => "edit", page => $page));
+				}
+			}
+
 			run_hooks(pagetemplate => sub {
 				shift->(page => $page, destpage => $params{page},
 					template => $template,);

=== modified file 'basewiki/style.css'
--- basewiki/style.css	
+++ basewiki/style.css	
@@ -194,3 +194,9 @@
 li.L8 {
 	list-style: upper-alpha;
 }
+
+#inline_actions {
+        margin-top: 4px;
+}
+
+

=== modified file 'doc/plugins/inline.mdwn'
--- doc/plugins/inline.mdwn	
+++ doc/plugins/inline.mdwn	
@@ -29,3 +29,7 @@
   inlining page.
 * `description` - Sets the description of the rss feed if one is generated.
   Defaults to the name of the wiki.
+* `actions` - If set to "yes" add links to the bottom of the inlined pages 
+  for editing and discussion (if they would be shown at the top of the page
+  itself).
+  

=== modified file 'templates/inlinepage.tmpl'
--- templates/inlinepage.tmpl	
+++ templates/inlinepage.tmpl	
@@ -28,4 +28,16 @@
 </TMPL_LOOP>
 </TMPL_IF>
 </span>
+
+<TMPL_IF NAME="HAVE_ACTIONS">
+<div id="inline_actions">
+<TMPL_IF NAME="EDITURL">
+<a href="<TMPL_VAR EDITURL>">Edit</a>
+</TMPL_IF>
+<TMPL_IF NAME="DISCUSSIONLINK">
+<TMPL_VAR DISCUSSIONLINK><br />
+</TMPL_IF>
 </div>
+</TMPL_IF>
+
+</div>

=== modified file 'templates/inlinepagetitle.tmpl'
--- templates/inlinepagetitle.tmpl	
+++ templates/inlinepagetitle.tmpl	
@@ -3,4 +3,16 @@
 <i>
 Posted <TMPL_VAR CTIME>
 </i>
+
+<TMPL_IF NAME="HAVE_ACTIONS">
+<div id="inline_actions">
+<TMPL_IF NAME="EDITURL">
+<a href="<TMPL_VAR EDITURL>">Edit</a>
+</TMPL_IF>
+<TMPL_IF NAME="DISCUSSIONLINK">
+<TMPL_VAR DISCUSSIONLINK><br />
+</TMPL_IF>
+</div>
+</TMPL_IF>
+
 </p>

