Commit 41163fd5 authored by James Lopez's avatar James Lopez

some experimental UI stuff to test export

parent 0852f539
......@@ -186,6 +186,15 @@ class ProjectsController < Projects::ApplicationController
)
end
def export
::Projects::ImportExport::ExportService.new(@project, current_user).execute
redirect_to(
project_path(@project),
notice: "Project export successfully started"
)
end
def toggle_star
current_user.toggle_star(@project)
@project.reload
......
module Projects
module ImportExport
class ExportService < BaseService
def execute(options = {})
@shared = Gitlab::ImportExport::Shared.new(relative_path: project.path_with_namespace)
save_project_tree
......
......@@ -132,6 +132,19 @@
= link_to 'Housekeeping', housekeeping_namespace_project_path(@project.namespace, @project),
method: :post, class: "btn btn-default"
.panel.panel-default
.panel-heading Export
.errors-holder
.panel-body
%p
Downloads a compressed version of the project that can be imported.
%br
.form-actions
= link_to 'Export', export_namespace_project_path(@project.namespace, @project),
method: :post, class: "btn btn-default"
- if can? current_user, :archive_project, @project
- if @project.archived?
.panel.panel-success
......
......@@ -433,6 +433,7 @@ Rails.application.routes.draw do
post :housekeeping
post :toggle_star
post :markdown_preview
post :export
get :autocomplete_sources
get :activity
end
......
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