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

回复数量距离铸铁增加了四行的距离;
发表人及时间位置更改为主贴左下角,右下角改为“回复”
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"> <style type="text/css">
/** { /** {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
-box-sizing: border-box; -box-sizing: border-box;
}*/ }*/
.lz { .lz {
position:relative; position: relative;
min-height: 200px; min-height: 200px;
margin: 10px 2px; margin: 10px 2px;
border-radius: 5px; border-radius: 5px;
box-shadow: 1px 1px 6px #97EBF4; box-shadow: 1px 1px 6px #97EBF4;
} }
.lz-left{ .lz-left {
float: left; float: left;
margin: 2%; margin: 2%;
padding: 0; padding: 0;
} }
.memo-section{ .memo-section {
width: auto; width: auto;
margin-left: 15%; margin-left: 15%;
padding-top: 1%; padding-top: 1%;
border-left: 2px dotted #EEE;/*#8BE9F3;*/ border-left: 2px dotted #EEE;/*#8BE9F3;*/
} }
.memo-title{ .memo-title {
margin: 1em 0; margin: 1em 0;
padding-left: 1%; padding-left: 1%;
padding-bottom: 1%; padding-bottom: 1%;
font-weight: bold; font-weight: bold;
border-bottom: 1px dashed rgb(204, 204, 204); border-bottom: 1px dashed rgb(204, 204, 204);
}
} .memo-content {
.memo-content{ padding: 1%;
padding: 1%; margin: 1%;
margin: 1%; margin-bottom: 40px;
margin-bottom: 40px; background-color: #F6F6F6;
background-color: #F6F6F6; white-space: normal;
white-space: normal; /*word-break: break-all; */
/*word-break: break-all; */ word-wrap: break-word;
word-wrap: break-word; }
} .memo-timestamp {
.memo-timestamp{ position: absolute;
position: absolute; bottom: 0px;
bottom: 0px; /*right: 0;*/
right: 0; left: 0;
margin: 20px; margin: 20px;
} }
.replies{ .replies {
float: right; float: right;
/*max-width: 90%;*/ /*max-width: 90%;*/
} }
.reply-box{ .reply-box {
float: right; float: right;
width: 640px; width: 640px;
padding: 3%; padding: 3%;
/*border: 2px solid #C6F3F9;*/ /*border: 2px solid #C6F3F9;*/
border-top: 2px double #C6F3F9; border-top: 2px double #C6F3F9;
/*border-radius: 10px;*/ /*border-radius: 10px;*/
} }
</style> </style>
<div class="lz"> <div class="lz">
<div class="contextual"> <div class="contextual">
<%= watcher_link(@topic, User.current) %> <%= watcher_link(@topic, User.current) %>
<%= link_to( <%= link_to(
l(:button_quote), l(:button_quote),
{:action => 'quote', :id => @topic}, {:action => 'quote', :id => @topic},
:remote => true, :remote => true,
:method => 'get', :method => 'get',
:class => 'icon icon-comment', :class => 'icon icon-comment',
:remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %> :remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= link_to( <%= link_to(
l(:button_edit), l(:button_edit),
{:action => 'edit', :id => @topic}, {:action => 'edit', :id => @topic},
:class => 'icon icon-edit' :class => 'icon icon-edit'
) if @message.editable_by?(User.current) %> ) if @message.editable_by?(User.current) %>
<%= link_to( <%= link_to(
l(:button_delete), l(:button_delete),
{:action => 'destroy', :id => @topic}, {:action => 'destroy', :id => @topic},
:method => :post, :method => :post,
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:class => 'icon icon-del' :class => 'icon icon-del'
) if @message.destroyable_by?(User.current) %> ) if @message.destroyable_by?(User.current) %>
</div> </div>
<div class="lz-left"> <div class="lz-left">
<div class=""><%= link_to image_tag(url_to_avatar(@topic.author), :class => "avatar"), user_path(@topic.author) %></div> <div class="">
<p class=""><%=link_to @topic.author, user_path(@topic.author) %></p> <%= 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>
<div class="memo-section"> <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-title <%= @topic.sticky? ? 'sticky' : '' %> <%= @topic.locked? ? 'locked' : '' %>">
<div class="memo-content"><%= textilizable(@topic, :content) %> <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project) %>
<%= link_to_attachments @topic, :author => false %> </div>
</div> <div class="memo-content">
<div class="memo-timestamp"> <%= authoring @topic.created_on, @topic.author %></div> <%= 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> </div>
<br /> <br />
</div> </div>
<% unless @replies.empty? %> <% unless @replies.empty? %>
<br />
<br />
<br />
<br />
<h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3> <h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3>
<% reply_count = 0 %> <% reply_count = 0 %>
<% @replies.each do |message| %> <% @replies.each do |message| %>
<div class="message reply" id="<%= "message-#{message.id}" %>"> <div class="message reply" id="<%= "message-#{message.id}" %>">
<div class="contextual-borad">
<%= link_to( <table class="borad-text-list">
image_tag('comment.png'), <tr>
{:action => 'quote', :id => message}, <td class="font_lighter"><%= reply_count += 1 %>楼 </td>
:remote => true, <td>
:method => 'get', <div class="contextual-borad">
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %> <%= link_to(
<%= link_to( "引用",
image_tag('edit.png'), {:action => 'quote', :id => message},
{:action => 'edit', :id => message}, :remote => true,
:title => l(:button_edit) :method => 'get',
) if message.editable_by?(User.current) %> :title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= link_to( <%= link_to(
image_tag('delete.png'), #image_tag('edit.png'),
{:action => 'destroy', :id => message}, "编辑",
:method => :post, {:action => 'edit', :id => message},
:data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_edit)
:title => l(:button_delete) ) if message.editable_by?(User.current) %>
) if message.destroyable_by?(User.current) %> <%= link_to(
</div> #image_tag('delete.png'),
"删除",
<table class="borad-text-list"> {:action => 'destroy', :id => message},
<tr><td class="font_lighter"><%= reply_count += 1 %>楼 </td></tr> :method => :post,
<tr><td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td> :data => {:confirm => l(:text_are_you_sure)},
<td class="comments"><div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div> :title => l(:button_delete)
<%= link_to_attachments message, :author => false %> ) if message.destroyable_by?(User.current) %>
</td></tr> </div></td>
<tr><td class="font_lighter" style="float: right"><%= authoring message.created_on, message.author %></td></tr> </tr>
</table> <tr>
</div> <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 %> <% 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 %> <% 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;"> <div id="reply" style="display:none;">
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %> <%= 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} %> <%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
<%= submit_tag l(:button_submit) %> <%= submit_tag l(:button_submit) %>
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %> <%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
<% end %> <% end %>
<div id="preview" class="wiki"></div> <div id="preview" class="wiki"></div>
</div> </div>
<% end %> <% end %>

View File

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