mirror of
https://github.com/Prominence/grails-translations-plugin.git
synced 2026-01-09 19:06:41 +03:00
28 lines
500 B
Groovy
28 lines
500 B
Groovy
package by.prominence.translations
|
|
|
|
class TranslationsOverviewController {
|
|
|
|
def bundleService
|
|
|
|
def index() {
|
|
|
|
render view: 'index', model: [bundles: bundleService.getBundles()]
|
|
}
|
|
|
|
def show() {
|
|
|
|
if (!params.bundleName) {
|
|
// render error
|
|
}
|
|
|
|
Bundle bundle = bundleService.findBundleByName(params.bundleName as String)
|
|
|
|
if (!bundle) {
|
|
// render error
|
|
}
|
|
|
|
render view: 'show', model: [bundle: bundle]
|
|
}
|
|
|
|
}
|