From 47165d45946342b148313d020bd23c9db64de264 Mon Sep 17 00:00:00 2001 From: Simon Pither Date: Tue, 15 Jan 2013 20:22:28 +0000 Subject: [PATCH 1/4] Fix filename PlatformUiFIlters --- .../conf/{PlatformUiFIlters.groovy => PlatformUiFilters.groovy} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename grails-app/conf/{PlatformUiFIlters.groovy => PlatformUiFilters.groovy} (100%) diff --git a/grails-app/conf/PlatformUiFIlters.groovy b/grails-app/conf/PlatformUiFilters.groovy similarity index 100% rename from grails-app/conf/PlatformUiFIlters.groovy rename to grails-app/conf/PlatformUiFilters.groovy From 1153e1e48d39098fba61a11ef9a2e0e4f9eeeb84 Mon Sep 17 00:00:00 2001 From: Simon Pither Date: Thu, 21 Feb 2013 16:09:46 +0000 Subject: [PATCH 2/4] Fix use of bodyAttrs in theme:body tag --- .../taglib/org/grails/plugin/platform/ThemeTagLib.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grails-app/taglib/org/grails/plugin/platform/ThemeTagLib.groovy b/grails-app/taglib/org/grails/plugin/platform/ThemeTagLib.groovy index 51bafa9..52a5a2d 100644 --- a/grails-app/taglib/org/grails/plugin/platform/ThemeTagLib.groovy +++ b/grails-app/taglib/org/grails/plugin/platform/ThemeTagLib.groovy @@ -315,13 +315,13 @@ class ThemeTagLib { def bodyAttrs = attrs.bodyAttrs def bodyAttrsStr = '' if (bodyAttrs instanceof Map) { - bodyAttrsStr = HTMLTagLib.attrsToString(bodyAttrs) + bodyAttrsStr = TagLibUtils.attrsToString(bodyAttrs) } else if (bodyAttrs instanceof List) { def bodyAttrsMap = [:] bodyAttrs.each { p -> bodyAttrsMap[p] = g.pageProperty(name:'body.'+p) } - bodyAttrsStr = HTMLTagLib.attrsToString(bodyAttrsMap) + bodyAttrsStr = TagLibUtils.attrsToString(bodyAttrsMap) } - out << "" + out << "" if (debugMode) { // We need the body of the debug GSP as it has the panel in it // @todo we can probably ditch this layoutBody if theme previewer concats to "body" zone @@ -364,4 +364,4 @@ class ThemeTagLib { } -} \ No newline at end of file +} From c5adea8ebb741669643229f067313c970951313a Mon Sep 17 00:00:00 2001 From: Simon Pither Date: Sat, 23 Feb 2013 11:15:56 +0000 Subject: [PATCH 3/4] Fix application overrides of UI tag templates --- .../org/grails/plugin/platform/ui/UISetDefinition.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/groovy/org/grails/plugin/platform/ui/UISetDefinition.groovy b/src/groovy/org/grails/plugin/platform/ui/UISetDefinition.groovy index a9d9e74..78d43a0 100644 --- a/src/groovy/org/grails/plugin/platform/ui/UISetDefinition.groovy +++ b/src/groovy/org/grails/plugin/platform/ui/UISetDefinition.groovy @@ -62,7 +62,7 @@ class UISetDefinition { } for (p in pluginViewInfos) { - if (!mergedViews.find { v -> v == p}) { + if (!mergedViews.find { v -> v.name == p.name}) { mergedViews << p } } @@ -96,4 +96,4 @@ class UISetDefinition { } return v } -} \ No newline at end of file +} From 8d5533d1c5ffc4c5bd6086d09ddf1dddea6752f0 Mon Sep 17 00:00:00 2001 From: Simon Pither Date: Sun, 2 Jun 2013 21:30:58 +0100 Subject: [PATCH 4/4] Add basic attempt to use i18n messages to resolve field names when no label provided. Uses the same convention as the Fields plugin (without fall-back to parent types). --- grails-app/taglib/org/grails/plugin/platform/UITagLib.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grails-app/taglib/org/grails/plugin/platform/UITagLib.groovy b/grails-app/taglib/org/grails/plugin/platform/UITagLib.groovy index fef9aea..15cdf8c 100644 --- a/grails-app/taglib/org/grails/plugin/platform/UITagLib.groovy +++ b/grails-app/taglib/org/grails/plugin/platform/UITagLib.groovy @@ -696,7 +696,9 @@ class UITagLib implements InitializingBean { def labelCode = attrs.remove('label') if (!labelCode && name) { def propName = resolvePropertyName(name) - label = GrailsNameUtils.getNaturalName(propName) + label = p.text(code: "${GrailsNameUtils.getPropertyName(beanObject.getClass().simpleName)}.${propName}.label", default: '') + if(!label) + label = GrailsNameUtils.getNaturalName(propName) } if ((labelCode == null) && !label) { throwTagError "A value must be provided for [label] or [name] if no custom label is provided"