merging upstream changes
This commit is contained in:
commit
6c40e89853
29
CHANGELOG
29
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
|
||||
|
|
|
@ -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;
|
||||
.profile_avatar_holder {
|
||||
float:left;
|
||||
}
|
||||
width:90px;
|
||||
height:90px;
|
||||
margin-right:20px;
|
||||
img {
|
||||
width:90px;
|
||||
height:90px;
|
||||
background:#eee;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -465,8 +476,26 @@ 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 {
|
||||
|
@ -847,14 +876,7 @@ p.time {
|
|||
border:none;
|
||||
&:hover {
|
||||
background:none;
|
||||
|
||||
h4 {
|
||||
color:#2FA0BB;
|
||||
.arrow {
|
||||
background:#2FA0BB;
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
h4 { color:#2FA0BB; }
|
||||
}
|
||||
|
||||
h4 {
|
||||
|
@ -1043,3 +1065,17 @@ p.time {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 :
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -20,17 +20,35 @@
|
|||
.row
|
||||
.dashboard_block
|
||||
.row
|
||||
.span10= render "dashboard/projects_feed", :projects => @active_projects
|
||||
.span4.right
|
||||
%div.borders.ipadded
|
||||
%h1
|
||||
= pluralize current_user.projects.count, "project", "projects"
|
||||
- if current_user.can_create_project?
|
||||
.alert-message.block-message.warning
|
||||
%hr
|
||||
%div
|
||||
You can create up to
|
||||
= 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_to new_project_path, :class => "" do
|
||||
%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
|
||||
|
|
|
@ -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 -%>
|
||||
|
|
|
@ -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 -%>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
9
app/views/kaminari/gitlab/_first_page.html.haml
Normal file
9
app/views/kaminari/gitlab/_first_page.html.haml
Normal file
|
@ -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
|
8
app/views/kaminari/gitlab/_gap.html.haml
Normal file
8
app/views/kaminari/gitlab/_gap.html.haml
Normal file
|
@ -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')
|
9
app/views/kaminari/gitlab/_last_page.html.haml
Normal file
9
app/views/kaminari/gitlab/_last_page.html.haml
Normal file
|
@ -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}
|
9
app/views/kaminari/gitlab/_next_page.html.haml
Normal file
9
app/views/kaminari/gitlab/_next_page.html.haml
Normal file
|
@ -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
|
10
app/views/kaminari/gitlab/_page.html.haml
Normal file
10
app/views/kaminari/gitlab/_page.html.haml
Normal file
|
@ -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}
|
16
app/views/kaminari/gitlab/_paginator.html.haml
Normal file
16
app/views/kaminari/gitlab/_paginator.html.haml
Normal file
|
@ -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
|
9
app/views/kaminari/gitlab/_prev_page.html.haml
Normal file
9
app/views/kaminari/gitlab/_prev_page.html.haml
Normal file
|
@ -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
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
→
|
||||
= 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
|
||||
→
|
||||
%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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,15 +1,26 @@
|
|||
.media-grid
|
||||
= link_to "#" do
|
||||
= image_tag gravatar_icon(@user.email, 90), :class => "thumbnail"
|
||||
%h3.media_h
|
||||
.row
|
||||
.span10
|
||||
.profile_avatar_holder
|
||||
= image_tag gravatar_icon(@user.email, 90), :class => "styled_image"
|
||||
%h3
|
||||
= @user.name
|
||||
%br
|
||||
%small
|
||||
= @user.email
|
||||
|
||||
.right
|
||||
%p.alert-message.block-message You can change your avatar at gravatar.com
|
||||
|
||||
.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
|
||||
|
||||
.row
|
||||
.span9
|
||||
.clearfix
|
||||
= 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
|
||||
= 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
|
||||
= f.label :skype
|
||||
.input= f.text_field :skype
|
||||
.input= f.text_field :skype, :class => "xlarge"
|
||||
.clearfix
|
||||
= f.label :linkedin
|
||||
.input= f.text_field :linkedin
|
||||
.input= f.text_field :linkedin, :class => "xlarge"
|
||||
.clearfix
|
||||
= 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
|
||||
= 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 @@
|
|||
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?
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
.row
|
||||
.span8
|
||||
.profile_avatar_holder
|
||||
= image_tag gravatar_icon(user.email, 90), :class => "styled_image"
|
||||
%h3
|
||||
= user.name
|
||||
%br
|
||||
%small= user.email
|
||||
|
||||
.back_link
|
||||
%small
|
||||
= user.email
|
||||
%br
|
||||
.back_link
|
||||
%br
|
||||
= link_to team_project_path(@project), :class => "" do
|
||||
← To team list
|
||||
|
||||
%br
|
||||
%table.zebra-striped.borders
|
||||
%tr
|
||||
%td Name
|
||||
%td= user.name
|
||||
|
||||
%tr
|
||||
%td Email
|
||||
%td= user.email
|
||||
|
||||
%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
|
||||
.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
|
||||
|
||||
|
||||
|
||||
%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
|
||||
|
|
|
@ -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},
|
||||
|
||||
|
|
|
@ -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)}
|
||||
])
|
||||
|
||||
|
||||
|
|
5
db/migrate/20120323221339_add_bio_field_to_user.rb
Normal file
5
db/migrate/20120323221339_add_bio_field_to_user.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class AddBioFieldToUser < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :bio, :string, :null => true
|
||||
end
|
||||
end
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
try_files $uri $uri/index.html $uri.html @gitlab;
|
||||
|
||||
if (!-f $request_filename) {
|
||||
location @gitlab {
|
||||
proxy_pass http://gitlab;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue