diff --git a/app/assets/stylesheets/specific/mod_queue.css.scss b/app/assets/stylesheets/specific/mod_queue.css.scss index ba52c99bc..d6c49db06 100644 --- a/app/assets/stylesheets/specific/mod_queue.css.scss +++ b/app/assets/stylesheets/specific/mod_queue.css.scss @@ -8,18 +8,18 @@ div#c-moderator-post-queues { aside { float: left; - width: 520px; + width: 220px; text-align: right; padding-right: 20px; } section { float: left; - width: 300px; + width: 600px; } div#moderation-guideline { - width: 60em; + width: 900px; h1 { font-size: $h2_size; diff --git a/app/assets/stylesheets/specific/posts.css.scss b/app/assets/stylesheets/specific/posts.css.scss index 2edd769f4..736e4b148 100644 --- a/app/assets/stylesheets/specific/posts.css.scss +++ b/app/assets/stylesheets/specific/posts.css.scss @@ -12,10 +12,6 @@ article.post-preview { float: left; overflow: hidden; @include inline-block; - - img.wide { - margin-left: -25%; - } } article.post-preview.blacklisted-active { diff --git a/app/controllers/moderator/post/queues_controller.rb b/app/controllers/moderator/post/queues_controller.rb index 16e7675e6..06eff5c52 100644 --- a/app/controllers/moderator/post/queues_controller.rb +++ b/app/controllers/moderator/post/queues_controller.rb @@ -5,7 +5,7 @@ module Moderator before_filter :janitor_only def show - @search = ::Post.order("id asc").pending_or_flagged.available_for_moderation(params[:hidden]).search(:tag_match => params[:query]) + @search = ::Post.order("id asc").pending_or_flagged.available_for_moderation(params[:hidden]).search(:tag_match => "#{params[:query]} status:any") @posts = @search.paginate(params[:page]) respond_with(@posts) end diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb index bcf7f737f..5f8bceced 100644 --- a/app/presenters/post_presenter.rb +++ b/app/presenters/post_presenter.rb @@ -13,32 +13,12 @@ class PostPresenter < Presenter html = %{
} html << %{} - html << %{#{h(post.tag_string)}} + html << %{#{h(post.tag_string)}} html << %{} html << %{
} html.html_safe end - def self.margin_top(post) - if post.is_image? && post.image_height > post.image_width && post.image_height > Danbooru.config.small_image_width && post.image_height < 1.5 * post.image_width - ratio = Danbooru.config.small_image_width.to_f / post.image_width.to_f - offset = ((ratio * post.image_height) - Danbooru.config.small_image_width).to_i / 2 - return "-#{offset}px" - else - 0 - end - end - - def self.margin_left(post) - if post.is_image? && post.image_width > post.image_height && post.image_width > Danbooru.config.small_image_width - ratio = Danbooru.config.small_image_width.to_f / post.image_height.to_f - offset = ((ratio * post.image_width) - Danbooru.config.small_image_width).to_i / 2 - return "-#{offset}px" - else - return 0 - end - end - def initialize(post) @post = post end diff --git a/app/views/comments/index_by_post.html.erb b/app/views/comments/index_by_post.html.erb index 34a9686ab..9926a2065 100644 --- a/app/views/comments/index_by_post.html.erb +++ b/app/views/comments/index_by_post.html.erb @@ -9,7 +9,7 @@ <% @posts.each do |post| %>
- <%= link_to(image_tag(post.preview_file_url, :style => "margin-left: #{PostPresenter.margin_left(post)}; margin-top: #{PostPresenter.margin_top(post)};"), post_path(post)) %> + <%= link_to(image_tag(post.preview_file_url, post_path(post)) %>
<%= render "comments/partials/index/list", :post => post, :comments => post.comments.visible(CurrentUser.user).recent, :show_header => true %>
diff --git a/lib/danbooru_image_resizer/danbooru_image_resizer.rb b/lib/danbooru_image_resizer/danbooru_image_resizer.rb index 3f77d44b2..42bcb2b84 100644 --- a/lib/danbooru_image_resizer/danbooru_image_resizer.rb +++ b/lib/danbooru_image_resizer/danbooru_image_resizer.rb @@ -3,9 +3,9 @@ module Danbooru image = Magick::Image.read(read_path).first geometry = "#{width}x>" - if width == Danbooru.config.small_image_width && image.rows < image.columns + if width == Danbooru.config.small_image_width # wider than it is tall - geometry = ">x#{height}" + geometry = "#{Danbooru.config.small_image_width}x#{Danbooru.config.small_image_width}>" end image.change_geometry(geometry) do |new_width, new_height, img|