1 |
wakaba |
1.1 |
use strict; |
2 |
|
|
package SuikaWiki::Plugin::Registry; |
3 |
|
|
|
4 |
|
|
|
5 |
|
|
our %Info; |
6 |
|
|
$Info{q#WikiNamespace#}->{Name} = q#WikiNamespace#; |
7 |
|
|
$Info{q#WikiNamespace#}->{q#Version#} = q#2004.0831.0328#; |
8 |
|
|
$Info{q#WikiNamespace#}->{q#InterfaceVersion#} = q#2.9.1#; |
9 |
|
|
$Info{q#WikiNamespace#}->{q#mkpluginVersion#} = q#2.1.19#; |
10 |
|
|
$Info{q#WikiNamespace#}->{q#module_name#} = q#SuikaWiki::Plugin::plugin::WikiNamespace1040731032809OuRi#; |
11 |
|
|
$Info{q#WikiNamespace#}->{q#Date.RCS#} = q#$Date: 2004/04/01 04:39:58 $#; |
12 |
|
|
$Info{q#WikiNamespace#}->{RequiredPlugin} = [q#HTML#]; |
13 |
|
|
$Info{q#WikiNamespace#}->{Description} = [[q#Namespaced WikiName properties#, q#en#, q##]]; |
14 |
|
|
$Info{q#WikiNamespace#}->{License} = [[q#%%Perl%%#, q##, q##]]; |
15 |
|
|
$Info{q#WikiNamespace#}->{Author} = [[[[q#Wakaba#, q#ja#, q#Latn#]], [[q#w@suika.fam.cx#]], [q##]]]; |
16 |
|
|
|
17 |
|
|
package SuikaWiki::Plugin::plugin::WikiNamespace1040731032809OuRi; |
18 |
|
|
|
19 |
|
|
{my $def = {q#Parameter#, {q#page#, {q#Type#, q#WikiName#, q#Default#, q#(auto)#, q#Description#, [[q#WikiName#, q#en#, q##]]}}, q#Description#, [[q#Last component of WikiName#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
20 |
|
|
|
21 |
|
|
#line 1 "(WikiPlugin module source ns.wp2, block FormattingRule[name()='[q#form-input#, q#view#, q#view-resource#]/ns_short_page_name']/Formatting)" |
22 |
|
|
my $name = $o->{wiki}->name ($p->{name} || $o->{wiki}->{var}->{page}); |
23 |
|
|
$p->{-parent}->append_text ($name->[-1]);}} |
24 |
|
|
#line 1 "(WikiPlugin module WikiNamespace, chunk 1)" |
25 |
|
|
; |
26 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{ns_short_page_name} = $def; |
27 |
|
|
$SuikaWiki::Plugin::Rule{view}->{ns_short_page_name} = $def; |
28 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{ns_short_page_name} = $def; |
29 |
|
|
}; |
30 |
|
|
|
31 |
|
|
$SuikaWiki::Plugin::Rule{page_link}->{ns_short_page_name} = {q#Parameter#, {q#page#, {q#Type#, q#WikiName#, q#Default#, q#(auto)#, q#Description#, [[q#WikiName#, q#en#, q##]]}}, q#Description#, [[q#Last component of WikiName#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
32 |
|
|
|
33 |
|
|
#line 1 "(WikiPlugin module source ns.wp2, block FormattingRule[name()='[q#page-link#]/ns_short_page_name']/Formatting)" |
34 |
|
|
my $name = $o->{wiki}->name ($p->{name} || $o->{link}->{dest}->{page_name}); |
35 |
|
|
$p->{-parent}->append_text ($name->[-1]); }} |
36 |
|
|
#line 1 "(WikiPlugin module WikiNamespace, chunk 3)" |
37 |
|
|
; |
38 |
|
|
|
39 |
|
|
{my $def = {q#Parameter#, {}, q#Description#, [[q#WikiName without last component#, q##, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
40 |
|
|
|
41 |
|
|
#line 1 "(WikiPlugin module source ns.wp2, block FormattingRule[name()='[q#form-input#, q#view#, q#view-resource#]/ns_page_path_name']/Formatting)" |
42 |
|
|
my $name = $o->{wiki}->name ($p->{name} || $o->{wiki}->{var}->{page}); |
43 |
|
|
$p->{-parent}->append_text ($o->{wiki}->name ([@$name[0..$#$name-1]]) |
44 |
|
|
->stringify (wiki => $o->{wiki}));}} |
45 |
|
|
#line 1 "(WikiPlugin module WikiNamespace, chunk 5)" |
46 |
|
|
; |
47 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{ns_page_path_name} = $def; |
48 |
|
|
$SuikaWiki::Plugin::Rule{view}->{ns_page_path_name} = $def; |
49 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{ns_page_path_name} = $def; |
50 |
|
|
}; |
51 |
|
|
|
52 |
|
|
$SuikaWiki::Plugin::Rule{page_link}->{ns_page_path_name} = {q#Parameter#, {}, q#Description#, [[q#WikiName without last component#, q##, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
53 |
|
|
|
54 |
|
|
#line 1 "(WikiPlugin module source ns.wp2, block FormattingRule[name()='[q#page-link#]/ns_page_path_name']/Formatting)" |
55 |
|
|
my $name = $o->{wiki}->name ($p->{name} || $o->{link}->{dest}->{page_name}); |
56 |
|
|
$p->{-parent}->append_text ($o->{wiki}->name ([@$name[0..$#$name-1]]) |
57 |
|
|
->stringify (wiki => $o->{wiki}));}} |
58 |
|
|
#line 1 "(WikiPlugin module WikiNamespace, chunk 7)" |
59 |
|
|
; |
60 |
|
|
|
61 |
|
|
{my $def = {q#Parameter#, {q#page#, {q#Type#, q#WikiName#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPage name#, q#en#, q##]]}, q#false#, {q#Type#, q#CDATA#, q#Default#, q#(none)#, q#Description#, [[q#Evaluated if "parent" page does not exist#, q#en#, q##]]}, q#true#, {q#Type#, q#CDATA#, q#Default#, q#(none)#, q#Description#, [[q#Evaluated if "parent" page exists#, q#en#, q##]]}}, q#Description#, [[q#Conditional content, whether "parent" page exists or not#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
62 |
|
|
|
63 |
|
|
#line 1 "(WikiPlugin module source ns.wp2, block FormattingRule[name()='[q#form-input#, q#view#, q#view-resource#, q#link-to-wikipage#]/is_child_of_root_ns']/Formatting)" |
64 |
|
|
my $name = $o->{wiki}->name ($p->{name} || $o->{wiki}->{var}->{page}); |
65 |
|
|
if (@$name == 1) { |
66 |
|
|
$f->parse_attr ($p=>q#true#, $o, -parent => $p->{-parent}, -non_parsed_to_node => 1, %opt); |
67 |
|
|
} else { |
68 |
|
|
$f->parse_attr ($p=>q#false#, $o, -parent => $p->{-parent}, -non_parsed_to_node => 1, %opt); |
69 |
|
|
}}} |
70 |
|
|
#line 1 "(WikiPlugin module WikiNamespace, chunk 9)" |
71 |
|
|
; |
72 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{is_child_of_root_ns} = $def; |
73 |
|
|
$SuikaWiki::Plugin::Rule{view}->{is_child_of_root_ns} = $def; |
74 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{is_child_of_root_ns} = $def; |
75 |
|
|
$SuikaWiki::Plugin::Rule{link_to_wikipage}->{is_child_of_root_ns} = $def; |
76 |
|
|
}; |
77 |
|
|
|
78 |
|
|
$SuikaWiki::Plugin::Rule{page_link}->{is_child_of_root_ns} = {q#Parameter#, {q#page#, {q#Type#, q#WikiName#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPage name#, q#en#, q##]]}, q#false#, {q#Type#, q#CDATA#, q#Default#, q#(none)#, q#Description#, [[q#Evaluated if "parent" page does not exist#, q#en#, q##]]}, q#true#, {q#Type#, q#CDATA#, q#Default#, q#(none)#, q#Description#, [[q#Evaluated if "parent" page exists#, q#en#, q##]]}}, q#Description#, [[q#Conditional content, whether "parent" page exists or not#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
79 |
|
|
|
80 |
|
|
#line 1 "(WikiPlugin module source ns.wp2, block FormattingRule[name()='[q#page-link#]/is_child_of_root_ns']/Formatting)" |
81 |
|
|
my $name = $o->{wiki}->name ($p->{name} || $o->{link}->{dest}->{page_name}); |
82 |
|
|
if (@$name == 1) { |
83 |
|
|
$f->parse_attr ($p=>q#true#, $o, -parent => $p->{-parent}, -non_parsed_to_node => 1, %opt); |
84 |
|
|
} else { |
85 |
|
|
$f->parse_attr ($p=>q#false#, $o, -parent => $p->{-parent}, -non_parsed_to_node => 1, %opt); |
86 |
|
|
}}} |
87 |
|
|
#line 1 "(WikiPlugin module WikiNamespace, chunk 11)" |
88 |
|
|
; |
89 |
|
|
|
90 |
|
|
{my $def = {q#Parameter#, {}, q#Description#, [[q#Text representation of "root" WikiPage name#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
91 |
|
|
|
92 |
|
|
#line 1 "(WikiPlugin module source ns.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#, q#page-link#, q#link-to-resource#]/ns__root_wikiname']/Formatting)" |
93 |
|
|
$p->{-parent}->append_text ($o->{wiki}->{config}->{name}->{space}->{root});}} |
94 |
|
|
#line 1 "(WikiPlugin module WikiNamespace, chunk 13)" |
95 |
|
|
; |
96 |
|
|
$SuikaWiki::Plugin::Rule{view}->{ns__root_wikiname} = $def; |
97 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{ns__root_wikiname} = $def; |
98 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{ns__root_wikiname} = $def; |
99 |
|
|
$SuikaWiki::Plugin::Rule{page_link}->{ns__root_wikiname} = $def; |
100 |
|
|
$SuikaWiki::Plugin::Rule{link_to_resource}->{ns__root_wikiname} = $def; |
101 |
|
|
}; |
102 |
|
|
|
103 |
|
|
push @{$SuikaWiki::View::Implementation::TemplateFragment{q#links#}}, { |
104 |
|
|
Main => q#%link-wiki ( |
105 |
|
|
page => {%ns-page-path-name;}p, |
106 |
|
|
rel => {up}, |
107 |
|
|
description => {%res (name => {WikiNS:GoToParent:Description});}p, |
108 |
|
|
);#, |
109 |
|
|
Order => 0, |
110 |
|
|
Description => [], |
111 |
|
|
}; |
112 |
|
|
|
113 |
|
|
package SuikaWiki::Plugin::Resource; |
114 |
|
|
|
115 |
|
|
our $BaseResource; |
116 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiNS:GoToParent:Description#} = q#Parent WikiPage, "%ns-page-path-name;"#; |
117 |
|
|
package SuikaWiki::Plugin::Registry; |
118 |
|
|
|
119 |
|
|
$Info{q#WikiNamespace#}->{provide} = {q#rule#, {q#link_to_resource#, [q#ns__root_wikiname#], q#form_input#, [q#ns_short_page_name#, q#ns_page_path_name#, q#is_child_of_root_ns#, q#ns__root_wikiname#], q#link_to_wikipage#, [q#is_child_of_root_ns#], q#view#, [q#ns_short_page_name#, q#ns_page_path_name#, q#is_child_of_root_ns#, q#ns__root_wikiname#], q#view_resource#, [q#ns_short_page_name#, q#ns_page_path_name#, q#is_child_of_root_ns#, q#ns__root_wikiname#], q#page_link#, [q#ns_short_page_name#, q#ns_page_path_name#, q#is_child_of_root_ns#, q#ns__root_wikiname#]}, q#viewfragment#, [{q#Name#, q#links#}]}; |
120 |
|
|
|
121 |
|
|
1; |