From d9763cb4dfb2eaf78718abc21434a3fde20a4fb6 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Wed, 7 Feb 2018 15:39:54 -0500 Subject: Refactor issue index filtered search --- app/views/projects/issues/index.html.haml | 1 - 1 file changed, 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index 193111b4cee..fb06ba58c27 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -6,7 +6,6 @@ - content_for :page_specific_javascripts do = webpack_bundle_tag 'common_vue' - = webpack_bundle_tag 'filtered_search' = content_for :meta_tags do = auto_discovery_link_tag(:atom, params.merge(rss_url_options), title: "#{@project.name} issues") -- cgit v1.2.1 From 27a6d65c616b58fdce5d7eba7a11b7ef7b2c8d28 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Thu, 15 Feb 2018 13:44:55 -0600 Subject: Add dispatcher imports for job details bundle --- app/views/projects/jobs/show.html.haml | 4 ---- 1 file changed, 4 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/jobs/show.html.haml b/app/views/projects/jobs/show.html.haml index 93efa7e8e86..849c273db8c 100644 --- a/app/views/projects/jobs/show.html.haml +++ b/app/views/projects/jobs/show.html.haml @@ -112,7 +112,3 @@ .js-build-options{ data: javascript_build_options } #js-job-details-vue{ data: { endpoint: project_job_path(@project, @build, format: :json) } } - -- content_for :page_specific_javascripts do - = webpack_bundle_tag('common_vue') - = webpack_bundle_tag('job_details') -- cgit v1.2.1 From 1c2d283d506f2ceb4777622837fffe381e34cb9d Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Thu, 15 Feb 2018 16:50:20 -0600 Subject: Add dispatcher imports for bundles used in merge request show path --- app/views/projects/merge_requests/_how_to_merge.html.haml | 3 --- app/views/projects/merge_requests/show.html.haml | 3 --- 2 files changed, 6 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/merge_requests/_how_to_merge.html.haml b/app/views/projects/merge_requests/_how_to_merge.html.haml index 917ec7fdbda..54a661040ea 100644 --- a/app/views/projects/merge_requests/_how_to_merge.html.haml +++ b/app/views/projects/merge_requests/_how_to_merge.html.haml @@ -1,6 +1,3 @@ -- content_for :page_specific_javascripts do - = webpack_bundle_tag('how_to_merge') - #modal_merge_info.modal .modal-dialog .modal-content diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 8740c6895df..b0fa6c2bd7b 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -4,9 +4,6 @@ - page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests" - page_description @merge_request.description - page_card_attributes @merge_request.card_attributes -- content_for :page_specific_javascripts do - = webpack_bundle_tag('common_vue') - = webpack_bundle_tag('diff_notes') .merge-request{ data: { mr_action: j(params[:tab].presence || 'show'), url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project) } } = render "projects/merge_requests/mr_title" -- cgit v1.2.1 From b866cba7f57025dad9e0c8dc93716d22baa87206 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 2 Feb 2018 15:50:09 -0600 Subject: Add Auto DevOps and Kubernetes cluster button to project page --- app/views/projects/_stat_anchor_list.html.haml | 5 ++ .../projects/_stat_anchor_list_item.html.haml | 7 +++ app/views/projects/empty.html.haml | 53 ++++++++++--------- app/views/projects/show.html.haml | 60 +--------------------- 4 files changed, 42 insertions(+), 83 deletions(-) create mode 100644 app/views/projects/_stat_anchor_list.html.haml create mode 100644 app/views/projects/_stat_anchor_list_item.html.haml (limited to 'app/views') diff --git a/app/views/projects/_stat_anchor_list.html.haml b/app/views/projects/_stat_anchor_list.html.haml new file mode 100644 index 00000000000..9ca51f8d68c --- /dev/null +++ b/app/views/projects/_stat_anchor_list.html.haml @@ -0,0 +1,5 @@ +- anchors = local_assigns.fetch(:anchors, []) + +- if anchors.size > 0 + %ul.nav + = render partial: 'stat_anchor_list_item', collection: anchors, as: :anchor diff --git a/app/views/projects/_stat_anchor_list_item.html.haml b/app/views/projects/_stat_anchor_list_item.html.haml new file mode 100644 index 00000000000..404dd24599f --- /dev/null +++ b/app/views/projects/_stat_anchor_list_item.html.haml @@ -0,0 +1,7 @@ +%li + - if anchor[:link] + = link_to anchor[:link], class: anchor[:enabled] ? 'stat-link' : "btn btn-#{anchor[:class_modifier] || 'missing'}" do + = anchor[:label] + - else + %span.stat-text + = anchor[:label] diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index ab225796b12..01fb9dab313 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -5,38 +5,41 @@ = render "home_panel" -.row-content-block.second-block.center - %h4 - The repository for this project is empty +.project-empty-note-panel + %div{ class: [container_class, ("limit-container-width-sm" unless fluid_layout)] } + .prepend-top-20 + %h4 + = _('The repository for this project is empty') + + - if can?(current_user, :push_code, @project) + %p + - link_to_cli = link_to _('command line instructions'), '#repo-command-line-instructions' + = _('If you already have files you can push them using the %{link_to_cli} below.').html_safe % { link_to_cli: link_to_cli } + %p + %em + - link_to_protected_branches = link_to _('Learn more about protected branches'), help_page_path('user/project/protected_branches') + = _('Note that the master branch is automatically protected. %{link_to_protected_branches}').html_safe % { link_to_protected_branches: link_to_protected_branches } - - if can?(current_user, :push_code, @project) - %p - If you already have files you can push them using command line instructions below. - %p - Otherwise you can start with adding a - = succeed ',' do - = link_to "README", add_special_file_path(@project, file_name: 'README.md') - a - = succeed ',' do - = link_to "LICENSE", add_special_file_path(@project, file_name: 'LICENSE') - or a - = link_to '.gitignore', add_special_file_path(@project, file_name: '.gitignore') - to this project. - %p - You will need to be owner or have the master permission level for the initial push, as the master branch is automatically protected. + %hr + %p + - link_to_auto_devops_settings = link_to(s_('AutoDevOps|enable Auto DevOps (Beta)'), project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings')) + - link_to_add_kubernetes_cluster = link_to(s_('AutoDevOps|add a Kubernetes cluster'), project_clusters_path(@project)) + = s_('AutoDevOps|You can automatically build and test your application if you %{link_to_auto_devops_settings} for this project. You can automatically deploy it as well, if you %{link_to_add_kubernetes_cluster}.').html_safe % { link_to_auto_devops_settings: link_to_auto_devops_settings, link_to_add_kubernetes_cluster: link_to_add_kubernetes_cluster } - - if show_auto_devops_callout?(@project) + %hr %p - - link = link_to(s_('AutoDevOps|Auto DevOps (Beta)'), project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings')) - = s_('AutoDevOps|You can activate %{link_to_settings} for this project.').html_safe % { link_to_settings: link } - %p= s_('AutoDevOps|It will automatically build, test, and deploy your application based on a predefined CI/CD configuration.') - %p= link_to _('New file'), project_new_blob_path(@project, @project.default_branch || 'master'), class: 'btn btn-new' + = _('Otherwise it is recommended you start with one of the options below.') + .prepend-top-20 + +%nav.project-stats{ class: container_class } + = render 'stat_anchor_list', anchors: empty_project_stat_anchor_items(@project) + = render 'stat_anchor_list', anchors: empty_project_stat_button_items(@project) - if can?(current_user, :push_code, @project) - %div{ class: container_class } + %div{ class: [container_class, ("limit-container-width-sm" unless fluid_layout)] } .prepend-top-20 .empty_wrapper - %h3.page-title-empty + %h3#repo-command-line-instructions.page-title-empty Command line instructions .git-empty %fieldset diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 888d820b04e..3d23b19b815 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -14,65 +14,9 @@ - if can?(current_user, :download_code, @project) %nav.project-stats{ class: container_class } - %ul.nav - %li - = link_to project_tree_path(@project) do - #{_('Files')} (#{storage_counter(@project.statistics.total_repository_size)}) - %li - = link_to project_commits_path(@project, current_ref) do - #{n_('Commit', 'Commits', @project.statistics.commit_count)} (#{number_with_delimiter(@project.statistics.commit_count)}) - %li - = link_to project_branches_path(@project) do - #{n_('Branch', 'Branches', @repository.branch_count)} (#{number_with_delimiter(@repository.branch_count)}) - %li - = link_to project_tags_path(@project) do - #{n_('Tag', 'Tags', @repository.tag_count)} (#{number_with_delimiter(@repository.tag_count)}) + = render 'stat_anchor_list', anchors: project_stat_anchor_items(@project) + = render 'stat_anchor_list', anchors: project_stat_button_items(@project) - - if @repository.readme - %li - = link_to _('Readme'), - default_project_view != 'readme' ? readme_path(@project) : '#readme' - - - if @repository.changelog - %li - = link_to _('Changelog'), changelog_path(@project) - - - if @repository.license_blob - %li - = link_to license_short_name(@project), license_path(@project) - - - if @repository.contribution_guide - %li - = link_to _('Contribution guide'), contribution_guide_path(@project) - - - if @repository.gitlab_ci_yml - %li - = link_to _('CI/CD configuration'), ci_configuration_path(@project) - - - if current_user && can_push_branch?(@project, @project.default_branch) - - unless @repository.changelog - %li.missing - = link_to add_special_file_path(@project, file_name: 'CHANGELOG') do - #{ _('Add Changelog') } - - unless @repository.license_blob - %li.missing - = link_to add_special_file_path(@project, file_name: 'LICENSE') do - #{ _('Add License') } - - unless @repository.contribution_guide - %li.missing - = link_to add_special_file_path(@project, file_name: 'CONTRIBUTING.md', commit_message: 'Add contribution guide') do - #{ _('Add Contribution guide') } - - unless @repository.gitlab_ci_yml - %li.missing - = link_to add_special_file_path(@project, file_name: '.gitlab-ci.yml') do - #{ _('Set up CI/CD') } - - if koding_enabled? && @repository.koding_yml.blank? - %li.missing - = link_to _('Set up Koding'), add_koding_stack_path(@project) - - if @repository.gitlab_ci_yml.blank? && @project.deployment_platform.present? - %li.missing - = link_to add_special_file_path(@project, file_name: '.gitlab-ci.yml', commit_message: 'Set up auto deploy', branch_name: 'auto-deploy', context: 'autodeploy') do - #{ _('Set up auto deploy') } %div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } - if @project.archived? -- cgit v1.2.1 From 93de4ebd9efe49d9cbf7678d77b2a1574f5b4e91 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Fri, 16 Feb 2018 13:59:22 -0600 Subject: Re-add common_vue --- app/views/projects/merge_requests/show.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/views') diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index b0fa6c2bd7b..e29f21b3bec 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -4,6 +4,8 @@ - page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests" - page_description @merge_request.description - page_card_attributes @merge_request.card_attributes +- content_for :page_specific_javascripts do + = webpack_bundle_tag('common_vue') .merge-request{ data: { mr_action: j(params[:tab].presence || 'show'), url: merge_request_path(@merge_request, format: :json), project_path: project_path(@merge_request.project) } } = render "projects/merge_requests/mr_title" -- cgit v1.2.1 From c2440a9b8c7a4eec9dffeaae4b10d50cff907e6a Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 20 Feb 2018 04:10:26 +1030 Subject: 35418 - remove avatar underline 35418 - update changelog --- app/views/shared/milestones/_issuable.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/shared/milestones/_issuable.html.haml b/app/views/shared/milestones/_issuable.html.haml index 479b7270b28..129f6ab604e 100644 --- a/app/views/shared/milestones/_issuable.html.haml +++ b/app/views/shared/milestones/_issuable.html.haml @@ -17,7 +17,7 @@ = confidential_icon(issuable) = link_to issuable.title, issuable_url_args, title: issuable.title .issuable-detail - = link_to [namespace, project, issuable] do + = link_to [namespace, project, issuable], class: 'issue-link' do %span.issuable-number= issuable.to_reference - labels.each do |label| -- cgit v1.2.1 From bb9e7a3f2cf80c09b64156988abb9ffba1de6d2c Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Fri, 16 Feb 2018 12:07:04 +0000 Subject: CE port of changes made to the pipeline bundle in EE - Fixes typos and adds i18n Backport common class name for the tab content Backport more changes --- app/views/projects/pipelines/_with_tabs.html.haml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index 5de17977d5a..852143ecb2a 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -3,16 +3,16 @@ .tabs-holder %ul.pipelines-tabs.nav-links.no-top.no-bottom.mobile-separator %li.js-pipeline-tab-link - = link_to project_pipeline_path(@project, @pipeline), data: { target: 'div#js-tab-pipeline', action: 'pipelines', toggle: 'tab' }, class: 'pipeline-tab' do - Pipeline + = link_to project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-pipeline', action: 'pipelines', toggle: 'tab' }, class: 'pipeline-tab' do + = _("Pipeline") %li.js-builds-tab-link - = link_to builds_project_pipeline_path(@project, @pipeline), data: {target: 'div#js-tab-builds', action: 'builds', toggle: 'tab' }, class: 'builds-tab' do - Jobs + = link_to builds_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-builds', action: 'builds', toggle: 'tab' }, class: 'builds-tab' do + = _("Jobs") %span.badge.js-builds-counter= pipeline.total_size - if failed_builds.present? %li.js-failures-tab-link - = link_to failures_project_pipeline_path(@project, @pipeline), data: {target: 'div#js-tab-failures', action: 'failures', toggle: 'tab' }, class: 'failures-tab' do - Failed Jobs + = link_to failures_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-failures', action: 'failures', toggle: 'tab' }, class: 'failures-tab' do + = _("Failed Jobs") %span.badge.js-failures-counter= failed_builds.count .tab-content -- cgit v1.2.1 From ccc858a5dfdb446d9648db2449d3ee3ef7a2be59 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 20 Feb 2018 09:36:57 -0600 Subject: Switch back to using a single partial See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16900#note_59334967 https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16900#note_59714883 --- app/views/projects/_stat_anchor_list.html.haml | 9 ++++++++- app/views/projects/_stat_anchor_list_item.html.haml | 7 ------- 2 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 app/views/projects/_stat_anchor_list_item.html.haml (limited to 'app/views') diff --git a/app/views/projects/_stat_anchor_list.html.haml b/app/views/projects/_stat_anchor_list.html.haml index 9ca51f8d68c..1f237c645bc 100644 --- a/app/views/projects/_stat_anchor_list.html.haml +++ b/app/views/projects/_stat_anchor_list.html.haml @@ -2,4 +2,11 @@ - if anchors.size > 0 %ul.nav - = render partial: 'stat_anchor_list_item', collection: anchors, as: :anchor + - anchors.each do |anchor| + %li + - if anchor[:link] + = link_to anchor[:link], class: anchor[:enabled] ? 'stat-link' : "btn btn-#{anchor[:class_modifier] || 'missing'}" do + = anchor[:label] + - else + %span.stat-text + = anchor[:label] diff --git a/app/views/projects/_stat_anchor_list_item.html.haml b/app/views/projects/_stat_anchor_list_item.html.haml deleted file mode 100644 index 404dd24599f..00000000000 --- a/app/views/projects/_stat_anchor_list_item.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -%li - - if anchor[:link] - = link_to anchor[:link], class: anchor[:enabled] ? 'stat-link' : "btn btn-#{anchor[:class_modifier] || 'missing'}" do - = anchor[:label] - - else - %span.stat-text - = anchor[:label] -- cgit v1.2.1 From e0e3f1c2750b6db9343d530d00b096bcb1a57677 Mon Sep 17 00:00:00 2001 From: Oswaldo Ferreira Date: Tue, 20 Feb 2018 11:56:36 -0300 Subject: Move button list logic to project presenter --- app/views/projects/_readme.html.haml | 2 +- app/views/projects/buttons/_koding.html.haml | 2 +- app/views/projects/empty.html.haml | 5 +++-- app/views/projects/show.html.haml | 8 +++++--- app/views/shared/issuable/_form.html.haml | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/_readme.html.haml b/app/views/projects/_readme.html.haml index aebdfbc8218..705338c083e 100644 --- a/app/views/projects/_readme.html.haml +++ b/app/views/projects/_readme.html.haml @@ -20,4 +20,4 @@ distributed with computer software, forming part of its documentation. GitLab will render it here instead of this message. %p - = link_to "Add Readme", add_special_file_path(@project, file_name: 'README.md'), class: 'btn btn-new' + = link_to "Add Readme", @project.add_readme_path, class: 'btn btn-new' diff --git a/app/views/projects/buttons/_koding.html.haml b/app/views/projects/buttons/_koding.html.haml index de2d61d4aa3..b9cec834ab4 100644 --- a/app/views/projects/buttons/_koding.html.haml +++ b/app/views/projects/buttons/_koding.html.haml @@ -1,3 +1,3 @@ -- if koding_enabled? && current_user && @repository.koding_yml && can_push_branch?(@project, @project.default_branch) +- if koding_enabled? && current_user && @repository.koding_yml && @project.user_can_push_to_branch?(current_user, @project.default_branch) = link_to koding_project_url(@project), class: 'btn project-action-button inline', target: '_blank', rel: 'noopener noreferrer' do _('Run in IDE (Koding)') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 01fb9dab313..b4f91f447f9 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -1,5 +1,6 @@ - @no_container = true - breadcrumb_title "Details" +- @project = @project.present(current_user: current_user) = render partial: 'flash_messages', locals: { project: @project } @@ -32,8 +33,8 @@ .prepend-top-20 %nav.project-stats{ class: container_class } - = render 'stat_anchor_list', anchors: empty_project_stat_anchor_items(@project) - = render 'stat_anchor_list', anchors: empty_project_stat_button_items(@project) + = render 'stat_anchor_list', anchors: @project.empty_project_stat_anchor_items + = render 'stat_anchor_list', anchors: @project.empty_project_stat_button_items - if can?(current_user, :push_code, @project) %div{ class: [container_class, ("limit-container-width-sm" unless fluid_layout)] } diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 3d23b19b815..385a3b490a4 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,6 +1,8 @@ +- project_stat_items_args = { show_auto_devops_callout: show_auto_devops_callout?(@project) } - @no_container = true - breadcrumb_title "Details" - @content_class = "limit-container-width" unless fluid_layout +- @project = @project.present(current_user: current_user) = content_for :meta_tags do = auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity") @@ -14,8 +16,8 @@ - if can?(current_user, :download_code, @project) %nav.project-stats{ class: container_class } - = render 'stat_anchor_list', anchors: project_stat_anchor_items(@project) - = render 'stat_anchor_list', anchors: project_stat_button_items(@project) + = render 'stat_anchor_list', anchors: @project.project_stat_anchor_items(project_stat_items_args) + = render 'stat_anchor_list', anchors: @project.project_stat_button_items(project_stat_items_args) %div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } @@ -25,7 +27,7 @@ = icon("exclamation-triangle fw") #{ _('Archived project! Repository is read-only') } - - view_path = default_project_view + - view_path = @project.default_project_view - if show_auto_devops_callout?(@project) = render 'shared/auto_devops_callout' diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 79021a08719..6dfabd7ba4c 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -69,7 +69,7 @@ - else = form.submit 'Save changes', class: 'btn btn-save' - - if !issuable.persisted? && !issuable.project.empty_repo? && (guide_url = contribution_guide_path(issuable.project)) + - if !issuable.persisted? && !issuable.project.empty_repo? && (guide_url = issuable.project.present.contribution_guide_path) .inline.prepend-top-10 Please review the %strong= link_to('contribution guidelines', guide_url) -- cgit v1.2.1 From c445ef539ef62b0eb425b8cf60e240597b697ec1 Mon Sep 17 00:00:00 2001 From: Oswaldo Ferreira Date: Tue, 20 Feb 2018 13:30:49 -0300 Subject: Move default_project_view tests to presenter --- app/views/projects/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 385a3b490a4..e6e6502c70f 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -27,7 +27,7 @@ = icon("exclamation-triangle fw") #{ _('Archived project! Repository is read-only') } - - view_path = @project.default_project_view + - view_path = @project.default_view - if show_auto_devops_callout?(@project) = render 'shared/auto_devops_callout' -- cgit v1.2.1 From 083003bf1eeef8347c8cd8ac40bdf8a0d7f5672e Mon Sep 17 00:00:00 2001 From: Oswaldo Ferreira Date: Tue, 20 Feb 2018 15:51:52 -0300 Subject: Improve methods naming --- app/views/projects/empty.html.haml | 4 ++-- app/views/projects/show.html.haml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index b4f91f447f9..34f3482d7c6 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -33,8 +33,8 @@ .prepend-top-20 %nav.project-stats{ class: container_class } - = render 'stat_anchor_list', anchors: @project.empty_project_stat_anchor_items - = render 'stat_anchor_list', anchors: @project.empty_project_stat_button_items + = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_anchors + = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons - if can?(current_user, :push_code, @project) %div{ class: [container_class, ("limit-container-width-sm" unless fluid_layout)] } diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index e6e6502c70f..9b2045f396b 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,8 +1,8 @@ -- project_stat_items_args = { show_auto_devops_callout: show_auto_devops_callout?(@project) } - @no_container = true - breadcrumb_title "Details" - @content_class = "limit-container-width" unless fluid_layout - @project = @project.present(current_user: current_user) +- show_auto_devops_callout = show_auto_devops_callout?(@project) = content_for :meta_tags do = auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity") @@ -16,8 +16,8 @@ - if can?(current_user, :download_code, @project) %nav.project-stats{ class: container_class } - = render 'stat_anchor_list', anchors: @project.project_stat_anchor_items(project_stat_items_args) - = render 'stat_anchor_list', anchors: @project.project_stat_button_items(project_stat_items_args) + = render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout) + = render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout) %div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } -- cgit v1.2.1 From d714073d62860bdd80f861baa6882f54d5c57e5f Mon Sep 17 00:00:00 2001 From: Oswaldo Ferreira Date: Tue, 20 Feb 2018 16:15:01 -0300 Subject: Use OpenStruct instead Hash for statistics buttons --- app/views/projects/_stat_anchor_list.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/_stat_anchor_list.html.haml b/app/views/projects/_stat_anchor_list.html.haml index 1f237c645bc..055d484cf49 100644 --- a/app/views/projects/_stat_anchor_list.html.haml +++ b/app/views/projects/_stat_anchor_list.html.haml @@ -4,9 +4,9 @@ %ul.nav - anchors.each do |anchor| %li - - if anchor[:link] - = link_to anchor[:link], class: anchor[:enabled] ? 'stat-link' : "btn btn-#{anchor[:class_modifier] || 'missing'}" do - = anchor[:label] + - if anchor.link + = link_to anchor.link, class: anchor.enabled ? 'stat-link' : "btn btn-#{anchor.class_modifier || 'missing'}" do + = anchor.label - else %span.stat-text - = anchor[:label] + = anchor.label -- cgit v1.2.1 From b48f7ec3b18534e6376103c348b1f3c0ad6b14a7 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Tue, 20 Feb 2018 20:01:18 +0000 Subject: Remove "notes" bundle from webpack config --- app/views/projects/issues/show.html.haml | 4 ---- 1 file changed, 4 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index b9dd4c27e63..91f68d8c419 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -5,10 +5,6 @@ - page_description @issue.description - page_card_attributes @issue.card_attributes -- content_for :page_specific_javascripts do - = webpack_bundle_tag 'common_vue' - = webpack_bundle_tag 'notes' - - can_update_issue = can?(current_user, :update_issue, @issue) - can_report_spam = @issue.submittable_as_spam_by?(current_user) -- cgit v1.2.1 From 35c8fd5586ac4fe9fb192974bcba519bfc1eb964 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Tue, 20 Feb 2018 22:20:48 +0000 Subject: Update to jQuery 3. --- app/views/projects/buttons/_star.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/buttons/_star.html.haml b/app/views/projects/buttons/_star.html.haml index 0a54c736761..d8b4266143e 100644 --- a/app/views/projects/buttons/_star.html.haml +++ b/app/views/projects/buttons/_star.html.haml @@ -1,5 +1,5 @@ - if current_user - = link_to toggle_star_project_path(@project), { class: 'btn star-btn toggle-star', method: :post, remote: true } do + %button.btn.btn-default.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } } - if current_user.starred?(@project) = sprite_icon('star') %span.starred= _('Unstar') -- cgit v1.2.1 From b8b913b0fc0790ab4c5824f6e717a24c4d1d28d8 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Wed, 21 Feb 2018 11:30:10 +0100 Subject: Add more info about data collected when version check is enabled --- app/views/admin/application_settings/_form.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index 60f12030f98..938185b6eba 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -647,8 +647,11 @@ = f.label :version_check_enabled do = f.check_box :version_check_enabled Version check enabled + = link_to icon('question-circle'), help_page_path("user/admin_area/settings/usage_statistics", anchor: "version-check") .help-block - Let GitLab inform you when an update is available. + Let GitLab inform you when an update is available. When + enabled, GitLab Inc. will collect info about your hostname + and version. .form-group .col-sm-offset-2.col-sm-10 - can_be_configured = @application_setting.usage_ping_can_be_configured? -- cgit v1.2.1 From 1fda2c838ec1aca0f9446683c3c741f9995b85a8 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 21 Feb 2018 10:22:38 -0600 Subject: Link "add a Kubernetes cluster" to new cluster page See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16900#note_59936315 --- app/views/projects/empty.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 34f3482d7c6..31a1e543ffa 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -24,7 +24,7 @@ %hr %p - link_to_auto_devops_settings = link_to(s_('AutoDevOps|enable Auto DevOps (Beta)'), project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings')) - - link_to_add_kubernetes_cluster = link_to(s_('AutoDevOps|add a Kubernetes cluster'), project_clusters_path(@project)) + - link_to_add_kubernetes_cluster = link_to(s_('AutoDevOps|add a Kubernetes cluster'), new_project_cluster_path(@project)) = s_('AutoDevOps|You can automatically build and test your application if you %{link_to_auto_devops_settings} for this project. You can automatically deploy it as well, if you %{link_to_add_kubernetes_cluster}.').html_safe % { link_to_auto_devops_settings: link_to_auto_devops_settings, link_to_add_kubernetes_cluster: link_to_add_kubernetes_cluster } %hr -- cgit v1.2.1 From 6dcadfc900ad309546b89c9c958b7a5c78931595 Mon Sep 17 00:00:00 2001 From: Victor Wu Date: Wed, 21 Feb 2018 16:54:56 +0000 Subject: Revert "Merge branch 'tc-info-version-check' into 'master'" This reverts merge request !17257 --- app/views/admin/application_settings/_form.html.haml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index 938185b6eba..60f12030f98 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -647,11 +647,8 @@ = f.label :version_check_enabled do = f.check_box :version_check_enabled Version check enabled - = link_to icon('question-circle'), help_page_path("user/admin_area/settings/usage_statistics", anchor: "version-check") .help-block - Let GitLab inform you when an update is available. When - enabled, GitLab Inc. will collect info about your hostname - and version. + Let GitLab inform you when an update is available. .form-group .col-sm-offset-2.col-sm-10 - can_be_configured = @application_setting.usage_ping_can_be_configured? -- cgit v1.2.1 From 99b96a7b5f5615021bb023e8c8ef4d8827eb9cef Mon Sep 17 00:00:00 2001 From: Riccardo Padovani Date: Wed, 21 Feb 2018 17:20:56 +0000 Subject: #28481: Display time tracking totals on milestone page --- app/views/shared/milestones/_sidebar.html.haml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'app/views') diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml index 4f51455c26e..cd4188daf5b 100644 --- a/app/views/shared/milestones/_sidebar.html.haml +++ b/app/views/shared/milestones/_sidebar.html.haml @@ -1,5 +1,7 @@ - affix_offset = local_assigns.fetch(:affix_offset, "50") - project = local_assigns[:project] +- content_for :page_specific_javascripts do + = page_specific_javascript_bundle_tag('common_vue') %aside.right-sidebar.js-right-sidebar{ data: { "offset-top" => affix_offset, "spy" => "affix", "always-show-toggle" => true }, class: sidebar_gutter_collapsed_class, 'aria-live' => 'polite' } .issuable-sidebar.milestone-sidebar @@ -85,21 +87,12 @@ Closed: = milestone.issues_visible_to_user(current_user).closed.count - .block.time_spent - .sidebar-collapsed-icon - = custom_icon('icon_hourglass') - %span.collapsed-milestone-total-time-spent - - if milestone.human_total_issue_time_spent - = milestone.human_total_issue_time_spent - - else - = _("None") - .title.hide-collapsed - = _("Total issue time spent") - .value.hide-collapsed - - if milestone.human_total_issue_time_spent - %span.bold= milestone.human_total_issue_time_spent - - else - %span.no-value= _("No time spent") + .block + #issuable-time-tracker{ data: { time_estimate: @milestone.total_issue_time_estimate, time_spent: @milestone.total_issue_time_spent, human_time_estimate: @milestone.human_total_issue_time_estimate, human_time_spent: @milestone.human_total_issue_time_spent } } + // Fallback while content is loading + .title.hide-collapsed + = _('Time tracking') + = icon('spinner spin') .block.merge-requests .sidebar-collapsed-icon -- cgit v1.2.1 From bd8290d93e4a0669a78c23cecdd1f5d2164d19cf Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Wed, 21 Feb 2018 20:22:56 +0000 Subject: Rest of Dispatcher Refactor --- app/views/groups/issues.html.haml | 1 - app/views/groups/merge_requests.html.haml | 1 - app/views/help/index.html.haml | 2 -- app/views/help/show.html.haml | 2 -- app/views/import/gitlab_projects/new.html.haml | 2 -- app/views/profiles/accounts/show.html.haml | 3 --- app/views/projects/blob/_upload.html.haml | 2 +- app/views/projects/blob/edit.html.haml | 1 - app/views/projects/blob/new.html.haml | 1 - app/views/projects/blob/show.html.haml | 4 ---- app/views/projects/merge_requests/index.html.haml | 1 - app/views/shared/boards/_show.html.haml | 1 - 12 files changed, 1 insertion(+), 20 deletions(-) (limited to 'app/views') diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index 00909982d59..f2ae7c52031 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -5,7 +5,6 @@ - content_for :page_specific_javascripts do = webpack_bundle_tag 'common_vue' - = webpack_bundle_tag 'filtered_search' - if group_issues_exists .top-area diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml index 694292aa7c1..046b92bd9fb 100644 --- a/app/views/groups/merge_requests.html.haml +++ b/app/views/groups/merge_requests.html.haml @@ -2,7 +2,6 @@ - content_for :page_specific_javascripts do = webpack_bundle_tag 'common_vue' - = webpack_bundle_tag 'filtered_search' - if @group_merge_requests.empty? = render 'shared/empty_states/merge_requests', project_select_button: true diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index 63811ea1c81..bf2725dc328 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -1,5 +1,3 @@ -= webpack_bundle_tag 'docs' - %div - if Gitlab::CurrentSettings.help_page_text.present? = markdown_field(Gitlab::CurrentSettings.current_application_settings, :help_page_text) diff --git a/app/views/help/show.html.haml b/app/views/help/show.html.haml index d6789baea28..c07c148a12a 100644 --- a/app/views/help/show.html.haml +++ b/app/views/help/show.html.haml @@ -1,5 +1,3 @@ -- content_for :page_specific_javascripts do - = webpack_bundle_tag 'help' - page_title @path.split("/").reverse.map(&:humanize) .documentation.wiki.prepend-top-default = markdown @markdown diff --git a/app/views/import/gitlab_projects/new.html.haml b/app/views/import/gitlab_projects/new.html.haml index 5d68e1e2156..df5841d1911 100644 --- a/app/views/import/gitlab_projects/new.html.haml +++ b/app/views/import/gitlab_projects/new.html.haml @@ -1,7 +1,5 @@ - page_title "GitLab Import" - header_title "Projects", root_path -- content_for :page_specific_javascripts do - = webpack_bundle_tag 'project_import_gl' %h3.page-title = icon('gitlab') diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index 79e197ad08b..0f849f6f8b7 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -102,6 +102,3 @@ %p = s_("Profiles|You don't have access to delete this user.") .append-bottom-default - -- content_for :page_specific_javascripts do - = webpack_bundle_tag('account') diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml index 16c56ea604a..b3afd16f900 100644 --- a/app/views/projects/blob/_upload.html.haml +++ b/app/views/projects/blob/_upload.html.haml @@ -2,7 +2,7 @@ .modal-dialog.modal-lg .modal-content .modal-header - %a.close{ href: "#", "data-dismiss" => "modal" } × + %a.close{ href: "#", "data-dismiss" => "modal" } × %h3.page-title= title .modal-body = form_tag form_path, method: method, class: 'js-quick-submit js-upload-blob-form form-horizontal', data: { method: method } do diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index 60bd1c2528a..9d90251ab66 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -3,7 +3,6 @@ - page_title "Edit", @blob.path, @ref - content_for :page_specific_javascripts do = page_specific_javascript_tag('lib/ace.js') - = webpack_bundle_tag('blob') %div{ class: container_class } - if @conflict diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 4e4288390f5..fa091d8f6ef 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -2,7 +2,6 @@ - page_title "New File", @path.presence, @ref - content_for :page_specific_javascripts do = page_specific_javascript_tag('lib/ace.js') - = webpack_bundle_tag('blob') .editor-title-row %h3.page-title.blob-new-page-title New file diff --git a/app/views/projects/blob/show.html.haml b/app/views/projects/blob/show.html.haml index 2ed454131af..efb8175398b 100644 --- a/app/views/projects/blob/show.html.haml +++ b/app/views/projects/blob/show.html.haml @@ -3,10 +3,6 @@ - page_title @blob.path, @ref -- content_for :page_specific_javascripts do - = webpack_bundle_tag 'blob' - - %div{ class: container_class } = render 'projects/last_push' diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml index 640d2791dc1..720ba236434 100644 --- a/app/views/projects/merge_requests/index.html.haml +++ b/app/views/projects/merge_requests/index.html.haml @@ -8,7 +8,6 @@ - content_for :page_specific_javascripts do = webpack_bundle_tag 'common_vue' - = webpack_bundle_tag 'filtered_search' %div{ class: container_class } = render 'projects/last_push' diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml index ee8ad8e3999..a10fc42b82d 100644 --- a/app/views/shared/boards/_show.html.haml +++ b/app/views/shared/boards/_show.html.haml @@ -6,7 +6,6 @@ - content_for :page_specific_javascripts do = webpack_bundle_tag 'common_vue' - = webpack_bundle_tag 'filtered_search' = webpack_bundle_tag 'boards' %script#js-board-template{ type: "text/x-template" }= render "shared/boards/components/board" -- cgit v1.2.1 From 21c16b900be62bb7074753517bacf5b59f971d2c Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Thu, 22 Feb 2018 09:17:49 -0600 Subject: Remove indent and reduce bloat with link_to_if See - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16900#note_60163789 - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16900#note_60164324 --- app/views/projects/_stat_anchor_list.html.haml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/_stat_anchor_list.html.haml b/app/views/projects/_stat_anchor_list.html.haml index 055d484cf49..a115b65938b 100644 --- a/app/views/projects/_stat_anchor_list.html.haml +++ b/app/views/projects/_stat_anchor_list.html.haml @@ -1,12 +1,8 @@ - anchors = local_assigns.fetch(:anchors, []) -- if anchors.size > 0 - %ul.nav - - anchors.each do |anchor| - %li - - if anchor.link - = link_to anchor.link, class: anchor.enabled ? 'stat-link' : "btn btn-#{anchor.class_modifier || 'missing'}" do - = anchor.label - - else - %span.stat-text - = anchor.label +- return unless anchors.any? +%ul.nav + - anchors.each do |anchor| + %li + = link_to_if anchor.link, anchor.label, anchor.link, class: anchor.enabled ? 'stat-link' : "btn btn-#{anchor.class_modifier || 'missing'}" do + %span.stat-text= anchor.label -- cgit v1.2.1 From a8c523d98b7dc18eae973b70e7743e8551dc09fd Mon Sep 17 00:00:00 2001 From: Oswaldo Ferreira Date: Thu, 22 Feb 2018 13:53:35 -0300 Subject: Move project presenter instance creation to controller --- app/views/projects/empty.html.haml | 1 - app/views/projects/show.html.haml | 1 - 2 files changed, 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 31a1e543ffa..08282c820d5 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -1,6 +1,5 @@ - @no_container = true - breadcrumb_title "Details" -- @project = @project.present(current_user: current_user) = render partial: 'flash_messages', locals: { project: @project } diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 9b2045f396b..fa281327eb7 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,7 +1,6 @@ - @no_container = true - breadcrumb_title "Details" - @content_class = "limit-container-width" unless fluid_layout -- @project = @project.present(current_user: current_user) - show_auto_devops_callout = show_auto_devops_callout?(@project) = content_for :meta_tags do -- cgit v1.2.1 From 44d33db12a93f796769c1f470c922f1daafea971 Mon Sep 17 00:00:00 2001 From: Oswaldo Ferreira Date: Thu, 22 Feb 2018 13:57:58 -0300 Subject: Unify use of can_current_user_push_code Presenter --- app/views/projects/buttons/_koding.html.haml | 2 +- app/views/projects/empty.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/buttons/_koding.html.haml b/app/views/projects/buttons/_koding.html.haml index b9cec834ab4..e665ca61da8 100644 --- a/app/views/projects/buttons/_koding.html.haml +++ b/app/views/projects/buttons/_koding.html.haml @@ -1,3 +1,3 @@ -- if koding_enabled? && current_user && @repository.koding_yml && @project.user_can_push_to_branch?(current_user, @project.default_branch) +- if koding_enabled? && current_user && @repository.koding_yml && @project.can_current_user_push_code? = link_to koding_project_url(@project), class: 'btn project-action-button inline', target: '_blank', rel: 'noopener noreferrer' do _('Run in IDE (Koding)') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 08282c820d5..8a36fada389 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -11,7 +11,7 @@ %h4 = _('The repository for this project is empty') - - if can?(current_user, :push_code, @project) + - if @project.can_current_user_push_code? %p - link_to_cli = link_to _('command line instructions'), '#repo-command-line-instructions' = _('If you already have files you can push them using the %{link_to_cli} below.').html_safe % { link_to_cli: link_to_cli } -- cgit v1.2.1 From 280e2c1ed546d686b86022b88137eb314de59485 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Thu, 22 Feb 2018 15:59:57 -0500 Subject: Remove bundle tag for ui help --- app/views/help/ui.html.haml | 2 -- 1 file changed, 2 deletions(-) (limited to 'app/views') diff --git a/app/views/help/ui.html.haml b/app/views/help/ui.html.haml index 1c4d67a8d2c..ce09b44fbb2 100644 --- a/app/views/help/ui.html.haml +++ b/app/views/help/ui.html.haml @@ -1,7 +1,5 @@ - page_title "UI Development Kit", "Help" - lorem = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed fermentum nisi sapien, non consequat lectus aliquam ultrices. Suspendisse sodales est euismod nunc condimentum, a consectetur diam ornare." -- content_for :page_specific_javascripts do - = webpack_bundle_tag('ui_development_kit') .gitlab-ui-dev-kit %h1 GitLab UI development kit -- cgit v1.2.1