Change text of project creation event for imports.

This commit is contained in:
Douwe Maan 2015-04-06 14:51:41 +02:00
parent 99abbe7dbe
commit 4740242a67
2 changed files with 7 additions and 3 deletions

View file

@ -183,7 +183,11 @@ class Event < ActiveRecord::Base
elsif commented? elsif commented?
"commented on" "commented on"
elsif created_project? elsif created_project?
"created" if project.import?
"imported"
else
"created"
end
else else
"opened" "opened"
end end

View file

@ -18,10 +18,10 @@
%a.twitter-share-button{ | %a.twitter-share-button{ |
href: "https://twitter.com/share", | href: "https://twitter.com/share", |
"data-url" => event.project.web_url, | "data-url" => event.project.web_url, |
"data-text" => "I just created a new project in GitLab! GitLab is version control on your server.", | "data-text" => "I just #{event.project.imported? ? "imported" : "created"} a new project in GitLab! GitLab is version control on your server.", |
"data-size" => "medium", | "data-size" => "medium", |
"data-related" => "gitlab", | "data-related" => "gitlab", |
"data-hashtags" => "gitlab", | "data-hashtags" => "gitlab", |
"data-count" => "none"} "data-count" => "none"}
Tweet Tweet
%script{src: "//platform.twitter.com/widgets.js"} %script{src: "//platform.twitter.com/widgets.js"}