diaspora/app/views/templates/stream_element.ujs

113 lines
3.2 KiB
Text

<div id="<%= guid %>" class="stream_element">
<div class="right controls">
<% if(author.id != current_user.id) { %>
<a href="/blocks?block[person_id]=<%= author.id %>" class="block_user control_icon" data-confirm="Ignore and remove user from all aspects?" data-method="post" rel="nofollow" title="Ignore">
<img alt="Ignoreuser" src="/images/icons/ignoreuser.png"/>
</a>
<% } %>
<a href="#" class="delete control_icon remove_post" title="Delete">
<img src="/images/deletelabel.png"/>
</a>
<img src="/images/ajax-loader.gif" class="hide_loader hidden"/>
</div>
<div class="sm_body">
<a href="/people/<%= author.id %>">
<img src="<%= author.avatar.small %>" class="avatar" data-person-id="<%= author.id %>"/>
</a>
<div class="content">
<div class="post_initial_info">
<span class="from">
<a href="/people/<%= author.id %>">
<%= author.name %>
</a>
</span>
<span class="details">
-
<a href="/posts/<%= id %>">
<time class="timeago" datetime="<%= created_at %>"/>
</a>
</span>
</div>
<% if(text !== null && text.match(/#nsfw/)) { %>
<div class="shield_wrapper">
<div class="shield">
This post has been flagged as NSFW by its author.
<a href="#">
show
</a>
</div>
<% } %>
<div class="post-content"> </div>
<% if(text !== null && text.match(/#nsfw/)) { %>
</div>
<% } %>
<div class="info">
<% if(provider_display_name != null) { %>
<span class="via">
via <%= provider_display_name %>
-
</span>
<% } %>
<span class="post_scope" title="<%= public ? 'Viewable to anyone on the web' : 'Only certain people can see this'%>">
<%= public ? "Public" : "Limited" %>
-
</span>
<% if(user_like) { %>
<a href="#" class="like_action unlike" data-id="<%= user_like.id %>" rel='nofollow'>
Unlike
</a>
<% } else { %>
<a href="#" class="like_action like" rel='nofollow'>
Like
</a>
<% } %>
·
<% if(public && author.id != current_user.id) { %>
<% if(root) {
var rootGuid = root.guid;
}
else {
var rootGuid = guid;
} %>
<a href="/reshares?root_guid=<%= rootGuid %>" class="reshare_action" data-confirm="Reshare Bob Grimm's post?" data-method="post" data-remote="true" rel="nofollow">
Reshare
</a>
·
<% } %>
<a href="#" class="focus_comment_textarea">
Comment
</a>
</div>
<div class="likes on_post">
<div class="likes_container">
<% if(likes_count > 0){ %>
<img alt="Heart" src="/images/icons/heart.png?1322618579">
<a href="/posts/<%= id %>/likes" class="expand_likes">
<%= likes_count %> like
</a>
<span class="hidden likes_list"></span>
<% } %>
</div>
</div>
<div class="comments"> </div>
</div>
</div>