remove description_html, add link
authorJoey Hess <joey@kodama.kitenet.net>
Sun, 3 Aug 2008 18:36:17 +0000 (14:36 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sun, 3 Aug 2008 18:36:17 +0000 (14:36 -0400)
IkiWiki/Plugin/anonok.pm
IkiWiki/Plugin/attachment.pm
IkiWiki/Plugin/lockedit.pm
IkiWiki/Plugin/websetup.pm
debian/changelog
doc/plugins/write.mdwn

index 9d21fe3676e1f6e322139f2d43290127373751b5..ccc0d59b915dfaf748424eb18bf3727680c62c3a 100644 (file)
@@ -16,8 +16,7 @@ sub getsetup () { #{{{
                        type => "pagespec",
                        example => "*/discussion",
                        description => "PageSpec to limit which pages anonymous users can edit",
-                       description_html => htmllink("", "", "ikiwiki/PageSpec", noimageinline => 1).
-                               " to limit which pages anonymous users can edit",
+                       link => "ikiwiki/PageSpec",
                        safe => 1,
                        rebuild => 0,
                },
index 27f984c299870b112600b054b7ab0062b3e44612..63f0b73c3b330760fd5342657fa691bc421fc155 100644 (file)
@@ -25,11 +25,7 @@ sub getsetup () { #{{{
                        type => "pagespec",
                        example => "mimetype(image/*) and maxsize(50kb)",
                        description => "enhanced PageSpec specifying what attachments are allowed",
-                       description_html => htmllink("", "", 
-                               "ikiwiki/PageSpec/attachment", 
-                               noimageinline => 1,
-                               linktext => "enhanced PageSpec",
-                               )." specifying what attachments are allowed",
+                       link => "ikiwiki/PageSpec/attachment",
                        safe => 1,
                        rebuild => 0,
                },
index 93a5256770981c20d2ac27127c128ad9440d5b04..525fcb0e5d7fd0e074036421d74a3bc59b2dc33e 100644 (file)
@@ -18,8 +18,7 @@ sub getsetup () { #{{{
                        type => "pagespec",
                        example => "!*/Discussion",
                        description => "PageSpec controlling which pages are locked",
-                       description_html => htmllink("", "", "ikiwiki/PageSpec", noimageinline => 1).
-                               " controlling which pages are locked",
+                       link => "ikiwiki/PageSpec",
                        safe => 1,
                        rebuild => 0,
                },
index c22516eec5a19463b9fb2673896f1f093d7a7be6..8ef336b036802647ef3edeff80d26b0353f850d9 100644 (file)
@@ -100,7 +100,16 @@ sub showfields ($$$@) { #{{{
                my $key=shift @show;
                my %info=%{shift @show};
 
-               my $description=exists $info{description_html} ? $info{description_html} : $info{description};
+               my $description=$info{description};
+               if (exists $info{link} && length $info{link}) {
+                       if ($info{link} =~ /^\w+:\/\//) {
+                               $description="<a href=\"$info{link}\">$description</a>";
+                       }
+                       else {
+                               $description=htmllink("", "", $info{link}, noimageinline => 1, linktext => $description);
+                       }
+               }
+
                my $value=$config{$key};
                # multiple plugins can have the same field
                my $name=defined $plugin ? $plugin.".".$key : $key;
index b784c95b2cf8539ffbe385a24f7ef896b7531d35..729f558496835cb7563cf28abc91b33c4be62d81 100644 (file)
@@ -12,6 +12,7 @@ ikiwiki (2.60) UNRELEASED; urgency=low
   * ikiwiki-update-wikilist: Add -r switch to remove. Default behavior is now
     always to add.
   * Start moving admin preferences from the web interface to the setup file.
+  * websetup: New plugin providing a setup form on the web.
   * ikiwiki-makerepo: Bail if both srcdir and repository are not specified.
     Closes: #493628
 
index b31722dd7f7337479809a8ed6754afba01439a78..48a94ec8b131a737769a4baaf7f947c4838ac56d 100644 (file)
@@ -402,7 +402,8 @@ describing the option. For example:
   hash of these.
 * `example` can be set to an example value.
 * `description` is a short description of the option.
-* `description_html` is an optional short description, that can contain html
+* `link` is a link to further information about the option. This can either
+  be a wikilink, or an url.
 * `safe` should be false if the option should not be displayed in unsafe
   configuration methods, such as the web interface. Anything that specifies
   a command to run, a path on disk, or a regexp should be marked as unsafe.