mix format

This commit is contained in:
Liam 2024-05-04 17:09:44 -04:00
parent a19b1d1cb6
commit 67720bd7dc
133 changed files with 658 additions and 1146 deletions

View file

@ -16,13 +16,11 @@
</span>
<br />
<%= @channel.viewers %>
<%=
if @channel.viewers == 1 do
"viewer"
else
"viewers"
end
%>
<%= if @channel.viewers == 1 do
"viewer"
else
"viewers"
end %>
<% else %>
<span class="channel-strip__state label label--narrow label--danger">
OFF AIR

View file

@ -4,8 +4,7 @@
</div>
<div class="flex__grow">
<a href={"/#{@comment.image.id}#comment_#{@comment.id}"}>
#
<%= @comment.image.id %>
# <%= @comment.image.id %>
</a>
by
<span class="hyphenate-breaks">

View file

@ -8,7 +8,5 @@
</span>
<%= 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}") %>
<%= link(@topic.title, to: ~p"/forums/#{@topic.forum}/topics/#{@topic}") %> in <%= link(@topic.forum.name, to: ~p"/forums/#{@topic.forum}") %>
</div>

View file

@ -3,8 +3,7 @@
<div class="block">
<div class="block__header">
<a href={~p"/admin/adverts/new"}>
<i class="fa fa-plus"></i>
New advert
<i class="fa fa-plus"></i> New advert
</a>
<%= pagination %>
</div>
@ -77,16 +76,11 @@
<%= advert.restrictions %>
</td>
<td>
Impressions:
<%= advert.impressions %>
<br />
Clicks:
<%= advert.clicks %>
Impressions: <%= advert.impressions %>
<br /> Clicks: <%= advert.clicks %>
</td>
<td>
<%= link("Edit", to: ~p"/admin/adverts/#{advert}/edit") %>
&bull;
<%= link("Destroy", to: ~p"/admin/adverts/#{advert}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
<%= link("Edit", to: ~p"/admin/adverts/#{advert}/edit") %> &bull; <%= link("Destroy", to: ~p"/admin/adverts/#{advert}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
</td>
</tr>
<% end %>

View file

@ -56,13 +56,8 @@
<%= link_state_name(link) %>
</strong>
<%= if contacted?(link) do %>
<br />
by
<%= link.contacted_by_user.name %>
<br />
(
<%= pretty_time(link.contacted_at) %>
)
<br /> by <%= link.contacted_by_user.name %>
<br /> ( <%= pretty_time(link.contacted_at) %> )
<% end %>
</td>
<td>
@ -77,14 +72,10 @@
<% end %>
</td>
<td>
<%= link("View", to: ~p"/profiles/#{link.user}/artist_links/#{link}") %>
&bull;
<%= link("Edit", to: ~p"/profiles/#{link.user}/artist_links/#{link}/edit") %>
<%= link("View", to: ~p"/profiles/#{link.user}/artist_links/#{link}") %> &bull; <%= link("Edit", to: ~p"/profiles/#{link.user}/artist_links/#{link}/edit") %>
</td>
<td>
<%= link("Verify", to: ~p"/admin/artist_links/#{link}/verification", method: :post) %>
&bull;
<%= link("Reject", to: ~p"/admin/artist_links/#{link}/reject", method: :post) %>
<%= link("Verify", to: ~p"/admin/artist_links/#{link}/verification", method: :post) %> &bull; <%= link("Reject", to: ~p"/admin/artist_links/#{link}/reject", method: :post) %>
<br />
<%= if not verified?(link) do %>
<%= if contacted?(link) do %>

View file

@ -6,8 +6,7 @@
<div class="block">
<div class="block__header">
<a href={~p"/admin/badges/new"}>
<i class="fa fa-plus"></i>
New Badge
<i class="fa fa-plus"></i> New Badge
</a>
<%= pagination %>
</div>
@ -36,9 +35,7 @@
<%= badge_image(badge, width: 32, height: 32) %>
</td>
<td>
<%= link("Users", to: ~p"/admin/badges/#{badge}/users") %>
&bull;
<%= link("Edit", to: ~p"/admin/badges/#{badge}/edit") %>
<%= link("Users", to: ~p"/admin/badges/#{badge}/users") %> &bull; <%= link("Edit", to: ~p"/admin/badges/#{badge}/edit") %>
</td>
</tr>
<% end %>

View file

@ -1,7 +1,5 @@
<h1>
Users with
<%= @badge.title %>
badge
Users with <%= @badge.title %> badge
</h1>
<% route = fn p -> ~p"/admin/badges/#{@badge}/users?#{p}" end %>
<% pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @users, route: route, conn: @conn) %>

View file

@ -68,8 +68,7 @@
<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}") %>
by <%= link(request.modifying_user.name, to: ~p"/profiles/#{request.modifying_user}") %>
<% end %>
</td>
<td>
@ -79,30 +78,25 @@
<%= pretty_time(request.updated_at) %>
</td>
<td>
<%= link("Show", to: ~p"/dnp/#{request}") %>
&bull;
<%= link("Send PM", to: ~p"/conversations/new?#{[recipient: request.requesting_user.name]}") %>
<%= link("Show", to: ~p"/dnp/#{request}") %> &bull; <%= link("Send PM", to: ~p"/conversations/new?#{[recipient: request.requesting_user.name]}") %>
<%= case request.aasm_state do %>
<% s when s in ["requested", "claimed"] -> %>
&bull;
<%= link("Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull;
<%= link("Approve", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "listed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull;
<%= link("Close", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull; <%= link("Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %> &bull; <%= link("Approve",
to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "listed"]}",
data: [method: "post", confirm: "Are you really, really sure?"]
) %> &bull; <%= link("Close", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
<% "listed" -> %>
&bull;
<%= link("Rescind", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "rescinded"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull;
<%= link("Close", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull; <%= link("Rescind", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "rescinded"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %> &bull; <%= 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"] -> %>
&bull;
<%= link("Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "acknowledged"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull;
<%= link("Close", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull; <%= link("Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "acknowledged"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %> &bull; <%= link("Close",
to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "closed"]}",
data: [method: "post", confirm: "Are you really, really sure?"]
) %>
<% _state -> %>
&bull;
<%= link("Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull; <%= link("Claim", to: ~p"/admin/dnp_entries/#{request}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
<% end %>
</td>
</tr>

View file

@ -1,7 +1,6 @@
<div class="walloftext">
<h1>
<%= @user.name %>
's Donations
<%= @user.name %> 's Donations
</h1>
<%= render(PhilomenaWeb.Admin.DonationView, "_table.html", donations: @donations, conn: @conn) %>
<h1>

View file

@ -12,8 +12,7 @@
<div class="block">
<div class="block__header">
<a href={~p"/admin/fingerprint_bans/new"}>
<i class="fa fa-plus"></i>
New fingerprint ban
<i class="fa fa-plus"></i> New fingerprint ban
</a>
<%= pagination %>
</div>
@ -59,8 +58,7 @@
<%= if present?(ban.note) do %>
<p class="block block--fixed">
<em>
Note:
<%= ban.note %>
Note: <%= ban.note %>
</em>
</p>
<% end %>
@ -71,8 +69,7 @@
<td>
<%= link("Edit", to: ~p"/admin/fingerprint_bans/#{ban}/edit") %>
<%= if @current_user.role == "admin" do %>
&bull;
<%= link("Destroy", to: ~p"/admin/fingerprint_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
&bull; <%= link("Destroy", to: ~p"/admin/fingerprint_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
<% end %>
</td>
</tr>

View file

@ -34,9 +34,7 @@
<%= link(note.moderator.name, to: ~p"/profiles/#{note.moderator}") %>
</td>
<td>
<%= link("Edit", to: ~p"/admin/mod_notes/#{note}/edit") %>
&bull;
<%= link("Delete", to: ~p"/admin/mod_notes/#{note}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
<%= link("Edit", to: ~p"/admin/mod_notes/#{note}/edit") %> &bull; <%= link("Delete", to: ~p"/admin/mod_notes/#{note}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
</td>
</tr>
<% end %>

View file

@ -1,6 +1,5 @@
<h2>
Editing mod note for
<%= @mod_note.notable_type %>
Editing mod note for <%= @mod_note.notable_type %>
<%= @mod_note.notable_id %>
</h2>
<%= render(PhilomenaWeb.Admin.ModNoteView, "_form.html", changeset: @changeset, action: ~p"/admin/mod_notes/#{@mod_note}", conn: @conn) %>

View file

@ -1,6 +1,5 @@
<h2>
New mod note for
<%= @conn.params["notable_type"] %>
New mod note for <%= @conn.params["notable_type"] %>
<%= @conn.params["notable_id"] %>
</h2>
<%= render(PhilomenaWeb.Admin.ModNoteView, "_form.html", changeset: @changeset, action: ~p"/admin/mod_notes", conn: @conn) %>

View file

@ -57,19 +57,15 @@
<%= link("Show", to: ~p"/admin/reports/#{report}") %>
<%= if report.open do %>
<%= if report.user do %>
&bull;
<%= link("Send PM", to: ~p"/conversations/new?#{[recipient: report.user.name]}") %>
&bull; <%= link("Send PM", to: ~p"/conversations/new?#{[recipient: report.user.name]}") %>
<% end %>
<%= if is_nil(report.admin) and not current?(report.admin, @conn.assigns.current_user) do %>
&bull;
<%= link("Claim", to: ~p"/admin/reports/#{report}/claim", data: [method: "post"]) %>
&bull; <%= link("Claim", to: ~p"/admin/reports/#{report}/claim", data: [method: "post"]) %>
<% end %>
<%= if current?(report.admin, @conn.assigns.current_user) do %>
&bull;
<%= link("Release", to: ~p"/admin/reports/#{report}/claim", data: [method: "delete"]) %>
&bull; <%= link("Release", to: ~p"/admin/reports/#{report}/claim", data: [method: "delete"]) %>
<% end %>
&bull;
<%= link("Close", to: ~p"/admin/reports/#{report}/close", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull; <%= link("Close", to: ~p"/admin/reports/#{report}/close", data: [method: "post", confirm: "Are you really, really sure?"]) %>
<% end %>
</td>
</tr>

View file

@ -55,8 +55,6 @@
<% end %>
<div class="field">
<label for="rq">
Searchable fields: id, created_at, reason, state, open, user, user_id, admin, admin_id, ip, fingerprint, reportable_type, reportable_id, image_id
<br />
Report reason is used if you don't specify a field.
Searchable fields: id, created_at, reason, state, open, user, user_id, admin, admin_id, ip, fingerprint, reportable_type, reportable_id, image_id <br /> Report reason is used if you don't specify a field.
</label>
</div>

View file

@ -23,8 +23,7 @@
<div class="block__content communication__options">
<div class="flex flex--wrap flex--spaced-out">
<div>
Reported
<%= pretty_time(@report.created_at) %>
Reported <%= pretty_time(@report.created_at) %>
</div>
<div class="flex__right">
<%= link_to_ip(@conn, @report.ip) %>

View file

@ -6,8 +6,7 @@
<div class="block">
<div class="block__header">
<a href={~p"/admin/site_notices/new"}>
<i class="fa fa-plus"></i>
New site notice
<i class="fa fa-plus"></i> New site notice
</a>
<%= pagination %>
</div>
@ -50,9 +49,7 @@
<%= live_text(site_notice) %>
</td>
<td>
<%= link("Edit", to: ~p"/admin/site_notices/#{site_notice}/edit") %>
&bull;
<%= link("Destroy", to: ~p"/admin/site_notices/#{site_notice}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
<%= link("Edit", to: ~p"/admin/site_notices/#{site_notice}/edit") %> &bull; <%= link("Destroy", to: ~p"/admin/site_notices/#{site_notice}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
</td>
</tr>
<% end %>

View file

@ -12,8 +12,7 @@
<div class="block">
<div class="block__header">
<a href={~p"/admin/subnet_bans/new"}>
<i class="fa fa-plus"></i>
New subnet ban
<i class="fa fa-plus"></i> New subnet ban
</a>
<%= pagination %>
</div>
@ -59,8 +58,7 @@
<%= if present?(ban.note) do %>
<p class="block block--fixed">
<em>
Note:
<%= ban.note %>
Note: <%= ban.note %>
</em>
</p>
<% end %>
@ -71,8 +69,7 @@
<td>
<%= link("Edit", to: ~p"/admin/subnet_bans/#{ban}/edit") %>
<%= if @current_user.role == "admin" do %>
&bull;
<%= link("Destroy", to: ~p"/admin/subnet_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
&bull; <%= link("Destroy", to: ~p"/admin/subnet_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
<% end %>
</td>
</tr>

View file

@ -1,6 +1,5 @@
<h1>
Force-assigning a filter for user
<%= @user.name %>
Force-assigning a filter for user <%= @user.name %>
</h1>
<%= form_for @changeset, ~p"/admin/users/#{@user}/force_filter", [method: "post"], fn f -> %>
<div class="field">

View file

@ -7,9 +7,7 @@
<%= submit("Search", class: "button hform__button") %>
</div>
<% end %>
<%= link("Site staff", to: ~p"/admin/users?#{[staff: 1]}") %>
&bull;
<%= link("2FA users", to: ~p"/admin/users?#{[twofactor: 1]}") %>
<%= link("Site staff", to: ~p"/admin/users?#{[staff: 1]}") %> &bull; <%= link("2FA users", to: ~p"/admin/users?#{[twofactor: 1]}") %>
<% route = fn p -> ~p"/admin/users?#{p}" end %>
<% pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @users, route: route, conn: @conn, params: page_params(@conn.params)) %>
<div class="block">
@ -48,13 +46,11 @@
<%= cond do %>
<% user.otp_required_for_login -> %>
<span class="banner__2fa success">
<i class="fas fa-check"></i>
2FA
<i class="fas fa-check"></i> 2FA
</span>
<% user.role != "user" and !user.otp_required_for_login -> %>
<span class="banner__2fa danger">
<i class="fas fa-times"></i>
2FA
<i class="fas fa-times"></i> 2FA
</span>
<% true -> %>
<% end %>
@ -92,8 +88,7 @@
<td>
<%= if can?(@conn, :edit, user) do %>
<%= link to: ~p"/admin/users/#{user}/edit" do %>
<i class="fa fa-fw fa-user-edit"></i>
Edit
<i class="fa fa-fw fa-user-edit"></i> Edit
<% end %>
<% end %>
<% # = if user.deleted_at do %>
@ -103,14 +98,12 @@
<% # ' &bull; %>
<%= if can?(@conn, :index, Philomena.Bans.User) do %>
<%= link to: ~p"/admin/user_bans/new?#{[username: user.name]}" do %>
<i class="fa fa-fw fa-ban"></i>
Ban
<i class="fa fa-fw fa-ban"></i> Ban
<% end %>
<% end %>
<%= if can?(@conn, :edit, Philomena.ArtistLinks.ArtistLink) do %>
<%= link to: ~p"/profiles/#{user}/artist_links/new" do %>
<i class="fa fa-fw fa-link"></i>
Add link
<i class="fa fa-fw fa-link"></i> Add link
<% end %>
<% end %>
</td>

View file

@ -12,8 +12,7 @@
<div class="block">
<div class="block__header">
<a href={~p"/admin/user_bans/new"}>
<i class="fa fa-plus"></i>
New user ban
<i class="fa fa-plus"></i> New user ban
</a>
<%= pagination %>
</div>
@ -59,8 +58,7 @@
<%= if present?(ban.note) do %>
<p class="block block--fixed">
<em>
Note:
<%= ban.note %>
Note: <%= ban.note %>
</em>
</p>
<% end %>
@ -71,8 +69,7 @@
<td>
<%= link("Edit", to: ~p"/admin/user_bans/#{ban}/edit") %>
<%= if @current_user.role == "admin" do %>
&bull;
<%= link("Destroy", to: ~p"/admin/user_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
&bull; <%= link("Destroy", to: ~p"/admin/user_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]) %>
<% end %>
</td>
</tr>

View file

@ -1,17 +1,13 @@
<div class="block" id="imagespns">
<div class="spnstxt">
Interested in advertising on Derpibooru?
<%= link("Click here", to: "/pages/advertising") %>
for information!
Interested in advertising on Derpibooru? <%= link("Click here", to: "/pages/advertising") %> for information!
</div>
<a href={~p"/adverts/#{@advert}"} id="imagespns__link" rel="nofollow" title={@advert.title}>
<img alt={@advert.title} src={advert_image_url(@advert)} />
</a>
<p>
<strong>
Derpibooru costs over $25 a day to operate -
<%= link("help support us financially", to: "/pages/donations") %>
!
Derpibooru costs over $25 a day to operate - <%= link("help support us financially", to: "/pages/donations") %> !
</strong>
</p>
</div>

View file

@ -3,18 +3,13 @@
You've been banned!
</h4>
<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) %>
.
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>
<p>
The reason given by the administrator who banned you is:
<br />
The reason given by the administrator who banned you is: <br />
<strong>
<%= @conn.assigns.current_ban.reason %>
</strong>
(Ban ID:
<%= @conn.assigns.current_ban.generated_ban_id %>
).
(Ban ID: <%= @conn.assigns.current_ban.generated_ban_id %> ).
</p>
</div>

View file

@ -44,12 +44,10 @@
<% end %>
<%= if can?(@conn, :edit, @channel) do %>
<a class={link_class} href={~p"/channels/#{@channel}/edit"}>
<i class="fas fa-fw fa-edit"></i>
Edit
<i class="fas fa-fw fa-edit"></i> Edit
</a>
<a class={link_class} data-confirm="Are you really, really sure?" data-method="delete" href={~p"/channels/#{@channel}"}>
<i class="fas fa-fw fa-trash"></i>
Delete
<i class="fas fa-fw fa-trash"></i> Delete
</a>
<% end %>
<%= render(PhilomenaWeb.Channel.SubscriptionView, "_subscription.html", conn: @conn, watching: @subscriptions[@channel.id], channel: @channel) %>

View file

@ -32,8 +32,7 @@
<code>
piczel_channel_name
</code>
.
<br />
. <br />
<br />
</div>
<div class="field">

View file

@ -16,13 +16,11 @@
</div>
<%= if @conn.cookies["chan_nsfw"] == "true" do %>
<a data-method="delete" href={~p"/channels/nsfw"}>
<i class="fa fa-eye-slash"></i>
Hide NSFW streams
<i class="fa fa-eye-slash"></i> Hide NSFW streams
</a>
<% else %>
<a data-method="create" href={~p"/channels/nsfw"}>
<i class="fa fa-eye"></i>
Show NSFW streams
<i class="fa fa-eye"></i> Show NSFW streams
</a>
<% end %>
</div>

View file

@ -1,22 +1,20 @@
<%
watch_path = ~p"/channels/#{@channel}/subscription"
<% watch_path = ~p"/channels/#{@channel}/subscription"
watch_class =
if @watching do
"hidden"
else
""
end
watch_class =
if @watching do
"hidden"
else
""
end
unwatch_path = ~p"/channels/#{@channel}/subscription"
unwatch_path = ~p"/channels/#{@channel}/subscription"
unwatch_class =
if @watching do
""
else
"hidden"
end
%>
unwatch_class =
if @watching do
""
else
"hidden"
end %>
<%= if @conn.assigns.current_user do %>
<span class="js-subscription-target">
<a class={"js-subscription-link media-box__header media-box__header--channel media-box__header--link #{watch_class}"} data-method="post" data-remote="true" href={watch_path}>

View file

@ -3,22 +3,19 @@
<div class="block__content">
<div class="block block--fixed block--danger">
<p>
<i class="fas fa-exclamation-triangle"></i>
This comment is pending approval from a staff member.
<i class="fas fa-exclamation-triangle"></i> This comment is pending approval from a staff member.
</p>
<%= if can?(@conn, :approve, @comment) do %>
<p>
<ul class="horizontal-list">
<li>
<%= link(to: ~p"/images/#{@comment.image_id}/comments/#{@comment}/approve", data: [confirm: "Are you sure?"], method: "post", class: "button") do %>
<i class="fas fa-check"></i>
Approve
<i class="fas fa-check"></i> Approve
<% end %>
</li>
<li>
<a class="button togglable-delete-form-link" data-click-toggle={"#inline-reject-form-comment-#{@comment.id}"} href="#">
<i class="fa fa-times"></i>
Reject
<i class="fa fa-times"></i> Reject
</a>
</li>
</ul>
@ -44,12 +41,9 @@
<div class="communication__body__text">
<%= if @comment.hidden_from_users do %>
<strong class="comment_deleted">
Deletion reason:
<%= @comment.deletion_reason %>
Deletion reason: <%= @comment.deletion_reason %>
<%= if can?(@conn, :hide, @comment) and not is_nil(@comment.deleted_by) do %>
(
<%= @comment.deleted_by.name %>
)
( <%= @comment.deleted_by.name %> )
<% end %>
</strong>
<%= if can?(@conn, :hide, @comment) do %>
@ -78,19 +72,16 @@
<%= cond do %>
<% @comment.hidden_from_users and not @comment.destroyed_content -> %>
<%= link(to: ~p"/images/#{@comment.image_id}/comments/#{@comment}/hide", data: [confirm: "Are you sure?"], method: "delete", class: "communication__interaction") do %>
<i class="fas fa-check"></i>
Restore
<i class="fas fa-check"></i> Restore
<% end %>
<%= if can?(@conn, :delete, @comment) do %>
<%= link(to: ~p"/images/#{@comment.image_id}/comments/#{@comment}/delete", data: [confirm: "Are you sure?"], method: "post", class: "communication__interaction") do %>
<i class="fas fa-times"></i>
Delete Contents
<i class="fas fa-times"></i> Delete Contents
<% end %>
<% end %>
<% not @comment.hidden_from_users and not @comment.destroyed_content -> %>
<a class="communication__interaction togglable-delete-form-link" data-click-toggle={"#inline-del-form-comment-#{@comment.id}"} href="#">
<i class="fas fa-times"></i>
Delete
<i class="fas fa-times"></i> Delete
</a>
<% true -> %>
<% end %>

View file

@ -1,18 +1,14 @@
<div>
Posted
<%= pretty_time(@comment.created_at) %>
Posted <%= pretty_time(@comment.created_at) %>
<a class="communication__interaction" href={~p"/images/#{@comment.image}/comments/#{@comment}/reports/new"}>
<i class="fa fa-flag"></i>
Report
<i class="fa fa-flag"></i> Report
</a>
<%= if not is_nil(@comment.edited_at) and can?(@conn, :show, @comment) do %>
<br />
<a href={~p"/images/#{@comment.image}/comments/#{@comment}/history"}>
Edited
<%= pretty_time(@comment.edited_at) %>
Edited <%= pretty_time(@comment.edited_at) %>
<%= if @comment.edit_reason not in [nil, ""] do %>
because:
<%= @comment.edit_reason %>
because: <%= @comment.edit_reason %>
<% end %>
</a>
<% end %>
@ -20,32 +16,26 @@
<div>
<% link_path = ~p"/images/#{@comment.image}" <> "#comment_#{@comment.id}" %>
<% safe_author = PhilomenaWeb.PostView.markdown_safe_author(@comment) %>
<%
quote_body =
if @comment.hidden_from_users do
""
else
@comment.body
end
%>
<% quote_body =
if @comment.hidden_from_users do
""
else
@comment.body
end %>
<a class="communication__interaction" href={link_path} title="Link to comment">
<i class="fa fa-link"></i>
Link
<i class="fa fa-link"></i> Link
</a>
<a class="communication__interaction post-reply post-reply-quote" data-author={safe_author} data-post={quote_body} data-reply-url={link_path} href={link_path}>
<i class="fa fa-quote-right"></i>
Quote
<i class="fa fa-quote-right"></i> Quote
</a>
<a class="communication__interaction post-reply" data-author={safe_author} data-reply-url={link_path} href={link_path}>
<i class="fa fa-reply"></i>
Reply
<i class="fa fa-reply"></i> Reply
</a>
<%= if can?(@conn, :edit, @comment) do %>
<span class="owner-options">
<strong>
<a class="communication__interaction" href={~p"/images/#{@comment.image}/comments/#{@comment}/edit"}>
<i class="fas fa-edit"></i>
Edit
<i class="fas fa-edit"></i> Edit
</a>
</strong>
</span>

View file

@ -14,12 +14,9 @@
<div class="communication__body__text">
<%= if @comment.hidden_from_users do %>
<strong class="comment_deleted">
Deletion reason:
<%= @comment.deletion_reason %>
Deletion reason: <%= @comment.deletion_reason %>
<%= if can?(@conn, :hide, @comment) and not is_nil(@comment.deleted_by) do %>
(
<%= @comment.deleted_by.name %>
)
( <%= @comment.deleted_by.name %> )
<% end %>
</strong>
<%= if can?(@conn, :hide, @comment) do %>
@ -48,19 +45,16 @@
<%= cond do %>
<% @comment.hidden_from_users and not @comment.destroyed_content -> %>
<%= link(to: ~p"/images/#{@comment.image_id}/comments/#{@comment}/hide", data: [confirm: "Are you sure?"], method: "delete", class: "communication__interaction") do %>
<i class="fas fa-check"></i>
Restore
<i class="fas fa-check"></i> Restore
<% end %>
<%= if can?(@conn, :delete, @comment) do %>
<%= link(to: ~p"/images/#{@comment.image_id}/comments/#{@comment}/delete", data: [confirm: "Are you sure?"], method: "post", class: "communication__interaction") do %>
<i class="fas fa-times"></i>
Delete Contents
<i class="fas fa-times"></i> Delete Contents
<% end %>
<% end %>
<% not @comment.hidden_from_users and not @comment.destroyed_content -> %>
<a class="communication__interaction togglable-delete-form-link" data-click-toggle={"#inline-del-form-comment-#{@comment.id}"} href="#">
<i class="fas fa-times"></i>
Delete
<i class="fas fa-times"></i> Delete
</a>
<% true -> %>
<% end %>

View file

@ -1,7 +1,5 @@
<%
route = fn p -> ~p"/commissions?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @commissions, route: route, conn: @conn, params: [commission: @conn.params["commission"]])
%>
<% route = fn p -> ~p"/commissions?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @commissions, route: route, conn: @conn, params: [commission: @conn.params["commission"]]) %>
<div class="block">
<div class="block__header page__header">
<span class="block__header__title page__title">
@ -39,11 +37,7 @@
<strong>
Price Range:
</strong>
$
<%= Decimal.round(min.base_price, 2) |> Decimal.to_string() %>
- $
<%= Decimal.round(max.base_price, 2) |> Decimal.to_string() %>
USD
$ <%= Decimal.round(min.base_price, 2) |> Decimal.to_string() %> - $ <%= Decimal.round(max.base_price, 2) |> Decimal.to_string() %> USD
</p>
<p>
<strong>

View file

@ -1,7 +1,5 @@
<%
route = fn p -> ~p"/conversations?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @conversations, route: route, conn: @conn)
%>
<% route = fn p -> ~p"/conversations?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @conversations, route: route, conn: @conn) %>
<h1>
My Conversations
</h1>
@ -12,8 +10,7 @@
</div>
<div class="page__info">
<a href={~p"/conversations/new"}>
<i class="fa fa-paper-plane"></i>
Create New Conversation
<i class="fa fa-paper-plane"></i> Create New Conversation
</a>
</div>
</div>
@ -39,20 +36,14 @@
<%= link(c.title, to: ~p"/conversations/#{c}") %>
<div class="small-text hide-mobile">
<%= count %>
<%= pluralize("message", "messages", count) %>
; started
<%= pretty_time(c.created_at) %>
, last message
<%= pretty_time(c.last_message_at) %>
<%= pluralize("message", "messages", count) %> ; started <%= pretty_time(c.created_at) %> , last message <%= pretty_time(c.last_message_at) %>
</div>
</td>
<td class="table--communication-list__stats">
<%= render(PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other_party(@current_user, c)}, conn: @conn) %>
</td>
<td class="table--communication-list__options">
<%= link("Last message", to: last_message_path(c, count)) %>
&bull;
<%= link("Hide", to: ~p"/conversations/#{c}/hide", data: [method: "post"], data: [confirm: "Are you really, really sure?"]) %>
<%= link("Last message", to: last_message_path(c, count)) %> &bull; <%= link("Hide", to: ~p"/conversations/#{c}/hide", data: [method: "post"], data: [confirm: "Are you really, really sure?"]) %>
</td>
</tr>
<% end %>

View file

@ -3,8 +3,7 @@
</h1>
<div class="block">
<div class="block__header">
<%= link("Conversations", to: ~p"/conversations") %>
&raquo;
<%= link("Conversations", to: ~p"/conversations") %> &raquo;
<span class="block__header__title">
New Conversation
</span>

View file

@ -1,18 +1,12 @@
<%
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)
%>
<% 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 %>
</h1>
<div class="block">
<div class="block__header">
<%= link("Message Center", to: ~p"/conversations") %>
&raquo;
<%= link(@conversation.title, to: ~p"/conversations/#{@conversation}") %>
Conversation with
<%= render(PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other}, conn: @conn) %>
<%= link("Message Center", to: ~p"/conversations") %> &raquo; <%= link(@conversation.title, to: ~p"/conversations/#{@conversation}") %> Conversation with <%= render(PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other}, conn: @conn) %>
</div>
<div class="block__header--sub block__header--light page__header">
<span class="block__header__title page__title">
@ -84,8 +78,7 @@
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>
<p>
<%= link("Click here", to: ~p"/conversations/new?#{[receipient: other.name]}") %>
to make a new conversation with this user.
<%= link("Click here", to: ~p"/conversations/new?#{[receipient: other.name]}") %> to make a new conversation with this user.
</p>
</div>
<% end %>

View file

@ -34,9 +34,7 @@
<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") %>
.
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 %>

View file

@ -1,6 +1,5 @@
<h2>
DNP Listing for Tag
<%= @dnp_entry.tag.name %>
DNP Listing for Tag <%= @dnp_entry.tag.name %>
</h2>
<div class="block">
<div class="block__header">
@ -90,21 +89,22 @@
<%= if can?(@conn, :index, Philomena.DnpEntries.DnpEntry) do %>
<%= case @dnp_entry.aasm_state do %>
<% s when s in ["requested", "claimed"] -> %>
<%= link("Claim", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull;
<%= link("Approve", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "listed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull;
<%= link("Close", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
<%= link("Claim", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %> &bull; <%= link("Approve",
to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "listed"]}",
data: [method: "post", confirm: "Are you really, really sure?"]
) %> &bull; <%= link("Close", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
<% "listed" -> %>
<%= link("Rescind", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "rescinded"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull;
<%= link("Close", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
<%= link("Rescind", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "rescinded"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %> &bull; <%= link("Close",
to: ~p"/admin/dnp_entries/#{@dnp_entry}/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/#{@dnp_entry}/transition?#{[state: "acknowledged"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
&bull;
<%= link("Close", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "closed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
<%= link("Claim", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "acknowledged"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %> &bull; <%= link("Close",
to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "closed"]}",
data: [method: "post", confirm: "Are you really, really sure?"]
) %>
<% _state -> %>
<%= link("Claim", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
<%= link("Claim", to: ~p"/admin/dnp_entries/#{@dnp_entry}/transition?#{[state: "claimed"]}", data: [method: "post", confirm: "Are you really, really sure?"]) %>
<% end %>
<% end %>
<%= if assigns[:mod_notes] do %>

View file

@ -1,8 +1,7 @@
<%= form_for @changeset, ~p"/duplicate_reports", fn f -> %>
<%= hidden_input(f, :image_id, value: @image.id) %>
<div class="field">
Delete this image and redirect to
<%= number_input(f, :duplicate_of_image_id, class: "input", min: 0, placeholder: "image number.", required: true) %>
Delete this image and redirect to <%= number_input(f, :duplicate_of_image_id, class: "input", min: 0, placeholder: "image number.", required: true) %>
<%= text_input(f, :reason, class: "input input--separate-left", placeholder: "Explanation") %>
</div>
<div class="actions">

View file

@ -3,15 +3,12 @@
<%= if is_nil(@image) do %>
(Image now hard-deleted)
<% else %>
#
<%= @image.id %>
# <%= @image.id %>
<% end %>
</p>
<%= render(PhilomenaWeb.ImageView, "_image_container.html", image: @image, size: :thumb_small, conn: @conn) %>
<p>
<%= @image.image_width %>
x
<%= @image.image_height %>
<%= @image.image_width %> x <%= @image.image_height %>
</p>
<p>
<%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @image, conn: @conn) %>
@ -20,15 +17,13 @@
<%= if @source do %>
<a data-method="post" href={~p"/duplicate_reports/#{@report}/accept_reverse"}>
<button class="button">
Keep Source
<i class="fa fa-arrow-left"></i>
Keep Source <i class="fa fa-arrow-left"></i>
</button>
</a>
<% else %>
<a data-method="post" href={~p"/duplicate_reports/#{@report}/accept"}>
<button class="button">
<i class="fa fa-arrow-right"></i>
Keep Target
<i class="fa fa-arrow-right"></i> Keep Target
</button>
</a>
<% end %>

View file

@ -91,18 +91,15 @@
<%= cond do %>
<% same_format?(report) -> %>
<td class="success">
Same format
<%= file_types(report) %>
Same format <%= file_types(report) %>
</td>
<% better_format?(report) -> %>
<td class="warning">
Target format better
<%= file_types(report) %>
Target format better <%= file_types(report) %>
</td>
<% true -> %>
<td class="warning">
Source format better
<%= file_types(report) %>
Source format better <%= file_types(report) %>
</td>
<% end %>
</tr>
@ -191,24 +188,21 @@
<div class={"dr__status-options #{background_class}"}>
<%= String.capitalize(report.state) %>
<%= if can?(@conn, :edit, report) and not is_nil(report.modifier) do %>
by
<%= report.modifier.name %>
by <%= report.modifier.name %>
<% end %>
<%= if can?(@conn, :edit, report) do %>
<div>
<%= if report.state == "open" do %>
<a data-method="post" href={(~p"/duplicate_reports/#{report}/claim" <> "#report_options_#{report.id}")}>
<button class="button button--separate-right">
<i class="fa fa-clipboard"></i>
Claim
<i class="fa fa-clipboard"></i> Claim
</button>
</a>
<% end %>
<%= if report.state != "rejected" do %>
<a data-method="post" href={~p"/duplicate_reports/#{report}/reject"}>
<button class="button">
<i class="fa fa-times"></i>
Reject
<i class="fa fa-times"></i> Reject
</button>
</a>
<% end %>
@ -217,11 +211,9 @@
</div>
<div class="dr__status-options">
<div>
Reported
<%= pretty_time(report.created_at) %>
Reported <%= pretty_time(report.created_at) %>
<%= if report.user do %>
by
<%= link(report.user.name, to: ~p"/profiles/#{report.user}") %>
by <%= link(report.user.name, to: ~p"/profiles/#{report.user}") %>
<% end %>
</div>
<%= escape_nl2br(report.reason) %>

View file

@ -1,8 +1,6 @@
<%
source_url = comparison_url(@conn, @duplicate_report.image)
target_url = comparison_url(@conn, @duplicate_report.duplicate_of_image)
{width, height} = largest_dimensions([@duplicate_report.image, @duplicate_report.duplicate_of_image])
%>
<% source_url = comparison_url(@conn, @duplicate_report.image)
target_url = comparison_url(@conn, @duplicate_report.duplicate_of_image)
{width, height} = largest_dimensions([@duplicate_report.image, @duplicate_report.duplicate_of_image]) %>
<h1>
Difference
</h1>

View file

@ -5,8 +5,7 @@
<meta content="IE=edge" http-equiv="X-UA-Compatible" />
<%= viewport_meta_tag(@conn) %>
<title>
<%= @status %>
- Philomena
<%= @status %> - Philomena
</title>
<link href={stylesheet_path(nil)} rel="stylesheet" />
<link href={dark_stylesheet_path()} media="(prefers-color-scheme: dark)" rel="stylesheet" />
@ -16,8 +15,7 @@
<body class="minimal">
<div class="minimal__message">
<h1 class="minimal__message__header">
<i class="fa fw favicon-home"></i>
Philomena
<i class="fa fw favicon-home"></i> Philomena
</h1>
<h3>
<%= @short_msg %>

View file

@ -4,8 +4,7 @@
</h3>
<%= if @filter.user do %>
<p>
Maintained by
<%= render(PhilomenaWeb.UserAttributionView, "_user.html", object: @filter, conn: @conn) %>
Maintained by <%= render(PhilomenaWeb.UserAttributionView, "_user.html", object: @filter, conn: @conn) %>
</p>
<% end %>
<%= if @filter.system do %>
@ -16,10 +15,7 @@
<div class="filter-options">
<ul>
<li>
Spoilers
<%= length(@filter.spoilered_tag_ids) %>
, hides
<%= length(@filter.hidden_tag_ids) %>
Spoilers <%= length(@filter.spoilered_tag_ids) %> , hides <%= length(@filter.hidden_tag_ids) %>
</li>
<li>
<%= link("View this filter", to: ~p"/filters/#{@filter}", class: "button") %>

View file

@ -65,8 +65,7 @@
Recent Filters
</h2>
<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") %>
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") %>
</p>
<% end %>
<% end %>

View file

@ -1,16 +1,12 @@
<h1>
Viewing full filter details for
<%= @filter.name %>
Viewing full filter details for <%= @filter.name %>
</h1>
<div class="filter">
<div class="filter-options">
<ul>
<li>
Spoilers
<%= number_with_delimiter(length(@filter.spoilered_tag_ids)) %>
<%= pluralize("tag", "tags", length(@filter.spoilered_tag_ids)) %>
and hides
<%= number_with_delimiter(length(@filter.hidden_tag_ids)) %>
Spoilers <%= number_with_delimiter(length(@filter.spoilered_tag_ids)) %>
<%= pluralize("tag", "tags", length(@filter.spoilered_tag_ids)) %> and hides <%= number_with_delimiter(length(@filter.hidden_tag_ids)) %>
<%= pluralize("tag", "tags", length(@filter.hidden_tag_ids)) %>
</li>
<%= if @filter.id == @conn.assigns.current_filter.id do %>
@ -36,8 +32,7 @@
</div>
<%= if @filter.user do %>
<p class="filter-maintainer">
This filter is maintained by
<%= render(PhilomenaWeb.UserAttributionView, "_user.html", object: @filter, conn: @conn) %>
This filter is maintained by <%= render(PhilomenaWeb.UserAttributionView, "_user.html", object: @filter, conn: @conn) %>
</p>
<% end %>
<p class="filter-description">

View file

@ -1,6 +1,5 @@
<h1>
<%= @fingerprint %>
's fingerprint profile
<%= @fingerprint %> 's fingerprint profile
</h1>
<ul>
<li>
@ -42,12 +41,10 @@
<%= link("Revert all tag changes", to: ~p"/tag_changes/full_revert?#{[fingerprint: @fingerprint]}", data: [confirm: "Are you really, really sure?", method: "create"]) %>
</li>
<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"]
)
%>
<%= 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"]
) %>
</li>
</ul>
<h4>
@ -77,8 +74,7 @@
<%= link(ufp.user.name, to: ~p"/profiles/#{ufp.user}") %>
</td>
<td>
<%= ufp.uses %>
times
<%= ufp.uses %> times
</td>
<td>
<%= pretty_time(ufp.updated_at) %>

View file

@ -1,6 +1,5 @@
<h1>
Source changes by
<%= @fingerprint %>
Source changes by <%= @fingerprint %>
</h1>
<% route = fn p -> ~p"/fingerprint_profiles/#{@fingerprint}/source_changes?#{p}" end %>
<% pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @source_changes, route: route, conn: @conn) %>

View file

@ -1,14 +1,11 @@
<h1>
Tag changes by
<%= @fingerprint %>
Tag changes by <%= @fingerprint %>
</h1>
<% route = fn p -> ~p"/fingerprint_profiles/#{@fingerprint}/tag_changes?#{p}" end %>
<%
params =
if @conn.params["added"] do
[added: @conn.params["added"]]
end
%>
<% params =
if @conn.params["added"] do
[added: @conn.params["added"]]
end %>
<% pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params) %>
<div class="block">
<div class="block__header">

View file

@ -4,12 +4,10 @@
<div class="block">
<div class="block__header">
<a href={~p"/posts"}>
<i class="fa fa-fw fa-search"></i>
Search Posts
<i class="fa fa-fw fa-search"></i> Search Posts
</a>
<span class="block__header__item">
<%= @topic_count %>
topics
<%= @topic_count %> topics
</span>
</div>
<div class="block__content">
@ -51,9 +49,7 @@
<%= link(forum.last_post.topic.title, to: ~p"/forums/#{forum.last_post.topic.forum}/topics/#{forum.last_post.topic}") %>
</strong>
<br />
<%= link("Go to post", to: ~p"/forums/#{forum.last_post.topic.forum}/topics/#{forum.last_post.topic}?#{[post_id: forum.last_post.id]}" <> "#post_#{forum.last_post.id}") %>
by
<%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: forum.last_post, conn: @conn) %>
<%= link("Go to post", to: ~p"/forums/#{forum.last_post.topic.forum}/topics/#{forum.last_post.topic}?#{[post_id: forum.last_post.id]}" <> "#post_#{forum.last_post.id}") %> by <%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: forum.last_post, conn: @conn) %>
<br />
<%= pretty_time(forum.last_post.created_at) %>
<% end %>

View file

@ -4,20 +4,15 @@
</h1>
<div class="block">
<div class="block__header">
<%= link("Forums", to: ~p"/forums") %>
&raquo;
<%= link(@forum.name, to: ~p"/forums/#{@forum}") %>
<%= link("Forums", to: ~p"/forums") %> &raquo; <%= link(@forum.name, to: ~p"/forums/#{@forum}") %>
<a href={~p"/forums/#{@forum}/topics/new"}>
<i class="fa fa-fw fa-edit"></i>
New Topic
<i class="fa fa-fw fa-edit"></i> New Topic
</a>
<a href={~p"/posts?#{[pq: "forum:#{@forum.short_name}"]}"}>
<i class="fa fa-fw fa-search"></i>
Search Posts
<i class="fa fa-fw fa-search"></i> Search Posts
</a>
<span class="spacing-left">
<%= @forum.topic_count %>
topics
<%= @forum.topic_count %> topics
</span>
</div>
<div class="block__header--sub block__header--light page__header">
@ -61,10 +56,7 @@
<% end %>
<%= link(topic.title, to: ~p"/forums/#{@forum}/topics/#{topic}") %>
<div class="small-text">
Posted
<%= pretty_time(topic.created_at) %>
by
<%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic, conn: @conn) %>
Posted <%= pretty_time(topic.created_at) %> by <%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic, conn: @conn) %>
</div>
</td>
<td class="table--communication-list__stats hide-mobile">
@ -72,9 +64,7 @@
</td>
<td class="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) %>
<%= 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) %>
<% end %>

View file

@ -1,22 +1,20 @@
<%
watch_path = ~p"/forums/#{@forum}/subscription"
<% watch_path = ~p"/forums/#{@forum}/subscription"
watch_class =
if @watching do
"hidden"
else
""
end
watch_class =
if @watching do
"hidden"
else
""
end
unwatch_path = ~p"/forums/#{@forum}/subscription"
unwatch_path = ~p"/forums/#{@forum}/subscription"
unwatch_class =
if @watching do
""
else
"hidden"
end
%>
unwatch_class =
if @watching do
""
else
"hidden"
end %>
<%= if @conn.assigns.current_user do %>
<span class="js-subscription-target">
<a class={"js-subscription-link #{watch_class}"} data-method="post" data-remote="true" href={watch_path}>

View file

@ -1,7 +1,5 @@
<%
route = fn p -> ~p"/galleries?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @galleries, route: route, params: [gallery: @conn.params["gallery"]])
%>
<% route = fn p -> ~p"/galleries?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @galleries, route: route, params: [gallery: @conn.params["gallery"]]) %>
<div class="column-layout">
<div class="column-layout__left">
<div class="block">

View file

@ -1,10 +1,8 @@
<%
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)
%>
<% 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) %>
<div class={sortable_classes(@conn)} id="sortable">
<div class="block" id="imagelist-container">
<section class="block__header flex page__header">
@ -37,12 +35,10 @@
<% end %>
<%= if can?(@conn, :edit, @gallery) do %>
<a class="rearrange-button js-rearrange" data-click-hide=".js-rearrange" data-click-show=".js-save,#gallery-rearrange-info" href="#">
<i class="fa fa-sort"></i>
Rearrange
<i class="fa fa-sort"></i> Rearrange
</a>
<a class="rearrange-button js-save hidden" data-click-hide=".js-save,#gallery-rearrange-info" data-click-show=".js-rearrange" data-reorder-path={~p"/galleries/#{@gallery}/order"} href="#">
<i class="fa fa-check"></i>
Save
<i class="fa fa-check"></i> Save
</a>
<a data-confirm="Are you really, really sure?" data-method="delete" href={~p"/galleries/#{@gallery}"}>
<i class="fa fa-trash"></i>
@ -60,13 +56,10 @@
<span class="block__header__title">
A gallery by
</span>
<%= link(@gallery.creator.name, to: ~p"/profiles/#{@gallery.creator}") %>
with
<%= @gallery.image_count %>
<%= link(@gallery.creator.name, to: ~p"/profiles/#{@gallery.creator}") %> with <%= @gallery.image_count %>
<%= pluralize("image", "images", @gallery.image_count) %>
<span class="hide-mobile-t">
, last updated
<%= pretty_time(@gallery.updated_at) %>
, last updated <%= pretty_time(@gallery.updated_at) %>
</span>
</div>
<div class="block__content flex js-imagelist-info">
@ -89,8 +82,7 @@
</div>
<div class="block__content hidden" id="gallery-rearrange-info">
<div class="block block--fixed block--primary">
Click the image and drag.
<br />
Click the image and drag. <br />
<strong>
Note that you may have to wait a couple of seconds before the order is applied.
</strong>

View file

@ -1,22 +1,20 @@
<%
watch_path = ~p"/galleries/#{@gallery}/subscription"
<% watch_path = ~p"/galleries/#{@gallery}/subscription"
watch_class =
if @watching do
"hidden"
else
""
end
watch_class =
if @watching do
"hidden"
else
""
end
unwatch_path = ~p"/galleries/#{@gallery}/subscription"
unwatch_path = ~p"/galleries/#{@gallery}/subscription"
unwatch_class =
if @watching do
""
else
"hidden"
end
%>
unwatch_class =
if @watching do
""
else
"hidden"
end %>
<%= if @conn.assigns.current_user do %>
<span class="js-subscription-target">
<a class={"js-subscription-link #{watch_class}"} data-method="post" data-remote="true" href={watch_path}>

View file

@ -25,20 +25,48 @@
<%= if present do %>
<% # Options to remove %>
<li id={"gallery_#{gallery.id}"}>
<a class="block__list__link js-gallery-add hidden" data-fetchcomplete-hide={"#gallery_#{gallery.id} .js-gallery-add"} data-fetchcomplete-show={"#gallery_#{gallery.id} .js-gallery-remove"} data-method="post" data-remote="true" href={~p"/galleries/#{gallery}/images?#{[image_id: @image.id]}"}>
<a
class="block__list__link js-gallery-add hidden"
data-fetchcomplete-hide={"#gallery_#{gallery.id} .js-gallery-add"}
data-fetchcomplete-show={"#gallery_#{gallery.id} .js-gallery-remove"}
data-method="post"
data-remote="true"
href={~p"/galleries/#{gallery}/images?#{[image_id: @image.id]}"}
>
<%= gallery.title %>
</a>
<a class="block__list__link active js-gallery-remove" data-fetchcomplete-hide={"#gallery_#{gallery.id} .js-gallery-remove"} data-fetchcomplete-show={"#gallery_#{gallery.id} .js-gallery-add"} data-method="delete" data-remote="true" href={~p"/galleries/#{gallery}/images?#{[image_id: @image.id]}"}>
<a
class="block__list__link active js-gallery-remove"
data-fetchcomplete-hide={"#gallery_#{gallery.id} .js-gallery-remove"}
data-fetchcomplete-show={"#gallery_#{gallery.id} .js-gallery-add"}
data-method="delete"
data-remote="true"
href={~p"/galleries/#{gallery}/images?#{[image_id: @image.id]}"}
>
<%= gallery.title %>
</a>
</li>
<% else %>
<% # Options to add %>
<li id={"gallery_#{gallery.id}"}>
<a class="block__list__link js-gallery-add" data-fetchcomplete-hide={"#gallery_#{gallery.id} .js-gallery-add"} data-fetchcomplete-show={"#gallery_#{gallery.id} .js-gallery-remove"} data-method="post" data-remote="true" href={~p"/galleries/#{gallery}/images?#{[image_id: @image.id]}"}>
<a
class="block__list__link js-gallery-add"
data-fetchcomplete-hide={"#gallery_#{gallery.id} .js-gallery-add"}
data-fetchcomplete-show={"#gallery_#{gallery.id} .js-gallery-remove"}
data-method="post"
data-remote="true"
href={~p"/galleries/#{gallery}/images?#{[image_id: @image.id]}"}
>
<%= gallery.title %>
</a>
<a class="block__list__link active js-gallery-remove hidden" data-fetchcomplete-hide={"#gallery_#{gallery.id} .js-gallery-remove"} data-fetchcomplete-show={"#gallery_#{gallery.id} .js-gallery-add"} data-method="delete" data-remote="true" href={~p"/galleries/#{gallery}/images?#{[image_id: @image.id]}"}>
<a
class="block__list__link active js-gallery-remove hidden"
data-fetchcomplete-hide={"#gallery_#{gallery.id} .js-gallery-remove"}
data-fetchcomplete-show={"#gallery_#{gallery.id} .js-gallery-add"}
data-method="delete"
data-remote="true"
href={~p"/galleries/#{gallery}/images?#{[image_id: @image.id]}"}
>
<%= gallery.title %>
</a>
</li>

View file

@ -1,14 +1,12 @@
<div class="block">
<div class="block__header flex">
<span class="block__header__title">
<i class="fas fa-file-lines"></i>
Description
<i class="fas fa-file-lines"></i> Description
</span>
<%= if can?(@conn, :edit_description, @image) do %>
<div class="block__header__buttons">
<a accessKey="d" class="button button--inline" data-click-focus="#description" data-click-hide=".image-description" data-click-show="#description-form" href="#" id="edit-description" title="Edit description">
<i class="fas fa-edit"></i>
Edit
<i class="fas fa-edit"></i> Edit
</a>
</div>
<% end %>

View file

@ -1,19 +1,17 @@
<%
link = assigns[:link] || ~p"/images/#{@image}"
<% 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
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
%>
header_class =
case @size do
:thumb_small -> "media-box__header--small"
_ -> nil
end %>
<div class="media-box" data-image-id={@image.id}>
<div class={"media-box__header media-box__header--link-row #{header_class}"} data-image-id={@image.id}>
<a class="interaction--fave" data-image-id={@image.id} href="#" rel="nofollow">

View file

@ -70,38 +70,29 @@
</div>
<div class="stretched-mobile-links">
<a href={pretty_url(@image, false, false)} rel="nofollow" title="View (tags in filename)">
<i class="fa fa-eye"></i>
View
<i class="fa fa-eye"></i> View
</a>
<a href={pretty_url(@image, true, false)} rel="nofollow" title="View (no tags in filename)">
<i class="fa fa-eye"></i>
VS
<i class="fa fa-eye"></i> VS
</a>
<a href={pretty_url(@image, false, true)} rel="nofollow" title="Download (tags in filename)">
<i class="fa fa-download"></i>
Download
<i class="fa fa-download"></i> Download
</a>
<a href={pretty_url(@image, true, true)} title="Download (no tags in filename)">
<i class="fa fa-download"></i>
DS
<i class="fa fa-download"></i> DS
</a>
</div>
</div>
<div class="image-metabar flex flex--wrap block__header--user-credit center--layout" id="extrameta">
<div>
Uploaded
<%= pretty_time(@image.created_at) %>
Uploaded <%= pretty_time(@image.created_at) %>
<%= render(PhilomenaWeb.ImageView, "_uploader.html", assigns) %>
</div>
<span class="image-size">
&nbsp;
<%= @image.image_width %>
x
<%= @image.image_height %>
&nbsp; <%= @image.image_width %> x <%= @image.image_height %>
<%= if not is_nil(@image.image_duration) and @image.image_is_animated and @image.image_duration > 0 do %>
<span class="image-size" title={@image.image_duration}>
&nbsp;
<% dur = trunc(@image.image_duration) %>
&nbsp; <% dur = trunc(@image.image_duration) %>
<% ms = trunc((@image.image_duration - dur) * 100) %>
<% {mm, ss} = {div(dur, 60), rem(dur, 60)} %>
<%= :io_lib.format("~2..0B:~2..0B.~2..0B", [mm, ss, ms]) %>
@ -112,11 +103,9 @@
<% size_mb = Float.round(size_kb / 1000.0, 2) %>
<span title={"#{size_kb} kB"}>
<%= if size_kb <= 1000 do %>
<%= size_kb %>
kB
<%= size_kb %> kB
<% else %>
<%= size_mb %>
MB
<%= size_mb %> MB
<% end %>
</span>
</span>

View file

@ -9,11 +9,18 @@
<%= img_tag(static_path(@conn, "/images/tagblocked.svg"), width: 250, height: 250, data: [click_unfilter: @image.id]) %>
</p>
<span class="filter-explanation"></span>
<%= link("your current filter", to: ~p"/filters/#{@conn.assigns.current_filter}", class: "filter-link") %>
.
<%= link("your current filter", to: ~p"/filters/#{@conn.assigns.current_filter}", class: "filter-link") %> .
</div>
<%= if size == :full and not embed_display do %>
<div class="image-target hidden image-show" data-height={@image.image_height} data-image-size={@image.image_size} data-mime-type={@image.image_mime_type} data-scaled={scaled_value(@conn.assigns.current_user)} data-uris={Jason.encode!(thumb_urls(@image, can?(@conn, :hide, @image)))} data-width={@image.image_width}>
<div
class="image-target hidden image-show"
data-height={@image.image_height}
data-image-size={@image.image_size}
data-mime-type={@image.image_mime_type}
data-scaled={scaled_value(@conn.assigns.current_user)}
data-uris={Jason.encode!(thumb_urls(@image, can?(@conn, :hide, @image)))}
data-width={@image.image_width}
>
<%= if @image.image_mime_type == "video/webm" do %>
<video controls></video>
<% else %>

View file

@ -2,21 +2,17 @@
<div id="image_options_area">
<div class="block__header block__header--js-tabbed">
<a data-click-tab="reporting" data-load-tab={~p"/images/#{@image}/reporting"} href="#">
<i class="fa fa-exclamation-triangle"></i>
Report
<i class="fa fa-exclamation-triangle"></i> Report
</a>
<a data-click-tab="sharing" href="#">
<i class="fa fa-share"></i>
Share
<i class="fa fa-share"></i> Share
</a>
<a data-click-tab="favoriters" data-load-tab={~p"/images/#{@image}/favorites"} href="#">
<i class="fa fa-star"></i>
List favoriters
<i class="fa fa-star"></i> List favoriters
</a>
<%= if display_mod_tools? and not hide_staff_tools?(@conn) do %>
<a data-click-tab="replace" href="#">
<i class="fa fa-upload"></i>
Replace
<i class="fa fa-upload"></i> Replace
</a>
<a data-click-tab="administration" href="#">
<i class="fa fa-toolbox"></i>
@ -40,14 +36,12 @@
</div>
<div class="block__tab hidden" data-tab="sharing">
<div id="embed_options">
<%
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
%>
<% 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 %>
<h5>
Derpibooru
</h5>
@ -57,8 +51,7 @@
</strong>
<input class="input" cols="10" id="embed_small_thumbnail_tag" readonly="readonly" type="text" value={">>#{@image.id}s"} />
<a data-click-copy="#embed_small_thumbnail_tag" href="#">
<i class="fa fa-clipboard"></i>
Copy
<i class="fa fa-clipboard"></i> Copy
</a>
</p>
<p>
@ -67,8 +60,7 @@
</strong>
<input class="input" cols="10" id="embed_thumbnail_tag" readonly="readonly" type="text" value={">>#{@image.id}t"} />
<a data-click-copy="#embed_thumbnail_tag" href="#">
<i class="fa fa-clipboard"></i>
Copy
<i class="fa fa-clipboard"></i> Copy
</a>
</p>
<p>
@ -77,8 +69,7 @@
</strong>
<input class="input" cols="10" id="embed_preview_tag" readonly="readonly" type="text" value={">>#{@image.id}p"} />
<a data-click-copy="#embed_preview_tag" href="#">
<i class="fa fa-clipboard"></i>
Copy
<i class="fa fa-clipboard"></i> Copy
</a>
</p>
<h5>
@ -89,8 +80,7 @@
Full size BBcode
</strong>
<a data-click-copy="#bbcode_embed_full_tag" href="#">
<i class="fa fa-clipboard"></i>
Copy
<i class="fa fa-clipboard"></i> Copy
</a>
<br />
<textarea class="input input--wide input--separate-top" cols="100" id="bbcode_embed_full_tag" readonly="readonly" rows="2">
@ -105,8 +95,7 @@
Thumbnailed BBcode
</strong>
<a data-click-copy="#bbcode_embed_thumbnail_tag" href="#">
<i class="fa fa-clipboard"></i>
Copy
<i class="fa fa-clipboard"></i> Copy
</a>
<br />
<textarea class="input input--wide input--separate-top" cols="100" id="bbcode_embed_thumbnail_tag" readonly="readonly" rows="2">

View file

@ -25,16 +25,14 @@
<%= error_tag(fs, :source) %>
<label class="input--separate-left flex__fixed flex--centered">
<a class="js-source-remove" href="#">
<i class="fa fa-trash"></i>
Delete
<i class="fa fa-trash"></i> Delete
</a>
</label>
</div>
<% end %>
<div class="field">
<button class="button js-image-add-source" type="button">
<i class="fa fa-plus"></i>
Add source
<i class="fa fa-plus"></i> Add source
</button>
<%= submit("Save sources", class: "button button--separate-left") %>
<button class="button button--separate-left" data-click-hide="#source-form" data-click-show="#image-source" type="reset">
@ -73,16 +71,13 @@
<spanspan class="hide-mobile">
History
</spanspan>
(
<%= @source_change_count %>
)
( <%= @source_change_count %> )
</a>
<% end %>
<%= if can?(@conn, :hide, @image) and not hide_staff_tools?(@conn) do %>
<%= form_for @changeset, ~p"/images/#{@image}/source_history", [method: "delete"], fn _f -> %>
<a class="button button--state-danger button--inline" data-confirm="Are you really, really sure?" title="Wipe sources" type="submit">
<i class="fas fa-eraser"></i>
Wipe
<i class="fas fa-eraser"></i> Wipe
</a>
<% end %>
<% end %>

View file

@ -1,11 +1,9 @@
<%
form_class =
if @changeset.action do
""
else
"hidden"
end
%>
<% form_class =
if @changeset.action do
""
else
"hidden"
end %>
<% tags = display_order(@image.tags) %>
<% tag_input = Enum.map_join(tags, ", ", & &1.name) %>
<div class="js-tagsauce" id="image_tags_and_source">
@ -51,8 +49,7 @@
Hang on a sec&hellip;
</em>
</strong>
<br />
Make sure you have read and understood our
<br /> Make sure you have read and understood our
<a href="/pages/tags">
tagging guidelines
</a>
@ -85,20 +82,15 @@
<div class="block tagsauce">
<div class="block__header flex">
<span class="block__header__title">
<i class="fas fa-tag"></i>
Tags
<i class="fas fa-tag"></i> Tags
</span>
<div class="block__header__buttons">
<a accessKey="t" class="button button--inline js-tag-sauce-toggle" data-click-focus=".js-taginput-plain:not(.hidden), .js-taginput-input" data-click-toggle=".tagsauce, .js-imageform" id="edit-tags" title="Edit tags">
<i class="fas fa-edit"></i>
Edit
<i class="fas fa-edit"></i> Edit
</a>
<%= if @tag_change_count > 0 do %>
<a class="button button--link button--inline" href={~p"/images/#{@image}/tag_changes"} title="Tag history">
<i class="fa fa-history"></i>
History (
<%= @tag_change_count %>
)
<i class="fa fa-history"></i> History ( <%= @tag_change_count %> )
</a>
<% end %>
</div>

View file

@ -1,6 +1,5 @@
<span class="image_uploader">
by
<%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @image, awards: true, conn: @conn) %>
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) %>

View file

@ -1,11 +1,9 @@
<%
options =
if assigns[:remote] do
[data: [remote: "true"], id: "js-comment-form"]
else
[]
end
%>
<% 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 %>
<div class="alert alert-danger">

View file

@ -1,10 +1,7 @@
<h1>
Viewing last 25 versions of comment by
<%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @comment, conn: @conn) %>
on image
Viewing last 25 versions of comment by <%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: @comment, conn: @conn) %> on image
<a href={~p"/images/#{@comment.image}"}>
#
<%= @comment.image_id %>
# <%= @comment.image_id %>
</a>
</h1>
<%= for version <- @versions do %>
@ -41,17 +38,13 @@
<div class="flex flex--wrap flex--spaced-out">
<div>
<%= if version.edit_reason not in [nil, ""] do %>
Reason:
<%= version.edit_reason %>
Reason: <%= version.edit_reason %>
<% else %>
No reason given
<% end %>
</div>
<div class="flex__right">
Edited
<%= pretty_time(version.created_at) %>
by
<%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: version, conn: @conn) %>
Edited <%= pretty_time(version.created_at) %> by <%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: version, conn: @conn) %>
</div>
</div>
</div>

View file

@ -1,7 +1,5 @@
<%
route = fn p -> ~p"/images/#{@image}/comments?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @comments, route: route)
%>
<% route = fn p -> ~p"/images/#{@image}/comments?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @comments, route: route) %>
<div class="block">
<div class="block__header page__header">
<div class="page__pagination">
@ -10,8 +8,7 @@
<div class="page__info">
<span class="block__header__title">
<%= @image.comments_count %>
<%= pluralize("comment", "comments", @image.comments_count) %>
posted
<%= pluralize("comment", "comments", @image.comments_count) %> posted
</span>
<button class="button" data-disable-with="..." id="js-refresh-comments" title="Refresh">
<i class="fa fa-sync"></i>

View file

@ -5,9 +5,7 @@
This image has been merged into another image
</h1>
<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.
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.
</p>
</div>
</div>
@ -36,16 +34,10 @@
<% end %>
</div>
<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.
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>
<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.
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.
</p>
</div>
<% end %>

View file

@ -1,6 +1,5 @@
<h5>
Faved by
<%= @image.faves_count %>
Faved by <%= @image.faves_count %>
<%= pluralize("user", "users", @image.faves_count) %>
</h5>
<%= for fave <- Enum.sort_by(@image.faves, & String.downcase(&1.user.name)) do %>
@ -8,8 +7,7 @@
<% end %>
<%= if @has_votes do %>
<h5>
Upvoted by
<%= @image.upvotes_count %>
Upvoted by <%= @image.upvotes_count %>
<%= pluralize("user", "users", @image.upvotes_count) %>
</h5>
<%= for upvote <- Enum.sort_by(@image.upvotes, & String.downcase(&1.user.name)) do %>
@ -19,8 +17,7 @@
</span>
<% end %>
<h5>
Downvoted by
<%= @image.downvotes_count %>
Downvoted by <%= @image.downvotes_count %>
<%= pluralize("user", "users", @image.downvotes_count) %>
</h5>
<%= for downvote <- Enum.sort_by(@image.downvotes, & String.downcase(&1.user.name)) do %>
@ -30,8 +27,7 @@
</span>
<% end %>
<h5>
Hidden by
<%= @image.hides_count %>
Hidden by <%= @image.hides_count %>
<%= pluralize("user", "users", @image.hides_count) %>
</h5>
<%= for hide <- Enum.sort_by(@image.hides, & String.downcase(&1.user.name)) do %>

View file

@ -1,14 +1,12 @@
<%
header = assigns[:header] || ""
params = assigns[:params] || assigns[:scope] || []
scope = assigns[:scope] || []
tags = assigns[:tags] || []
route = assigns[:route] || fn p -> ~p"/images?#{p}" end
image_url = fn image -> ~p"/images/#{image}?#{scope}" end
sorted_url = fn image, hit -> ~p"/images/#{image}?#{Keyword.put(scope, :sort, hit["sort"])}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @images, route: route, params: params)
info = render(PhilomenaWeb.PaginationView, "_pagination_info.html", page: @images)
%>
<% header = assigns[:header] || ""
params = assigns[:params] || assigns[:scope] || []
scope = assigns[:scope] || []
tags = assigns[:tags] || []
route = assigns[:route] || fn p -> ~p"/images?#{p}" end
image_url = fn image -> ~p"/images/#{image}?#{scope}" end
sorted_url = fn image, hit -> ~p"/images/#{image}?#{Keyword.put(scope, :sort, hit["sort"])}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @images, route: route, params: params)
info = render(PhilomenaWeb.PaginationView, "_pagination_info.html", page: @images) %>
<div class="block" id="imagelist-container">
<section class="block__header page__header flex">
<span class="block__header__title page__title hide-mobile">

View file

@ -69,16 +69,14 @@
<%= error_tag(fs, :source) %>
<label class="input--separate-left flex__fixed flex--centered">
<a class="js-source-remove" href="#">
<i class="fa fa-trash"></i>
Delete
<i class="fa fa-trash"></i> Delete
</a>
</label>
</div>
<% end %>
<div class="field">
<button class="button js-image-add-source" type="button">
<i class="fa fa-plus"></i>
Add source
<i class="fa fa-plus"></i> Add source
</button>
</div>
<div class="field">
@ -111,18 +109,16 @@
<div class="field">
<div class="block">
<div class="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, "_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
) %>
</div>
</div>
</div>

View file

@ -3,8 +3,7 @@
<div class="block__header__title hide-mobile">
Viewing related images for
<strong>
#
<%= @image.id %>
# <%= @image.id %>
</strong>
</div>
</div>

View file

@ -1,7 +1,6 @@
<a href={~p"/images/#{@image}/reports/new"}>
<button class="button button--link">
<i class="fa fa-exclamation-triangle"></i>
General reporting
<i class="fa fa-exclamation-triangle"></i> General reporting
</button>
</a>
<div class="report-duplicate">

View file

@ -1,6 +1,5 @@
<h1>
Editing moderation notes for image
<%= link("##{@image.id}", to: ~p"/images/#{@image}") %>
Editing moderation notes for image <%= link("##{@image.id}", to: ~p"/images/#{@image}") %>
</h1>
<%= form_for @changeset, ~p"/images/#{@image}/scratchpad", fn f -> %>
<div class="field">

View file

@ -1,8 +1,7 @@
<h1>
Source changes for
<a href={~p"/images/#{@image}"}>
image #
<%= @image.id %>
image # <%= @image.id %>
</a>
</h1>
<% route = fn p -> ~p"/images/#{@image}/source_changes?#{p}" end %>

View file

@ -1,36 +1,31 @@
<%
watch_path = ~p"/images/#{@image}/subscription"
<% watch_path = ~p"/images/#{@image}/subscription"
watch_class =
if @watching do
"hidden"
else
""
end
watch_class =
if @watching do
"hidden"
else
""
end
unwatch_path = ~p"/images/#{@image}/subscription"
unwatch_path = ~p"/images/#{@image}/subscription"
unwatch_class =
if @watching do
""
else
"hidden"
end
%>
unwatch_class =
if @watching do
""
else
"hidden"
end %>
<%= if @conn.assigns.current_user do %>
<span class="js-subscription-target">
<a class={"js-subscription-link #{watch_class}"} data-method="post" data-remote="true" href={watch_path}>
<i class="fa fa-bell"></i>
Subscribe
<i class="fa fa-bell"></i> Subscribe
</a>
<a class={"js-subscription-link #{unwatch_class}"} data-method="delete" data-remote="true" href={unwatch_path}>
<i class="fa fa-bell-slash"></i>
Unsubscribe
<i class="fa fa-bell-slash"></i> Unsubscribe
</a>
</span>
<% else %>
<a href={~p"/sessions/new"}>
<i class="fa fa-bell"></i>
Subscribe
<i class="fa fa-bell"></i> Subscribe
</a>
<% end %>

View file

@ -1,17 +1,14 @@
<h1>
Tag changes for
<a href={~p"/images/#{@image}"}>
image #
<%= @image.id %>
image # <%= @image.id %>
</a>
</h1>
<% route = fn p -> ~p"/images/#{@image}/tag_changes?#{p}" end %>
<%
params =
if @conn.params["added"] do
[added: @conn.params["added"]]
end
%>
<% params =
if @conn.params["added"] do
[added: @conn.params["added"]]
end %>
<% pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params) %>
<div class="block">
<div class="block__header">

View file

@ -1,7 +1,6 @@
<% tag_input = Enum.map_join(@image.locked_tags, ", ", & &1.name) %>
<h1>
Editing locked tags on image #
<%= @image.id %>
Editing locked tags on image # <%= @image.id %>
</h1>
<%= form_for @changeset, ~p"/images/#{@image}/tag_lock", fn f -> %>
<div class="field">

View file

@ -1,6 +1,5 @@
<h1>
<%= @ip %>
's IP profile
<%= @ip %> 's IP profile
</h1>
<ul>
<li>
@ -42,12 +41,10 @@
<%= 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>
<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"]
)
%>
<%= 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"]
) %>
</li>
</ul>
<h4>
@ -77,8 +74,7 @@
<%= link(uip.user.name, to: ~p"/profiles/#{uip.user}") %>
</td>
<td>
<%= uip.uses %>
times
<%= uip.uses %> times
</td>
<td>
<%= pretty_time(uip.updated_at) %>

View file

@ -1,6 +1,5 @@
<h1>
Source changes by
<%= @ip %>
Source changes by <%= @ip %>
</h1>
<% route = fn p -> ~p"/ip_profiles/#{to_string(@ip)}/source_changes?#{p}" end %>
<% pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @source_changes, route: route, conn: @conn) %>

View file

@ -1,14 +1,11 @@
<h1>
Tag changes by
<%= @ip %>
Tag changes by <%= @ip %>
</h1>
<% route = fn p -> ~p"/ip_profiles/#{to_string(@ip)}/tag_changes?#{p}" end %>
<%
params =
if @conn.params["added"] do
[added: @conn.params["added"]]
end
%>
<% params =
if @conn.params["added"] do
[added: @conn.params["added"]]
end %>
<% pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params) %>
<div class="block">
<div class="block__header">

View file

@ -1,46 +1,35 @@
<nav id="burger">
<a href="/">
<i class="fa-fw favicon-home"></i>
Home
<i class="fa-fw favicon-home"></i> Home
</a>
<a href="/images/new">
<i class="fa fa-fw fa-upload"></i>
Upload
<i class="fa fa-fw fa-upload"></i> Upload
</a>
<a href="/forums">
<i class="fas fa-fw fa-pen-square"></i>
Forums
<i class="fas fa-fw fa-pen-square"></i> Forums
</a>
<a href="/tags">
<i class="fa fa-fw fa-tag"></i>
Tags
<i class="fa fa-fw fa-tag"></i> Tags
</a>
<a href="/search?q=first_seen_at.gt:3 days ago&amp;sf=wilson_score&amp;sd=desc">
<i class="fas fa-fw fa-poll"></i>
Rankings
<i class="fas fa-fw fa-poll"></i> Rankings
</a>
<a href="/filters">
<i class="fa fa-fw fa-filter"></i>
Filters
<i class="fa fa-fw fa-filter"></i> Filters
</a>
<a href="/galleries">
<i class="fa fa-fw fa-image"></i>
Galleries
<i class="fa fa-fw fa-image"></i> Galleries
</a>
<a href="/comments">
<i class="fa fa-fw fa-comments"></i>
Comments
<i class="fa fa-fw fa-comments"></i> Comments
</a>
<a href="/commissions">
<i class="fa fa-fw fa-address-card"></i>
Commissions
<i class="fa fa-fw fa-address-card"></i> Commissions
</a>
<a href="/channels">
<i class="fa fa-fw fa-podcast"></i>
Channels
<i class="fa fa-fw fa-podcast"></i> Channels
</a>
<a href="/pages/donations">
<i class="fa fa-fw fa-heart"></i>
Donate
<i class="fa fa-fw fa-heart"></i> Donate
</a>
</nav>

View file

@ -15,9 +15,7 @@
<strong>
You don't appear to have Javascript enabled
</strong>
If you're using an add-on like NoScript, please allow
<%= cdn_host() %>
for the site to work properly.
If you're using an add-on like NoScript, please allow <%= cdn_host() %> for the site to work properly.
</noscript>
<%= if get_flash(@conn, :info) do %>
<div class="flash flash--success">

View file

@ -9,12 +9,12 @@
<%= for row <- footer_data[column] do %>
<%= if row["bold"] do %>
<strong>
<a href={row["url"]} target={row["target"]||"_self"}>
<a href={row["url"]} target={row["target"] || "_self"}>
<%= row["title"] %>
</a>
</strong>
<% else %>
<a href={row["url"]} target={row["target"]||"_self"}>
<a href={row["url"]} target={row["target"] || "_self"}>
<%= row["title"] %>
</a>
<% end %>
@ -28,8 +28,6 @@
<a href="https://github.com/philomena-dev/philomena">
philomena
</a>
(
<%= render_time(@conn) %>
ms)
( <%= render_time(@conn) %> ms)
</div>
</footer>

View file

@ -17,7 +17,15 @@
</a>
</div>
<%= form_for @conn, ~p"/search", [method: "get", class: "header__search flex flex--no-wrap flex--centered", enforce_utf8: false], fn f -> %>
<input autocapitalize="none" class="input header__input header__input--search" id="q" name="q" placeholder="Search" title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help." value={@conn.params["q"]} />
<input
autocapitalize="none"
class="input header__input header__input--search"
id="q"
name="q"
placeholder="Search"
title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help."
value={@conn.params["q"]}
/>
<%= if present?(@conn.params["sf"]) do %>
<input name="sf" type="hidden" value={@conn.params["sf"]} />
<% end %>
@ -83,65 +91,50 @@
<%= @current_user.name %>
</a>
<a class="header__link" href="/search?q=my:watched">
<i class="fa fa-fw fa-eye"></i>
Watched
<i class="fa fa-fw fa-eye"></i> Watched
</a>
<a class="header__link" href="/search?q=my:faves">
<i class="fa fa-fw fa-star"></i>
Faves
<i class="fa fa-fw fa-star"></i> Faves
</a>
<a class="header__link" href="/search?q=my:upvotes">
<i class="fa fa-fw fa-arrow-up"></i>
Upvotes
<i class="fa fa-fw fa-arrow-up"></i> Upvotes
</a>
<a class="header__link" href={~p"/galleries?#{[gallery: [creator: @current_user.name]]}"}>
<i class="fa fa-fw fa-image"></i>
Galleries
<i class="fa fa-fw fa-image"></i> Galleries
</a>
<a class="header__link" href="/search?q=my:uploads">
<i class="fa fa-fw fa-upload"></i>
Uploads
<i class="fa fa-fw fa-upload"></i> Uploads
</a>
<a class="header__link" href="/comments?cq=my:comments">
<i class="fa fa-fw fa-comments"></i>
Comments
<i class="fa fa-fw fa-comments"></i> Comments
</a>
<a class="header__link" href="/posts?pq=my:posts">
<i class="fas fa-fw fa-pen-square"></i>
Posts
<i class="fas fa-fw fa-pen-square"></i> Posts
</a>
<a class="header__link" href={~p"/profiles/#{@current_user}/artist_links"}>
<i class="fa fa-fw fa-link"></i>
Links
<i class="fa fa-fw fa-link"></i> Links
</a>
<a class="header__link" href="/settings/edit">
<i class="fa fa-fw fa-cogs"></i>
Settings
<i class="fa fa-fw fa-cogs"></i> Settings
</a>
<a class="header__link" href="/conversations">
<i class="fa fa-fw fa-envelope"></i>
Messages
<i class="fa fa-fw fa-envelope"></i> Messages
</a>
<a class="header__link" href={~p"/registrations/edit"}>
<i class="fa fa-fw fa-user"></i>
Account
<i class="fa fa-fw fa-user"></i> Account
</a>
<a class="header__link" data-method="delete" href={~p"/sessions"}>
<i class="fa fa-fw fa-sign-out-alt"></i>
Logout
<i class="fa fa-fw fa-sign-out-alt"></i> Logout
</a>
</nav>
</div>
<% else %>
<a class="header__link hide-mobile" href="/filters">
Filters (
<%= @current_filter.name %>
)
Filters ( <%= @current_filter.name %> )
</a>
<span class="js-burger-links hide-mobile">
<a class="header__link" href="/settings/edit">
<i class="fa fa-fw fa-cogs hide-desktop"></i>
Settings
<i class="fa fa-fw fa-cogs hide-desktop"></i> Settings
</a>
</span>
<a class="header__link" href={~p"/registrations/new"}>

View file

@ -39,8 +39,7 @@
</a>
<% end %>
<a class="header__link" href="/posts">
<i class="fa fa-fw fa-search"></i>
Post Search
<i class="fa fa-fw fa-search"></i> Post Search
</a>
</div>
</div>

View file

@ -2,56 +2,47 @@
<%= if manages_users?(@conn) do %>
<div class="dropdown hide-mobile">
<a class="header__link" title="Admin">
A
<i class="fa fa-caret-down"></i>
A <i class="fa fa-caret-down"></i>
</a>
<div class="dropdown__content js-burger-links">
<%= if manages_site_notices?(@conn) do %>
<%= link to: ~p"/admin/site_notices", class: "header__link" do %>
<i class="fa fa-fw fa-info-circle"></i>
Site Notices
<i class="fa fa-fw fa-info-circle"></i> Site Notices
<% end %>
<% end %>
<%= if manages_users?(@conn) do %>
<%= link to: ~p"/admin/users", class: "header__link" do %>
<i class="fa fa-fw fa-users"></i>
Users
<i class="fa fa-fw fa-users"></i> Users
<% end %>
<% end %>
<%= if manages_forums?(@conn) do %>
<%= link to: ~p"/admin/forums", class: "header__link" do %>
<i class="fa fa-fw fa-paragraph"></i>
Forums
<i class="fa fa-fw fa-paragraph"></i> Forums
<% end %>
<% end %>
<%= if manages_ads?(@conn) do %>
<%= link to: ~p"/admin/adverts", class: "header__link" do %>
<i class="fa fa-fw fa-shopping-bag"></i>
Adverts
<i class="fa fa-fw fa-shopping-bag"></i> Adverts
<% end %>
<% end %>
<%= if manages_badges?(@conn) do %>
<%= link to: ~p"/admin/badges", class: "header__link" do %>
<i class="fa fa-fw fa-trophy"></i>
Badges
<i class="fa fa-fw fa-trophy"></i> Badges
<% end %>
<% end %>
<%= if manages_static_pages?(@conn) do %>
<%= link to: ~p"/pages", class: "header__link" do %>
<i class="fa fa-fw fa-sticky-note"></i>
Pages
<i class="fa fa-fw fa-sticky-note"></i> Pages
<% end %>
<% end %>
<%= if manages_mod_notes?(@conn) do %>
<%= link to: ~p"/admin/mod_notes", class: "header__link" do %>
<i class="fa fa-fw fa-clipboard"></i>
Mod Notes
<i class="fa fa-fw fa-clipboard"></i> Mod Notes
<% end %>
<% end %>
<%= if can_see_moderation_log?(@conn) do %>
<%= link to: ~p"/moderation_logs", class: "header__link" do %>
<i class="fa fa-fw fa-list-alt"></i>
Mod Logs
<i class="fa fa-fw fa-list-alt"></i> Mod Logs
<% end %>
<% end %>
</div>
@ -100,21 +91,17 @@
<%= if manages_bans?(@conn) do %>
<div class="dropdown hide-mobile">
<a class="header__link" title="Bans">
B
<i class="fa fa-caret-down"></i>
B <i class="fa fa-caret-down"></i>
</a>
<div class="dropdown__content dropdown__content-right js-burger-links">
<%= link to: ~p"/admin/user_bans", class: "header__link" do %>
<i class="fa fa-fw fa-user"></i>
User Bans
<i class="fa fa-fw fa-user"></i> User Bans
<% end %>
<%= link to: ~p"/admin/subnet_bans", class: "header__link" do %>
<i class="fab fa-fw fa-internet-explorer"></i>
IP Bans
<i class="fab fa-fw fa-internet-explorer"></i> IP Bans
<% end %>
<%= link to: ~p"/admin/fingerprint_bans", class: "header__link" do %>
<i class="fa fa-fw fa-desktop"></i>
FP Bans
<i class="fa fa-fw fa-desktop"></i> FP Bans
<% end %>
</div>
</div>

