From f03cc6c74c73e148e2e56f775b0a034b135c2870 Mon Sep 17 00:00:00 2001 From: baiyu Date: Thu, 23 Jan 2014 14:34:54 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=89=80=E6=9C=89=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E3=80=81=E5=88=9B=E5=AE=A2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=88=86=E6=95=B0=E9=83=BD=E8=83=BD=E8=A2=AB?= =?UTF-8?q?=E7=82=B9=E5=87=BB=EF=BC=8C=E7=84=B6=E5=90=8E=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=88=96=E4=B8=AA=E4=BA=BA=E7=9A=84=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=EF=BC=9B=E7=82=B9=E5=87=BB=E5=BA=94=E8=AF=A5=E5=9C=A8?= =?UTF-8?q?=E5=88=86=E6=95=B0=E4=B8=8A=E8=80=8C=E4=B8=8D=E6=98=AF=E6=96=87?= =?UTF-8?q?=E5=AD=97=E4=B8=8A=E3=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完成:1、项目列表分数都能被点击,弹出项目窗口,点击应该在分数上而不是文字上 2、创客列表中的分数都能被点击,弹出个人的窗口,点击应该在分数上而不是文字上 --- app/views/layouts/base_projects.html.erb | 8 +++- app/views/layouts/base_users.html.erb | 10 +++-- .../_code_submit_score_index.html.erb | 2 + app/views/projects/_file_score_index.html.erb | 4 +- app/views/projects/_news_score_index.html.erb | 4 +- app/views/projects/_project.html.erb | 42 +++++++++++++++++-- .../projects/_project_score_index.html.erb | 2 + .../_projects_topic_score_index.html.erb | 2 + .../projects/code_submit_score_index.js.erb | 4 +- app/views/projects/file_score_index.js.erb | 4 +- app/views/projects/issue_score_index.js.erb | 2 + app/views/projects/news_score_index.js.erb | 2 + app/views/projects/project_score_index.js.erb | 2 + .../projects_topic_score_index.js.erb | 4 +- app/views/projects/show_projects_score.js.erb | 4 +- app/views/users/_show_score.html.erb | 2 + app/views/users/_user_show.html.erb | 38 ++++++++++++++++- app/views/users/activity_score_index.js.erb | 4 +- app/views/users/influence_score_index.js.erb | 4 +- app/views/users/project_score_index.js.erb | 4 +- app/views/users/score_index.js.erb | 4 +- app/views/users/show_score.js.erb | 2 + app/views/users/topic_score_index.js.erb | 4 +- 23 files changed, 137 insertions(+), 21 deletions(-) diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 0783a01f5..15b52b1e7 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -88,8 +88,12 @@ <% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %> <% if @project.project_type == 0 %> - <%= link_to(l(:label_project_grade), {:controller => 'projects', :action => 'show_projects_score', :remote => true, :id => @project.id})%> : - <%= format("%.2f" , finall_project_score ).to_f %> + <%= l(:label_project_grade)%> : + <%= link_to(format("%.2f" , finall_project_score ).to_f, {:controller => 'projects', + :action => 'show_projects_score', + :remote => true, + :id => @project.id + }, :style => "color: #EC6300;")%> <% end %> diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index a08b48314..b57c6df13 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -93,9 +93,13 @@ <% finall_influence_score = news_score + wiki_contents_score + comments_score %> <% finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %> - - <%= link_to(l(:label_user_grade), {:controller => 'users', :action => 'show_score', :remote => true, :id => @user.id})%>: - <%= format("%.2f" , finall_user_score).to_f %> + + <%= l(:label_user_grade)%>: + <%= link_to(format("%.2f" , finall_user_score).to_f, {:controller => 'users', + :action => 'show_score', + :remote => true, + :id => @user.id + }, :style => 'color :#E8770D;') %> diff --git a/app/views/projects/_code_submit_score_index.html.erb b/app/views/projects/_code_submit_score_index.html.erb index 0e14f4a85..238993afe 100644 --- a/app/views/projects/_code_submit_score_index.html.erb +++ b/app/views/projects/_code_submit_score_index.html.erb @@ -1,5 +1,7 @@ + <% changeset_count = @project.changesets.count %> <% code_submit_score = changeset_count * 0.3 %> <% finall_code_submit_score = code_submit_score %>
<%= l(:label_code_submit_number) %> * 0.3 = <%= changeset_count %> * 0.3 = <%= format("%.2f" , code_submit_score).to_f %>
<%= l(:label_code_submit_score) %> = <%= format("%.2f" , finall_code_submit_score).to_f %>
+ \ No newline at end of file diff --git a/app/views/projects/_file_score_index.html.erb b/app/views/projects/_file_score_index.html.erb index d6a4e1f73..3b4810f65 100644 --- a/app/views/projects/_file_score_index.html.erb +++ b/app/views/projects/_file_score_index.html.erb @@ -1,5 +1,7 @@ + <% document_count = @project.documents.count %> <% file_score = document_count * 0.1 %> <% finall_file_score = file_score %>
<%= l(:label_file_number) %> * 0.1 = <%= document_count %> * 0.1 = <%= format("%.2f" , file_score).to_f %>
-
<%= l(:label_file_score) %> = <%= format("%.2f" , finall_file_score).to_f %>
\ No newline at end of file +
<%= l(:label_file_score) %> = <%= format("%.2f" , finall_file_score).to_f %>
+ \ No newline at end of file diff --git a/app/views/projects/_news_score_index.html.erb b/app/views/projects/_news_score_index.html.erb index db0b98138..0f374b871 100644 --- a/app/views/projects/_news_score_index.html.erb +++ b/app/views/projects/_news_score_index.html.erb @@ -1,5 +1,7 @@ + <% new_count = @project.news.count %> <% new_score = new_count * 0.1 %> <% finall_new_score = new_score %>
<%= l(:label_new_number) %> * 0.1 = <%= new_count %> * 0.1 = <%= format("%.2f" , new_score).to_f %>
-
<%= l(:label_news_score) %> = <%= format("%.2f" , finall_new_score).to_f %>
\ No newline at end of file +
<%= l(:label_news_score) %> = <%= format("%.2f" , finall_new_score).to_f %>
+ \ No newline at end of file diff --git a/app/views/projects/_project.html.erb b/app/views/projects/_project.html.erb index cd7c76030..541a71f51 100644 --- a/app/views/projects/_project.html.erb +++ b/app/views/projects/_project.html.erb @@ -87,14 +87,50 @@
<%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %>
+ +
+ <% issue_count = @project.issues.count %> + <% issue_journal_count = @project.issue_changes.count %> + <% issue_score = issue_count * 0.2 %> + <% issue_journal_score = issue_journal_count * 0.1 %> + <% finall_issue_score = issue_score + issue_journal_score %> + + <% new_count = @project.news.count %> + <% new_score = new_count * 0.1 %> + <% finall_new_score = new_score %> + + <% document_count = @project.documents.count %> + <% file_score = document_count * 0.1 %> + <% finall_file_score = file_score %> + + <% changeset_count = @project.changesets.count %> + <% code_submit_score = changeset_count * 0.3 %> + <% finall_code_submit_score = code_submit_score %> + + <% board_message_count = 0 %> + <% @project.boards.each do |board| %> + <% board_message_count += board.messages_count %> + <% end %> + <% topic_score = board_message_count * 0.1 %> + <% finall_topic_score = topic_score %> + + <% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %> + <% if @project.project_type !=1 %> - <%= content_tag('span', "#{l(:label_project_grade)}: ")%><%=@project.project_status ? @project.project_status.grade : 0.0 %> + <%= l(:label_project_grade)%>: + + <%= link_to(format("%.2f" , finall_project_score ).to_f, + {:controller => 'projects', + :action => 'show_projects_score', + :remote => true, :id => @project.id}, :style=>"color: #EC6300;") %> + <% end %>
- + - + + diff --git a/app/views/projects/_project_score_index.html.erb b/app/views/projects/_project_score_index.html.erb index 6f98d549f..ab0dc18ca 100644 --- a/app/views/projects/_project_score_index.html.erb +++ b/app/views/projects/_project_score_index.html.erb @@ -1,3 +1,4 @@ + <% issue_count = @project.issues.count %> <% issue_journal_count = @project.issue_changes.count %> <% issue_score = issue_count * 0.2 %> @@ -32,3 +33,4 @@ <%= format("%.2f" , finall_file_score).to_f %> + <%= format("%.2f" , finall_code_submit_score).to_f %> + <%= format("%.2f" , topic_score).to_f %>
= <%= format("%.2f" , finall_project_score).to_f %>
+ \ No newline at end of file diff --git a/app/views/projects/_projects_topic_score_index.html.erb b/app/views/projects/_projects_topic_score_index.html.erb index 1c4e7b14d..1e059007a 100644 --- a/app/views/projects/_projects_topic_score_index.html.erb +++ b/app/views/projects/_projects_topic_score_index.html.erb @@ -1,3 +1,4 @@ + <% board_message_count = 0 %> <% @project.boards.each do |board| %> <% board_message_count += board.messages_count %> @@ -6,3 +7,4 @@ <% finall_topic_score = topic_score %>
<%= l(:label_topic_number) %> * 0.1 = <%= board_message_count %> * 0.1 = <%= topic_score %>
<%= l(:label_topic_score) %> = <%= format("%.2f" , finall_topic_score).to_f %>
+ \ No newline at end of file diff --git a/app/views/projects/code_submit_score_index.js.erb b/app/views/projects/code_submit_score_index.js.erb index ce1bc26fe..87393cb37 100644 --- a/app/views/projects/code_submit_score_index.js.erb +++ b/app/views/projects/code_submit_score_index.js.erb @@ -1,3 +1,5 @@ + $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/code_submit_score_index') %>'); showModal('ajax-modal', '400px'); -$('#ajax-modal').addClass('new-watcher'); \ No newline at end of file +$('#ajax-modal').addClass('new-watcher'); + \ No newline at end of file diff --git a/app/views/projects/file_score_index.js.erb b/app/views/projects/file_score_index.js.erb index 67ccf5231..a702b09cb 100644 --- a/app/views/projects/file_score_index.js.erb +++ b/app/views/projects/file_score_index.js.erb @@ -1,3 +1,5 @@ + $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/file_score_index') %>'); showModal('ajax-modal', '400px'); -$('#ajax-modal').addClass('new-watcher'); \ No newline at end of file +$('#ajax-modal').addClass('new-watcher'); + \ No newline at end of file diff --git a/app/views/projects/issue_score_index.js.erb b/app/views/projects/issue_score_index.js.erb index 9d715a72d..a1269fa8c 100644 --- a/app/views/projects/issue_score_index.js.erb +++ b/app/views/projects/issue_score_index.js.erb @@ -1,3 +1,5 @@ + $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/issue_score_index') %>'); showModal('ajax-modal', '400px'); $('#ajax-modal').addClass('new-watcher'); + \ No newline at end of file diff --git a/app/views/projects/news_score_index.js.erb b/app/views/projects/news_score_index.js.erb index 266704b83..0da583ea5 100644 --- a/app/views/projects/news_score_index.js.erb +++ b/app/views/projects/news_score_index.js.erb @@ -1,3 +1,5 @@ + $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/news_score_index') %>'); showModal('ajax-modal', '400px'); $('#ajax-modal').addClass('new-watcher'); + \ No newline at end of file diff --git a/app/views/projects/project_score_index.js.erb b/app/views/projects/project_score_index.js.erb index a99c8ae6c..f8c347c8b 100644 --- a/app/views/projects/project_score_index.js.erb +++ b/app/views/projects/project_score_index.js.erb @@ -1,3 +1,5 @@ + $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/project_score_index') %>'); showModal('ajax-modal', '400px'); $('#ajax-modal').addClass('new-watcher'); + \ No newline at end of file diff --git a/app/views/projects/projects_topic_score_index.js.erb b/app/views/projects/projects_topic_score_index.js.erb index d2e1552b1..ef5b975d5 100644 --- a/app/views/projects/projects_topic_score_index.js.erb +++ b/app/views/projects/projects_topic_score_index.js.erb @@ -1,3 +1,5 @@ + $('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/projects_topic_score_index') %>'); showModal('ajax-modal', '400px'); -$('#ajax-modal').addClass('new-watcher'); \ No newline at end of file +$('#ajax-modal').addClass('new-watcher'); + \ No newline at end of file diff --git a/app/views/projects/show_projects_score.js.erb b/app/views/projects/show_projects_score.js.erb index 476cffae1..540db5395 100644 --- a/app/views/projects/show_projects_score.js.erb +++ b/app/views/projects/show_projects_score.js.erb @@ -1,3 +1,5 @@ + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/show_projects_score') %>'); showModal('ajax-modal', '400px'); -$('#ajax-modal').addClass('new-watcher'); \ No newline at end of file +$('#ajax-modal').addClass('new-watcher'); + \ No newline at end of file diff --git a/app/views/users/_show_score.html.erb b/app/views/users/_show_score.html.erb index 45a5d8b99..d17b2bfa9 100644 --- a/app/views/users/_show_score.html.erb +++ b/app/views/users/_show_score.html.erb @@ -1,7 +1,9 @@ +<% unless @user.id == 1%> <% messages_count = @user.messages.count %> <% messages_score = messages_count * 0.05%> <% finall_messages_score = messages_score %> +<% end %> <% journals_count = @user.journals.count %> <% journals_score = journals_count * 0.1 %> diff --git a/app/views/users/_user_show.html.erb b/app/views/users/_user_show.html.erb index 6fd22e422..71157d070 100644 --- a/app/views/users/_user_show.html.erb +++ b/app/views/users/_user_show.html.erb @@ -1,6 +1,33 @@ +
<% for user in @users -%> <% unless user.id == 1%> + + <% messages_count = user.messages.count %> + <% messages_score = messages_count * 0.05%> + <% finall_messages_score = messages_score %> + + <% journals_count = user.journals.count %> + <% journals_score = journals_count * 0.1 %> + <% user_changesets_count = user.changesets.count %> + <% user_changesets_score = user_changesets_count * 0.3 %> + <% finall_user_project_score = journals_score + user_changesets_score %> + + <% journals_for_messages_count = user.journals_for_messages.count %> + <% activities_count = user.activities.count %> + <% journals_for_messages_score = journals_for_messages_count * 0.05 %> + <% activities_score = activities_count * 0.2 %> + <% finall_activity_score = journals_for_messages_score + activities_score %> + + <% news_count = user.news.count %> + <% news_score = news_count * 0.1 %> + <% wiki_contents_count = user.wiki_contents.count %> + <% wiki_contents_score = wiki_contents_count * 0.1 %> + <% comments_count = user.comments.count %> + <% comments_score = comments_count * 0.1 %> + <% finall_influence_score = news_score + wiki_contents_score + comments_score %> + <% finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %> +
<%= content_tag "p", "#{format_date(user.created_on)} #{l(:label_member_since)}", :class => "float_right member_since" %> @@ -9,10 +36,17 @@
<%= image_tag(url_to_avatar(user), :class => 'avatar') %> <%= content_tag "span", link_to_user(user), :class => "nomargin avatar_name" %> + +
- <%= l(:label_user_grade) %>: <%= user.user_status.grade %> + <%= l(:label_user_grade) %>: + <%= link_to( format("%.2f" , finall_user_score).to_f, {:controller => 'users', + :action => 'show_score', + :remote => true, + :id => user.id}, + :style=>"color: #EC6300;") %>
- +
diff --git a/app/views/users/activity_score_index.js.erb b/app/views/users/activity_score_index.js.erb index 916627ecb..555486266 100644 --- a/app/views/users/activity_score_index.js.erb +++ b/app/views/users/activity_score_index.js.erb @@ -1 +1,3 @@ -$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/activity_score_index', :locals => {:index =>0 }) %>'); \ No newline at end of file + +$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/activity_score_index', :locals => {:index =>0 }) %>'); + \ No newline at end of file diff --git a/app/views/users/influence_score_index.js.erb b/app/views/users/influence_score_index.js.erb index cf0926b46..55d4565d9 100644 --- a/app/views/users/influence_score_index.js.erb +++ b/app/views/users/influence_score_index.js.erb @@ -1 +1,3 @@ -$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/influence_score_index', :locals => {:index =>0 }) %>'); \ No newline at end of file + +$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/influence_score_index', :locals => {:index =>0 }) %>'); + \ No newline at end of file diff --git a/app/views/users/project_score_index.js.erb b/app/views/users/project_score_index.js.erb index 19ded64ee..a730441d4 100644 --- a/app/views/users/project_score_index.js.erb +++ b/app/views/users/project_score_index.js.erb @@ -1 +1,3 @@ -$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/project_score_index', :locals => {:index =>1 }) %>'); \ No newline at end of file + +$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/project_score_index', :locals => {:index =>1 }) %>'); + \ No newline at end of file diff --git a/app/views/users/score_index.js.erb b/app/views/users/score_index.js.erb index 7911b988a..1123e7d67 100644 --- a/app/views/users/score_index.js.erb +++ b/app/views/users/score_index.js.erb @@ -1 +1,3 @@ -$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/score_index', :locals => {:index =>0 }) %>'); \ No newline at end of file + +$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/score_index', :locals => {:index =>0 }) %>'); + \ No newline at end of file diff --git a/app/views/users/show_score.js.erb b/app/views/users/show_score.js.erb index 3cd9a5e47..b3bbf576e 100644 --- a/app/views/users/show_score.js.erb +++ b/app/views/users/show_score.js.erb @@ -1,3 +1,5 @@ + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_score') %>'); showModal('ajax-modal', '400px'); $('#ajax-modal').addClass('new-watcher'); + \ No newline at end of file diff --git a/app/views/users/topic_score_index.js.erb b/app/views/users/topic_score_index.js.erb index 28505b627..b4994eff3 100644 --- a/app/views/users/topic_score_index.js.erb +++ b/app/views/users/topic_score_index.js.erb @@ -1 +1,3 @@ -$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/topic_score_index', :locals => {:index =>0 }) %>'); \ No newline at end of file + +$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/topic_score_index', :locals => {:index =>0 }) %>'); + \ No newline at end of file From c231f3bd35b85ffdbe7db2267d51f65815f59aca Mon Sep 17 00:00:00 2001 From: Wen Date: Thu, 23 Jan 2014 15:13:38 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=92=8C=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E7=9A=84=E8=AE=A8=E8=AE=BA=E5=8C=BA=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=BC=95=E7=94=A8=E3=80=81=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E3=80=81=E5=88=A0=E9=99=A4=E5=9D=87=E6=94=B9=E4=B8=BA=E6=96=87?= =?UTF-8?q?=E5=AD=97=EF=BC=8C=E4=B8=94=E6=94=BE=E7=BD=AE=E5=9C=A8=E6=A5=BC?= =?UTF-8?q?=E5=B1=82=E6=95=B0=E6=97=81=E8=BE=B9=EF=BC=9B=20=E5=9B=9E?= =?UTF-8?q?=E5=A4=8D=E6=95=B0=E9=87=8F=E8=B7=9D=E7=A6=BB=E9=93=B8=E9=93=81?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=9B=9B=E8=A1=8C=E7=9A=84=E8=B7=9D?= =?UTF-8?q?=E7=A6=BB=EF=BC=9B=20=E5=8F=91=E8=A1=A8=E4=BA=BA=E5=8F=8A?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=BD=8D=E7=BD=AE=E6=9B=B4=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E4=B8=BB=E8=B4=B4=E5=B7=A6=E4=B8=8B=E8=A7=92=EF=BC=8C=E5=8F=B3?= =?UTF-8?q?=E4=B8=8B=E8=A7=92=E6=94=B9=E4=B8=BA=E2=80=9C=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/messages/show.html.erb | 282 ++++++++++++++++------------- public/stylesheets/application.css | 2 +- 2 files changed, 157 insertions(+), 127 deletions(-) diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb index fae3c4c38..51ed6a884 100644 --- a/app/views/messages/show.html.erb +++ b/app/views/messages/show.html.erb @@ -1,151 +1,181 @@
-
- <%= 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) %> -
-
-
<%= link_to image_tag(url_to_avatar(@topic.author), :class => "avatar"), user_path(@topic.author) %>
-

<%=link_to @topic.author, user_path(@topic.author) %>

+
+ <%= 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) %> +
+
+
+ <%= link_to image_tag(url_to_avatar(@topic.author), :class => "avatar"), user_path(@topic.author) %> +
+

+ <%= link_to @topic.author, user_path(@topic.author) %> +

-
<%= label_tag l(:field_subject) %>: <%=link_to @topic.subject, project_boards_path(@topic.project) %>
-
<%= textilizable(@topic, :content) %> - <%= link_to_attachments @topic, :author => false %> -
-
<%= authoring @topic.created_on, @topic.author %>
+
+ <%= label_tag l(:field_subject) %>: <%= link_to @topic.subject, project_boards_path(@topic.project) %> +
+
+ <%= textilizable(@topic, :content) %> + <%= link_to_attachments @topic, :author => false %> +
+
+ <%= authoring @topic.created_on, @topic.author %> +
+ <% if !@topic.locked? && authorize_for('messages', 'reply') %> +

+ <%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %> +


<% unless @replies.empty? %> +
+
+
+

<%= l(:label_reply_plural) %> (<%= @reply_count %>)

-<% reply_count = 0 %> +<% reply_count = 0 %> <% @replies.each do |message| %> -
"> -
- <%= 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) %> -
- - - - - - -
<%= reply_count += 1 %>楼
<%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %>
<%= textilizable message, :content, :attachments => message.attachments %>
- <%= link_to_attachments message, :author => false %> -
<%= authoring message.created_on, message.author %>
-
- +
"> + + + + + + + + + + + + + +
<%= reply_count += 1 %>楼 +
+ <%= 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) %> +
<%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %> +
+ <%= textilizable message, :content, :attachments => message.attachments %> +
<%= link_to_attachments message, :author => false %>
<%= authoring message.created_on, message.author %>
+
+ <% end %> - + <% end %> -<% if !@topic.locked? && authorize_for('messages', 'reply') %> -

