diff --git a/ccm-cms/src/main/resources/themes/freemarker/ccm-cms-assets-imagestep.ftl b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms-assets-imagestep.ftl new file mode 100644 index 000000000..dca903ed8 --- /dev/null +++ b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms-assets-imagestep.ftl @@ -0,0 +1,20 @@ +<#--filedoc + Provides functions for processing the image attachemnts of a content item. + + @depcrecated Use ccm-cms/image-attachments.ftl instead +--> + +<#import "/ccm-cms/image-attachments.ftl" as ImageAttachments> + +<#--doc + Creates a sorted sequence of hashes (see Freemarker docuementation) for the + image attachments of a content item. + + @param item The model of the content item to use. + + @return The images attached to the item. +--> +<#function getImageAttachments item> + <#return ImageAttachments.getImageAttachments(item)> + + diff --git a/ccm-cms/src/main/resources/themes/freemarker/ccm-cms-assets-notes.ftl b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms-assets-notes.ftl new file mode 100644 index 000000000..52aaa6368 --- /dev/null +++ b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms-assets-notes.ftl @@ -0,0 +1,21 @@ +<#--filedoc + Functions for processing note attachments. + + @depcrecated Use ccm-cms/sidenote-attachments instead +--> + +<#import "/ccm-cms/sidenote-attachments" as SideNotes> + +<#--doc + Generates a sorted sequence of hashes (see Freemarker documentation) for + the note attachments of a content item. + + @param item The model of the content item to use. + + @return The side notes attached to the item. +--> +<#function getNotes item> + <#return item.sideNotes> + + + diff --git a/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/ccm-cms-assets-relatedlink.ftl b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/ccm-cms-assets-relatedlink.ftl new file mode 100644 index 000000000..06bef3fab --- /dev/null +++ b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/ccm-cms-assets-relatedlink.ftl @@ -0,0 +1,58 @@ +<#--filedoc + Functions for processing related links. + + @depcrecated Use ccm-cms/relatedlink-attachments.ftl instead +--> + +<#import "/ccm-cms/relatedlink-attachments.ftl" as RelatedLinks> + +<#--doc + Generates a sorted sequence of hashes (see Freemarker documentation) + from the related links of a content item. + + @param item The model of the content item to use. + + @param linkListName: The name of the link list to use. + + @return The links attached to the provided item. +--> +<#function getRelatedLinks item linkListName="NONE"> + + <#return RelatedLinks.getRelatedLinks(item linkListName)> + + <#-- <#return item["./links[./linkListName='${linkListName}']"]?sort_by("linkOrder")> --> + + +<#--doc + *Internal* function for determing the type a related link. + + @param link The link + + @return The type of the link. Either `externalLink`, `internalLink` or `caption`. +--> +<#function _getLinkType link> + <#return RelatedLinks.:_getLinkType(link)> + + +<#--doc + *Internal* function for getting parameters for the link. + + @param link The link + + @return Parameters for an internal link. +--> +<#function _getInternalLinkParameters link> + <#return RelatedLinks._getInternalLinkParameters(link)> + + +<#--doc + *Internal* function for constructing the target URI of a related link. + + @param link The link model to use. + + @return The URL for the target of the link. +--> +<#function _getTargetUri link> + <#return RelatedLinks._getTargetUri(link)> + + diff --git a/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/image-attachments.ftl b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/image-attachments.ftl new file mode 100644 index 000000000..080ca9174 --- /dev/null +++ b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/image-attachments.ftl @@ -0,0 +1,16 @@ +<#--filedoc + Provides functions for processing the image attachemnts of a content item. +--> + +<#--doc + Creates a sorted sequence of hashes (see Freemarker docuementation) for the + image attachments of a content item. + + @param item The model of the content item to use. + + @return The images attached to the provided item. +--> +<#function getImageAttachments item> + <#return item.imageAttachments> + + diff --git a/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/relatedlink-attachments.ftl b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/relatedlink-attachments.ftl new file mode 100644 index 000000000..6a7ebe4eb --- /dev/null +++ b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/relatedlink-attachments.ftl @@ -0,0 +1,51 @@ +<#--filedoc + Functions for processing related links. +--> + +<#--doc + Generates a sorted sequence of hashes (see Freemarker documentation) + from the related links of a content item. + + @param item The model of the content item to use. + + @param linkListName: The name of the link list to use. + + @return The links attached to the provided item. +--> +<#function getRelatedLinks item linkListName="NONE"> + + <#return item.relatedLinks[linkListName]> + + +<#--doc + *Internal* function for determing the type a related link. + + @param link The link + + @return The type of the link.. +--> +<#function _getLinkType link> + <#return link.type> + + +<#--doc + *Internal* function for getting parameters for the link. + + @param link The link + + @return Parameters for an internal link. +--> +<#function _getInternalLinkParameters link> + <#return link.parameters> + + +<#--doc + *Internal* function for constructing the target URI of a related link. + + @param link The link model to use. + + @return The URL for the target of the link. +--> +<#function _getTargetUri link> + <#return link.targetUri> + \ No newline at end of file diff --git a/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/sidenote-attachments.ftl b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/sidenote-attachments.ftl new file mode 100644 index 000000000..6cecf98b9 --- /dev/null +++ b/ccm-cms/src/main/resources/themes/freemarker/ccm-cms/sidenote-attachments.ftl @@ -0,0 +1,17 @@ +<#--filedoc + Functions for processing note attachments. +--> + +<#--doc + Generates a sorted sequence of hashes (see Freemarker documentation) for + the note attachments of a content item. + + @param item The model of the content item to use. + + @return The side notes attached to the item. +--> +<#function getNotes item> + <#returm item.sideNotes> + + + diff --git a/ccm-editor/.gitignore b/ccm-editor/.gitignore new file mode 100644 index 000000000..57651a1d8 --- /dev/null +++ b/ccm-editor/.gitignore @@ -0,0 +1 @@ +*.tmp.txt