From 0c8e1e19e623abb3dbac0df10cd771dfbc2ede27 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Tue, 31 Dec 2013 15:36:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?"=E8=BD=AF=E4=BB=B6=E4=BC=97=E5=8C=85"?= =?UTF-8?q?=E5=92=8C=E2=80=9C=E5=88=9B=E6=96=B0=E7=AB=9E=E8=B5=9B=E2=80=9D?= =?UTF-8?q?=E4=B8=AD=E2=80=9C=E5=85=B3=E6=B3=A8=E2=80=9D=E5=8F=8A=E5=89=8D?= =?UTF-8?q?=E9=9D=A2=E6=98=9F=E5=8F=B7=E7=9A=84=E9=9A=90=E8=97=8F=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_bids.html.erb | 2 +- app/views/layouts/base_contest.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/base_bids.html.erb b/app/views/layouts/base_bids.html.erb index 5c680ce9b..e212617f8 100644 --- a/app/views/layouts/base_bids.html.erb +++ b/app/views/layouts/base_bids.html.erb @@ -69,7 +69,7 @@ <%= h @bid.name %> - <% if ( !(User.current.member_of? @project) && User.current.login?) %> + <% if User.current.login? %> <%= link_to(l(:label_fork_homework_new), fork_path(@bid)) %> diff --git a/app/views/layouts/base_contest.html.erb b/app/views/layouts/base_contest.html.erb index 5dc4e7574..b62ef96fc 100644 --- a/app/views/layouts/base_contest.html.erb +++ b/app/views/layouts/base_contest.html.erb @@ -60,7 +60,7 @@ <%= h @bid.name %> - <% if ( !(User.current.member_of? @project) && User.current.login?) %> + <% if User.current.login? %> <%= join_in_contest(@bid, User.current)%> From 4167e8bb8f47637436616ee5698771b240533825 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Fri, 3 Jan 2014 21:36:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E9=97=A8?= =?UTF-8?q?=E6=88=B7=E7=BD=91=E7=AB=99=E4=B8=AD=E7=94=A8=E6=88=B7=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E7=9A=84[=E8=BF=9B=E5=85=A5=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E5=88=97=E8=A1=A8]=E6=98=BE=E7=A4=BA=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/welcome_helper.rb | 2 +- app/views/welcome/index.html.erb | 3 ++- public/stylesheets/welcome.css | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index beecef3f1..329f84742 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -82,7 +82,7 @@ module WelcomeHelper ': '.html_safe << link_to(truncate(strip_tags(event.event_description).gsub(/ /,''), length: 30, omission:'...'), event.event_url, :target => "_blank" ) when 'attachment' - str << content_tag('span', '上传了') << content_tag('span', find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) << link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container)) + str << content_tag('span', '上传了') << content_tag('span', find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) << link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container), :class => "attachments_list_color") else str << content_tag("span", "更新了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url, :target => "_blank" ) end diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 85cd06eef..633881b64 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -132,9 +132,10 @@
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
+
<%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;", :target => "_blank" %><%= show_user_content event %> -

<%= time_tag_welcome event.event_datetime %>前     <%= show_event_reply event %>

+

<%= time_tag_welcome event.event_datetime %>     <%= show_event_reply event %>

<% end %> diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css index fcbe12d58..89e402e65 100644 --- a/public/stylesheets/welcome.css +++ b/public/stylesheets/welcome.css @@ -308,3 +308,6 @@ div#tooltip::after { border-bottom: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; } +a.attachments_list_color { + color: green; +}