Merge branch 'bootstrap'
Conflicts: Gemfile app/views/commits/_commits.html.haml app/views/projects/empty.html.haml
This commit is contained in:
commit
8ebfae9a07
127 changed files with 2464 additions and 2991 deletions
|
@ -52,6 +52,12 @@ class Admin::ProjectsController < ApplicationController
|
|||
def update
|
||||
@admin_project = Project.find_by_code(params[:id])
|
||||
|
||||
owner_id = params[:project][:owner_id]
|
||||
|
||||
if owner_id
|
||||
@admin_project.owner = User.find(owner_id)
|
||||
end
|
||||
|
||||
if @admin_project.update_attributes(params[:project])
|
||||
redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.'
|
||||
else
|
||||
|
|
|
@ -95,4 +95,8 @@ class ApplicationController < ActionController::Base
|
|||
response.headers["Pragma"] = "no-cache"
|
||||
response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
|
||||
end
|
||||
|
||||
def render_full_content
|
||||
@full_content = true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -29,6 +29,8 @@ class CommitsController < ApplicationController
|
|||
|
||||
@line_notes = project.commit_line_notes(@commit)
|
||||
|
||||
render_full_content
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js { respond_with_notes }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class KeysController < ApplicationController
|
||||
layout "profile"
|
||||
respond_to :js
|
||||
respond_to :js, :html
|
||||
|
||||
def index
|
||||
@keys = current_user.keys.all
|
||||
|
|
|
@ -39,6 +39,8 @@ class MergeRequestsController < ApplicationController
|
|||
@notes = @merge_request.notes.inc_author.order("created_at DESC").limit(20)
|
||||
@note = @project.notes.new(:noteable => @merge_request)
|
||||
|
||||
render_full_content
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js { respond_with_notes }
|
||||
|
|
|
@ -68,7 +68,8 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def show
|
||||
return render "projects/empty" unless @project.repo_exists? && @project.has_commits?
|
||||
limit = (params[:limit] || 20).to_i
|
||||
limit = (params[:limit] || 10).to_i
|
||||
|
||||
@activities = @project.activities(limit)#updates_wo_repo(limit)
|
||||
end
|
||||
|
||||
|
|
|
@ -8,16 +8,27 @@ class RefsController < ApplicationController
|
|||
|
||||
before_filter :ref
|
||||
before_filter :define_tree_vars, :only => [:tree, :blob]
|
||||
before_filter :render_full_content
|
||||
|
||||
layout "project"
|
||||
|
||||
def switch
|
||||
new_path = if params[:destination] == "tree"
|
||||
tree_project_ref_path(@project, params[:ref])
|
||||
else
|
||||
project_commits_path(@project, :ref => params[:ref])
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
new_path = if params[:destination] == "tree"
|
||||
tree_project_ref_path(@project, params[:ref])
|
||||
else
|
||||
project_commits_path(@project, :ref => params[:ref])
|
||||
end
|
||||
|
||||
redirect_to new_path
|
||||
redirect_to new_path
|
||||
end
|
||||
format.js do
|
||||
@ref = params[:ref]
|
||||
define_tree_vars
|
||||
render "tree"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
|
|
|
@ -40,7 +40,7 @@ class TeamMembersController < ApplicationController
|
|||
@team_member.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to root_path }
|
||||
format.html { redirect_to team_project_path(@project) }
|
||||
format.js { render :nothing => true }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue