28 |
);}, |
);}, |
29 |
rel => search, |
rel => search, |
30 |
); |
); |
|
%link-to-wikipage ( |
|
|
page => {IndexPage}, |
|
|
label => {%link-to-it ( |
|
|
label=>"%res(name=>GoToIndexPage);"p, |
|
|
description=>"%res(name=>GoToIndexPageLong);"p, |
|
|
);}, |
|
|
rel => index, |
|
|
); |
|
|
|
|
31 |
|
|
32 |
ViewFragment: |
ViewFragment: |
33 |
@Name: links |
@Name: links |
42 |
%link-wiki(page=>"Wiki//Page//Search",rel=>search, |
%link-wiki(page=>"Wiki//Page//Search",rel=>search, |
43 |
description=>"%res(name=>GoToSearchPageLink);"p); |
description=>"%res(name=>GoToSearchPageLink);"p); |
44 |
|
|
|
%link-to-resource ( |
|
|
iw-name => {wiki-content-in-cvs-repository}, |
|
|
iw-parameter => {%page-name;}p, |
|
|
rel => history, |
|
|
class => wiki-cmd, |
|
|
label => {%html-link ( |
|
|
description => {%res (name => ViewHistoryOfThisPageLink);}p, |
|
|
);}, |
|
|
); |
|
|
|
|
45 |
## TODO: Resource, URI |
## TODO: Resource, URI |
46 |
%link-to-resource ( |
%link-to-resource ( |
47 |
uri => {javascript:var%20WikiName=prompt('Please%20input%20the%20WikiName:','','Jump%20to%20SuikaWiki');if(WikiName)%7B_content.location.href='wiki%3F'+encodeURIComponent(WikiName)%7D}, |
uri => {javascript:var%20WikiName=prompt('Please%20input%20the%20WikiName:','','Jump%20to%20SuikaWiki');if(WikiName)%7B_content.location.href='wiki%3F'+encodeURIComponent(WikiName)%7D}, |
82 |
@Formatting: |
@Formatting: |
83 |
%block ( |
%block ( |
84 |
id => edit-help, |
id => edit-help, |
85 |
content => {%read(page=>{Wiki//EditHelp});}p, |
content => {%read(page=>{Wiki//Edit//Help});}p, |
86 |
); |
); |
87 |
|
|
|
|
|
|
|
|
|
|
|
88 |
Resource: |
Resource: |
89 |
@GoToWikiNewsLink: |
@GoToWikiNewsLink: |
90 |
@@@: News |
@@@: News |
137 |
@Footer:License:SeeLicensePageLong: |
@Footer:License:SeeLicensePageLong: |
138 |
@@@: See license document |
@@@: See license document |
139 |
@@lang:en |
@@lang:en |
140 |
|
@GoToCreatePage: |
141 |
|
@@@: Create |
142 |
|
@@lang: en |
143 |
|
@GoToCreatePageLong: |
144 |
|
@@@: Create a new WikiPage |
145 |
|
@@lang: en |
146 |
|
@GoToSearchPage: |
147 |
|
@@@: Search |
148 |
|
@@lang: en |
149 |
|
@GoToSearchPageLink: |
150 |
|
@@@: Search in this wiki |
151 |
|
@@lang: en |
152 |
|
@GoToSearchPageLong: |
153 |
|
@@@: Search word in this wiki |
154 |
|
@@lang: en |
155 |
|
@GoToWikiHelpLink: |
156 |
|
@@@: Help page |
157 |
|
@@lang: en |
158 |
|
@GoToWikiPageLicenseLink: |
159 |
|
@@@: License of this wiki |
160 |
|
@@lang: en |
161 |
|
@GoToWikiNewsLink: |
162 |
|
@@@: News on this wiki |
163 |
|
@@lang: en |
164 |
|
@JumpToLink: |
165 |
|
@@@: Open a WikiPage... |
166 |
|
@@lang: en |
167 |
|
@JumpToEditLink: |
168 |
|
@@@: Open a WikiPage in editing mode... |
169 |
|
@@lang: en |
170 |
|
@WikiForm:Create:Name: |
171 |
|
@@@: WikiName |
172 |
|
@@lang: en |
173 |
|
@WikiForm:Search:Name: |
174 |
|
@@@: Keyword |
175 |
|
@@lang: en |
176 |
|
|
177 |
|
|
178 |
|
|
179 |
|
|
|
PluginConst: |
|
|
@NS_XHTML1: |
|
|
http://www.w3.org/1999/xhtml |
|
180 |
|
|
|
FormattingRule: |
|
|
@Name: debug-sw09-text-xml-text-diff |
|
|
@Formatting: |
|
|
my $page = $o->{wiki}->name ($p->{page} || $o->{wiki}->{var}->{page}); |
|
|
my $sw09 = SuikaWiki::Plugin->module_package ('SuikaWiki09'); |
|
|
|
|
|
## Original Text Format |
|
|
my $text1 = $o->{wiki}->{db}->get (content => $page); |
|
|
|
|
|
## Text format -> XML format |
|
|
my $xml = new Message::Markup::XML::Node type => '#fragment'; |
|
|
$sw09->text_to_xml ($text1, {-parent => $xml}); |
|
|
|
|
|
## XML format -> Text format |
|
|
my $text2 = $sw09->xml_to_text ($xml, {}); |
|
|
|
|
|
$p->{-parent}->append_new_node (type => '#element', |
|
|
namespace_uri => $NS_XHTML1, |
|
|
local_name => 'pre') |
|
|
->append_text ($xml->outer_xml); |
|
|
SuikaWiki::Plugin->module_package ('WikiEdit') |
|
|
->diff_in_html (\$text1, \$text2 => |
|
|
$p->{-parent}->append_new_node (type => '#element', |
|
|
namespace_uri => $NS_XHTML1, |
|
|
local_name => 'pre') |
|
|
); |
|
181 |
|
|
|
FormattingRule: |
|
|
@Category[list]:view |
|
|
@Name: debug-sw09-text-xml-text-diff |
|
|
@Formatting: |
|
|
my $page = $p->{page} ? [split m#//#, $p->{page}] |
|
|
: $o->{wiki}->{var}->{page}; |
|
|
my $sw09 = SuikaWiki::Plugin->module_package ('SuikaWiki09'); |
|
|
|
|
|
## Original Text Format |
|
|
my $text1 = $o->{wiki}->{db}->get (content => $page); |
|
|
|
|
|
## Text format -> XML format |
|
|
my $xml = new Message::Markup::XML::Node type => '#fragment'; |
|
|
$sw09->text_to_xml ($text1, {-parent => $xml}); |
|
|
|
|
|
## XML format -> Text format |
|
|
my $text2 = $sw09->xml_to_text ($xml, {}); |
|
|
|
|
|
$p->{-parent}->append_new_node (type => '#element', |
|
|
namespace_uri => $NS_XHTML1, |
|
|
local_name => 'pre') |
|
|
->append_text ($xml->outer_xml); |
|
|
$p->{-parent}->append_new_node (type => '#element', |
|
|
namespace_uri => $NS_XHTML1, |
|
|
local_name => 'pre') |
|
|
->append_text ($text2); |
|
|
SuikaWiki::Plugin->module_package ('WikiEdit') |
|
|
->diff_in_html (\$text1, \$text2 => $p->{-parent}); |
|
|
|
|
|
|
|
|
Was ViewFragment: |
|
|
@Template[list]:wr--read-body |
|
|
@Order: 120 |
|
|
@Formatting: |
|
|
%section ( |
|
|
heading, |
|
|
title => "Diff", |
|
|
content => { |
|
|
%debug-sw09-text-xml-text-diff; |
|
|
}p, |
|
|
); |
|