From f0791fe132661ecd8aa7e8f98d1bdc3346db5cfc Mon Sep 17 00:00:00 2001 From: Administrator Date: Mon, 2 Sep 2013 21:32:15 +0800 Subject: [PATCH] modify created project info as a fist activity --- app/controllers/projects_controller.rb | 3 ++- app/views/projects/show.html.erb | 6 +++++- config/locales/en.yml | 1 + config/locales/zh.yml | 3 ++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index d9ead306d..0c49e8e7e 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -320,7 +320,8 @@ class ProjectsController < ApplicationController @subprojects = @project.children.visible.all @news = @project.news.limit(5).includes(:author, :project).reorder("#{News.table_name}.created_on DESC").all @trackers = @project.rolled_up_trackers - + @user = User.find_by_id(ProjectInfo.find_by_project_id(@project.id).user_id) + cond = @project.project_condition(Setting.display_subprojects_issues?) @open_issues_by_tracker = Issue.visible.open.where(cond).count(:group => :tracker) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 7b3241b2d..4713ecce7 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -42,5 +42,9 @@ <% else %> -

<%= l(:label_project_no_activity) %>

+

+
<%=link_to image_tag(url_to_avatar(@user), :class => "avatar"), user_path(@user)%> + + +
<%=link_to @user.login.to_s,user_path(@user) %> <%= l(:label_user_create_project)+" "+ @project.name %>
<%= format_time(@project.created_on) %>

<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 4ac5c6109..7d79cb93c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1343,3 +1343,4 @@ en: label_in_issues: in the issue: label_in_bids: in the call: label_in_users: in the user: + label_user_create_project: has created diff --git a/config/locales/zh.yml b/config/locales/zh.yml index b37cda246..f74ba4a9c 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1354,4 +1354,5 @@ zh: label_projects_feedback_respond: 回复 label_projects_feedback_respond_success: 回复成功 button_projects_feedback_respond: 回复 - label_projects_feedback_respond_content: 请输入回复内容 \ No newline at end of file + label_projects_feedback_respond_content: 请输入回复内容 + label_user_create_project: 创建了 \ No newline at end of file