diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-23 20:35:30 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-23 20:35:30 -0800 |
commit | 67198a80801c560282d84dfc6efbd6e3a04ca67a (patch) | |
tree | 2dd51bd09f439688651affacdd76ab540ebfb973 | |
parent | 23eb274ee021cf356efc09ac65f9fd4629ddd83c (diff) | |
download | gitlab-ci-67198a80801c560282d84dfc6efbd6e3a04ca67a.tar.gz |
Refactor help text and remove integration page
-rw-r--r-- | app/views/layouts/_nav_project.html.haml | 30 | ||||
-rw-r--r-- | app/views/layouts/project.html.haml | 35 | ||||
-rw-r--r-- | app/views/projects/edit.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/integration.html.haml | 22 | ||||
-rw-r--r-- | app/views/runners/index.html.haml | 20 | ||||
-rw-r--r-- | spec/features/projects_spec.rb | 9 | ||||
-rw-r--r-- | spec/features/runners_spec.rb | 17 |
7 files changed, 58 insertions, 76 deletions
diff --git a/app/views/layouts/_nav_project.html.haml b/app/views/layouts/_nav_project.html.haml new file mode 100644 index 0000000..6c2c8a0 --- /dev/null +++ b/app/views/layouts/_nav_project.html.haml @@ -0,0 +1,30 @@ +%ul.nav.nav-pills.nav-stacked.project-menu + = nav_link path: 'projects#show' do + = link_to project_path(@project) do + %i.icon-list-alt + Commits + %small.pull-right= @project.commits.count + = nav_link path: 'charts#show' do + = link_to project_charts_path(@project) do + %i.icon-bar-chart + Charts + = nav_link path: 'web_hooks#index' do + = link_to project_web_hooks_path(@project) do + %i.icon-link + Web Hooks + = nav_link path: 'runners#index' do + = link_to project_runners_path(@project) do + %i.icon-cog + Runners + = nav_link path: 'jobs#index' do + = link_to project_jobs_path(@project) do + %i.icon-code + Jobs + = nav_link path: 'services#index' do + = link_to project_services_path(@project) do + %i.icon-gear + Services + = nav_link path: 'projects#edit' do + = link_to edit_project_path(@project) do + %i.icon-cogs + Settings diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index ba90d55..1154897 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -20,40 +20,7 @@ - if current_user && current_user.can_manage_project?(@project.gitlab_id) .row .col-md-2.append-bottom-20 - %ul.nav.nav-pills.nav-stacked.project-menu - = nav_link path: 'projects#show' do - = link_to project_path(@project) do - %i.icon-list-alt - Commits - %small.pull-right= @project.commits.count - = nav_link path: 'charts#show' do - = link_to project_charts_path(@project) do - %i.icon-bar-chart - Charts - = nav_link path: 'projects#integration' do - = link_to integration_project_path(@project) do - %i.icon-wrench - Integration - = nav_link path: 'web_hooks#index' do - = link_to project_web_hooks_path(@project) do - %i.icon-link - Web Hooks - = nav_link path: 'runners#index' do - = link_to project_runners_path(@project) do - %i.icon-cog - Runners - = nav_link path: 'jobs#index' do - = link_to project_jobs_path(@project) do - %i.icon-code - Jobs - = nav_link path: 'services#index' do - = link_to project_services_path(@project) do - %i.icon-gear - Services - = nav_link path: 'projects#edit' do - = link_to edit_project_path(@project) do - %i.icon-cogs - Settings + = render 'layouts/nav_project' .col-md-10 = yield - else diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 253d32a..bcc5832 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -1,2 +1 @@ -= render 'info' = render 'form' diff --git a/app/views/projects/integration.html.haml b/app/views/projects/integration.html.haml deleted file mode 100644 index 2b44508..0000000 --- a/app/views/projects/integration.html.haml +++ /dev/null @@ -1,22 +0,0 @@ -%h3 - Integration with GitLab. Requires GitLab 7.5+ -%hr -%form.form-horizontal - .bs-callout.bs-callout-info - %p - Copy to GitLab → Project → Services - (#{link_to 'screenshot', image_path('service_sample.png'), target: '_blank'}) - %ul - %li build on push - %li integration with Merge Requests - %li links to GitLab instance - - - .form-group - = label_tag :token, 'Project Token', class: 'control-label' - .col-sm-10 - = text_field_tag :token, @project.token, class: 'form-control', readonly: true - .form-group - = label_tag :url, 'Project URL', class: 'control-label' - .col-sm-10 - = text_field_tag :url, project_url(@project), class: 'form-control', readonly: true diff --git a/app/views/runners/index.html.haml b/app/views/runners/index.html.haml index 14227b1..6854f09 100644 --- a/app/views/runners/index.html.haml +++ b/app/views/runners/index.html.haml @@ -4,19 +4,19 @@ %br Runners can be placed on separate users, servers, and even on your local machine. -.bs-callout +.bs-callout.help-callout %h4 How to setup a new project specific runner - %br - %p - 1. Install GitLab Runner software. - Checkout #{link_to 'runner repository', 'https://gitlab.com/gitlab-org/gitlab-ci-runner/blob/master/README.md', target: '_blank'} to find out how install one + %ol + %li + Install GitLab Runner software. + Checkout #{link_to 'runner repository', 'https://gitlab.com/gitlab-org/gitlab-ci-runner/blob/master/README.md', target: '_blank'} to find out how install one - %p - 2. Use the following registration token during setup: - %code #{@project.token} - %p - 3. Start runner! + %li + Use the following registration token during setup: + %code #{@project.token} + %li + Start runner! %table.table diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb index 269f273..7d92a19 100644 --- a/spec/features/projects_spec.rb +++ b/spec/features/projects_spec.rb @@ -44,13 +44,4 @@ describe "Projects" do it { page.should have_content 'Builds chart for last year' } it { page.should have_content 'Commit duration in minutes for last 30 commits' } end - - describe "GET /projects/:id/details" do - before do - visit integration_project_path(@project) - end - - it { page.should have_content @project.name } - it { page.should have_content 'Integration with GitLab' } - end end diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb new file mode 100644 index 0000000..888b202 --- /dev/null +++ b/spec/features/runners_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe "Runners" do + before do + login_as :user + @project = FactoryGirl.create :project + end + + describe "GET /projects/:id/runners" do + before do + visit project_runners_path(@project) + end + + it { page.should have_content @project.name } + it { page.should have_content 'How to setup a new project specific runner' } + end +end |