项目和课程的讨论区界面中,引用、编辑、删除均改为文字,且放置在楼层数旁边;

回复数量距离铸铁增加了四行的距离;
发表人及时间位置更改为主贴左下角,右下角改为“回复”
This commit is contained in:
Wen 2014-01-23 15:13:38 +08:00
parent f03cc6c74c
commit c231f3bd35
2 changed files with 157 additions and 127 deletions

View File

@ -1,151 +1,181 @@
<style type="text/css">
/** {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-box-sizing: border-box;
}*/
.lz {
position:relative;
/** {
-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: 1px 1px 6px #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%;
padding-bottom: 1%;
font-weight: bold;
border-bottom: 1px dashed rgb(204, 204, 204);
}
.memo-content{
padding: 1%;
margin: 1%;
margin-bottom: 40px;
background-color: #F6F6F6;
white-space: normal;
/*word-break: break-all; */
word-wrap: break-word;
}
.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;*/
}
}
.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%;
padding-bottom: 1%;
font-weight: bold;
border-bottom: 1px dashed rgb(204, 204, 204);
}
.memo-content {
padding: 1%;
margin: 1%;
margin-bottom: 40px;
background-color: #F6F6F6;
white-space: normal;
/*word-break: break-all; */
word-wrap: break-word;
}
.memo-timestamp {
position: absolute;
bottom: 0px;
/*right: 0;*/
left: 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="contextual">
<%= watcher_link(@topic, User.current) %>
<%= link_to(
l(:button_quote),
{:action => 'quote', :id => @topic},
:remote => true,
:method => 'get',
:class => 'icon icon-comment',
:remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= link_to(
l(:button_edit),
{:action => 'edit', :id => @topic},
:class => 'icon icon-edit'
) if @message.editable_by?(User.current) %>
<%= link_to(
l(:button_delete),
{:action => 'destroy', :id => @topic},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'icon icon-del'
) if @message.destroyable_by?(User.current) %>
</div>
<div class="lz-left">
<div class=""><%= link_to image_tag(url_to_avatar(@topic.author), :class => "avatar"), user_path(@topic.author) %></div>
<p class=""><%=link_to @topic.author, user_path(@topic.author) %></p>
<div class="contextual">
<%= watcher_link(@topic, User.current) %>
<%= link_to(
l(:button_quote),
{:action => 'quote', :id => @topic},
:remote => true,
:method => 'get',
:class => 'icon icon-comment',
:remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= link_to(
l(:button_edit),
{:action => 'edit', :id => @topic},
:class => 'icon icon-edit'
) if @message.editable_by?(User.current) %>
<%= link_to(
l(:button_delete),
{:action => 'destroy', :id => @topic},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'icon icon-del'
) if @message.destroyable_by?(User.current) %>
</div>
<div class="lz-left">
<div class="">
<%= link_to image_tag(url_to_avatar(@topic.author), :class => "avatar"), user_path(@topic.author) %>
</div>
<p class="">
<%= link_to @topic.author, user_path(@topic.author) %>
</p>
</div>
<div class="memo-section">
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>"><%= label_tag l(:field_subject) %>: <%=link_to @topic.subject, project_boards_path(@topic.project) %></div>
<div class="memo-content"><%= textilizable(@topic, :content) %>
<%= link_to_attachments @topic, :author => false %>
</div>
<div class="memo-timestamp"> <%= authoring @topic.created_on, @topic.author %></div>
<div class="memo-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>">
<%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project) %>
</div>
<div class="memo-content">
<%= textilizable(@topic, :content) %>
<%= link_to_attachments @topic, :author => false %>
</div>
<div class="memo-timestamp">
<%= authoring @topic.created_on, @topic.author %>
</div>
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
<p style="float: right;">
<%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %>
</p>
</div>
<br />
</div>
<% unless @replies.empty? %>
<br />
<br />
<br />
<br />
<h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3>
<% reply_count = 0 %>
<% reply_count = 0 %>
<% @replies.each do |message| %>
<div class="message reply" id="<%= "message-#{message.id}" %>">
<div class="contextual-borad">
<%= link_to(
image_tag('comment.png'),
{:action => 'quote', :id => message},
:remote => true,
:method => 'get',
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= link_to(
image_tag('edit.png'),
{:action => 'edit', :id => message},
:title => l(:button_edit)
) if message.editable_by?(User.current) %>
<%= link_to(
image_tag('delete.png'),
{:action => 'destroy', :id => message},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if message.destroyable_by?(User.current) %>
</div>
<table class="borad-text-list">
<tr><td class="font_lighter"><%= reply_count += 1 %>楼 </td></tr>
<tr><td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td>
<td class="comments"><div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div>
<%= link_to_attachments message, :author => false %>
</td></tr>
<tr><td class="font_lighter" style="float: right"><%= authoring message.created_on, message.author %></td></tr>
</table>
</div>
<div class="message reply" id="<%= "message-#{message.id}" %>">
<table class="borad-text-list">
<tr>
<td class="font_lighter"><%= reply_count += 1 %>楼 </td>
<td>
<div class="contextual-borad">
<%= link_to(
"引用",
{:action => 'quote', :id => message},
:remote => true,
:method => 'get',
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= link_to(
#image_tag('edit.png'),
"编辑",
{:action => 'edit', :id => message},
:title => l(:button_edit)
) if message.editable_by?(User.current) %>
<%= link_to(
#image_tag('delete.png'),
"删除",
{:action => 'destroy', :id => message},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if message.destroyable_by?(User.current) %>
</div></td>
</tr>
<tr>
<td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td>
<td class="comments">
<div class="wiki">
<%= textilizable message, :content, :attachments => message.attachments %>
</div> <%= link_to_attachments message, :author => false %> </td>
</tr>
<tr>
<td class="font_lighter" style="float: left"><%= authoring message.created_on, message.author %></td>
</tr>
</table>
</div>
<% end %>
<div class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></div>
<div class="pagination">
<%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %>
</div>
<% end %>
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
<p style="float: right;"><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
<div id="reply" style="display:none;">
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
<%= submit_tag l(:button_submit) %>
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
<% end %>
<div id="preview" class="wiki"></div>
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
<%= submit_tag l(:button_submit) %>
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
<% end %>
<div id="preview" class="wiki"></div>
</div>
<% end %>

View File

@ -258,7 +258,7 @@ span.forums-avatar-right{
text-overflow: ellipsis;
}
.contextual-borad{
float:right;
/*float:right;*/
white-space: nowrap;
line-height:1.4em;
margin-top:0px;