View file

@ -5,8 +5,7 @@
<%= viewport_meta_tag(@conn) %>
<title>
<%= if assigns[:title] do %>
<%= assigns[:title] %>
- Derpibooru
<%= assigns[:title] %> - Derpibooru
<% else %>
Derpibooru
<% end %>
@ -22,10 +21,13 @@
<meta content="telephone=no" name="format-detection" />
<%= csrf_meta_tag() %>
<%= vite_hmr? do %>
<script src="http://localhost:5173/@vite/client" type="module"></script>
<script src="http://localhost:5173/js/app.js" type="module"></script>
<script src="http://localhost:5173/@vite/client" type="module">
</script>
<script src="http://localhost:5173/js/app.js" type="module">
</script>
<% else %>
<script async="async" src={~p"/js/app.js"} type="text/javascript"></script>
<script async="async" src={~p"/js/app.js"} type="text/javascript">
</script>
<% end %>
<%= render(PhilomenaWeb.LayoutView, "_opengraph.html", assigns) %>
</head>

View file

@ -11,9 +11,8 @@
<%= action_text %>
</a>
<a data-click-tab="preview" href="#">
<i class="fa fa-cog fa-fw fa-spin js-preview-loading hidden" title={raw('Loading preview&hellip;')}></i>
<i class="fa fa-eye fa-fw js-preview-idle"></i>
Preview
<i class="fa fa-cog fa-fw fa-spin js-preview-loading hidden" title={raw(~c"Loading preview&hellip;")}></i>
<i class="fa fa-eye fa-fw js-preview-idle"></i> Preview
</a>
</div>
<div class="block__tab communication-edit__tab selected js-preview-input-wrapper" data-tab="write">

