License federation (#343)

* Federate license

* Make it possible to use no license
This commit is contained in:
Baptiste Gelez
2018-12-09 18:43:34 +01:00
committed by GitHub
parent e9f2f769be
commit b73fbd3768
16 changed files with 126 additions and 45 deletions
+2 -2
View File
@@ -8,7 +8,7 @@
@use routes::posts::NewPostForm;
@use routes::*;
@(ctx: BaseContext, blog: Blog, editing: bool, form: &NewPostForm, is_draft: bool, article: Option<Post>, errors: ValidationErrors, default_license: String, medias: Vec<Media>)
@(ctx: BaseContext, blog: Blog, editing: bool, form: &NewPostForm, is_draft: bool, article: Option<Post>, errors: ValidationErrors, medias: Vec<Media>)
@:base(ctx, &i18n!(ctx.1, if editing { "Edit {0}" } else { "New post" }; &form.title), {}, {}, {
<h1>
@@ -35,7 +35,7 @@
@input!(ctx.1, tags (optional text), "Tags, separated by commas", form, errors.clone(), "")
@input!(ctx.1, license (optional text), "License", &i18n!(ctx.1, "Default license will be {0}"; &default_license), form, errors, "")
@input!(ctx.1, license (optional text), "License", "Let it empty reserve all rights", form, errors, "")
<label for="cover">@i18n!(ctx.1, "Illustration")<small>@i18n!(ctx.1, "Optional")</small></label>
<select id="cover" name="cover">