Changes for page Templates
Last modified by Administrator on 2021/08/11 11:39
edited by Sebastian Sams
on 2017/06/29 12:34
on 2017/06/29 12:34
edited by Administrator
on 2021/08/11 11:39
on 2021/08/11 11:39
Change comment:
Install extension [org.xwiki.contrib:application-help-center/1.5.4]
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Attachments (0 modified, 4 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - Templates1 +$services.localization.render('help.templates.title') - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ssams1 +XWiki.Admin - Content
-
... ... @@ -1,13 +1,16 @@ 1 1 {{include reference="Help.Code.VelocityMacros" /}} 2 2 3 3 {{velocity output="false"}} 4 +#set ($plaformPrefix = 'https://platform.xwiki.org/xwiki/bin/view/Features') 5 +#set ($exoPrefix = 'https://extensions.xwiki.org/xwiki/bin/view/Extension') 4 4 #set ($actionCards = [{ 5 - 'title': 'Use templates', 6 - 'description': 'Templates are predefined pages that can be copied when creating a new page.', 7 - 'tip': "<a href=""http://platform.xwiki.org/xwiki/bin/view/Features/DocumentLifecycle#HCreate"" class=""wikiexternallink"">Creating pages</a> based on templates makes it faster to adapt predefined content to your needs.", 7 + 'title': $services.localization.render('help.templates.useTemplates.title'), 8 + 'description': $services.localization.render('help.templates.useTemplates.description'), 9 + 'tip': $services.localization.render('help.templates.useTemplates.tip', 10 + ["<a href='$plaformPrefix/DocumentLifecycle#HCreate' class='wikiexternallink'>",'</a>']), 8 8 'thumbnail': 'Template', 9 9 'actions': [{ 10 - 'label': 'Tryit!',13 + 'label': $services.localization.render('help.try.label'), 11 11 'type': 'success', 12 12 'url': $xwiki.getURL('Sandbox.WebHome', 'create', $escapetool.url({ 13 13 'title': "New Page $datetool.get('dd MMM yyyy, HH:mm')" ... ... @@ -14,43 +14,63 @@ 14 14 })) 15 15 }] 16 16 }, { 17 - 'title': 'Create your template', 18 - 'description': 'Integrate structure and macros in an existing page, and transform it in a template.', 19 - 'tip': "<a href=""http://extensions.xwiki.org/xwiki/bin/view/Extension/Administration+Application#HCreatetheTemplateProvider"" class=""wikiexternallink"">Template Providers</a> expose templates on the Create Page dialog so that the users can use them.", 20 + 'title': $services.localization.render('help.templates.create.title'), 21 + 'description': $services.localization.render('help.templates.create.description'), 22 + 'tip': $services.localization.render('help.templates.create.tip', 23 + ["<a href='$exoPrefix/Administration+Application#HCreatetheTemplateProvider' class='wikiexternallink'>",'</a>']), 20 20 'thumbnail': 'Administration', 21 21 'actions': [{ 22 - 'label': 'Learn23 - 'url': 'http://extensions.xwiki.org/xwiki/bin/view/Extension/Administration+Application#HCreatetheTemplateProvider'26 + 'label': $services.localization.render('help.more.label'), 27 + 'url': "$exoPrefix/Administration+Application#HCreatetheTemplateProvider" 24 24 }] 25 25 }]) 26 26 27 27 #if ($hasAdmin) 28 28 #set ($discard = $actionCards[1].actions.add(0, { 29 - 'label': ' Browse',33 + 'label': $services.localization.render('help.browse.label'), 30 30 'url': $xwiki.getURL('XWiki.XWikiPreferences', 'admin', 'editor=globaladmin§ion=Templates') 31 31 })) 32 32 #end 33 33 38 +#macro (getTemplateExample $inputCard $outputCard) 39 + #set ($templateReference = $services.model.resolveDocument($inputCard.templateReference)) 40 + #if ($xwiki.getDocument($templateReference).isNew()) 41 + #set ($outputCard = { 42 + 'title': $inputCard.title, 43 + 'description': $inputCard.description, 44 + 'documentation': "$exoPrefix/Templates+Application/", 45 + 'thumbnail': $inputCard.thumbnail 46 + }) 47 + #else 48 + #set ($outputCard = { 49 + 'title': $inputCard.title, 50 + 'description': $inputCard.description, 51 + 'examples': $inputCard.templateReference, 52 + 'thumbnail': $inputCard.thumbnail 53 + }) 54 + #end 55 +#end 56 + 34 34 #set ($exampleCards = [{ 35 - 'title': ' Article',36 - 'description': 'Articlege',37 - 'e xamples': 'Help.Templates.Article.WebHome',38 - 'thumbnail': 'Help.Templates. Article.WebHome@article.png'58 + 'title': $services.localization.render('help.templates.article.title'), 59 + 'description':$services.localization.render('help.templates.article.description'), 60 + 'templateReference': 'Templates.Article.Template.WebHome', 61 + 'thumbnail': 'Help.Templates.WebHome@article.png' 39 39 }, { 40 - 'title': ' Encyclopedia',41 - 'description': ' Encyclopediapage',42 - 'e xamples': 'Help.Templates.Encyclopedia.WebHome',43 - 'thumbnail': 'Help.Templates. Encyclopedia.WebHome@encyclopedia.png'63 + 'title': $services.localization.render('help.templates.encyclopedia.title'), 64 + 'description': $services.localization.render('help.templates.encyclopedia.description'), 65 + 'templateReference': 'Templates.Encyclopedia.Template.WebHome', 66 + 'thumbnail': 'Help.Templates.WebHome@encyclopedia.png' 44 44 }, { 45 - 'title': 'Meeting Report',46 - 'description': 'Agendadnotes',47 - 'e xamples': 'Help.Templates.Meeting.WebHome',48 - 'thumbnail': 'Help.Templates. Meeting.WebHome@meeting.png'68 + 'title': $services.localization.render('help.templates.meeting.title'), 69 + 'description': $services.localization.render('help.templates.meeting.description'), 70 + 'templateReference': 'Templates.Meeting.Template.WebHome', 71 + 'thumbnail': 'Help.Templates.WebHome@meeting.png' 49 49 }, { 50 - 'title': ' SimplePage',51 - 'description': 'With tablefcontents',52 - 'e xamples': 'Help.Templates.Simple.WebHome',53 - 'thumbnail': 'Help.Templates. Simple.WebHome@simple.png'73 + 'title': $services.localization.render('help.templates.simple.title'), 74 + 'description': $services.localization.render('help.templates.simple.description'), 75 + 'templateReference': 'Templates.SimplePage.Template.WebHome', 76 + 'thumbnail': 'Help.Templates.WebHome@simple.png' 54 54 }]) 55 55 {{/velocity}} 56 56 ... ... @@ -67,8 +67,8 @@ 67 67 </div> 68 68 #end 69 69 </div> 70 -<h3 id="HExamples"> Examples</h3>71 -<p> Want tostart fromapredefinedtemplate? Here aresomeexamplesof availabletemplatesinside XWiki.</p>93 +<h3 id="HExamples">$services.localization.render('help.templates.examples.title')</h3> 94 +<p>$services.localization.render('help.templates.examples.description')</p> 72 72 <div class="row"> 73 73 #foreach ($card in $exampleCards) 74 74 ## See http://getbootstrap.com/css/#grid-responsive-resets . ... ... @@ -82,10 +82,12 @@ 82 82 <div class="clearfix visible-lg-block"></div> 83 83 #end 84 84 <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"> 85 - #helpExampleCard($card) 108 + #set ($outputCard = {}) 109 + #getTemplateExample($card $outputCard) 110 + #helpExampleCard($outputCard) 86 86 </div> 87 87 #end 88 88 </div> 89 -<p><a href=" http://extensions.xwiki.org/xwiki/bin/view/Extension/Templates+Application/" class="wikiexternallink">View more114 +<p><a href="$exoPrefix/Templates+Application/" class="wikiexternallink">$services.localization.render('help.templates.more')</a></p> 90 90 {{/html}} 91 91 {{/velocity}}
- article.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ssams - Size
-
... ... @@ -1,0 +1,1 @@ 1 +376.1 KB - Content
- encyclopedia.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ssams - Size
-
... ... @@ -1,0 +1,1 @@ 1 +331.5 KB - Content
- meeting.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ssams - Size
-
... ... @@ -1,0 +1,1 @@ 1 +83.5 KB - Content
- simple.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.ssams - Size
-
... ... @@ -1,0 +1,1 @@ 1 +180.8 KB - Content