added share links, moved image resize back to notice banner style

This commit is contained in:
albert
2012-03-30 14:28:46 -04:00
parent 0a88c1fb8a
commit 1ef7ef49a5
9 changed files with 5574 additions and 65 deletions

View File

@@ -1 +1,5 @@
<%= image_tag(post.file_url_for(CurrentUser.user), :width => post.image_width_for(CurrentUser.user), :height => post.image_height_for(CurrentUser.user), :id => "image", "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) %>
<% if post.has_large? && CurrentUser.default_image_size == "large" %>
<p id="image-resize-notice">Resized to <%= number_to_percentage post.resize_percentage, :precision => 0 %> of original (<%= link_to "view original", post.file_url, :id => "image-resize-link" %>)</p>
<% end %>

View File

@@ -6,7 +6,9 @@
<% if (post.is_flagged? || post.is_deleted?) && post.flags.any? %>
<div class="ui-corner-all ui-state-highlight notice">
This post has been flagged for deletion: <%= post_flag_reasons(post) %>
<p>This post has been flagged for deletion: </p>
<%= post_flag_reasons(post) %>
</div>
<% end %>
@@ -19,7 +21,7 @@
<% unless post.is_status_locked? %>
<%= link_to "Approve", moderator_post_approval_path(:post_id => post.id), :method => :post, :remote => true, :class => "btn" %>
<% end %>
<%= link_to "Disapprove", moderator_post_disapproval_path(:post_id => post.id), :method => :post, :remote => true, :class => "btn" %>
<%= link_to "Hide from queue", moderator_post_disapproval_path(:post_id => post.id), :method => :post, :remote => true, :class => "btn" %>
</div>
<% end %>
</div>
@@ -27,7 +29,8 @@
<% if (post.is_flagged? || post.is_deleted?) && post.appeals.any? %>
<div class="ui-corner-all ui-state-highlight notice">
This post has been appealed: <%= post_appeal_reasons(post) %>
<p>This post has been appealed:</p>
<%= post_appeal_reasons(post) %>
</div>
<% end %>

View File

@@ -1,14 +1,10 @@
<ul>
<% if post.is_image? %>
<%= resize_image_links(post, CurrentUser.user) %>
<% end %>
<% if CurrentUser.is_member? %>
<li><%= link_to "Favorite", favorites_path(:post_id => post.id), :remote => true, :method => :post, :id => "add-to-favorites" %></li>
<li><%= link_to "Unfavorite", favorite_path(post), :remote => true, :method => :delete, :id => "remove-from-favorites" %></li>
<li><%= link_to "Pool", "#", :id => "pool" %></li>
<li><%= link_to "Translate", "#", :id => "translate", :title => "Shortcut is CTRL+N" %></li>
<li><%= link_to "Find similar", "http://danbooru.iqdb.org/db-search.php?url=#{post.preview_url}" %></li>
<li><%= link_to "Find similar", "http://danbooru.iqdb.org/db-search.php?url=#{post.preview_file_url}" %></li>
<% unless post.is_status_locked? %>
<% if !post.is_deleted? %>
@@ -41,4 +37,4 @@
<% if CurrentUser.is_admin? %>
<li><%= link_to "Annihilate", annihilate_moderator_post_post_path(:post_id => post.id), :remote => true, :method => :post, :id => "annihilate", :confirm => "This will permanently delete this post (meaning the file will be deleted). Are you sure you want to annihilate this post?" %></li>
<% end %>
</ulS
</ul>

View File

@@ -0,0 +1,34 @@
<div style="margin-bottom: 5em; overflow: hidden;">
<div style="float: left;">
<!-- Twitter -->
<a href="https://twitter.com/share" class="twitter-share-button" data-text="<%= post.essential_tag_string %>" data-count="none" data-hashtags="danbooru">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
<div style="float: left; margin-left: 0.5em;">
<!-- Facebook -->
<a name="fb_share"></a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript">
</script>
</div>
<div style="float: left; margin-left: 0.5em;">
<!-- Tumblr -->
<a href="http://www.tumblr.com/share" title="Share on Tumblr" style="display:inline-block; text-indent:-9999px; overflow:hidden; width:61px; height:20px; background:url('http://platform.tumblr.com/v1/share_2.png') top left no-repeat transparent;">Share on Tumblr</a>
</div>
<div style="float: left; margin-left: 0.5em">
<!-- StumbleUpon -->
<!-- Place this tag where you want the su badge to render -->
<su:badge layout="3"></su:badge>
<!-- Place this snippet wherever appropriate -->
<script type="text/javascript">
(function() {
var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;
li.src = window.location.protocol + '//platform.stumbleupon.com/1/widgets.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);
})();
</script>
</div>
</div>