2019-12-06 18:59:17 +01:00
|
|
|
h1
|
|
|
|
' Revision history for
|
2024-04-29 02:55:27 +02:00
|
|
|
= link @static_page.title, to: ~p"/pages/#{@static_page}"
|
2019-12-06 18:59:17 +01:00
|
|
|
|
|
|
|
table.table
|
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th User
|
|
|
|
th Date
|
|
|
|
th Body
|
|
|
|
|
|
|
|
tbody
|
|
|
|
= for version <- @versions do
|
|
|
|
tr
|
2024-04-29 02:55:27 +02:00
|
|
|
td = link version.user.name, to: ~p"/profiles/#{version.user}"
|
2019-12-06 18:59:17 +01:00
|
|
|
td = pretty_time(version.created_at)
|
|
|
|
td.static-page__diff
|
|
|
|
= for diff <- version.difference do
|
|
|
|
= case diff do
|
|
|
|
- {:eq, lines} ->
|
|
|
|
= for line <- lines do
|
|
|
|
= line
|
|
|
|
= "\n"
|
|
|
|
|
|
|
|
- {:ins, lines} ->
|
|
|
|
ins.differ
|
|
|
|
= for line <- lines do
|
|
|
|
= line
|
|
|
|
= "\n"
|
|
|
|
|
|
|
|
- {:del, lines} ->
|
|
|
|
del.differ
|
|
|
|
= for line <- lines do
|
|
|
|
= line
|
|
|
|
= "\n"
|