Commit 6c40e898 authored by Steven Verbeek's avatar Steven Verbeek

merging upstream changes

parents fafc34b0 1c6df8e0
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 v 2.1.0
- Project tab r1 - Project tab r1
- Repository tab r1 - List branches/tags
- per line comments
- mass user import
v 2.0.0 v 2.0.0
- gitolite as main git host system - gitolite as main git host system
......
...@@ -114,9 +114,17 @@ a:focus { ...@@ -114,9 +114,17 @@ a:focus {
margin-top:10px; margin-top:10px;
} }
.prepend-top-20 {
margin-top:20px;
}
.padded { .padded {
padding:20px; padding:20px;
} }
.ipadded {
padding:20px !important;
}
.no-borders { .no-borders {
border:none; border:none;
} }
...@@ -354,12 +362,15 @@ img.lil_av { ...@@ -354,12 +362,15 @@ img.lil_av {
top: 3px; top: 3px;
} }
.media-grid { .profile_avatar_holder {
h3, h2 , h4 {
&.media_h {
padding-left:10px;
float:left; float:left;
} width:90px;
height:90px;
margin-right:20px;
img {
width:90px;
height:90px;
background:#eee;
} }
} }
...@@ -465,10 +476,28 @@ img.lil_av { ...@@ -465,10 +476,28 @@ img.lil_av {
border-top:none; border-top:none;
form { 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 { &.padded {
h5, .title { h5, .title {
margin: -20px; margin: -20px;
...@@ -847,14 +876,7 @@ p.time { ...@@ -847,14 +876,7 @@ p.time {
border:none; border:none;
&:hover { &:hover {
background:none; background:none;
h4 { color:#2FA0BB; }
h4 {
color:#2FA0BB;
.arrow {
background:#2FA0BB;
color:#fff;
}
}
} }
h4 { h4 {
...@@ -1043,3 +1065,17 @@ p.time { ...@@ -1043,3 +1065,17 @@ p.time {
line-height: 16px; line-height: 16px;
font-weight:bold; 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;
}
}
...@@ -13,6 +13,7 @@ class DashboardController < ApplicationController ...@@ -13,6 +13,7 @@ class DashboardController < ApplicationController
@issues = @issues.includes(:author, :project) @issues = @issues.includes(:author, :project)
@events = Event.where(:project_id => @projects.map(&:id)).recent.limit(20) @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 end
# Get authored or assigned open merge requests # Get authored or assigned open merge requests
......
...@@ -28,9 +28,9 @@ class IssuesController < ApplicationController ...@@ -28,9 +28,9 @@ class IssuesController < ApplicationController
when 2 then @project.issues.closed when 2 then @project.issues.closed
when 3 then @project.issues.opened.assigned(current_user) when 3 then @project.issues.opened.assigned(current_user)
else @project.issues.opened 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| respond_to do |format|
format.html # index.html.erb format.html # index.html.erb
...@@ -114,7 +114,7 @@ class IssuesController < ApplicationController ...@@ -114,7 +114,7 @@ class IssuesController < ApplicationController
when 2 then @project.issues.closed when 2 then @project.issues.closed
when 3 then @project.issues.opened.assigned(current_user) when 3 then @project.issues.opened.assigned(current_user)
else @project.issues.opened else @project.issues.opened
end end.page(params[:page]).per(100)
@issues = @issues.where("title LIKE ?", "%#{terms}%") unless terms.blank? @issues = @issues.where("title LIKE ?", "%#{terms}%") unless terms.blank?
......
...@@ -28,7 +28,7 @@ class MergeRequestsController < ApplicationController ...@@ -28,7 +28,7 @@ class MergeRequestsController < ApplicationController
when 2 then @merge_requests.closed when 2 then @merge_requests.closed
when 3 then @merge_requests.opened.assigned(current_user) when 3 then @merge_requests.opened.assigned(current_user)
else @merge_requests.opened else @merge_requests.opened
end end.page(params[:page]).per(20)
@merge_requests = @merge_requests.includes(:author, :project).order("created_at desc") @merge_requests = @merge_requests.includes(:author, :project).order("created_at desc")
end end
......
...@@ -11,6 +11,14 @@ module ApplicationHelper ...@@ -11,6 +11,14 @@ module ApplicationHelper
true true
end 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) def body_class(default_class = nil)
main = content_for(:body_class).blank? ? main = content_for(:body_class).blank? ?
default_class : default_class :
......
...@@ -15,6 +15,7 @@ class Event < ActiveRecord::Base ...@@ -15,6 +15,7 @@ class Event < ActiveRecord::Base
serialize :data serialize :data
scope :recent, order("created_at DESC") scope :recent, order("created_at DESC")
scope :code_push, where(:action => Pushed)
def self.determine_action(record) def self.determine_action(record)
if [Issue, MergeRequest].include? record.class if [Issue, MergeRequest].include? record.class
......
...@@ -5,13 +5,19 @@ class User < ActiveRecord::Base ...@@ -5,13 +5,19 @@ class User < ActiveRecord::Base
:recoverable, :rememberable, :trackable, :validatable, :omniauthable :recoverable, :rememberable, :trackable, :validatable, :omniauthable
# Setup accessible (or protected) attributes for your model # 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 :name, :projects_limit, :skype, :linkedin, :twitter, :dark_scheme, :theme_id
has_many :users_projects, :dependent => :destroy has_many :users_projects, :dependent => :destroy
has_many :projects, :through => :users_projects has_many :projects, :through => :users_projects
has_many :my_own_projects, :class_name => "Project", :foreign_key => :owner_id has_many :my_own_projects, :class_name => "Project", :foreign_key => :owner_id
has_many :keys, :dependent => :destroy has_many :keys, :dependent => :destroy
has_many :recent_events,
:class_name => "Event",
:foreign_key => :author_id,
:order => "id DESC"
has_many :issues, has_many :issues,
:foreign_key => :author_id, :foreign_key => :author_id,
:dependent => :destroy :dependent => :destroy
...@@ -38,6 +44,7 @@ class User < ActiveRecord::Base ...@@ -38,6 +44,7 @@ class User < ActiveRecord::Base
:presence => true, :presence => true,
:numericality => {:greater_than_or_equal_to => 0} :numericality => {:greater_than_or_equal_to => 0}
validates :bio, :length => { :within => 0..255 }
before_create :ensure_authentication_token before_create :ensure_authentication_token
alias_attribute :private_token, :authentication_token alias_attribute :private_token, :authentication_token
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
Code Code
.input .input
.input-prepend .input-prepend
%span.add-on= "http://#{GIT_HOST["host"]}/" %span.add-on= web_app_url
= f.text_field :code, :placeholder => "example" = f.text_field :code, :placeholder => "example"
- unless @admin_project.new_record? - unless @admin_project.new_record?
......
...@@ -19,4 +19,4 @@ ...@@ -19,4 +19,4 @@
%td= last_commit(project) %td= last_commit(project)
%td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}", :class => "btn small" %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" %td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger"
= paginate @admin_projects = paginate @admin_projects, :theme => "admin"
...@@ -20,4 +20,4 @@ ...@@ -20,4 +20,4 @@
%td= link_to 'Edit', edit_admin_user_path(user), :id => "edit_#{dom_id(user)}", :class => "btn small" %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" %td= link_to 'Destroy', [:admin, user], :confirm => 'Are you sure?', :method => :delete, :class => "btn small danger"
= paginate @admin_users = paginate @admin_users, :theme => "admin"
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
= link_to project do = link_to project do
%h4 %h4
%span.ico.project %span.ico.project
= project.name = truncate project.name, :length => 30
%small %small
last activity at last activity at
= project.last_activity_date.stamp("Aug 25, 2011") = project.last_activity_date.stamp("Aug 25, 2011")
......
...@@ -20,17 +20,35 @@ ...@@ -20,17 +20,35 @@
.row .row
.dashboard_block .dashboard_block
.row .row
.span10= render "dashboard/projects_feed", :projects => @active_projects
.span4.right .span4.right
%div.borders.ipadded
%h1
= pluralize current_user.projects.count, "project", "projects"
- if current_user.can_create_project? - if current_user.can_create_project?
.alert-message.block-message.warning %hr
%div
You can create up to You can create up to
= current_user.projects_limit = current_user.projects_limit
projects. Click on link below to add a new one projects. Click on button below to add a new one
.link_holder .link_holder
= link_to new_project_path, :class => "" do %br
= link_to new_project_path, :class => "btn" do
New Project » 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? - if @merge_requests.any?
%div.dashboard_category %div.dashboard_category
......
...@@ -9,6 +9,13 @@ ...@@ -9,6 +9,13 @@
<br/> <br/>
<%= f.submit "Sign in", :class => "primary btn" %> <%= f.submit "Sign in", :class => "primary btn" %>
<div class="right"> <%= render :partial => "devise/shared/links" %></div> <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? -%> <% if ldap_enable? -%>
<p><%= link_to "via LDAP", user_omniauth_authorize_path(:ldap)%></p> <p><%= link_to "via LDAP", user_omniauth_authorize_path(:ldap)%></p>
<% end -%> <% end -%>
......
...@@ -17,9 +17,3 @@ ...@@ -17,9 +17,3 @@
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> <%- 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 /> <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
<% end -%> <% 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 -%>
- @issues.critical.each do |issue| - @issues.select(&:critical).each do |issue|
= render(:partial => 'issues/show', :locals => {:issue => 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}) = 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
%li.wll{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(issue.project, issue) } %li.wll{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(issue.project, issue) }
.right .right
- if issue.notes.any? - 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 can? current_user, :modify_issue, issue
- if issue.closed - 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 - 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 = 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" = image_tag gravatar_icon(issue.assignee_email), :class => "avatar"
%span.update-author %span.update-author
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
- if @issues.blank? - if @issues.blank?
%li %li
%p.padded Nothing to show here %p.padded Nothing to show here
:javascript :javascript
var href = $('.issue_search').parent().attr('action'); var href = $('.issue_search').parent().attr('action');
var last_terms = ''; var last_terms = '';
......
-# 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
-# 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')
-# 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}
-# 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
-# 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}
-# 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
-# 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
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.input= f.text_field :title .input= f.text_field :title
.clearfix .clearfix
= f.label :key = f.label :key
.input= f.text_area :key, :class => "xlarge" .input= f.text_area :key, :class => [:xxlarge, :thin_area]
.actions .actions
= f.submit 'Save', :class => "primary btn" = f.submit 'Save', :class => "primary btn"
= link_to "Cancel", keys_path, :class => "btn" = link_to "Cancel", keys_path, :class => "btn"
......
...@@ -5,11 +5,10 @@ ...@@ -5,11 +5,10 @@
.modal-body .modal-body
%pre %pre
:erb :erb
git checkout <%= @merge_request.target_branch %>
git fetch origin git fetch origin
git checkout -b <%=@merge_request.source_branch%> origin/<%=@merge_request.source_branch%> git merge origin/<%= @merge_request.source_branch %>
git checkout <%=@merge_request.target_branch%> git push origin <%= @merge_request.target_branch %>
git merge <%=@merge_request.source_branch%>
git push origin <%=@merge_request.target_branch%>
:javascript :javascript
......
%li.wll %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" = image_tag gravatar_icon(merge_request.author_email), :class => "avatar"
%span.update-author %span.update-author
%strong= merge_request.author_name %strong= merge_request.author_name
authored authored
= time_ago_in_words(merge_request.created_at) = time_ago_in_words(merge_request.created_at)
ago ago
- if merge_request.notes.any?
%span.pretty_label= pluralize merge_request.notes.count, 'note'
- if merge_request.upvotes > 0 - if merge_request.upvotes > 0
%span.label.success= "+#{merge_request.upvotes}" %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 = 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)
...@@ -27,5 +27,10 @@ ...@@ -27,5 +27,10 @@
- if @merge_requests.blank? - if @merge_requests.blank?
%li %li
%p.padded Nothing to show here %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
.media-grid .row
= link_to "#" do .span10
= image_tag gravatar_icon(@user.email, 90), :class => "thumbnail" .profile_avatar_holder
%h3.media_h = image_tag gravatar_icon(@user.email, 90), :class => "styled_image"
%h3
= @user.name = @user.name
%br %br
%small %small
= @user.email = @user.email
.right .span6.right
%p.alert-message.block-message You can change your avatar at gravatar.com %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 %hr
= form_for @user, :url => profile_update_path, :method => :put do |f| = form_for @user, :url => profile_update_path, :method => :put do |f|
...@@ -18,23 +29,39 @@ ...@@ -18,23 +29,39 @@
%ul %ul
- @user.errors.full_messages.each do |msg| - @user.errors.full_messages.each do |msg|
%li= msg %li= msg
.row
.span9
.clearfix .clearfix
= f.label :name = f.label :name
.input= f.text_field :name .input
= f.text_field :name, :class => "xlarge"
%span.help-block Enter youre name, so people you know can recognize you.
.clearfix .clearfix
= f.label :email = f.label :email
.input= f.text_field :email .input
= f.text_field :email, :class => "xlarge"
%span.help-block We also use email for avatar detection
.clearfix .clearfix
= f.label :skype = f.label :skype
.input= f.text_field :skype .input= f.text_field :skype, :class => "xlarge"
.clearfix .clearfix
= f.label :linkedin = f.label :linkedin
.input= f.text_field :linkedin .input= f.text_field :linkedin, :class => "xlarge"
.clearfix .clearfix
= f.label :twitter = f.label :twitter
.input= f.text_field :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 .actions
= f.submit 'Save', :class => "primary btn" = 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"
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
Code Code
.input .input
.input-prepend .input-prepend
%span.add-on= "http://#{GIT_HOST["host"]}/" %span.add-on= web_app_url
= f.text_field :code, :placeholder => "example" = f.text_field :code, :placeholder => "example"
- unless @project.new_record? || @project.heads.empty? - unless @project.new_record? || @project.heads.empty?
......
...@@ -38,3 +38,7 @@ ...@@ -38,3 +38,7 @@
"git remote add origin #{@project.url_to_repo}", "git remote add origin #{@project.url_to_repo}",
"git push -u origin master"].join("\n") "git push -u origin master"].join("\n")
= raw bash_lexer.highlight(exist_repo_setup_str) = 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"
- allow_admin = can? current_user, :admin_project, @project - allow_admin = can? current_user, :admin_project, @project
- user = @team_member.user - user = @team_member.user
.media-grid
= link_to "#" do .row
= image_tag gravatar_icon(user.email, 60), :class => "thumbnail", :width => 60 .span8
%h3.media_h .profile_avatar_holder
= image_tag gravatar_icon(user.email, 90), :class => "styled_image"
%h3
= user.name = user.name
%br %br
%small= user.email %small
= user.email
.back_link %br
.back_link
%br
= link_to team_project_path(@project), :class => "" do = link_to team_project_path(@project), :class => "" do
&larr; To team list &larr; To team list
%br .span8.right
%table.zebra-striped.borders %div
%tr %div
%td Name %h5.cgray
%td= user.name Member since:
%span.right
%tr = @team_member.created_at.stamp("Aug 21, 2011")
%td Email %h5.cgray
%td= user.email Project Access:
%small (#{link_to "read more", help_permissions_path, :class => "vlink"})
%tr %span.right
%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| = 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 = 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? - unless user.skype.empty?
%tr %p
%td Skype: %b Skype:
%td= user.skype = user.skype
- unless user.linkedin.empty? - unless user.linkedin.empty?
%tr %p
%td LinkedIn: %b LinkedIn:
%td= user.linkedin = user.linkedin
- unless user.twitter.empty? - unless user.twitter.empty?
%tr %p
%td Twitter: %b Twitter:
%td= user.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 - if can? current_user, :admin_project, @project
.actions .actions
......
UsersProject.seed(:id, [ UsersProject.seed(:id, [
{ :id => 1, :project_id => 1, :user_id => 1, :project_access => UsersProject::MASTER }, { :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 => 2, :project_id => 1, :user_id => 2, :project_access => UsersProject::REPORTER},
{ :id => 3, :project_id => 1, :user_id => 3, :project_access => UsersProject::REPORTERW}, { :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 => 4, :project_id => 1, :user_id => 4, :project_access => UsersProject::REPORTER},
{ :id => 5, :project_id => 1, :user_id => 5, :project_access => UsersProject::REPORTER}, { :id => 5, :project_id => 1, :user_id => 5, :project_access => UsersProject::REPORTER},
......
...@@ -15,7 +15,25 @@ Issue.seed(:id, [ ...@@ -15,7 +15,25 @@ Issue.seed(:id, [
{ :id => 13, :project_id => 3, :author_id => 2, :assignee_id => 2, :title => Faker::Lorem.sentence(6)}, { :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 => 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 => 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)}
]) ])
......
class AddBioFieldToUser < ActiveRecord::Migration
def change
add_column :users, :bio, :string, :null => true
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # 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| create_table "events", :force => true do |t|
t.string "target_type" t.string "target_type"
...@@ -156,6 +156,7 @@ ActiveRecord::Schema.define(:version => 20120315132931) do ...@@ -156,6 +156,7 @@ ActiveRecord::Schema.define(:version => 20120315132931) do
t.string "authentication_token" t.string "authentication_token"
t.boolean "dark_scheme", :default => false, :null => false t.boolean "dark_scheme", :default => false, :null => false
t.integer "theme_id", :default => 1, :null => false t.integer "theme_id", :default => 1, :null => false
t.string "bio"
end end
add_index "users", ["email"], :name => "index_users_on_email", :unique => true add_index "users", ["email"], :name => "index_users_on_email", :unique => true
......
...@@ -60,7 +60,7 @@ The installation consists of 6 steps: ...@@ -60,7 +60,7 @@ The installation consists of 6 steps:
# 2. Install ruby # 2. Install ruby
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz 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 cd ruby-1.9.2-p290
./configure ./configure
make make
...@@ -220,15 +220,11 @@ Edit /etc/nginx/nginx.conf. Add next code to **http** section: ...@@ -220,15 +220,11 @@ Edit /etc/nginx/nginx.conf. Add next code to **http** section:
server { server {
listen 80; listen 80;
server_name mygitlab.com; server_name mygitlab.com;
location / {
root /home/gitlab/gitlab/public; root /home/gitlab/gitlab/public;
try_files $uri $uri/index.html $uri.html @gitlab;
if (!-f $request_filename) { location @gitlab {
proxy_pass http://gitlab; proxy_pass http://gitlab;
break;
}
} }
} }
......
mkdir tmp/pids mkdir -p 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 bundle exec rake environment resque:work QUEUE=post_receive RAILS_ENV=production PIDFILE=tmp/pids/resque_worker.pid BACKGROUND=yes
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment