add: communities is_forum
This commit is contained in:
parent
9a128a3f0c
commit
1f545a0b21
9 changed files with 52 additions and 4 deletions
|
@ -58,6 +58,9 @@
|
|||
(text "{% if community.is_forge -%}")
|
||||
(icon (text "anvil"))
|
||||
(text "{%- endif %}")
|
||||
(text "{% if community.is_forum -%}")
|
||||
(icon (text "square-library"))
|
||||
(text "{%- endif %}")
|
||||
(h3
|
||||
("class" "name lg:long")
|
||||
(text "{{ community.context.display_name }}")))
|
||||
|
@ -2532,7 +2535,7 @@
|
|||
(icon (text "reply")))
|
||||
(a
|
||||
("class" "button small lowered")
|
||||
("href" "/mail/compose?receivers={% for receiver in letter.receivers %},id%3A{{ receiver }}{% endfor %}&subject=Re%3A%20{{ letter.subject }}&replying_to={{ letter.id }}")
|
||||
("href" "/mail/compose?receivers={{ owner.username }}{% for receiver in letter.receivers %},id%3A{{ receiver }}{% endfor %}&subject=Re%3A%20{{ letter.subject }}&replying_to={{ letter.id }}")
|
||||
("title" "Reply all")
|
||||
(icon (text "reply-all")))
|
||||
(text "{% if user and letter.owner == user.id -%}")
|
||||
|
|
|
@ -56,7 +56,10 @@
|
|||
("placeholder" "content")
|
||||
("required" "")
|
||||
("name" "content")
|
||||
("id" "content")))
|
||||
("id" "content")
|
||||
(text "
|
||||
|
||||
{{ user.settings.mail_signature }}")))
|
||||
|
||||
(button
|
||||
(icon (text "send-horizontal"))
|
||||
|
|
|
@ -1947,6 +1947,17 @@
|
|||
settings.anonymous_avatar_url,
|
||||
\"input\",
|
||||
],
|
||||
[[], \"Signatures\", \"title\"],
|
||||
[
|
||||
[\"mail_signature\", \"Mail signature\"],
|
||||
settings.mail_signature,
|
||||
\"textarea\",
|
||||
],
|
||||
[
|
||||
[\"forum_signature\", \"Forum signature (coming soon)\"],
|
||||
settings.forum_signature,
|
||||
\"textarea\",
|
||||
],
|
||||
[[], \"Misc\", \"title\"],
|
||||
[
|
||||
[\"hide_dislikes\", \"Hide post dislikes\"],
|
||||
|
|
|
@ -55,6 +55,10 @@ pub async fn create_request(
|
|||
c.is_forge = true;
|
||||
c.context.enable_titles = true;
|
||||
c.context.require_titles = true;
|
||||
} else if req.forum {
|
||||
c.is_forum = true;
|
||||
c.context.enable_titles = true;
|
||||
c.context.require_titles = true;
|
||||
}
|
||||
|
||||
match data.create_community(c).await {
|
||||
|
|
|
@ -749,6 +749,8 @@ pub struct CreateCommunity {
|
|||
pub title: String,
|
||||
#[serde(default)]
|
||||
pub forge: bool,
|
||||
#[serde(default)]
|
||||
pub forum: bool,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue