/
_single.html.erb
98 lines (98 loc) · 3.09 KB
/
_single.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<p><a name="top"></a></p>
<div class="listings">
<div class="single-entry">
<%- if @threads.first && entry = @threads.first.root -%>
<div class="title-header">
<p>
<%= author_picture(entry) -%>
<%= pin_link(entry) %>
<%= icon(entry) -%><%= icon_extra(entry) -%>
<%= author_link(entry) %>
<%= published(entry, false) %>
<%= menu_link(menu_icon(:bottom, '8'), '#bottom', accesskey('8')) %>
</p>
</div>
<div class="title">
<p>
<%= content(entry) -%>
<%= via(entry) -%>
</p>
</div>
<%- form_tag({:action => 'add_comment', :id => u(entry.id), :comment => ctx.comment ? u(ctx.comment) : nil}, {:name => 'post'}) do -%>
<div class="comment comment-block">
<%- entry.comments.each do |comment| -%>
<p>
<%- if ctx.comment != comment.id -%>
<%= comment_icon(comment) %><%= comment(comment) %> <%= comment_author_link(comment) %> <%= via(comment) %>
<%= date(comment.date, false) %>
<%= edit_comment_link(comment) -%>
<%= delete_comment_link(comment) -%>
<%- else -%>
<%= comment_icon(comment) %><%= edit_comment_form(comment) %>
<%- end -%>
</p>
<%- end -%>
<%- if ctx.comment.nil? -%>
<%= comment_icon %><%= post_comment_form(entry) %><br />
<script type='text/javascript'><!--
post.body.focus();
//--></script>
<%- end -%>
<p class="likes">
<%= likes(entry) -%>
</p>
<%- if ctx.comment.nil? -%>
<p>
<%= like_link(entry) %>
<%= moderate_link(entry) %>
<%= hide_link(entry) %>
<%= delete_link(entry) %>
<%= reshare_link(entry) %>
<%= url_link(entry) %>
</p>
<%- end -%>
</div>
<%- end -%>
<%- commit_checked_modified(entry) -%>
<%- else -%>
<p>No feed is good feed.</p>
<%- end -%>
</div>
</div>
<p>
<%= original_link(entry) %>
</p>
<%- if next_entry = next_entry(entry) -%>
<p>
Next: <%= link_to_next_entry(next_entry) %><br />
from <%= icon(next_entry) %><%= icon_extra(next_entry) %>
<%= author_link(next_entry) %>
</p>
<p>
<%- if entry.view_pinned -%>
<%= link_to(h('Unpin this and Go Next'), link_show(next_entry.id, :unpin => entry.id)) %><br />
<%- else -%>
<%= link_to(h('Pin this and Go Next'), link_show(next_entry.id, :pin => entry.id)) %><br />
<%- end -%>
</p>
<%- else -%>
<p>
<%- if entry && entry.view_pinned -%>
<%= link_to(h('Unpin this and Back'), :controller => 'entry', :unpin => entry.id) %><br />
<%- else -%>
<%= link_to(h('Pin this and Back'), :controller => 'entry', :pin => entry.id) %><br />
<%- end -%>
</p>
<%- end -%>
<p>
<%= link_to(h('Back'), :controller => 'entry') %>
</p>
<p><a name="bottom"></a>
<%= page_links(:for_bottom => true, :threads => @threads) %>
</p>
<%- if !ctx.user_only? -%>
<hr />
<p><a name="filter">[Filter]</a></p>
<p><%= user_page_links(auth.name) %></p>
<p><%= list_links %></p>
<%- end -%>