Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-22 09:48:08 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-22 09:48:08 +0300
commit64891c6c40c6b670c2b50aab8ba56e3d47e30076 (patch)
treec0c02058708644a7b0287bdff10b30e23568bd3d /app/views/users/calendar_activities.html.haml
parent29f6b01d6343c08dc9fe1f6bdf95a645dd4e4cc0 (diff)
Replace commits calendar with contributions calendar
* count opening of issues and merge requests * dont trigger git repository - use events from database * much-much faster since does not affected by repository size
Diffstat (limited to 'app/views/users/calendar_activities.html.haml')
-rw-r--r--app/views/users/calendar_activities.html.haml53
1 files changed, 22 insertions, 31 deletions
diff --git a/app/views/users/calendar_activities.html.haml b/app/views/users/calendar_activities.html.haml
index 7c0cecfadb5..4200233dc4b 100644
--- a/app/views/users/calendar_activities.html.haml
+++ b/app/views/users/calendar_activities.html.haml
@@ -1,33 +1,24 @@
.calendar_commit_activity
- %hr
- %h4
- Commit Activity
- %strong
- - if @commit_count == 0
- no
- - else
- = @commit_count
- %span.calendar_commit_date
- unique
- = 'commit'.pluralize(@commit_count)
- on
- = @calendar_date.strftime("%b %d, %Y") rescue ''
- -unless @commit_count == 0
- %hr
- - @calendar_activities.each do |project, commits|
- - next if commits.empty?
- %div.js-toggle-container
+%h4.prepend-top-20
+ %span.light Contributions for
+ %strong #{@calendar_date.to_s(:short)}
+
+%ul.bordered-list
+ - @events.sort_by(&:created_at).each do |event|
+ %li
+ %span.light
+ %i.fa.fa-clock-o
+ = event.created_at.to_s(:time)
+ - if event.push? && event.commits_count > 0
+ pushed #{event.commits_count} commits to
+ - else
+ = event_action_name(event)
+ - if event.target
+ %strong= link_to "##{event.target_iid}", [event.project.namespace.becomes(Namespace), event.project, event.target]
+ at
+
%strong
- = pluralize(commits.count, 'commit')
- in project
- = link_to project.name_with_namespace, project_path(project)
- %a.text-expander.js-toggle-button &hellip;
- %hr
- %div.js-toggle-content
- - commits.each do |commit|
- %span.monospace
- = commit.committed_date.strftime("%H:%M")
- = link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit_short_id"
- = link_to commit.message, namespace_project_commit_path(project.namespace, project, commit), class: "commit-row-message str-truncated"
- %br
- %hr
+ - if event.project
+ = link_to_project event.project
+ - else
+ = event.project_name