Merge branch 'master' of dev.gitlabhq.com:gitlabhq
This commit is contained in:
commit
12782adf03
66 changed files with 493 additions and 440 deletions
|
@ -79,8 +79,8 @@ class ApplicationController < ActionController::Base
|
|||
elsif params[:last_id]
|
||||
@notes = @notes.where("id > ?", params[:last_id])
|
||||
elsif params[:first_id]
|
||||
@notes = @notes.where("id < ?", params[:first_id])
|
||||
else
|
||||
@notes = @notes.where("id < ?", params[:first_id])
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,10 +10,9 @@ class CommitsController < ApplicationController
|
|||
before_filter :require_non_empty_project
|
||||
before_filter :load_refs, :only => :index # load @branch, @tag & @ref
|
||||
|
||||
|
||||
def index
|
||||
@repo = project.repo
|
||||
limit, offset = (params[:limit] || 20), (params[:offset] || 0)
|
||||
limit, offset = (params[:limit] || 20), (params[:offset] || 0)
|
||||
|
||||
@commits = if params[:path]
|
||||
@repo.log(@ref, params[:path], :max_count => limit, :skip => offset)
|
||||
|
@ -24,6 +23,7 @@ class CommitsController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.js
|
||||
format.atom { render :layout => false }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -32,7 +32,7 @@ class CommitsController < ApplicationController
|
|||
@notes = project.commit_notes(@commit).fresh.limit(20)
|
||||
@note = @project.build_commit_note(@commit)
|
||||
|
||||
respond_to do |format|
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js { respond_with_notes }
|
||||
end
|
||||
|
|
|
@ -24,6 +24,7 @@ class IssuesController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.js
|
||||
format.atom { render :layout => false }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -40,7 +41,7 @@ class IssuesController < ApplicationController
|
|||
@notes = @issue.notes.inc_author.order("created_at DESC").limit(20)
|
||||
@note = @project.notes.new(:noteable => @issue)
|
||||
|
||||
respond_to do |format|
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js { respond_with_notes }
|
||||
end
|
||||
|
@ -97,7 +98,7 @@ class IssuesController < ApplicationController
|
|||
else @project.issues.opened
|
||||
end
|
||||
|
||||
@issues = @issues.where("title LIKE ? OR content LIKE ?", "%#{terms}%", "%#{terms}%") unless terms.blank?
|
||||
@issues = @issues.where("title LIKE ?", "%#{terms}%") unless terms.blank?
|
||||
|
||||
render :partial => 'issues'
|
||||
end
|
||||
|
|
|
@ -79,7 +79,7 @@ class ProjectsController < ApplicationController
|
|||
@notes = @project.common_notes.order("created_at DESC")
|
||||
@notes = @notes.fresh.limit(20)
|
||||
|
||||
respond_to do |format|
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js { respond_with_notes }
|
||||
end
|
||||
|
@ -168,7 +168,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def add_refs(commit, ref_cache)
|
||||
if ref_cache.empty?
|
||||
@repo.refs.each do |ref|
|
||||
@repo.refs.each do |ref|
|
||||
ref_cache[ref.commit.id] ||= []
|
||||
ref_cache[ref.commit.id] << ref
|
||||
end
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
class TagsController < ApplicationController
|
||||
def index
|
||||
@tags = Project.tag_counts.order('count DESC')
|
||||
@tags = @tags.where('name like ?', "%#{params[:term]}%") unless params[:term].blank?
|
||||
def index
|
||||
@tags = Project.tag_counts.order('count DESC')
|
||||
@tags = @tags.where('name like ?', "%#{params[:term]}%") unless params[:term].blank?
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render json: @tags.limit(8).map {|t| t.name}}
|
||||
end
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render json: @tags.limit(8).map {|t| t.name}}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue