mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-22 17:45:48 +00:00
[AB-69] adding templating support to help modules
This commit is contained in:
@@ -2,22 +2,16 @@ package dev.sheldan.abstracto.modmail.commands;
|
||||
|
||||
import dev.sheldan.abstracto.core.command.config.ModuleInfo;
|
||||
import dev.sheldan.abstracto.core.command.config.ModuleInterface;
|
||||
import dev.sheldan.abstracto.templating.service.TemplateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class ModMailModuleInterface implements ModuleInterface {
|
||||
|
||||
public static final String MODMAIL = "modMail";
|
||||
|
||||
@Autowired
|
||||
private TemplateService templateService;
|
||||
public static final String MODMAIL = "modmail";
|
||||
|
||||
@Override
|
||||
public ModuleInfo getInfo() {
|
||||
String description = templateService.renderSimpleTemplate("modmail_help_module_info");
|
||||
return ModuleInfo.builder().name(MODMAIL).description(description).build();
|
||||
return ModuleInfo.builder().name(MODMAIL).templated(true).build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<property name="today" value="(SELECT NOW())"/>
|
||||
<changeSet author="Sheldan" id="modMail-module-insertion">
|
||||
<insert tableName="module">
|
||||
<column name="name" value="modMail"/>
|
||||
<column name="name" value="modmail"/>
|
||||
<column name="created" valueComputed="${today}"/>
|
||||
</insert>
|
||||
</changeSet>
|
||||
|
||||
Reference in New Issue
Block a user