2013-11-24 20:09:24 +08:00
|
|
|
<style type="text/css">
|
|
|
|
/** {
|
|
|
|
-webkit-box-sizing: border-box;
|
|
|
|
-moz-box-sizing: border-box;
|
|
|
|
-box-sizing: border-box;
|
|
|
|
}*/
|
|
|
|
.lz {
|
|
|
|
position:relative;
|
|
|
|
min-height: 200px;
|
|
|
|
margin: 10px 2px;
|
|
|
|
border-radius: 5px;
|
|
|
|
box-shadow: 2px 2px 5px #97EBF4;
|
|
|
|
}
|
|
|
|
.lz-left{
|
|
|
|
float: left;
|
|
|
|
margin: 2%;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
.memo-section{
|
|
|
|
width: auto;
|
|
|
|
margin-left: 15%;
|
|
|
|
padding-top: 1%;
|
|
|
|
border-left: 2px dotted #EEE;/*#8BE9F3;*/
|
|
|
|
}
|
|
|
|
.memo-title{
|
|
|
|
margin: 1em 0;
|
|
|
|
padding-left: 1%;
|
|
|
|
border-bottom: 1px dashed
|
|
|
|
}
|
|
|
|
.memo-content{
|
|
|
|
padding: 1%;
|
|
|
|
margin: 1%;
|
|
|
|
margin-bottom: 40px;
|
|
|
|
background-color: #F6F6F6;
|
|
|
|
}
|
|
|
|
.memo-timestamp{
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0px;
|
|
|
|
right: 0;
|
|
|
|
margin: 20px;
|
|
|
|
}
|
|
|
|
.replies{
|
|
|
|
float: right;
|
|
|
|
/*max-width: 90%;*/
|
|
|
|
}
|
|
|
|
.reply-box{
|
|
|
|
float: right;
|
|
|
|
width: 640px;
|
|
|
|
padding: 3%;
|
|
|
|
/*border: 2px solid #C6F3F9;*/
|
|
|
|
border-top: 2px double #C6F3F9;
|
|
|
|
/*border-radius: 10px;*/
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<div class="lz">
|
|
|
|
<div class="lz-left">
|
|
|
|
<div class=""><%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %></div>
|
|
|
|
<p class=""><%=h @memo.author %></p>
|
|
|
|
</div>
|
|
|
|
<div class="memo-section">
|
|
|
|
<div class="memo-title"><%= label_tag l(:field_subject) %>: <%=h @memo.subject %></div>
|
|
|
|
<div class="memo-content"><%= textilizable(@memo, :content) %></div>
|
|
|
|
<div class="memo-timestamp"> <%= authoring @memo.created_at, @memo.author %></div>
|
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>
|
|
|
|
<% reply_count = 0%>
|
2013-11-23 08:20:03 +08:00
|
|
|
<% @replies.each do |reply| %>
|
2013-11-24 20:09:24 +08:00
|
|
|
<p class="font_lighter"><%= reply_count += 1 %>L :</p>
|
2013-11-23 20:02:15 +08:00
|
|
|
<div class="reply" id="<%= "reply-#{reply.id}" %>">
|
2013-11-24 20:09:24 +08:00
|
|
|
<div class="contextual-borad">
|
|
|
|
<%= link_to(
|
|
|
|
image_tag('comment.png'),
|
|
|
|
{:action => 'quote', :id => reply},
|
|
|
|
:remote => true,
|
|
|
|
:method => 'get',
|
|
|
|
:title => l(:button_quote)) if !@memo.locked? && authorize_for('messages', 'reply') %>
|
|
|
|
<%= link_to(
|
|
|
|
image_tag('edit.png'),
|
|
|
|
{:action => 'edit', :id => reply},
|
|
|
|
:title => l(:button_edit)
|
|
|
|
) if reply.destroyable_by?(User.current) %>
|
|
|
|
<%= link_to(
|
|
|
|
image_tag('delete.png'),
|
|
|
|
{:action => 'destroy', :id => reply},
|
|
|
|
:method => :post,
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:title => l(:button_delete)
|
|
|
|
) if reply.destroyable_by?(User.current) %>
|
|
|
|
</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">
|
|
|
|
<div class="wiki"><%= textilizable reply, :content %></div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="font_lighter" style="float:right"><%= authoring reply.created_at, reply.author %></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
2013-11-23 08:20:03 +08:00
|
|
|
<% end %>
|
2013-11-23 20:02:15 +08:00
|
|
|
</div>
|
|
|
|
|
2013-11-24 20:09:24 +08:00
|
|
|
<div class="reply-box" style="">
|
|
|
|
<%= form_for(@mome_new, url: forum_memos_path) do |f| %>
|
|
|
|
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
|
|
|
|
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
|
|
|
|
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
|
|
|
<%= label_tag(l(:label_reply_plural)) %>:
|
|
|
|
<p> <%= f.text_area :content, :required => true, :size => "75%", :resize => "none" %> </p>
|
|
|
|
<%= f.submit value: l(:label_reply_plural), class: "replies" %>
|
2013-11-23 20:02:15 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|