View file

@ -3,16 +3,14 @@
<div class="block__content">
<div class="block block--fixed block--danger">
<p>
<i class="fas fa-exclamation-triangle"></i>
This private message is pending approval from a staff member.
<i class="fas fa-exclamation-triangle"></i> This private message is pending approval from a staff member.
</p>
<%= if can?(@conn, :approve, @message) do %>
<p>
<ul class="horizontal-list">
<li>
<%= link(to: ~p"/conversations/#{@message.conversation_id}/messages/#{@message}/approve", data: [confirm: "Are you sure?"], method: "post", class: "button") do %>
<i class="fas fa-check"></i>
Approve
<i class="fas fa-check"></i> Approve
<% end %>
</li>
</ul>
@ -39,8 +37,7 @@
<div class="block__content communication__options">
<div class="flex flex--wrap flex--spaced-out">
<div>
Posted
<%= pretty_time(@message.created_at) %>
Posted <%= pretty_time(@message.created_at) %>
</div>
</div>
</div>

View file

@ -1,7 +1,5 @@
<%
route = fn p -> ~p"/moderation_logs?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @moderation_logs, route: route, conn: @conn)
%>
<% route = fn p -> ~p"/moderation_logs?#{p}" end
pagination = render(PhilomenaWeb.PaginationView, "_pagination.html", page: @moderation_logs, route: route, conn: @conn) %>
<h1>
Listing Moderation Logs
</h1>
@ -49,8 +47,7 @@
</td>
<td>
<%= link to: log.subject_path do %>
<i class="fa fa-eye"></i>
View subject
<i class="fa fa-eye"></i> View subject
<% end %>
</td>
</tr>

