This commit is contained in:
yutao 2015-07-18 13:24:07 +08:00
commit 73bd8fbef5
3 changed files with 48 additions and 19 deletions

View File

@ -250,6 +250,14 @@ update
return -1
end
end
if params[:to] == 'gitlab'
g = Gitlab.client
g.post('/session', body: {email: User.current.mail, password: User.current.hashed_password})
redirect_to "http://192.168.41.130:3000/gitlab-org/gitlab-shell/tree/master"
return
end
#if( !User.current.member_of?(@project) || @project.hidden_repo)
@repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty?
@ -540,11 +548,12 @@ update
:stack => :side,
:scale_integers => true,
:step_x_labels => 2,
:show_data_values => false,
:show_data_values => true,
:graph_title => l(:label_commits_per_month),
:show_graph_title => true
)
# 具状图
graph.add_data(
:data => commits_by_month[0..11].reverse,
:title => l(:label_revision_plural)
@ -560,7 +569,7 @@ update
def graph_commits_per_author(repository)
commits_by_author = Changeset.count(:all, :group => :committer, :conditions => ["repository_id = ?", repository.id])
commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}
commits_by_author = commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}.last(25)
changes_by_author = Change.count(:all, :group => :committer, :include => :changeset, :conditions => ["#{Changeset.table_name}.repository_id = ?", repository.id])
h = changes_by_author.inject({}) {|o, i| o[i.first] = i.last; o}
@ -582,7 +591,7 @@ update
:fields => fields,
:stack => :side,
:scale_integers => true,
:show_data_values => false,
:show_data_values => true,
:rotate_y_labels => false,
:graph_title => l(:label_commits_per_author),
:show_graph_title => true

View File

@ -4,7 +4,7 @@
<p>
<%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>
</p>
<p>
<p style="padding-top: 50px;">
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>
</p>
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>

View File

@ -7,6 +7,26 @@ zh:
direction: ltr
jquery:
locale: "zh-CN"
date:
formats:
# Use the strftime parameters for formats.
# When no format has been given, it uses default.
# You can provide other formats here if you like!
default: "%Y-%m-%d"
short: "%b%d日"
long: "%Y年%b%d日"
day_names: [星期天, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六]
abbr_day_names: [日, 一, 二, 三, 四, 五, 六]
# Don't forget the nil at the beginning; there's no such thing as a 0th month
month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月]
# Used in date_select and datime_select.
order:
- :year
- :month
- :day
notice_account_updated: 帐号更新成功
notice_account_old_wrong_password: 原始密码错误
@ -266,9 +286,9 @@ zh:
permission_view_gantt: 查看甘特图
permission_view_calendar: 查看日历
permission_view_issue_watchers: 查看跟踪者列表
permission_add_issue_watchers: 添加跟踪者
permission_delete_issue_watchers: 删除跟踪者
permission_log_time: 登记工时
@ -637,7 +657,7 @@ zh:
label_comment_add: 添加评论
label_comment_added: 评论已添加
label_comment_delete: 删除评论
@ -1201,9 +1221,9 @@ zh:
label_post_on: 发表了
label_post_on_issue: 发表了问题
label_updated_time_on: " 更新于 %{value} "
label_call_list: 需求列表
@ -1514,9 +1534,9 @@ zh:
label_news_number: 新闻的数量
label_wiki_number: wiki的数量
label_wiki_mail_notification: 发布了wiki
# redmine活跃度评分
label_message_number: 留言的数量 # delete
label_activity_number: 个人动态数量 # delete
@ -1526,14 +1546,14 @@ zh:
label_wiki_number: wiki的数量 # delete
label_activities: 个人动态
label_issue_message_number: 对issue的留言数量
label_code_submit_number: 代码提交次数
label_topic_number: 讨论区发言数量
label_join_contest: 加入竞赛
label_exit_contest: 退出竞赛
label_participator: 参与者
@ -1628,7 +1648,7 @@ zh:
label_bid_contest_show_course_name: 课程名称
label_bid_contest_show_teacher_name: 教师
label_contest_list: 竞赛列表
label_bids_task_list: 作业列表
@ -1959,9 +1979,9 @@ zh:
label_poll_republish_success: 取消成功
label_answer_total: 总计:
label_join_project: 加入项目
#
#
# 项目企业模块