mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-21 12:53:11 +01:00
fix it up a tad
This commit is contained in:
parent
34ff8abb36
commit
885af36339
2 changed files with 10 additions and 8 deletions
|
@ -1,6 +1,9 @@
|
||||||
- anon = is_nil(assigns[:noanon]) or @noanon == false
|
elixir:
|
||||||
- options = if is_nil(assigns[:options]), do: "", else: @options
|
anon = is_nil(assigns[:noanon]) or @noanon == false
|
||||||
- deleted = Map.has_key?(@object, :hidden_from_users) and @object.hidden_from_users == true
|
options = if is_nil(assigns[:options]), do: "", else: @options
|
||||||
|
deleted = Map.has_key?(@object, :hidden_from_users) and @object.hidden_from_users == true
|
||||||
|
hidden_if_deleted = if deleted, do: "hidden", else: ""
|
||||||
|
deleted_class = if deleted, do: "communication--deleted", else: ""
|
||||||
|
|
||||||
- avatar = cond do
|
- avatar = cond do
|
||||||
- not is_nil(assigns[:image]) ->
|
- not is_nil(assigns[:image]) ->
|
||||||
|
@ -48,9 +51,6 @@
|
||||||
- else
|
- else
|
||||||
=<> @body
|
=<> @body
|
||||||
|
|
||||||
- hidden_if_deleted = if deleted, do: "hidden", else: ""
|
|
||||||
- deleted_class = if deleted, do: "communication--deleted", else: ""
|
|
||||||
|
|
||||||
.flex.flex__grow.hidden--mobile class=deleted_class
|
.flex.flex__grow.hidden--mobile class=deleted_class
|
||||||
.flex.flex__fixed.spacing--right class=hidden_if_deleted
|
.flex.flex__fixed.spacing--right class=hidden_if_deleted
|
||||||
= avatar
|
= avatar
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
- post_link = ~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}?#{[post_id: @post.id]}" <> "#post_#{@post.id}"
|
elixir:
|
||||||
|
post_link = ~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}?#{[post_id: @post.id]}" <> "#post_#{@post.id}"
|
||||||
|
|
||||||
- options = if true do
|
- options = if true do
|
||||||
.flex__spacer.hidden--desktop
|
.flex__spacer.hidden--desktop
|
||||||
a.communication__interaction.hidden--desktop title="Link to post" href=post_link
|
a.communication__interaction.hidden--desktop title="Link to post" href="#{post_link}"
|
||||||
i.fa.fa-link
|
i.fa.fa-link
|
||||||
= if not is_nil(@post.edited_at) and can?(@conn, :show, @post) do
|
= if not is_nil(@post.edited_at) and can?(@conn, :show, @post) do
|
||||||
a href=~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/history"
|
a href=~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/history"
|
||||||
|
|
Loading…
Reference in a new issue