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:
authorSteven Verbeek <dubcanada@gmail.com>2012-03-24 07:36:54 +0400
committerSteven Verbeek <dubcanada@gmail.com>2012-03-24 07:36:54 +0400
commit6c40e89853a8211c3108245cd92063da0eb0a46b (patch)
tree47a244341dced1b534fcfd4ccc9ae17aa5789f4b
parentfafc34b0db23844577e0a99273877c956d087d96 (diff)
parent1c6df8e075abf87c6911be7ca9a691d48b7d4009 (diff)
merging upstream changes
-rw-r--r--CHANGELOG29
-rw-r--r--VERSION2
-rw-r--r--app/assets/stylesheets/common.scss68
-rw-r--r--app/controllers/dashboard_controller.rb1
-rw-r--r--app/controllers/issues_controller.rb6
-rw-r--r--app/controllers/merge_requests_controller.rb2
-rw-r--r--app/helpers/application_helper.rb8
-rw-r--r--app/models/event.rb1
-rw-r--r--app/models/user.rb9
-rw-r--r--app/views/admin/projects/_form.html.haml2
-rw-r--r--app/views/admin/projects/index.html.haml2
-rw-r--r--app/views/admin/users/index.html.haml2
-rw-r--r--app/views/dashboard/_projects_feed.html.haml2
-rw-r--r--app/views/dashboard/index.html.haml38
-rw-r--r--app/views/devise/sessions/new.html.erb7
-rw-r--r--app/views/devise/shared/_links.erb6
-rw-r--r--app/views/issues/_issues.html.haml11
-rw-r--r--app/views/issues/_show.html.haml6
-rw-r--r--app/views/issues/index.html.haml1
-rw-r--r--app/views/kaminari/admin/_first_page.html.haml (renamed from app/views/kaminari/_first_page.html.haml)0
-rw-r--r--app/views/kaminari/admin/_gap.html.haml (renamed from app/views/kaminari/_gap.html.haml)0
-rw-r--r--app/views/kaminari/admin/_last_page.html.haml (renamed from app/views/kaminari/_last_page.html.haml)0
-rw-r--r--app/views/kaminari/admin/_next_page.html.haml (renamed from app/views/kaminari/_next_page.html.haml)0
-rw-r--r--app/views/kaminari/admin/_page.html.haml (renamed from app/views/kaminari/_page.html.haml)0
-rw-r--r--app/views/kaminari/admin/_paginator.html.haml (renamed from app/views/kaminari/_paginator.html.haml)0
-rw-r--r--app/views/kaminari/admin/_prev_page.html.haml (renamed from app/views/kaminari/_prev_page.html.haml)0
-rw-r--r--app/views/kaminari/gitlab/_first_page.html.haml9
-rw-r--r--app/views/kaminari/gitlab/_gap.html.haml8
-rw-r--r--app/views/kaminari/gitlab/_last_page.html.haml9
-rw-r--r--app/views/kaminari/gitlab/_next_page.html.haml9
-rw-r--r--app/views/kaminari/gitlab/_page.html.haml10
-rw-r--r--app/views/kaminari/gitlab/_paginator.html.haml16
-rw-r--r--app/views/kaminari/gitlab/_prev_page.html.haml9
-rw-r--r--app/views/keys/_form.html.haml2
-rw-r--r--app/views/merge_requests/_how_to_merge.html.haml7
-rw-r--r--app/views/merge_requests/_merge_request.html.haml16
-rw-r--r--app/views/merge_requests/index.html.haml7
-rw-r--r--app/views/profile/show.html.haml83
-rw-r--r--app/views/projects/_form.html.haml2
-rw-r--r--app/views/projects/empty.html.haml4
-rw-r--r--app/views/team_members/show.html.haml83
-rw-r--r--db/fixtures/development/004_teams.rb4
-rw-r--r--db/fixtures/development/005_issues.rb20
-rw-r--r--db/migrate/20120323221339_add_bio_field_to_user.rb5
-rw-r--r--db/schema.rb3
-rw-r--r--doc/installation.md16
-rwxr-xr-xresque.sh4
47 files changed, 383 insertions, 146 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 0f13f46d80a..417def7f96f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,33 @@
+v 2.3.0
+ - Dashboard r1
+ - Search r1
+ - Project page
+ - Close merge request on push
+ - Persist MR diff after merge
+ - mysql support
+ - Documentation
+
+v 2.2.0
+ - We’ve added support of LDAP auth
+ - Improved permission logic (4 roles system)
+ - Protected branches (now only masters can push to protected branches)
+ - Usability improved
+ - twitter bootstrap integrated
+ - compare view between commits
+ - wiki feature
+ - now you can enable/disable issues, wiki, wall features per project
+ - security fixes
+ - improved code browsing (ajax branch switch etc)
+ - improved per-line commenting
+ - git submodules displayed
+ - moved to rails 3.2
+ - help section improved
+
v 2.1.0
- Project tab r1
- - Repository tab r1
+ - List branches/tags
+ - per line comments
+ - mass user import
v 2.0.0
- gitolite as main git host system
diff --git a/VERSION b/VERSION
index caf684d4234..276cbf9e285 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.3.0pre
+2.3.0
diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss
index e6ebe444e7e..5e14f3a5cec 100644
--- a/app/assets/stylesheets/common.scss
+++ b/app/assets/stylesheets/common.scss
@@ -114,9 +114,17 @@ a:focus {
margin-top:10px;
}
+.prepend-top-20 {
+ margin-top:20px;
+}
+
.padded {
padding:20px;
}
+
+.ipadded {
+ padding:20px !important;
+}
.no-borders {
border:none;
}
@@ -354,12 +362,15 @@ img.lil_av {
top: 3px;
}
-.media-grid {
- h3, h2 , h4 {
- &.media_h {
- padding-left:10px;
- float:left;
- }
+.profile_avatar_holder {
+ float:left;
+ width:90px;
+ height:90px;
+ margin-right:20px;
+ img {
+ width:90px;
+ height:90px;
+ background:#eee;
}
}
@@ -465,10 +476,28 @@ img.lil_av {
border-top:none;
form {
- padding-top:16px;
+ padding:9px 0;
+ margin:0px;
+ }
+
+ .pills {
+ li {
+ padding:3px 0;
+ &.active a { background-color:$style_color; }
+ a {
+ border-radius:7px;
+ }
+ }
}
}
+ .bottom {
+ background:#f5f5f5;
+ border-top: 1px solid #eee;
+ @include round-borders-bottom(4px);
+ border-bottom:none;
+ }
+
&.padded {
h5, .title {
margin: -20px;
@@ -847,14 +876,7 @@ p.time {
border:none;
&:hover {
background:none;
-
- h4 {
- color:#2FA0BB;
- .arrow {
- background:#2FA0BB;
- color:#fff;
- }
- }
+ h4 { color:#2FA0BB; }
}
h4 {
@@ -1042,4 +1064,18 @@ p.time {
color: #999;
line-height: 16px;
font-weight:bold;
-}
+}
+
+.thin_area{
+ height: 150px;
+}
+
+.gitlab_pagination {
+ span a { color:$link_color; }
+ .prev, .next, .current, .page a {
+ padding:10px;
+ }
+ .current {
+ border-bottom:2px solid $style_color;
+ }
+}
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index f6b09e23430..da75465ea32 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -13,6 +13,7 @@ class DashboardController < ApplicationController
@issues = @issues.includes(:author, :project)
@events = Event.where(:project_id => @projects.map(&:id)).recent.limit(20)
+ @last_push = Event.where(:project_id => @projects.map(&:id)).recent.code_push.limit(1).first
end
# Get authored or assigned open merge requests
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 53d8b74da8b..7a92fcfb183 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -28,9 +28,9 @@ class IssuesController < ApplicationController
when 2 then @project.issues.closed
when 3 then @project.issues.opened.assigned(current_user)
else @project.issues.opened
- end
+ end.page(params[:page]).per(20)
- @issues = @issues.includes(:author, :project)
+ @issues = @issues.includes(:author, :project).order("critical, updated_at")
respond_to do |format|
format.html # index.html.erb
@@ -114,7 +114,7 @@ class IssuesController < ApplicationController
when 2 then @project.issues.closed
when 3 then @project.issues.opened.assigned(current_user)
else @project.issues.opened
- end
+ end.page(params[:page]).per(100)
@issues = @issues.where("title LIKE ?", "%#{terms}%") unless terms.blank?
diff --git a/app/controllers/merge_requests_controller.rb b/app/controllers/merge_requests_controller.rb
index 3a3143cb15f..f882028fcab 100644
--- a/app/controllers/merge_requests_controller.rb
+++ b/app/controllers/merge_requests_controller.rb
@@ -28,7 +28,7 @@ class MergeRequestsController < ApplicationController
when 2 then @merge_requests.closed
when 3 then @merge_requests.opened.assigned(current_user)
else @merge_requests.opened
- end
+ end.page(params[:page]).per(20)
@merge_requests = @merge_requests.includes(:author, :project).order("created_at desc")
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 4d85e39464b..a69a1a0ba27 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -11,6 +11,14 @@ module ApplicationHelper
true
end
+ def request_protocol
+ request.ssl? ? "https" : "http"
+ end
+
+ def web_app_url
+ "#{request_protocol}://#{GIT_HOST["host"]}/"
+ end
+
def body_class(default_class = nil)
main = content_for(:body_class).blank? ?
default_class :
diff --git a/app/models/event.rb b/app/models/event.rb
index c8af9363133..adc558b6d3a 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -15,6 +15,7 @@ class Event < ActiveRecord::Base
serialize :data
scope :recent, order("created_at DESC")
+ scope :code_push, where(:action => Pushed)
def self.determine_action(record)
if [Issue, MergeRequest].include? record.class
diff --git a/app/models/user.rb b/app/models/user.rb
index 5caa7451bef..62c84a1e6fa 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -5,13 +5,19 @@ class User < ActiveRecord::Base
:recoverable, :rememberable, :trackable, :validatable, :omniauthable
# Setup accessible (or protected) attributes for your model
- attr_accessible :email, :password, :password_confirmation, :remember_me,
+ attr_accessible :email, :password, :password_confirmation, :remember_me, :bio,
:name, :projects_limit, :skype, :linkedin, :twitter, :dark_scheme, :theme_id
has_many :users_projects, :dependent => :destroy
has_many :projects, :through => :users_projects
has_many :my_own_projects, :class_name => "Project", :foreign_key => :owner_id
has_many :keys, :dependent => :destroy
+
+ has_many :recent_events,
+ :class_name => "Event",
+ :foreign_key => :author_id,
+ :order => "id DESC"
+
has_many :issues,
:foreign_key => :author_id,
:dependent => :destroy
@@ -38,6 +44,7 @@ class User < ActiveRecord::Base
:presence => true,
:numericality => {:greater_than_or_equal_to => 0}
+ validates :bio, :length => { :within => 0..255 }
before_create :ensure_authentication_token
alias_attribute :private_token, :authentication_token
diff --git a/app/views/admin/projects/_form.html.haml b/app/views/admin/projects/_form.html.haml
index 8e16437e39a..84cd030ec09 100644
--- a/app/views/admin/projects/_form.html.haml
+++ b/app/views/admin/projects/_form.html.haml
@@ -20,7 +20,7 @@
Code
.input
.input-prepend
- %span.add-on= "http://#{GIT_HOST["host"]}/"
+ %span.add-on= web_app_url
= f.text_field :code, :placeholder => "example"
- unless @admin_project.new_record?
diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml
index 7cda5220d68..079ae385ccc 100644
--- a/app/views/admin/projects/index.html.haml
+++ b/app/views/admin/projects/index.html.haml
@@ -19,4 +19,4 @@
%td= last_commit(project)
%td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}", :class => "btn small"
%td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger"
-= paginate @admin_projects
+= paginate @admin_projects, :theme => "admin"
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index a0b4df1ff10..19eb64782ae 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -20,4 +20,4 @@
%td= link_to 'Edit', edit_admin_user_path(user), :id => "edit_#{dom_id(user)}", :class => "btn small"
%td= link_to 'Destroy', [:admin, user], :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger"
-= paginate @admin_users
+= paginate @admin_users, :theme => "admin"
diff --git a/app/views/dashboard/_projects_feed.html.haml b/app/views/dashboard/_projects_feed.html.haml
index 61154147841..e3f61e66ae8 100644
--- a/app/views/dashboard/_projects_feed.html.haml
+++ b/app/views/dashboard/_projects_feed.html.haml
@@ -3,7 +3,7 @@
= link_to project do
%h4
%span.ico.project
- = project.name
+ = truncate project.name, :length => 30
%small
last activity at
= project.last_activity_date.stamp("Aug 25, 2011")
diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml
index b20fafca75c..0199cb9d308 100644
--- a/app/views/dashboard/index.html.haml
+++ b/app/views/dashboard/index.html.haml
@@ -20,17 +20,35 @@
.row
.dashboard_block
.row
- .span10= render "dashboard/projects_feed", :projects => @active_projects
.span4.right
- - if current_user.can_create_project?
- .alert-message.block-message.warning
- You can create up to
- = current_user.projects_limit
- projects. Click on link below to add a new one
- .link_holder
- = link_to new_project_path, :class => "" do
- New Project »
-
+ %div.borders.ipadded
+ %h1
+ = pluralize current_user.projects.count, "project", "projects"
+ - if current_user.can_create_project?
+ %hr
+ %div
+ You can create up to
+ = current_user.projects_limit
+ projects. Click on button below to add a new one
+ .link_holder
+ %br
+ = link_to new_project_path, :class => "btn" do
+ New Project »
+ - else
+ %hr
+ %div
+ You've reached project limit for your account.
+ You cannot create new projects.
+ .link_holder
+ %br
+ = link_to profile_path, :class => "btn" do
+ Your Profile »
+ .span10.left= render "dashboard/projects_feed", :projects => @active_projects
+ - if @last_push
+ .padded.prepend-top-20
+ %h5
+ %small Latest push was to the #{@last_push.branch_name} branch of #{@last_push.project.name}:
+ %ul.unstyled= render @last_push
- if @merge_requests.any?
%div.dashboard_category
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index f40a8794e92..da8f911753b 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -9,6 +9,13 @@
<br/>
<%= f.submit "Sign in", :class => "primary btn" %>
<div class="right"> <%= render :partial => "devise/shared/links" %></div>
+
+ <%- if devise_mapping.omniauthable? %>
+ <%- resource_class.omniauth_providers.each do |provider| %>
+ <hr/>
+ <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), :class => "btn primary" %><br />
+ <% end -%>
+ <% end -%>
<% if ldap_enable? -%>
<p><%= link_to "via LDAP", user_omniauth_authorize_path(:ldap)%></p>
<% end -%>
diff --git a/app/views/devise/shared/_links.erb b/app/views/devise/shared/_links.erb
index c624c2d54bf..d7499d14ec5 100644
--- a/app/views/devise/shared/_links.erb
+++ b/app/views/devise/shared/_links.erb
@@ -17,9 +17,3 @@
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
<% end -%>
-
-<%- if devise_mapping.omniauthable? %>
- <%- resource_class.omniauth_providers.each do |provider| %>
- <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
- <% end -%>
-<% end -%>
diff --git a/app/views/issues/_issues.html.haml b/app/views/issues/_issues.html.haml
index bf863a2dec1..f82aee94a8f 100644
--- a/app/views/issues/_issues.html.haml
+++ b/app/views/issues/_issues.html.haml
@@ -1,5 +1,12 @@
-- @issues.critical.each do |issue|
+- @issues.select(&:critical).each do |issue|
= render(:partial => 'issues/show', :locals => {:issue => issue})
-- @issues.non_critical.each do |issue|
+- @issues.reject(&:critical).each do |issue|
= render(:partial => 'issues/show', :locals => {:issue => issue})
+
+- if @issues.present?
+ %li.bottom
+ .row
+ .span10= paginate @issues, :remote => true, :theme => "gitlab"
+ .span4.right
+ %span.cgray.right #{@issues.total_count} issues for this filter
diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml
index 185d5f0ae93..b2cf54d10d4 100644
--- a/app/views/issues/_show.html.haml
+++ b/app/views/issues/_show.html.haml
@@ -1,12 +1,12 @@
%li.wll{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(issue.project, issue) }
.right
- if issue.notes.any?
- %span.label= pluralize issue.notes.count, 'comment'
+ %span.btn.small.disabled.padded= pluralize issue.notes.count, 'note'
- if can? current_user, :modify_issue, issue
- if issue.closed
- = link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small", :remote => true
+ = link_to 'Reopen', project_issue_path(issue.project, issue, :issue => {:closed => false }, :status_only => true), :method => :put, :class => "btn small padded", :remote => true
- else
- = link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small", :remote => true
+ = link_to 'Resolve', project_issue_path(issue.project, issue, :issue => {:closed => true }, :status_only => true), :method => :put, :class => "success btn small padded", :remote => true
= link_to 'Edit', edit_project_issue_path(issue.project, issue), :class => "btn small edit-issue-link", :remote => true
= image_tag gravatar_icon(issue.assignee_email), :class => "avatar"
%span.update-author
diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml
index e55cae1fa94..283e936e38e 100644
--- a/app/views/issues/index.html.haml
+++ b/app/views/issues/index.html.haml
@@ -38,7 +38,6 @@
- if @issues.blank?
%li
%p.padded Nothing to show here
-
:javascript
var href = $('.issue_search').parent().attr('action');
var last_terms = '';
diff --git a/app/views/kaminari/_first_page.html.haml b/app/views/kaminari/admin/_first_page.html.haml
index fee8112f6af..fee8112f6af 100644
--- a/app/views/kaminari/_first_page.html.haml
+++ b/app/views/kaminari/admin/_first_page.html.haml
diff --git a/app/views/kaminari/_gap.html.haml b/app/views/kaminari/admin/_gap.html.haml
index f82f185ac35..f82f185ac35 100644
--- a/app/views/kaminari/_gap.html.haml
+++ b/app/views/kaminari/admin/_gap.html.haml
diff --git a/app/views/kaminari/_last_page.html.haml b/app/views/kaminari/admin/_last_page.html.haml
index 6e41d232b51..6e41d232b51 100644
--- a/app/views/kaminari/_last_page.html.haml
+++ b/app/views/kaminari/admin/_last_page.html.haml
diff --git a/app/views/kaminari/_next_page.html.haml b/app/views/kaminari/admin/_next_page.html.haml
index 76f40e72373..76f40e72373 100644
--- a/app/views/kaminari/_next_page.html.haml
+++ b/app/views/kaminari/admin/_next_page.html.haml
diff --git a/app/views/kaminari/_page.html.haml b/app/views/kaminari/admin/_page.html.haml
index 5966812934f..5966812934f 100644
--- a/app/views/kaminari/_page.html.haml
+++ b/app/views/kaminari/admin/_page.html.haml
diff --git a/app/views/kaminari/_paginator.html.haml b/app/views/kaminari/admin/_paginator.html.haml
index 6f9fb332261..6f9fb332261 100644
--- a/app/views/kaminari/_paginator.html.haml
+++ b/app/views/kaminari/admin/_paginator.html.haml
diff --git a/app/views/kaminari/_prev_page.html.haml b/app/views/kaminari/admin/_prev_page.html.haml
index cef885ee0af..cef885ee0af 100644
--- a/app/views/kaminari/_prev_page.html.haml
+++ b/app/views/kaminari/admin/_prev_page.html.haml
diff --git a/app/views/kaminari/gitlab/_first_page.html.haml b/app/views/kaminari/gitlab/_first_page.html.haml
new file mode 100644
index 00000000000..fee8112f6af
--- /dev/null
+++ b/app/views/kaminari/gitlab/_first_page.html.haml
@@ -0,0 +1,9 @@
+-# Link to the "First" page
+-# available local variables
+-# url: url to the first page
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%span.first
+ = link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote
diff --git a/app/views/kaminari/gitlab/_gap.html.haml b/app/views/kaminari/gitlab/_gap.html.haml
new file mode 100644
index 00000000000..f82f185ac35
--- /dev/null
+++ b/app/views/kaminari/gitlab/_gap.html.haml
@@ -0,0 +1,8 @@
+-# Non-link tag that stands for skipped pages...
+-# available local variables
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%span.page.gap
+ = raw(t 'views.pagination.truncate')
diff --git a/app/views/kaminari/gitlab/_last_page.html.haml b/app/views/kaminari/gitlab/_last_page.html.haml
new file mode 100644
index 00000000000..6e41d232b51
--- /dev/null
+++ b/app/views/kaminari/gitlab/_last_page.html.haml
@@ -0,0 +1,9 @@
+-# Link to the "Last" page
+-# available local variables
+-# url: url to the last page
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%span.last
+ = link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote}
diff --git a/app/views/kaminari/gitlab/_next_page.html.haml b/app/views/kaminari/gitlab/_next_page.html.haml
new file mode 100644
index 00000000000..e87ab4e0534
--- /dev/null
+++ b/app/views/kaminari/gitlab/_next_page.html.haml
@@ -0,0 +1,9 @@
+-# Link to the "Next" page
+-# available local variables
+-# url: url to the next page
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%span.next
+ = link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote
diff --git a/app/views/kaminari/gitlab/_page.html.haml b/app/views/kaminari/gitlab/_page.html.haml
new file mode 100644
index 00000000000..528bba8f116
--- /dev/null
+++ b/app/views/kaminari/gitlab/_page.html.haml
@@ -0,0 +1,10 @@
+-# Link showing page number
+-# available local variables
+-# page: a page object for "this" page
+-# url: url to this page
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%span{:class => "page#{' current' if page.current?}"}
+ = link_to_unless page.current?, page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
diff --git a/app/views/kaminari/gitlab/_paginator.html.haml b/app/views/kaminari/gitlab/_paginator.html.haml
new file mode 100644
index 00000000000..6dd5a5782a2
--- /dev/null
+++ b/app/views/kaminari/gitlab/_paginator.html.haml
@@ -0,0 +1,16 @@
+-# The container tag
+-# available local variables
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+-# paginator: the paginator that renders the pagination tags inside
+= paginator.render do
+ %nav.gitlab_pagination
+ = prev_page_tag
+ - each_page do |page|
+ - if page.left_outer? || page.right_outer? || page.inside_window?
+ = page_tag page
+ - elsif !page.was_truncated?
+ = gap_tag
+ = next_page_tag
diff --git a/app/views/kaminari/gitlab/_prev_page.html.haml b/app/views/kaminari/gitlab/_prev_page.html.haml
new file mode 100644
index 00000000000..13f0d8adec5
--- /dev/null
+++ b/app/views/kaminari/gitlab/_prev_page.html.haml
@@ -0,0 +1,9 @@
+-# Link to the "Previous" page
+-# available local variables
+-# url: url to the previous page
+-# current_page: a page object for the currently displayed page
+-# num_pages: total number of pages
+-# per_page: number of items to fetch per page
+-# remote: data-remote
+%span.prev
+ = link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote
diff --git a/app/views/keys/_form.html.haml b/app/views/keys/_form.html.haml
index cdabdc739d6..c25e8d073b8 100644
--- a/app/views/keys/_form.html.haml
+++ b/app/views/keys/_form.html.haml
@@ -11,7 +11,7 @@
.input= f.text_field :title
.clearfix
= f.label :key
- .input= f.text_area :key, :class => "xlarge"
+ .input= f.text_area :key, :class => [:xxlarge, :thin_area]
.actions
= f.submit 'Save', :class => "primary btn"
= link_to "Cancel", keys_path, :class => "btn"
diff --git a/app/views/merge_requests/_how_to_merge.html.haml b/app/views/merge_requests/_how_to_merge.html.haml
index 5cf5e5bcb9c..61b4f0aa0a3 100644
--- a/app/views/merge_requests/_how_to_merge.html.haml
+++ b/app/views/merge_requests/_how_to_merge.html.haml
@@ -5,11 +5,10 @@
.modal-body
%pre
:erb
+ git checkout <%= @merge_request.target_branch %>
git fetch origin
- git checkout -b <%=@merge_request.source_branch%> origin/<%=@merge_request.source_branch%>
- git checkout <%=@merge_request.target_branch%>
- git merge <%=@merge_request.source_branch%>
- git push origin <%=@merge_request.target_branch%>
+ git merge origin/<%= @merge_request.source_branch %>
+ git push origin <%= @merge_request.target_branch %>
:javascript
diff --git a/app/views/merge_requests/_merge_request.html.haml b/app/views/merge_requests/_merge_request.html.haml
index 9f556c06561..54300fae0d5 100644
--- a/app/views/merge_requests/_merge_request.html.haml
+++ b/app/views/merge_requests/_merge_request.html.haml
@@ -1,17 +1,19 @@
%li.wll
+ .right
+ .left
+ - if merge_request.notes.any?
+ %span.btn.small.disabled.padded= pluralize merge_request.notes.count, 'note'
+ %span.btn.small.disabled.padded
+ = merge_request.source_branch
+ &rarr;
+ = merge_request.target_branch
= image_tag gravatar_icon(merge_request.author_email), :class => "avatar"
%span.update-author
%strong= merge_request.author_name
authored
= time_ago_in_words(merge_request.created_at)
ago
- - if merge_request.notes.any?
- %span.pretty_label= pluralize merge_request.notes.count, 'note'
- if merge_request.upvotes > 0
%span.label.success= "+#{merge_request.upvotes}"
- .right
- %span.label= merge_request.source_branch
- &rarr;
- %span.label= merge_request.target_branch
= link_to project_merge_request_path(merge_request.project, merge_request) do
- %p.row_title= truncate(merge_request.title, :length => 100)
+ %p.row_title= truncate(merge_request.title, :length => 80)
diff --git a/app/views/merge_requests/index.html.haml b/app/views/merge_requests/index.html.haml
index 468eaf33179..9a03d195e88 100644
--- a/app/views/merge_requests/index.html.haml
+++ b/app/views/merge_requests/index.html.haml
@@ -27,5 +27,10 @@
- if @merge_requests.blank?
%li
%p.padded Nothing to show here
-
+ - if @merge_requests.present?
+ %li.bottom
+ .row
+ .span10= paginate @merge_requests, :theme => "gitlab"
+ .span4.right
+ %span.cgray.right #{@merge_requests.total_count} merge requests for this filter
diff --git a/app/views/profile/show.html.haml b/app/views/profile/show.html.haml
index ab491657511..293ccd91bb0 100644
--- a/app/views/profile/show.html.haml
+++ b/app/views/profile/show.html.haml
@@ -1,15 +1,26 @@
-.media-grid
- = link_to "#" do
- = image_tag gravatar_icon(@user.email, 90), :class => "thumbnail"
- %h3.media_h
- = @user.name
- %br
- %small
- = @user.email
-
- .right
- %p.alert-message.block-message You can change your avatar at gravatar.com
-
+.row
+ .span10
+ .profile_avatar_holder
+ = image_tag gravatar_icon(@user.email, 90), :class => "styled_image"
+ %h3
+ = @user.name
+ %br
+ %small
+ = @user.email
+
+ .span6.right
+ %div
+ %div
+ %h5.cgray
+ Personal projects:
+ %span.right
+ %span= current_user.my_own_projects.count
+ of
+ %span= current_user.projects_limit
+ %h5.cgray
+ SSH public keys:
+ %span.right
+ %span= current_user.keys.count
%hr
= form_for @user, :url => profile_update_path, :method => :put do |f|
@@ -18,23 +29,39 @@
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
-
- .clearfix
- = f.label :name
- .input= f.text_field :name
- .clearfix
- = f.label :email
- .input= f.text_field :email
- .clearfix
- = f.label :skype
- .input= f.text_field :skype
- .clearfix
- = f.label :linkedin
- .input= f.text_field :linkedin
- .clearfix
- = f.label :twitter
- .input= f.text_field :twitter
+ .row
+ .span9
+ .clearfix
+ = f.label :name
+ .input
+ = f.text_field :name, :class => "xlarge"
+ %span.help-block Enter youre name, so people you know can recognize you.
+ .clearfix
+ = f.label :email
+ .input
+ = f.text_field :email, :class => "xlarge"
+ %span.help-block We also use email for avatar detection
+ .clearfix
+ = f.label :skype
+ .input= f.text_field :skype, :class => "xlarge"
+ .clearfix
+ = f.label :linkedin
+ .input= f.text_field :linkedin, :class => "xlarge"
+ .clearfix
+ = f.label :twitter
+ .input= f.text_field :twitter, :class => "xlarge"
+ .clearfix
+ = f.label :bio
+ .input
+ = f.text_area :bio, :rows => 6, :class => "xlarge", :maxlength => 250
+ %span.help-block About yourself in fewer than 250 characters.
+ .span7.right
+ %p.alert-message.block-message
+ %strong Tip:
+ You can change your avatar at gravatar.com
.actions
= f.submit 'Save', :class => "primary btn"
+-#= link_to "New project", new_project_path, :class => "btn small padded"
+-#= link_to "New public key", new_key_path, :class => "btn small"
diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml
index 9c39f807146..5d22f11d579 100644
--- a/app/views/projects/_form.html.haml
+++ b/app/views/projects/_form.html.haml
@@ -19,7 +19,7 @@
Code
.input
.input-prepend
- %span.add-on= "http://#{GIT_HOST["host"]}/"
+ %span.add-on= web_app_url
= f.text_field :code, :placeholder => "example"
- unless @project.new_record? || @project.heads.empty?
diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml
index 3fb81370853..249442c15b5 100644
--- a/app/views/projects/empty.html.haml
+++ b/app/views/projects/empty.html.haml
@@ -38,3 +38,7 @@
"git remote add origin #{@project.url_to_repo}",
"git push -u origin master"].join("\n")
= raw bash_lexer.highlight(exist_repo_setup_str)
+
+ - if can? current_user, :admin_project, @project
+ .alert-message.block-message.error.prepend-top-20
+ = link_to 'Remove project', @project, :confirm => 'Are you sure?', :method => :delete, :class => "btn danger"
diff --git a/app/views/team_members/show.html.haml b/app/views/team_members/show.html.haml
index d05ef740fb9..0ed755a10d1 100644
--- a/app/views/team_members/show.html.haml
+++ b/app/views/team_members/show.html.haml
@@ -1,54 +1,59 @@
- allow_admin = can? current_user, :admin_project, @project
- user = @team_member.user
-.media-grid
- = link_to "#" do
- = image_tag gravatar_icon(user.email, 60), :class => "thumbnail", :width => 60
- %h3.media_h
- = user.name
- %br
- %small= user.email
-
-.back_link
- = link_to team_project_path(@project), :class => "" do
- &larr; To team list
-%br
-%table.zebra-striped.borders
- %tr
- %td Name
- %td= user.name
+.row
+ .span8
+ .profile_avatar_holder
+ = image_tag gravatar_icon(user.email, 90), :class => "styled_image"
+ %h3
+ = user.name
+ %br
+ %small
+ = user.email
+ %br
+ .back_link
+ %br
+ = link_to team_project_path(@project), :class => "" do
+ &larr; To team list
- %tr
- %td Email
- %td= user.email
+ .span8.right
+ %div
+ %div
+ %h5.cgray
+ Member since:
+ %span.right
+ = @team_member.created_at.stamp("Aug 21, 2011")
+ %h5.cgray
+ Project Access:
+ %small (#{link_to "read more", help_permissions_path, :class => "vlink"})
+ %span.right
+ = form_for(@team_member, :as => :team_member, :url => project_team_member_path(@project, @team_member)) do |f|
+ = f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, :class => "project-access-select", :disabled => !allow_admin
- %tr
- %td Member since
- %td= @team_member.created_at.stamp("Aug 21, 2011")
- %tr
- %td
- Project Access
- (#{link_to "read more", help_permissions_path, :class => "vlink"})
-
- %td
- = form_for(@team_member, :as => :team_member, :url => project_team_member_path(@project, @team_member)) do |f|
- = f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, :class => "project-access-select", :disabled => !allow_admin
+%div.prepend-top-20
- unless user.skype.empty?
- %tr
- %td Skype:
- %td= user.skype
+ %p
+ %b Skype:
+ = user.skype
- unless user.linkedin.empty?
- %tr
- %td LinkedIn:
- %td= user.linkedin
+ %p
+ %b LinkedIn:
+ = user.linkedin
- unless user.twitter.empty?
- %tr
- %td Twitter:
- %td= user.twitter
+ %p
+ %b Twitter:
+ = user.twitter
+ - unless user.bio.empty?
+ %p
+ %b Bio:
+ = user.bio
+
+= render user.recent_events.limit(3)
+
- if can? current_user, :admin_project, @project
.actions
diff --git a/db/fixtures/development/004_teams.rb b/db/fixtures/development/004_teams.rb
index 3ef55b9206c..5af98b92c02 100644
--- a/db/fixtures/development/004_teams.rb
+++ b/db/fixtures/development/004_teams.rb
@@ -1,7 +1,7 @@
UsersProject.seed(:id, [
{ :id => 1, :project_id => 1, :user_id => 1, :project_access => UsersProject::MASTER },
- { :id => 2, :project_id => 1, :user_id => 2, :project_access => UsersProject::REPORTERW},
- { :id => 3, :project_id => 1, :user_id => 3, :project_access => UsersProject::REPORTERW},
+ { :id => 2, :project_id => 1, :user_id => 2, :project_access => UsersProject::REPORTER},
+ { :id => 3, :project_id => 1, :user_id => 3, :project_access => UsersProject::REPORTER},
{ :id => 4, :project_id => 1, :user_id => 4, :project_access => UsersProject::REPORTER},
{ :id => 5, :project_id => 1, :user_id => 5, :project_access => UsersProject::REPORTER},
diff --git a/db/fixtures/development/005_issues.rb b/db/fixtures/development/005_issues.rb
index cab6f574d8e..32375387bfb 100644
--- a/db/fixtures/development/005_issues.rb
+++ b/db/fixtures/development/005_issues.rb
@@ -15,7 +15,25 @@ Issue.seed(:id, [
{ :id => 13, :project_id => 3, :author_id => 2, :assignee_id => 2, :title => Faker::Lorem.sentence(6)},
{ :id => 14, :project_id => 3, :author_id => 3, :assignee_id => 3, :title => Faker::Lorem.sentence(6)},
{ :id => 15, :project_id => 3, :author_id => 4, :assignee_id => 4, :title => Faker::Lorem.sentence(6)},
- { :id => 16, :project_id => 3, :author_id => 5, :assignee_id => 5, :title => Faker::Lorem.sentence(6)}
+ { :id => 16, :project_id => 3, :author_id => 5, :assignee_id => 5, :title => Faker::Lorem.sentence(6)},
+
+ { :id => 21, :project_id => 1, :author_id => 1, :assignee_id => 1, :title => Faker::Lorem.sentence(6) },
+ { :id => 22, :project_id => 1, :author_id => 2, :assignee_id => 2, :title => Faker::Lorem.sentence(6) },
+ { :id => 23, :project_id => 1, :author_id => 3, :assignee_id => 3, :title => Faker::Lorem.sentence(6) },
+ { :id => 24, :project_id => 1, :author_id => 4, :assignee_id => 4, :title => Faker::Lorem.sentence(6) },
+ { :id => 25, :project_id => 1, :author_id => 5, :assignee_id => 5, :title => Faker::Lorem.sentence(6) },
+
+ { :id => 26, :project_id => 2, :author_id => 1, :assignee_id => 1, :title => Faker::Lorem.sentence(6) },
+ { :id => 27, :project_id => 2, :author_id => 2, :assignee_id => 2, :title => Faker::Lorem.sentence(6) },
+ { :id => 28, :project_id => 2, :author_id => 3, :assignee_id => 3, :title => Faker::Lorem.sentence(6) },
+ { :id => 29, :project_id => 2, :author_id => 4, :assignee_id => 4, :title => Faker::Lorem.sentence(6) },
+ { :id => 30, :project_id => 2, :author_id => 5, :assignee_id => 5, :title => Faker::Lorem.sentence(6) },
+
+ { :id => 32, :project_id => 3, :author_id => 1, :assignee_id => 1, :title => Faker::Lorem.sentence(6)},
+ { :id => 33, :project_id => 3, :author_id => 2, :assignee_id => 2, :title => Faker::Lorem.sentence(6)},
+ { :id => 34, :project_id => 3, :author_id => 3, :assignee_id => 3, :title => Faker::Lorem.sentence(6)},
+ { :id => 35, :project_id => 3, :author_id => 4, :assignee_id => 4, :title => Faker::Lorem.sentence(6)},
+ { :id => 36, :project_id => 3, :author_id => 5, :assignee_id => 5, :title => Faker::Lorem.sentence(6)}
])
diff --git a/db/migrate/20120323221339_add_bio_field_to_user.rb b/db/migrate/20120323221339_add_bio_field_to_user.rb
new file mode 100644
index 00000000000..80a4dec5971
--- /dev/null
+++ b/db/migrate/20120323221339_add_bio_field_to_user.rb
@@ -0,0 +1,5 @@
+class AddBioFieldToUser < ActiveRecord::Migration
+ def change
+ add_column :users, :bio, :string, :null => true
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index a90b6df1700..d2c54b50f67 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120315132931) do
+ActiveRecord::Schema.define(:version => 20120323221339) do
create_table "events", :force => true do |t|
t.string "target_type"
@@ -156,6 +156,7 @@ ActiveRecord::Schema.define(:version => 20120315132931) do
t.string "authentication_token"
t.boolean "dark_scheme", :default => false, :null => false
t.integer "theme_id", :default => 1, :null => false
+ t.string "bio"
end
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
diff --git a/doc/installation.md b/doc/installation.md
index 22205af95ec..615efd270a5 100644
--- a/doc/installation.md
+++ b/doc/installation.md
@@ -60,7 +60,7 @@ The installation consists of 6 steps:
# 2. Install ruby
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
- tar xfvz ruby-1.9.2-p290.tar.gz
+ tar xfv ruby-1.9.2-p290.tar.gz
cd ruby-1.9.2-p290
./configure
make
@@ -220,15 +220,11 @@ Edit /etc/nginx/nginx.conf. Add next code to **http** section:
server {
listen 80;
server_name mygitlab.com;
-
- location / {
-
- root /home/gitlab/gitlab/public;
-
- if (!-f $request_filename) {
- proxy_pass http://gitlab;
- break;
- }
+ root /home/gitlab/gitlab/public;
+ try_files $uri $uri/index.html $uri.html @gitlab;
+
+ location @gitlab {
+ proxy_pass http://gitlab;
}
}
diff --git a/resque.sh b/resque.sh
index d8b68d463f0..de5249f7d86 100755
--- a/resque.sh
+++ b/resque.sh
@@ -1,2 +1,2 @@
-mkdir tmp/pids
-nohup bundle exec rake environment resque:work QUEUE=* RAILS_ENV=production PIDFILE=tmp/pids/resque_worker.pid & >> log/resque_worker.log 2>&1
+mkdir -p tmp/pids
+bundle exec rake environment resque:work QUEUE=post_receive RAILS_ENV=production PIDFILE=tmp/pids/resque_worker.pid BACKGROUND=yes