From 96d49bf04ce77c975fe500f4d961e4a1ffed4c26 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 30 Dec 2012 14:43:00 +0200 Subject: Use sdoc to generate application code documentation --- doc/code/classes/ProjectsController.html | 566 +++++++++++++++++++++++++++++++ 1 file changed, 566 insertions(+) create mode 100644 doc/code/classes/ProjectsController.html (limited to 'doc/code/classes/ProjectsController.html') diff --git a/doc/code/classes/ProjectsController.html b/doc/code/classes/ProjectsController.html new file mode 100644 index 00000000000..3cc6dd07a3e --- /dev/null +++ b/doc/code/classes/ProjectsController.html @@ -0,0 +1,566 @@ + + + + + ProjectsController + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
Methods
+
+ +
C
+
+ +
+ +
D
+
+ +
+ +
E
+
+
    + + +
  • + edit +
  • + +
+
+ +
F
+
+ +
+ +
G
+
+ +
+ +
N
+
+
    + + +
  • + new +
  • + +
+
+ +
S
+
+
    + + +
  • + show +
  • + +
+
+ +
U
+
+ +
+ +
W
+
+
    + + +
  • + wall +
  • + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + create() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 20
+def create
+  @project = Project.create_by_user(params[:project], current_user)
+
+  respond_to do |format|
+    flash[:notice] = 'Project was successfully created.' if @project.saved?
+    format.html do
+      if @project.saved?
+        redirect_to @project
+      else
+        render action: "new"
+      end
+    end
+    format.js
+  end
+end
+
+
+ +
+ +
+
+ + destroy() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 99
+def destroy
+  return access_denied! unless can?(current_user, :remove_project, project)
+
+  # Delete team first in order to prevent multiple gitolite calls
+  project.truncate_team
+
+  project.destroy
+
+  respond_to do |format|
+    format.html { redirect_to root_path }
+  end
+end
+
+
+ +
+ +
+
+ + edit() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 17
+def edit
+end
+
+
+ +
+ +
+
+ + files() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 72
+def files
+  @notes = @project.notes.where("attachment != 'NULL'").order("created_at DESC").limit(100)
+end
+
+
+ +
+ +
+
+ + graph() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 89
+def graph
+  respond_to do |format|
+    format.html
+    format.json do
+      graph = Gitlab::Graph::JsonBuilder.new(project)
+      render :json => graph.to_json
+    end
+  end
+end
+
+
+ +
+ +
+
+ + new() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 13
+def new
+  @project = Project.new
+end
+
+
+ +
+ +
+
+ + show() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 55
+def show
+  limit = (params[:limit] || 20).to_i
+  @events = @project.events.recent.limit(limit).offset(params[:offset] || 0)
+
+  respond_to do |format|
+    format.html do
+      unless @project.empty_repo?
+        @last_push = current_user.recent_push(@project.id)
+        render :show
+      else
+        render "projects/empty"
+      end
+    end
+    format.js
+  end
+end
+
+
+ +
+ +
+
+ + update() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 36
+def update
+  status = ProjectUpdateContext.new(project, current_user, params).execute
+
+  respond_to do |format|
+    if status
+      flash[:notice] = 'Project was successfully updated.'
+      format.html { redirect_to edit_project_path(project), notice: 'Project was successfully updated.' }
+      format.js
+    else
+      format.html { render action: "edit" }
+      format.js
+    end
+  end
+
+rescue Project::TransferError => ex
+  @error = ex
+  render :update_failed
+end
+
+
+ +
+ +
+
+ + wall() + + +
+ + +
+

Wall

+
+ + + + + + +
+ + +
+
# File app/controllers/projects_controller.rb, line 80
+def wall
+  return render_404 unless @project.wall_enabled
+  @note = Note.new
+
+  respond_to do |format|
+    format.html
+  end
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file -- cgit v1.2.1