diff --git a/app/assets/javascripts/components/test_job/_test_job_presenter.js.jsx b/app/assets/javascripts/components/test_job/_test_job_presenter.js.jsx index 4204ff8d..e8d729fb 100644 --- a/app/assets/javascripts/components/test_job/_test_job_presenter.js.jsx +++ b/app/assets/javascripts/components/test_job/_test_job_presenter.js.jsx @@ -60,8 +60,8 @@ var TestJobPresenter = React.createClass({ render: function () { return ( -
-
+
+
-
+
1 && (next_page = page_manager.next_page_number) - = link_to "Fetch more...", fetch_branches_project_branches_path(page: next_page), - id: 'fetch_more', class: 'btn btn-default btn-lg btn-block', - data: { disable_with: with_dots('Fetching branches'), remote: true } + = link_to url, { method: method, + class: "list-group-item #{klass}" }.merge(tooltip_options) do + .list-group-item-heading + #{branch[:name]} + .list-group-separator + - if current_project.repository_provider == 'github' + - page_manager = GithubPageManager.new(@response_data[:last_response]) + - if page_manager.all_pages_number > 1 && (next_page = page_manager.next_page_number) + = link_to "Fetch more...", fetch_branches_project_branches_path(page: next_page), + id: 'fetch_more', class: 'btn btn-default btn-lg btn-block', + data: { disable_with: with_dots('Fetching branches'), remote: true } - - else - %h2 No branches found! None. Zero. Zilch. Nada. - We were unable to find any branches in the '#{current_project.repository_name}'. That's weird... - - if @branches - - if @branches.empty? - %p - %h2 No branches found! None. Zero. Zilch. Nada. - We were unable to find any branches in the '#{current_project.repository_name}'. That's weird... - - else - %ul.list-group - .branches - - @branches.each do |branch| - %li.list-unstyled - = link_to branch.branch_name, - project_branches_path(current_project, - branch_name: branch.branch_name), - method: :post, - class: 'btn btn-raised btn-default btn-custom btn-block m-b-5' + - else + %h2 No branches found! None. Zero. Zilch. Nada. + We were unable to find any branches in the '#{current_project.repository_name}'. That's weird... + - if @branches + - if @branches.empty? + %p + %h2 No branches found! None. Zero. Zilch. Nada. + We were unable to find any branches in the '#{current_project.repository_name}'. That's weird... + - else + %ul.list-group + .branches + - @branches.each do |branch| + %li.list-unstyled + = link_to branch.branch_name, + project_branches_path(current_project, + branch_name: branch.branch_name), + method: :post, + class: 'btn btn-raised btn-default btn-custom btn-block m-b-5'