/[pub]/suikawiki/script/default/config.wp2
Suika

Contents of /suikawiki/script/default/config.wp2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Sun Feb 8 09:02:24 2004 UTC (20 years, 9 months ago) by wakaba
Branch: MAIN
Changes since 1.5: +4 -2 lines
Description for mode-after-edit selection  added

1 wakaba 1.1 #?SuikaWikiConfig/2.0
2    
3     Plugin:
4     @Name: config
5     @Description:
6     @@@: Per-Wiki Configuration Pseudo-Plugin
7     @@lang:en
8     @License: %%GPL%%
9 wakaba 1.6 @Date.RCS: $Date: 2004/02/01 12:34:18 $
10 wakaba 1.1
11     ViewFragment:
12     @Name: navbar
13     @Order: 20
14     @Formatting:
15 wakaba 1.3 %link-to-wikipage (
16     page => {Wiki//Page//Create},
17     label => {%link-to-it (
18     label => "%res(name=>GoToCreatePage);"p,
19     description => "%res(name=>GoToCreatePageLong);"p,
20     );},
21     );
22     %link-to-wikipage (
23     page => {Wiki//Page//Search},
24     label => {%link-to-it (
25 wakaba 1.1 label=>"%res(name=>GoToSearchPage);"p,
26 wakaba 1.3 description=>"%res(name=>GoToSearchPageLong);"p,
27     );},
28     rel => search,
29     );
30     %link-to-wikipage (
31 wakaba 1.5 page => {IndexPage},
32 wakaba 1.3 label => {%link-to-it (
33 wakaba 1.5 label=>"%res(name=>GoToIndexPage);"p,
34     description=>"%res(name=>GoToIndexPageLong);"p,
35 wakaba 1.3 );},
36 wakaba 1.5 rel => index,
37 wakaba 1.3 );
38 wakaba 1.1
39 wakaba 1.5
40 wakaba 1.1 ViewFragment:
41     @Name: links
42     @Formatting:
43 wakaba 1.3 %link-wiki(page=>"Wiki//News",rel=>news,
44     description=>"%res(name=>GoToWikiNewsLink);"p);
45     %link-wiki(page=>"Wiki//Help",rel=>help,
46     description=>"%res(name=>GoToWikiHelpLink);"p);
47     %link-wiki(page=>"Wiki//Page//License",rel=>copyright,
48     description=>"%res(name=>GoToWikiPageLicenseLink);"p);
49 wakaba 1.1
50 wakaba 1.3 %link-wiki(page=>"Wiki//Page//Search",rel=>search,
51 wakaba 1.5 description=>"%res(name=>GoToSearchPageLink);"p);
52 wakaba 1.2
53 wakaba 1.5 ## TODO: Resource, URI
54     %link-to-resource (
55     uri => {javascript:var%20WikiName=prompt('Please%20input%20the%20WikiName:','','Jump%20to%20SuikaWiki');if(WikiName)%7B_content.location.href='wiki%3F'+encodeURIComponent(WikiName)%7D},
56     rel => jump,
57     class => wiki-cmd,
58     label => {%html-link (
59     description => {%res(name=>JumpToLink);}p,
60     );},
61     );
62     %link-to-resource (
63     uri => {javascript:var%20WikiName=prompt('Please%20input%20the%20WikiName:','','Jump%20to%20SuikaWiki');if(WikiName)%7B_content.location.href='wiki%3Fmycmd=edit;mypage='+encodeURIComponent(WikiName)%7D},
64     rel => jump,
65     class => wiki-cmd,
66     label => {%html-link (
67     description => {%res(name=>JumpToEditLink);}p,
68     );},
69 wakaba 1.2 );
70    
71 wakaba 1.1 ViewFragment:
72     @Name: ws--footer
73     @Formatting:
74     %link-to-wikipage (
75     page => {Wiki//Page//License},
76 wakaba 1.3 label => {%link-to-it (
77     label => {%res (name => {Footer:License:SeeLicensePage});}p,
78     description => {%res (name => {Footer:License:SeeLicensePageLong});}p,
79     );},
80 wakaba 1.1 );
81 wakaba 1.5 # %wpr--remove-button;
82 wakaba 1.1
83 wakaba 1.2 ViewFragment:
84     @Template[list]:wr--read-body
85     @Order: -10
86     @Description:
87     @@@: "Read" mode body -- Calender
88     @@lang:en
89     @Formatting:
90     %if-calender(month,true=>{
91     %format(context=>form_input,template=>{%calender;});
92     },false=>{
93     %if-calender(true=>{
94     %format(context=>form_input,template=>{%calender-months;});
95     });
96     });
97    
98    
99     ViewFragment:
100     @Template[list]:
101     we--edit-body
102     we--conflict-body
103     @Order: 1000
104     @Description:
105     @@@: WikiPage editing guide
106     @@lang:en
107     @Formatting:
108     %block (
109     id => edit-help,
110     content => {%read(page=>{Wiki//EditHelp});}p,
111     );
112    
113    
114    
115    
116 wakaba 1.1 Resource:
117     @GoToWikiNewsLink:
118     @@@: News
119     @@lang:en
120     @GoToWikiHelpLink:
121     @@@: Help
122     @@lang:en
123     @GoToWikiPageLicenseLink:
124     @@@: License
125     @@lang:en
126    
127     ViewFragment:
128     @Name: we--edit
129     @Order: -100
130     @Formatting:
131 wakaba 1.3 %line(content=>{
132 wakaba 1.1 %submit(accesskey=>S,label=>{%res(name=>{Edit:Save});}p);
133 wakaba 1.4 [%wpp--next-anchor-index;]
134     }p);
135 wakaba 1.1
136     ViewFragment:
137     @Name: we--edit
138     @Order: -10
139 wakaba 1.3 @Formatting: %line(content=>{
140 wakaba 1.1 ViewFragment:
141     @Name: we--edit
142     @Order: 10
143     @Formatting: }p);
144    
145     ViewFragment:
146     @Name: we--edit
147     @Order: 150
148     @Formatting:
149 wakaba 1.3 %line(content=>{
150 wakaba 1.1
151     ViewFragment:
152     @Name: we--edit
153     @Order: 250
154     @Formatting:
155 wakaba 1.6 %mode-after-edit-selection (
156     description => {%res (name => {Edit:SaveAnd:Description});}p,
157     );
158 wakaba 1.1
159 wakaba 1.4 %we--update-lastmodified-datetime;
160    
161 wakaba 1.1 }p);
162    
163 wakaba 1.3 Resource:
164     @Footer:License:SeeLicensePage:
165     @@@: %char (ucs => {U+00A9});
166     @Footer:License:SeeLicensePageLong:
167     @@@: See license document
168     @@lang:en
169 wakaba 1.2
170     ## --- Should be moved to proper plugin module ---
171    
172     ## WikiPageRename
173     ViewFragment:
174     @Template[list]: we--adminedit-body
175 wakaba 1.4 @Order:100
176 wakaba 1.2 @Description:
177     @@@: Renaming WikiName section
178     @@lang:en
179     @Formatting:
180 wakaba 1.4 %section (
181 wakaba 1.2 title => {%res(name=>{Edit:Rename:Title});}p, heading,
182     content => {
183     %wp-rename-form (
184     content => {
185     %text (
186     id => to,
187     label => {%res(name=>{Edit:Rename:To=});}p,
188     size => 10,
189     default => {%page-name;}p,
190     );
191     %submit;
192     }p,
193     );
194     }p,
195     );
196 wakaba 1.1
197 wakaba 1.4 PluginConst:
198     @NS_XHTML1:
199     http://www.w3.org/1999/xhtml
200    
201     FormattingRule:
202     @Name: debug-sw09-text-xml-text-diff
203     @Formatting:
204     my $page = $p->{page} ? [split m#//#, $p->{page}]
205     : $o->{wiki}->{var}->{page};
206     my $sw09 = SuikaWiki::Plugin->module_package ('SuikaWiki09');
207    
208     ## Original Text Format
209     my $text1 = $o->{wiki}->{db}->get (content => $page);
210    
211     ## Text format -> XML format
212     my $xml = new Message::Markup::XML::Node type => '#fragment';
213     $sw09->text_to_xml ($text1, {-parent => $xml});
214    
215     ## XML format -> Text format
216     my $text2 = $sw09->xml_to_text ($xml, {});
217    
218     $p->{-parent}->append_new_node (type => '#element',
219     namespace_uri => $NS_XHTML1,
220     local_name => 'pre')
221     ->append_text ($xml->outer_xml);
222     SuikaWiki::Plugin->module_package ('WikiEdit')
223     ->diff_in_html (\$text1, \$text2 =>
224     $p->{-parent}->append_new_node (type => '#element',
225     namespace_uri => $NS_XHTML1,
226     local_name => 'pre')
227     );
228    
229     FormattingRule:
230     @Category[list]:view
231     @Name: debug-sw09-text-xml-text-diff
232     @Formatting:
233     my $page = $p->{page} ? [split m#//#, $p->{page}]
234     : $o->{wiki}->{var}->{page};
235     my $sw09 = SuikaWiki::Plugin->module_package ('SuikaWiki09');
236    
237     ## Original Text Format
238     my $text1 = $o->{wiki}->{db}->get (content => $page);
239    
240     ## Text format -> XML format
241     my $xml = new Message::Markup::XML::Node type => '#fragment';
242     $sw09->text_to_xml ($text1, {-parent => $xml});
243    
244     ## XML format -> Text format
245     my $text2 = $sw09->xml_to_text ($xml, {});
246    
247     $p->{-parent}->append_new_node (type => '#element',
248     namespace_uri => $NS_XHTML1,
249     local_name => 'pre')
250     ->append_text ($xml->outer_xml);
251     $p->{-parent}->append_new_node (type => '#element',
252     namespace_uri => $NS_XHTML1,
253     local_name => 'pre')
254     ->append_text ($text2);
255     SuikaWiki::Plugin->module_package ('WikiEdit')
256     ->diff_in_html (\$text1, \$text2 => $p->{-parent});
257    
258    
259     Was ViewFragment:
260     @Template[list]:wr--read-body
261     @Order: 120
262     @Formatting:
263     %section (
264     heading,
265     title => "Diff",
266     content => {
267     %debug-sw09-text-xml-text-diff;
268     }p,
269     );

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24