diff options
author | Rémy Coutable <remy@rymai.me> | 2016-12-15 17:31:14 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-12-19 17:35:51 +0100 |
commit | 103114e3d73819f76bed9d8ad1bbdb8964875579 (patch) | |
tree | 3457c48ed93ee0266acf6f459e5a9c312e3d42b4 /app/views/import | |
parent | 5d4531db2555d3051fc47e9268728a670ece95f9 (diff) | |
download | gitlab-ce-103114e3d73819f76bed9d8ad1bbdb8964875579.tar.gz |
Rename Gogs to Gitea, DRY the controller and improve views
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/views/import')
-rw-r--r-- | app/views/import/gitea/new.html.haml | 23 | ||||
-rw-r--r-- | app/views/import/gitea/status.html.haml (renamed from app/views/import/gogs/status.html.haml) | 14 | ||||
-rw-r--r-- | app/views/import/gogs/new.html.haml | 17 |
3 files changed, 30 insertions, 24 deletions
diff --git a/app/views/import/gitea/new.html.haml b/app/views/import/gitea/new.html.haml new file mode 100644 index 00000000000..02a116f996b --- /dev/null +++ b/app/views/import/gitea/new.html.haml @@ -0,0 +1,23 @@ +- page_title "Gitea Import" +- header_title "Projects", root_path + +%h3.page-title + = custom_icon('go_logo') + Import Projects from Gitea + +%p + To get started, please enter your Gitea Host URL and a + = succeed '.' do + = link_to 'Personal Access Token', 'https://github.com/gogits/go-gogs-client/wiki#access-token' + += form_tag personal_access_token_import_gitea_path, class: 'form-horizontal' do + .form-group + = label_tag :gitea_host_url, 'Gitea Host URL', class: 'control-label' + .col-sm-4 + = text_field_tag :gitea_host_url, nil, placeholder: 'https://try.gitea.io', class: 'form-control' + .form-group + = label_tag :personal_access_token, 'Personal Access Token', class: 'control-label' + .col-sm-4 + = text_field_tag :personal_access_token, nil, class: 'form-control' + .form-actions + = submit_tag 'List Your Gitea Repositories', class: 'btn btn-create' diff --git a/app/views/import/gogs/status.html.haml b/app/views/import/gitea/status.html.haml index 86ccc79efc8..2b25892c0da 100644 --- a/app/views/import/gogs/status.html.haml +++ b/app/views/import/gitea/status.html.haml @@ -1,8 +1,8 @@ -- page_title "Gogs import" +- page_title "Gitea import" - header_title "Projects", root_path %h3.page-title - %i.fa.fa-github - Import projects from Gogs + = custom_icon('go_logo') + Import projects from Gitea %p.light Select projects you want to import. @@ -19,14 +19,14 @@ %colgroup.import-jobs-status-col %thead %tr - %th From Gogs + %th From Gitea %th To GitLab %th Status %tbody - @already_added_projects.each do |project| %tr{id: "project_#{project.id}", class: "#{project_status_css_class(project.import_status)}"} %td - = gogs_project_link(project.import_source) + = gitea_project_link(@gitea_root_url, project.import_source) %td = link_to project.path_with_namespace, [project.namespace.becomes(Namespace), project] %td.job-status @@ -43,7 +43,7 @@ - @repos.each do |repo| %tr{id: "repo_#{repo.id}"} %td - = gogs_project_link(repo.full_name) + = gitea_project_link(@gitea_root_url, repo.full_name) %td.import-target %fieldset.row .input-group @@ -61,4 +61,4 @@ Import = icon("spinner spin", class: "loading-icon") -.js-importer-status{ data: { jobs_import_path: "#{jobs_import_gogs_path}", import_path: "#{import_gogs_path}" } } +.js-importer-status{ data: { jobs_import_path: "#{jobs_import_gitea_path}", import_path: "#{import_gitea_path}" } } diff --git a/app/views/import/gogs/new.html.haml b/app/views/import/gogs/new.html.haml deleted file mode 100644 index e1ae1be283c..00000000000 --- a/app/views/import/gogs/new.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -- page_title "Gogs Import" -- header_title "Projects", root_path - -%h3.page-title - = image_tag(image_path('gogs-logo.svg'), alt: 'Gogs', size: "16x16") - Gogs - -%p - To import a Gogs project, you can use a - = succeed '.' do - = link_to 'Personal Access Token', 'https://github.com/gogits/go-gogs-client/wiki#access-token' - -= form_tag personal_access_token_import_gogs_path, method: :post, class: 'form-inline' do - .form-group - = text_field_tag :personal_access_token, '', class: 'form-control', placeholder: "Personal Access Token", size: 40 - = text_field_tag :gogs_host_url, '', class: 'form-control', placeholder: "Gogs Host URL", size: 128 - = submit_tag 'List Your Gogs Repositories', class: 'btn btn-success' |