summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruser <user@usre.(none)>2011-11-18 21:31:56 +0300
committeruser <user@usre.(none)>2011-11-18 21:31:56 +0300
commited63d28e7a3d319d10c1477e12ec8f64bdabe3bd (patch)
tree6ac3735d063b122e8ac31cf149806493c64c5e7d
parentc3eac16fe97d33f3296e2c8ce870855345df446d (diff)
parentc359eadf8eab096ef3193bf901b40b84488ca74d (diff)
downloadgitlab-ce-ed63d28e7a3d319d10c1477e12ec8f64bdabe3bd.tar.gz
Merge branch 'master' of https://github.com/gitlabhq/gitlabhq into admin-panel-disign
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock15
-rw-r--r--app/assets/stylesheets/style.scss65
-rw-r--r--app/models/note.rb1
-rw-r--r--app/models/user.rb2
-rw-r--r--app/views/commits/_text_file.html.haml1
-rw-r--r--app/views/layouts/_head_panel.html.erb6
-rw-r--r--app/views/layouts/project.html.haml2
-rw-r--r--lib/commit_ext.rb8
-rw-r--r--spec/models/note_spec.rb7
-rw-r--r--spec/models/user_spec.rb2
11 files changed, 84 insertions, 27 deletions
diff --git a/Gemfile b/Gemfile
index cd10715950b..f1f1791210b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -39,7 +39,7 @@ group :development, :test do
gem 'capybara'
gem 'autotest'
gem 'autotest-rails'
- # gem 'ruby-debug19', :require => 'ruby-debug'
+ gem 'ruby-debug19', :require => 'ruby-debug'
gem 'awesome_print'
gem 'database_cleaner'
gem 'launchy'
diff --git a/Gemfile.lock b/Gemfile.lock
index a8dcd49f8c9..a0d9d664645 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -50,6 +50,7 @@ GEM
acts_as_list (0.1.4)
addressable (2.2.6)
ansi (1.4.1)
+ archive-tar-minitar (0.5.2)
arel (2.2.1)
autotest (4.4.6)
ZenTest (>= 4.4.1)
@@ -77,6 +78,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.1.3)
+ columnize (0.3.4)
daemons (1.1.4)
database_cleaner (0.7.0)
devise (1.5.0)
@@ -113,6 +115,8 @@ GEM
letter_opener (0.0.2)
launchy
libv8 (3.3.10.4)
+ linecache19 (0.5.12)
+ ruby_core_source (>= 0.1.4)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
@@ -168,6 +172,16 @@ GEM
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.7.0)
+ ruby-debug-base19 (0.11.25)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby_core_source (>= 0.1.4)
+ ruby-debug19 (0.11.6)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby-debug-base19 (>= 0.11.19)
+ ruby_core_source (0.1.5)
+ archive-tar-minitar (>= 0.5.2)
rubypython (0.5.3)
blankslate (>= 2.1.2.3)
ffi (~> 1.0.7)
@@ -254,6 +268,7 @@ DEPENDENCIES
rails-footnotes (~> 3.7.5)
rdiscount
rspec-rails
+ ruby-debug19
sass-rails (~> 3.1.0)
seed-fu (~> 2.1.0)
shoulda (~> 3.0.0.beta2)
diff --git a/app/assets/stylesheets/style.scss b/app/assets/stylesheets/style.scss
index 7947a293340..9344b000777 100644
--- a/app/assets/stylesheets/style.scss
+++ b/app/assets/stylesheets/style.scss
@@ -74,7 +74,6 @@ $blue_link: "#2fa0bb";
/* eo Vars */
html{ -webkit-font-smoothing:antialiased; }
-*{text-shadow: 0 1px 0 white}
body{font-size: 12px; background-color: #eee;}
a{text-decoration: none; font-weight: bold; color: #666}
a:hover{color: #333}
@@ -494,13 +493,55 @@ header .account-links a:last-child{
border-bottom: 0;
}
-#no_ssh_key_defined {
- border:1px solid #ee8801;
- margin:20px;
- padding:20px;
- background:#ffe3f0;
- h2{margin:0;}
- p {margin:10px 0 0;}
+.big-message{
+ background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.041, #eccb40), to(#ffee4d));
+ background-image: -webkit-linear-gradient(90deg, #eccb40 4.1%, #ffee4d);
+ background-image: -moz-linear-gradient(90deg, #eccb40 4.1%, #ffee4d);
+ background-image: -o-linear-gradient(90deg, #eccb40 4.1%, #ffee4d);
+ text-align: center;
+ font-weight: bold;
+ padding: 10px 20px;
+ text-shadow: 0 1px 0 rgba(255,255,255,.3);
+ color: #333;
+ color: rgba(0,0,0,.7);
+ font-size: 14px;
+ box-shadow: 0 1px 2px rgba(0,0,0,.7);
+ z-index: 100000;
+ margin-bottom: 2px;
+}
+
+.big-message a{color: #000; text-decoration: underline;}
+
+.big-message.error{
+ background-color: #722523;
+ background-image: -webkit-gradient(linear, 0 49, 0 0, color-stop(0.04, #722523), to(#ad4846));
+ background-image: -webkit-linear-gradient(90deg, #9b403f 4%, #c16765);
+ background-image: -moz-linear-gradient(90deg, #722523 4%, #ad4846);
+ background-image: -o-linear-gradient(90deg, #722523 4%, #ad4846);
+ color: #2E0D0C;
+}
+
+.big-message.success{
+ background-color: #7a9339;
+ background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.062, #7a9339), to(#93ae46));
+ background-image: -webkit-linear-gradient(90deg, #7a9339 6.2%, #93ae46);
+ background-image: -moz-linear-gradient(90deg, #7a9339 6.2%, #93ae46);
+ background-image: -o-linear-gradient(90deg, #7a9339 6.2%, #93ae46)
+}
+
+.big-message.success{
+ background-color: #7a9339;
+ background-image: -webkit-gradient(linear, 0 48, 0 0, color-stop(0.062, #7a9339), to(#93ae46));
+ background-image: -webkit-linear-gradient(90deg, #7a9339 6.2%, #93ae46);
+ background-image: -moz-linear-gradient(90deg, #7a9339 6.2%, #93ae46);
+ background-image: -o-linear-gradient(90deg, #7a9339 6.2%, #93ae46)
+}
+
+.big-message.notice{
+ background-image: -webkit-gradient(linear, 0 49, 0 0, color-stop(0.061, #447790), color-stop(0.897, #5da2bf));
+ background-image: -webkit-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%);
+ background-image: -moz-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%);
+ background-image: -o-linear-gradient(90deg, #447790 6.1%, #5da2bf 89.7%)
}
/* eo Account Box */
@@ -516,12 +557,14 @@ h2.icon span{background: #E3E5EA url('images.png'); height: 32px; width: 32px;
/* Dashboard Page */
html, body { height: 100%; }
+
+
body.dashboard-page h2.icon span{ background-position: 9px -69px; }
body.dashboard-page header{margin-bottom: 0}
-body.dashboard-page .news-feed{padding-left: 1em; margin-right: 450px; margin-left: 1%}
+body.dashboard-page .news-feed{padding-left: 1em; margin-right: 450px; min-height: 600px; margin-left: 1%}
body.dashboard-page .dashboard-content{ position: relative; float: left; width: 100%; height: 100%; }
body.dashboard-page .news-feed h2{float: left;}
-body.dashboard-page aside{ min-height: 700px; width: 420px; float: right; background-color: #f7f7f7; border-left: 1px solid #ccc }
+body.dashboard-page aside{ min-height: 700px; position: absolute; top: 0; bottom: 0; right: 0; width: 420px; float: right; background-color: #f7f7f7; border-left: 1px solid #ccc }
body.dashboard-page aside h4{margin: 0; border-bottom: 1px solid #ccc; padding: 10px 10px; font-size: 11px; font-weight: bold; text-transform: uppercase;}
body.dashboard-page aside h4 a.button-small{float: right; text-transform: none; border-radius: 4px; margin-right: 2%; margin-top: -4px; display: block;}
body.dashboard-page aside .project-list {list-style: none; margin: 0; padding: 0;}
@@ -563,7 +606,7 @@ body.project-page .page-title{margin-bottom: 0}
body.project-page .project-sidebar {width: 220px; left: 0; top: 0; height: 100%; bottom: 0; position: absolute; background-color: #f7f7f7; float: left; display: inline-block; background: #f7f7f7; padding: 20px 0 20px 2%; margin: 0; }
body.project-page input.text.git-url,
-body.projects-page input.text.git-url { font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 14px 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px;}
+body.projects-page input.text.git-url { font-size: 12px; border-radius: 5px; color: #666; box-shadow: 0 1px 2px rgba(0,0,0,.2) inset; padding: 8px 0 8px 30px; margin-bottom: 20px; background: white url('images.png') no-repeat 8px -40px; width: 176px}
body.projects-page input.text.git-url {margin:10px 0 0 }
.git_url_wrapper { margin-right:50px }
diff --git a/app/models/note.rb b/app/models/note.rb
index 0ec63f8b6a2..946f506264a 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -27,6 +27,7 @@ class Note < ActiveRecord::Base
scope :common, where(:noteable_id => nil)
+ scope :today, where("created_at >= :date", :date => Date.today)
scope :last_week, where("created_at >= :date", :date => (Date.today - 7.days))
scope :since, lambda { |day| where("created_at >= :date", :date => (day)) }
scope :fresh, order("created_at DESC")
diff --git a/app/models/user.rb b/app/models/user.rb
index 13704a92267..8967859d089 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -30,7 +30,7 @@ class User < ActiveRecord::Base
scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) }
def identifier
- email.gsub "@", "_"
+ email.gsub /[@.]/, "_"
end
def is_admin?
diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_file.html.haml
index ed9adffd1e0..bdc740b3952 100644
--- a/app/views/commits/_text_file.html.haml
+++ b/app/views/commits/_text_file.html.haml
@@ -2,6 +2,7 @@
- line_new = 0
- lines_arr = diff.diff.lines.to_a
- lines_arr.each do |line|
+ - line.force_encoding(Encoding::UTF_8)
- next if line.match(/^--- \/dev\/null/)
- next if line.match(/^--- a/)
- next if line.match(/^\+\+\+ b/)
diff --git a/app/views/layouts/_head_panel.html.erb b/app/views/layouts/_head_panel.html.erb
index bf0394b1582..40c7e0a08e4 100644
--- a/app/views/layouts/_head_panel.html.erb
+++ b/app/views/layouts/_head_panel.html.erb
@@ -48,9 +48,7 @@
<% end %>
<% if current_user.keys.all.empty? %>
- <div id="no_ssh_key_defined">
- <h2>ATTENTION!</h2>
- <p>No SSH Key is defined. You won't be able to use any Git command!
- <p>Click <%=link_to( 'here', keys_path ) %> to add one!
+ <div id="no_ssh_key_defined" class="big-message error">
+ <p>No SSH Key is defined. You won't be able to use any Git command!. Click <%=link_to( 'here', keys_path ) %> to add one!
</div>
<% end %>
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml
index 6407da10403..b06e75ef698 100644
--- a/app/views/layouts/project.html.haml
+++ b/app/views/layouts/project.html.haml
@@ -38,7 +38,7 @@
= link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do
Wall
- if @project.common_notes.count > 0
- %span{ :class => "number" }= @project.common_notes.count
+ %span{ :class => "number" }= @project.common_notes.today.count
= link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
Snippets
- if @project.snippets.count > 0
diff --git a/lib/commit_ext.rb b/lib/commit_ext.rb
index 91a4c059b02..0e045911843 100644
--- a/lib/commit_ext.rb
+++ b/lib/commit_ext.rb
@@ -3,13 +3,7 @@ module CommitExt
attr_accessor :refs
def safe_message
- message.encode("UTF-8",
- :invalid => :replace,
- :undef => :replace,
- :universal_newline => true,
- :replace => "")
- rescue
- "-- invalid encoding for commit message"
+ message.force_encoding(Encoding::UTF_8)
end
def created_at
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index 038e4f9d36e..bd3f3934aec 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -12,7 +12,12 @@ describe Note do
it { Factory.create(:note,
:project => Factory.create(:project)).should be_valid }
-
+ describe "Scopes" do
+ it "should have a today named scope that returns ..." do
+ Note.today.where_values.should == ["created_at >= '#{Date.today}'"]
+ end
+ end
+
describe :authorization do
before do
@p1 = Factory :project
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 45aff2bd00c..4e1f130887e 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -16,7 +16,7 @@ describe User do
it "should return valid identifier" do
user = User.new(:email => "test@mail.com")
- user.identifier.should == "test_mail.com"
+ user.identifier.should == "test_mail_com"
end
it "should have authentication token" do