Merge branch 'master' into mobile-mode-default-image-size

This commit is contained in:
evazion
2020-07-23 16:22:37 -05:00
committed by GitHub
267 changed files with 5414 additions and 4398 deletions

View File

@@ -1,4 +1,4 @@
This post has <%= link_to pluralize(children.length, "child"), posts_path(tags: "parent:#{parent.id}") %>
This post has <%= link_to pluralize(children.length, "child"), posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %>
(<%= link_to_wiki "learn more", "help:post_relationships" %>)
<%= link_to("« hide", "#", id: "has-children-relationship-preview-link") %>

View File

@@ -7,9 +7,9 @@
<%= render "sources/info" %>
<%= edit_form_for(post, html: { id: "form" }) do |f| %>
<%= hidden_field_tag :tags_query, params[:q] %>
<%= hidden_field_tag :pool_id, params[:pool_id] %>
<%= hidden_field_tag :favgroup_id, params[:favgroup_id] %>
<%= f.input :tags_query, as: :hidden, input_html: { id: nil, name: "tags_query", value: params[:q] } %>
<%= f.input :pool_id, as: :hidden, input_html: { id: nil, name: "pool_id", value: params[:pool_id] } %>
<%= f.input :favgroup_id, as: :hidden, input_html: { id: nil, name: "favgroup_id", value: params[:favgroup_id] } %>
<%= f.input :old_tag_string, as: :hidden, input_html: { value: post.tag_string } %>
<%= f.input :old_parent_id, as: :hidden, input_html: { value: post.parent_id } %>
<%= f.input :old_source, as: :hidden, input_html: { value: post.source } %>

View File

@@ -1,6 +1,6 @@
<% if policy(post).visible? %>
<%= content_tag(:picture) do -%>
<%= tag.source media: "(max-width: 660px)", srcset: post.tagged_large_file_url -%>
<%= tag.img width: post.image_width_for(CurrentUser.user), height: post.image_height_for(CurrentUser.user), id: "image", class: "fit-width", "data-original-width": post.image_width, "data-original-height": post.image_height, "data-large-width": post.large_image_width, "data-large-height": post.large_image_height, "data-tags": post.tag_string, alt: post.presenter.humanized_essential_tag_string, "data-uploader": post.uploader.name, "data-rating": post.rating, "data-flags": post.status_flags, "data-parent-id": post.parent_id, "data-has-children": post.has_children?, "data-has-active-children": post.has_active_children?, "data-score": post.score, "data-fav-count": post.fav_count, itemprop: "contentUrl", src: post.file_url_for(CurrentUser.user) %>
<%= tag.img width: post.image_width_for(CurrentUser.user), height: post.image_height_for(CurrentUser.user), id: "image", class: "fit-width", "data-original-width": post.image_width, "data-original-height": post.image_height, "data-large-width": post.large_image_width, "data-large-height": post.large_image_height, "data-tags": post.tag_string, alt: post.presenter.humanized_essential_tag_string, "data-uploader": post.uploader.name, "data-rating": post.rating, "data-flags": post.status_flags, "data-parent-id": post.parent_id, "data-has-children": post.has_children?, "data-has-active-children": post.has_active_children?, "data-score": post.score, "data-fav-count": post.fav_count, src: post.file_url_for(CurrentUser.user) %>
<% end -%>
<% end %>

View File

@@ -1,14 +1,11 @@
<ul>
<li id="post-info-id">ID: <%= post.id %></li>
<% if policy(post).can_view_uploader? %>
<li id="post-info-uploader">
Uploader: <%= link_to_user(post.uploader) %>
<%= link_to "»", posts_path(tags: "user:#{post.uploader.name}") %>
</li>
<% end %>
<li id="post-info-uploader">
Uploader: <%= link_to_user(post.uploader) %>
<%= link_to "»", posts_path(tags: "user:#{post.uploader.name}") %>
</li>
<li id="post-info-date">
Date: <%= link_to time_ago_in_words_tagged(post.created_at), posts_path(tags: "date:#{post.created_at.to_date}") %>
<meta itemprop="uploadDate" content="<%= post.created_at.iso8601 %>">
</li>
<% if post.approver %>
<li id="post-info-approver">
@@ -17,9 +14,9 @@
</li>
<% end %>
<li id="post-info-size">
Size: <%= link_to_if policy(post).visible?, number_to_human_size(post.file_size), post.tagged_file_url %>
Size: <%= link_to_if policy(post).visible?, "#{number_to_human_size(post.file_size)} .#{post.file_ext}", post.tagged_file_url %>
<% if post.has_dimensions? %>
(<span itemprop="width"><%= post.image_width %></span>x<span itemprop="height"><%= post.image_height %></span>)
(<%= post.image_width %>x<%= post.image_height %>)
<% end %>
</li>
<li id="post-info-source">Source: <%= post_source_tag(post.source, post.normalized_source) %></li>

View File

@@ -1,8 +1,8 @@
This post belongs to a <%= link_to "parent", posts_path(tags: "parent:#{parent.id}") %> <% "(deleted)" if parent.is_deleted? %>
This post belongs to a <%= link_to "parent", posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %> <% "(deleted)" if parent.is_deleted? %>
<% children.length.tap do |children_count| %>
<% if children_count > 1 %>
and has <%= link_to pluralize(children_count - 1, "sibling"), posts_path(tags: "parent:#{parent.id}") %>
and has <%= link_to pluralize(children_count - 1, "sibling"), posts_path(tags: "parent:#{parent.id}"), rel: "nofollow" %>
<% end %>
<% end %>