remove description_html, add link

master
Joey Hess 2008-08-03 14:36:17 -04:00
parent 1376247754
commit 0f06504422
6 changed files with 16 additions and 11 deletions

View File

@ -16,8 +16,7 @@ sub getsetup () { #{{{
type => "pagespec", type => "pagespec",
example => "*/discussion", example => "*/discussion",
description => "PageSpec to limit which pages anonymous users can edit", description => "PageSpec to limit which pages anonymous users can edit",
description_html => htmllink("", "", "ikiwiki/PageSpec", noimageinline => 1). link => "ikiwiki/PageSpec",
" to limit which pages anonymous users can edit",
safe => 1, safe => 1,
rebuild => 0, rebuild => 0,
}, },

View File

@ -25,11 +25,7 @@ sub getsetup () { #{{{
type => "pagespec", type => "pagespec",
example => "mimetype(image/*) and maxsize(50kb)", example => "mimetype(image/*) and maxsize(50kb)",
description => "enhanced PageSpec specifying what attachments are allowed", description => "enhanced PageSpec specifying what attachments are allowed",
description_html => htmllink("", "", link => "ikiwiki/PageSpec/attachment",
"ikiwiki/PageSpec/attachment",
noimageinline => 1,
linktext => "enhanced PageSpec",
)." specifying what attachments are allowed",
safe => 1, safe => 1,
rebuild => 0, rebuild => 0,
}, },

View File

@ -18,8 +18,7 @@ sub getsetup () { #{{{
type => "pagespec", type => "pagespec",
example => "!*/Discussion", example => "!*/Discussion",
description => "PageSpec controlling which pages are locked", description => "PageSpec controlling which pages are locked",
description_html => htmllink("", "", "ikiwiki/PageSpec", noimageinline => 1). link => "ikiwiki/PageSpec",
" controlling which pages are locked",
safe => 1, safe => 1,
rebuild => 0, rebuild => 0,
}, },

View File

@ -100,7 +100,16 @@ sub showfields ($$$@) { #{{{
my $key=shift @show; my $key=shift @show;
my %info=%{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}; my $value=$config{$key};
# multiple plugins can have the same field # multiple plugins can have the same field
my $name=defined $plugin ? $plugin.".".$key : $key; my $name=defined $plugin ? $plugin.".".$key : $key;

1
debian/changelog vendored
View File

@ -12,6 +12,7 @@ ikiwiki (2.60) UNRELEASED; urgency=low
* ikiwiki-update-wikilist: Add -r switch to remove. Default behavior is now * ikiwiki-update-wikilist: Add -r switch to remove. Default behavior is now
always to add. always to add.
* Start moving admin preferences from the web interface to the setup file. * 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. * ikiwiki-makerepo: Bail if both srcdir and repository are not specified.
Closes: #493628 Closes: #493628

View File

@ -402,7 +402,8 @@ describing the option. For example:
hash of these. hash of these.
* `example` can be set to an example value. * `example` can be set to an example value.
* `description` is a short description of the option. * `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 * `safe` should be false if the option should not be displayed in unsafe
configuration methods, such as the web interface. Anything that specifies 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. a command to run, a path on disk, or a regexp should be marked as unsafe.