2013-11-24 20:09:24 +08:00
|
|
|
<div class="lz">
|
|
|
|
<div class="lz-left">
|
2014-04-14 08:37:20 +08:00
|
|
|
<div><%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %></div>
|
|
|
|
<p class="clearfix"><%=link_to @memo.author.name, user_path(@memo.author) %></p>
|
2013-11-24 20:09:24 +08:00
|
|
|
</div>
|
|
|
|
<div class="memo-section">
|
2013-11-26 16:32:08 +08:00
|
|
|
<div class="contextual-borad">
|
2014-03-10 17:34:19 +08:00
|
|
|
<!-- <%= link_to(
|
2013-11-26 16:32:08 +08:00
|
|
|
image_tag('comment.png'),
|
|
|
|
{:action => 'quote', :id => @memo},
|
|
|
|
:remote => true,
|
|
|
|
:method => 'get',
|
|
|
|
:title => l(:button_quote)
|
2014-03-10 17:34:19 +08:00
|
|
|
)if !@memo.locked? && User.current.logged? %> -->
|
2014-03-11 09:30:04 +08:00
|
|
|
<%= link_to(
|
|
|
|
l(:button_quote),
|
|
|
|
{:action => 'quote', :id => @memo},
|
|
|
|
:remote => true,
|
|
|
|
:method => 'get',
|
|
|
|
:title => l(:button_quote)
|
|
|
|
)if !@memo.locked? && User.current.logged? %>
|
2014-03-10 17:34:19 +08:00
|
|
|
|
2013-11-26 16:32:08 +08:00
|
|
|
<%= link_to(
|
|
|
|
image_tag('edit.png'),
|
|
|
|
{:action => 'edit', :id => @memo},
|
|
|
|
:method => 'get',
|
|
|
|
:title => l(:button_edit)
|
|
|
|
) if @memo.editable_by?(User.current) %>
|
2014-03-11 09:30:04 +08:00
|
|
|
<!-- <%= link_to(
|
2013-11-26 16:32:08 +08:00
|
|
|
image_tag('delete.png'),
|
|
|
|
{:action => 'destroy', :id => @memo},
|
|
|
|
:method => :delete,
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:title => l(:button_delete)
|
2014-03-11 09:30:04 +08:00
|
|
|
) if @memo.destroyable_by?(User.current) %> -->
|
|
|
|
<%= link_to(
|
|
|
|
l(:button_delete),
|
|
|
|
{:action => 'destroy', :id => @memo},
|
|
|
|
:method => :delete,
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:title => l(:button_delete)
|
2013-11-26 16:32:08 +08:00
|
|
|
) if @memo.destroyable_by?(User.current) %>
|
2014-03-11 09:30:04 +08:00
|
|
|
|
|
|
|
|
2013-11-26 16:32:08 +08:00
|
|
|
</div>
|
|
|
|
|
2013-12-11 08:52:55 +08:00
|
|
|
<div class="memo-title <%= @memo.sticky ? 'sticky' : '' %> <%= @memo.locked? ? 'locked' : '' %>"><%= label_tag l(:field_subject) %>: <%=h @memo.subject %></div>
|
2013-11-26 16:32:08 +08:00
|
|
|
<div class="memo-content">
|
|
|
|
<!-- < %= textilizable(@memo, :content) %> -->
|
|
|
|
<%= raw @memo.content %>
|
2013-11-29 18:14:49 +08:00
|
|
|
<p>
|
|
|
|
<% if @memo.attachments.any?%>
|
2013-12-12 17:11:29 +08:00
|
|
|
<% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
|
2013-12-03 11:22:48 +08:00
|
|
|
<%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options} %>
|
2013-11-29 18:14:49 +08:00
|
|
|
<% end %>
|
|
|
|
</p>
|
2013-11-26 16:32:08 +08:00
|
|
|
</div>
|
2014-03-13 22:06:49 +08:00
|
|
|
<div class="memo-timestamp"> <%= authoring @memo.created_at, @memo.author.name %></div>
|
2013-11-26 16:37:30 +08:00
|
|
|
|
2013-11-23 20:02:15 +08:00
|
|
|
</div>
|
|
|
|
<br />
|
2013-11-24 20:09:24 +08:00
|
|
|
</div>
|
2013-11-23 20:02:15 +08:00
|
|
|
<div class="replies">
|
2013-11-24 20:09:24 +08:00
|
|
|
<h3 class="comments"><%= l(:label_reply_plural) %> (<%= @replies.nil? ? 0 : @replies.size %>)</h3>
|
2013-12-17 21:26:34 +08:00
|
|
|
<% pages_count = @reply_pages.offset %>
|
2013-11-23 08:20:03 +08:00
|
|
|
<% @replies.each do |reply| %>
|
2013-11-23 20:02:15 +08:00
|
|
|
<div class="reply" id="<%= "reply-#{reply.id}" %>">
|
2013-12-17 09:30:24 +08:00
|
|
|
<p class="font_lighter"><%= pages_count += 1 %>楼 :</p>
|
2013-11-24 20:09:24 +08:00
|
|
|
<div class="contextual-borad">
|
2014-03-10 17:34:19 +08:00
|
|
|
<!-- <%= link_to(
|
2013-11-24 20:09:24 +08:00
|
|
|
image_tag('comment.png'),
|
|
|
|
{:action => 'quote', :id => reply},
|
|
|
|
:remote => true,
|
|
|
|
:method => 'get',
|
2013-11-26 16:32:08 +08:00
|
|
|
:title => l(:button_quote)
|
2014-03-10 17:34:19 +08:00
|
|
|
)if !@memo.locked? && User.current.logged? %> -->
|
2014-03-11 09:30:04 +08:00
|
|
|
<%= link_to(
|
|
|
|
l(:button_quote),
|
|
|
|
{:action => 'quote', :id => reply},
|
|
|
|
:remote => true,
|
|
|
|
:method => 'get',
|
|
|
|
:title => l(:button_quote)
|
|
|
|
)if !@memo.locked? && User.current.logged? %>
|
2014-03-10 17:34:19 +08:00
|
|
|
|
2013-11-24 20:09:24 +08:00
|
|
|
<%= link_to(
|
|
|
|
image_tag('edit.png'),
|
|
|
|
{:action => 'edit', :id => reply},
|
|
|
|
:title => l(:button_edit)
|
2013-11-26 16:32:08 +08:00
|
|
|
) if reply.editable_by?(User.current) %>
|
2014-03-11 09:30:04 +08:00
|
|
|
<!-- <%= link_to(
|
2013-11-24 20:09:24 +08:00
|
|
|
image_tag('delete.png'),
|
|
|
|
{:action => 'destroy', :id => reply},
|
2013-11-26 16:32:08 +08:00
|
|
|
:method => :delete,
|
2013-11-24 20:09:24 +08:00
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:title => l(:button_delete)
|
2014-03-11 09:30:04 +08:00
|
|
|
) if reply.destroyable_by?(User.current) %> -->
|
|
|
|
<%= link_to(
|
|
|
|
l(:button_delete),
|
|
|
|
{:action => 'destroy', :id => reply},
|
|
|
|
:method => :delete,
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:title => l(:button_delete)
|
|
|
|
) if reply.destroyable_by?(User.current) %>
|
|
|
|
|
2013-11-24 20:09:24 +08:00
|
|
|
</div>
|
2013-11-23 20:02:15 +08:00
|
|
|
|
2013-11-24 20:09:24 +08:00
|
|
|
<table class="borad-text-list">
|
|
|
|
<tr>
|
|
|
|
<td rowspan="3" valign="top" width="60px">
|
|
|
|
<%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %>
|
|
|
|
</td>
|
|
|
|
<td class="comments">
|
2013-11-26 20:33:15 +08:00
|
|
|
<div class="reply_content" ><%=h reply.content.html_safe %></div>
|
|
|
|
<!-- <div class="wiki">< %=h reply.content.html_safe %></div> -->
|
2013-11-26 16:32:08 +08:00
|
|
|
<p>
|
|
|
|
<% if reply.attachments.any?%>
|
2013-12-12 09:14:10 +08:00
|
|
|
<% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %>
|
2013-11-26 16:32:08 +08:00
|
|
|
<%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options} %>
|
|
|
|
<% end %>
|
|
|
|
</p>
|
2013-11-24 20:09:24 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2014-03-13 22:06:49 +08:00
|
|
|
<td class="font_lighter" style="float:right"><%= authoring reply.created_at, reply.author.name %></td>
|
2013-11-24 20:09:24 +08:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
2013-11-23 08:20:03 +08:00
|
|
|
<% end %>
|
2013-11-26 16:32:08 +08:00
|
|
|
<div class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></div>
|
2013-11-23 20:02:15 +08:00
|
|
|
</div>
|
|
|
|
|
2014-03-08 11:08:48 +08:00
|
|
|
<% if User.current.login? %>
|
2013-11-24 20:09:24 +08:00
|
|
|
<div class="reply-box" style="">
|
2013-11-26 16:32:08 +08:00
|
|
|
<%= render :partial => 'reply_box' %>
|
2013-11-23 20:02:15 +08:00
|
|
|
</div>
|
2014-03-08 11:08:48 +08:00
|
|
|
<% else %>
|
|
|
|
<div style="font-size: 14px;margin:20px;">
|
|
|
|
<%= l(:label_user_login_tips) %>
|
|
|
|
<%= link_to l(:label_user_login_new), signin_path %>
|
|
|
|
<hr/>
|
|
|
|
</div>
|
|
|
|
<% end %>
|