mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
various fixes:
add base line-height: 1.5em add appropriate placeholder color to inputs show number of faves on fave index link to correct location in watched images list on activity page don't show pagination info when there are no results don't create a source history entry if the source wasn't changed
This commit is contained in:
parent
2fcfa3a344
commit
d4d4ee0e2d
8 changed files with 39 additions and 18 deletions
|
@ -27,6 +27,7 @@ body {
|
|||
font-size: 13px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5 {
|
||||
|
|
|
@ -26,6 +26,11 @@ form p {
|
|||
max-width: 100%; /* prevent resizable inputs from overflowing the container */
|
||||
}
|
||||
|
||||
.input::placeholder {
|
||||
opacity: 0.54;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.input[required]:invalid {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,15 @@ defmodule Philomena.Images do
|
|||
|
||||
Multi.new
|
||||
|> Multi.update(:image, image_changes)
|
||||
|> Multi.insert(:source_change, source_changes)
|
||||
|> Multi.run(:source_change, fn repo, _changes ->
|
||||
case image_changes.changes do
|
||||
%{source_url: _new_source} ->
|
||||
repo.insert(source_changes)
|
||||
|
||||
_ ->
|
||||
{:ok, nil}
|
||||
end
|
||||
end)
|
||||
|> Repo.isolated_transaction(:serializable)
|
||||
end
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ defmodule PhilomenaWeb.StatController do
|
|||
open_commissions: open_commissions,
|
||||
commission_items: commission_items,
|
||||
open_reports: open_reports,
|
||||
report_count: report_count,
|
||||
report_stat_count: report_count,
|
||||
response_time: response_time,
|
||||
gallery_count: gallery_count,
|
||||
gallery_size: gallery_size,
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
.column-layout__main
|
||||
= render PhilomenaWeb.ImageView, "index.html", conn: @conn, images: @images, size: :thumb
|
||||
= if !!@watched and @watched != [] do
|
||||
= if not is_nil(@watched) and Enum.any?(@watched) do
|
||||
.block
|
||||
.block__header
|
||||
span.block__header__title
|
||||
|
@ -49,4 +49,5 @@
|
|||
span.hide-mobile
|
||||
' Browse Watched Images
|
||||
.block__content.js-resizable-media-container
|
||||
= render PhilomenaWeb.ImageView, "index.html", conn: @conn, images: @watched, size: :thumb_small
|
||||
- route = fn p -> Routes.search_path(@conn, :index, p) end
|
||||
= render PhilomenaWeb.ImageView, "index.html", conn: @conn, images: @watched, size: :thumb_small, route: route, scope: [q: "my:watched"]
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
h5 Favorited by
|
||||
h5
|
||||
' Faved by
|
||||
=> @image.faves_count
|
||||
= pluralize("user", "users", @image.faves_count)
|
||||
|
||||
= for fave <- Enum.sort_by(@image.faves, & &1.user.name) do
|
||||
=> link fave.user.name, to: Routes.profile_path(@conn, :show, fave.user), class: "interaction-user-list-item"
|
|
@ -1,13 +1,16 @@
|
|||
= if @page.total_entries > 0 do
|
||||
' Showing
|
||||
= if @page.total_entries == 1 do
|
||||
' result
|
||||
- else
|
||||
' results
|
||||
=> pluralize("result", "results", @page.total_entries)
|
||||
|
||||
strong
|
||||
=> max(((@page.page_number - 1) * @page.page_size) - 1, 1)
|
||||
' -
|
||||
=> min(@page.page_number * @page.page_size, @page.total_entries)
|
||||
' of
|
||||
|
||||
strong
|
||||
=> @page.total_entries
|
||||
' total
|
||||
|
||||
- else
|
||||
' No results found
|
|
@ -107,7 +107,7 @@ elixir:
|
|||
p
|
||||
' We have received
|
||||
span.stat>
|
||||
= number_with_delimiter(@report_count)
|
||||
= number_with_delimiter(@report_stat_count)
|
||||
' reports. Out of these reports,
|
||||
=> number_with_delimiter(@open_reports)
|
||||
' reports are outstanding and awaiting action.
|
||||
|
|
Loading…
Reference in a new issue