mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
fix templates
This commit is contained in:
parent
f8aa0a68df
commit
ecd0a91025
4 changed files with 10 additions and 7 deletions
|
@ -30,11 +30,11 @@
|
|||
= for topic <- @topics do
|
||||
= render PhilomenaWeb.ActivityView, "_topic_strip.html", topic: topic, conn: @conn
|
||||
.block.hide-mobile
|
||||
a.block__header--single-item.center href="/lists/recent_comments"
|
||||
a.block__header--single-item.center href="/comments"
|
||||
' Recent Comments
|
||||
= for comment <- @comments do
|
||||
= render PhilomenaWeb.ActivityView, "_comment_strip.html", comment: comment, conn: @conn
|
||||
a.block__header--single-item.center href="/search?q=first_seen_at.gt:3 days ago&sf=comments&sd=desc"
|
||||
a.block__header--single-item.center href="/search?q=first_seen_at.gt:3 days ago&sf=comment_count&sd=desc"
|
||||
' Most Commented-on Images
|
||||
|
||||
.column-layout__main
|
||||
|
|
|
@ -14,13 +14,10 @@ nav#burger
|
|||
a href="/filters"
|
||||
i.fa.fa-fw.fa-filter<>
|
||||
' Filters
|
||||
a href="/lists"
|
||||
i.fa.fa-fw.fa-list<>
|
||||
' Rankings
|
||||
a href="/galleries"
|
||||
i.fa.fa-fw.fa-image<>
|
||||
' Galleries
|
||||
a href="/lists/recent_comments"
|
||||
a href="/comments"
|
||||
i.fa.fa-fw.fa-comments<>
|
||||
' Comments
|
||||
a href="/commissions"
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
.toggle-box-container
|
||||
.toggle-box-container__content
|
||||
= for tag <- @tag.implied_by_tags do
|
||||
= map_join @tag.implied_by_tags, ", ", fn tag ->
|
||||
=> link tag.name, to: Routes.tag_path(@conn, :show, tag)
|
||||
|
||||
br
|
||||
|
|
|
@ -65,6 +65,12 @@ defmodule PhilomenaWeb.AppView do
|
|||
Canada.Can.can?(conn.assigns.current_user, action, model)
|
||||
end
|
||||
|
||||
def map_join(enumerable, joiner, map_fn) do
|
||||
enumerable
|
||||
|> Enum.map(map_fn)
|
||||
|> Enum.intersperse(joiner)
|
||||
end
|
||||
|
||||
def number_with_delimiter(nil), do: "0"
|
||||
def number_with_delimiter(number) do
|
||||
number
|
||||
|
|
Loading…
Reference in a new issue