Skip to content

Commit

Permalink
XWIKI-19383: Display a title on createlink
Browse files Browse the repository at this point in the history
* Fixed integration tests
  • Loading branch information
Sereza7 committed Apr 5, 2024
1 parent 42255e7 commit 17a58a6
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* Generates wanted link titles for resource references.
* Using this implementation should be avoided, another implementation should be used instead.
* E.g. XWikiDocumentURITitleGenerator in xwiki-platform which is used to provide proper translations.
* E.g. XWikiDocumentWantedLinkTitleGenerator in xwiki-platform which is used to provide translations.
* This implementation is a fallback and should only be used when xwiki-rendering is running by itself.
* This implementation uses the reference as the title.
* @version $Id$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ endDocument
.#-----------------------------------------------------
.expect|xhtml/1.0
.#-----------------------------------------------------
<p><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">\</span></a></span></p>
<p><span class="wikicreatelink" title="Create resource: \"><a href="editurl"><span class="wikigeneratedlinkcontent">\</span></a></span></p>
.#-----------------------------------------------------
.expect|annotatedxhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|\\--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">\</span></a></span><!--stopwikilink--></p>
<p><!--startwikilink:false|-|doc|-|\\--><span class="wikicreatelink" title="Create resource: \"><a href="editurl"><span class="wikigeneratedlinkcontent">\</span></a></span><!--stopwikilink--></p>
.#-----------------------------------------------------
.expect|xwiki/2.0
.#-----------------------------------------------------
[[\]]
.#-----------------------------------------------------
.input|xhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|\\--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">\</span></a></span><!--stopwikilink--></p>
<p><!--startwikilink:false|-|doc|-|\\--><span class="wikicreatelink" title="Create resource: \"><a href="editurl"><span class="wikigeneratedlinkcontent">\</span></a></span><!--stopwikilink--></p>
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
.#-----------------------------------------------------
.expect|xhtml/1.0
.#-----------------------------------------------------
<p><span class="wikicreatelink"><a href="editurl">label</a></span></p>
<p><span class="wikicreatelink" title="Create resource: Spa ce.Pa ge "><a href="editurl">label</a></span></p>
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ endDocument
.#-----------------------------------------------------
.expect|xhtml/1.0
.#-----------------------------------------------------
<p><span class="wikicreatelink"><a href="editurl">label</a></span></p>
<p><span class="wikicreatelink" title="Create resource: Space.UnknownPage"><a href="editurl">label</a></span></p>
.#-----------------------------------------------------
.expect|annotatedxhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|Space.UnknownPage--><span class="wikicreatelink"><a href="editurl">label</a></span><!--stopwikilink--></p>
<p><!--startwikilink:false|-|doc|-|Space.UnknownPage--><span class="wikicreatelink" title="Create resource: Space.UnknownPage"><a href="editurl">label</a></span><!--stopwikilink--></p>
.#-----------------------------------------------------
.expect|xwiki/2.0
.#-----------------------------------------------------
[[label>>Space.UnknownPage]]
.#-----------------------------------------------------
.input|xhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|Space.UnknownPage--><span class="wikicreatelink"><a href="editurl">label</a></span><!--stopwikilink--></p>
<p><!--startwikilink:false|-|doc|-|Space.UnknownPage--><span class="wikicreatelink" title="Create resource: Space.UnknownPage"><a href="editurl">label</a></span><!--stopwikilink--></p>
.#-----------------------------------------------------
.expect|plain/1.0
.#-----------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ endDocument
.#-----------------------------------------------------
.expect|xhtml/1.0
.#-----------------------------------------------------
<p><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">&#123;&#123;macro}}</span></a></span><br/><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Label&gt;Reference</span></a></span><br/><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Reference|Param=Value</span></a></span><br/><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">[[no link</span></a></span>&gt;&gt;Not Reference]]<br/><span class="wikicreatelink"><a href="editurl">[[<img src="imageurl" class="wikimodel-freestanding wikigeneratedid" id="Iwhatever" alt="whatever"/></a></span><br/>not:link</p>
<p><span class="wikicreatelink" title="Create resource: &#123;&#123;macro}}"><a href="editurl"><span class="wikigeneratedlinkcontent">&#123;&#123;macro}}</span></a></span><br/><span class="wikicreatelink" title="Create resource: Label&gt;Reference"><a href="editurl"><span class="wikigeneratedlinkcontent">Label&gt;Reference</span></a></span><br/><span class="wikicreatelink" title="Create resource: Reference|Param=Value"><a href="editurl"><span class="wikigeneratedlinkcontent">Reference|Param=Value</span></a></span><br/><span class="wikicreatelink" title="Create resource: [[no link"><a href="editurl"><span class="wikigeneratedlinkcontent">[[no link</span></a></span>&gt;&gt;Not Reference]]<br/><span class="wikicreatelink" title="Create resource: Reference"><a href="editurl">[[<img src="imageurl" class="wikimodel-freestanding wikigeneratedid" id="Iwhatever" alt="whatever"/></a></span><br/>not:link</p>
.#-----------------------------------------------------
.expect|annotatedxhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|\{\{macro}}--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">&#123;&#123;macro}}</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Label>Reference--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Label&gt;Reference</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Reference|Param=Value--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Reference|Param=Value</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|[[no link--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">[[no link</span></a></span><!--stopwikilink-->&gt;&gt;Not Reference]]<br/><!--startwikilink:false|-|doc|-|Reference--><span class="wikicreatelink"><a href="editurl">[[<!--startimage:false|-|attach|-|whatever--><img src="imageurl" class="wikimodel-freestanding wikigeneratedid" id="Iwhatever" alt="whatever"/><!--stopimage--></a></span><!--stopwikilink--><br/>not:link</p>
<p><!--startwikilink:false|-|doc|-|\{\{macro}}--><span class="wikicreatelink" title="Create resource: &#123;&#123;macro}}"><a href="editurl"><span class="wikigeneratedlinkcontent">&#123;&#123;macro}}</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Label>Reference--><span class="wikicreatelink" title="Create resource: Label&gt;Reference"><a href="editurl"><span class="wikigeneratedlinkcontent">Label&gt;Reference</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Reference|Param=Value--><span class="wikicreatelink" title="Create resource: Reference|Param=Value"><a href="editurl"><span class="wikigeneratedlinkcontent">Reference|Param=Value</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|[[no link--><span class="wikicreatelink" title="Create resource: [[no link"><a href="editurl"><span class="wikigeneratedlinkcontent">[[no link</span></a></span><!--stopwikilink-->&gt;&gt;Not Reference]]<br/><!--startwikilink:false|-|doc|-|Reference--><span class="wikicreatelink" title="Create resource: Reference"><a href="editurl">[[<!--startimage:false|-|attach|-|whatever--><img src="imageurl" class="wikimodel-freestanding wikigeneratedid" id="Iwhatever" alt="whatever"/><!--stopimage--></a></span><!--stopwikilink--><br/>not:link</p>
.#-----------------------------------------------------
.expect|xwiki/2.0
.#-----------------------------------------------------
Expand All @@ -68,4 +68,4 @@ not:link
.#-----------------------------------------------------
.input|xhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|{{macro}}--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">&#123;&#123;macro}}</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Label>Reference--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Label&gt;Reference</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Reference|Param=Value--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">Reference|Param=Value</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|[[no link--><span class="wikicreatelink"><a href="editurl"><span class="wikigeneratedlinkcontent">[[no link</span></a></span><!--stopwikilink-->&gt;&gt;Not Reference]]<br/><!--startwikilink:false|-|doc|-|Reference--><span class="wikicreatelink"><a href="editurl">[[<!--startimage:false|-|attach|-|whatever--><img src="imageurl" class="wikimodel-freestanding wikigeneratedid" id="Iwhatever" alt="whatever"/><!--stopimage--></a></span><!--stopwikilink--><br/>not:link</p>
<p><!--startwikilink:false|-|doc|-|{{macro}}--><span class="wikicreatelink" title="Create resource: &#123;&#123;macro}}"><a href="editurl"><span class="wikigeneratedlinkcontent">&#123;&#123;macro}}</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Label>Reference--><span class="wikicreatelink" title="Create resource: Label&gt;Reference"><a href="editurl"><span class="wikigeneratedlinkcontent">Label&gt;Reference</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Reference|Param=Value--><span class="wikicreatelink" title="Create resource: Reference|Param=Value"><a href="editurl"><span class="wikigeneratedlinkcontent">Reference|Param=Value</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|[[no link--><span class="wikicreatelink" title="Create resource: [[no link"><a href="editurl"><span class="wikigeneratedlinkcontent">[[no link</span></a></span><!--stopwikilink-->&gt;&gt;Not Reference]]<br/><!--startwikilink:false|-|doc|-|Reference--><span class="wikicreatelink" title="Create resource: Reference"><a href="editurl">[[<!--startimage:false|-|attach|-|whatever--><img src="imageurl" class="wikimodel-freestanding wikigeneratedid" id="Iwhatever" alt="whatever"/><!--stopimage--></a></span><!--stopwikilink--><br/>not:link</p>
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ endDocument
.#-----------------------------------------------------
.expect|xhtml/1.0
.#-----------------------------------------------------
<p><span class="wikicreatelink"><a href="editurl"><strong>hello</strong></a></span><br/><span class="wikicreatelink"><a href="editurl">= notheader</a></span><br/><span class="wikicreatelink"><a href="editurl"></a></span></p>
<p><span class="wikicreatelink" title="Create resource: Page"><a href="editurl"><strong>hello</strong></a></span><br/><span class="wikicreatelink" title="Create resource: Page"><a href="editurl">= notheader</a></span><br/><span class="wikicreatelink" title="Create resource: Page"><a href="editurl"></a></span></p>
.#-----------------------------------------------------
.expect|annotatedxhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink"><a href="editurl"><strong>hello</strong></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink"><a href="editurl">= notheader</a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink"><a href="editurl"><!--startmacro:testsimplemacro|-||-|label--><!--stopmacro--></a></span><!--stopwikilink--></p>
<p><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink" title="Create resource: Page"><a href="editurl"><strong>hello</strong></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink" title="Create resource: Page"><a href="editurl">= notheader</a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink" title="Create resource: Page"><a href="editurl"><!--startmacro:testsimplemacro|-||-|label--><!--stopmacro--></a></span><!--stopwikilink--></p>
.#-----------------------------------------------------
.expect|xwiki/2.0
.#-----------------------------------------------------
Expand All @@ -43,4 +43,4 @@ endDocument
.#-----------------------------------------------------
.input|xhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink"><a href="editurl"><strong>hello</strong></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink"><a href="editurl">= notheader</a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink"><a href="editurl"><!--startmacro:testsimplemacro|-||-|label--><!--stopmacro--></a></span><!--stopwikilink--></p>
<p><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink" title="Create resource: Page"><a href="editurl"><strong>hello</strong></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink" title="Create resource: Page"><a href="editurl">= notheader</a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Page--><span class="wikicreatelink" title="Create resource: Page"><a href="editurl"><!--startmacro:testsimplemacro|-||-|label--><!--stopmacro--></a></span><!--stopwikilink--></p>
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ endDocument
.#-----------------------------------------------------
.expect|xhtml/1.0
.#-----------------------------------------------------
<p><span class="wikilink"><a data-xwiki-translated-attribute-param1="value1" data-xwiki-translated-attribute-param2="value2" href="viewurl"><span class="wikigeneratedlinkcontent">Space.ExistingPage</span></a></span><br/><span class="wikicreatelink"><a data-xwiki-translated-attribute-param="value" href="editurl">label</a></span></p>
<p><span class="wikilink"><a data-xwiki-translated-attribute-param1="value1" data-xwiki-translated-attribute-param2="value2" href="viewurl"><span class="wikigeneratedlinkcontent">Space.ExistingPage</span></a></span><br/><span class="wikicreatelink" title="Create resource: Space.UnknownPage"><a data-xwiki-translated-attribute-param="value" href="editurl">label</a></span></p>
.#-----------------------------------------------------
.expect|annotatedxhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|Space.ExistingPage--><span class="wikilink"><a data-xwiki-translated-attribute-param1="value1" data-xwiki-translated-attribute-param2="value2" href="viewurl"><span class="wikigeneratedlinkcontent">Space.ExistingPage</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Space.UnknownPage--><span class="wikicreatelink"><a data-xwiki-translated-attribute-param="value" href="editurl">label</a></span><!--stopwikilink--></p>
<p><!--startwikilink:false|-|doc|-|Space.ExistingPage--><span class="wikilink"><a data-xwiki-translated-attribute-param1="value1" data-xwiki-translated-attribute-param2="value2" href="viewurl"><span class="wikigeneratedlinkcontent">Space.ExistingPage</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Space.UnknownPage--><span class="wikicreatelink" title="Create resource: Space.UnknownPage"><a data-xwiki-translated-attribute-param="value" href="editurl">label</a></span><!--stopwikilink--></p>
.#-----------------------------------------------------
.expect|xwiki/2.0
.#-----------------------------------------------------
Expand All @@ -32,4 +32,4 @@ endDocument
.#-----------------------------------------------------
.input|xhtml/1.0
.#-----------------------------------------------------
<p><!--startwikilink:false|-|doc|-|Space.ExistingPage--><span class="wikilink"><a data-xwiki-translated-attribute-param1="value1" data-xwiki-translated-attribute-param2="value2" href="viewurl"><span class="wikigeneratedlinkcontent">Space.ExistingPage</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Space.UnknownPage--><span class="wikicreatelink"><a data-xwiki-translated-attribute-param="value" href="editurl">label</a></span><!--stopwikilink--></p>
<p><!--startwikilink:false|-|doc|-|Space.ExistingPage--><span class="wikilink"><a data-xwiki-translated-attribute-param1="value1" data-xwiki-translated-attribute-param2="value2" href="viewurl"><span class="wikigeneratedlinkcontent">Space.ExistingPage</span></a></span><!--stopwikilink--><br/><!--startwikilink:false|-|doc|-|Space.UnknownPage--><span class="wikicreatelink" title="Create resource: Space.UnknownPage"><a data-xwiki-translated-attribute-param="value" href="editurl">label</a></span><!--stopwikilink--></p>

0 comments on commit 17a58a6

Please sign in to comment.