View file

@ -3,13 +3,11 @@
<div class="flex flex--centered flex__grow">
<div>
<%= render(PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic, conn: @conn) %>
<%= @notification.action %>
titled
<%= @notification.action %> titled
<strong>
<%= link(topic.title, to: ~p"/forums/#{forum}/topics/#{topic}") %>
</strong>
in
<%= link(forum.name, to: ~p"/forums/#{forum}") %>
in <%= link(forum.name, to: ~p"/forums/#{forum}") %>
<%= pretty_time(@notification.updated_at) %>
</div>
</div>

View file

@ -1,6 +1,5 @@
<h1>
Revision history for
<%= link(@static_page.title, to: ~p"/pages/#{@static_page}") %>
Revision history for <%= link(@static_page.title, to: ~p"/pages/#{@static_page}") %>
</h1>
<table class="table">
<thead>

View file

@ -2,18 +2,15 @@
<%= @static_page.title %>
</h1>
<p>
Last updated
<%= pretty_time(@static_page.updated_at) %>
Last updated <%= pretty_time(@static_page.updated_at) %>
</p>
<p>
<%= link to: ~p"/pages/#{@static_page}/history" do %>
<i class="fa fa-history"></i>
Revision history
<i class="fa fa-history"></i> Revision history
<% end %>
<%= if can?(@conn, :edit, Philomena.StaticPages.StaticPage) do %>
<%= link to: ~p"/pages/#{@static_page}/edit" do %>
<i class="fa fa-edit"></i>
Edit
<i class="fa fa-edit"></i> Edit
<% end %>
<% end %>
</p>

View file

@ -1,10 +1,7 @@
<%= if @page.total_entries > 0 do %>
Showing
<%= pluralize("result", "results", @page.total_entries) %>
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) %>
<%= max((@page.page_number - 1) * @page.page_size, 0) + 1 %> - <%= min(@page.page_number * @page.page_size, @page.total_entries) %>
</strong>
of
<strong>

View file

@ -3,22 +3,19 @@
<div class="block__content">
<div class="block block--fixed block--danger">
<p>
<i class="fas fa-exclamation-triangle"></i>
This post is pending approval from a staff member.
<i class="fas fa-exclamation-triangle"></i> This post is pending approval from a staff member.
</p>
<%= if can?(@conn, :approve, @post) do %>
<p>
<ul class="horizontal-list">
<li>
<%= link(to: ~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/approve", data: [confirm: "Are you sure?"], method: "post", class: "button") do %>
<i class="fas fa-check"></i>
Approve
<i class="fas fa-check"></i> Approve
<% end %>
</li>
<li>
<a class="button togglable-delete-form-link" data-click-toggle={"#inline-reject-form-post-#{@post.id}"} href="#">
<i class="fa fa-times"></i>
Reject
<i class="fa fa-times"></i> Reject
</a>
</li>
</ul>
@ -44,12 +41,9 @@
<div class="communication__body__text">
<%= if @post.hidden_from_users do %>
<strong class="comment_deleted">
Deletion reason:
<%= @post.deletion_reason %>
Deletion reason: <%= @post.deletion_reason %>
<%= if can?(@conn, :hide, @post) and not is_nil(@post.deleted_by) do %>
(
<%= @post.deleted_by.name %>
)
( <%= @post.deleted_by.name %> )
<% end %>
</strong>
<%= if can?(@conn, :hide, @post) do %>
@ -81,15 +75,13 @@
Restore
<%= if can?(@conn, :delete, @post) do %>
<%= link(to: ~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/delete", data: [confirm: "Are you sure?"], method: "post", class: "communication__interaction") do %>
<i class="fas fa-times"></i>
Delete Contents
<i class="fas fa-times"></i> Delete Contents
<% end %>
<% end %>
<% end %>
<% not @post.hidden_from_users and not @post.destroyed_content -> %>
<a class="communication__interaction togglable-delete-form-link" data-click-toggle={"#inline-del-form-post-#{@post.id}"} href="#">
<i class="fa fa-times"></i>
Delete
<i class="fa fa-times"></i> Delete
</a>
<% true -> %>
<% end %>

View file

@ -1,18 +1,14 @@
<div>
Posted
<%= pretty_time(@post.created_at) %>
Posted <%= pretty_time(@post.created_at) %>
<a class="communication__interaction" href={~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/reports/new"}>
<i class="fa fa-flag"></i>
Report
<i class="fa fa-flag"></i> Report
</a>
<%= if not is_nil(@post.edited_at) and can?(@conn, :show, @post) do %>
<br />
<a href={~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/history"}>
Edited
<%= pretty_time(@post.edited_at) %>
Edited <%= pretty_time(@post.edited_at) %>
<%= if @post.edit_reason not in [nil, ""] do %>
because:
<%= @post.edit_reason %>
because: <%= @post.edit_reason %>
<% end %>
</a>
<% end %>
@ -20,32 +16,26 @@
<div>
<% link_path = ~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}?#{[post_id: @post.id]}" <> "#post_#{@post.id}" %>
<% safe_author = markdown_safe_author(@post) %>
<%
quote_body =
if @post.hidden_from_users do
""
else
@post.body
end
%>
<% quote_body =
if @post.hidden_from_users do
""
else
@post.body
end %>
<a class="communication__interaction" href={link_path} title="Link to post">
<i class="fa fa-link"></i>
Link
<i class="fa fa-link"></i> Link
</a>
<a class="communication__interaction post-reply post-reply-quote" data-author={safe_author} data-post={quote_body} data-reply-url={link_path} href={link_path}>
<i class="fa fa-quote-right"></i>
Quote
<i class="fa fa-quote-right"></i> Quote
</a>
<a class="communication__interaction post-reply" data-author={safe_author} data-reply-url={link_path} href={link_path}>
<i class="fa fa-reply"></i>
Reply
<i class="fa fa-reply"></i> Reply
</a>
<%= if can?(@conn, :edit, @post) do %>
<span class="owner-options">
<strong>
<a class="communication__interaction" href={~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/edit"}>
<i class="fas fa-edit"></i>
Edit
<i class="fas fa-edit"></i> Edit
</a>
</strong>
</span>

View file

@ -24,11 +24,7 @@
<%= for {body, post} <- @posts, post.topic.hidden_from_users == false do %>
<div>
<h3>
<%= link(post.topic.forum.name, to: ~p"/forums/#{post.topic.forum}") %>
&raquo;
<%= link(post.topic.title, to: ~p"/forums/#{post.topic.forum}/topics/#{post.topic}") %>
&raquo;
<% post_link = ~p"/forums/#{post.topic.forum}/topics/#{post.topic}?#{[post_id: post.id]}" <> "#post_#{post.id}" %>
<%= link(post.topic.forum.name, to: ~p"/forums/#{post.topic.forum}") %> &raquo; <%= link(post.topic.title, to: ~p"/forums/#{post.topic.forum}/topics/#{post.topic}") %> &raquo; <% 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 %>

View file

@ -4,8 +4,7 @@
<%= @about_me %>
<% current?(@user, @conn.assigns.current_user) -> %>
<em>
Want to
<%= link("add some info about yourself?", to: ~p"/profiles/#{@user}/description/edit") %>
Want to <%= link("add some info about yourself?", to: ~p"/profiles/#{@user}/description/edit") %>
</em>
<% true -> %>
<% end %>

View file

@ -1,7 +1,6 @@
<div class="block--fixed">
<i class="fa fa-fw fa-calendar"></i>
Account created
<%= @user.created_at %>
Account created <%= @user.created_at %>
<br />
<i class="fa fa-fw fa-filter"></i>
Current Filter:
@ -16,9 +15,7 @@
<i class="far fa-fw fa-clock"></i>
Last seen
<%= if @last_ip do %>
<%= pretty_time(@last_ip.updated_at) %>
from
<%= link_to_ip(@conn, @last_ip.ip) %>
<%= 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) %>
<% end %>
@ -37,13 +34,10 @@
<%= if @user.locked_at do %>
<i class="fas fa-fw fa-lock"></i>
<strong class="comment_deleted">
Account locked,
<%= @user.failed_attempts %>
failed login attempts
Account locked, <%= @user.failed_attempts %> failed login attempts
</strong>
<% else %>
<i class="fas fa-fw fa-unlock"></i>
Not currently locked
<i class="fas fa-fw fa-unlock"></i> Not currently locked
<% end %>
</div>
<br />

View file

@ -10,13 +10,7 @@
<strong>
Price Range:
</strong>
<% {min, max} = Enum.min_max_by(@user.commission.items, &Decimal.to_float(&1.base_price)) %>
$
<%= Decimal.round(min.base_price || 0, 2) |> Decimal.to_string() %>
- $
<%= Decimal.round(max.base_price || 0, 2) |> Decimal.to_string() %>
USD
<br />
<% {min, max} = Enum.min_max_by(@user.commission.items, &Decimal.to_float(&1.base_price)) %> $ <%= Decimal.round(min.base_price || 0, 2) |> Decimal.to_string() %> - $ <%= Decimal.round(max.base_price || 0, 2) |> Decimal.to_string() %> USD <br />
<% end %>
<% # Lotta space here %>
<br />
@ -27,15 +21,11 @@
<% current?(@user, @conn.assigns.current_user) -> %>
<%= if Enum.any?(@conn.assigns.user.verified_links) do %>
<em>
You don't have any commission information listed yet.
<%= link("Click here", to: ~p"/profiles/#{@user}/commission/new") %>
to set it up.
You don't have any commission information listed yet. <%= link("Click here", to: ~p"/profiles/#{@user}/commission/new") %> to set it up.
</em>
<% else %>
<em>
You must have a verified Artist Link to create a commission page.
<%= link("Click here", to: ~p"/profiles/#{@user}/artist_links/new") %>
to set one up.
You must have a verified Artist Link to create a commission page. <%= link("Click here", to: ~p"/profiles/#{@user}/artist_links/new") %> to set one up.
</em>
<% end %>
<% true -> %>

View file

@ -10,10 +10,7 @@
<div class="block">
<%= for post <- @posts do %>
<div class="block__content alternating-color">
Post
<%= link(pretty_time(post.created_at), to: ~p"/forums/#{post.topic.forum}/topics/#{post.topic}?#{[post_id: post]}" <> "#post_#{post.id}") %>
in topic
<%= link(post.topic.title, to: ~p"/forums/#{post.topic.forum}/topics/#{post.topic}") %>
Post <%= link(pretty_time(post.created_at), to: ~p"/forums/#{post.topic.forum}/topics/#{post.topic}?#{[post_id: post]}" <> "#post_#{post.id}") %> in topic <%= link(post.topic.title, to: ~p"/forums/#{post.topic.forum}/topics/#{post.topic}") %>
</div>
<% end %>
</div>

Some files were not shown because too many files have changed in this diff Show more