<%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %>

+ + + <% end %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 46baeb5e7..032b40916 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -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; From ed922dd1926de623167542f27e6671e1f83ee72c Mon Sep 17 00:00:00 2001 From: Wen Date: Thu, 23 Jan 2014 16:19:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E3=80=81=E5=88=A0=E9=99=A4=E4=B9=8B=E5=89=8D=E7=9A=84?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/application.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 032b40916..ae82ef9ba 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1371,7 +1371,7 @@ table.attributes { width: 100% } table.attributes th { vertical-align: top; text-align: left; } table.attributes td { vertical-align: top; } -table.boards a.board, h3.comments { background: url(../images/comment.png) no-repeat 0% 50%; padding-left: 20px; } +table.boards a.board, h3.comments { /*background: url(../images/comment.png) no-repeat 0% 50%; */padding-left: 5px; } table.boards td.topic-count, table.boards td.message-count {text-align:center;} table.boards td.last-message {font-size:80%;} @@ -2458,7 +2458,7 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');} .icon-edit { background-image: url(../images/edit.png); } .icon-copy { background-image: url(../images/copy.png); } .icon-duplicate { background-image: url(../images/duplicate.png); } -.icon-del { background-image: url(../images/delete.png); } +.icon-del { /*background-image: url(../images/delete.png); */} .icon-move { background-image: url(../images/move.png); } .icon-save { background-image: url(../images/save.png); } .icon-cancel { background-image: url(../images/cancel.png); } @@ -2483,7 +2483,7 @@ a.close-icon:hover {background-image:url('../images/close_hl.png');} .icon-checked { background-image: url(../images/true.png); } .icon-details { background-image: url(../images/zoom_in.png); } .icon-report { background-image: url(../images/report.png); } -.icon-comment { background-image: url(../images/comment.png); } +.icon-comment { /*background-image: url(../images/comment.png); */} .icon-summary { background-image: url(../images/lightning.png); } .icon-server-authentication { background-image: url(../images/server_key.png); } .icon-issue { background-image: url(../images/ticket.png); }