+ <%= if @channel.is_live do %>
+
+ LIVE NOW
+
+
+ <%= @channel.viewers %>
+ <%=
+ if @channel.viewers == 1 do
+ "viewer"
+ else
+ "viewers"
+ end
+ %>
+ <% else %>
+
+ OFF AIR
+
+ <% end %>
+
+
diff --git a/lib/philomena_web/templates/activity/_channel_strip.html.slime b/lib/philomena_web/templates/activity/_channel_strip.html.slime
deleted file mode 100644
index 278cc6e9..00000000
--- a/lib/philomena_web/templates/activity/_channel_strip.html.slime
+++ /dev/null
@@ -1,19 +0,0 @@
-.block__content.flex.alternating-color
- .flex__grow
- / TODO
- a href=~p"/channels/#{@channel}"
- /- if channel.channel_image.present?
- / => image_tag channel.uploaded_channel_image.url, width: 32, height: 32, alt: "#{channel.title}'s logo'", class: 'channel-strip__image'
- /- else
- / => image_tag 'no_avatar_original.svg', width: 32, height: 32, alt: "#{channel.title}'s logo'", class: 'channel-strip__image'
- = @channel.title || @channel.short_name
- .flex__fixed.flex__right
- = if @channel.is_live do
- span.channel-strip__state.label.label--narrow.label--success
- ' LIVE NOW
- br
- => @channel.viewers
- = if @channel.viewers == 1, do: "viewer", else: "viewers"
- - else
- span.channel-strip__state.label.label--narrow.label--danger
- ' OFF AIR
diff --git a/lib/philomena_web/templates/activity/_comment_strip.html.heex b/lib/philomena_web/templates/activity/_comment_strip.html.heex
new file mode 100644
index 00000000..5660ee55
--- /dev/null
+++ b/lib/philomena_web/templates/activity/_comment_strip.html.heex
@@ -0,0 +1,17 @@
+
+ <%= if @topic.sticky do %>
+
+ <% end %>
+ <%= if @topic.last_post do %>
+
+ <%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @topic.last_post, conn: @conn) %>
+
+ <%= link("replied to", to: ~p"/forums/#{@topic.forum}/topics/#{@topic}?#{[post_id: @topic.last_post]}" <> "#post_#{@topic.last_post.id}") %>
+ <% end %>
+ <%= link(@topic.title, to: ~p"/forums/#{@topic.forum}/topics/#{@topic}") %>
+ in
+ <%= link(@topic.forum.name, to: ~p"/forums/#{@topic.forum}") %>
+
diff --git a/lib/philomena_web/templates/activity/_topic_strip.html.slime b/lib/philomena_web/templates/activity/_topic_strip.html.slime
deleted file mode 100644
index 8dc09e01..00000000
--- a/lib/philomena_web/templates/activity/_topic_strip.html.slime
+++ /dev/null
@@ -1,10 +0,0 @@
-.block__content.alternating-color
- = if @topic.sticky do
- i.fa.fa-thumbtack>
- = if @topic.last_post do
- span.hyphenate-breaks
- = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @topic.last_post, conn: @conn
- = link("replied to", to: ~p"/forums/#{@topic.forum}/topics/#{@topic}?#{[post_id: @topic.last_post]}" <> "#post_#{@topic.last_post.id}")
- =<> link(@topic.title, to: ~p"/forums/#{@topic.forum}/topics/#{@topic}")
- ' in
- => link(@topic.forum.name, to: ~p"/forums/#{@topic.forum}")
diff --git a/lib/philomena_web/templates/activity/index.html.heex b/lib/philomena_web/templates/activity/index.html.heex
new file mode 100644
index 00000000..e5d97459
--- /dev/null
+++ b/lib/philomena_web/templates/activity/index.html.heex
@@ -0,0 +1,89 @@
+
+ <%= if @show_sidebar do %>
+
+ <% end %>
+
+ <%= render(PhilomenaWeb.ImageView, "index.html", conn: @conn, images: @images, size: :thumb) %>
+ <%= if @show_sidebar and not is_nil(@watched) and Enum.any?(@watched) do %>
+
+ <%= link(request.requesting_user.name, to: ~p"/profiles/#{request.requesting_user}") %>
+
+
+ <%= request.dnp_type %>
+
+
+ <%= body %>
+
+
+ <%= pretty_state(request) %>
+ <%= if request.modifying_user do %>
+ by
+ <%= link(request.modifying_user.name, to: ~p"/profiles/#{request.modifying_user}") %>
+ <% end %>
+
+
+ <%= pretty_time(request.created_at) %>
+
+
+ <%= pretty_time(request.updated_at) %>
+
+
+ <%= link("Show", to: ~p"/dnp/#{request}") %>
+ •
+ <%= link("Send PM", to: ~p"/conversations/new?#{[recipient: request.requesting_user.name]}") %>
+ <%= case request.aasm_state do %>
+ <% s when s in ["requested", "claimed"] -> %>
+ •
+ <%= link("Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
+ •
+ <%= link("Approve", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "listed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
+ •
+ <%= link("Close", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
+ <% "listed" -> %>
+ •
+ <%= link("Rescind", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "rescinded"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
+ •
+ <%= link("Close", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
+ <% s when s in ["rescinded", "acknowledged"] -> %>
+ •
+ <%= link("Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "acknowledged"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
+ •
+ <%= link("Close", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
+ <% _state -> %>
+ •
+ <%= link("Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
+ <% end %>
+
+
+ <% end %>
+
+
+
+
diff --git a/lib/philomena_web/templates/admin/dnp_entry/index.html.slime b/lib/philomena_web/templates/admin/dnp_entry/index.html.slime
deleted file mode 100644
index bf932f69..00000000
--- a/lib/philomena_web/templates/admin/dnp_entry/index.html.slime
+++ /dev/null
@@ -1,90 +0,0 @@
-h2 Do-Not-Post Requests
-
-= form_for :dnp_entry, ~p"/admin/dnp_entries", [method: "get", class: "hform"], fn f ->
- .field
- = text_input f, :q, name: :q, value: @conn.params["q"], class: "input hform__text", placeholder: "Search query", autocapitalize: "none"
- = submit "Search", class: "hform__button button"
-
-- route = fn p -> ~p"/admin/dnp_entries?#{p}" end
-- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @dnp_entries, route: route, params: [states: state_param(@conn.params["states"])]
-
-.block
- .block__header
- = pagination
-
- span.block__header__title Display Only:
- => link "All Open", to: ~p"/admin/dnp_entries?#{[states: ~W(requested claimed rescinded acknowledged)]}"
- => link "Listed", to: ~p"/admin/dnp_entries?#{[states: ~W(listed)]}"
- => link "Rescinded", to: ~p"/admin/dnp_entries?#{[states: ~W(rescinded acknowledged)]}"
- => link "Closed", to: ~p"/admin/dnp_entries?#{[states: ~W(closed)]}"
-
- .block__content
- table.table
- thead
- tr
- td Tag
- td Requesting User
- td Type
- td Conditions
- td Status
- td Created
- td Modified
- td Options
-
- tbody
- = for {body, request} <- @dnp_entries do
- tr
- td
- = render PhilomenaWeb.TagView, "_tag.html", tag: request.tag, conn: @conn
-
- td
- = link request.requesting_user.name, to: ~p"/profiles/#{request.requesting_user}"
-
- td
- = request.dnp_type
-
- td
- = body
-
- td class=dnp_entry_row_class(request)
- => pretty_state(request)
-
- = if request.modifying_user do
- ' by
- = link request.modifying_user.name, to: ~p"/profiles/#{request.modifying_user}"
-
- td
- = pretty_time(request.created_at)
-
- td
- = pretty_time(request.updated_at)
-
- td
- => link "Show", to: ~p"/dnp/#{request}"
- ' •
- => link "Send PM", to: ~p"/conversations/new?#{[recipient: request.requesting_user.name]}"
-
- = case request.aasm_state do
- - s when s in ["requested", "claimed"] ->
- ' •
- => link "Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
- ' •
- => link "Approve", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "listed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
- ' •
- => link "Close", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
-
- - "listed" ->
- ' •
- => link "Rescind", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "rescinded"]}", data: [method: "post", confirm: "Are you really, really sure?"]
- ' •
- = link "Close", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
-
- - s when s in ["rescinded", "acknowledged"] ->
- ' •
- => link "Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "acknowledged"]}", data: [method: "post", confirm: "Are you really, really sure?"]
- ' •
- = link "Close", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
-
- - _state ->
- ' •
- => link "Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]
diff --git a/lib/philomena_web/templates/admin/donation/_table.html.heex b/lib/philomena_web/templates/admin/donation/_table.html.heex
new file mode 100644
index 00000000..a50c2903
--- /dev/null
+++ b/lib/philomena_web/templates/admin/donation/_table.html.heex
@@ -0,0 +1,44 @@
+
+
+
+
+ User
+
+
+ Email
+
+
+ Amount
+
+
+ Note
+
+
+ At
+
+
+
+
+ <%= for donation <- @donations do %>
+
+
+ <%= if donation.user do %>
+ <%= link(donation.user.name, to: ~p"/profiles/#{donation.user}") %>
+ <% end %>
+
+ <%= ban.reason %>
+ <%= if present?(ban.note) do %>
+
+
+ Note:
+ <%= ban.note %>
+
+
+ <% end %>
+
+
+ <%= ban.generated_ban_id %>
+
+
+ <%= link("Edit", to: ~p"/admin/subnet_bans/#{ban}/edit") %>
+ <%= if @current_user.role == "admin" do %>
+ •
+ <%= link("Destroy", to: ~p"/admin/subnet_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
+ <% end %>
+
+
+ <% end %>
+
+
+
+
+ <%= pagination %>
+
+
diff --git a/lib/philomena_web/templates/admin/subnet_ban/index.html.slime b/lib/philomena_web/templates/admin/subnet_ban/index.html.slime
deleted file mode 100644
index c051a10a..00000000
--- a/lib/philomena_web/templates/admin/subnet_ban/index.html.slime
+++ /dev/null
@@ -1,62 +0,0 @@
-h1 Subnet Bans
-
-- route = fn p -> ~p"/admin/subnet_bans?#{p}" end
-- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @subnet_bans, route: route, params: page_params(@conn.params)
-
-= form_for :subnet_ban, ~p"/admin/subnet_bans", [method: "get", class: "hform"], fn f ->
- .field
- = text_input f, :q, name: "q", class: "hform__text input", placeholder: "Search"
- = submit "Search", class: "button hform__button"
-
-.block
- .block__header
- a href=~p"/admin/subnet_bans/new"
- i.fa.fa-plus>
- ' New subnet ban
-
- = pagination
-
- .block__content
- table.table
- thead
- tr
- th Specification
- th Created
- th Expires
- th Reason/Note
- th Ban ID
- th Options
-
- tbody
- = for ban <- @subnet_bans do
- tr
- td
- = link ban.specification, to: ~p"/ip_profiles/#{to_string(ban.specification)}"
-
- td
- => pretty_time ban.created_at
- = user_abbrv ban.banning_user
-
- td class=ban_row_class(ban)
- = pretty_time ban.valid_until
-
- td
- = ban.reason
-
- = if present?(ban.note) do
- p.block.block--fixed
- em
- ' Note:
- = ban.note
-
- td
- = ban.generated_ban_id
-
- td
- => link "Edit", to: ~p"/admin/subnet_bans/#{ban}/edit"
- = if @current_user.role == "admin" do
- ' •
- => link "Destroy", to: ~p"/admin/subnet_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]
-
- .block__header.block__header--light
- = pagination
diff --git a/lib/philomena_web/templates/admin/subnet_ban/new.html.heex b/lib/philomena_web/templates/admin/subnet_ban/new.html.heex
new file mode 100644
index 00000000..d7e84b6c
--- /dev/null
+++ b/lib/philomena_web/templates/admin/subnet_ban/new.html.heex
@@ -0,0 +1,6 @@
+
+ New Subnet Ban
+
+<%= render(PhilomenaWeb.Admin.SubnetBanView, "_form.html", changeset: @changeset, action: ~p"/admin/subnet_bans", conn: @conn) %>
+
+<%= link("Back", to: ~p"/admin/subnet_bans") %>
diff --git a/lib/philomena_web/templates/admin/subnet_ban/new.html.slime b/lib/philomena_web/templates/admin/subnet_ban/new.html.slime
deleted file mode 100644
index 7732231b..00000000
--- a/lib/philomena_web/templates/admin/subnet_ban/new.html.slime
+++ /dev/null
@@ -1,5 +0,0 @@
-h1 New Subnet Ban
-= render PhilomenaWeb.Admin.SubnetBanView, "_form.html", changeset: @changeset, action: ~p"/admin/subnet_bans", conn: @conn
-
-br
-= link "Back", to: ~p"/admin/subnet_bans"
diff --git a/lib/philomena_web/templates/admin/user/_form.html.heex b/lib/philomena_web/templates/admin/user/_form.html.heex
new file mode 100644
index 00000000..33472e60
--- /dev/null
+++ b/lib/philomena_web/templates/admin/user/_form.html.heex
@@ -0,0 +1,121 @@
+<%= form_for @changeset, @action, fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+
+
+
+ Essential user details
+
+
+
+
+
+
+
+
+
+
+
+ Avatar
+
+
+ <%= link("Remove avatar", to: ~p"/admin/users/#{@user}/avatar", class: "button", data: [method: "delete", confirm: "Are you really, really sure?"]) %>
+
+
+
+
+
+
+ General user flags
+
+
+
+
+
+ Be careful when issuing these permissions to staff members!
+
+ Staff members with relevant roles may have these permissions anyway. Issuing them may break things, such as tag aliasing.
+
+ <%= url_input(f, :scraper_url, class: "input input--wide js-scraper", placeholder: "Link a deviantART page, a Tumblr post, or the image directly") %>
+
+
+ <% end %>
+
+ <%= button_to("Remove my avatar", ~p"/avatar", method: "delete", class: "button", data: [confirm: "Are you really, really sure?"]) %>
+
+
+ <%= if blank?(@conn.params["profile"]) do %>
+ <%= link("Back", to: ~p"/registrations/edit") %>
+ <% else %>
+ <%= link("Back", to: ~p"/profiles/#{@current_user}") %>
+ <% end %>
+
+
diff --git a/lib/philomena_web/templates/avatar/edit.html.slime b/lib/philomena_web/templates/avatar/edit.html.slime
deleted file mode 100644
index 3ee56baf..00000000
--- a/lib/philomena_web/templates/avatar/edit.html.slime
+++ /dev/null
@@ -1,46 +0,0 @@
-.profile-top
- .profile-top__avatar
- = render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: @current_user}, conn: @conn
- .profile-top__name-and-links
- div
- h1 Your avatar
-
- p Add a new avatar or remove your existing one here.
- p Avatars must be less than 1000px tall and wide, and smaller than 300 kilobytes in size. PNG, JPEG, and GIF are acceptable.
-
- = form_for @changeset, ~p"/avatar", [method: "put", multipart: true], fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- / todo: extract this
- h4 Select an image
- .image-other
- #js-image-upload-previews
- p Upload a file from your computer, or provide a link to the page containing the image and click Fetch.
- .field
- = file_input f, :avatar, class: "input js-scraper"
- = error_tag f, :avatar_size
- = error_tag f, :avatar_width
- = error_tag f, :avatar_height
- = error_tag f, :avatar_mime_type
-
- .field.field--inline
- = url_input f, :scraper_url, class: "input input--wide js-scraper", placeholder: "Link a deviantART page, a Tumblr post, or the image directly"
- button.button.button--separate-left#js-scraper-preview(type="button" title="Fetch the image at the specified URL" data-disable-with="Fetch" disabled)
- ' Fetch
-
- .field-error-js.hidden.js-scraper
-
- br
-
- => submit "Update my avatar", class: "button"
-
- br
- = button_to "Remove my avatar", ~p"/avatar", method: "delete", class: "button", data: [confirm: "Are you really, really sure?"]
-
- br
- = if blank?(@conn.params["profile"]) do
- = link "Back", to: ~p"/registrations/edit"
- - else
- = link "Back", to: ~p"/profiles/#{@current_user}"
diff --git a/lib/philomena_web/templates/ban/_ban_reason.html.heex b/lib/philomena_web/templates/ban/_ban_reason.html.heex
new file mode 100644
index 00000000..416c0dd4
--- /dev/null
+++ b/lib/philomena_web/templates/ban/_ban_reason.html.heex
@@ -0,0 +1,20 @@
+
+
+ You've been banned!
+
+
+ You cannot create comments or posts or update metadata (or do anything but read, really) until
+ <%= pretty_time(@conn.assigns.current_ban.valid_until) %>
+ .
+
+
+ The reason given by the administrator who banned you is:
+
+
+ <%= @conn.assigns.current_ban.reason %>
+
+ (Ban ID:
+ <%= @conn.assigns.current_ban.generated_ban_id %>
+ ).
+
+
diff --git a/lib/philomena_web/templates/ban/_ban_reason.html.slime b/lib/philomena_web/templates/ban/_ban_reason.html.slime
deleted file mode 100644
index 2537bc2e..00000000
--- a/lib/philomena_web/templates/ban/_ban_reason.html.slime
+++ /dev/null
@@ -1,16 +0,0 @@
-.block.block--fixed.block--warning
- h4
- ' You've been banned!
- p
- ' You cannot create comments or posts or update metadata (or do anything but read, really) until
- = pretty_time @conn.assigns.current_ban.valid_until
- ' .
-
- p
- ' The reason given by the administrator who banned you is:
- br
- strong>
- = @conn.assigns.current_ban.reason
- ' (Ban ID:
- = @conn.assigns.current_ban.generated_ban_id
- ' ).
diff --git a/lib/philomena_web/templates/ban/_bans.html.heex b/lib/philomena_web/templates/ban/_bans.html.heex
new file mode 100644
index 00000000..5e580729
--- /dev/null
+++ b/lib/philomena_web/templates/ban/_bans.html.heex
@@ -0,0 +1,54 @@
+
+ <%= for channel <- @channels do %>
+ <%= render(PhilomenaWeb.ChannelView, "_channel_box.html", channel: channel, conn: @conn, subscriptions: @subscriptions) %>
+ <% end %>
+
+
+
+ <%= pagination %>
+
+
+
+
+<%= if can?(@conn, :create, Philomena.Channels.Channel) do %>
+ <%= link("New Channel", to: ~p"/channels/new") %>
+<% end %>
+
+ FAQ
+
+
+
+ Q: Do you host streams?
+
+ A: No, we cheat and just link to streams on Picarto since that's where (almost) everyone is already. This is simply a nice way to track streaming artists.
+
+
+
+ Q: How do I get my stream/a friend's stream/<artist>'s stream here?
+
+ A: Send a private message to a site administrator
+ with a link to the stream and the artist tag if applicable.
+
diff --git a/lib/philomena_web/templates/channel/index.html.slime b/lib/philomena_web/templates/channel/index.html.slime
deleted file mode 100644
index 50b0bbaa..00000000
--- a/lib/philomena_web/templates/channel/index.html.slime
+++ /dev/null
@@ -1,42 +0,0 @@
-h1 Livestreams
-
-- route = fn p -> ~p"/channels?#{p}" end
-- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @channels, route: route, conn: @conn, params: [cq: @conn.params["cq"]]
-
-= form_for :channels, ~p"/channels", [method: "get", class: "hform", enforce_utf8: false], fn f ->
- .field
- = text_input f, :cq, name: :cq, value: @conn.params["cq"], class: "input hform__text", placeholder: "Search channels", autocapitalize: "none"
- = submit "Search", class: "hform__button button"
-
-.block
- .block__header.page__header
- .page__pagination = pagination
-
- = if @conn.cookies["chan_nsfw"] == "true" do
- a href=~p"/channels/nsfw" data-method="delete"
- i.fa.fa-eye-slash>
- ' Hide NSFW streams
- - else
- a href=~p"/channels/nsfw" data-method="create"
- i.fa.fa-eye>
- ' Show NSFW streams
-
- .block__content
- = for channel <- @channels do
- = render PhilomenaWeb.ChannelView, "_channel_box.html", channel: channel, conn: @conn, subscriptions: @subscriptions
-
- .block__header.page__header
- .page__pagination = pagination
-
-br
-= if can?(@conn, :create, Philomena.Channels.Channel) do
- = link "New Channel", to: ~p"/channels/new"
-
-h2 FAQ
-p
- strong> Q: Do you host streams?
- | A: No, we cheat and just link to streams on Picarto since that's where (almost) everyone is already. This is simply a nice way to track streaming artists.
-p
- strong> Q: How do I get my stream/a friend's stream/<artist>'s stream here?
- ' A: Send a private message to a site administrator
- ' with a link to the stream and the artist tag if applicable.
diff --git a/lib/philomena_web/templates/channel/new.html.heex b/lib/philomena_web/templates/channel/new.html.heex
new file mode 100644
index 00000000..96faca37
--- /dev/null
+++ b/lib/philomena_web/templates/channel/new.html.heex
@@ -0,0 +1,4 @@
+
+ Oops, there was an error evaluating your query:
+
+
+ <%= assigns[:error] %>
+
+ <% true -> %>
+
+ No comments found!
+
+<% end %>
+
+ Default search
+
+
+ If you do not specify a field to search over, the search engine will
+ search for comments with a body that is similar to the query's
+
+ word stems
+
+ . For example, comments containing the words
+
+ winged humanization
+
+ ,
+
+ wings
+
+ , and
+
+ spread wings
+
+ would all be found by a search for
+
+ wing
+
+ , but
+
+ sewing
+
+ would not be.
+
+
+ Allowed fields
+
+
+
+
+
+ Field Selector
+
+
+ Type
+
+
+ Description
+
+
+ Example
+
+
+
+
+
+
+
+ author
+
+
+
+ Literal
+
+
+ Matches the author of this comment. Anonymous authors will never match this term.
+
+
+
+ <%= link("author:Joey", to: ~p"/comments?#{[cq: "author:Joey"]}") %>
+
+
+
+
+
+
+ body
+
+
+
+ Full Text
+
+
+ Matches the body of this comment. This is the default field.
+
+
+
+ <%= link("body:test", to: ~p"/comments?#{[cq: "body:test"]}") %>
+
+
+
+
+
+
+ created_at
+
+
+
+ Date/Time Range
+
+
+ Matches the creation time of this comment.
+
+
+
+ <%= link("created_at:2015", to: ~p"/comments?#{[cq: "created_at:2015"]}") %>
+
+
+
+
+
+
+ id
+
+
+
+ Numeric Range
+
+
+ Matches the numeric surrogate key for this comment.
+
+
+
+ <%= link("id:1000000", to: ~p"/comments?#{[cq: "id:1000000"]}") %>
+
+
+
+
+
+
+ image_id
+
+
+
+ Literal
+
+
+ Matches the numeric surrogate key for the image this comment belongs to.
+
+
+
+ <%= link("image_id:1000000", to: ~p"/comments?#{[cq: "image_id:1000000"]}") %>
+
+
+
+
+
+
+ my
+
+
+
+ Meta
+
+
+
+ my:comments
+
+ matches comments you have posted if you are signed in.
+
+
+
+ <%= link("my:comments", to: ~p"/comments?#{[cq: "my:comments"]}") %>
+
+
+
+
+
+
+ user_id
+
+
+
+ Literal
+
+
+ Matches comments with the specified user_id. Anonymous users will never match this term.
+
+
+
+ <%= link("user_id:211190", to: ~p"/comments?#{[cq: "user_id:211190"]}") %>
+
+
+
+
+
diff --git a/lib/philomena_web/templates/comment/index.html.slime b/lib/philomena_web/templates/comment/index.html.slime
deleted file mode 100644
index ae3e2eb0..00000000
--- a/lib/philomena_web/templates/comment/index.html.slime
+++ /dev/null
@@ -1,115 +0,0 @@
-h1 Comments
-
-= form_for :comments, ~p"/comments", [method: "get", class: "hform", enforce_utf8: false], fn f ->
- .field
- = text_input f, :cq, name: :cq, value: @conn.params["cq"], class: "input hform__text", placeholder: "Search comments", autocapitalize: "none"
- = submit "Search", class: "hform__button button"
-
- .fieldlabel
- ' For more information, see the
- a href="/pages/search_syntax" search syntax documentation
- ' . Search results are sorted by creation date.
-
-h2 Search Results
-
-= cond do
- - Enum.any?(@comments) ->
- - route = fn p -> ~p"/comments?#{p}" end
- - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @comments, route: route, params: [cq: @conn.params["cq"]], conn: @conn
-
- = for {body, comment} <- @comments, comment.image.hidden_from_users == false do
- = render PhilomenaWeb.CommentView, "_comment_with_image.html", body: body, comment: comment, conn: @conn
-
- .block
- .block__header.block__header--light.page__header
- .page__pagination = pagination
- .page__info
- span.block__header__title
- = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @comments, conn: @conn
-
- - assigns[:error] ->
- p
- ' Oops, there was an error evaluating your query:
- pre = assigns[:error]
-
- - true ->
- p
- ' No comments found!
-
-h3 Default search
-p
- ' If you do not specify a field to search over, the search engine will
- ' search for comments with a body that is similar to the query's
- em word stems
- ' . For example, comments containing the words
- code winged humanization
- ' ,
- code wings
- ' , and
- code> spread wings
- ' would all be found by a search for
- code wing
- ' , but
- code> sewing
- ' would not be.
-
-h3 Allowed fields
-table.table
- thead
- tr
- th Field Selector
- th Type
- th Description
- th Example
- tbody
- tr
- td
- code author
- td Literal
- td Matches the author of this comment. Anonymous authors will never match this term.
- td
- code = link "author:Joey", to: ~p"/comments?#{[cq: "author:Joey"]}"
- tr
- td
- code body
- td Full Text
- td Matches the body of this comment. This is the default field.
- td
- code = link "body:test", to: ~p"/comments?#{[cq: "body:test"]}"
- tr
- td
- code created_at
- td Date/Time Range
- td Matches the creation time of this comment.
- td
- code = link "created_at:2015", to: ~p"/comments?#{[cq: "created_at:2015"]}"
- tr
- td
- code id
- td Numeric Range
- td Matches the numeric surrogate key for this comment.
- td
- code = link "id:1000000", to: ~p"/comments?#{[cq: "id:1000000"]}"
- tr
- td
- code image_id
- td Literal
- td Matches the numeric surrogate key for the image this comment belongs to.
- td
- code = link "image_id:1000000", to: ~p"/comments?#{[cq: "image_id:1000000"]}"
- tr
- td
- code my
- td Meta
- td
- code> my:comments
- ' matches comments you have posted if you are signed in.
- td
- code = link "my:comments", to: ~p"/comments?#{[cq: "my:comments"]}"
- tr
- td
- code user_id
- td Literal
- td Matches comments with the specified user_id. Anonymous users will never match this term.
- td
- code = link "user_id:211190", to: ~p"/comments?#{[cq: "user_id:211190"]}"
diff --git a/lib/philomena_web/templates/commission/_directory_results.html.heex b/lib/philomena_web/templates/commission/_directory_results.html.heex
new file mode 100644
index 00000000..fc5b8506
--- /dev/null
+++ b/lib/philomena_web/templates/commission/_directory_results.html.heex
@@ -0,0 +1,85 @@
+<%
+ route = fn p -> ~p"/commissions?#{p}" end
+ pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @commissions, route: route, conn: @conn, params: [commission: @conn.params["commission"]])
+%>
+
+
+
+ Open Commissions
+
+
+ <%= pagination %>
+
+
+ <%= cond do %>
+ <% not is_nil(@conn.assigns.current_user) and not is_nil(@conn.assigns.current_user.commission) -> %>
+ <%= link("View my listing", to: ~p"/profiles/#{@conn.assigns.current_user}/commission") %>
+ <% not is_nil(@conn.assigns.current_user) -> %>
+ <%= link("Create my listing", to: ~p"/profiles/#{@conn.assigns.current_user}/commission/new") %>
+ <% true -> %>
+ <% end %>
+
+
+
+ <%= cond do %>
+ <% Enum.any?(@commissions) -> %>
+ <%= for c <- @commissions do %>
+
+ This is only a directory meant to help connect artists offering
+ commissions with potential commissioners. We don't have any way
+ for users to make payments through the site, so we can't be held
+ responsible for any issues regarding payment.
+
+ More info.
+
+
diff --git a/lib/philomena_web/templates/commission/index.html.slime b/lib/philomena_web/templates/commission/index.html.slime
deleted file mode 100644
index 0581d86c..00000000
--- a/lib/philomena_web/templates/commission/index.html.slime
+++ /dev/null
@@ -1,18 +0,0 @@
-h1 Commissions Directory
-
-.dnp-warning
- h4 Disclaimer
- p
- ' This is only a directory meant to help connect artists offering
- ' commissions with potential commissioners. We don't have any way
- ' for users to make payments through the site, so we can't be held
- ' responsible for any issues regarding payment.
- a href="/pages/rules#9" More info.
-
-br
-
-.column-layout
- .column-layout__left
- = render PhilomenaWeb.CommissionView, "_directory_sidebar.html", conn: @conn
- .column-layout__main
- = render PhilomenaWeb.CommissionView, "_directory_results.html", commissions: @commissions, conn: @conn
\ No newline at end of file
diff --git a/lib/philomena_web/templates/confirmation/new.html.heex b/lib/philomena_web/templates/confirmation/new.html.heex
new file mode 100644
index 00000000..e33f80da
--- /dev/null
+++ b/lib/philomena_web/templates/confirmation/new.html.heex
@@ -0,0 +1,12 @@
+
+ Resend confirmation instructions
+
+<%= form_for :user, ~p"/confirmations", fn f -> %>
+
+ <%= link("Conversations", to: ~p"/conversations") %>
+ »
+
+ New Conversation
+
+
+
+<%= case DateTime.compare(DateTime.utc_now(), DateTime.add(@conn.assigns.current_user.created_at, 1_209_600)) do %>
+ <% :lt -> %>
+
+
+ Warning!
+
+
+
+ Your account is too new, so your PM will need to be reviewed by staff members.
+
+ This is because it contains an external image. If you are not okay with a moderator viewing this PM conversation, please consider linking the image instead of embedding it (change
+
+ ![
+
+ to
+
+ [
+
+ ).
+
+
+ <% _ -> %>
+ <% # Nothing %>
+<% end %>
+<%= form_for @changeset, ~p"/conversations", fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+
+
+ Specify any user's exact name here, case-sensitive
+
+ <%= if hidden_by?(@current_user, @conversation) do %>
+ <%= link("Restore conversation", to: ~p"/conversations/#{@conversation}/hide", data: [method: "delete"]) %>
+ <% else %>
+ <%= link("Remove conversation", to: ~p"/conversations/#{@conversation}/hide", data: [method: "post", confirm: "Are you really, really sure?"]) %>
+ <% end %>
+ <%= link("Report conversation", to: ~p"/conversations/#{@conversation}/reports/new") %>
+ <%= link("Mark as unread", to: ~p"/conversations/#{@conversation}/read", data: [method: "delete"]) %>
+
+
+
+<%= for {message, body} <- @messages do %>
+ <%= render(PhilomenaWeb.MessageView, "_message.html", message: message, body: body, conn: @conn) %>
+<% end %>
+
+
+
+ <%= pagination %>
+
+
+
+<%= case DateTime.compare(DateTime.utc_now(), DateTime.add(@conn.assigns.current_user.created_at, 1_209_600)) do %>
+ <% :lt -> %>
+
+
+ Warning!
+
+
+
+ Your account is too new, so your PM will need to be reviewed by staff members.
+
+ This is because it contains an external image. If you are not okay with a moderator viewing this PM conversation, please consider linking the image instead of embedding it (change
+
+ ![
+
+ to
+
+ [
+
+ ).
+
+ You've managed to send over 1,000 messages in this conversation!
+
+
+ We'd like to ask you to make a new conversation. Don't worry, this one won't go anywhere if you need to refer back to it.
+
+
+ <%= link("Click here", to: ~p"/conversations/new?#{[receipient: other.name]}") %>
+ to make a new conversation with this user.
+
+
+<% end %>
diff --git a/lib/philomena_web/templates/conversation/show.html.slime b/lib/philomena_web/templates/conversation/show.html.slime
deleted file mode 100644
index 5af5ead9..00000000
--- a/lib/philomena_web/templates/conversation/show.html.slime
+++ /dev/null
@@ -1,63 +0,0 @@
-elixir:
- route = fn p -> ~p"/conversations/#{@conversation}?#{p}" end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @messages, route: route, conn: @conn
- other = other_party(@current_user, @conversation)
-
-h1 = @conversation.title
-.block
- .block__header
- => link "Message Center", to: ~p"/conversations"
- ' »
- => link @conversation.title, to: ~p"/conversations/#{@conversation}"
- ' Conversation with
- => render PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other}, conn: @conn
- .block__header--sub.block__header--light.page__header
- span.block__header__title.page__title>
- => @messages.total_entries
- = pluralize("message", "messages", @messages.total_entries)
- .page__pagination = pagination
- .page__info
- = if hidden_by?(@current_user, @conversation) do
- = link "Restore conversation", to: ~p"/conversations/#{@conversation}/hide", data: [method: "delete"]
- - else
- = link "Remove conversation", to: ~p"/conversations/#{@conversation}/hide", data: [method: "post", confirm: "Are you really, really sure?"]
- = link "Report conversation", to: ~p"/conversations/#{@conversation}/reports/new"
- = link "Mark as unread", to: ~p"/conversations/#{@conversation}/read", data: [method: "delete"]
-
-= for {message, body} <- @messages do
- = render PhilomenaWeb.MessageView, "_message.html", message: message, body: body, conn: @conn
-
-.block
- .block__header.block__header--light.page__header
- .page__pagination = pagination
-
-= case DateTime.compare(DateTime.utc_now(), DateTime.add(@conn.assigns.current_user.created_at, 1_209_600)) do
- - :lt ->
- .block.block--fixed.block--warning.hidden.js-hidden-warning
- h2 Warning!
- p
- strong> Your account is too new, so your PM will need to be reviewed by staff members.
- ' This is because it contains an external image. If you are not okay with a moderator viewing this PM conversation, please consider linking the image instead of embedding it (change
- code<> ![
- ' to
- code<
- | [
- | ).
- - _ ->
- / Nothing
-
-= cond do
- - @conn.assigns.current_ban ->
- = render PhilomenaWeb.BanView, "_ban_reason.html", conn: @conn
-
- - @messages.total_entries < 1_000 ->
- = render PhilomenaWeb.Conversation.MessageView, "_form.html", conversation: @conversation, changeset: @changeset, conn: @conn
-
- - true ->
- div
- h2 Okay, we're impressed
- p You've managed to send over 1,000 messages in this conversation!
- p We'd like to ask you to make a new conversation. Don't worry, this one won't go anywhere if you need to refer back to it.
- p
- => link "Click here", to: ~p"/conversations/new?#{[receipient: other.name]}"
- ' to make a new conversation with this user.
diff --git a/lib/philomena_web/templates/dnp_entry/_form.html.heex b/lib/philomena_web/templates/dnp_entry/_form.html.heex
new file mode 100644
index 00000000..fc3ebdd9
--- /dev/null
+++ b/lib/philomena_web/templates/dnp_entry/_form.html.heex
@@ -0,0 +1,135 @@
+<%= if show_steps?(@changeset) do %>
+
+
+ Getting on the DNP list?
+
+
+ We offer the DNP list in order to give artists the last say on their art, but we
+ won't deny that we are sad whenever we see good art and artists disappear.
+ Because we know that many who seek a DNP do so on their first contact with the site,
+ we'd be very grateful if you as the artist would like to give the site a shot first.
+ Why not upload some of your own art? The community might appreciate it more than you think.
+
+
+ Do you wish to submit a DNP Request?
+
+
+
+
+
+ Options
+
+
+ We are aware of several common reasons for why artists seek a DNP.
+ They include things such as unwanted edits or a wish to disassociate
+ their name from their artwork. Many of these concerns can be addressed
+ without removing art.
+
+
+ We have created several options for you below:
+
+
+ <%= for {type, description} <- reasons() do %>
+
+ If you selected "Other", or have other conditions applicable to your request, please enter them here. If someone always has permission to upload your artwork, enter their name here. (Optional)
+
+ Only select this box if your request contains sensitive or private information that you do not wish to be publicly available. Reasons that do not contain such information will not be hidden.
+
+
+ <% # Instructions %>
+
+ Instructions
+
+
+ If you would like existing artwork to be removed under this request, please provide instructions, such as "Remove all art with my artist tag that contain the "edit" tag." (Optional)
+
+<% end %>
diff --git a/lib/philomena_web/templates/dnp_entry/_form.html.slime b/lib/philomena_web/templates/dnp_entry/_form.html.slime
deleted file mode 100644
index 81a6bfd0..00000000
--- a/lib/philomena_web/templates/dnp_entry/_form.html.slime
+++ /dev/null
@@ -1,89 +0,0 @@
-= if show_steps?(@changeset) do
- .block.block--fixed.block--success.walloftext
- h3 Getting on the DNP list?
-
- p
- ' We offer the DNP list in order to give artists the last say on their art, but we
- ' won't deny that we are sad whenever we see good art and artists disappear.
- ' Because we know that many who seek a DNP do so on their first contact with the site,
- ' we'd be very grateful if you as the artist would like to give the site a shot first.
- ' Why not upload some of your own art? The community might appreciate it more than you think.
-
- p
- ' Do you wish to submit a DNP Request?
- button.button.button--separate-left.js-dnp-yes data-click-show=".js-dnp-common-options" data-click-disable=".js-dnp-yes"
- ' Yes
-
- .block.block--fixed.walloftext.js-dnp-common-options.hidden
- h3 Options
-
- p
- ' We are aware of several common reasons for why artists seek a DNP.
- ' They include things such as unwanted edits or a wish to disassociate
- ' their name from their artwork. Many of these concerns can be addressed
- ' without removing art.
-
- p We have created several options for you below:
-
- ul.line-spacing
- = for {type, description} <- reasons() do
- li
- = link description, to: "#", data: [click_show: ".js-dnp-form", click_hide: ".js-dnp-common-options", click_inputvalue: ".js-dnp-type", set_value: type]
-
-= form_for @changeset, @action, fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- .block.js-dnp-form class=form_class(@changeset)
- .block__header
- span.block__header__title DNP Request Form
-
- .block__content
- / Option (set by script depending on the option chosen above)
- strong Type
- .field
- = select f, :dnp_type, selectable_types(), class: "js-dnp-type input input--wide"
- = error_tag f, :dnp_type
-
- / Artist Tag
- strong Artist Tag
- p Select the artist tag you would like to request a DNP entry for
- .field
- = select f, :tag_id, selectable_options(@selectable_tags), class: "input"
- = error_tag f, :tag_id
- hr
- / Conditions
- strong Conditions
- p If you selected "Other", or have other conditions applicable to your request, please enter them here. If someone always has permission to upload your artwork, enter their name here. (Optional)
- .field
- = textarea f, :conditions, class: "input input--wide", placeholder: "Conditions"
- = error_tag f, :conditions
- hr
- / Reason
- strong Reason For Request
- p Please indicate the reason why you would like your artwork to be removed. (Required)
- .field
- = textarea f, :reason, class: "input input--wide", placeholder: "Reason", required: true
- = error_tag f, :reason
- .field
- => checkbox f, :hide_reason, class: "checkbox"
- = label f, :hide_reason, "Hide request reason"
- p Only select this box if your request contains sensitive or private information that you do not wish to be publicly available. Reasons that do not contain such information will not be hidden.
- hr
- / Instructions
- strong Instructions
- p If you would like existing artwork to be removed under this request, please provide instructions, such as "Remove all art with my artist tag that contain the "edit" tag." (Optional)
- .field
- = textarea f, :instructions, class: "input input--wide", placeholder: "Instructions"
- = error_tag f, :instructions
- hr
- / Feedback
- strong Feedback
- p If you have any additional feedback for the site staff, you may enter it here. (Optional)
- .field
- = textarea f, :feedback, class: "input input--wide", placeholder: "Feedback"
- = error_tag f, :feedback
-
- hr
- = submit "Submit Request", class: "button"
diff --git a/lib/philomena_web/templates/dnp_entry/edit.html.heex b/lib/philomena_web/templates/dnp_entry/edit.html.heex
new file mode 100644
index 00000000..9f681f80
--- /dev/null
+++ b/lib/philomena_web/templates/dnp_entry/edit.html.heex
@@ -0,0 +1,4 @@
+
+ This is a list of artists who have asked us to place a restriction on the uploading of their artwork. These restrictions can include anything from requesting that no edits of their work be allowed, to requesting that no uploads be allowed unless uploaded by the artists themselves.
+
+
+ We ask that you please respect the wishes of artists in regards to their artworks, and check the list before uploading. Note that just because an artist is not listed may not mean that their artwork is ok to post, especially if they have a note at their "source" that they do not wish for their artwork to be reposted.
+
+
+
+
+
+
+
+ Manage My Listings
+
+
+
+ <%= cond do %>
+ <% not is_nil(@current_user) and Enum.any?(@linked_tags) -> %>
+ <%= link("Create an entry", to: ~p"/dnp/new") %>
+
+ <%= link("My Listings", to: ~p"/dnp?#{[mine: "1"]}") %>
+ <% not is_nil(@current_user) -> %>
+ You must have a verified artist link to create and manage DNP entries.
+ <%= link("Request an artist link", to: ~p"/profiles/#{@current_user}/artist_links/new") %>
+ .
+ <% true -> %>
+ You must be logged in and have a verified artist link to create and manage DNP entries.
+ <% end %>
+
+ <%= link("More Info", to: ~p"/dnp/#{entry}") %>
+
+
+ <% end %>
+
+
+
+
+
+ <%= pagination %>
+
+
+
diff --git a/lib/philomena_web/templates/dnp_entry/index.html.slime b/lib/philomena_web/templates/dnp_entry/index.html.slime
deleted file mode 100644
index b4463eb5..00000000
--- a/lib/philomena_web/templates/dnp_entry/index.html.slime
+++ /dev/null
@@ -1,75 +0,0 @@
-h2 The Do-Not-Post (DNP) List
-
-/ Information block
-h3 Information
-.block
- .block__header
- span.block__header__title About
- .block__content
- p This is a list of artists who have asked us to place a restriction on the uploading of their artwork. These restrictions can include anything from requesting that no edits of their work be allowed, to requesting that no uploads be allowed unless uploaded by the artists themselves.
- p We ask that you please respect the wishes of artists in regards to their artworks, and check the list before uploading. Note that just because an artist is not listed may not mean that their artwork is ok to post, especially if they have a note at their "source" that they do not wish for their artwork to be reposted.
-br
-
-.block
- .block__header
- span.block__header__title Manage My Listings
- .block__content
- = cond do
- - not is_nil(@current_user) and Enum.any?(@linked_tags) ->
- = link "Create an entry", to: ~p"/dnp/new"
- br
- = link "My Listings", to: ~p"/dnp?#{[mine: "1"]}"
-
- - not is_nil(@current_user) ->
- ' You must have a verified artist link to create and manage DNP entries.
- = link "Request an artist link", to: ~p"/profiles/#{@current_user}/artist_links/new"
- | .
-
- - true ->
- ' You must be logged in and have a verified artist link to create and manage DNP entries.
-
-
-h3 The List
-.block
- - route = fn p -> ~p"/dnp?#{p}" end
- - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @dnp_entries, route: route, conn: @conn
-
- .block__header.page__header
- span.block__header__title.page__title The DNP List
- .page__pagination = pagination
-
- .block__content
- table.table
- thead
- tr
- th Tag
- th Restriction
- th Conditions
- = if @status_column do
- th Status
- th Created
- th Options
- tbody
- = for {body, entry} <- @dnp_entries do
- tr
- td
- = render PhilomenaWeb.TagView, "_tag.html", tag: entry.tag, conn: @conn
-
- td
- = entry.dnp_type
-
- td
- = body
-
- = if @status_column do
- td
- = pretty_state(entry)
-
- td
- = pretty_time(entry.created_at)
-
- td
- = link "More Info", to: ~p"/dnp/#{entry}"
-
- .block__header.page__header
- .page__pagination = pagination
diff --git a/lib/philomena_web/templates/dnp_entry/new.html.heex b/lib/philomena_web/templates/dnp_entry/new.html.heex
new file mode 100644
index 00000000..504d7c3a
--- /dev/null
+++ b/lib/philomena_web/templates/dnp_entry/new.html.heex
@@ -0,0 +1,4 @@
+
+ DNP Listing for Tag
+ <%= @dnp_entry.tag.name %>
+
+
+
+
+ DNP Information
+
+ <%= if can?(@conn, :edit, @dnp_entry) do %>
+ <%= link("Edit listing", to: ~p"/dnp/#{@dnp_entry}/edit?#{[tag_id: @dnp_entry.tag_id]}") %>
+ <% end %>
+ <%= link("Back to DNP List", to: ~p"/dnp") %>
+
+ <%= cond do %>
+ <% not source_approved?(report) -> %>
+
+ Source is not approved
+
+ <% not target_approved?(report) -> %>
+
+ Target is not approved
+
+ <% forward_merge?(report) -> %>
+
+ Target newer
+
+ <% true -> %>
+
+ Target older
+
+ <% end %>
+
+
+
+
+
+ <%= String.capitalize(report.state) %>
+ <%= if can?(@conn, :edit, report) and not is_nil(report.modifier) do %>
+ by
+ <%= report.modifier.name %>
+ <% end %>
+ <%= if can?(@conn, :edit, report) do %>
+
+ Reported
+ <%= pretty_time(report.created_at) %>
+ <%= if report.user do %>
+ by
+ <%= link(report.user.name, to: ~p"/profiles/#{report.user}") %>
+ <% end %>
+
+ <%= escape_nl2br(report.reason) %>
+
+
+ <% end %>
+
diff --git a/lib/philomena_web/templates/duplicate_report/_list.html.slime b/lib/philomena_web/templates/duplicate_report/_list.html.slime
deleted file mode 100644
index bb18bb50..00000000
--- a/lib/philomena_web/templates/duplicate_report/_list.html.slime
+++ /dev/null
@@ -1,162 +0,0 @@
-.grid.grid--dupe-report-list
- p Source image
- p Target image
- p Diff
- p Status/options
-
- = for report <- @duplicate_reports do
- - background_class = background_class(report)
-
- = render PhilomenaWeb.DuplicateReportView, "_image_cell.html", image: report.image, source: true, report: report, conn: @conn
- = render PhilomenaWeb.DuplicateReportView, "_image_cell.html", image: report.duplicate_of_image, source: false, report: report, conn: @conn
-
- .grid--dupe-report-list__cell.dr__diff.border-vertical
- table.table
- tr
- = if same_aspect_ratio?(report) do
- td.success
- a href=~p"/duplicate_reports/#{report}"
- ' Visual diff
- | (Same aspect ratio)
-
- - else
- td.warning Different aspect ratio
- tr
- = cond do
- - both_are_edits?(report) ->
- td.warning Both are edits
-
- - target_is_edit?(report) ->
- td.danger Target is an edit
-
- - source_is_edit?(report) ->
- td.danger Source is an edit
-
- - true ->
- td.success Neither is an edit
-
- tr
- = cond do
- - both_are_alternate_versions?(report) ->
- td.warning Both are alternate versions
-
- - target_is_alternate_version?(report) ->
- td.danger Target is an alternate version
-
- - source_is_alternate_version?(report) ->
- td.danger Source is an alternate version
-
- - true ->
- td.success Neither is an alternate version
-
- tr
- = cond do
- - same_res?(report) ->
- td.success Same resolution
-
- - higher_res?(report) ->
- td.warning Target resolution better
-
- - true ->
- td.warning Source resolution better
-
- tr
- = cond do
- - same_format?(report) ->
- td.success
- ' Same format
- = file_types(report)
-
- - better_format?(report) ->
- td.warning
- ' Target format better
- = file_types(report)
-
- - true ->
- td.warning
- ' Source format better
- = file_types(report)
-
- tr
- = cond do
- - same_artist_tags?(report) ->
- td.success Same artist tags
-
- - more_artist_tags_on_target?(report) ->
- td.warning More artist tags on target
-
- - more_artist_tags_on_source?(report) ->
- td.warning More artist tags on source
-
- - true ->
- td.danger Different artist tags
-
- tr
- = cond do
- - neither_have_source?(report) ->
- td.warning Neither have sources
-
- - same_source?(report) ->
- td.success Same sources
-
- - similar_source?(report) ->
- td.warning Same hostname
-
- - source_on_target?(report) ->
- td.warning Target has a source
-
- - source_on_source?(report) ->
- td.warning Source has a source
-
- - true ->
- td.danger Different sources
-
- tr
- = if same_rating_tags?(report) do
- td.success Same rating tags
- - else
- td.danger Different rating tags
-
- tr
- = cond do
- - not source_approved?(report) ->
- td.danger Source is not approved
- - not target_approved?(report) ->
- td.danger Target is not approved
- - forward_merge?(report) ->
- td.warning Target newer
- - true ->
- td.success Target older
-
- .flex.flex--column.grid--dupe-report-list__cell.border-vertical id="report_options_#{report.id}"
- .dr__status-options class=background_class
- => String.capitalize(report.state)
-
- = if can?(@conn, :edit, report) and not is_nil(report.modifier) do
- ' by
- = report.modifier.name
-
- = if can?(@conn, :edit, report) do
- div
- = if report.state == "open" do
- a href=(~p"/duplicate_reports/#{report}/claim" <> "#report_options_#{report.id}") data-method="post"
- button.button.button--separate-right
- i.fa.fa-clipboard>
- ' Claim
-
- = if report.state != "rejected" do
- a href=~p"/duplicate_reports/#{report}/reject" data-method="post"
- button.button
- i.fa.fa-times>
- ' Reject
-
- .dr__status-options
- div
- ' Reported
- => pretty_time(report.created_at)
-
- = if report.user do
- ' by
- =< link report.user.name, to: ~p"/profiles/#{report.user}"
-
- = escape_nl2br(report.reason)
diff --git a/lib/philomena_web/templates/duplicate_report/index.html.heex b/lib/philomena_web/templates/duplicate_report/index.html.heex
new file mode 100644
index 00000000..300d77ee
--- /dev/null
+++ b/lib/philomena_web/templates/duplicate_report/index.html.heex
@@ -0,0 +1,33 @@
+
+ Use the search syntax here to specify an additional filter.
+ For multiple filters, separate with a newline (or use the OR operator). Search fields excepting
+
+ faved_by
+
+ are supported. See the search syntax guide
+ for more information.
+
+
+
+ WARNING:
+
+ This filter is applied along with your tag filters. Tag filters may spoiler images that you mean to filter more precisely here. Double-check to make sure they don't interfere.
+
+ Use the search syntax here to specify an additional filter.
+ For multiple filters, separate with a newline (or use the OR operator). Search fields excepting
+
+ faved_by
+
+ are supported. See the search syntax guide
+ for more information.
+
+
+
+ WARNING:
+
+ This filter is applied along with your tag filters. Tag filters may hide images that you mean to filter more precisely here. Double-check to make sure they don't interfere.
+
+
+ You probably do not want to check this unless you know what you are doing - it cannot be changed later
+
+ . Pulic filters can be shared with other users and used by them; if you make changes to a filter, it will update all users of that filter.
+
+ <% input_value(f, :public) == true -> %>
+
+
+ Changes made to this filter will affect anyone else using this filter! Check your changes, and make sure your changes don't change the filter's intent.
+
+
diff --git a/lib/philomena_web/templates/filter/_form.html.slime b/lib/philomena_web/templates/filter/_form.html.slime
deleted file mode 100644
index 77965906..00000000
--- a/lib/philomena_web/templates/filter/_form.html.slime
+++ /dev/null
@@ -1,84 +0,0 @@
-.form
- = form_for @filter, @route, fn f ->
- = if @filter.action do
- #error_explanation
- ' Oops, something went wrong! Please check the errors below.
-
- .field
- = text_input f, :name, class: "input input--wide", placeholder: "Name"
- = error_tag f, :name
- .fieldlabel
- ' This is a friendly name for this filter - it should be short and descriptive.
- .field
- = textarea f, :description, class: "input input--wide", placeholder: "Description"
- = error_tag f, :description
- .fieldlabel
- ' Here you can describe your filter in a bit more detail.
-
-
- .field
- = label f, :spoilered_tag_list, "Spoilered Tags"
- br
- = render PhilomenaWeb.TagView, "_tag_editor.html", f: f, name: :spoilered_tag_list, type: "edit"
- = error_tag f, :spoilered_tag_list
- .fieldlabel
- ' These tags will spoiler the images they're associated with.
- .field
- = label f, :spoilered_complex_str, "Complex Spoiler Filter"
- br
- = textarea f, :spoilered_complex_str, class: "input input--wide", autocapitalize: "none"
- br
- = error_tag f, :spoilered_complex_str
- .fieldlabel
- p
- ' Use the search syntax here to specify an additional filter.
- ' For multiple filters, separate with a newline (or use the OR operator). Search fields excepting
- code<> faved_by
- ' are supported. See the search syntax guide
- ' for more information.
- p
- strong> WARNING:
- ' This filter is applied along with your tag filters. Tag filters may spoiler images that you mean to filter more precisely here. Double-check to make sure they don't interfere.
-
-
- .field
- = label f, :hidden_tag_list, "Hidden Tags"
- br
- = render PhilomenaWeb.TagView, "_tag_editor.html", f: f, name: :hidden_tag_list, type: "edit"
- = error_tag f, :hidden_tag_list
- .fieldlabel
- ' These tags will hide images entirely from the site; if you go directly to an image, it will spoiler it.
- .field
- = label f, :hidden_complex_str, "Complex Hide Filter"
- br
- = textarea f, :hidden_complex_str, class: "input input--wide", autocapitalize: "none"
- br
- = error_tag f, :hidden_complex_str
- .fieldlabel
- p
- ' Use the search syntax here to specify an additional filter.
- ' For multiple filters, separate with a newline (or use the OR operator). Search fields excepting
- code<> faved_by
- ' are supported. See the search syntax guide
- ' for more information.
- p
- strong> WARNING:
- ' This filter is applied along with your tag filters. Tag filters may hide images that you mean to filter more precisely here. Double-check to make sure they don't interfere.
-
- = cond do
- - is_nil(input_value(f, :id)) ->
- .field
- = checkbox f, :public, class: "checkbox"
- = label f, :public
-
- .fieldlabel
- strong You probably do not want to check this unless you know what you are doing - it cannot be changed later
- | . Pulic filters can be shared with other users and used by them; if you make changes to a filter, it will update all users of that filter.
-
- - input_value(f, :public) == true ->
- .fieldlabel
- strong Changes made to this filter will affect anyone else using this filter! Check your changes, and make sure your changes don't change the filter's intent.
-
- - true ->
-
- = submit "Save Filter", class: "button"
diff --git a/lib/philomena_web/templates/filter/edit.html.heex b/lib/philomena_web/templates/filter/edit.html.heex
new file mode 100644
index 00000000..aedd13df
--- /dev/null
+++ b/lib/philomena_web/templates/filter/edit.html.heex
@@ -0,0 +1,29 @@
+
+ Editing Filter
+
+<%= render(PhilomenaWeb.FilterView, "_form.html", filter: @changeset, route: ~p"/filters/#{@filter}") %>
+<%= if not @filter.public and not @filter.system do %>
+
+
+
+
+
+
+
+ This filter is currently private and only accessible to you. If you
+ click the button below, this will make the filter public and
+ accessible to other users.
+
+
+ This process is
+
+ irreversible
+
+ . Once you make a filter public, you cannot make it private again.
+
+ <%= button_to("Convert to Public Filter", ~p"/filters/#{@filter}/public", class: "button", method: "create", data: [confirm: "Are you really, really sure?"]) %>
+
+
+<% end %>
diff --git a/lib/philomena_web/templates/filter/edit.html.slime b/lib/philomena_web/templates/filter/edit.html.slime
deleted file mode 100644
index db0bf5d6..00000000
--- a/lib/philomena_web/templates/filter/edit.html.slime
+++ /dev/null
@@ -1,22 +0,0 @@
-h2 Editing Filter
-= render PhilomenaWeb.FilterView, "_form.html", filter: @changeset, route: ~p"/filters/#{@filter}"
-
-= if not @filter.public and not @filter.system do
- br
- br
-
- input.toggle-box id="public-tools" type="checkbox" checked=false
- label for="public-tools" Advanced Options
- .toggle-box-container
- .toggle-box-container__content
- p
- ' This filter is currently private and only accessible to you. If you
- ' click the button below, this will make the filter public and
- ' accessible to other users.
-
- p
- ' This process is
- strong irreversible
- ' . Once you make a filter public, you cannot make it private again.
-
- = button_to "Convert to Public Filter", ~p"/filters/#{@filter}/public", class: "button", method: "create", data: [confirm: "Are you really, really sure?"]
diff --git a/lib/philomena_web/templates/filter/index.html.heex b/lib/philomena_web/templates/filter/index.html.heex
new file mode 100644
index 00000000..3e3547b9
--- /dev/null
+++ b/lib/philomena_web/templates/filter/index.html.heex
@@ -0,0 +1,361 @@
+
+
+
+ Content Safety
+
+
+ By default, content that is safe and suitable for all ages is all you'll see on the site, and how most of our users browse. The default filters focus on art, so filter out things like memes and what some users would consider "spam".
+
+
+ Filters let you customize what content you see on the site. This means that with the appropriate filter selected, you can access content which is not suitable for everyone, such as sexually explicit, grimdark or gory material.
+
+
+
+ By changing away from the default filters, you accept you are legally permitted to view this content in your jurisdiction. If in doubt, stick with the recommended default filters.
+
+
+
+
+ Browsing Filters
+
+
+ Images posted on the site are tagged, allowing you to easily search for content. You can also filter out content you'd rather not see using filters. Filters are sets of tags - spoilered tags and hidden tags. Spoilers are images that show up as thumbnails instead of the image, letting you click through and find out more about an image before deciding to view it or not. Hidden tags will simply hide images.
+
+
+ There are set of global filters to pick from which cover some common use-cases.
+ If you're logged in you can also customize these filters and make your own, as well as quickly switch (via the menu on every page) between them.
+
+
+ So how do these work?
+
+
+ You can select any filter you can see. This will become your
+
+ active filter
+
+ and will affect how you see the site. You can edit filters if you own them - you can create a filter from scratch with the link under "My Filters" (if you're logged in, of course) or by clicking "Customize", which will copy an existing filter for you to edit.
+
+
+ By default all the filters you create are private and only visible by you. You can have as many as you like and switch between them instantly with no limits. You can also create a public filter, which can be seen and used by any user on the site, allowing you to share useful filters with others.
+
+ <%= if !@conn.params["fq"] do %>
+
+ My Filters
+
+ <%= if @current_user do %>
+
+ <%= link("Click here to make a new filter from scratch", to: ~p"/filters/new") %>
+
+ <%= for filter <- @my_filters do %>
+ <%= render(PhilomenaWeb.FilterView, "_filter.html", conn: @conn, filter: filter) %>
+ <% end %>
+ <% else %>
+
+ If you're logged in, you can create and maintain custom filters here.
+
+ <% end %>
+
+ Global Filters
+
+ <%= for filter <- @system_filters do %>
+ <%= render(PhilomenaWeb.FilterView, "_filter.html", conn: @conn, filter: filter) %>
+ <% end %>
+ <%= if @current_user do %>
+
+ Recent Filters
+
+
+ Clicking this button will clear the recent filters list in the header dropdown.
+ <%= button_to("Clear recent filter list", ~p"/filters/clear_recent", method: "delete", class: "button") %>
+
+ <% end %>
+ <% end %>
+
+ Search Filters
+
+
+ Some users maintain custom filters which are publicly shared; you can search these filters with the box below.
+
+
+ <%= link("created_at:2015", to: ~p"/filters?#{[fq: "created_at:2015"]}") %>
+
+
+
+
+
+
+ id
+
+
+
+ Numeric Range
+
+
+ Matches the numeric surrogate key for this filter.
+
+
+
+ <%= link("id:1", to: ~p"/filters?#{[fq: "id:1"]}") %>
+
+
+
+
+
+
+ spoilered_count
+
+
+
+ Numeric Range
+
+
+ Matches the number of spoilered tags in this filter.
+
+
+
+ <%= link("spoilered_count:1", to: ~p"/filters?#{[fq: "spoilered_count:1"]}") %>
+
+
+
+
+
+
+ hidden_count
+
+
+
+ Numeric Range
+
+
+ Matches the number of hidden tags in this filter.
+
+
+
+ <%= link("hidden_count:1", to: ~p"/filters?#{[fq: "hidden_count:1"]}") %>
+
+
+
+
+
+
+ my
+
+
+
+ Meta
+
+
+
+ my:filters
+
+ matches filters you have published if you are signed in.
+
+
+
+ <%= link("my:filters", to: ~p"/filters?#{[fq: "my:filters"]}") %>
+
+
+
+
+
+
+ system
+
+
+
+ Boolean
+
+
+ Matches system filters
+
+
+
+ <%= link("system:true", to: ~p"/filters?#{[fq: "system:true"]}") %>
+
+
+
+
+
+
+ public
+
+
+
+ Boolean
+
+
+ Matches public filters. Note that
+
+ public:false
+
+ matches only your own private filters.
+
+
+
+ <%= link("public:false", to: ~p"/filters?#{[fq: "public:false"]}") %>
+
+
+
+
+
+
+ user_id
+
+
+
+ Literal
+
+
+ Matches filters with the specified user_id.
+
+
+
+ <%= link("user_id:307505", to: ~p"/filters?#{[fq: "user_id:307505"]}") %>
+
+
+
+
+
+<%= if @conn.params["fq"] do %>
+
+ <%= link("Back to filters", to: ~p"/filters") %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/filter/index.html.slime b/lib/philomena_web/templates/filter/index.html.slime
deleted file mode 100644
index 3474b6fb..00000000
--- a/lib/philomena_web/templates/filter/index.html.slime
+++ /dev/null
@@ -1,180 +0,0 @@
-.walloftext
- .block.block--fixed.block--warning
- h2 Content Safety
- p
- ' By default, content that is safe and suitable for all ages is all you'll see on the site, and how most of our users browse. The default filters focus on art, so filter out things like memes and what some users would consider "spam".
- p
- ' Filters let you customize what content you see on the site. This means that with the appropriate filter selected, you can access content which is not suitable for everyone, such as sexually explicit, grimdark or gory material.
- p
- strong
- ' By changing away from the default filters, you accept you are legally permitted to view this content in your jurisdiction. If in doubt, stick with the recommended default filters.
- h1 Browsing Filters
- p
- ' Images posted on the site are tagged, allowing you to easily search for content. You can also filter out content you'd rather not see using filters. Filters are sets of tags - spoilered tags and hidden tags. Spoilers are images that show up as thumbnails instead of the image, letting you click through and find out more about an image before deciding to view it or not. Hidden tags will simply hide images.
- p
- ' There are set of global filters to pick from which cover some common use-cases.
- ' If you're logged in you can also customize these filters and make your own, as well as quickly switch (via the menu on every page) between them.
-
- h2 So how do these work?
- p
- ' You can select any filter you can see. This will become your
- strong
- ' active filter
- ' and will affect how you see the site. You can edit filters if you own them - you can create a filter from scratch with the link under "My Filters" (if you're logged in, of course) or by clicking "Customize", which will copy an existing filter for you to edit.
- p
- ' By default all the filters you create are private and only visible by you. You can have as many as you like and switch between them instantly with no limits. You can also create a public filter, which can be seen and used by any user on the site, allowing you to share useful filters with others.
-
- = if !@conn.params["fq"] do
- h2 My Filters
- = if @current_user do
- p
- = link("Click here to make a new filter from scratch", to: ~p"/filters/new")
- = for filter <- @my_filters do
- = render PhilomenaWeb.FilterView, "_filter.html", conn: @conn, filter: filter
- - else
- p
- ' If you're logged in, you can create and maintain custom filters here.
-
- h2 Global Filters
- = for filter <- @system_filters do
- = render PhilomenaWeb.FilterView, "_filter.html", conn: @conn, filter: filter
-
- = if @current_user do
- h2 Recent Filters
- p
- ' Clicking this button will clear the recent filters list in the header dropdown.
- = button_to "Clear recent filter list", ~p"/filters/clear_recent", method: "delete", class: "button"
-
- h2 Search Filters
- p
- ' Some users maintain custom filters which are publicly shared; you can search these filters with the box below.
- = form_for :filters, ~p"/filters", [method: "get", class: "hform", enforce_utf8: false], fn f ->
- .field
- = text_input f, :fq, name: :fq, value: @conn.params["fq"], class: "input hform__text", placeholder: "Search filters", autocapitalize: "none"
- = submit "Search", class: "hform__button button"
-
- .fieldlabel
- ' For more information, see the
- a href="/pages/search_syntax" search syntax documentation
- ' . Search results are sorted alphabetically.
-
- = if @conn.params["fq"] do
- h2 Search Results
- = cond do
- - Enum.any?(@filters) ->
- - route = fn p -> ~p"/filters?#{p}" end
- - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @filters, route: route, params: [fq: @conn.params["fq"]], conn: @conn
-
- = for filter <- @filters do
- = render PhilomenaWeb.FilterView, "_filter.html", conn: @conn, filter: filter
-
- .block
- .block__header.block__header--light.page__header
- .page__pagination = pagination
- .page__info
- span.block__header__title
- = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @filters, conn: @conn
-
- - assigns[:error] ->
- p
- ' Oops, there was an error evaluating your query:
- pre = assigns[:error]
-
- - true ->
- p
- ' No filters found!
-
-h3 Allowed fields
-table.table
- thead
- tr
- th Field Selector
- th Type
- th Description
- th Example
- tbody
- tr
- td
- code creator
- td Literal
- td Matches the creator of this filter.
- td
- code = link "creator:AppleDash", to: ~p"/filters?#{[fq: "creator:AppleDash"]}"
- tr
- td
- code name
- td Literal
- td Matches the name of this filter. This is the default field.
- td
- code = link "name:default", to: ~p"/filters?#{[fq: "name:default"]}"
- tr
- td
- code description
- td Full Text
- td Matches the description of this filter.
- td
- code = link "description:the show's rating", to: ~p"/filters?#{[fq: "description:the show's rating"]}"
- tr
- td
- code created_at
- td Date/Time Range
- td Matches the creation time of this filter.
- td
- code = link "created_at:2015", to: ~p"/filters?#{[fq: "created_at:2015"]}"
- tr
- td
- code id
- td Numeric Range
- td Matches the numeric surrogate key for this filter.
- td
- code = link "id:1", to: ~p"/filters?#{[fq: "id:1"]}"
- tr
- td
- code spoilered_count
- td Numeric Range
- td Matches the number of spoilered tags in this filter.
- td
- code = link "spoilered_count:1", to: ~p"/filters?#{[fq: "spoilered_count:1"]}"
- tr
- td
- code hidden_count
- td Numeric Range
- td Matches the number of hidden tags in this filter.
- td
- code = link "hidden_count:1", to: ~p"/filters?#{[fq: "hidden_count:1"]}"
- tr
- td
- code my
- td Meta
- td
- code> my:filters
- ' matches filters you have published if you are signed in.
- td
- code = link "my:filters", to: ~p"/filters?#{[fq: "my:filters"]}"
- tr
- td
- code system
- td Boolean
- td Matches system filters
- td
- code = link "system:true", to: ~p"/filters?#{[fq: "system:true"]}"
- tr
- td
- code public
- td Boolean
- td
- ' Matches public filters. Note that
- code> public:false
- ' matches only your own private filters.
- td
- code = link "public:false", to: ~p"/filters?#{[fq: "public:false"]}"
- tr
- td
- code user_id
- td Literal
- td Matches filters with the specified user_id.
- td
- code = link "user_id:307505", to: ~p"/filters?#{[fq: "user_id:307505"]}"
-
-= if @conn.params["fq"] do
- p = link("Back to filters", to: ~p"/filters")
diff --git a/lib/philomena_web/templates/filter/new.html.heex b/lib/philomena_web/templates/filter/new.html.heex
new file mode 100644
index 00000000..98fe9a46
--- /dev/null
+++ b/lib/philomena_web/templates/filter/new.html.heex
@@ -0,0 +1,4 @@
+
+ Creating New Filter
+
+<%= render(PhilomenaWeb.FilterView, "_form.html", filter: @changeset, route: ~p"/filters") %>
diff --git a/lib/philomena_web/templates/filter/new.html.slime b/lib/philomena_web/templates/filter/new.html.slime
deleted file mode 100644
index 26dc5513..00000000
--- a/lib/philomena_web/templates/filter/new.html.slime
+++ /dev/null
@@ -1,2 +0,0 @@
-h2 Creating New Filter
-= render PhilomenaWeb.FilterView, "_form.html", filter: @changeset, route: ~p"/filters"
\ No newline at end of file
diff --git a/lib/philomena_web/templates/filter/show.html.heex b/lib/philomena_web/templates/filter/show.html.heex
new file mode 100644
index 00000000..149e6ce0
--- /dev/null
+++ b/lib/philomena_web/templates/filter/show.html.heex
@@ -0,0 +1,80 @@
+
+ Viewing full filter details for
+ <%= @filter.name %>
+
+ <%= link("View tag changes", to: ~p"/fingerprint_profiles/#{@fingerprint}/tag_changes") %>
+
+
+ <%= link("View source URL history", to: ~p"/fingerprint_profiles/#{@fingerprint}/source_changes") %>
+
+
+ <%= link("View reports this fingerprint has made", to: ~p"/admin/reports?#{[rq: "fingerprint:#{@fingerprint}"]}") %>
+
+
+ <%= link("View fingerprint ban history", to: ~p"/admin/fingerprint_bans?#{[fingerprint: @fingerprint]}") %>
+
+
+ <%= link("Ban this sucker", to: ~p"/admin/fingerprint_bans/new?#{[fingerprint: @fingerprint]}") %>
+
+
+
+ Actions
+
+
+
+ <%= link("Revert all tag changes", to: ~p"/tag_changes/full_revert?#{[fingerprint: @fingerprint]}", data: [confirm: "Are you really, really sure?", method: "create"]) %>
+
+
+ <%=
+ link("...the button above didn't work (use carefully, this is resource-intensive)",
+ to: ~p"/tag_changes/full_revert?#{[fingerprint: @fingerprint, batch_size: 1]}",
+ data: [confirm: "Please confirm that you're aware that this may crash the site and are ready to take on the full wrath of the admins if it does so after you press this button.", method: "create"]
+ )
+ %>
+
+
+
+ Observed users
+
+
+
+
+
+ Username
+
+
+ Account Used
+
+
+ Last Seen
+
+
+ Created At
+
+
+
+
+ <%= for ufp <- @user_fps do %>
+
+
+ <%= link(ufp.user.name, to: ~p"/profiles/#{ufp.user}") %>
+
+
+ <%= ufp.uses %>
+ times
+
+
+ <%= pretty_time(ufp.updated_at) %>
+
+
+ <%= pretty_time(ufp.user.created_at) %>
+
+
+ <% end %>
+
+
diff --git a/lib/philomena_web/templates/fingerprint_profile/show.html.slime b/lib/philomena_web/templates/fingerprint_profile/show.html.slime
deleted file mode 100644
index cfb36e1e..00000000
--- a/lib/philomena_web/templates/fingerprint_profile/show.html.slime
+++ /dev/null
@@ -1,44 +0,0 @@
-h1
- = @fingerprint
- ' 's fingerprint profile
-
-ul
- li = link "View images this fingerprint has uploaded", to: ~p"/search?#{[q: "fingerprint:#{@fingerprint}"]}"
- li = link "View comments this fingerprint has posted", to: ~p"/comments?#{[cq: "fingerprint:#{@fingerprint}"]}"
- li = link "View posts this fingerprint has made", to: ~p"/posts?#{[pq: "fingerprint:#{@fingerprint}"]}"
-
-= render PhilomenaWeb.BanView, "_bans.html", bans: @fingerprint_bans, conn: @conn
-
-h2 Administration Options
-ul
- li = link "View tag changes", to: ~p"/fingerprint_profiles/#{@fingerprint}/tag_changes"
- li = link "View source URL history", to: ~p"/fingerprint_profiles/#{@fingerprint}/source_changes"
- li = link "View reports this fingerprint has made", to: ~p"/admin/reports?#{[rq: "fingerprint:#{@fingerprint}"]}"
- li = link "View fingerprint ban history", to: ~p"/admin/fingerprint_bans?#{[fingerprint: @fingerprint]}"
- li = link "Ban this sucker", to: ~p"/admin/fingerprint_bans/new?#{[fingerprint: @fingerprint]}"
-
-h2 Actions
-ul
- li = link "Revert all tag changes", to: ~p"/tag_changes/full_revert?#{[fingerprint: @fingerprint]}", data: [confirm: "Are you really, really sure?", method: "create"]
- li = link "...the button above didn't work (use carefully, this is resource-intensive)", to: ~p"/tag_changes/full_revert?#{[fingerprint: @fingerprint, batch_size: 1]}", data: [confirm: "Please confirm that you're aware that this may crash the site and are ready to take on the full wrath of the admins if it does so after you press this button.", method: "create"]
-
-h4 Observed users
-table.table
- thead
- tr
- th Username
- th Account Used
- th Last Seen
- th Created At
- tbody
- = for ufp <- @user_fps do
- tr
- td
- = link ufp.user.name, to: ~p"/profiles/#{ufp.user}"
- td
- => ufp.uses
- ' times
- td
- => pretty_time ufp.updated_at
- td
- => pretty_time ufp.user.created_at
diff --git a/lib/philomena_web/templates/fingerprint_profile/source_change/index.html.heex b/lib/philomena_web/templates/fingerprint_profile/source_change/index.html.heex
new file mode 100644
index 00000000..a8597b9d
--- /dev/null
+++ b/lib/philomena_web/templates/fingerprint_profile/source_change/index.html.heex
@@ -0,0 +1,7 @@
+
+ <%= if topic.sticky do %>
+
+ <% end %>
+ <%= if topic.locked_at do %>
+
+ <% end %>
+ <%= if topic.poll do %>
+
+ <% end %>
+ <%= link(topic.title, to: ~p"/forums/#{@forum}/topics/#{topic}") %>
+
+ <%= if topic.last_post do %>
+ <%= link("Go to post", to: ~p"/forums/#{topic.forum}/topics/#{topic}?#{[post_id: topic.last_post]}" <> "#post_#{topic.last_post.id}") %>
+ by
+ <%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic.last_post, conn: @conn) %>
+
+ <%= pretty_time(topic.last_post.created_at) %>
+ <% end %>
+
+
+ <% end %>
+
+
+
+
+
+ <%= pagination %>
+
+
+
+<% # - if current_user %>
+<% # = render partial: 'topics/form' %>
diff --git a/lib/philomena_web/templates/forum/show.html.slime b/lib/philomena_web/templates/forum/show.html.slime
deleted file mode 100644
index 870427ff..00000000
--- a/lib/philomena_web/templates/forum/show.html.slime
+++ /dev/null
@@ -1,59 +0,0 @@
-- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @topics, route: fn p -> ~p"/forums/#{@forum}?#{p}" end
-
-h1 = @forum.name
-.block
- .block__header
- => link("Forums", to: ~p"/forums")
- ' »
- => link(@forum.name, to: ~p"/forums/#{@forum}")
- a href=~p"/forums/#{@forum}/topics/new"
- i.fa.fa-fw.fa-edit>
- ' New Topic
-
- a href=~p"/posts?#{[pq: "forum:#{@forum.short_name}"]}"
- i.fa.fa-fw.fa-search>
- ' Search Posts
- span.spacing-left
- => @forum.topic_count
- ' topics
- .block__header--sub.block__header--light.page__header
- .page__pagination = pagination
- .page__info
- span.block__header__title = @forum.description
- = render PhilomenaWeb.Forum.SubscriptionView, "_subscription.html", forum: @forum, watching: @watching, conn: @conn
- .block__content
- table.table.table--communication-list
- thead
- tr
- th.table--communication-list__name Topic
- th.table--communication-list__stats.hide-mobile Posts
- th.table--communication-list__last-post Last Post
- tbody
- = for topic <- @topics do
- tr
- td.table--communication-list__name
- = if topic.sticky do
- i.fa.fa-thumbtack
- = if topic.locked_at do
- i.fa.fa-lock
- = if topic.poll do
- i.fas.fa-poll-h
- =< link(topic.title, to: ~p"/forums/#{@forum}/topics/#{topic}")
- .small-text
- ' Posted
- => pretty_time(topic.created_at)
- ' by
- = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic, conn: @conn
- td.table--communication-list__stats.hide-mobile = topic.post_count
- td.table--communication-list__last-post
- = if topic.last_post do
- => link("Go to post", to: ~p"/forums/#{topic.forum}/topics/#{topic}?#{[post_id: topic.last_post]}" <> "#post_#{topic.last_post.id}")
- ' by
- = render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic.last_post, conn: @conn
- br
- => pretty_time(topic.last_post.created_at)
- .block__header.block__header--light.page__header
- .page__pagination = pagination
-
-/- if current_user
-/ = render partial: 'topics/form'
diff --git a/lib/philomena_web/templates/forum/subscription/_subscription.html.heex b/lib/philomena_web/templates/forum/subscription/_subscription.html.heex
new file mode 100644
index 00000000..330fe5ca
--- /dev/null
+++ b/lib/philomena_web/templates/forum/subscription/_subscription.html.heex
@@ -0,0 +1,42 @@
+<%
+ watch_path = ~p"/forums/#{@forum}/subscription"
+
+ watch_class =
+ if @watching do
+ "hidden"
+ else
+ ""
+ end
+
+ unwatch_path = ~p"/forums/#{@forum}/subscription"
+
+ unwatch_class =
+ if @watching do
+ ""
+ else
+ "hidden"
+ end
+%>
+<%= if @conn.assigns.current_user do %>
+
+
+
+
+ Subscribe
+
+
+
+
+
+ Unsubscribe
+
+
+
+<% else %>
+
+
+
+ Subscribe
+
+
+<% end %>
diff --git a/lib/philomena_web/templates/forum/subscription/_subscription.html.slime b/lib/philomena_web/templates/forum/subscription/_subscription.html.slime
deleted file mode 100644
index 42172150..00000000
--- a/lib/philomena_web/templates/forum/subscription/_subscription.html.slime
+++ /dev/null
@@ -1,23 +0,0 @@
-elixir:
- watch_path = ~p"/forums/#{@forum}/subscription"
- watch_class = if @watching, do: "hidden", else: ""
-
- unwatch_path = ~p"/forums/#{@forum}/subscription"
- unwatch_class = if @watching, do: "", else: "hidden"
-
-= if @conn.assigns.current_user do
- span.js-subscription-target
- a.js-subscription-link href=watch_path class=watch_class data-remote="true" data-method="post"
- i.fa.fa-bell>
- span.hide-mobile
- ' Subscribe
-
- a.js-subscription-link href=unwatch_path class=unwatch_class data-remote="true" data-method="delete"
- i.fa.fa-bell-slash>
- span.hide-mobile
- ' Unsubscribe
-- else
- a href=~p"/sessions/new"
- i.fa.fa-bell>
- span.hide-mobile
- ' Subscribe
diff --git a/lib/philomena_web/templates/gallery/_form.html.heex b/lib/philomena_web/templates/gallery/_form.html.heex
new file mode 100644
index 00000000..407870e0
--- /dev/null
+++ b/lib/philomena_web/templates/gallery/_form.html.heex
@@ -0,0 +1,37 @@
+<%= form_for @changeset, @action, fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+
+ <%= label(f, :title, "Choose a title displayed in gallery preview") %>
+ <%= text_input(f, :title, class: "input input--wide", placeholder: "Title", required: true) %>
+ <%= error_tag(f, :title) %>
+
+
+ <%= label(f, :spoiler_warning, "If you are going to have NSFW images in the gallery, leave a warning for users who may not want to see it") %>
+ <%= text_input(f, :spoiler_warning, class: "input input--wide", placeholder: "Spoiler warning") %>
+ <%= error_tag(f, :spoiler_warning) %>
+
+
+ <%= label(:description, "Describe the gallery in a few words") %>
+ <%= textarea(f, :description, class: "input input--wide", placeholder: "Description") %>
+ <%= error_tag(f, :description) %>
+
+
+ <%= label(f, :thumbnail_id, "Set an existing image as the gallery cover") %>
+
+ <%= number_input(f, :thumbnail_id, value: input_value(f, :thumbnail_id) || @conn.params["with_image"], class: "input", placeholder: "Image ID (e.g. 100)", min: 0) %>
+ <%= error_tag(f, :thumbnail_id) %>
+
+
+ <%= label(f, :order_position_asc, "Reverse gallery order (images will be inserted at the end of the gallery)") %>
+ <%= checkbox(f, :order_position_asc, class: "checkbox") %>
+ <%= error_tag(f, :order_position_asc) %>
+
+
+ <%= submit("Save Gallery", class: "button") %>
+<% end %>
diff --git a/lib/philomena_web/templates/gallery/_form.html.slime b/lib/philomena_web/templates/gallery/_form.html.slime
deleted file mode 100644
index 416c2c9d..00000000
--- a/lib/philomena_web/templates/gallery/_form.html.slime
+++ /dev/null
@@ -1,29 +0,0 @@
-= form_for @changeset, @action, fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- .field
- = label f, :title, "Choose a title displayed in gallery preview"
- = text_input f, :title, class: "input input--wide", placeholder: "Title", required: true
- = error_tag f, :title
- .field
- = label f, :spoiler_warning, "If you are going to have NSFW images in the gallery, leave a warning for users who may not want to see it"
- = text_input f, :spoiler_warning, class: "input input--wide", placeholder: "Spoiler warning"
- = error_tag f, :spoiler_warning
- .field
- = label :description, "Describe the gallery in a few words"
- = textarea f, :description, class: "input input--wide", placeholder: "Description"
- = error_tag f, :description
- .field
- = label f, :thumbnail_id, "Set an existing image as the gallery cover"
- br
- = number_input f, :thumbnail_id, value: input_value(f, :thumbnail_id) || @conn.params["with_image"], class: "input", placeholder: "Image ID (e.g. 100)", min: 0
- = error_tag f, :thumbnail_id
- .field
- = label f, :order_position_asc, "Reverse gallery order (images will be inserted at the end of the gallery)"
- = checkbox f, :order_position_asc, class: "checkbox"
- = error_tag f, :order_position_asc
- .field
-
- = submit "Save Gallery", class: "button"
diff --git a/lib/philomena_web/templates/gallery/_gallery.html.heex b/lib/philomena_web/templates/gallery/_gallery.html.heex
new file mode 100644
index 00000000..80255859
--- /dev/null
+++ b/lib/philomena_web/templates/gallery/_gallery.html.heex
@@ -0,0 +1,12 @@
+<% link = ~p"/galleries/#{@gallery}" %>
+
+ <%= if @gallery.spoiler_warning not in [nil, ""] do %>
+
+ Warning:
+
+ <%= @gallery.spoiler_warning %>
+ <% end %>
+ <%= if @gallery.description not in [nil, ""] do %>
+
+ <%= @gallery.description %>
+
+ <% end %>
+
+
+
+
+ Click the image and drag.
+
+
+ Note that you may have to wait a couple of seconds before the order is applied.
+
+
+
+
+ <%= for {image, hit} <- @gallery_images do %>
+ <%= render(PhilomenaWeb.ImageView, "_image_box.html", image: image, link: image_url.(image, hit), size: :thumb, conn: @conn) %>
+ <% end %>
+
+
+
+ <%= pagination %>
+
+
+ <%= info %>
+
+
+
+
diff --git a/lib/philomena_web/templates/gallery/show.html.slime b/lib/philomena_web/templates/gallery/show.html.slime
deleted file mode 100644
index 3c61643a..00000000
--- a/lib/philomena_web/templates/gallery/show.html.slime
+++ /dev/null
@@ -1,84 +0,0 @@
-elixir:
- scope = scope(@conn)
- image_url = fn image, hit -> ~p"/images/#{image}?#{Keyword.put(scope, :sort, hit["sort"])}" end
- route = fn p -> ~p"/galleries/#{@gallery}?#{p}" end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @images, route: route, params: scope
- info = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @images
-
-#sortable class=sortable_classes(@conn)
- .block#imagelist-container
- section.block__header.flex.page__header
- span.block__header__title.page__title
- span
- ' Viewing gallery
- strong>
- = @gallery.title
-
- .page__pagination = pagination
-
- .flex__right.page__options
- = render PhilomenaWeb.ImageView, "_random_button.html", conn: @conn, params: scope
-
- a href=~p"/galleries/#{@gallery}/reports/new"
- i.fa.fa-exclamation-triangle>
- span.hide-mobile Report
-
- = if can?(@conn, :edit, @gallery) do
- a href=~p"/galleries/#{@gallery}/edit"
- i.fas.fa-edit>
- span.hide-mobile Edit
-
- = if can?(@conn, :edit, @gallery) do
- a.rearrange-button.js-rearrange href="#" data-click-hide=".js-rearrange" data-click-show=".js-save,#gallery-rearrange-info"
- i.fa.fa-sort>
- ' Rearrange
-
- a.rearrange-button.js-save.hidden href="#" data-click-hide=".js-save,#gallery-rearrange-info" data-click-show=".js-rearrange" data-reorder-path=~p"/galleries/#{@gallery}/order"
- i.fa.fa-check>
- ' Save
-
- a href=~p"/galleries/#{@gallery}" data-method="delete" data-confirm="Are you really, really sure?"
- i.fa.fa-trash>
- span.hide-mobile Delete
-
- = if show_subscription_link?(@gallery.creator, @conn.assigns.current_user) do
- = render PhilomenaWeb.Gallery.SubscriptionView, "_subscription.html", watching: @watching, gallery: @gallery, conn: @conn
-
- .block__header.block__header--light.block__header--sub
- span.block__header__title A gallery by
-
- => link @gallery.creator.name, to: ~p"/profiles/#{@gallery.creator}"
- ' with
- => @gallery.image_count
- = pluralize("image", "images", @gallery.image_count)
- span.hide-mobile-t
- ' , last updated
- = pretty_time(@gallery.updated_at)
-
- .block__content.flex.js-imagelist-info
- .flex__fixed.thumb-tiny-container.spacing-right
- = render PhilomenaWeb.ImageView, "_image_container.html", image: @gallery.thumbnail, size: :thumb_tiny, conn: @conn
-
- .flex__grow
- = if @gallery.spoiler_warning not in [nil, ""] do
- strong> Warning:
- = @gallery.spoiler_warning
-
- = if @gallery.description not in [nil, ""] do
- p = @gallery.description
-
- .block__content.hidden#gallery-rearrange-info
- .block.block--fixed.block--primary
- | Click the image and drag.
- br
- strong Note that you may have to wait a couple of seconds before the order is applied.
-
- .block__content.js-resizable-media-container
- = for {image, hit} <- @gallery_images do
- = render PhilomenaWeb.ImageView, "_image_box.html", image: image, link: image_url.(image, hit), size: :thumb, conn: @conn
-
- .block__header.block__header--light.flex.page__header
- .page__pagination = pagination
-
- span.block__header__title.page__info
- = info
diff --git a/lib/philomena_web/templates/gallery/subscription/_error.html.heex b/lib/philomena_web/templates/gallery/subscription/_error.html.heex
new file mode 100644
index 00000000..74b8d64e
--- /dev/null
+++ b/lib/philomena_web/templates/gallery/subscription/_error.html.heex
@@ -0,0 +1,3 @@
+
+ <%= if String.length(@image.description) > 0 do %>
+ <%= @body %>
+ <% else %>
+
+ No description provided.
+
+ <% end %>
+
+
+
diff --git a/lib/philomena_web/templates/image/_description.html.slime b/lib/philomena_web/templates/image/_description.html.slime
deleted file mode 100644
index 5f1fa052..00000000
--- a/lib/philomena_web/templates/image/_description.html.slime
+++ /dev/null
@@ -1,16 +0,0 @@
-.block
- .block__header.flex
- span.block__header__title
- i.fas.fa-file-lines>
- ' Description
- = if can?(@conn, :edit_description, @image) do
- .block__header__buttons
- a.button.button--inline#edit-description href="#" data-click-focus="#description" data-click-hide=".image-description" data-click-show="#description-form" title="Edit description" accessKey="d"
- i.fas.fa-edit>
- ' Edit
- .block__content
- p
- = if String.length(@image.description) > 0 do
- = @body
- - else
- em No description provided.
diff --git a/lib/philomena_web/templates/image/_hidden_toggle.html.heex b/lib/philomena_web/templates/image/_hidden_toggle.html.heex
new file mode 100644
index 00000000..3937eb3b
--- /dev/null
+++ b/lib/philomena_web/templates/image/_hidden_toggle.html.heex
@@ -0,0 +1,15 @@
+<%= if present?(@conn.params["hidden"]) do %>
+
+
+
+ Hide Hidden
+
+
+<% else %>
+
+
+
+ Show Hidden
+
+
+<% end %>
diff --git a/lib/philomena_web/templates/image/_hidden_toggle.html.slime b/lib/philomena_web/templates/image/_hidden_toggle.html.slime
deleted file mode 100644
index a138aa9a..00000000
--- a/lib/philomena_web/templates/image/_hidden_toggle.html.slime
+++ /dev/null
@@ -1,9 +0,0 @@
-= if present?(@conn.params["hidden"]) do
- a href=@route.(Keyword.delete(@params, :hidden)) title="Hide Hidden Images"
- i.fa.fa-eye-slash>
- span.hide-mobile.hide-limited-desktop Hide Hidden
-
-- else
- a href=@route.(Keyword.put(@params, :hidden, "1")) title="Show Hidden Images"
- i.fa.fa-eye-slash>
- span.hide-mobile.hide-limited-desktop Show Hidden
diff --git a/lib/philomena_web/templates/image/_image_approval_banner.html.heex b/lib/philomena_web/templates/image/_image_approval_banner.html.heex
new file mode 100644
index 00000000..c25b828e
--- /dev/null
+++ b/lib/philomena_web/templates/image/_image_approval_banner.html.heex
@@ -0,0 +1,24 @@
+<%= if not @image.approved and not @image.hidden_from_users do %>
+
+
+ Hold up!
+
+
+ This image is pending approval from a staff member. It will appear on the site once it's reviewed and approved.
+
+
+ Don't worry,
+
+ the image will not lose any viewership,
+
+ it will appear on the homepage and in search results as normal (as if it was uploaded at the time of approval).
+
+<% end %>
diff --git a/lib/philomena_web/templates/image/_image_approval_banner.html.slime b/lib/philomena_web/templates/image/_image_approval_banner.html.slime
deleted file mode 100644
index 9c4ec4f1..00000000
--- a/lib/philomena_web/templates/image/_image_approval_banner.html.slime
+++ /dev/null
@@ -1,12 +0,0 @@
-= if not @image.approved and not @image.hidden_from_users do
- .block.block--fixed.block--warning
- h2 Hold up!
- p This image is pending approval from a staff member. It will appear on the site once it's reviewed and approved.
- p
- ' Don't worry,
- strong
- ' the image will not lose any viewership,
- ' it will appear on the homepage and in search results as normal (as if it was uploaded at the time of approval).
- p
- a href="/pages/approval"
- strong Click here to learn more about image approval and verification.
diff --git a/lib/philomena_web/templates/image/_image_box.html.heex b/lib/philomena_web/templates/image/_image_box.html.heex
new file mode 100644
index 00000000..05303da1
--- /dev/null
+++ b/lib/philomena_web/templates/image/_image_box.html.heex
@@ -0,0 +1,49 @@
+<%
+ link = assigns[:link] || ~p"/images/#{@image}"
+
+ size_class =
+ case @size do
+ :thumb -> "media-box__content--large"
+ :medium -> "media-box__content--featured"
+ _ -> "media-box__content--small"
+ end
+
+ header_class =
+ case @size do
+ :thumb_small -> "media-box__header--small"
+ _ -> nil
+ end
+%>
+
+ <%= if @image.image_mime_type == "video/webm" do %>
+
+ WEBM uploads may take longer to process, it should appear in up to an hour (depending on file size and video length).
+
+ <% else %>
+
+ The image should appear in a few minutes; report it otherwise.
+
+ <% end %>
+
+ Implications might have added tags, so check them in the meanwhile.
+
+
+ <% end %>
+ <%= if !@image.processed and @image.thumbnails_generated do %>
+
+
+ This image is being processed to optimize the filesize. It should finish shortly.
+
+ <% end %>
+
diff --git a/lib/philomena_web/templates/image/_image_page.html.slime b/lib/philomena_web/templates/image/_image_page.html.slime
deleted file mode 100644
index 1100694a..00000000
--- a/lib/philomena_web/templates/image/_image_page.html.slime
+++ /dev/null
@@ -1,15 +0,0 @@
-.center--layout--flex
- = if @image.thumbnails_generated do
- = render PhilomenaWeb.ImageView, "_image_target.html", embed_display: false, image: @image, conn: @conn
- - else
- #thumbnails-not-yet-generated.block.block--fixed.block--warning.layout--narrow
- h3 Just a moment
- = if @image.image_mime_type == "video/webm" do
- p WEBM uploads may take longer to process, it should appear in up to an hour (depending on file size and video length).
- - else
- p The image should appear in a few minutes; report it otherwise.
- p Implications might have added tags, so check them in the meanwhile.
- = if !@image.processed and @image.thumbnails_generated do
- br
- #image-being-optimized.block.block--fixed.block--warning.layout--narrow
- | This image is being processed to optimize the filesize. It should finish shortly.
diff --git a/lib/philomena_web/templates/image/_image_target.html.heex b/lib/philomena_web/templates/image/_image_target.html.heex
new file mode 100644
index 00000000..13a570e5
--- /dev/null
+++ b/lib/philomena_web/templates/image/_image_target.html.heex
@@ -0,0 +1,42 @@
+<% size = assigns[:size] || :full %>
+<% embed_display = assigns[:embed_display] || false %>
+<%= content_tag :div, [data: image_container_data(@conn, @image, size), class: "image-show-container"] do %>
+
+
+ <%= link("This image is blocked by your current filter - click here to display it anyway", to: "#", data: [click_unfilter: @image.id]) %>
+
+
+ <%
+ source_link =
+ if image_has_sources(@image) do
+ " - [url=#{image_first_source(@image)}]Original source[/url]"
+ else
+ " (Original source unknown at time of posting)"
+ end
+ %>
+
+ <%= url_input(f, :scraper_url, class: "input input--wide js-scraper", placeholder: "Link a deviantART page, a Tumblr post, or the image directly") %>
+
+
+<% end %>
diff --git a/lib/philomena_web/templates/image/_uploader.html.slime b/lib/philomena_web/templates/image/_uploader.html.slime
deleted file mode 100644
index 504ab437..00000000
--- a/lib/philomena_web/templates/image/_uploader.html.slime
+++ /dev/null
@@ -1,26 +0,0 @@
-span.image_uploader
- ' by
- => render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @image, awards: true, conn: @conn
-
- = if can?(@conn, :show, :ip_address) and not hide_staff_tools?(@conn) do
- => link_to_ip(@conn, @image.ip)
- => link_to_fingerprint(@conn, @image.fingerprint)
- a#edit-uploader href="#" data-click-hide=".image_uploader" data-click-show="#uploader-form"
- i.fas.fa-edit
- a#edit-anonymous href="#" data-click-toggle=".image-anonymous"
- i.fas.fa-eye
-
-= if can?(@conn, :show, :ip_address) do
- = form_for @changeset, ~p"/images/#{@image}/uploader", [class: "block__content hidden", id: "uploader-form", data: [remote: "true", method: "put"]], fn f ->
- => label f, :username, "Uploader"
- => text_input f, :username, value: username(@image.user), class: "input input--short input--small"
-
- = submit "Save Changes", class: "button button--small", data: [disable_with: raw("Saving…")]
-
- div Changes IP to '127.0.0.1' and FP to 'ffff'. Empty for anonymous.
-
- .image-anonymous.hidden
- = if @image.anonymous do
- = button_to "Reveal author", ~p"/images/#{@image}/anonymous", class: "button button--small", method: "delete", data: [confirm: "Are you really, really sure?"]
- - else
- = button_to "Hide author", ~p"/images/#{@image}/anonymous", class: "button button--small", method: "create", data: [confirm: "Are you really, really sure?"]
diff --git a/lib/philomena_web/templates/image/comment/_form.html.heex b/lib/philomena_web/templates/image/comment/_form.html.heex
new file mode 100644
index 00000000..2cf4c212
--- /dev/null
+++ b/lib/philomena_web/templates/image/comment/_form.html.heex
@@ -0,0 +1,26 @@
+<%
+ options =
+ if assigns[:remote] do
+ [data: [remote: "true"], id: "js-comment-form"]
+ else
+ []
+ end
+%>
+<%= form_for @changeset, ~p"/images/#{@image}/comments", options, fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+
+
+ <%= render(PhilomenaWeb.MarkdownView, "_input.html", conn: @conn, f: f, placeholder: "Please read the site rules before posting and use ||spoilers|| for above-rating stuff.") %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/image/comment/_form.html.slime b/lib/philomena_web/templates/image/comment/_form.html.slime
deleted file mode 100644
index 731ba817..00000000
--- a/lib/philomena_web/templates/image/comment/_form.html.slime
+++ /dev/null
@@ -1,15 +0,0 @@
-- options = if(assigns[:remote], do: [data: [remote: "true"], id: "js-comment-form"], else: [])
-
-= form_for @changeset, ~p"/images/#{@image}/comments", options, fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- .block
- div
- = render PhilomenaWeb.MarkdownView, "_input.html", conn: @conn, f: f, placeholder: "Please read the site rules before posting and use ||spoilers|| for above-rating stuff."
-
- .block__content.communication-edit__actions
- => submit "Post", class: "button", data: [disable_with: raw("Posting…")]
-
- = render PhilomenaWeb.MarkdownView, "_anon_checkbox.html", conn: @conn, f: f
diff --git a/lib/philomena_web/templates/image/comment/edit.html.heex b/lib/philomena_web/templates/image/comment/edit.html.heex
new file mode 100644
index 00000000..33364a2e
--- /dev/null
+++ b/lib/philomena_web/templates/image/comment/edit.html.heex
@@ -0,0 +1,21 @@
+<%= form_for @changeset, ~p"/images/#{@comment.image}/comments/#{@comment}", fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+
+
+ <%= render(PhilomenaWeb.MarkdownView, "_input.html", conn: @conn, f: f, placeholder: "Please read the site rules before posting and use ||spoilers|| for above-rating stuff.") %>
+
+ This image was merged into image
+ <%= link("##{@image.duplicate_id}", to: ~p"/images/#{@image.duplicate_id}") %>
+ because it was determined to be a duplicate of that image.
+
+
+
+<% else %>
+
+
+
+ This image has been deleted
+
+
+ Reason:
+
+ <%= @image.deletion_reason || "Unknown (likely deleted in error). Please contact a moderator." %>
+
+
+ If you originally uploaded the file previously located here, please don't re-upload it -
+ <%= link("contact us", to: "/pages/contact") %>
+ if you feel this was in error and we'll talk! We're only human, and mistakes happen.
+
+
+ Here's the
+ <%= link("tagging guidelines", to: "/pages/tags") %>
+ and
+ <%= link("rules of the site", to: "/pages/rules") %>
+ . Other useful links can be found at the bottom of the page.
+
+
+<% end %>
+<%= if can?(@conn, :hide, @image) do %>
+ <%= render(PhilomenaWeb.ImageView, "show.html", assigns) %>
+<% else %>
+
+
+ Tags:
+
+
+ <%= render(PhilomenaWeb.TagView, "_tag_list.html", tags: display_order(@image.tags), conn: @conn) %>
+<% end %>
diff --git a/lib/philomena_web/templates/image/deleted.html.slime b/lib/philomena_web/templates/image/deleted.html.slime
deleted file mode 100644
index fc425b36..00000000
--- a/lib/philomena_web/templates/image/deleted.html.slime
+++ /dev/null
@@ -1,40 +0,0 @@
-= if @image.duplicate_id do
- .walloftext
- .block.block--fixed.block--warning
- h1 This image has been merged into another image
- p
- ' This image was merged into image
- => link "##{@image.duplicate_id}", to: ~p"/images/#{@image.duplicate_id}"
- ' because it was determined to be a duplicate of that image.
-
-- else
- .walloftext
- .block.block--fixed.block--warning
- h1 This image has been deleted
- p
- ' Reason:
- strong
- = @image.deletion_reason || "Unknown (likely deleted in error). Please contact a moderator."
-
- = if can?(@conn, :hide, @image) do
- p
- strong> Spoilers!
- ' Done by:
- strong = deleter(@image)
- p
- ' If you originally uploaded the file previously located here, please don't re-upload it -
- => link "contact us", to: "/pages/contact"
- ' if you feel this was in error and we'll talk! We're only human, and mistakes happen.
- p
- ' Here's the
- => link "tagging guidelines", to: "/pages/tags"
- ' and
- = link "rules of the site", to: "/pages/rules"
- ' . Other useful links can be found at the bottom of the page.
-
-= if can?(@conn, :hide, @image) do
- = render PhilomenaWeb.ImageView, "show.html", assigns
-- else
- p
- strong Tags:
- = render PhilomenaWeb.TagView, "_tag_list.html", tags: display_order(@image.tags), conn: @conn
diff --git a/lib/philomena_web/templates/image/description/_form.html.heex b/lib/philomena_web/templates/image/description/_form.html.heex
new file mode 100644
index 00000000..9b3448a9
--- /dev/null
+++ b/lib/philomena_web/templates/image/description/_form.html.heex
@@ -0,0 +1,18 @@
+<%= form_for @changeset, ~p"/images/#{@image}/description", [class: "block hidden", id: "description-form", data: [remote: "true"]], fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+ <%= textarea(f, :description, id: "description", class: "input input--wide js-toolbar-input", placeholder: "Describe this image in plain words - this should generally be info about the image that doesn't belong in the tags or source.") %>
+
+ <%= submit("Save changes", class: "button", autocomplete: "off") %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/image/description/_form.html.slime b/lib/philomena_web/templates/image/description/_form.html.slime
deleted file mode 100644
index e47b5d3f..00000000
--- a/lib/philomena_web/templates/image/description/_form.html.slime
+++ /dev/null
@@ -1,15 +0,0 @@
-= form_for @changeset, ~p"/images/#{@image}/description", [class: "block hidden", id: "description-form", data: [remote: "true"]], fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- = render PhilomenaWeb.MarkdownView, "_help.html", conn: @conn
- = render PhilomenaWeb.MarkdownView, "_toolbar.html", conn: @conn
-
- .field
- = textarea f, :description, id: "description", class: "input input--wide js-toolbar-input", placeholder: "Describe this image in plain words - this should generally be info about the image that doesn't belong in the tags or source."
-
- = submit "Save changes", class: "button", autocomplete: "off"
-
- button.button.button--separate-left type="reset" data-click-hide="#description-form" data-click-show=".image-description"
- ' Cancel
diff --git a/lib/philomena_web/templates/image/favorite/index.html.heex b/lib/philomena_web/templates/image/favorite/index.html.heex
new file mode 100644
index 00000000..1ba80fed
--- /dev/null
+++ b/lib/philomena_web/templates/image/favorite/index.html.heex
@@ -0,0 +1,40 @@
+
+<%= for fave <- Enum.sort_by(@image.faves, & String.downcase(&1.user.name)) do %>
+ <%= link(fave.user.name, to: ~p"/profiles/#{fave.user}", class: "interaction-user-list-item") %>
+<% end %>
+<%= if @has_votes do %>
+
+ <%= url_input(f, :scraper_url, class: "input input--wide js-scraper", placeholder: "Link a deviantART page, a Tumblr post, or the image directly") %>
+
+
+
+
+
+ About this image
+
+
+ The page(s) you found this image on. Images may have a maximum of
+
+ 10
+
+ source URLs. Leave any sources you don't want to use blank.
+
+ You can mouse over tags below to view a description, and click to add. Short tag names can be used and will expand to full.
+
+
+ <%= PhilomenaWeb.TagView.quick_tags(@conn) %>
+
+
+
+
+
+
+ <%=
+ render(PhilomenaWeb.MarkdownView, "_input.html",
+ conn: @conn,
+ f: f,
+ action_icon: "pencil-alt",
+ action_text: "Description",
+ placeholder: "Describe this image in plain words - this should generally be info about the image that doesn't belong in the tags or source.",
+ name: :description,
+ class: "js-image-descr-input",
+ required: false
+ )
+ %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/image/new.html.slime b/lib/philomena_web/templates/image/new.html.slime
deleted file mode 100644
index ad596f17..00000000
--- a/lib/philomena_web/templates/image/new.html.slime
+++ /dev/null
@@ -1,91 +0,0 @@
-= form_for @changeset, ~p"/images", [multipart: true], fn f ->
- .dnp-warning
- h4
- ' Read the
- a> href="/pages/rules" site rules
- ' and check our
- a> href="/dnp" do-not-post list
- p
- ' Don't post content the artist doesn't want here (or shared in general),
- strong including commercial content.
-
- p
- strong
- ' Please check it isn't already here with
- a href="/search/reverse" reverse search.
-
- / todo: extract this
- h4 Select an image
- .image-other
- #js-image-upload-previews
- p Upload a file from your computer, or provide a link to the page containing the image and click Fetch.
- .field
- = file_input f, :image, class: "input js-scraper"
- = error_tag f, :image
- = error_tag f, :image_size
- = error_tag f, :image_width
- = error_tag f, :image_height
- = error_tag f, :image_name
- = error_tag f, :image_mime_type
- = error_tag f, :image_duration
- = error_tag f, :image_orig_sha512_hash
-
- .field.field--inline
- = url_input f, :scraper_url, class: "input input--wide js-scraper", placeholder: "Link a deviantART page, a Tumblr post, or the image directly"
- button.button.button--separate-left#js-scraper-preview(type="button" title="Fetch the image at the specified URL" data-disable-with="Fetch" disabled)
- ' Fetch
-
- .field-error-js.hidden.js-scraper
-
- h4 About this image
- p
- 'The page(s) you found this image on. Images may have a maximum of
- span.js-max-source-count> 10
- ' source URLs. Leave any sources you don't want to use blank.
-
- = inputs_for f, :sources, fn fs ->
- .field.js-image-source.field--inline.flex--no-wrap.flex--centered
- = text_input fs, :source, class: "input flex__grow js-source-url", placeholder: "Source URL"
- = error_tag fs, :source
-
- label.input--separate-left.flex__fixed.flex--centered
- a.js-source-remove href="#"
- i.fa.fa-trash>
- ' Delete
-
- .field
- button.button.js-image-add-source type="button"
- i.fa.fa-plus>
- ' Add source
-
- .field
- label for="image[tag_input]"
- ' Describe with
- strong> 3+
- ' tags, including ratings and applicable artist tags
-
- = render PhilomenaWeb.TagView, "_tag_editor.html", f: f, name: :tag_input, type: :upload
- = error_tag f, :tag_input
-
- button.button.button--state-success.button--separate-left.button--bold id="tagsinput-save" type="button" title="This button saves the tags listed above to your browser, allowing you to retrieve them again by clicking the Load button" Save
- button.button.button--state-warning.button--separate-left.button--bold id="tagsinput-load" type="button" title="This button loads any saved tags from your browser" Load
- button.button.button--state-danger.button--separate-left.button--bold id="tagsinput-clear" type="button" title="This button will clear the list of tags above" Clear
-
- p You can mouse over tags below to view a description, and click to add. Short tag names can be used and will expand to full.
-
- .block.js-tagtable data-target="[name="image[tag_input]"]"
- = PhilomenaWeb.TagView.quick_tags(@conn)
-
- br
-
- .field
- .block
- .communication-edit__wrap
- = render PhilomenaWeb.MarkdownView, "_input.html", conn: @conn, f: f, action_icon: "pencil-alt", action_text: "Description", placeholder: "Describe this image in plain words - this should generally be info about the image that doesn't belong in the tags or source.", name: :description, class: "js-image-descr-input", required: false
-
- = render PhilomenaWeb.MarkdownView, "_anon_checkbox.html", conn: @conn, f: f, label: "Post anonymously"
-
- = render PhilomenaWeb.CaptchaView, "_captcha.html", name: "image", conn: @conn
-
- .actions
- = submit "Upload", class: "button input--separate-top", autocomplete: "off", data: [disable_with: "Please wait..."]
diff --git a/lib/philomena_web/templates/image/related/index.html.heex b/lib/philomena_web/templates/image/related/index.html.heex
new file mode 100644
index 00000000..0f7cba57
--- /dev/null
+++ b/lib/philomena_web/templates/image/related/index.html.heex
@@ -0,0 +1,16 @@
+
+
+
+ Viewing related images for
+
+ #
+ <%= @image.id %>
+
+
+
+
+ <%= for image <- @images do %>
+ <%= render(PhilomenaWeb.ImageView, "_image_box.html", image: image, link: ~p"/images/#{image}", size: :thumb, conn: @conn) %>
+ <% end %>
+
+ <%= link("View tag changes", to: ~p"/ip_profiles/#{to_string(@ip)}/tag_changes") %>
+
+
+ <%= link("View source URL history", to: ~p"/ip_profiles/#{to_string(@ip)}/source_changes") %>
+
+
+ <%= link("View reports this IP has made", to: ~p"/admin/reports?#{[rq: "ip:#{@ip}"]}") %>
+
+
+ <%= link("View IP ban history", to: ~p"/admin/subnet_bans?#{[ip: to_string(@ip)]}") %>
+
+
+ <%= link("Ban this sucker", to: ~p"/admin/subnet_bans/new?#{[specification: to_string(@ip)]}") %>
+
+
+
+ Actions
+
+
+
+ <%= link("Revert all tag changes", to: ~p"/tag_changes/full_revert?#{[ip: to_string(@ip)]}", data: [confirm: "Are you really, really sure?", method: "create"]) %>
+
+
+ <%=
+ link("...the button above didn't work (use carefully, this is resource-intensive)",
+ to: ~p"/tag_changes/full_revert?#{[ip: to_string(@ip), batch_size: 1]}",
+ data: [confirm: "Please confirm that you're aware that this may crash the site and are ready to take on the full wrath of the admins if it does so after you press this button.", method: "create"]
+ )
+ %>
+
+
+
+ Observed users
+
+
+
+
+
+ Username
+
+
+ Account Used
+
+
+ Last Seen
+
+
+ Created At
+
+
+
+
+ <%= for uip <- @user_ips do %>
+
+
+ <%= link(uip.user.name, to: ~p"/profiles/#{uip.user}") %>
+
+
+ <%= uip.uses %>
+ times
+
+
+ <%= pretty_time(uip.updated_at) %>
+
+
+ <%= pretty_time(uip.user.created_at) %>
+
+
+ <% end %>
+
+
diff --git a/lib/philomena_web/templates/ip_profile/show.html.slime b/lib/philomena_web/templates/ip_profile/show.html.slime
deleted file mode 100644
index eb3ac25c..00000000
--- a/lib/philomena_web/templates/ip_profile/show.html.slime
+++ /dev/null
@@ -1,44 +0,0 @@
-h1
- = @ip
- ' 's IP profile
-
-ul
- li = link "View images this IP has uploaded", to: ~p"/search?#{[q: "ip:#{@ip}"]}"
- li = link "View comments this IP has posted", to: ~p"/comments?#{[cq: "ip:#{@ip}"]}"
- li = link "View posts this IP has made", to: ~p"/posts?#{[pq: "ip:#{@ip}"]}"
-
-= render PhilomenaWeb.BanView, "_bans.html", bans: @subnet_bans, conn: @conn
-
-h2 Administration Options
-ul
- li = link "View tag changes", to: ~p"/ip_profiles/#{to_string(@ip)}/tag_changes"
- li = link "View source URL history", to: ~p"/ip_profiles/#{to_string(@ip)}/source_changes"
- li = link "View reports this IP has made", to: ~p"/admin/reports?#{[rq: "ip:#{@ip}"]}"
- li = link "View IP ban history", to: ~p"/admin/subnet_bans?#{[ip: to_string(@ip)]}"
- li = link "Ban this sucker", to: ~p"/admin/subnet_bans/new?#{[specification: to_string(@ip)]}"
-
-h2 Actions
-ul
- li = link "Revert all tag changes", to: ~p"/tag_changes/full_revert?#{[ip: to_string(@ip)]}", data: [confirm: "Are you really, really sure?", method: "create"]
- li = link "...the button above didn't work (use carefully, this is resource-intensive)", to: ~p"/tag_changes/full_revert?#{[ip: to_string(@ip), batch_size: 1]}", data: [confirm: "Please confirm that you're aware that this may crash the site and are ready to take on the full wrath of the admins if it does so after you press this button.", method: "create"]
-
-h4 Observed users
-table.table
- thead
- tr
- th Username
- th Account Used
- th Last Seen
- th Created At
- tbody
- = for uip <- @user_ips do
- tr
- td
- = link uip.user.name, to: ~p"/profiles/#{uip.user}"
- td
- => uip.uses
- ' times
- td
- => pretty_time uip.updated_at
- td
- => pretty_time uip.user.created_at
diff --git a/lib/philomena_web/templates/ip_profile/source_change/index.html.heex b/lib/philomena_web/templates/ip_profile/source_change/index.html.heex
new file mode 100644
index 00000000..c00471a4
--- /dev/null
+++ b/lib/philomena_web/templates/ip_profile/source_change/index.html.heex
@@ -0,0 +1,7 @@
+
+ <%= if manages_site_notices?(@conn) do %>
+ <%= link to: ~p"/admin/site_notices", class: "header__link" do %>
+
+ Site Notices
+ <% end %>
+ <% end %>
+ <%= if manages_users?(@conn) do %>
+ <%= link to: ~p"/admin/users", class: "header__link" do %>
+
+ Users
+ <% end %>
+ <% end %>
+ <%= if manages_forums?(@conn) do %>
+ <%= link to: ~p"/admin/forums", class: "header__link" do %>
+
+ Forums
+ <% end %>
+ <% end %>
+ <%= if manages_ads?(@conn) do %>
+ <%= link to: ~p"/admin/adverts", class: "header__link" do %>
+
+ Adverts
+ <% end %>
+ <% end %>
+ <%= if manages_badges?(@conn) do %>
+ <%= link to: ~p"/admin/badges", class: "header__link" do %>
+
+ Badges
+ <% end %>
+ <% end %>
+ <%= if manages_static_pages?(@conn) do %>
+ <%= link to: ~p"/pages", class: "header__link" do %>
+
+ Pages
+ <% end %>
+ <% end %>
+ <%= if manages_mod_notes?(@conn) do %>
+ <%= link to: ~p"/admin/mod_notes", class: "header__link" do %>
+
+ Mod Notes
+ <% end %>
+ <% end %>
+ <%= if can_see_moderation_log?(@conn) do %>
+ <%= link to: ~p"/moderation_logs", class: "header__link" do %>
+
+ Mod Logs
+ <% end %>
+ <% end %>
+
+
+ <% end %>
+ <%= if @pending_approval_count do %>
+ <%= link to: ~p"/admin/approvals", class: "header__link", title: "Approval Queue" do %>
+ Q
+
+ <%= @pending_approval_count %>
+
+ <% end %>
+ <% end %>
+ <%= if @duplicate_report_count do %>
+ <%= link to: ~p"/duplicate_reports", class: "header__link", title: "Duplicates" do %>
+ D
+
+ <%= @duplicate_report_count %>
+
+ <% end %>
+ <% end %>
+ <%= if @report_count do %>
+ <%= link to: ~p"/admin/reports", class: "header__link", title: "Reports" do %>
+ R
+
+ <%= @report_count %>
+
+ <% end %>
+ <% end %>
+ <%= if @artist_link_count do %>
+ <%= link to: ~p"/admin/artist_links", class: "header__link", title: "Artist Links" do %>
+ L
+
+ <%= @artist_link_count %>
+
+ <% end %>
+ <% end %>
+ <%= if @dnp_entry_count do %>
+ <%= link to: ~p"/admin/dnp_entries", class: "header__link", title: "DNP Requests" do %>
+ S
+
+ <%= @dnp_entry_count %>
+
+ <% end %>
+ <% end %>
+ <%= if manages_bans?(@conn) do %>
+
+ <%= link to: ~p"/admin/user_bans", class: "header__link" do %>
+
+ User Bans
+ <% end %>
+ <%= link to: ~p"/admin/subnet_bans", class: "header__link" do %>
+
+ IP Bans
+ <% end %>
+ <%= link to: ~p"/admin/fingerprint_bans", class: "header__link" do %>
+
+ FP Bans
+ <% end %>
+
+
+ <% end %>
+
diff --git a/lib/philomena_web/templates/layout/_header_staff_links.html.slime b/lib/philomena_web/templates/layout/_header_staff_links.html.slime
deleted file mode 100644
index 59c6126b..00000000
--- a/lib/philomena_web/templates/layout/_header_staff_links.html.slime
+++ /dev/null
@@ -1,97 +0,0 @@
-.flex.flex--centered.header--secondary__admin-links.stretched-mobile-links.js-staff-action
- = if manages_users?(@conn) do
- .dropdown.hide-mobile
- a.header__link title="Admin"
- ' A
- i.fa.fa-caret-down
-
- .dropdown__content.js-burger-links
- = if manages_site_notices?(@conn) do
- = link to: ~p"/admin/site_notices", class: "header__link" do
- i.fa.fa-fw.fa-info-circle>
- ' Site Notices
-
- = if manages_users?(@conn) do
- = link to: ~p"/admin/users", class: "header__link" do
- i.fa.fa-fw.fa-users>
- ' Users
-
- = if manages_forums?(@conn) do
- = link to: ~p"/admin/forums", class: "header__link" do
- i.fa.fa-fw.fa-paragraph>
- ' Forums
-
- = if manages_ads?(@conn) do
- = link to: ~p"/admin/adverts", class: "header__link" do
- i.fa.fa-fw.fa-shopping-bag>
- ' Adverts
-
- = if manages_badges?(@conn) do
- = link to: ~p"/admin/badges", class: "header__link" do
- i.fa.fa-fw.fa-trophy>
- ' Badges
-
- = if manages_static_pages?(@conn) do
- = link to: ~p"/pages", class: "header__link" do
- i.fa.fa-fw.fa-sticky-note>
- ' Pages
-
- = if manages_mod_notes?(@conn) do
- = link to: ~p"/admin/mod_notes", class: "header__link" do
- i.fa.fa-fw.fa-clipboard>
- ' Mod Notes
-
- = if can_see_moderation_log?(@conn) do
- = link to: ~p"/moderation_logs", class: "header__link" do
- i.fa.fa-fw.fa-list-alt>
- ' Mod Logs
-
- = if @pending_approval_count do
- = link to: ~p"/admin/approvals", class: "header__link", title: "Approval Queue" do
- ' Q
- span.header__counter__admin
- = @pending_approval_count
-
- = if @duplicate_report_count do
- = link to: ~p"/duplicate_reports", class: "header__link", title: "Duplicates" do
- ' D
- span.header__counter__admin
- = @duplicate_report_count
-
- = if @report_count do
- = link to: ~p"/admin/reports", class: "header__link", title: "Reports" do
- ' R
- span.header__counter__admin
- = @report_count
-
- = if @artist_link_count do
- = link to: ~p"/admin/artist_links", class: "header__link", title: "Artist Links" do
- ' L
- span.header__counter__admin
- = @artist_link_count
-
- = if @dnp_entry_count do
- = link to: ~p"/admin/dnp_entries", class: "header__link", title: "DNP Requests" do
- ' S
- span.header__counter__admin
- = @dnp_entry_count
-
- = if manages_bans?(@conn) do
- .dropdown.hide-mobile
- a.header__link title="Bans"
- ' B
- i.fa.fa-caret-down
-
- .dropdown__content.dropdown__content-right.js-burger-links
-
- = link to: ~p"/admin/user_bans", class: "header__link" do
- i.fa.fa-fw.fa-user>
- ' User Bans
-
- = link to: ~p"/admin/subnet_bans", class: "header__link" do
- i.fab.fa-fw.fa-internet-explorer>
- ' IP Bans
-
- = link to: ~p"/admin/fingerprint_bans", class: "header__link" do
- i.fa.fa-fw.fa-desktop>
- ' FP Bans
diff --git a/lib/philomena_web/templates/layout/_opengraph.html.heex b/lib/philomena_web/templates/layout/_opengraph.html.heex
new file mode 100644
index 00000000..54eca01c
--- /dev/null
+++ b/lib/philomena_web/templates/layout/_opengraph.html.heex
@@ -0,0 +1,38 @@
+
+
+
+<%= if opengraph?(@conn) do %>
+ <% image = @conn.assigns.image %>
+ <% filtered = not image.thumbnails_generated %>
+ <% description = "##{image.id} - #{Philomena.Images.tag_list(image)} - Derpibooru" %>
+ <% thumb_large = ImageView.thumb_urls(image, false)[:large] %>
+ <% thumb_rendered = ImageView.thumb_url(image, false, :rendered) %>
+
+
+
+
+ <%= for tag <- artist_tags(image.tags) do %>
+
+ <% end %>
+ <%= if image_has_sources(image) do %>
+
+ <% end %>
+
+
+ <%= cond do %>
+ <% image.image_mime_type == "video/webm" and not filtered -> %>
+
+
+
+ <% image.image_mime_type == "image/svg+xml" and not filtered -> %>
+
+
+ <% not filtered -> %>
+
+
+ <% true -> %>
+
+ <% end %>
+<% else %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/layout/_opengraph.html.slime b/lib/philomena_web/templates/layout/_opengraph.html.slime
deleted file mode 100644
index 45585171..00000000
--- a/lib/philomena_web/templates/layout/_opengraph.html.slime
+++ /dev/null
@@ -1,45 +0,0 @@
-meta name="generator" content="philomena"
-meta name="theme-color" content="#618fc3"
-meta name="format-detection" content="telephone=no"
-
-= if opengraph?(@conn) do
- - image = @conn.assigns.image
- - filtered = not image.thumbnails_generated
- - description = "##{image.id} - #{Philomena.Images.tag_list(image)} - Derpibooru"
- - thumb_large = ImageView.thumb_urls(image, false)[:large]
- - thumb_rendered = ImageView.thumb_url(image, false, :rendered)
-
- meta name="keywords" content=tag_list(image)
- meta name="description" content=description
- meta property="og:title" content=description
- meta property="og:url" content=url(~p"/images/#{image}")
-
- = for tag <- artist_tags(image.tags) do
- meta property="dc:creator" content=tag.name_in_namespace
-
- = if image_has_sources(image) do
- meta property="foaf:primaryTopic" content=image_first_source(image)
-
- link rel="alternate" type="application/json+oembed" href=url(~p"/api/v1/json/oembed?#{[url: ~p"/images/#{image}"]}") title="oEmbed JSON Profile"
-
- link rel="canonical" href=url(~p"/images/#{image}")
-
- = cond do
- - image.image_mime_type == "video/webm" and not filtered ->
- meta property="og:type" content="video.other"
- meta property="og:image" content=thumb_rendered
- meta property="og:video" content=thumb_large
-
- - image.image_mime_type == "image/svg+xml" and not filtered ->
- meta property="og:type" content="website"
- meta property="og:image" content=thumb_rendered
-
- - not filtered ->
- meta property="og:type" content="website"
- meta property="og:image" content=thumb_large
-
- - true ->
- meta property="og:type" content="website"
-
-- else
- meta name="description" content="Derpibooru is a linear imagebooru which lets you share, find and discover new art and media surrounding the show My Little Pony: Friendship is Magic"
diff --git a/lib/philomena_web/templates/layout/app.html.heex b/lib/philomena_web/templates/layout/app.html.heex
new file mode 100644
index 00000000..24e681cb
--- /dev/null
+++ b/lib/philomena_web/templates/layout/app.html.heex
@@ -0,0 +1,47 @@
+
+
+
+
+ <%= viewport_meta_tag(@conn) %>
+
+ <%= if assigns[:title] do %>
+ <%= assigns[:title] %>
+ - Derpibooru
+ <% else %>
+ Derpibooru
+ <% end %>
+
+
+ <%= if is_nil(@current_user) do %>
+
+ <% end %>
+
+
+
+
+
+ <%= csrf_meta_tag() %>
+ <%= vite_hmr? do %>
+
+
+ <% else %>
+
+ <% end %>
+ <%= render(PhilomenaWeb.LayoutView, "_opengraph.html", assigns) %>
+
+
+ <%= render(PhilomenaWeb.LayoutView, "_burger.html", assigns) %>
+
+ <%= cond do %>
+ <% Enum.any?(@notifications) -> %>
+ <%= for notification <- @notifications do %>
+ <%= render(PhilomenaWeb.NotificationView, "_notification.html", notification: notification, conn: @conn) %>
+ <% end %>
+ <% true -> %>
+
+ To get notifications on new comments and forum posts, click the
+ 'Subscribe' button in the bar at the top of an image or forum topic.
+ You'll get notifications here for any new posts or comments.
+
+ <% end %>
+
diff --git a/lib/philomena_web/templates/notification/index.html.slime b/lib/philomena_web/templates/notification/index.html.slime
deleted file mode 100644
index 9cec1086..00000000
--- a/lib/philomena_web/templates/notification/index.html.slime
+++ /dev/null
@@ -1,17 +0,0 @@
-- route = fn p -> ~p"/notifications?#{p}" end
-
-h1 Notification Area
-.walloftext
- .block__header
- = render PhilomenaWeb.PaginationView, "_pagination.html", page: @notifications, route: route, conn: @conn
-
- = cond do
- - Enum.any?(@notifications) ->
- = for notification <- @notifications do
- = render PhilomenaWeb.NotificationView, "_notification.html", notification: notification, conn: @conn
-
- - true ->
- p
- ' To get notifications on new comments and forum posts, click the
- ' 'Subscribe' button in the bar at the top of an image or forum topic.
- ' You'll get notifications here for any new posts or comments.
diff --git a/lib/philomena_web/templates/page/_form.html.heex b/lib/philomena_web/templates/page/_form.html.heex
new file mode 100644
index 00000000..321ffe9e
--- /dev/null
+++ b/lib/philomena_web/templates/page/_form.html.heex
@@ -0,0 +1,24 @@
+<%= form_for @changeset, @action, fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+ Revision history for
+ <%= link(@static_page.title, to: ~p"/pages/#{@static_page}") %>
+
+
+
+
+
+ User
+
+
+ Date
+
+
+ Body
+
+
+
+
+ <%= for version <- @versions do %>
+
+
+ <%= link(version.user.name, to: ~p"/profiles/#{version.user}") %>
+
+
+ <%= pretty_time(version.created_at) %>
+
+
+ <%= for diff <- version.difference do %>
+ <%= case diff do %>
+ <% {:eq, lines} -> %>
+ <%= for line <- lines do %>
+ <%= line %>
+ <%= "\n" %>
+ <% end %>
+ <% {:ins, lines} -> %>
+
+ <%= for line <- lines do %>
+ <%= line %>
+ <%= "\n" %>
+ <% end %>
+
+ <% {:del, lines} -> %>
+
+ <%= for line <- lines do %>
+ <%= line %>
+ <%= "\n" %>
+ <% end %>
+
+ <% end %>
+ <% end %>
+
+
+ <% end %>
+
+
diff --git a/lib/philomena_web/templates/page/history/index.html.slime b/lib/philomena_web/templates/page/history/index.html.slime
deleted file mode 100644
index 805492eb..00000000
--- a/lib/philomena_web/templates/page/history/index.html.slime
+++ /dev/null
@@ -1,35 +0,0 @@
-h1
- ' Revision history for
- = link @static_page.title, to: ~p"/pages/#{@static_page}"
-
-table.table
- thead
- tr
- th User
- th Date
- th Body
-
- tbody
- = for version <- @versions do
- tr
- td = link version.user.name, to: ~p"/profiles/#{version.user}"
- 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"
diff --git a/lib/philomena_web/templates/page/index.html.heex b/lib/philomena_web/templates/page/index.html.heex
new file mode 100644
index 00000000..2d18e174
--- /dev/null
+++ b/lib/philomena_web/templates/page/index.html.heex
@@ -0,0 +1,23 @@
+
+ Pages
+
+
+
+
+
+ Title
+
+
+
+
+ <%= for static_page <- @static_pages do %>
+
+
+ <%= link(static_page.title, to: ~p"/pages/#{static_page}") %>
+
+
+ <% end %>
+
+
+
+<%= link("New static page", to: ~p"/pages/new") %>
diff --git a/lib/philomena_web/templates/page/index.html.slime b/lib/philomena_web/templates/page/index.html.slime
deleted file mode 100644
index 5e535faa..00000000
--- a/lib/philomena_web/templates/page/index.html.slime
+++ /dev/null
@@ -1,14 +0,0 @@
-h1 Pages
-
-table.table
- thead
- tr
- th Title
-
- tbody
- = for static_page <- @static_pages do
- tr
- td = link static_page.title, to: ~p"/pages/#{static_page}"
-
-br
-= link "New static page", to: ~p"/pages/new"
diff --git a/lib/philomena_web/templates/page/new.html.heex b/lib/philomena_web/templates/page/new.html.heex
new file mode 100644
index 00000000..bf481f24
--- /dev/null
+++ b/lib/philomena_web/templates/page/new.html.heex
@@ -0,0 +1,4 @@
+
+ Last updated
+ <%= pretty_time(@static_page.updated_at) %>
+
+
+ <%= link to: ~p"/pages/#{@static_page}/history" do %>
+
+ Revision history
+ <% end %>
+ <%= if can?(@conn, :edit, Philomena.StaticPages.StaticPage) do %>
+ <%= link to: ~p"/pages/#{@static_page}/edit" do %>
+
+ Edit
+ <% end %>
+ <% end %>
+
+<%= @rendered %>
diff --git a/lib/philomena_web/templates/page/show.html.slime b/lib/philomena_web/templates/page/show.html.slime
deleted file mode 100644
index f5bc82cc..00000000
--- a/lib/philomena_web/templates/page/show.html.slime
+++ /dev/null
@@ -1,15 +0,0 @@
-h1 = @static_page.title
-p
- ' Last updated
- => pretty_time(@static_page.updated_at)
-
-p
- => link to: ~p"/pages/#{@static_page}/history" do
- i.fa.fa-history>
- ' Revision history
- = if can?(@conn, :edit, Philomena.StaticPages.StaticPage) do
- =< link to: ~p"/pages/#{@static_page}/edit" do
- i.fa.fa-edit>
- ' Edit
-
-= @rendered
diff --git a/lib/philomena_web/templates/pagination/_pagination.html.heex b/lib/philomena_web/templates/pagination/_pagination.html.heex
new file mode 100644
index 00000000..a273a2b7
--- /dev/null
+++ b/lib/philomena_web/templates/pagination/_pagination.html.heex
@@ -0,0 +1,83 @@
+<% params = assigns[:params] || [] %>
+<%= if @page.total_pages > 1 do %>
+
+
+<% end %>
diff --git a/lib/philomena_web/templates/pagination/_pagination.html.slime b/lib/philomena_web/templates/pagination/_pagination.html.slime
deleted file mode 100644
index f2f26382..00000000
--- a/lib/philomena_web/templates/pagination/_pagination.html.slime
+++ /dev/null
@@ -1,64 +0,0 @@
-- params = assigns[:params] || []
-
-= if @page.total_pages > 1 do
- nav.pagination.hide-mobile-t
- = if not first_page?(@page) do
- = link("« First", to: first_page_path(@page, @route, params))
- = link("‹ Prev", to: prev_page_path(@page, @route, params), class: "js-prev")
-
- = if left_gap?(@page) do
- span.page.gap
- ' …
-
- = for number <- left_page_numbers(@page) do
- = link(number, to: page_path(@route, params, number))
-
- span.page-current = @page.page_number
-
- = for number <- right_page_numbers(@page) do
- = link(number, to: page_path(@route, params, number))
-
- = if right_gap?(@page) do
- span.page.gap
- ' …
-
- = if not last_page?(@page) do
- = link("Next ›", to: next_page_path(@page, @route, params), class: "js-next")
- = link("Last »", to: last_page_path(@page, @route, params))
-
- nav.pagination.hide-desktop-t
- = if first_page?(@page) do
- span « First
- span ‹ Prev
- - else
- = link("« First", to: first_page_path(@page, @route, params))
- = link("‹ Prev", to: prev_page_path(@page, @route, params), class: "js-prev")
-
- .dropdown
- a.page-current.pagination__dropdown
- => @page.page_number
- i.fa.fa-caret-down
-
- .dropdown__content
- = if left_gap?(@page) do
- span.page.gap.header__span
- ' …
-
- = for number <- left_page_numbers(@page) do
- = link(number, to: page_path(@route, params, number))
-
- span.page-current.header__span = @page.page_number
-
- = for number <- right_page_numbers(@page) do
- = link(number, to: page_path(@route, params, number))
-
- = if right_gap?(@page) do
- span.page.gap.header__span
- ' …
-
- = if last_page?(@page) do
- span Next ›
- span Last »
- - else
- = link("Next ›", to: next_page_path(@page, @route, params), class: "js-next")
- = link("Last »", to: last_page_path(@page, @route, params))
diff --git a/lib/philomena_web/templates/pagination/_pagination_info.html.heex b/lib/philomena_web/templates/pagination/_pagination_info.html.heex
new file mode 100644
index 00000000..b6e94122
--- /dev/null
+++ b/lib/philomena_web/templates/pagination/_pagination_info.html.heex
@@ -0,0 +1,16 @@
+<%= if @page.total_entries > 0 do %>
+ Showing
+ <%= pluralize("result", "results", @page.total_entries) %>
+
+ <%= max((@page.page_number - 1) * @page.page_size, 0) + 1 %>
+ -
+ <%= min(@page.page_number * @page.page_size, @page.total_entries) %>
+
+ of
+
+ <%= @page.total_entries %>
+
+ total
+<% else %>
+ No results found
+<% end %>
diff --git a/lib/philomena_web/templates/pagination/_pagination_info.html.slime b/lib/philomena_web/templates/pagination/_pagination_info.html.slime
deleted file mode 100644
index 2cde8fb9..00000000
--- a/lib/philomena_web/templates/pagination/_pagination_info.html.slime
+++ /dev/null
@@ -1,16 +0,0 @@
-= if @page.total_entries > 0 do
- ' Showing
- => pluralize("result", "results", @page.total_entries)
-
- strong
- => max(((@page.page_number - 1) * @page.page_size), 0) + 1
- ' -
- => min(@page.page_number * @page.page_size, @page.total_entries)
- ' of
-
- strong
- => @page.total_entries
- ' total
-
-- else
- ' No results found
diff --git a/lib/philomena_web/templates/password/edit.html.heex b/lib/philomena_web/templates/password/edit.html.heex
new file mode 100644
index 00000000..bef57316
--- /dev/null
+++ b/lib/philomena_web/templates/password/edit.html.heex
@@ -0,0 +1,23 @@
+
+ Reset password
+
+<%= form_for @changeset, ~p"/passwords/#{@token}", fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+ Oops, there was an error evaluating your query:
+
+
+ <%= assigns[:error] %>
+
+ <% true -> %>
+
+ No posts found!
+
+<% end %>
+
+ Default search
+
+
+ If you do not specify a field to search over, the search engine will
+ search for posts with a body that is similar to the query's
+
+ word stems
+
+ . For example, posts containing the words
+
+ winged humanization
+
+ ,
+
+ wings
+
+ , and
+
+ spread wings
+
+ would all be found by a search for
+
+ wing
+
+ , but
+
+ sewing
+
+ would not be.
+
+
+ Allowed fields
+
+
+
+
+
+ Field Selector
+
+
+ Type
+
+
+ Description
+
+
+ Example
+
+
+
+
+
+
+
+ author
+
+
+
+ Literal
+
+
+ Matches the author of this post. Anonymous authors will never match this term.
+
+
+
+ <%= link("author:Joey", to: ~p"/posts?#{[pq: "author:Joey"]}") %>
+
+
+
+
+
+
+ body
+
+
+
+ Full Text
+
+
+ Matches the body of this post. This is the default field.
+
+
+
+ <%= link("body:test", to: ~p"/posts?#{[pq: "body:test"]}") %>
+
+
+
+
+
+
+ created_at
+
+
+
+ Date/Time Range
+
+
+ Matches the creation time of this post.
+
+
+
+ <%= link("created_at:2015", to: ~p"/posts?#{[pq: "created_at:2015"]}") %>
+
+
+
+
+
+
+ id
+
+
+
+ Numeric Range
+
+
+ Matches the numeric surrogate key for this post.
+
+
+
+ <%= link("id:1000000", to: ~p"/posts?#{[pq: "id:1000000"]}") %>
+
+
+
+
+
+
+ my
+
+
+
+ Meta
+
+
+
+ my:posts
+
+ matches posts you have posted if you are signed in.
+
+
+
+ <%= link("my:posts", to: ~p"/posts?#{[pq: "my:posts"]}") %>
+
+
+ Matches posts with the specified user_id. Anonymous users will never match this term.
+
+
+
+ <%= link("user_id:211190", to: ~p"/posts?#{[pq: "user_id:211190"]}") %>
+
+
+
+
+
+
+ forum
+
+
+
+ Literal
+
+
+ Matches the short name for the forum this post belongs to.
+
+
+
+ <%= link("forum:meta", to: ~p"/posts?#{[pq: "forum:meta"]}") %>
+
+
+
+
+
diff --git a/lib/philomena_web/templates/post/index.html.slime b/lib/philomena_web/templates/post/index.html.slime
deleted file mode 100644
index 6313a9dc..00000000
--- a/lib/philomena_web/templates/post/index.html.slime
+++ /dev/null
@@ -1,154 +0,0 @@
-h1 Posts
-
-= form_for :posts, ~p"/posts", [method: "get", class: "hform", enforce_utf8: false], fn f ->
- .field
- = text_input f, :pq, name: :pq, value: @conn.params["pq"], class: "input hform__text", placeholder: "Search posts", autocapitalize: "none"
- = submit "Search", class: "hform__button button"
-
- .fieldlabel
- ' For more information, see the
- a href="/pages/search_syntax" search syntax documentation
- ' . Search results are sorted by creation date.
-
-h2 Search Results
-
-= cond do
- - Enum.any?(@posts) ->
- - route = fn p -> ~p"/posts?#{p}" end
- - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @posts, route: route, params: [pq: @conn.params["pq"]], conn: @conn
-
- = for {body, post} <- @posts, post.topic.hidden_from_users == false do
- div
- h3
- =<> link post.topic.forum.name, to: ~p"/forums/#{post.topic.forum}"
- | »
- =<> link post.topic.title, to: ~p"/forums/#{post.topic.forum}/topics/#{post.topic}"
- | »
- - post_link = ~p"/forums/#{post.topic.forum}/topics/#{post.topic}?#{[post_id: post.id]}" <> "#post_#{post.id}"
- = if post.topic_position == 0 do
- =<> link "Topic Opener", to: post_link
- - else
- =<> link "Post #{post.topic_position}", to: post_link
- = render PhilomenaWeb.PostView, "_post.html", body: body, post: post, conn: @conn
-
- .block
- .block__header.block__header--light.page__header
- .page__pagination = pagination
- .page__info
- span.block__header__title
- = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @posts, conn: @conn
-
- - assigns[:error] ->
- p
- ' Oops, there was an error evaluating your query:
- pre = assigns[:error]
-
- - true ->
- p
- ' No posts found!
-
-h3 Default search
-p
- ' If you do not specify a field to search over, the search engine will
- ' search for posts with a body that is similar to the query's
- em word stems
- ' . For example, posts containing the words
- code winged humanization
- ' ,
- code wings
- ' , and
- code> spread wings
- ' would all be found by a search for
- code wing
- ' , but
- code> sewing
- ' would not be.
-
-h3 Allowed fields
-table.table
- thead
- tr
- th Field Selector
- th Type
- th Description
- th Example
- tbody
- tr
- td
- code author
- td Literal
- td Matches the author of this post. Anonymous authors will never match this term.
- td
- code = link "author:Joey", to: ~p"/posts?#{[pq: "author:Joey"]}"
- tr
- td
- code body
- td Full Text
- td Matches the body of this post. This is the default field.
- td
- code = link "body:test", to: ~p"/posts?#{[pq: "body:test"]}"
- tr
- td
- code created_at
- td Date/Time Range
- td Matches the creation time of this post.
- td
- code = link "created_at:2015", to: ~p"/posts?#{[pq: "created_at:2015"]}"
- tr
- td
- code id
- td Numeric Range
- td Matches the numeric surrogate key for this post.
- td
- code = link "id:1000000", to: ~p"/posts?#{[pq: "id:1000000"]}"
- tr
- td
- code my
- td Meta
- td
- code> my:posts
- ' matches posts you have posted if you are signed in.
- td
- code = link "my:posts", to: ~p"/posts?#{[pq: "my:posts"]}"
- tr
- td
- code subject
- td Full Text
- td Matches the title of the topic.
- td
- code = link "subject:time wasting thread", to: ~p"/posts?#{[pq: "subject:time wasting thread"]}"
- tr
- td
- code topic_id
- td Literal
- td Matches the numeric surrogate key for the topic this post belongs to.
- td
- code = link "topic_id:7000", to: ~p"/posts?#{[pq: "topic_id:7000"]}"
- tr
- td
- code topic_position
- td Numeric Range
- td Matches the offset from the beginning of the topic of this post. Positions begin at 0.
- td
- code = link "topic_position:0", to: ~p"/posts?#{[pq: "topic_position:0"]}"
- tr
- td
- code updated_at
- td Date/Time Range
- td Matches the creation or last edit time of this post.
- td
- code = link "updated_at.gte:2 weeks ago", to: ~p"/posts?#{[pq: "updated_at.gte:2 weeks ago"]}"
- tr
- td
- code user_id
- td Literal
- td Matches posts with the specified user_id. Anonymous users will never match this term.
- td
- code = link "user_id:211190", to: ~p"/posts?#{[pq: "user_id:211190"]}"
- tr
- td
- code forum
- td Literal
- td Matches the short name for the forum this post belongs to.
- td
- code = link "forum:meta", to: ~p"/posts?#{[pq: "forum:meta"]}"
diff --git a/lib/philomena_web/templates/post/preview/create.html.heex b/lib/philomena_web/templates/post/preview/create.html.heex
new file mode 100644
index 00000000..7520d906
--- /dev/null
+++ b/lib/philomena_web/templates/post/preview/create.html.heex
@@ -0,0 +1,13 @@
+
+ <%= link to: ~p"/profiles/#{@user}/details" do %>
+
+
+ View Details
+
+ <% end %>
+
+
+ <%= link to: ~p"/search?#{[q: "upvoted_by_id:#{@user.id}"]}" do %>
+
+
+ Upvotes
+
+ <% end %>
+
+
+ <%= link to: ~p"/search?#{[q: "downvoted_by_id:#{@user.id}"]}" do %>
+
+
+ Downvotes
+
+ <% end %>
+
+
+ <%= link to: ~p"/search?#{[q: "hidden_by_id:#{@user.id}"]}" do %>
+
+
+ Hidden Images
+
+ <% end %>
+
+
+ <%= link to: ~p"/admin/reports?#{[rq: "user_id:#{@user.id}"]}" do %>
+
+
+ Reports
+
+ <% end %>
+
+
+ <%= link to: ~p"/profiles/#{@user}/ip_history" do %>
+
+
+ IP History
+
+ <% end %>
+
+
+ <%= link to: ~p"/profiles/#{@user}/fp_history" do %>
+
+
+ FP History
+
+ <% end %>
+
+
+ <%= link to: ~p"/profiles/#{@user}/aliases" do %>
+
+
+ Potential Aliases
+
+ <% end %>
+
+ <%= if can?(@conn, :index, %Philomena.Donations.Donation{}) do %>
+
+ <%= link to: ~p"/admin/donations/user/#{@user}" do %>
+
+
+ Donations
+
+ <% end %>
+
+ <% end %>
+
+
+ <%= if can?(@conn, :edit, @user) do %>
+
+ <%= link to: ~p"/admin/users/#{@user}/edit" do %>
+
+
+ Edit User
+
+ <% end %>
+
+
+ <%= link to: ~p"/admin/users/#{@user}/force_filter/new" do %>
+
+
+ Force Filter
+
+ <% end %>
+
+ <%= if @forced do %>
+
+ <%= link to: ~p"/admin/users/#{@user}/force_filter", data: [confirm: "Are you really, really sure?", method: "delete"] do %>
+
+
+ Remove Force Filter
+
+ <% end %>
+
+ <% end %>
+ <%= if @user.deleted_at do %>
+
+ <%= link to: ~p"/admin/users/#{@user}/activation", data: [confirm: "Are you really, really sure?", method: "post"] do %>
+
+
+ Reactivate Account
+
+ <% end %>
+
+ <% else %>
+
+ <%= link to: ~p"/admin/users/#{@user}/activation", data: [confirm: "Are you really, really sure?", method: "delete"] do %>
+
+
+ Deactivate Account
+
+ <% end %>
+
+ <% end %>
+ <%= if @user.locked_at do %>
+
+ <%= link to: ~p"/admin/users/#{@user}/unlock", data: [method: "post"] do %>
+
+
+ Unlock Account
+
+ <% end %>
+
+ <% end %>
+
+ <%= link to: ~p"/admin/users/#{@user}/wipe", data: [confirm: "This is irreversible, destroying all identifying information including email. Are you sure?", method: "post"] do %>
+
+
+ Wipe PII
+
+ <% end %>
+
+ <% end %>
+ <%= if can?(@conn, :edit, %Philomena.ArtistLinks.ArtistLink{}) do %>
+
+ <%= link to: ~p"/profiles/#{@user}/artist_links/new" do %>
+
+
+ Add Artist Link
+
+ <% end %>
+
+ <% end %>
+ <%= if can?(@conn, :create, Philomena.Bans.User) do %>
+
+ <%= link to: ~p"/admin/user_bans/new?#{[username: @user.name]}" do %>
+
+
+ Ban this sucker
+
+ <% end %>
+
+ <% end %>
+
+
+ <%= if can?(@conn, :index, Philomena.Users.User) do %>
+
+ <%= link to: ~p"/admin/users/#{@user}/api_key", data: [confirm: "Are you really, really sure?", method: "delete"] do %>
+
+
+ Reset API key
+
+ <% end %>
+
+
+ <%= if @user.verified do %>
+ <%= link to: ~p"/admin/users/#{@user}/verification", data: [confirm: "Are you really, really sure?", method: "delete"] do %>
+
+
+ Revoke Verification
+
+ <% end %>
+ <% else %>
+ <%= link to: ~p"/admin/users/#{@user}/verification", data: [confirm: "Are you really, really sure?", method: "create"] do %>
+
+
+ Grant Verification
+
+ <% end %>
+ <% end %>
+
+ <% end %>
+
+
+ <%= if can?(@conn, :index, Philomena.Users.User) do %>
+
+ <%= link to: ~p"/admin/users/#{@user}/votes", data: [confirm: "Are you really, really sure?", method: "delete"] do %>
+
+
+ Remove All Votes/Faves
+
+ <% end %>
+
+
+ <%= link to: ~p"/admin/users/#{@user}/downvotes", data: [confirm: "Are you really, really sure?", method: "delete"] do %>
+
+
+ Remove All Downvotes
+
+ <% end %>
+
+ <% end %>
+ <%= if @user.role == "user" and can?(@conn, :revert, Philomena.TagChanges.TagChange) do %>
+
+ <%= link to: ~p"/tag_changes/full_revert?#{[user_id: @user.id]}", data: [confirm: "Are you really, really sure?", method: "create"] do %>
+
+
+ Revert All Tag Changes
+
+ <% end %>
+
+ <% end %>
+
+
diff --git a/lib/philomena_web/templates/profile/_admin_block.html.slime b/lib/philomena_web/templates/profile/_admin_block.html.slime
deleted file mode 100644
index ca2462ab..00000000
--- a/lib/philomena_web/templates/profile/_admin_block.html.slime
+++ /dev/null
@@ -1,178 +0,0 @@
-.block--fixed
- i.fa.fa-fw.fa-calendar>
- ' Account created
- = @user.created_at
-
- br
- i.fa.fa-fw.fa-filter>
- ' Current Filter:
- = if @filter do
- = link @filter.name, to: ~p"/filters/#{@filter}"
- - else
- em
- ' (none)
-
- br
- i.far.fa-fw.fa-clock>
- ' Last seen
- = if @last_ip do
- => pretty_time(@last_ip.updated_at)
- ' from
- => link_to_ip(@conn, @last_ip.ip)
-
- = if @last_fp do
- => link_to_fingerprint(@conn, @last_fp.fingerprint)
- - else
- em
- ' (never)
-
- br
- i.fas.fa-fw.fa-key>
- ' Two factor auth:
- strong = enabled_text(@user.otp_required_for_login)
-
- br
-
- = if @user.locked_at do
- i.fas.fa-fw.fa-lock>
- strong.comment_deleted>
- ' Account locked,
- => @user.failed_attempts
- ' failed login attempts
- - else
- i.fas.fa-fw.fa-unlock>
- ' Not currently locked
-
-br
-
-a.label.label--primary.label--block href="#" data-click-toggle=".js-admin__options__toggle" title="Toggle Controls"
- i.fa.fa-fw.fa-bars
- span Toggle Controls
-
-.profile-top__options.js-admin__options__toggle.hidden
- ul.profile-admin__options__column
- li
- = link to: ~p"/profiles/#{@user}/details" do
- i.fa.fa-fw.fa-eye
- span.admin__button View Details
- li
- = link to: ~p"/search?#{[q: "upvoted_by_id:#{@user.id}"]}" do
- i.fa.fa-fw.fa-arrow-up
- span.admin__button Upvotes
- li
- = link to: ~p"/search?#{[q: "downvoted_by_id:#{@user.id}"]}" do
- i.fa.fa-fw.fa-arrow-down
- span.admin__button Downvotes
- li
- = link to: ~p"/search?#{[q: "hidden_by_id:#{@user.id}"]}" do
- i.fa.fa-fw.fa-eye-slash
- span.admin__button Hidden Images
- li
- = link to: ~p"/admin/reports?#{[rq: "user_id:#{@user.id}"]}" do
- i.fa.fa-fw.fa-exclamation
- span.admin__button Reports
- li
- = link to: ~p"/profiles/#{@user}/ip_history" do
- i.fab.fa-fw.fa-internet-explorer
- span.admin__button IP History
- li
- = link to: ~p"/profiles/#{@user}/fp_history" do
- i.fa.fa-fw.fa-desktop
- span.admin__button FP History
- li
- = link to: ~p"/profiles/#{@user}/aliases" do
- i.fa.fa-fw.fa-users
- span.admin__button Potential Aliases
-
- = if can?(@conn, :index, %Philomena.Donations.Donation{}) do
- li
- = link to: ~p"/admin/donations/user/#{@user}" do
- i.fas.fa-fw.fa-dollar-sign
- span.admin__button Donations
-
- ul.profile-admin__options__column
- = if can?(@conn, :edit, @user) do
- li
- = link to: ~p"/admin/users/#{@user}/edit" do
- i.fas.fa-fw.fa-edit
- span.admin__button Edit User
-
- li
- = link to: ~p"/admin/users/#{@user}/force_filter/new" do
- i.fas.faw-fw.fa-filter
- span.admin__button Force Filter
-
- = if @forced do
- li
- = link to: ~p"/admin/users/#{@user}/force_filter", data: [confirm: "Are you really, really sure?", method: "delete"] do
- i.fas.fa-fw.fa-filter
- span.admin__button Remove Force Filter
-
- = if @user.deleted_at do
- li
- = link to: ~p"/admin/users/#{@user}/activation", data: [confirm: "Are you really, really sure?", method: "post"] do
- i.fa.fa-fw.fa-check
- span.admin__button Reactivate Account
- - else
- li
- = link to: ~p"/admin/users/#{@user}/activation", data: [confirm: "Are you really, really sure?", method: "delete"] do
- i.fa.fa-fw.fa-times
- span.admin__button Deactivate Account
-
- = if @user.locked_at do
- li
- = link to: ~p"/admin/users/#{@user}/unlock", data: [method: "post"] do
- i.fas.fa-fw.fa-unlock
- span.admin__button Unlock Account
-
- li
- = link to: ~p"/admin/users/#{@user}/wipe", data: [confirm: "This is irreversible, destroying all identifying information including email. Are you sure?", method: "post"] do
- i.fas.fa-fw.fa-eraser
- span.admin__button Wipe PII
-
- = if can?(@conn, :edit, %Philomena.ArtistLinks.ArtistLink{}) do
- li
- = link to: ~p"/profiles/#{@user}/artist_links/new" do
- i.fa.fa-fw.fa-link
- span.admin__button Add Artist Link
-
- = if can?(@conn, :create, Philomena.Bans.User) do
- li
- = link to: ~p"/admin/user_bans/new?#{[username: @user.name]}" do
- i.fa.fa-fw.fa-ban
- span.admin__button Ban this sucker
-
- ul.profile-admin__options__column
- = if can?(@conn, :index, Philomena.Users.User) do
- li
- = link to: ~p"/admin/users/#{@user}/api_key", data: [confirm: "Are you really, really sure?", method: "delete"] do
- i.fas.fa-fw.fa-key
- span.admin__button Reset API key
-
- li
- = if @user.verified do
- = link to: ~p"/admin/users/#{@user}/verification", data: [confirm: "Are you really, really sure?", method: "delete"] do
- i.fas.fa-fw.fa-user-times
- span.admin__button Revoke Verification
- - else
- = link to: ~p"/admin/users/#{@user}/verification", data: [confirm: "Are you really, really sure?", method: "create"] do
- i.fas.fa-fw.fa-user-check
- span.admin__button Grant Verification
-
- ul.profile-admin__options__column
- = if can?(@conn, :index, Philomena.Users.User) do
- li
- = link to: ~p"/admin/users/#{@user}/votes", data: [confirm: "Are you really, really sure?", method: "delete"] do
- i.far.fa-fw.fa-file-excel
- span.admin__button Remove All Votes/Faves
-
- li
- = link to: ~p"/admin/users/#{@user}/downvotes", data: [confirm: "Are you really, really sure?", method: "delete"] do
- i.fa.fa-fw.fa-arrow-down
- span.admin__button Remove All Downvotes
-
- = if @user.role == "user" and can?(@conn, :revert, Philomena.TagChanges.TagChange) do
- li
- = link to: ~p"/tag_changes/full_revert?#{[user_id: @user.id]}", data: [confirm: "Are you really, really sure?", method: "create"] do
- i.fa.fa-fw.fa-tag
- span.admin__button Revert All Tag Changes
diff --git a/lib/philomena_web/templates/profile/_awards.html.heex b/lib/philomena_web/templates/profile/_awards.html.heex
new file mode 100644
index 00000000..228d036f
--- /dev/null
+++ b/lib/philomena_web/templates/profile/_awards.html.heex
@@ -0,0 +1,25 @@
+
+ <% awards = award_order(@awards) %>
+ <% {awards, overflow} = Enum.split(awards, 10) %>
+ <%= for award <- awards do %>
+ <% title = [award_title(award), award.label] |> Enum.join(" - ") %>
+
+ Remember that aliases, especially fingerprints, aren't infallible by a
+
+ long
+
+ margin. Use this data only in supplement to other evidence when considering bans.
+
+
+ Review details carefully as only site staff can edit later.
+
+
+
+
+ For quick results, put the LINKVALIDATION code on your linked webpage after submission.
+
+ We'll message you there otherwise.
+
+
+ <%= submit("Submit", class: "button") %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/profile/artist_link/_form.html.slime b/lib/philomena_web/templates/profile/artist_link/_form.html.slime
deleted file mode 100644
index cfe75981..00000000
--- a/lib/philomena_web/templates/profile/artist_link/_form.html.slime
+++ /dev/null
@@ -1,38 +0,0 @@
-= form_for @changeset, @action, fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- .field
- .field
- p
- label for="tag_name"
- ' Artist Link validation is intended for artists. Validating your link will give you control over your content on the site, allowing you to create a
- a> href="/commissions" commissions
- ' listing and request takedowns or DNPs. Do not request a link if the source contains no artwork which you have created.
- = text_input f, :tag_name, value: assigns[:tag_name], class: "input", autocomplete: "off", placeholder: "artist:your-name", data: [ac: "true", ac_min_length: "3", ac_source: "/autocomplete/tags?term="]
- = error_tag f, :tag
-
- .field
- label for="uri"
- ' URL of your art webpage (may be your Derpibooru profile page if you have no other sources)
- = url_input f, :uri, class: "input input--wide", placeholder: "https://www.deviantart.com/your-name", required: true
- = error_tag f, :uri
-
- elixir:
- options = [
- {"Visible to everyone", true},
- {"Visible only to site staff", false}
- ]
-
- .field
- => select f, :public, options, class: "input", autocomplete: "off"
-
- h4 Instructions
- p
- strong Review details carefully as only site staff can edit later.
- p
- strong> For quick results, put the LINKVALIDATION code on your linked webpage after submission.
- | We'll message you there otherwise.
- .actions
- = submit "Submit", class: "button"
diff --git a/lib/philomena_web/templates/profile/artist_link/edit.html.heex b/lib/philomena_web/templates/profile/artist_link/edit.html.heex
new file mode 100644
index 00000000..9d744142
--- /dev/null
+++ b/lib/philomena_web/templates/profile/artist_link/edit.html.heex
@@ -0,0 +1,4 @@
+
+ Artist links associate your account on Derpibooru with tags about content you create and with accounts on sites elsewhere. This allows users to easily identify artists and staff to act more rapidly on takedown requests.
+
+
+
+
+
+ URI
+
+
+ Options
+
+
+ Verification Code
+
+
+ Verified?
+
+
+ Public
+
+
+
+
+ <%= for link <- @artist_links do %>
+
+
+ <%= link(link.uri, to: link.uri) %>
+
+
+ <%= link("View Details", to: ~p"/profiles/#{@user}/artist_links/#{link}") %>
+
+
+ <%= link.verification_code %>
+
+
+ <%= verified_as_string(link) %>
+
+
+ <%= public_as_string(link) %>
+
+
+ <% end %>
+
+
diff --git a/lib/philomena_web/templates/profile/artist_link/index.html.slime b/lib/philomena_web/templates/profile/artist_link/index.html.slime
deleted file mode 100644
index 7cb3be11..00000000
--- a/lib/philomena_web/templates/profile/artist_link/index.html.slime
+++ /dev/null
@@ -1,23 +0,0 @@
-h1 Artist Links
-p
- a.button href=~p"/profiles/#{@user}/artist_links/new"
- ' Request a link
-p
- ' Artist links associate your account on Derpibooru with tags about content you create and with accounts on sites elsewhere. This allows users to easily identify artists and staff to act more rapidly on takedown requests.
-
-table.table
- thead
- tr
- th URI
- th Options
- th Verification Code
- th Verified?
- th Public
- tbody
- = for link <- @artist_links do
- tr
- td = link link.uri, to: link.uri
- td = link "View Details", to: ~p"/profiles/#{@user}/artist_links/#{link}"
- td = link.verification_code
- th = verified_as_string(link)
- th = public_as_string(link)
diff --git a/lib/philomena_web/templates/profile/artist_link/new.html.heex b/lib/philomena_web/templates/profile/artist_link/new.html.heex
new file mode 100644
index 00000000..60722820
--- /dev/null
+++ b/lib/philomena_web/templates/profile/artist_link/new.html.heex
@@ -0,0 +1,4 @@
+
+ Link to
+ <%= link(@artist_link.uri, to: @artist_link.uri) %>
+
+
+ Status
+
+<%= cond do %>
+ <% verified?(@artist_link) -> %>
+
+ This link has been verified by a member of the administration team.
+
+
+ You can now remove the verification text from your website if you have not done so already.
+
+ <% contacted?(@artist_link) -> %>
+
+
+ This link is awaiting your reply on the linked website in order to be verified.
+
+
+
+ An administrator
+ <%= "(#{@artist_link.contacted_by_user.name})" %>
+ has manually contacted you at the address above, as your verification code was not found on the website. Please respond to the message from the administrator to confirm your link.
+
+
+ The verification code is:
+
+
+
+ <%= @artist_link.verification_code %>
+
+
+ <% link_verified?(@artist_link) -> %>
+
+
+ This link is pending verification by a member of the administration team.
+
+
+
+ We've now found the verification code on your website. An administrator still needs to check the tag list before verifying the link. Please leave the code on your website until verification is complete.
+
+
+ If you need it again, your verification code is:
+
+
+
+ <%= @artist_link.verification_code %>
+
+
+ <% unverified?(@artist_link) -> %>
+
+
+ This link is pending verification by a member of the administration team.
+
+
+
+ To have your link verified as fast as possible, please place this text somewhere on the page you are linking.
+
+
+ <%= @artist_link.verification_code %>
+
+
+
+
+ Otherwise, an administrator will have to contact you to verify your identity.
+
+
+ Once the link has been verified you can remove the text; the text simply allows the team to directly check with your website rather than messaging you and waiting for a reply.
+
+ <% rejected?(@artist_link) -> %>
+
+ This link has been rejected by a member of the administration team; this is probably because you were not reachable in a timely manner (~1 week) to verify the link.
+
+<% end %>
+
+ Visibility
+
+<%= if public?(@artist_link) do %>
+
+ This link is public, and will be shown around the site.
+
+<% else %>
+
+ This link is not public, and will only be shown to administrators.
+
+<% end %>
+<%= if can?(@conn, :index, Philomena.ArtistLinks.ArtistLink) do %>
+
+ <%= link("Edit", to: ~p"/profiles/#{@user}/artist_links/#{@artist_link}/edit") %>
+ •
+ <%= link("Verify", to: ~p"/admin/artist_links/#{@artist_link}/verification", method: :post) %>
+ •
+ <%= link("Reject", to: ~p"/admin/artist_links/#{@artist_link}/reject", method: :post) %>
+ <%= if not verified?(@artist_link) do %>
+ •
+ <%= if contacted?(@artist_link) do %>
+ Artist contacted
+ <% else %>
+ <%= link("Artist contacted", to: ~p"/admin/artist_links/#{@artist_link}/contact", method: :post) %>
+ <% end %>
+ <% end %>
+
+<% end %>
+<%= link("Back", to: ~p"/profiles/#{@user}/artist_links") %>
diff --git a/lib/philomena_web/templates/profile/artist_link/show.html.slime b/lib/philomena_web/templates/profile/artist_link/show.html.slime
deleted file mode 100644
index 73aedd3f..00000000
--- a/lib/philomena_web/templates/profile/artist_link/show.html.slime
+++ /dev/null
@@ -1,69 +0,0 @@
-h1
- ' Link to
- = link @artist_link.uri, to: @artist_link.uri
-
-h3 Status
-= cond do
- - verified?(@artist_link) ->
- p This link has been verified by a member of the administration team.
- p You can now remove the verification text from your website if you have not done so already.
-
- - contacted?(@artist_link) ->
- p
- strong This link is awaiting your reply on the linked website in order to be verified.
- p
- ' An administrator
- => "(#{@artist_link.contacted_by_user.name})"
- ' has manually contacted you at the address above, as your verification code was not found on the website. Please respond to the message from the administrator to confirm your link.
- p The verification code is:
- p
- h1 = @artist_link.verification_code
-
- - link_verified?(@artist_link) ->
- p
- strong This link is pending verification by a member of the administration team.
- p We've now found the verification code on your website. An administrator still needs to check the tag list before verifying the link. Please leave the code on your website until verification is complete.
- p If you need it again, your verification code is:
- p
- h1 = @artist_link.verification_code
-
- - unverified?(@artist_link) ->
- p
- strong This link is pending verification by a member of the administration team.
- .dnp-warning
- h3 To have your link verified as fast as possible, please place this text somewhere on the page you are linking.
- h1 = @artist_link.verification_code
- p Otherwise, an administrator will have to contact you to verify your identity.
- p Once the link has been verified you can remove the text; the text simply allows the team to directly check with your website rather than messaging you and waiting for a reply.
-
- - rejected?(@artist_link) ->
- p This link has been rejected by a member of the administration team; this is probably because you were not reachable in a timely manner (~1 week) to verify the link.
-
-h3 Visibility
-= if public?(@artist_link) do
- p This link is public, and will be shown around the site.
-- else
- p This link is not public, and will only be shown to administrators.
-
-h3 Associated tag
-= if @artist_link.tag do
- .tag-list
- = render PhilomenaWeb.TagView, "_tag.html", tag: @artist_link.tag, conn: @conn
-- else
- p There is no tag associated with this link.
-
-= if can?(@conn, :index, Philomena.ArtistLinks.ArtistLink) do
- p
- => link "Edit", to: ~p"/profiles/#{@user}/artist_links/#{@artist_link}/edit"
- ' •
- => link "Verify", to: ~p"/admin/artist_links/#{@artist_link}/verification", method: :post
- ' •
- => link "Reject", to: ~p"/admin/artist_links/#{@artist_link}/reject", method: :post
- = if not verified?(@artist_link) do
- ' •
- = if contacted?(@artist_link) do
- ' Artist contacted
- - else
- = link "Artist contacted", to: ~p"/admin/artist_links/#{@artist_link}/contact", method: :post
-
-= link "Back", to: ~p"/profiles/#{@user}/artist_links"
diff --git a/lib/philomena_web/templates/profile/award/_form.html.heex b/lib/philomena_web/templates/profile/award/_form.html.heex
new file mode 100644
index 00000000..53939e5f
--- /dev/null
+++ b/lib/philomena_web/templates/profile/award/_form.html.heex
@@ -0,0 +1,33 @@
+<%= form_for @changeset, @action, fn f -> %>
+ <% badge_options = badge_options(@badges) %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+<%= render(PhilomenaWeb.Profile.AwardView, "_form.html", changeset: @changeset, badges: @badges, action: ~p"/profiles/#{@user}/awards", conn: @conn) %>
diff --git a/lib/philomena_web/templates/profile/award/new.html.slime b/lib/philomena_web/templates/profile/award/new.html.slime
deleted file mode 100644
index 525e06cf..00000000
--- a/lib/philomena_web/templates/profile/award/new.html.slime
+++ /dev/null
@@ -1,3 +0,0 @@
-h1 New award
-
-= render PhilomenaWeb.Profile.AwardView, "_form.html", changeset: @changeset, badges: @badges, action: ~p"/profiles/#{@user}/awards", conn: @conn
diff --git a/lib/philomena_web/templates/profile/commission/_form.html.heex b/lib/philomena_web/templates/profile/commission/_form.html.heex
new file mode 100644
index 00000000..b10af0a4
--- /dev/null
+++ b/lib/philomena_web/templates/profile/commission/_form.html.heex
@@ -0,0 +1,49 @@
+<%= form_for @changeset, @action, fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+
+ <%= label(f, :information, "General Information:") %>
+ <%= textarea(f, :information, class: "input input--wide input--text", placeholder: "A general overview about your commissions.", required: true) %>
+ <%= error_tag(f, :information) %>
+
+
+ <%= label(f, :contact, "Contact Information:") %>
+ <%= textarea(f, :contact, class: "input input--wide input--text", placeholder: "How you would like potential customers to contact you (PM, Discord, Email, etc). Remember that this information will be publicly visible.", required: true) %>
+ <%= error_tag(f, :contact) %>
+
+
+ <%= label(f, :will_create, "Content you are particularly interested in drawing or creating (optional):") %>
+ <%= textarea(f, :will_create, class: "input input--wide input--text", placeholder: "List specific content you are willing to accept commissions for.") %>
+ <%= error_tag(f, :will_create) %>
+
+
+ <%= label(f, :will_not_create, "Content you will not draw or create (optional):") %>
+ <%= textarea(f, :will_not_create, class: "input input--wide input--text", placeholder: "List specific content you are not willing to accept commissions for.") %>
+ <%= error_tag(f, :will_not_create) %>
+
+
+ <%= submit("Save", class: "button") %>
+<% end %>
diff --git a/lib/philomena_web/templates/profile/commission/_form.html.slime b/lib/philomena_web/templates/profile/commission/_form.html.slime
deleted file mode 100644
index ac2e286b..00000000
--- a/lib/philomena_web/templates/profile/commission/_form.html.slime
+++ /dev/null
@@ -1,38 +0,0 @@
-= form_for @changeset, @action, fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- .field
- => label f, :information, "General Information:"
- = textarea f, :information, class: "input input--wide input--text", placeholder: "A general overview about your commissions.", required: true
- = error_tag f, :information
-
- .field
- => label f, :contact, "Contact Information:"
- = textarea f, :contact, class: "input input--wide input--text", placeholder: "How you would like potential customers to contact you (PM, Discord, Email, etc). Remember that this information will be publicly visible.", required: true
- = error_tag f, :contact
- .field
- => label f, :will_create, "Content you are particularly interested in drawing or creating (optional):"
- = textarea f, :will_create, class: "input input--wide input--text", placeholder: "List specific content you are willing to accept commissions for."
- = error_tag f, :will_create
- .field
- => label f, :will_not_create, "Content you will not draw or create (optional):"
- = textarea f, :will_not_create, class: "input input--wide input--text", placeholder: "List specific content you are not willing to accept commissions for."
- = error_tag f, :will_not_create
- .field
- => label f, :categories, "Art Categories:"
- br
- = collection_checkboxes f, :categories, categories(), selected: f.data.categories, input_opts: [ class: 'checkbox spacing-right' ], wrapper: &Phoenix.HTML.Tag.content_tag(:span, &1, class: "commission__category")
- = error_tag f, :categories
- .field
- => label f, :sheet_image_id, "Image ID of your commissions sheet (optional but recommended):"
- br
- = number_input f, :sheet_image_id, class: "input", placeholder: "1227409"
- = error_tag f, :sheet_image_id
- .field
- = label f, :open, "Currently accepting commissions." do
- => checkbox f, :open, class: "checkbox"
- = error_tag f, :open
- br
- = submit "Save", class: "button"
diff --git a/lib/philomena_web/templates/profile/commission/_listing_items.html.heex b/lib/philomena_web/templates/profile/commission/_listing_items.html.heex
new file mode 100644
index 00000000..8e31613e
--- /dev/null
+++ b/lib/philomena_web/templates/profile/commission/_listing_items.html.heex
@@ -0,0 +1,87 @@
+
+
+
+ Available Items and Prices
+
+ <%= if current?(@user, @conn.assigns.current_user) do %>
+ <%= link("Add an item", to: ~p"/profiles/#{@user}/commission/items/new") %>
+ <% end %>
+
+
+ <%= if not Enum.any?(@commission.items) do %>
+ <%= if current?(@user, @conn.assigns.current_user) do %>
+
+ You have not added any items to your commissions sheet yet.
+
+
+ Your listing will not appear in search results until you
+ <%= link("list at least one item", to: ~p"/profiles/#{@user}/commission/items/new") %>
+ .
+
+ <% else %>
+
+ This artist has not added any items yet. Please check back later.
+
+ <% end %>
+ <% end %>
+
+
+
+
+ Example
+
+
+ Description
+
+
+ Base Price
+
+
+ Add-Ons
+
+ <%= if can?(@conn, :edit, @commission) do %>
+
+ Options
+
+ <% end %>
+
+
+
+ <%= for {description, add_ons, item} <- @items do %>
+
+
+ <%= if item.example_image do %>
+ <%= render(PhilomenaWeb.ImageView, "_image_container.html", image: item.example_image, size: :thumb_small, conn: @conn) %>
+ <% else %>
+ (No example)
+ <% end %>
+
+ <%= link("Edit item", to: ~p"/profiles/#{@user}/commission/items/#{item}/edit") %>
+
+
+ <%= link("Delete item", to: ~p"/profiles/#{@user}/commission/items/#{item}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
+
+ <% end %>
+
+ <% end %>
+
+
+
+
diff --git a/lib/philomena_web/templates/profile/commission/_listing_items.html.slime b/lib/philomena_web/templates/profile/commission/_listing_items.html.slime
deleted file mode 100644
index 49ead871..00000000
--- a/lib/philomena_web/templates/profile/commission/_listing_items.html.slime
+++ /dev/null
@@ -1,58 +0,0 @@
-.block
- .block__header
- span.block__header__title Available Items and Prices
-
- = if current?(@user, @conn.assigns.current_user) do
- = link "Add an item", to: ~p"/profiles/#{@user}/commission/items/new"
-
- .block__content
-
- = if not Enum.any?(@commission.items) do
- = if current?(@user, @conn.assigns.current_user) do
- p You have not added any items to your commissions sheet yet.
- p
- ' Your listing will not appear in search results until you
- = link "list at least one item", to: ~p"/profiles/#{@user}/commission/items/new"
- ' .
- - else
- p This artist has not added any items yet. Please check back later.
-
- table.table
- thead
- tr
- th Example
- th Description
- th Base Price
- th Add-Ons
- = if can?(@conn, :edit, @commission) do
- th Options
- tbody
- = for {description, add_ons, item} <- @items do
- tr
- td
- = if item.example_image do
- = render PhilomenaWeb.ImageView, "_image_container.html", image: item.example_image, size: :thumb_small, conn: @conn
- - else
- | (No example)
-
- td
- strong
- = item.item_type
-
- br
- br
-
- = description
- td
- | $
- = Decimal.round(item.base_price, 2)
-
- td
- = add_ons
-
- = if can?(@conn, :edit, @commission) do
- td
- = link "Edit item", to: ~p"/profiles/#{@user}/commission/items/#{item}/edit"
- br
- br
- = link "Delete item", to: ~p"/profiles/#{@user}/commission/items/#{item}", data: [confirm: "Are you really, really sure?", method: "delete"]
diff --git a/lib/philomena_web/templates/profile/commission/_listing_sheet.html.heex b/lib/philomena_web/templates/profile/commission/_listing_sheet.html.heex
new file mode 100644
index 00000000..e2974265
--- /dev/null
+++ b/lib/philomena_web/templates/profile/commission/_listing_sheet.html.heex
@@ -0,0 +1,12 @@
+<%= if @commission.sheet_image do %>
+
+ <%= if can?(@conn, :edit, @commission) do %>
+ <%= link("Edit this listing", to: ~p"/profiles/#{@user}/commission/edit") %>
+
+ <%= link("Delete this listing", to: ~p"/profiles/#{@user}/commission", data: [confirm: "Are you really, really sure about that?", method: "delete"]) %>
+
+ <% end %>
+ <%= link("Report this listing", to: ~p"/profiles/#{@user}/commission/reports/new") %>
+
+ <%= submit("Change password", class: "button") %>
+<% end %>
diff --git a/lib/philomena_web/templates/registration/edit.html.slime b/lib/philomena_web/templates/registration/edit.html.slime
deleted file mode 100644
index a0134b6e..00000000
--- a/lib/philomena_web/templates/registration/edit.html.slime
+++ /dev/null
@@ -1,71 +0,0 @@
-h1 Account Settings
-
-p
- ' Looking for your content settings?
- a<> href="/settings/edit" Click here!
-
-p
- ' Looking for two factor authentication?
- = link "Click here!", to: ~p"/registrations/totp/edit"
-
-p
- ' Looking to change your avatar?
- = link "Click here!", to: ~p"/avatar/edit"
-
-= if can?(@conn, :change_username, @current_user) do
- p
- ' Looking to change your username?
- = link "Click here!", to: ~p"/registrations/name/edit"
-
-h3 API Key
-p
- ' Your API key is
- #api-key-button>
- code>
- = link("Click to show", to: "#", data: [click_show: "#api-key", click_hide: "#api-key-button"])
- #api-key.hidden>
- code>
- = @current_user.authentication_token
- p You can use this to allow API consumers to access your account.
-p
- ' Avoid sharing this key with others, as it could be used to compromise
- ' your account.
-
-h3 Change email
-
-= form_for @email_changeset, ~p"/registrations/email", [method: :post], fn f ->
- = if @email_changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- .field
- = email_input f, :email, class: "input", placeholder: "Email", required: true, pattern: ~S/[^\s]+@[^\s]+\.[^\s]+/
- = error_tag f, :email
-
- .field
- = password_input f, :current_password, class: "input", required: true, name: "current_password", placeholder: "Current password"
- = error_tag f, :current_password
-
- div
- = submit "Change email", class: "button"
-
-h3 Change password
-
-= form_for @password_changeset, ~p"/registrations/password", fn f ->
- = if @password_changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- .field
- = password_input f, :password, class: "input", placeholder: "New password", minlength: 12
- = error_tag f, :password
-
- .field
- = password_input f, :password_confirmation, class: "input", placeholder: "Confirm new password", minlength: 12
- = error_tag f, :password_confirmation
-
- .field
- = password_input f, :current_password, name: "current_password", class: "input", placeholder: "Current password"
- = error_tag f, :current_password
-
- = submit "Change password", class: "button"
diff --git a/lib/philomena_web/templates/registration/name/edit.html.heex b/lib/philomena_web/templates/registration/name/edit.html.heex
new file mode 100644
index 00000000..0c772be7
--- /dev/null
+++ b/lib/philomena_web/templates/registration/name/edit.html.heex
@@ -0,0 +1,25 @@
+
+ Editing Name
+
+<%= form_for @changeset, ~p"/registrations/name", [as: :user], fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+
+ Enter your new name here. Usernames may only be changed once every 90 days. Please be aware that once you change your name, your previous name will be available for reuse, and someone else may claim it.
+
+ <%= link("Back", to: ~p"/registrations/edit") %>
+
diff --git a/lib/philomena_web/templates/registration/name/edit.html.slime b/lib/philomena_web/templates/registration/name/edit.html.slime
deleted file mode 100644
index 1f9bce28..00000000
--- a/lib/philomena_web/templates/registration/name/edit.html.slime
+++ /dev/null
@@ -1,17 +0,0 @@
-h1 Editing Name
-
-= form_for @changeset, ~p"/registrations/name", [as: :user], fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- p Enter your new name here. Usernames may only be changed once every 90 days. Please be aware that once you change your name, your previous name will be available for reuse, and someone else may claim it.
-
- .field
- = text_input f, :name, class: "input", placeholder: "Name", required: true
- = error_tag f, :name
-
- .action
- = submit "Save", class: "button"
-
-p = link "Back", to: ~p"/registrations/edit"
diff --git a/lib/philomena_web/templates/registration/new.html.heex b/lib/philomena_web/templates/registration/new.html.heex
new file mode 100644
index 00000000..01522f20
--- /dev/null
+++ b/lib/philomena_web/templates/registration/new.html.heex
@@ -0,0 +1,59 @@
+
+ Register
+
+<%= form_for @changeset, ~p"/registrations", fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+
+ Non-anonymous posts permanently show your username as of posting time,
+ and may appear on search engines; choose wisely.
+
+ We won't share your personal information, won't send you spam emails,
+ and take your security and privacy seriously.
+
+
+
+ Don't forget to read the
+
+ site rules
+
+ before you dive in - they contain a quick introduction on how to
+ use the site.
+
+
+
+
+ <%= submit("Sign Up", class: "button") %>
+<% end %>
diff --git a/lib/philomena_web/templates/registration/new.html.slime b/lib/philomena_web/templates/registration/new.html.slime
deleted file mode 100644
index 82d8b8d5..00000000
--- a/lib/philomena_web/templates/registration/new.html.slime
+++ /dev/null
@@ -1,48 +0,0 @@
-h1 Register
-
-= form_for @changeset, ~p"/registrations", fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- .fieldlabel
- ' Non-anonymous posts permanently show your username as of posting time,
- ' and may appear on search engines; choose wisely.
- .field
- = text_input f, :name, class: "input", placeholder: "Username", required: true
- = error_tag f, :name
-
- .fieldlabel
- ' You'll use your email address to log in, and we'll use this to get in
- ' touch if we need to. Don't worry, we won't share this or spam you.
- .field
- = email_input f, :email, class: "input", placeholder: "Email", required: true, pattern: ~S/[^\s]+@[^\s]+\.[^\s]+/
- = error_tag f, :email
-
- .fieldlabel
- ' Pick a good strong password - longer is better! Minimum of 12 characters.
- .field
- = password_input f, :password, class: "input", placeholder: "Password", required: true, minlength: 12
- = error_tag f, :password
- .field
- = password_input f, :password_confirmation, class: "input", placeholder: "Confirm password", required: true, minlength: 12
- = error_tag f, :password_confirmation
-
- = render PhilomenaWeb.CaptchaView, "_captcha.html", name: "registration", conn: @conn
-
- br
-
- .block.block--fixed.block--warning
- p
- ' We won't share your personal information, won't send you spam emails,
- ' and take your security and privacy seriously.
- p
- strong
- ' Don't forget to read the
- a<> href="/pages/rules" site rules
- ' before you dive in - they contain a quick introduction on how to
- ' use the site.
-
- br
-
- = submit "Sign Up", class: "button"
diff --git a/lib/philomena_web/templates/registration/totp/edit.html.heex b/lib/philomena_web/templates/registration/totp/edit.html.heex
new file mode 100644
index 00000000..a63c9978
--- /dev/null
+++ b/lib/philomena_web/templates/registration/totp/edit.html.heex
@@ -0,0 +1,197 @@
+
+ Two Factor Authentication
+
+<%= form_for @changeset, ~p"/registrations/totp", [as: :user], fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+ <%= if @current_user.otp_required_for_login do %>
+ <%= if !@changeset.action and get_flash(@conn, :totp_backup_codes) do %>
+
+
+ Important - Save The Below Codes
+
+
+ The backup codes shown in the green box below are necessary to
+ regain access to your account in the event of you losing access
+ to your authenticator app (such as loss, theft, or damage to your
+ phone). It is extremely important that you write them down and
+ store them in a safe, secure place. If you lose access to you
+ authenticator app and do not have one or more of the above codes,
+ we will be unable to help you regain access to your account.
+
+
+
+
+
+ Two Factor Authentication Enabled
+
+
+ You've successfully enabled two factor authentication on your
+ account. From now on you'll be asked for the 6 digit code each
+ time you log in.
+
+
+ In case you lose your device or uninstall the application, you
+ will need one of the following backup codes to access to your
+ account:
+
+
+ <%= for code <- get_flash(@conn, :totp_backup_codes) do %>
+
+ <%= code %>
+
+ <% end %>
+
+
+
+ Make sure to write these down (preferably on paper) and store them
+ in a safe location, otherwise you may
+
+ permanently lose access
+
+ to your account.
+
+
+ <% end %>
+
+ Two factor authentication is currently
+
+ enabled
+
+ for your account.
+
+
+ Enter the generated 6-digit code or one of your backup codes to disable.
+
+
+ Note that the 6-digit codes are limited to a single use within their
+ lifespan of 30 seconds, so if you just logged in with a code, entering
+ it again here will cause an error. If that's the case, just wait for a
+ new code to be generated.
+
+ Two factor authentication is currently
+
+ disabled
+
+ for your account.
+
+
+
+
+ Enabling 2FA will make it harder for an attacker to get into your account, but it may also make it harder for
+
+ you
+
+ to get into your account. Make sure you'll have access to your authenticator if you enable it.
+
+
+
+ Download application
+
+
+ You will need an application on your phone that'll generate TOTP codes for you, such as:
+
+ Note that the 6-digit codes are limited to a single use within their lifespan of 30 seconds, so if you use a code to enable the feature here, you won't be able to immediately use the same code to log in or to disable the feature. You have to wait for a new code to be generated.
+
+
+
+ Warning - Authenticator Backup Codes
+
+
+ Once you enable 2FA on your account, you will be provided with a list of backup codes that can be used to access your account in the event of you losing access to your authenticator app. You will only be provided with these codes once, so please ensure that you have a way to safely and securely record them before enabling 2FA on your account. If you lose access to your authenticator app and do not have your backup codes, you will be locked out of your account permanently, and we will be unable to assist you.
+
+ <%= link("Back", to: ~p"/registrations/edit") %>
+
diff --git a/lib/philomena_web/templates/registration/totp/edit.html.slime b/lib/philomena_web/templates/registration/totp/edit.html.slime
deleted file mode 100644
index 8fd3028b..00000000
--- a/lib/philomena_web/templates/registration/totp/edit.html.slime
+++ /dev/null
@@ -1,136 +0,0 @@
-h1 Two Factor Authentication
-
-= form_for @changeset, ~p"/registrations/totp", [as: :user], fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- = if @current_user.otp_required_for_login do
- = if !@changeset.action and get_flash(@conn, :totp_backup_codes) do
- .dnp-warning
- h4 Important - Save The Below Codes
- p
- ' The backup codes shown in the green box below are necessary to
- ' regain access to your account in the event of you losing access
- ' to your authenticator app (such as loss, theft, or damage to your
- ' phone). It is extremely important that you write them down and
- ' store them in a safe, secure place. If you lose access to you
- ' authenticator app and do not have one or more of the above codes,
- ' we will be unable to help you regain access to your account.
- br
- .block.block--fixed.block--success.layout--narrow
- h2 Two Factor Authentication Enabled
- p
- ' You've successfully enabled two factor authentication on your
- ' account. From now on you'll be asked for the 6 digit code each
- ' time you log in.
- p
- ' In case you lose your device or uninstall the application, you
- ' will need one of the following backup codes to access to your
- ' account:
- ul
- = for code <- get_flash(@conn, :totp_backup_codes) do
- li = code
- br
- p
- ' Make sure to write these down (preferably on paper) and store them
- ' in a safe location, otherwise you may
- strong<> permanently lose access
- ' to your account.
-
- p
- ' Two factor authentication is currently
- strong> enabled
- ' for your account.
-
- h4 Enter the generated 6-digit code or one of your backup codes to disable.
- p
- ' Note that the 6-digit codes are limited to a single use within their
- ' lifespan of 30 seconds, so if you just logged in with a code, entering
- ' it again here will cause an error. If that's the case, just wait for a
- ' new code to be generated.
-
- .field
- = text_input f, :twofactor_token, class: "input", placeholder: "6-digit code"
- = error_tag f, :twofactor_token
-
- - else
- p
- ' Two factor authentication is currently
- strong> disabled
- ' for your account.
-
- br
-
- .block.block--fixed.block--warning
- p
- | Enabling 2FA will make it harder for an attacker to get into your account, but it may also make it harder for
- strong<> you
- | to get into your account. Make sure you'll have access to your authenticator if you enable it.
- h4 Download application
- p
- | You will need an application on your phone that'll generate TOTP codes for you, such as:
- ul
- li
- | Authy (
- a href="https://play.google.com/store/apps/details?id=com.authy.authy" target="_blank" rel="noreferrer"
- | Android
- | /
- a href="https://itunes.apple.com/us/app/authy/id494168017" target="_blank" rel="noreferrer"
- | iOS
- | )
- li
- | LastPass Authenticator (
- a href="https://play.google.com/store/apps/details?id=com.lastpass.authenticator" target="_blank" rel="noreferrer"
- | Android
- | /
- a href="https://itunes.apple.com/us/app/lastpass-authenticator/id1079110004" target="_blank" rel="noreferrer"
- | iOS
- | /
- a href="https://www.microsoft.com/en-us/store/apps/lastpass-authenticator/9nblggh5l9d7" target="_blank" rel="noreferrer"
- | Windows Mobile
- | )
- li
- | Microsoft Authenticator (
- a href="https://play.google.com/store/apps/details?id=com.azure.authenticator" target="_blank" rel="noreferrer"
- | Android
- | /
- a href="https://itunes.apple.com/us/app/microsoft-authenticator/id983156458" target="_blank" rel="noreferrer"
- | iOS
- | /
- a href="https://www.microsoft.com/en-us/store/p/microsoft-authenticator/9nblgggzmcj6" target="_blank" rel="noreferrer"
- | Windows Mobile
- | )
-
- h4 Pair application
- p
- ' Using the application of your choice, scan the QR code below or enter the following secret key:
- strong
- = @totp_secret
- p
- svg xmlns="http://www.w3.org/2000/svg" width="392" height="392"
- rect fill="#fff" width="392" height="392"
- image xlink:href=@totp_qrcode alt="QR Code" x="32" y="32"
-
- h4 Confirm pairing
- p Enter the code generated by your authenticator app into the field below for verification.
- = text_input f, :twofactor_token, class: "input", placeholder: "6-digit code", autocomplete: "off"
- p Note that the 6-digit codes are limited to a single use within their lifespan of 30 seconds, so if you use a code to enable the feature here, you won't be able to immediately use the same code to log in or to disable the feature. You have to wait for a new code to be generated.
- .dnp-warning
- h4 Warning - Authenticator Backup Codes
- p Once you enable 2FA on your account, you will be provided with a list of backup codes that can be used to access your account in the event of you losing access to your authenticator app. You will only be provided with these codes once, so please ensure that you have a way to safely and securely record them before enabling 2FA on your account. If you lose access to your authenticator app and do not have your backup codes, you will be locked out of your account permanently, and we will be unable to assist you.
-
- br
-
- .block.block--fixed.block--warning
- .field
- = password_input f, :current_password, class: "input", placeholder: "Current password"
- = error_tag f, :current_password
- .fieldlabel
- ' We need your current password to confirm these changes
-
- br
-
- = submit "Save Account", class: "button"
-
-p = link "Back", to: ~p"/registrations/edit"
diff --git a/lib/philomena_web/templates/report/index.html.heex b/lib/philomena_web/templates/report/index.html.heex
new file mode 100644
index 00000000..50cd2142
--- /dev/null
+++ b/lib/philomena_web/templates/report/index.html.heex
@@ -0,0 +1,50 @@
+
+ Make sure to report for the correct
+ <%= link("rule", to: "/pages/rules") %>
+ .
+
+
+ One report per problem. If it involves multiple things (images, comments, etc), list all of their IDs in the description of a single report.
+
+
+
+ Do not report someone just because they disagree with you. Abusing the report system is a bannable offense.
+
+
+
+
+ You may only open up to
+
+ 3 reports
+
+ at a time. Please be mindful of what you report.
+
+
+
+ <%= if image?(@changeset) do %>
+
+
+ Takedown Policy
+
+
+
+ Only an owner of an image's rights (normally the artist) can request a takedown.
+
+ If you're the artist, you'll
+
+ need
+
+ a verified artist link.
+
+
+ For more information, please read the
+ <%= link("takedown policy", to: "/pages/takedowns") %>
+ .
+
+
+
+ <% end %>
+ <%= if conversation?(@changeset) do %>
+
+
+ Privacy note
+
+
+ The whole conversation will be readable by site staff.
+
+
+
+ <% end %>
+ <%= form_for @changeset, @action, fn f -> %>
+
diff --git a/lib/philomena_web/templates/report/new.html.slime b/lib/philomena_web/templates/report/new.html.slime
deleted file mode 100644
index f7839783..00000000
--- a/lib/philomena_web/templates/report/new.html.slime
+++ /dev/null
@@ -1,52 +0,0 @@
-h2 Submit a report
-p
- strong
- = link_to_reported_thing(@reportable)
-
-.image-other
- .dnp-warning
- h3 Reporting Tips
- ul
- li
- ' Make sure to report for the correct
- = link "rule", to: "/pages/rules"
- ' .
- li One report per problem. If it involves multiple things (images, comments, etc), list all of their IDs in the description of a single report.
- li
- strong Do not report someone just because they disagree with you. Abusing the report system is a bannable offense.
- p
- ' You may only open up to
- strong> 3 reports
- ' at a time. Please be mindful of what you report.
- br
-
- = if image?(@changeset) do
- .dnp-warning
- h3 Takedown Policy
- p
- strong> Only an owner of an image's rights (normally the artist) can request a takedown.
- ' If you're the artist, you'll
- strong> need
- ' a verified artist link.
- p
- ' For more information, please read the
- = link "takedown policy", to: "/pages/takedowns"
- ' .
- br
-
- = if conversation?(@changeset) do
- .dnp-warning
- h3 Privacy note
- p
- ' The whole conversation will be readable by site staff.
- br
-
- = form_for @changeset, @action, fn f ->
- .field
- = select f, :category, report_categories(), class: "input"
- .block
- = render PhilomenaWeb.MarkdownView, "_input.html", conn: @conn, f: f, placeholder: "Provide anything else we should know here.", name: :reason, required: false
-
- = render PhilomenaWeb.CaptchaView, "_captcha.html", name: "report", conn: @conn
-
- = submit "Send Report", class: "button"
diff --git a/lib/philomena_web/templates/search/_form.html.heex b/lib/philomena_web/templates/search/_form.html.heex
new file mode 100644
index 00000000..edccf4ac
--- /dev/null
+++ b/lib/philomena_web/templates/search/_form.html.heex
@@ -0,0 +1,273 @@
+
+
+ is a Boolean-valued field. It only accepts the values
+
+ true
+
+ and
+
+ false
+
+ .
+
+
+
+ Example:
+
+ to find images which are not animated, you would use
+
+ animated:false
+
+ .
+
+
+
+ is a numerical range field. Four qualifiers,
+
+ gte
+
+ (greater than or equal),
+
+ lte
+
+ (less than or equal),
+
+ gt
+
+ (greater than), and
+
+ lt
+
+ (less than), can be applied to the desired value.
+
+
+
+ Example:
+
+ to find images with a score greater than 100, you would use
+
+ score.gt:100
+
+ .
+
+
+
+ is a date/time field. It accepts a
+
+ tweaked subset of the ISO 8601 standard
+
+ , as well as relative dates
+
+ (X minutes/hours/days/months/years ago)
+
+ . Four qualifiers,
+
+ gte
+
+ (greater than or equal),
+
+ lte
+
+ (less than or equal),
+
+ gt
+
+ (greater than), and
+
+ lt
+
+ (less than), can be applied to the desired value.
+
+
+
+ Example:
+
+ to find images created before 2013, you would use
+
+ created_at.lt:2013
+
+ .
+
+
+
+ is a literal field. You can apply apply a wildcard
+
+ *
+
+ as a substitute for zero or more characters.
+
+
+
+ Example:
+
+ to find images from DeviantArt, you would use
+
+ source_url:*deviantart.com*
+
+ .
+
+
+
+
+
+ <%= PhilomenaWeb.TagView.quick_tags(@conn) %>
+
+
+
+ <%= submit("Search", class: "button button--state-primary") %>
+ <% # = submit_tag "I'm Feeling Poni", class: 'button button--separate-left spacing-right', name: 'random_image' %>
+ <%
+ random_is_selected = to_string(@conn.params["sf"]) =~ ~r/\Arandom(:\d+)?\z/
+
+ random_seed =
+ if random_is_selected do
+ @conn.params["sf"]
+ else
+ "random:#{:rand.uniform(4_294_967_296)}"
+ end
+
+ sort_fields = [
+ "Sort by initial post date": :first_seen_at,
+ "Sort by image ID": :id,
+ "Sort by last modification date": :updated_at,
+ "Sort by aspect ratio": :aspect_ratio,
+ "Sort by fave count": :faves,
+ "Sort by upvotes": :upvotes,
+ "Sort by downvotes": :downvotes,
+ "Sort by score": :score,
+ "Sort by Wilson score": :wilson_score,
+ "Sort by relevance": :_score,
+ "Sort by width": :width,
+ "Sort by height": :height,
+ "Sort by comments": :comment_count,
+ "Sort by tag count": :tag_count,
+ "Sort by pixels": :pixels,
+ "Sort by file size": :size,
+ "Sort by duration": :duration,
+ Random!: random_seed
+ ]
+
+ sort_directions = [Descending: :desc, Ascending: :asc]
+ sort_hidden = ["Exclude Deleted": "", "Include Deleted/Merged": "1", "Deleted Only": "deleted", "Deleted/Merged Only": "only"]
+ %>
+ <%= select(f, :sf, sort_fields, class: "input input--separate-left", name: "sf", autocomplete: "off", selected: @conn.params["sf"]) %>
+ <%= select(f, :sd, sort_directions, class: "input input--separate-left", name: "sd", autocomplete: "off", selected: @conn.params["sd"]) %>
+ <%= if present?(@conn.params["hidden"]) do %>
+ <%= hidden_input(f, :hidden, name: "hidden", value: @conn.params["hidden"]) %>
+ <% end %>
+ <%= if hides_images?(@conn) do %>
+ <%= select(f, :del, sort_hidden, class: "input input--separate-left", name: "del", autocomplete: "off", selected: @conn.params["del"]) %>
+ <% end %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/search/_form.html.slime b/lib/philomena_web/templates/search/_form.html.slime
deleted file mode 100644
index efc065af..00000000
--- a/lib/philomena_web/templates/search/_form.html.slime
+++ /dev/null
@@ -1,176 +0,0 @@
-h1 Search
-
-= form_for :search, ~p"/search", [id: "searchform", method: "get", class: "js-search-form", enforce_utf8: false], fn f ->
- = text_input f, :q, class: "input input--wide js-search-field", placeholder: "Search terms are chained with commas", autocapitalize: "none", name: "q", value: @conn.params["q"]
-
- .block
- .block__header.flex
- a data-search-prepend="-" NOT
- .dropdown.block__header__dropdown-tab
- a
- ' Search terms
- span data-click-preventdefault="true"
- i.fa.fa-caret-down<
- .dropdown__content
- a data-search-add="score.gte:100" data-search-select-last="3" data-search-show-help="numeric" Score
- a data-search-add="created_at.lte:3 years ago" data-search-select-last="11" data-search-show-help="date" Created at
- a data-search-add="id.lte:10" data-search-select-last="2" data-search-show-help="numeric" Numeric ID
- a data-search-add="faves.gte:100" data-search-select-last="3" data-search-show-help="numeric" Number of faves
- a data-search-add="upvotes.gte:100" data-search-select-last="3" data-search-show-help="numeric" Number of upvotes
- a data-search-add="downvotes.gte:100" data-search-select-last="3" data-search-show-help="numeric" Number of downvotes
- a data-search-add="comment_count.gt:20" data-search-select-last="2" data-search-show-help="numeric" Number of comments
- a data-search-add="uploader:k_a" data-search-select-last="3" data-search-show-help="literal" Uploader
- a data-search-add="original_format:gif" data-search-select-last="3" data-search-show-help="literal" File extension
- a data-search-add="file_name:tumblr_*" data-search-select-last="8" data-search-show-help="literal" Original file name
- a data-search-add="mime_type:image/jpeg" data-search-select-last="10" data-search-show-help="literal" MIME type
- a data-search-add="source_url:*deviantart.com*" data-search-select-last="16" data-search-show-help="literal" Image source URL
- a data-search-add="width:1920" data-search-select-last="4" data-search-show-help="numeric" Image width
- a data-search-add="height:1080" data-search-select-last="4" data-search-show-help="numeric" Image height
- a data-search-add="aspect_ratio:1" data-search-select-last="1" data-search-show-help="numeric" Aspect ratio
- a data-search-add="animated:false" data-search-select-last="5" data-search-show-help="boolean" Animated
- a data-search-add="duration:10" data-search-select-last="2" data-search-show-help="numeric" Duration (seconds)
- a data-search-add="pixels.gte:5000000" data-search-select-last="7" data-search-show-help="numeric" Pixels
- a data-search-add="size.lt:1048576" data-search-select-last="7" data-search-show-help="numeric" File size (bytes)
-
- = if @conn.assigns.current_user do
- .dropdown.block__header__dropdown-tab
- a
- ' Belonging to…
- span data-click-preventdefault="true"
- i.fa.fa-caret-down<
- .dropdown__content
- a data-search-add="my:faves" data-search-show-help=" " My favorites
- a data-search-add="my:upvotes" data-search-show-help=" " My upvotes
- a data-search-add="my:uploads" data-search-show-help=" " My uploads
- a data-search-add="my:watched" data-search-show-help=" " My watched tags
- .flex__right
- a href="#" data-click-toggle="#js-search-tags" Quick tags
- a href="/pages/search_syntax" Help
-
- .block__content
- .hidden.walloftext data-search-help="boolean"
- strong.js-search-help-subject>
- ' is a Boolean-valued field. It only accepts the values
- code> true
- ' and
- code false
- |.
- br
- br
- em<> Example:
- ' to find images which are not animated, you would use
- code animated:false
- | .
-
- .hidden.walloftext data-search-help="numeric"
- strong.js-search-help-subject>
- | is a numerical range field. Four qualifiers,
- code<> gte
- | (greater than or equal),
- code<> lte
- | (less than or equal),
- code<> gt
- | (greater than), and
- code<> lt
- | (less than), can be applied to the desired value.
- br
- br
- em<> Example:
- | to find images with a score greater than 100, you would use
- code<> score.gt:100
- | .
-
- .hidden.walloftext data-search-help="date"
- strong.js-search-help-subject>
- ' is a date/time field. It accepts a
- a href="/pages/search_syntax#date-range" tweaked subset of the ISO 8601 standard
- | , as well as relative dates
- code<
- | (X minutes/hours/days/months/years ago)
- | . Four qualifiers,
- code<> gte
- | (greater than or equal),
- code<> lte
- | (less than or equal),
- code<> gt
- | (greater than), and
- code<> lt
- | (less than), can be applied to the desired value.
- br
- br
- em<> Example:
- | to find images created before 2013, you would use
- code<> created_at.lt:2013
- | .
-
- .hidden.walloftext data-search-help="literal"
- strong.js-search-help-subject>
- ' is a literal field. You can apply apply a wildcard
- code<> *
- | as a substitute for zero or more characters.
- br
- br
- em<> Example:
- | to find images from DeviantArt, you would use
- code<> source_url:*deviantart.com*
- | .
-
- #js-search-tags.hidden
- .block.js-tagtable data-target=".js-search-field"
- = PhilomenaWeb.TagView.quick_tags(@conn)
-
- .field.field--inline.flex-wrap
- = submit "Search", class: "button button--state-primary"
- /= submit_tag "I'm Feeling Poni", class: 'button button--separate-left spacing-right', name: 'random_image'
-
- elixir:
- random_is_selected = to_string(@conn.params["sf"]) =~ ~r/\Arandom(:\d+)?\z/
-
- random_seed =
- if random_is_selected do
- @conn.params["sf"]
- else
- "random:#{:rand.uniform(4_294_967_296)}"
- end
-
- sort_fields = [
- "Sort by initial post date": :first_seen_at,
- "Sort by image ID": :id,
- "Sort by last modification date": :updated_at,
- "Sort by aspect ratio": :aspect_ratio,
- "Sort by fave count": :faves,
- "Sort by upvotes": :upvotes,
- "Sort by downvotes": :downvotes,
- "Sort by score": :score,
- "Sort by Wilson score": :wilson_score,
- "Sort by relevance": :_score,
- "Sort by width": :width,
- "Sort by height": :height,
- "Sort by comments": :comment_count,
- "Sort by tag count": :tag_count,
- "Sort by pixels": :pixels,
- "Sort by file size": :size,
- "Sort by duration": :duration,
- "Random!": random_seed
- ]
-
- sort_directions = [
- "Descending": :desc,
- "Ascending": :asc
- ]
-
- sort_hidden = [
- "Exclude Deleted": "",
- "Include Deleted/Merged": "1",
- "Deleted Only": "deleted",
- "Deleted/Merged Only": "only"
- ]
-
- = select f, :sf, sort_fields, class: "input input--separate-left", name: "sf", autocomplete: "off", selected: @conn.params["sf"]
- = select f, :sd, sort_directions, class: "input input--separate-left", name: "sd", autocomplete: "off", selected: @conn.params["sd"]
-
- = if present?(@conn.params["hidden"]) do
- = hidden_input f, :hidden, name: "hidden", value: @conn.params["hidden"]
-
- = if hides_images?(@conn) do
- = select f, :del, sort_hidden, class: "input input--separate-left", name: "del", autocomplete: "off", selected: @conn.params["del"]
diff --git a/lib/philomena_web/templates/search/index.html.heex b/lib/philomena_web/templates/search/index.html.heex
new file mode 100644
index 00000000..820d787a
--- /dev/null
+++ b/lib/philomena_web/templates/search/index.html.heex
@@ -0,0 +1,18 @@
+<%= cond do %>
+ <% Enum.any?(@images) or override_display(@tags) -> %>
+ <%= render(PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: @tags, images: @images, header: "Searching for #{@conn.params["q"]}", route: fn p -> ~p"/search?#{p}" end, scope: scope(@conn)) %>
+ <% assigns[:error] -> %>
+
+ Oops, there was an error parsing your query! Check for mistakes like mismatched parentheses. The error was:
+
+ Basic image similarity search. Finds uploaded images similar to the one
+ provided based on simple intensities and uses the median frame of
+ animations; very low contrast images (such as sketches) will produce
+ poor results and, regardless of contrast, results may include seemingly
+ random images that look very different.
+
+
+
+
+ Upload a file from your computer, or provide a link to the page containing the image and click Fetch.
+
+ <%= url_input(f, :url, name: "url", class: "input input--wide js-scraper", placeholder: "Link a deviantART page, a Tumblr post, or the image directly") %>
+
+
+ The following two areas are for search queries to control what other images show up in your watch list. Lines are ORed together. See
+ <%= link("the syntax guide", to: "/pages/search_syntax") %>
+ for how to write queries.
+
+
+ <%= label(f, :watched_images_query_str, "Watch list search string (images found by this search are added to your watched images list)") %>
+ <%= textarea(f, :watched_images_query_str, class: "input input--wide", autocapitalize: "none") %>
+ <%= error_tag(f, :watched_images_query_str) %>
+
+
+ <%= label(f, :watched_images_exclude_str, "Watch list filter string (any images found by this search are removed from your watched images list)") %>
+ <%= textarea(f, :watched_images_exclude_str, class: "input input--wide", autocapitalize: "none") %>
+ <%= error_tag(f, :watched_images_exclude_str) %>
+
+
+ <%= checkbox(f, :no_spoilered_in_watched, class: "checkbox") %>
+ <%= label(f, :no_spoilered_in_watched, "Hide images spoilered by filter in watchlist") %>
+
+
+ This setting takes effect when the previous is disabled. Always jump to the latest page (enabled) or show the first page if the oldest comments are shown at the top of the page.
+
+ Posting will always direct you to the latest page so that you can see your comment in context.
+
+
+
+ Show the newest messages first (enabled) or show the oldest messages at the top of a conversation. Enabling this makes it feel more like a top-posted email quote chain.
+
+
+
+ Subscribe on Reply means you'll be subscribed things (images or topics) automatically as soon as you post a comment or reply, keeping you in the conversation.
+
+
+
+ The fancy tag editor gives you autosuggestions and visual representations of the tags, but is sometimes not desired - for instance when dealing with batch uploads where you might want to copy-paste tags. You can choose which type of editor to use by default here.
+
+
+
+ Serve WebM/MP4 versions of GIF images when available. Good for lower-bandwidth connections, but the video versions may have missing start/end frames, and do not support transparency.
+
+
+
+ Hide most of the staff tools (e.g. IPs, anon names) making your site appear as if you weren't staff, this is useful when browsing in public.
+
+
+
+ <% end %>
+
+ <%= if !@conn.assigns.current_user do %>
+
+
+ Consider
+ <%= link("creating an account!", to: ~p"/registrations/new") %>
+
+ You will be able to customize the number of images and comments you get on a single page, as well as change the appearance of the site with custom themes.
+
+
+ <% end %>
+
+
+ <%= submit("Save My Settings", class: "button") %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/setting/edit.html.slime b/lib/philomena_web/templates/setting/edit.html.slime
deleted file mode 100644
index a2185cc0..00000000
--- a/lib/philomena_web/templates/setting/edit.html.slime
+++ /dev/null
@@ -1,193 +0,0 @@
-h1 Content Settings
-= form_for @changeset, ~p"/settings", [method: "put"], fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- #js-setting-table.block
- .block__header.block__header--js-tabbed
- = if @conn.assigns.current_user do
- = link "Watch List", to: "#", class: "selected", data: [click_tab: "watched"]
- = link "Display", to: "#", data: [click_tab: "display"]
- = link "Comments", to: "#", data: [click_tab: "comments"]
- = link "Notifications", to: "#", data: [click_tab: "notifications"]
- = link "Metadata", to: "#", data: [click_tab: "metadata"]
- = link "Local", to: "#", data: [click_tab: "local"]
- - else
- = link "Local", to: "#", class: "selected", data: [click_tab: "local"]
- = link "More settings", to: "#", data: [click_tab: "join-the-herd"]
-
- = if @conn.assigns.current_user do
- .block__tab data-tab="watched"
- h4 Tags
- .field
- = label f, :watched_tag_list, "Tags to watch"
- = render PhilomenaWeb.TagView, "_tag_editor.html", f: f, name: :watched_tag_list, type: :edit, conn: @conn
- = error_tag f, :watched_tag_list
-
- h4 Watchlist queries and filtering
- p
- ' The following two areas are for search queries to control what other images show up in your watch list. Lines are ORed together. See
- => link "the syntax guide", to: "/pages/search_syntax"
- ' for how to write queries.
-
- .field
- = label f, :watched_images_query_str, "Watch list search string (images found by this search are added to your watched images list)"
- = textarea f, :watched_images_query_str, class: "input input--wide", autocapitalize: "none"
- = error_tag f, :watched_images_query_str
- .field
- = label f, :watched_images_exclude_str, "Watch list filter string (any images found by this search are removed from your watched images list)"
- = textarea f, :watched_images_exclude_str, class: "input input--wide", autocapitalize: "none"
- = error_tag f, :watched_images_exclude_str
- .field
- => checkbox f, :no_spoilered_in_watched, class: "checkbox"
- => label f, :no_spoilered_in_watched, "Hide images spoilered by filter in watchlist"
-
- h4 Other
- p
- ' RSS feed link (for Newsblur, RSSOwl, Thunderbird, etc.):
- br
- #rss-feed-button>
- code>
- = link("Click to show", to: "#", data: [click_show: "#rss-link", click_hide: "#rss-feed-button"])
- #rss-link.hidden
- = url_input f, :subscribe_url, value: url(~p"/api/v1/rss/watched?#{[key: @conn.assigns.current_user.authentication_token]}"), class: "input input--wide"
- br
- ' Do not share this URL with anyone, it may allow an attacker to compromise your account.
-
- .block__tab.hidden.flex.flex--maybe-wrap data-tab="display"
- div
- .field
- => label f, :use_centered_layout
- => checkbox f, :use_centered_layout, class: "checkbox"
- .fieldlabel: i Align content to the center of the page - try this option out if you browse the site on a tablet or a fairly wide screen.
- .field
- => label f, :show_sidebar_and_watched_images
- => checkbox f, :show_sidebar_and_watched_images, class: "checkbox"
- .fieldlabel: i Show the sidebar and new watched images on the homepage (the default) or hide it.
- .field
- => label f, :hide_vote_counts
- => checkbox f, :hide_vote_counts, class: "checkbox"
- .fieldlabel: i Hide upvote and downvote counts on images, showing only the overall score
- .field
- => label f, :images_per_page
- => number_input f, :images_per_page, min: 1, max: 50, step: 1, class: "input"
- = error_tag f, :images_per_page
- .fieldlabel
- i
- ' This is the number of images per page that are displayed on image listings and searches, up to a maximum of 50.
- ' For 1080p monitors, try 24.
- .field
- => label f, :theme
- => select f, :theme, theme_options(), class: "input"
- = error_tag f, :theme
- .fieldlabel: i Preview themes by selecting one from the dropdown. Saving sets the currently selected theme.
- .field
- => label f, :scale_large_images
- => select f, :scale_large_images, scale_options(), class: "input"
- = error_tag f, :scale_large_images
-
- .block__tab.hidden.flex.flex--maybe-wrap data-tab="comments"
- div
- .field
- => label f, :comments_newest_first, "Newest comments first"
- => checkbox f, :comments_newest_first
- .fieldlabel: i Display the newest comments at the top of the page.
- .field
- => label f, :comments_always_jump_to_last, "Show latest comment page"
- => checkbox f, :comments_always_jump_to_last
- .fieldlabel
- i
- ' This setting takes effect when the previous is disabled. Always jump to the latest page (enabled) or show the first page if the oldest comments are shown at the top of the page.
- br
- ' Posting will always direct you to the latest page so that you can see your comment in context.
- .field
- => label f, :comments_per_page
- => number_input f, :comments_per_page, min: 1, max: 100, step: 1, class: "input"
- = error_tag f, :comments_per_page
- .fieldlabel: i This is the number of comments per page that are displayed on image pages.
- .field
- => label f, :messages_newest_first, "Newest messages first"
- => checkbox f, :messages_newest_first
- .fieldlabel: i Show the newest messages first (enabled) or show the oldest messages at the top of a conversation. Enabling this makes it feel more like a top-posted email quote chain.
-
- .block__tab.hidden.flex.flex--maybe-wrap data-tab="notifications"
- div
- .field
- => label f, :watch_on_reply, "Subscribe on Reply"
- => checkbox f, :watch_on_reply, class: "checkbox"
- .fieldlabel: i Subscribe on Reply means you'll be subscribed things (images or topics) automatically as soon as you post a comment or reply, keeping you in the conversation.
- .field
- => label f, :watch_on_upload, "Subscribe on Upload"
- => checkbox f, :watch_on_upload, class: "checkbox"
- .fieldlabel: i Subscribe on Upload means you'll be subscribed to images automatically as soon as you upload, to help you keep track of comments.
- .field
- => label f, :watch_on_new_topic, "Subscribe on New Threads"
- => checkbox f, :watch_on_new_topic, class: "checkbox"
- .fieldlabel: i Subscribe on New Threads means you'll be subscribed to threads automatically as soon as you post, to help you keep track of replies.
-
- .block__tab.hidden.flex.flex--maybe-wrap data-tab="metadata"
- div
- .field
- => label f, :fancy_tag_field_on_upload, "Fancy tags - uploads"
- => checkbox f, :fancy_tag_field_on_upload, class: "checkbox"
- .field
- => label f, :fancy_tag_field_on_edit, "Fancy tags - edits"
- => checkbox f, :fancy_tag_field_on_edit, class: "checkbox"
- .fieldlabel: i The fancy tag editor gives you autosuggestions and visual representations of the tags, but is sometimes not desired - for instance when dealing with batch uploads where you might want to copy-paste tags. You can choose which type of editor to use by default here.
- .field
- => label f, :anonymous_by_default
- => checkbox f, :anonymous_by_default, class: "checkbox"
- .fieldlabel: i Check this box to post images and comments as anonymous by default, even if logged in.
-
- .block__tab class=local_tab_class(@conn) data-tab="local"
- .block.block--fixed.block--warning Settings on this tab are saved in the current browser. They are independent of your login.
- .field
- => label f, :hidpi, "Serve HiDPI thumbnails"
- => checkbox f, :hidpi, checked: @conn.cookies["hidpi"] == "true"
- .fieldlabel: i Use high quality thumbnails on displays with a high pixel density. Requires more data than regular thumbnails.
- .field
- => label f, :serve_webm, "Serve WebM"
- => checkbox f, :serve_webm, checked: @conn.cookies["serve_webm"] == "true"
- .fieldlabel: i Serve WebM/MP4 versions of GIF images when available. Good for lower-bandwidth connections, but the video versions may have missing start/end frames, and do not support transparency.
- .field
- => label f, :webm, "Use video thumbnails"
- => checkbox f, :webm, checked: @conn.cookies["webm"] == "true"
- .fieldlabel: i Use video thumbnails for WebM videos. Does not apply to GIF images.
- .field
- => label f, :unmute_videos, "Enable video audio by default"
- => checkbox f, :unmute_videos, checked: @conn.cookies["unmute_videos"] == "true"
- .fieldlabel: i Automatically enable audio on video pages when they are loaded.
- .field
- => label f, :hide_uploader
- => checkbox f, :hide_uploader, checked: @conn.cookies["hide_uploader"] == "true"
- .fieldlabel: i Hide the uploader and date posted information on image pages.
- .field
- => label f, :unfilter_tag_suggestions
- => checkbox f, :unfilter_tag_suggestions, checked: @conn.cookies["unfilter_tag_suggestions"] == "true"
- .fieldlabel: i Don't attempt to filter tag suggestions using your current filter.
- .field
- => label f, :hide_score
- => checkbox f, :hide_score, checked: @conn.cookies["hide_score"] == "true"
- .fieldlabel: i Hide score information for images.
- .field
- => label f, :chan_nsfw, "Show NSFW channels"
- => checkbox f, :chan_nsfw, checked: @conn.cookies["chan_nsfw"] == "true"
- .fieldlabel: i Show streams marked as NSFW on the channels page.
- = if staff?(@conn.assigns.current_user) do
- .field
- => label f, :hide_staff_tools
- => checkbox f, :hide_staff_tools, checked: @conn.cookies["hide_staff_tools"] == "true"
- .fieldlabel: i Hide most of the staff tools (e.g. IPs, anon names) making your site appear as if you weren't staff, this is useful when browsing in public.
-
- = if !@conn.assigns.current_user do
- .block__tab.hidden data-tab="join-the-herd"
- p
- ' Consider
- => link "creating an account!", to: ~p"/registrations/new"
- br
- ' You will be able to customize the number of images and comments you get on a single page, as well as change the appearance of the site with custom themes.
-
- br
- = submit "Save My Settings", class: "button"
- br
diff --git a/lib/philomena_web/templates/source_change/index.html.heex b/lib/philomena_web/templates/source_change/index.html.heex
new file mode 100644
index 00000000..834c0926
--- /dev/null
+++ b/lib/philomena_web/templates/source_change/index.html.heex
@@ -0,0 +1,76 @@
+
+
+ <%= @pagination %>
+
+
+
+
+
+
+ Image
+
+
+ Source
+
+
+ Action
+
+
+ Timestamp
+
+
+ User
+
+
+
+
+ <%= for source_change <- @source_changes do %>
+
+
+ <%= link(source_change.image_id, to: ~p"/images/#{source_change.image}") %>
+
+ <%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: source_change, conn: @conn) %>
+ <%= if can?(@conn, :show, :ip_address) do %>
+ <%= link_to_ip(@conn, source_change.ip) %>
+ <%= link_to_fingerprint(@conn, source_change.fingerprint) %>
+ <% end %>
+ <%= if staff?(source_change) do %>
+
+
+
+ Stop!
+
+ This user is a staff member.
+
+ Ask them before reverting their changes.
+
+ <% end %>
+
+
+ <% end %>
+
+
+
+
+ <%= @pagination %>
+
+
diff --git a/lib/philomena_web/templates/source_change/index.html.slime b/lib/philomena_web/templates/source_change/index.html.slime
deleted file mode 100644
index fe4b37b2..00000000
--- a/lib/philomena_web/templates/source_change/index.html.slime
+++ /dev/null
@@ -1,50 +0,0 @@
-.block
- .block__header
- = @pagination
-
- .block__content
- table.table
- thead
- tr
- th colspan=2 Image
- th Source
- th Action
- th Timestamp
- th User
-
- tbody
- = for source_change <- @source_changes do
- tr
- td.center
- = link source_change.image_id, to: ~p"/images/#{source_change.image}"
- td.center
- = render PhilomenaWeb.ImageView, "_image_container.html", image: source_change.image, size: :thumb_tiny, conn: @conn
-
- td
- = source_change.source_url
-
- = if source_change.added do
- td.success Added
- - else
- td.danger Removed
-
- td
- = pretty_time(source_change.created_at)
-
- td class=user_column_class(source_change)
- => render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: source_change, conn: @conn
-
- = if can?(@conn, :show, :ip_address) do
- => link_to_ip @conn, source_change.ip
- => link_to_fingerprint @conn,source_change.fingerprint
-
- = if staff?(source_change) do
- br
- small
- strong> Stop!
- ' This user is a staff member.
- br
- ' Ask them before reverting their changes.
-
- .block__header
- = @pagination
diff --git a/lib/philomena_web/templates/staff/index.html.heex b/lib/philomena_web/templates/staff/index.html.heex
new file mode 100644
index 00000000..f3c33218
--- /dev/null
+++ b/lib/philomena_web/templates/staff/index.html.heex
@@ -0,0 +1,83 @@
+
+ Staff
+
+
+
+ Do you wish to submit a report?
+
+
+
+ Do
+
+ not
+
+
+ PM staff members with your reports. Instead, if you think something breaks
+ <%= link to: "/pages/rules" do %>
+ the rules
+ <% end %>
+ , use the "Report" button, which is included next to all user-created content on the site. This will ensure swift handling of your issue, since most staff members don't check their PMs nearly as vigilantly as the reports queue.
+
+
+ Staff PMs are only for general questions or for getting help with using the site.
+
+
+
+
+ Before contacting any of the staff members, you should try to ask your question in our
+ <%= link to: "/pages/discord" do %>
+ Discord
+ <% end %>
+ or
+ <%= link to: "/pages/irc" do %>
+ IRC channels.
+ <% end %>
+
+
+ Keep in mind that all staff are unpaid volunteers who donate their time and effort into making sure this site remains organized and operational. Please do not harass them, and try to keep your PMs constructive. We will happily answer your questions, however receiving plenty of PMs for no reason gets tiring and impacts our ability to tend to more important matters, so please make sure you actually have a need to contact a staff member before doing so.
+
+
+
+ <%= for {header, users} <- @categories do %>
+ <% header = to_string(header) %>
+ <%= if Enum.any?(users) do %>
+
+ <%= link to: ~p"/conversations/new?#{[recipient: user.name]}", class: "button" do %>
+
+ Send PM
+ <% end %>
+
+
+
+
+ <%= staff_description(user) %>
+
+
+
+ <% end %>
+
+ <% end %>
+ <% end %>
+
diff --git a/lib/philomena_web/templates/staff/index.html.slime b/lib/philomena_web/templates/staff/index.html.slime
deleted file mode 100644
index c8373b59..00000000
--- a/lib/philomena_web/templates/staff/index.html.slime
+++ /dev/null
@@ -1,49 +0,0 @@
-h1 Staff
-.block.block--fixed.block--warning
- h3 Do you wish to submit a report?
- p
- strong>
- ' Do
- em not
- ' PM staff members with your reports. Instead, if you think something breaks
- = link to: "/pages/rules" do
- | the rules
- ' , use the "Report" button, which is included next to all user-created content on the site. This will ensure swift handling of your issue, since most staff members don't check their PMs nearly as vigilantly as the reports queue.
- p Staff PMs are only for general questions or for getting help with using the site.
-
-.block.block--fixed
- p
- ' Before contacting any of the staff members, you should try to ask your question in our
- = link to: "/pages/discord" do
- ' Discord
- ' or
- = link to: "/pages/irc" do
- ' IRC channels.
- p Keep in mind that all staff are unpaid volunteers who donate their time and effort into making sure this site remains organized and operational. Please do not harass them, and try to keep your PMs constructive. We will happily answer your questions, however receiving plenty of PMs for no reason gets tiring and impacts our ability to tend to more important matters, so please make sure you actually have a need to contact a staff member before doing so.
-
-.staff-block
- = for {header, users} <- @categories do
- - header = to_string(header)
-
- = if Enum.any?(users) do
- div class="block block--fixed staff-block__category #{category_class(header)}" = header
- p.staff-block__description
- i.fa.fa-fw.fa-info-circle>
- = category_description(header)
-
- .staff-block__grid
- = for user <- users do
- .block.flex.flex--column
- .block__content.staff-block__user
- .staff-block__user-card
- .staff-block__avatar
- a.profile-block href=~p"/profiles/#{user}"
- = render PhilomenaWeb.UserAttributionView, "_user_avatar.html", object: %{user: user}, class: "avatar--125px"
- p
- b = user.name
- .staff-block__info
- = link to: ~p"/conversations/new?#{[recipient: user.name]}", class: "button" do
- i.fa.fa-envelope>
- ' Send PM
- hr.staff-block__separator
- p.staff-block__user-description = staff_description(user)
diff --git a/lib/philomena_web/templates/stat/index.html.heex b/lib/philomena_web/templates/stat/index.html.heex
new file mode 100644
index 00000000..9fb4edca
--- /dev/null
+++ b/lib/philomena_web/templates/stat/index.html.heex
@@ -0,0 +1,163 @@
+<%
+ img_bucket = @image_aggs["aggregations"]
+ cmt_bucket = @comment_aggs["aggregations"]
+%>
+
+
+ Images
+
+
+ There are
+
+ <%= number_with_delimiter(img_bucket["non_deleted"]["doc_count"]) %>
+
+ non-deleted images total in our database. Of these,
+
+ <%= number_with_delimiter(img_bucket["non_deleted"]["last_24h"]["doc_count"]) %>
+
+ images were uploaded in the last 24 hours.
+
+
+ This net total excludes the
+ <%= number_with_delimiter(img_bucket["deleted"]["doc_count"]) %>
+ images that have been deleted or marked as duplicates.
+
+
+ Comments
+
+
+ There are
+
+ <%= number_with_delimiter(@comment_aggs["hits"]["total"]["value"]) %>
+
+ comments on the site. Of these,
+ <%= number_with_delimiter(cmt_bucket["deleted"]["doc_count"]) %>
+ have been deleted.
+
+
+ In the last 24 hours,
+
+ <%= number_with_delimiter(cmt_bucket["last_24h"]["doc_count"]) %>
+
+ comments have been posted.
+
+
+ There are, on average,
+
+ <%= number_with_delimiter(trunc(img_bucket["non_deleted"]["avg_comments"]["value"] || 0)) %>
+
+ comments on each image on the site.
+
+
+ Votes
+
+
+ Out of
+ <%= number_with_delimiter(img_bucket["non_deleted"]["doc_count"]) %>
+ images,
+
+ <%= number_with_delimiter(img_bucket["non_deleted"]["score_gt_0"]["doc_count"]) %>
+
+ images have a score above 0, and
+
+ <%= number_with_delimiter(img_bucket["non_deleted"]["score_lt_0"]["doc_count"]) %>
+
+ images have a score below 0.
+
+ <%= number_with_delimiter(img_bucket["non_deleted"]["faves_gt_0"]["doc_count"]) %>
+
+ images have been faved by at least one user.
+
+
+ Forums
+
+
+ In our
+ <%= @forums_count %>
+ forums there have been
+
+ <%= number_with_delimiter(@topics_count) %>
+
+ topics started. There have been
+
+ <%= number_with_delimiter(@posts_count) %>
+
+ replies to topics in total.
+
+
+ Users
+
+
+ There are
+
+ <%= number_with_delimiter(@users_count) %>
+
+ users on the site. Of these,
+
+ <%= number_with_delimiter(@users_24h) %>
+
+ have joined in the last 24 hours.
+
+
+ Galleries
+
+
+ There are
+
+ <%= number_with_delimiter(@gallery_count) %>
+
+ existing image galleries on the site, created by
+
+ <%= number_with_delimiter(@distinct_creators) %>
+
+ distinct creators. There are, on average,
+
+ <%= number_with_delimiter(@gallery_size) %>
+
+ images in each gallery.
+
+
+ In total, images have been added to galleries
+
+ <%= number_with_delimiter(@images_in_galleries) %>
+
+ times.
+
+
+ Commissions
+
+
+ There are
+
+ <%= number_with_delimiter(@open_commissions) %>
+
+ open commission listings on the site, offering a total of
+
+ <%= number_with_delimiter(@commission_items) %>
+
+ items.
+
+
+ Moderation
+
+
+ We have received
+
+ <%= number_with_delimiter(@report_stat_count) %>
+
+ reports. Out of these reports,
+ <%= number_with_delimiter(@open_reports) %>
+ reports are outstanding and awaiting action.
+
+
+ On the last 250 reports we've received, it's taken us on average
+
+ <%= @response_time %>
+
+ hour(s) between a report being made and the report being resolved.
+
diff --git a/lib/philomena_web/templates/stat/index.html.slime b/lib/philomena_web/templates/stat/index.html.slime
deleted file mode 100644
index 944c4063..00000000
--- a/lib/philomena_web/templates/stat/index.html.slime
+++ /dev/null
@@ -1,119 +0,0 @@
-elixir:
- img_bucket = @image_aggs["aggregations"]
- cmt_bucket = @comment_aggs["aggregations"]
-
-.walloftext
- h3 Images
- p
- ' There are
- span.stat>
- = number_with_delimiter(img_bucket["non_deleted"]["doc_count"])
- ' non-deleted images total in our database. Of these,
- span.stat>
- = number_with_delimiter(img_bucket["non_deleted"]["last_24h"]["doc_count"])
- ' images were uploaded in the last 24 hours.
- p
- ' This net total excludes the
- => number_with_delimiter(img_bucket["deleted"]["doc_count"])
- ' images that have been deleted or marked as duplicates.
-
- h3 Comments
- p
- ' There are
- span.stat>
- = number_with_delimiter(@comment_aggs["hits"]["total"]["value"])
- ' comments on the site. Of these,
- => number_with_delimiter(cmt_bucket["deleted"]["doc_count"])
- ' have been deleted.
- p
- ' In the last 24 hours,
- span.stat>
- = number_with_delimiter(cmt_bucket["last_24h"]["doc_count"])
- ' comments have been posted.
- p
- ' There are, on average,
- span.stat>
- = number_with_delimiter(trunc(img_bucket["non_deleted"]["avg_comments"]["value"] || 0))
- ' comments on each image on the site.
-
- h3 Votes
- p
- ' Out of
- => number_with_delimiter(img_bucket["non_deleted"]["doc_count"])
- ' images,
- span.stat>
- = number_with_delimiter(img_bucket["non_deleted"]["score_gt_0"]["doc_count"])
- ' images have a score above 0, and
- span.stat>
- = number_with_delimiter(img_bucket["non_deleted"]["score_lt_0"]["doc_count"])
- ' images have a score below 0.
- span.stat>
- = number_with_delimiter(img_bucket["non_deleted"]["faves_gt_0"]["doc_count"])
- ' images have been faved by at least one user.
-
- h3 Forums
- p
- ' In our
- => @forums_count
- ' forums there have been
- span.stat>
- = number_with_delimiter(@topics_count)
- ' topics started. There have been
- span.stat>
- = number_with_delimiter(@posts_count)
- ' replies to topics in total.
-
- h3 Users
- p
- ' There are
- span.stat>
- = number_with_delimiter(@users_count)
- ' users on the site. Of these,
- span.stat>
- = number_with_delimiter(@users_24h)
- ' have joined in the last 24 hours.
-
- h3 Galleries
- p
- ' There are
- span.stat>
- = number_with_delimiter(@gallery_count)
- ' existing image galleries on the site, created by
- span.stat>
- = number_with_delimiter(@distinct_creators)
- ' distinct creators. There are, on average,
- span.stat>
- = number_with_delimiter(@gallery_size)
- ' images in each gallery.
- p
- ' In total, images have been added to galleries
- span.stat>
- = number_with_delimiter(@images_in_galleries)
- ' times.
-
- h3 Commissions
- p
- ' There are
- span.stat>
- = number_with_delimiter(@open_commissions)
- ' open commission listings on the site, offering a total of
- span.stat>
- = number_with_delimiter(@commission_items)
- ' items.
-
- h3 Moderation
- p
- ' We have received
- span.stat>
- = number_with_delimiter(@report_stat_count)
- ' reports. Out of these reports,
- => number_with_delimiter(@open_reports)
- ' reports are outstanding and awaiting action.
- p
- ' On the last 250 reports we've received, it's taken us on average
- span.stat>
- = @response_time
- ' hour(s) between a report being made and the report being resolved.
-
- h3 Upload History
- = upload_graph(img_bucket["non_deleted"]["all_time"]["buckets"])
diff --git a/lib/philomena_web/templates/tag/_quick_tag_table.html.heex b/lib/philomena_web/templates/tag/_quick_tag_table.html.heex
new file mode 100644
index 00000000..b94ba6ce
--- /dev/null
+++ b/lib/philomena_web/templates/tag/_quick_tag_table.html.heex
@@ -0,0 +1,16 @@
+<%
+ tabs = Enum.with_index(@data["tabs"])
+ tab_modes = @data["tab_modes"]
+%>
+
+ <%= for {name, i} <- tabs do %>
+ <%= link(name, to: "#", class: tab_class(i), data: [click_tab: name]) %>
+ <% end %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/tag/_quick_tag_table_season.html.slime b/lib/philomena_web/templates/tag/_quick_tag_table_season.html.slime
deleted file mode 100644
index 1f451a67..00000000
--- a/lib/philomena_web/templates/tag/_quick_tag_table_season.html.slime
+++ /dev/null
@@ -1,9 +0,0 @@
-= for slice <- Enum.chunk_every(@data, 10) do
- div
- = for map <- slice do
- - [header, tag_name] = Enum.to_list(map)
-
- = header
- ' .
- = tag_link @tags[tag_name], tag_name
- br
diff --git a/lib/philomena_web/templates/tag/_quick_tag_table_shipping.html.heex b/lib/philomena_web/templates/tag/_quick_tag_table_shipping.html.heex
new file mode 100644
index 00000000..ec20f9d2
--- /dev/null
+++ b/lib/philomena_web/templates/tag/_quick_tag_table_shipping.html.heex
@@ -0,0 +1,8 @@
+<%= for slice <- Enum.chunk_every(@shipping[@tab], 10) do %>
+
+ <%= for tag <- slice do %>
+ <%= tag_link(tag, tag.name) %>
+
+ <% end %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/tag/_quick_tag_table_shipping.html.slime b/lib/philomena_web/templates/tag/_quick_tag_table_shipping.html.slime
deleted file mode 100644
index 85cc34a2..00000000
--- a/lib/philomena_web/templates/tag/_quick_tag_table_shipping.html.slime
+++ /dev/null
@@ -1,5 +0,0 @@
-= for slice <- Enum.chunk_every(@shipping[@tab], 10) do
- div
- = for tag <- slice do
- = tag_link tag, tag.name
- br
\ No newline at end of file
diff --git a/lib/philomena_web/templates/tag/_quick_tag_table_shorthand.html.heex b/lib/philomena_web/templates/tag/_quick_tag_table_shorthand.html.heex
new file mode 100644
index 00000000..238946e5
--- /dev/null
+++ b/lib/philomena_web/templates/tag/_quick_tag_table_shorthand.html.heex
@@ -0,0 +1,14 @@
+<%= for [heading, maps] <- @data do %>
+
+
+ <%= heading %>
+
+
+ <%= for [name, alias_name] <- maps do %>
+ <%= name %>
+ -
+ <%= tag_link(@tags[alias_name], alias_name) %>
+
+ <% end %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/tag/_quick_tag_table_shorthand.html.slime b/lib/philomena_web/templates/tag/_quick_tag_table_shorthand.html.slime
deleted file mode 100644
index ad34a181..00000000
--- a/lib/philomena_web/templates/tag/_quick_tag_table_shorthand.html.slime
+++ /dev/null
@@ -1,10 +0,0 @@
-= for [heading, maps] <- @data do
- div
- strong = heading
- br
-
- = for [name, alias_name] <- maps do
- => name
- ' -
- = tag_link @tags[alias_name], alias_name
- br
diff --git a/lib/philomena_web/templates/tag/_tag.html.heex b/lib/philomena_web/templates/tag/_tag.html.heex
new file mode 100644
index 00000000..38f9f46f
--- /dev/null
+++ b/lib/philomena_web/templates/tag/_tag.html.heex
@@ -0,0 +1,49 @@
+
+ <% # The order of tag states and dropdown links is important for tags.js %>
+
+
+ +
+
+
+ -
+
+
+ S
+
+
+ H
+
+
+ <%= @tag.name %>
+
+
+
+ <%= if @tag.image do %>
+
+ <% else %>
+ no spoiler image
+ <% end %>
+
+
+ <%= render(PhilomenaWeb.TagView, "_tag.html", tag: @tag, conn: @conn) %>
+ <%= link("Tag changes", to: ~p"/tags/#{@tag}/tag_changes", class: "detail-link") %>
+ <%= if manages_tags?(@conn) do %>
+ <%= link("Edit details", to: ~p"/tags/#{@tag}/edit", class: "detail-link") %>
+ <%= link("Usage", to: ~p"/tags/#{@tag}/details", class: "detail-link") %>
+ <% end %>
+ <%= if manages_dnp?(@conn) do %>
+ <%= link("Create new DNP entry", to: ~p"/dnp/new?#{[tag_id: @tag.id]}", class: "detail-link") %>
+ <% end %>
+
+ <%= if @tag.short_description not in [nil, ""] do %>
+
+ Short description:
+
+ <%= @tag.short_description %>
+
+ <% end %>
+ <%= if manages_tags?(@conn) and present?(@tag.mod_notes) do %>
+
+ Mod notes:
+
+ <%= @tag.mod_notes %>
+
+ <% end %>
+ <%= if Enum.any?(@tag.aliases) do %>
+
+ Aliases:
+
+ <%= if aliases_tags?(@conn) do %>
+ <%= map_join(@tag.aliases, ", ", &link(&1.name, to: ~p"/tags/#{&1}/alias/edit")) %>
+ <% else %>
+ <%= map_join(@tag.aliases, ", ", & &1.name) %>
+ <% end %>
+
+ <% end %>
+ <%= if Enum.any?(@tag.implied_tags) do %>
+
+ Implies:
+
+ <%= map_join(@tag.implied_tags, ", ", &link(&1.name, to: ~p"/tags/#{&1}")) %>
+
+ <% end %>
+ <%= if Enum.any?(@tag.hidden_links) and manages_links?(@conn) do %>
+
+ Hidden links:
+
+
+ <%= for artist_link <- @tag.hidden_links do %>
+ <%= link(artist_link.user.name, to: ~p"/profiles/#{artist_link.user}") %>
+ →
+ <%= link(artist_link.uri, to: artist_link.uri) %>
+
+ <% end %>
+ <% end %>
+ <%= if present?(@tag.public_links) or present?(@tag.channels) or present?(@tag.implied_by_tags) or present?(@tag.description) do %>
+
+ <%= link("Toggle detailed information", to: "#", data: [click_toggle: ".tag-info__more"]) %>
+
+
+ <%= if Enum.any?(@tag.public_links) do %>
+
+ Associated links:
+
+ <%= for link <- @tag.public_links do %>
+
+ <%= link.uri %>
+
+ <% end %>
+
+ <% end %>
+ <%= if Enum.any?(@tag.public_links) do %>
+
+ Associated users:
+
+ <% users = Enum.map(@tag.public_links, & &1.user) |> Enum.uniq_by(& &1.id) %>
+ <%= for user <- users do %>
+ <%= link(user.name, to: ~p"/profiles/#{user}") %>
+ <% end %>
+
+ <% end %>
+ <%= if Enum.any?(@tag.channels) do %>
+
+ Associated streams:
+
+ <%= for channel <- @tag.channels do %>
+ <%= link(channel.title, to: ~p"/channels/#{channel}") %>
+ <%= if can?(@conn, :edit, channel) do %>
+ (
+ <%= link("Edit", to: ~p"/channels/#{channel}/edit") %>
+ )
+ <% end %>
+ <% end %>
+
+ <% end %>
+ <%= if Enum.any?(@tag.implied_by_tags) do %>
+
+
+
+
+ <%= map_join @tag.implied_by_tags, ", ", fn tag -> %>
+ <%= link(tag.name, to: ~p"/tags/#{tag}") %>
+ <% end %>
+
+
+
+ <% end %>
+ <%= if @tag.description not in [nil, ""] do %>
+
+ Detailed description:
+
+
+ <%= @body %>
+ <% end %>
+
+ <% end %>
+ <%= if Enum.any?(@dnp_entries) do %>
+
+
+ This artist is on the Do-Not-Post List with the following restrictions:
+
+ <%= for {body, entry} <- @dnp_entries do %>
+
+ •
+
+ <%= entry.dnp_type %>
+
+ <%= body %>
+ (
+ <%= link("more info", to: ~p"/dnp/#{entry}") %>
+ )
+ <% end %>
+ <% end %>
+
+
diff --git a/lib/philomena_web/templates/tag/_tag_info_row.html.slime b/lib/philomena_web/templates/tag/_tag_info_row.html.slime
deleted file mode 100644
index 2bd36b42..00000000
--- a/lib/philomena_web/templates/tag/_tag_info_row.html.slime
+++ /dev/null
@@ -1,121 +0,0 @@
-.block__content.js-imagelist-info.flex class=tags_row_class(@conn)
- .flex__fixed.tag-info__image.thumb-tiny-container.spacing-right
- = if @tag.image do
- img src=tag_image(@tag) alt="spoiler image"
- - else
- | no spoiler image
-
- .flex__grow
- = render PhilomenaWeb.TagView, "_tag.html", tag: @tag, conn: @conn
- = link "Tag changes", to: ~p"/tags/#{@tag}/tag_changes", class: "detail-link"
- = if manages_tags?(@conn) do
- = link "Edit details", to: ~p"/tags/#{@tag}/edit", class: "detail-link"
- = link "Usage", to: ~p"/tags/#{@tag}/details", class: "detail-link"
- = if manages_dnp?(@conn) do
- = link "Create new DNP entry", to: ~p"/dnp/new?#{[tag_id: @tag.id]}", class: "detail-link"
-
- br
-
- = if @tag.short_description not in [nil, ""] do
- strong> Short description:
- = @tag.short_description
- br
-
- = if manages_tags?(@conn) and present?(@tag.mod_notes) do
- strong.comment_deleted> Mod notes:
- = @tag.mod_notes
- br
-
- = if Enum.any?(@tag.aliases) do
- strong> Aliases:
- = if aliases_tags?(@conn) do
- = map_join(@tag.aliases, ", ", &link(&1.name, to: ~p"/tags/#{&1}/alias/edit"))
- - else
- = map_join(@tag.aliases, ", ", & &1.name)
- br
-
- = if Enum.any?(@tag.implied_tags) do
- strong> Implies:
- = map_join(@tag.implied_tags, ", ", &link(&1.name, to: ~p"/tags/#{&1}"))
- br
-
- = if Enum.any?(@tag.hidden_links) and manages_links?(@conn) do
- strong.comment_deleted> Hidden links:
- br
-
- = for artist_link <- @tag.hidden_links do
- => link artist_link.user.name, to: ~p"/profiles/#{artist_link.user}"
- ' →
- => link artist_link.uri, to: artist_link.uri
- br
-
-
- = if present?(@tag.public_links) or present?(@tag.channels) or present?(@tag.implied_by_tags) or present?(@tag.description) do
- br
- = link "Toggle detailed information", to: "#", data: [click_toggle: ".tag-info__more"]
-
- .tag-info__more
- hr
-
- = if Enum.any?(@tag.public_links) do
- strong> Associated links:
-
- = for link <- @tag.public_links do
- a> href=link.uri = link.uri
-
- br
-
- = if Enum.any?(@tag.public_links) do
- strong> Associated users:
- - users = Enum.map(@tag.public_links, & &1.user) |> Enum.uniq_by(& &1.id)
-
- = for user <- users do
- => link user.name, to: ~p"/profiles/#{user}"
-
- br
-
- = if Enum.any?(@tag.channels) do
- strong> Associated streams:
- = for channel <- @tag.channels do
- => link channel.title, to: ~p"/channels/#{channel}"
-
- = if can?(@conn, :edit, channel) do
- | (
- = link "Edit", to: ~p"/channels/#{channel}/edit"
- ' )
-
- br
-
- = if Enum.any?(@tag.implied_by_tags) do
- input.toggle-box id="implied_by" type="checkbox"
- label for="implied_by"
- ' Implied by (warning: unfiltered)
-
- .toggle-box-container
- .toggle-box-container__content
- = map_join @tag.implied_by_tags, ", ", fn tag ->
- = link tag.name, to: ~p"/tags/#{tag}"
-
- br
-
- = if @tag.description not in [nil, ""] do
- strong> Detailed description:
- br
- = @body
-
- = if Enum.any?(@dnp_entries) do
- hr
- strong.comment_deleted This artist is on the Do-Not-Post List with the following restrictions:
-
- = for {body, entry} <- @dnp_entries do
- br
- ' •
-
- strong
- => entry.dnp_type
-
- => body
-
- | (
- = link "more info", to: ~p"/dnp/#{entry}"
- | )
diff --git a/lib/philomena_web/templates/tag/_tag_list.html.heex b/lib/philomena_web/templates/tag/_tag_list.html.heex
new file mode 100644
index 00000000..52f7433c
--- /dev/null
+++ b/lib/philomena_web/templates/tag/_tag_list.html.heex
@@ -0,0 +1,5 @@
+
+ <%= for tag <- @tags do %>
+ <%= render(PhilomenaWeb.TagView, "_tag.html", tag: tag, conn: @conn) %>
+ <% end %>
+
diff --git a/lib/philomena_web/templates/tag/_tag_list.html.slime b/lib/philomena_web/templates/tag/_tag_list.html.slime
deleted file mode 100644
index ea9562cc..00000000
--- a/lib/philomena_web/templates/tag/_tag_list.html.slime
+++ /dev/null
@@ -1,3 +0,0 @@
-.tag-list
- = for tag <- @tags do
- = render PhilomenaWeb.TagView, "_tag.html", tag: tag, conn: @conn
\ No newline at end of file
diff --git a/lib/philomena_web/templates/tag/_tags_row.html.heex b/lib/philomena_web/templates/tag/_tags_row.html.heex
new file mode 100644
index 00000000..57bf91be
--- /dev/null
+++ b/lib/philomena_web/templates/tag/_tags_row.html.heex
@@ -0,0 +1,5 @@
+
+ Will remove tag changes on the tag, but not on images or profiles.
+
+
+ Will unset the alias if this tag is an alias target, and will automatically remove any implications that exist to it.
+
+
+
+
+<% end %>
diff --git a/lib/philomena_web/templates/tag/edit.html.slime b/lib/philomena_web/templates/tag/edit.html.slime
deleted file mode 100644
index f5faedb7..00000000
--- a/lib/philomena_web/templates/tag/edit.html.slime
+++ /dev/null
@@ -1,56 +0,0 @@
-h1 Editing Tag
-
-p = link "Edit image", to: ~p"/tags/#{@tag}/image/edit"
-= if can?(@conn, :alias, @tag) do
- p = link "Edit aliases", to: ~p"/tags/#{@tag}/alias/edit"
-
-= form_for @changeset, ~p"/tags/#{@tag}", [class: "form"], fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- h2
- = @tag.name
-
- .field
- ' Category:
- = select f, :category, tag_categories(), class: "input"
-
- h4 Description
- .field
- => label f, :short_description, "Short description:"
- = text_input f, :short_description, class: "input input--wide"
-
- .field
- => label f, :description, "Long description:"
- = textarea f, :description, class: "input input--wide"
-
- .field
- => label f, :mod_notes, "Mod notes:"
- = textarea f, :mod_notes, class: "input input--wide"
-
- h4 Implied Tags
- .fieldlabel Tags in this list will be added when this tag is added to an image.
- .field
- = render PhilomenaWeb.TagView, "_tag_editor.html", f: f, name: :implied_tag_list, type: :edit, conn: @conn
-
- br
- = submit "Save Tag", class: "button button--state-primary"
-
-br
-br
-= if can?(@conn, :alias, @tag) do
- input.toggle-box#tag-management checked="false" type="checkbox"
- label for="tag-management" Tag Processing
- .toggle-box-container
- .toggle-box-container__content
- = button_to "Rebuild index", ~p"/tags/#{@tag}/reindex", method: "post", class: "button", data: [confirm: "Are you really, really sure?", disable_with: raw("Reindexing…")]
- p Use this if the tag displays the wrong number of images or returns the wrong search results.
-
- = button_to "Destroy tag", ~p"/tags/#{@tag}", method: "delete", class: "button button--state-danger", data: [confirm: "Are you really, really sure?", disable_with: raw("Deleting…")]
- p
- strong Irreversible. Use with extreme caution!
- ul
- li Intended use is removing garbage tags.
- li Will remove tag changes on the tag, but not on images or profiles.
- li Will unset the alias if this tag is an alias target, and will automatically remove any implications that exist to it.
diff --git a/lib/philomena_web/templates/tag/image/edit.html.heex b/lib/philomena_web/templates/tag/image/edit.html.heex
new file mode 100644
index 00000000..4920d7f9
--- /dev/null
+++ b/lib/philomena_web/templates/tag/image/edit.html.heex
@@ -0,0 +1,53 @@
+
+
+
+ <%= if @tag.image do %>
+
+ <% else %>
+ no spoiler image
+ <% end %>
+
+
+
+
+
+ Tag image
+
+
+ Add a new image or remove the existing one here.
+
+
+ SVG is preferred.
+
+ <%= form_for @changeset, ~p"/tags/#{@tag}/image", [method: "put", multipart: true], fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+ For more information, see the
+
+ search syntax documentation
+
+ . Wildcards are supported in all literal fields.
+ Search results are sorted by image count, then by name alphabetically.
+
+
+ <%= link("implies:shipping", to: ~p"/tags?#{[tq: "implies:shipping"]}") %>
+
+
+
+
+
+
+ name
+
+
+
+ Literal
+
+
+ Matches the exact name of this tag.
+
+
+
+ <%= link("name:safe", to: ~p"/tags?#{[tq: "name:safe"]}") %>
+
+
+
+
+
+
+ name_in_namespace
+
+
+
+ Literal
+
+
+ Matches the name of this tag with any namespace component removed.
+
+
+
+ <%= link("name_in_namespace:johnjoseco", to: ~p"/tags?#{[tq: "name_in_namespace:johnjoseco"]}") %>
+
+
+
+
+
+
+ namespace
+
+
+
+ Literal
+
+
+ Matches tags with the given namespace.
+
+
+
+ <%= link("namespace:artist", to: ~p"/tags?#{[tq: "namespace:artist"]}") %>
+
+
+
+
+
+
+ short_description
+
+
+
+ Full Text
+
+
+ Matches the text of the short description for this tag.
+
+
+
+ <%= link("short_description:gender", to: ~p"/tags?#{[tq: "short_description:gender"]}") %>
+
+
+
+
+
+
+ slug
+
+
+
+ Literal
+
+
+ Matches the slug of this tag.
+
+
+
+ <%= link("slug:-fwslash-mlp-fwslash-", to: ~p"/tags?#{[tq: "slug:-fwslash-mlp-fwslash-"]}") %>
+
+
+
+
+
diff --git a/lib/philomena_web/templates/tag/index.html.slime b/lib/philomena_web/templates/tag/index.html.slime
deleted file mode 100644
index 89931cea..00000000
--- a/lib/philomena_web/templates/tag/index.html.slime
+++ /dev/null
@@ -1,157 +0,0 @@
-h1 Tags
-
-= form_for :tags, ~p"/tags", [method: "get", class: "hform", enforce_utf8: false], fn f ->
- .field
- = text_input f, :tq, name: :tq, value: @conn.params["tq"] || "*", class: "input hform__text", placeholder: "Search tags", autocapitalize: "none"
- = submit "Search", class: "hform__button button"
-
- .fieldlabel
- ' For more information, see the
- a href="/pages/search_syntax" search syntax documentation
- ' . Wildcards are supported in all literal fields.
- ' Search results are sorted by image count, then by name alphabetically.
-
-h2 Search Results
-
-= cond do
- - Enum.any?(@tags) ->
- - route = fn p -> ~p"/tags?#{p}" end
- - pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tags, route: route, params: [tq: @conn.params["tq"] || "*"]
-
- = render PhilomenaWeb.TagView, "_tag_list.html", tags: @tags, conn: @conn
-
- .block
- .block__header.block__header--light.page__header
- .page__pagination = pagination
- .page__info
- span.block__header__title
- = render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @tags
-
- - assigns[:error] ->
- .block.block--fixed.block--danger
- ' Oops, there was an error parsing your query! Check for mistakes like mismatched parentheses. The error was:
- pre = assigns[:error]
-
- - true ->
- p
- ' No tags found!
-
-h3 Default search
-p
- ' If you do not specify a field to search over, the search engine will
- ' search for tags with a name that is equal to the query string.
-
-h3 Allowed fields
-table.table
- thead
- tr
- th Field Selector
- th Type
- th Description
- th Example
- tbody
- tr
- td
- code alias_of
- td Literal
- td Matches the name of the target tag, if this tag is aliased.
- td
- code = link "alias_of:twilight sparkle", to: ~p"/tags?#{[tq: "alias_of:twilight sparkle"]}"
- tr
- td
- code aliased
- td Boolean
- td Matches when this tag is aliased.
- td
- code = link "aliased:true", to: ~p"/tags?#{[tq: "aliased:true"]}"
- tr
- td
- code aliases
- td Literal
- td Matches the name of any of this tag's aliases.
- td
- code = link "aliases:ts", to: ~p"/tags?#{[tq: "aliases:ts"]}"
- tr
- td
- code analyzed_name
- td Full Text
- td Matches the name of this tag. This is the default field.
- td
- code = link "analyzed_name:wing", to: ~p"/tags?#{[tq: "analyzed_name:wing"]}"
- tr
- td
- code category
- td Literal
- td Matches the category this tag belongs to.
- td
- code = link "category:origin", to: ~p"/tags?#{[tq: "category:origin"]}"
- tr
- td
- code description
- td Full Text
- td Matches the text of the full description for this tag.
- td
- code = link "description:species", to: ~p"/tags?#{[tq: "description:species"]}"
- tr
- td
- code id
- td Numeric Range
- td Matches the numeric surrogate key for this tag.
- td
- code = link "id:40482", to: ~p"/tags?#{[tq: "id:40482"]}"
- tr
- td
- code images
- td Numeric Range
- td Matches tags with the specified image count.
- td
- code = link "images.lte:1000", to: ~p"/tags?#{[tq: "images.lte:1000"]}"
- tr
- td
- code implied_by
- td Literal
- td Matches this tag if it is implied by the given tag.
- td
- code = link "implied_by:transparent background", to: ~p"/tags?#{[tq: "implied_by:transparent background"]}"
- tr
- td
- code implies
- td Literal
- td Matches this tag if it implies the given tag.
- td
- code = link "implies:shipping", to: ~p"/tags?#{[tq: "implies:shipping"]}"
- tr
- td
- code name
- td Literal
- td Matches the exact name of this tag.
- td
- code = link "name:safe", to: ~p"/tags?#{[tq: "name:safe"]}"
- tr
- td
- code name_in_namespace
- td Literal
- td Matches the name of this tag with any namespace component removed.
- td
- code = link "name_in_namespace:johnjoseco", to: ~p"/tags?#{[tq: "name_in_namespace:johnjoseco"]}"
- tr
- td
- code namespace
- td Literal
- td Matches tags with the given namespace.
- td
- code = link "namespace:artist", to: ~p"/tags?#{[tq: "namespace:artist"]}"
- tr
- td
- code short_description
- td Full Text
- td Matches the text of the short description for this tag.
- td
- code = link "short_description:gender", to: ~p"/tags?#{[tq: "short_description:gender"]}"
- tr
- td
- code slug
- td Literal
- td Matches the slug of this tag.
- td
- code = link "slug:-fwslash-mlp-fwslash-", to: ~p"/tags?#{[tq: "slug:-fwslash-mlp-fwslash-"]}"
diff --git a/lib/philomena_web/templates/tag/show.html.heex b/lib/philomena_web/templates/tag/show.html.heex
new file mode 100644
index 00000000..a3f86f23
--- /dev/null
+++ b/lib/philomena_web/templates/tag/show.html.heex
@@ -0,0 +1,2 @@
+<%= render(PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: @tags, images: @images, header: "Images tagged #{@tag.name}", scope: scope(@conn), route: fn p -> ~p"/tags/#{@tag}?#{p}" end) %>
+<%= render(PhilomenaWeb.SearchView, "_form.html", conn: @conn) %>
diff --git a/lib/philomena_web/templates/tag/show.html.slime b/lib/philomena_web/templates/tag/show.html.slime
deleted file mode 100644
index ad85fbed..00000000
--- a/lib/philomena_web/templates/tag/show.html.slime
+++ /dev/null
@@ -1,3 +0,0 @@
-= render PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: @tags, images: @images, header: "Images tagged #{@tag.name}", scope: scope(@conn), route: fn p -> ~p"/tags/#{@tag}?#{p}" end
-
-= render PhilomenaWeb.SearchView, "_form.html", conn: @conn
diff --git a/lib/philomena_web/templates/tag/tag_change/index.html.heex b/lib/philomena_web/templates/tag/tag_change/index.html.heex
new file mode 100644
index 00000000..8f21f7a5
--- /dev/null
+++ b/lib/philomena_web/templates/tag/tag_change/index.html.heex
@@ -0,0 +1,25 @@
+
+ <%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: tag_change, conn: @conn) %>
+ <%= if can?(@conn, :show, :ip_address) do %>
+ <%= link_to_ip(@conn, tag_change.ip) %>
+ <%= link_to_fingerprint(@conn, tag_change.fingerprint) %>
+ <% end %>
+ <%= if staff?(tag_change) do %>
+
+
+
+ Stop!
+
+ This user is a staff member.
+
+ Ask them before reverting their changes.
+
+ <% end %>
+
+ <%= if tag_change_retained(tag_change) do %>
+
+ Yes
+
+ <% else %>
+
+ No
+
+ <% end %>
+ <%= if reverts_tag_changes?(@conn) do %>
+
+ Specify when the poll should end. Once the poll ends, no more
+ votes can be cast and the final results will be displayed. Good
+ values to try are "1 week from now" and "24 hours from now". Polls
+ must last for at least 24 hours.
+
+<% end %>
diff --git a/lib/philomena_web/templates/topic/poll/edit.html.slime b/lib/philomena_web/templates/topic/poll/edit.html.slime
deleted file mode 100644
index 03cf0640..00000000
--- a/lib/philomena_web/templates/topic/poll/edit.html.slime
+++ /dev/null
@@ -1,10 +0,0 @@
-h1 Editing Poll
-
-= form_for @changeset, ~p"/forums/#{@forum}/topics/#{@topic}/poll", fn f ->
- = render PhilomenaWeb.Topic.PollView, "_form.html", f: f
-
- br
- br
-
- .action
- = submit "Save", class: "button", data: [disable_with: raw("Saving…")]
diff --git a/lib/philomena_web/templates/topic/poll/vote/index.html.heex b/lib/philomena_web/templates/topic/poll/vote/index.html.heex
new file mode 100644
index 00000000..a83570fa
--- /dev/null
+++ b/lib/philomena_web/templates/topic/poll/vote/index.html.heex
@@ -0,0 +1,19 @@
+<%= if Enum.any?(@options) do %>
+ <%= for option <- @options do %>
+
+ <%= option.label %>
+
+ <%= for vote <- option.poll_votes do %>
+
+ <%= link(vote.user.name, to: ~p"/profiles/#{vote.user}") %>
+ <% # = link "(x)", to: ~p"/forums/#{@forum}/topics/#{@topic}/poll/votes/#{vote}" %>
+
+ <% end %>
+ <% end %>
+<% else %>
+
+
+ No votes to display
+
+
+<% end %>
diff --git a/lib/philomena_web/templates/topic/poll/vote/index.html.slime b/lib/philomena_web/templates/topic/poll/vote/index.html.slime
deleted file mode 100644
index 749d9cb3..00000000
--- a/lib/philomena_web/templates/topic/poll/vote/index.html.slime
+++ /dev/null
@@ -1,12 +0,0 @@
-= if Enum.any?(@options) do
- = for option <- @options do
- h5 = option.label
-
- = for vote <- option.poll_votes do
- span.interaction-user-list-item
- => link vote.user.name, to: ~p"/profiles/#{vote.user}"
- /= link "(x)", to: ~p"/forums/#{@forum}/topics/#{@topic}/poll/votes/#{vote}"
-
-- else
- p
- em No votes to display
diff --git a/lib/philomena_web/templates/topic/post/_form.html.heex b/lib/philomena_web/templates/topic/post/_form.html.heex
new file mode 100644
index 00000000..c2cd645f
--- /dev/null
+++ b/lib/philomena_web/templates/topic/post/_form.html.heex
@@ -0,0 +1,18 @@
+<%= form_for @changeset, ~p"/forums/#{@forum}/topics/#{@topic}/posts", fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+
+
+ <%= render(PhilomenaWeb.MarkdownView, "_input.html", conn: @conn, f: f, placeholder: "Please read the site rules before posting and use ||spoilers|| for NSFW stuff in SFW forums.") %>
+
+<% end %>
diff --git a/lib/philomena_web/templates/topic/post/_form.html.slime b/lib/philomena_web/templates/topic/post/_form.html.slime
deleted file mode 100644
index dcb15f40..00000000
--- a/lib/philomena_web/templates/topic/post/_form.html.slime
+++ /dev/null
@@ -1,13 +0,0 @@
-= form_for @changeset, ~p"/forums/#{@forum}/topics/#{@topic}/posts", fn f ->
- = if @changeset.action do
- .alert.alert-danger
- p Oops, something went wrong! Please check the errors below.
-
- .block
- div
- = render PhilomenaWeb.MarkdownView, "_input.html", conn: @conn, f: f, placeholder: "Please read the site rules before posting and use ||spoilers|| for NSFW stuff in SFW forums."
-
- .block__content.communication-edit__actions
- => submit "Post", class: "button", data: [disable_with: raw("Posting…")]
-
- = render PhilomenaWeb.MarkdownView, "_anon_checkbox.html", conn: @conn, f: f
diff --git a/lib/philomena_web/templates/topic/post/edit.html.heex b/lib/philomena_web/templates/topic/post/edit.html.heex
new file mode 100644
index 00000000..b0cd3936
--- /dev/null
+++ b/lib/philomena_web/templates/topic/post/edit.html.heex
@@ -0,0 +1,23 @@
+<%= form_for @changeset, ~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}", fn f -> %>
+ <%= if @changeset.action do %>
+
+
+ Oops, something went wrong! Please check the errors below.
+
+
+ <% end %>
+
+
+
+ <%= render(PhilomenaWeb.MarkdownView, "_input.html", conn: @conn, f: f, placeholder: "Please read the site rules before posting and use ||spoilers|| for NSFW stuff in SFW forums.") %>
+
+ <%= if not @topic.hidden_from_users do %>
+ <%= render(PhilomenaWeb.Topic.SubscriptionView, "_subscription.html", forum: @forum, topic: @topic, watching: @watching, conn: @conn) %>
+ <% end %>
+
+
+
+ <% end %>
+
+
+<%= if not @topic.hidden_from_users or can?(@conn, :hide, @topic) do %>
+ <% # Display the poll, if any %>
+ <%= if @topic.poll do %>
+ <%= render(PhilomenaWeb.Topic.PollView, "_display.html", Map.put(assigns, :poll, @topic.poll)) %>
+ <% end %>
+ <% # The actual posts %>
+
+
+ <%= for {post, body} <- @posts, can_view_communication?(@conn, post) do %>
+ <%= render(PhilomenaWeb.PostView, "_post.html", conn: @conn, post: post, body: body) %>
+ <% end %>
+ <%= if @conn.assigns.advert do %>
+ <%= render(PhilomenaWeb.AdvertView, "_box.html", advert: @conn.assigns.advert, conn: @conn) %>
+ <% end %>
+ <% # Footer section %>
+
+
+
+ <%= pagination %>
+
+
+
+ <%= if @topic.locked_at do %>
+
+
+ This topic has been locked to new posts from non-moderators.
+
+
+ Locked
+ <%= pretty_time(@topic.locked_at) %>
+
+
+ Lock reason:
+
+ <%= @topic.lock_reason %>
+
+
+ <%= if can?(@conn, :hide, @topic) and not is_nil(@topic.locked_by) do %>
+