Added error message if bundle wasn't found.

This commit is contained in:
Prominence
2016-06-27 13:31:16 +03:00
parent 675eb1d055
commit 0a90793b02
6 changed files with 22 additions and 7 deletions
@@ -12,13 +12,15 @@ class TranslationsOverviewController {
def show() {
if (!params.bundleName) {
// render error
redirect action: 'index'
return
}
Bundle bundle = bundleService.findBundleByName(params.bundleName as String)
if (!bundle) {
// render error
render view: 'index', model: [message: g.message(code: 'plugin.translations.error.bundleNotFound', args: [params.bundleName as String])]
return
}
render view: 'show', model: [bundle: bundle]