Bert Leunis pushed to branch feature/CC-ESSENTIALS-1108 at cms-community / hippo-essentials
Commits: ed98496f by Bert Leunis at 2018-01-05T15:09:06+01:00 ESSENTIALS-1108 faq list template with separate buttons for create and edit - - - - - 2 changed files: - plugins/faq/src/main/resources/instructions/freemarker/faqlist-main.ftl - plugins/skeleton-package/src/main/resources/instructions/css/cms-request.css Changes: ===================================== plugins/faq/src/main/resources/instructions/freemarker/faqlist-main.ftl ===================================== --- a/plugins/faq/src/main/resources/instructions/freemarker/faqlist-main.ftl +++ b/plugins/faq/src/main/resources/instructions/freemarker/faqlist-main.ftl @@ -3,25 +3,30 @@ <#-- @ftlvariable name="document" type="{{beansPackage}}.FaqList" --> <#if document??> <#if document.FAQ??> - <div class="has-edit-button"> - <@hst.manageContent templateQuery="new-faq-item" componentParameter="document" document=document defaultPath="faq"/> - <h1>${document.title?html}</h1> - <div> - <@hst.html hippohtml=document.description/> - </div> - <#list document.faqItems as faq> + <div class="has-edit-button"> + <@hst.manageContent document=document/> <!-- edit faq list document --> + <h1>${document.title?html}</h1> <div> - <h3><a href="<@hst.link hippobean=faq />">${faq.question?html}</a></h3> - <@hst.html hippohtml=faq.answer/> + <@hst.html hippohtml=document.description/> </div> - </#list> - </div> + <#list document.faqItems as faq> + <div class="has-edit-button"> + <h3><a href="<@hst.link hippobean=faq />">${faq.question?html}</a></h3> + <@hst.html hippohtml=faq.answer/> + <@hst.manageContent document=faq/> <!-- edit faq item --> + </div> + </#list> + <div class="has-new-content-button"> + <@hst.manageContent templateQuery="new-faq-item" defaultPath="faq"/> <!-- add faq item --> + </div> + </div> <#else> <div class="alert alert-danger">The selected document should be of type FAQ list.</div> </#if> <#elseif editMode> -<div> - <img src="<@hst.link path="/images/essentials/catalog-component-icons/faq.png" />"> Click to edit FAQ - <@hst.manageContent templateQuery="new-faq-item" componentParameter="document" document=document defaultPath="faq"/> -</div> + <div class="has-edit-button"> + <img src="<@hst.link path="/images/essentials/catalog-component-icons/faq.png" />"> Click to edit FAQ + <!-- add faq list document --> + <@hst.manageContent templateQuery="new-faq-list" componentParameter="document" defaultPath="faq"/> + </div> </#if> \ No newline at end of file ===================================== plugins/skeleton-package/src/main/resources/instructions/css/cms-request.css ===================================== --- a/plugins/skeleton-package/src/main/resources/instructions/css/cms-request.css +++ b/plugins/skeleton-package/src/main/resources/instructions/css/cms-request.css @@ -1,5 +1,5 @@ /* - * Copyright 2014 Hippo B.V. (http://www.onehippo.com) + * Copyright 2014-2018 Hippo B.V. (http://www.onehippo.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,5 +15,11 @@ */ .has-edit-button { - position: relative; -} \ No newline at end of file + position: relative; +} + +.has-new-content-button { + position: relative; + width: 40px; + height: 40px; +} View it on GitLab: https://code.onehippo.org/cms-community/hippo-essentials/commit/ed98496f29b215b92d3fdac7f2ea64ed10e6f8e2 --- View it on GitLab: https://code.onehippo.org/cms-community/hippo-essentials/commit/ed98496f29b215b92d3fdac7f2ea64ed10e6f8e2 You're receiving this email because of your account on code.onehippo.org.
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn