1
# See bottom of file for license and copyright information
3
package Foswiki::Configure::UIs::TAGS;
7
use base 'Foswiki::Configure::UI';
9
use Foswiki::Configure::Type;
10
use Foswiki::Configure::Value;
14
my $scanner = Foswiki::Configure::Type::load('SELECTCLASS');
15
my $classes = $scanner->findClasses('Foswiki::Tags::*');
16
foreach my $module (@$classes) {
17
$module =~ s/^.*::([^:]*)/$1/;
18
$Foswiki::cfg{Tags}{$module}{Enabled} ||= 0;
20
# only add the first instance of any tag, as only
21
# the first can get loaded from @INC.
22
unless ( $modules{$module} ) {
23
$modules{$module} = 1;
27
foreach my $m ( sort keys %modules ) {
28
my $value = new Foswiki::Configure::Value(
31
# SMELL - i'm assuming that the Tag topic is in the SystemWeb :(
32
# Which of course it isn't.
33
"<a rel=\"nofollow\" href=\"$Foswiki::cfg{ScriptUrlPath}/view$Foswiki::cfg{ScriptSuffix}/$Foswiki::cfg{SystemWebName}/$m\">$m</a>",
34
'{Tags}{' . $m . '}{Enabled}'
36
$block .= $value->buildInputFields();
45
# Foswiki - The Free and Open Source Wiki, http://foswiki.org/
47
# Copyright (C) 2008 Foswiki Contributors. All Rights Reserved.
48
# Foswiki Contributors are listed in the AUTHORS file in the root
49
# of this distribution. NOTE: Please extend that file, not this notice.
51
# Additional copyrights apply to some or all of the code in this
54
# Copyright (C) 2000-2006 TWiki Contributors. All Rights Reserved.
55
# TWiki Contributors are listed in the AUTHORS file in the root
56
# of this distribution. NOTE: Please extend that file, not this notice.
58
# This program is free software; you can redistribute it and/or
59
# modify it under the terms of the GNU General Public License
60
# as published by the Free Software Foundation; either version 2
61
# of the License, or (at your option) any later version. For
62
# more details read LICENSE in the root of this distribution.
64
# This program is distributed in the hope that it will be useful,
65
# but WITHOUT ANY WARRANTY; without even the implied warranty of
66
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
68
# As per the GPL, removal of this notice is prohibited.