diff --git a/webapp/web/templates/freemarker/edit/dateTimeWithPrecision.ftl b/webapp/web/templates/freemarker/edit/dateTimeWithPrecision.ftl index b7da42827..dfe8d86c6 100644 --- a/webapp/web/templates/freemarker/edit/dateTimeWithPrecision.ftl +++ b/webapp/web/templates/freemarker/edit/dateTimeWithPrecision.ftl @@ -28,30 +28,27 @@ precisionConstants.day -- URI for precision precisionConstants.hour -- URI for precision precisionConstants.minute -- URI for precision precisionConstants.second -- URI for precision - --> - - ${fieldName} -<@dateTime specificity="${minimumPrecision}" required="${requiredLevel}" /> +--> -<#macro dateTime specificity="full" required=specificity> - - - <#assign specLevel = 10 /> +<@dateTime precision="${minimumPrecision}" required="${requiredLevel}" /> + +<#macro dateTime precision="full" required=specificity> + <#assign precLevel = 10 /> <#assign reqLevel = 10 /> - <#if specificity == "${precisionConstants.year}"> - <#assign specLevel = 1 /> - <#elseif specificity == "${precisionConstants.month}"> - <#assign specLevel = 2 /> + <#if precision == "${precisionConstants.year}"> + <#assign precLevel = 1 /> + <#elseif precision == "${precisionConstants.month}"> + <#assign precLevel = 2 /> <#-- allow to specify year, month and day using "date" --> - <#elseif specificity == "${precisionConstants.day}" || specificity == "date"> - <#assign specLevel = 3 /> - <#elseif specificity == "${precisionConstants.hour}"> - <#assign specLevel = 4 /> + <#elseif precision == "${precisionConstants.day}" || precision == "date"> + <#assign precLevel = 3 /> + <#elseif precision == "${precisionConstants.hour}"> + <#assign precLevel = 4 /> <#-- allow to specify hours and minutes using "time" --> - <#elseif specificity == "${precisionConstants.minute}" || specificity == "time"> - <#assign specLevel = 5 /> - <#elseif specificity == "${precisionConstants.second}"> - <#assign specLevel = 6 /> + <#elseif precision == "${precisionConstants.minute}" || precision == "time"> + <#assign precLevel = 5 /> + <#elseif precision == "${precisionConstants.second}"> + <#assign precLevel = 6 /> #if> <#if required == "${precisionConstants.year}"> <#assign reqLevel = 1 /> @@ -73,230 +70,77 @@ precisionConstants.second -- URI for precision