2018-12-07 11:05:01 +00:00
|
|
|
@use plume_models::instance::Instance;
|
|
|
|
@use validator::ValidationErrors;
|
2018-12-06 17:54:16 +00:00
|
|
|
@use templates::base;
|
|
|
|
@use template_utils::*;
|
|
|
|
@use routes::instance::InstanceSettingsForm;
|
2018-12-07 11:05:01 +00:00
|
|
|
@use routes::*;
|
2018-12-06 17:54:16 +00:00
|
|
|
|
|
|
|
@(ctx: BaseContext, instance: Instance, form: InstanceSettingsForm, errors: ValidationErrors)
|
|
|
|
|
2019-02-02 14:23:50 +00:00
|
|
|
@:base(ctx, i18n!(ctx.1, "Administration of {0}"; instance.name.clone()), {}, {}, {
|
2018-12-06 17:54:16 +00:00
|
|
|
<h1>@i18n!(ctx.1, "Administration")</h1>
|
|
|
|
|
|
|
|
@tabs(&[
|
2018-12-07 11:05:01 +00:00
|
|
|
(&uri!(instance::admin).to_string(), i18n!(ctx.1, "Configuration"), true),
|
2018-12-13 21:20:19 +00:00
|
|
|
(&uri!(instance::admin_instances: page = _).to_string(), i18n!(ctx.1, "Instances"), false),
|
|
|
|
(&uri!(instance::admin_users: page = _).to_string(), i18n!(ctx.1, "Users"), false),
|
2018-12-06 17:54:16 +00:00
|
|
|
])
|
|
|
|
|
2018-12-07 11:05:01 +00:00
|
|
|
<form method="post" action="@uri!(instance::update_settings)">
|
2018-12-06 17:54:16 +00:00
|
|
|
@input!(ctx.1, name (text), "Name", form, errors.clone(), "props")
|
|
|
|
|
|
|
|
<label for="open_registrations">
|
2019-08-20 22:42:04 +00:00
|
|
|
<input type="checkbox" name="open_registrations" id="open_registrations" @if instance.open_registrations { checked }>
|
2018-12-29 16:40:11 +00:00
|
|
|
@i18n!(ctx.1, "Allow anyone to register here")
|
2019-08-20 22:42:04 +00:00
|
|
|
</label>
|
2018-12-06 17:54:16 +00:00
|
|
|
|
2019-04-04 19:06:37 +00:00
|
|
|
<label for="short_description">@i18n!(ctx.1, "Short description")<small>@i18n!(ctx.1, "Markdown syntax is supported")</small></label>
|
2018-12-06 17:54:16 +00:00
|
|
|
<textarea id="short_description" name="short_description">@Html(form.short_description)</textarea>
|
|
|
|
|
2018-12-25 14:59:54 +00:00
|
|
|
<label for="long_description">@i18n!(ctx.1, "Long description")<small>@i18n!(ctx.1, "Markdown syntax is supported")</small></label>
|
2018-12-06 17:54:16 +00:00
|
|
|
<textarea id="long_description" name="long_description">@Html(form.long_description)</textarea>
|
|
|
|
|
2018-12-29 16:40:11 +00:00
|
|
|
@input!(ctx.1, default_license (text), "Default article license", form, errors, "minlenght=\"1\"")
|
2018-12-06 17:54:16 +00:00
|
|
|
|
2018-12-29 16:40:11 +00:00
|
|
|
<input type="submit" value="@i18n!(ctx.1, "Save these settings")"/>
|
2018-12-06 17:54:16 +00:00
|
|
|
</form>
|
|
|
|
})
|