From 5f39f9b30853291ec83df2383cd2e7863b72fb27 Mon Sep 17 00:00:00 2001 From: Stuart Nelson Date: Tue, 6 Feb 2018 19:09:59 +0100 Subject: Send email to recipients --- app/views/notify/issue_due_email.html.haml | 14 ++++++++++++++ app/views/notify/issue_due_email.text.erb | 8 ++++++++ 2 files changed, 22 insertions(+) create mode 100644 app/views/notify/issue_due_email.html.haml create mode 100644 app/views/notify/issue_due_email.text.erb (limited to 'app/views') diff --git a/app/views/notify/issue_due_email.html.haml b/app/views/notify/issue_due_email.html.haml new file mode 100644 index 00000000000..30ba53cf801 --- /dev/null +++ b/app/views/notify/issue_due_email.html.haml @@ -0,0 +1,14 @@ +- if Gitlab::CurrentSettings.email_author_in_body + %p.details + #{link_to @issue.author_name, user_url(@issue.author)} updated the issue's due date: + +- if @issue.assignees.any? + %p + Assignee: #{@issue.assignee_list} + +%p + This Issue has a new due date: #{ @issue.due_date } + +- if @issue.description + %div + = markdown(@issue.description, pipeline: :email, author: @issue.author) diff --git a/app/views/notify/issue_due_email.text.erb b/app/views/notify/issue_due_email.text.erb new file mode 100644 index 00000000000..1ac98bd9d93 --- /dev/null +++ b/app/views/notify/issue_due_email.text.erb @@ -0,0 +1,8 @@ +An Issue had its due date updated. + +Issue <%= @issue.iid %>: <%= url_for(project_issue_url(@issue.project, @issue)) %> +Author: <%= @issue.author_name %> +Assignee: <%= @issue.assignee_list %> +New Due Date: <%= @issue.due_date %> + +<%= @issue.description %> -- cgit v1.2.3 From 99fde7da158971b9dbed5dd06aadb9ef89339fab Mon Sep 17 00:00:00 2001 From: Stuart Nelson Date: Sat, 10 Feb 2018 14:38:45 +0100 Subject: Update email body (html+text) --- app/views/notify/issue_due_email.html.haml | 2 +- app/views/notify/issue_due_email.text.erb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/notify/issue_due_email.html.haml b/app/views/notify/issue_due_email.html.haml index 30ba53cf801..a59a55516d3 100644 --- a/app/views/notify/issue_due_email.html.haml +++ b/app/views/notify/issue_due_email.html.haml @@ -7,7 +7,7 @@ Assignee: #{@issue.assignee_list} %p - This Issue has a new due date: #{ @issue.due_date } + This issue is due on: #{ @issue.due_date } - if @issue.description %div diff --git a/app/views/notify/issue_due_email.text.erb b/app/views/notify/issue_due_email.text.erb index 1ac98bd9d93..3c7a57a8a2e 100644 --- a/app/views/notify/issue_due_email.text.erb +++ b/app/views/notify/issue_due_email.text.erb @@ -1,8 +1,7 @@ -An Issue had its due date updated. +The following issue is due on <%= @issue.due_date %>: Issue <%= @issue.iid %>: <%= url_for(project_issue_url(@issue.project, @issue)) %> Author: <%= @issue.author_name %> Assignee: <%= @issue.assignee_list %> -New Due Date: <%= @issue.due_date %> <%= @issue.description %> -- cgit v1.2.3 From a11b4ee683bb20a8795464e0b033c21f22bc7975 Mon Sep 17 00:00:00 2001 From: Stuart Nelson Date: Wed, 14 Feb 2018 09:30:05 +0100 Subject: Update html email --- app/views/notify/issue_due_email.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/notify/issue_due_email.html.haml b/app/views/notify/issue_due_email.html.haml index a59a55516d3..c552c612098 100644 --- a/app/views/notify/issue_due_email.html.haml +++ b/app/views/notify/issue_due_email.html.haml @@ -1,13 +1,13 @@ - if Gitlab::CurrentSettings.email_author_in_body %p.details - #{link_to @issue.author_name, user_url(@issue.author)} updated the issue's due date: + Issue created by #{link_to @issue.author_name, user_url(@issue.author)} is due: - if @issue.assignees.any? %p Assignee: #{@issue.assignee_list} %p - This issue is due on: #{ @issue.due_date } + This issue is due on: #{@issue.due_date} - if @issue.description %div -- cgit v1.2.3 From 5ab75649f3ea00b64cb63e7e5283100c6b70cfb5 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Fri, 30 Mar 2018 13:25:46 +0100 Subject: Only send issue due emails to participants and custom subscribers --- app/views/notify/issue_due_email.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/notify/issue_due_email.html.haml b/app/views/notify/issue_due_email.html.haml index c552c612098..600e183cfdf 100644 --- a/app/views/notify/issue_due_email.html.haml +++ b/app/views/notify/issue_due_email.html.haml @@ -1,6 +1,6 @@ - if Gitlab::CurrentSettings.email_author_in_body %p.details - Issue created by #{link_to @issue.author_name, user_url(@issue.author)} is due: + #{link_to @issue.author_name, user_url(@issue.author)}'s issue is due soon. - if @issue.assignees.any? %p -- cgit v1.2.3 From eddf3febd7e78a442a0b2fbd36d7b92ba769f4a5 Mon Sep 17 00:00:00 2001 From: blackst0ne Date: Sun, 8 Apr 2018 15:35:30 +1100 Subject: [Rails5] Add `safe_params` helper Rails 5.0 requires to explicitly permit attributes when building a URL using current `params` object. The `safe_params` helper allows developers to just call `safe_params.merge(...)` instead of manually adding `permit` to every call. https://github.com/rails/rails/pull/20868 --- app/views/dashboard/issues.atom.builder | 2 +- app/views/dashboard/issues.html.haml | 4 ++-- app/views/groups/issues.atom.builder | 2 +- app/views/groups/issues.html.haml | 2 +- app/views/projects/blob/_viewer.html.haml | 2 +- app/views/projects/diffs/_collapsed.html.haml | 2 +- app/views/projects/issues/_nav_btns.html.haml | 2 +- app/views/projects/issues/index.atom.builder | 2 +- app/views/projects/issues/index.html.haml | 2 +- app/views/projects/merge_requests/creations/_new_submit.html.haml | 8 ++++---- 10 files changed, 14 insertions(+), 14 deletions(-) (limited to 'app/views') diff --git a/app/views/dashboard/issues.atom.builder b/app/views/dashboard/issues.atom.builder index 70ec6bc6257..d7b6fb9a4a1 100644 --- a/app/views/dashboard/issues.atom.builder +++ b/app/views/dashboard/issues.atom.builder @@ -1,5 +1,5 @@ xml.title "#{current_user.name} issues" -xml.link href: url_for(params), rel: "self", type: "application/atom+xml" +xml.link href: url_for(safe_params), rel: "self", type: "application/atom+xml" xml.link href: issues_dashboard_url, rel: "alternate", type: "text/html" xml.id issues_dashboard_url xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any? diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index bb472b4c900..4bf04dadf01 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -2,12 +2,12 @@ - page_title _("Issues") - @breadcrumb_link = issues_dashboard_path(assignee_id: current_user.id) = content_for :meta_tags do - = auto_discovery_link_tag(:atom, params.merge(rss_url_options), title: "#{current_user.name} issues") + = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{current_user.name} issues") .top-area = render 'shared/issuable/nav', type: :issues, display_count: !@no_filters_set .nav-controls - = link_to params.merge(rss_url_options), class: 'btn has-tooltip', data: { container: 'body' }, title: 'Subscribe' do + = link_to safe_params.merge(rss_url_options), class: 'btn has-tooltip', data: { container: 'body' }, title: 'Subscribe' do = icon('rss') = render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", with_feature_enabled: 'issues', type: :issues diff --git a/app/views/groups/issues.atom.builder b/app/views/groups/issues.atom.builder index a239ea8caf0..2a385b661e5 100644 --- a/app/views/groups/issues.atom.builder +++ b/app/views/groups/issues.atom.builder @@ -1,5 +1,5 @@ xml.title "#{@group.name} issues" -xml.link href: url_for(params), rel: "self", type: "application/atom+xml" +xml.link href: url_for(safe_params), rel: "self", type: "application/atom+xml" xml.link href: issues_group_url, rel: "alternate", type: "text/html" xml.id issues_group_url xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any? diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index 36df03302e8..bbfbea4ac7a 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -1,6 +1,6 @@ - page_title "Issues" = content_for :meta_tags do - = auto_discovery_link_tag(:atom, params.merge(rss_url_options), title: "#{@group.name} issues") + = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@group.name} issues") - if group_issues_count(state: 'all').zero? = render 'shared/empty_states/issues', project_select_button: true diff --git a/app/views/projects/blob/_viewer.html.haml b/app/views/projects/blob/_viewer.html.haml index 3124443b4e4..8638c599136 100644 --- a/app/views/projects/blob/_viewer.html.haml +++ b/app/views/projects/blob/_viewer.html.haml @@ -3,7 +3,7 @@ - rich_type = viewer.type == :rich ? viewer.partial_name : nil - load_async = local_assigns.fetch(:load_async, viewer.load_async? && render_error.nil?) -- viewer_url = local_assigns.fetch(:viewer_url) { url_for(params.merge(viewer: viewer.type, format: :json)) } if load_async +- viewer_url = local_assigns.fetch(:viewer_url) { url_for(safe_params.merge(viewer: viewer.type, format: :json)) } if load_async .blob-viewer{ data: { type: viewer.type, rich_type: rich_type, url: viewer_url }, class: ('hidden' if hidden) } - if render_error = render 'projects/blob/render_error', viewer: viewer diff --git a/app/views/projects/diffs/_collapsed.html.haml b/app/views/projects/diffs/_collapsed.html.haml index 8772bd4705f..5762f4d86d7 100644 --- a/app/views/projects/diffs/_collapsed.html.haml +++ b/app/views/projects/diffs/_collapsed.html.haml @@ -1,5 +1,5 @@ - diff_file = viewer.diff_file -- url = url_for(params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path, file_identifier: diff_file.file_identifier)) +- url = url_for(safe_params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path, file_identifier: diff_file.file_identifier)) .nothing-here-block.diff-collapsed{ data: { diff_for_path: url } } This diff is collapsed. %a.click-to-expand Click to expand it. diff --git a/app/views/projects/issues/_nav_btns.html.haml b/app/views/projects/issues/_nav_btns.html.haml index 0d39edb7bfd..cbb2fd8693e 100644 --- a/app/views/projects/issues/_nav_btns.html.haml +++ b/app/views/projects/issues/_nav_btns.html.haml @@ -1,4 +1,4 @@ -= link_to params.merge(rss_url_options), class: 'btn btn-default append-right-10 has-tooltip', title: 'Subscribe' do += link_to safe_params.merge(rss_url_options), class: 'btn btn-default append-right-10 has-tooltip', title: 'Subscribe' do = icon('rss') - if @can_bulk_update = button_tag "Edit issues", class: "btn btn-default append-right-10 js-bulk-update-toggle" diff --git a/app/views/projects/issues/index.atom.builder b/app/views/projects/issues/index.atom.builder index 4029926f373..6330245954e 100644 --- a/app/views/projects/issues/index.atom.builder +++ b/app/views/projects/issues/index.atom.builder @@ -1,5 +1,5 @@ xml.title "#{@project.name} issues" -xml.link href: url_for(params), rel: "self", type: "application/atom+xml" +xml.link href: url_for(safe_params), rel: "self", type: "application/atom+xml" xml.link href: project_issues_url(@project), rel: "alternate", type: "text/html" xml.id project_issues_url(@project) xml.updated @issues.first.updated_at.xmlschema if @issues.reorder(nil).any? diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index c427a9eedc2..1e7737aeb97 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -5,7 +5,7 @@ - new_issue_email = @project.new_issuable_address(current_user, 'issue') = content_for :meta_tags do - = auto_discovery_link_tag(:atom, params.merge(rss_url_options), title: "#{@project.name} issues") + = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@project.name} issues") - if project_issues(@project).exists? %div{ class: (container_class) } diff --git a/app/views/projects/merge_requests/creations/_new_submit.html.haml b/app/views/projects/merge_requests/creations/_new_submit.html.haml index 376ac377562..68780cedeb1 100644 --- a/app/views/projects/merge_requests/creations/_new_submit.html.haml +++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml @@ -26,16 +26,16 @@ - else %ul.merge-request-tabs.nav-links.no-top.no-bottom %li.commits-tab.active - = link_to url_for(params), data: {target: 'div#commits', action: 'new', toggle: 'tab'} do + = link_to url_for(safe_params), data: {target: 'div#commits', action: 'new', toggle: 'tab'} do Commits %span.badge= @commits.size - if @pipelines.any? %li.builds-tab - = link_to url_for(params.merge(action: 'pipelines')), data: {target: 'div#pipelines', action: 'pipelines', toggle: 'tab'} do + = link_to url_for(safe_params.merge(action: 'pipelines')), data: {target: 'div#pipelines', action: 'pipelines', toggle: 'tab'} do Pipelines %span.badge= @pipelines.size %li.diffs-tab - = link_to url_for(params.merge(action: 'diffs')), data: {target: 'div#diffs', action: 'diffs', toggle: 'tab'} do + = link_to url_for(safe_params.merge(action: 'diffs')), data: {target: 'div#diffs', action: 'diffs', toggle: 'tab'} do Changes %span.badge= @merge_request.diff_size @@ -46,7 +46,7 @@ -# This tab is always loaded via AJAX - if @pipelines.any? #pipelines.pipelines.tab-pane - = render 'projects/merge_requests/pipelines', endpoint: url_for(params.merge(action: 'pipelines', format: :json)), disable_initialization: true + = render 'projects/merge_requests/pipelines', endpoint: url_for(safe_params.merge(action: 'pipelines', format: :json)), disable_initialization: true .mr-loading-status = spinner -- cgit v1.2.3 From 903f8e45ae24e20d9ecc03deb2de33f7f5bc775d Mon Sep 17 00:00:00 2001 From: Takuya Noguchi Date: Tue, 17 Apr 2018 08:08:45 +0900 Subject: Remove ahead/behind graphs on project branches on mobile --- app/views/projects/branches/_branch.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 71176acd12d..d0c01f95cb7 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -29,7 +29,7 @@ = s_('Branches|Cant find HEAD commit for this branch') - if branch.name != @repository.root_ref - .divergence-graph{ title: s_('%{number_commits_behind} commits behind %{default_branch}, %{number_commits_ahead} commits ahead') % { number_commits_behind: diverging_count_label(number_commits_behind), + .divergence-graph.hidden-xs{ title: s_('%{number_commits_behind} commits behind %{default_branch}, %{number_commits_ahead} commits ahead') % { number_commits_behind: diverging_count_label(number_commits_behind), default_branch: @repository.root_ref, number_commits_ahead: diverging_count_label(number_commits_ahead) } } .graph-side -- cgit v1.2.3 From 11108f0ff50769150a0a8d9c7fa89cfc0f54289a Mon Sep 17 00:00:00 2001 From: Lukas Eipert Date: Tue, 17 Apr 2018 14:23:41 +0200 Subject: fix regression in new merge request screen --- app/views/projects/merge_requests/creations/_new_compare.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/merge_requests/creations/_new_compare.html.haml b/app/views/projects/merge_requests/creations/_new_compare.html.haml index 9d5cebdda53..f81db9b4e28 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -3,7 +3,7 @@ = form_for [@project.namespace.becomes(Namespace), @project, @merge_request], url: project_new_merge_request_path(@project), method: :get, html: { class: "merge-request-form form-inline js-requires-input" } do |f| .hide.alert.alert-danger.mr-compare-errors - .merge-request-branches.js-merge-request-new-compare.row{ 'data-target-project-url': project_new_merge_request_update_branches_path(@source_project), 'data-source-branch-url': project_new_merge_request_branch_from_path(@source_project), 'data-target-branch-url': project_new_merge_request_branch_to_path(@source_project) } + .js-merge-request-new-compare.row{ 'data-target-project-url': project_new_merge_request_update_branches_path(@source_project), 'data-source-branch-url': project_new_merge_request_branch_from_path(@source_project), 'data-target-branch-url': project_new_merge_request_branch_to_path(@source_project) } .col-md-6 .panel.panel-default.panel-new-merge-request .panel-heading -- cgit v1.2.3 From fd4a08203448d5ade7471549fe17169fb19c6484 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Tue, 17 Apr 2018 12:44:22 +0100 Subject: Make issue due email more consistent with other mailers --- app/views/notify/issue_due_email.html.haml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/notify/issue_due_email.html.haml b/app/views/notify/issue_due_email.html.haml index 600e183cfdf..e81144b8fcb 100644 --- a/app/views/notify/issue_due_email.html.haml +++ b/app/views/notify/issue_due_email.html.haml @@ -1,13 +1,11 @@ -- if Gitlab::CurrentSettings.email_author_in_body - %p.details - #{link_to @issue.author_name, user_url(@issue.author)}'s issue is due soon. +%p.details + #{link_to @issue.author_name, user_url(@issue.author)}'s issue is due soon. - if @issue.assignees.any? %p Assignee: #{@issue.assignee_list} - %p - This issue is due on: #{@issue.due_date} + This issue is due on: #{@issue.due_date.to_s(:medium)} - if @issue.description %div -- cgit v1.2.3 From 931f6e6d5c95b037592a129abaa30a38db1ab53c Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sat, 10 Mar 2018 19:47:28 +0100 Subject: set proper signature marker in mails use rfc 3676 mail signature delimiters ("-- ") instead of the previous "---" one. closes #43617 Signed-off-by: Enrico Scholz --- app/views/layouts/mailer.text.erb | 2 +- app/views/layouts/notify.text.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/mailer.text.erb b/app/views/layouts/mailer.text.erb index 198f30a1dc4..8e20c4a4b2a 100644 --- a/app/views/layouts/mailer.text.erb +++ b/app/views/layouts/mailer.text.erb @@ -1,4 +1,4 @@ <%= yield -%> ---- +-- <%# signature marker %> You're receiving this email because of your account on <%= Gitlab.config.gitlab.host %>. diff --git a/app/views/layouts/notify.text.erb b/app/views/layouts/notify.text.erb index de48f548a1b..9dc490efa9a 100644 --- a/app/views/layouts/notify.text.erb +++ b/app/views/layouts/notify.text.erb @@ -1,6 +1,6 @@ <%= yield -%> ---- +-- <%# signature marker %> <% if @target_url -%> <% if @reply_by_email -%> <%= "Reply to this email directly or view it on GitLab: #{@target_url}" -%> -- cgit v1.2.3 From c352f695d7f27858fb011c60e4facfe9dbca6a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lu=C3=ADs?= Date: Wed, 18 Apr 2018 22:29:58 +0000 Subject: Resolve "View labels when editing labels in sidebar and board sidebar" --- app/views/shared/boards/components/sidebar/_labels.html.haml | 2 +- app/views/shared/issuable/_sidebar.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/shared/boards/components/sidebar/_labels.html.haml b/app/views/shared/boards/components/sidebar/_labels.html.haml index 87e6b52f46e..1c73534c642 100644 --- a/app/views/shared/boards/components/sidebar/_labels.html.haml +++ b/app/views/shared/boards/components/sidebar/_labels.html.haml @@ -4,7 +4,7 @@ - if can_admin_issue? = icon("spinner spin", class: "block-loading") = link_to "Edit", "#", class: "js-sidebar-dropdown-toggle edit-link pull-right" - .value.issuable-show-labels + .value.issuable-show-labels.dont-hide %span.no-value{ "v-if" => "issue.labels && issue.labels.length === 0" } None %a{ href: "#", diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index 975b9cb4729..aa883b9b1fa 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -96,7 +96,7 @@ = icon('spinner spin', class: 'hidden block-loading', 'aria-hidden': 'true') - if can_edit_issuable = link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right' - .value.issuable-show-labels.hide-collapsed{ class: ("has-labels" if selected_labels.any?) } + .value.issuable-show-labels.dont-hide.hide-collapsed{ class: ("has-labels" if selected_labels.any?) } - if selected_labels.any? - selected_labels.each do |label| = link_to_label(label, subject: issuable.project, type: issuable.to_ability_name) -- cgit v1.2.3 From 93780da67ceebac19033bb0c44483e3af2d38a18 Mon Sep 17 00:00:00 2001 From: Mayra Cabrera Date: Thu, 19 Apr 2018 07:20:53 +0000 Subject: Resolve "Show `failure_reason` in jobs view content section" --- app/views/projects/jobs/_sidebar.html.haml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/jobs/_sidebar.html.haml b/app/views/projects/jobs/_sidebar.html.haml index 0b57ebedebd..7f0bef5ede0 100644 --- a/app/views/projects/jobs/_sidebar.html.haml +++ b/app/views/projects/jobs/_sidebar.html.haml @@ -1,15 +1,8 @@ %aside.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar.js-right-sidebar{ data: { "offset-top" => "101", "spy" => "affix" } } .sidebar-container .blocks-container - .block - %strong.inline.prepend-top-8 - = @build.name - - if can?(current_user, :update_build, @build) && @build.retryable? - = link_to "Retry", retry_namespace_project_job_path(@project.namespace, @project, @build), class: 'js-retry-button pull-right btn btn-inverted-secondary btn-retry visible-md-block visible-lg-block', method: :post - %a.gutter-toggle.pull-right.visible-xs-block.visible-sm-block.js-sidebar-build-toggle{ href: "#", 'aria-label': 'Toggle Sidebar', role: 'button' } - = icon('angle-double-right') - #js-details-block-vue + #js-details-block-vue{ data: { can_user_retry: can?(current_user, :update_build, @build) && @build.retryable? } } - if can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?) .block -- cgit v1.2.3 From 49b85262c5a1944d7fdb50e43900a4adb13aba6c Mon Sep 17 00:00:00 2001 From: Dennis Tang Date: Thu, 19 Apr 2018 14:43:20 +0000 Subject: Resolve "Improve tooltips of collapsed sidebars" --- app/views/projects/issues/_issue.html.haml | 2 +- .../merge_requests/_merge_request.html.haml | 2 +- app/views/shared/issuable/_sidebar.html.haml | 11 ++++--- .../shared/issuable/_sidebar_assignees.html.haml | 2 +- app/views/shared/issuable/_sidebar_todo.html.haml | 6 ++-- .../form/_merge_request_assignee.html.haml | 2 +- app/views/shared/milestones/_sidebar.html.haml | 35 +++++++++++++--------- 7 files changed, 33 insertions(+), 27 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index 0c58dd60e2c..e27f5658e87 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -26,7 +26,7 @@ - if issue.milestone %span.issuable-milestone.hidden-xs   - = link_to project_issues_path(issue.project, milestone_title: issue.milestone.title), data: { html: 1, toggle: 'tooltip', title: issuable_milestone_tooltip_title(issue) } do + = link_to project_issues_path(issue.project, milestone_title: issue.milestone.title), data: { html: 1, toggle: 'tooltip', title: milestone_tooltip_due_date(issue.milestone) } do = icon('clock-o') = issue.milestone.title - if issue.due_date diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index a94267deeb2..027a9ff1416 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -23,7 +23,7 @@ - if merge_request.milestone %span.issuable-milestone.hidden-xs   - = link_to project_merge_requests_path(merge_request.project, milestone_title: merge_request.milestone.title), data: { html: 1, toggle: 'tooltip', title: issuable_milestone_tooltip_title(merge_request) } do + = link_to project_merge_requests_path(merge_request.project, milestone_title: merge_request.milestone.title), data: { html: 1, toggle: 'tooltip', title: milestone_tooltip_due_date(merge_request.milestone) } do = icon('clock-o') = merge_request.milestone.title - if merge_request.target_project.default_branch != merge_request.target_branch diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index aa883b9b1fa..093033775a9 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -7,7 +7,7 @@ - if current_user %span.issuable-header-text.hide-collapsed.pull-left = _('Todo') - %a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", "aria-label" => "Toggle sidebar" } + %a.gutter-toggle.pull-right.js-sidebar-toggle.has-tooltip{ role: "button", href: "#", "aria-label" => "Toggle sidebar", title: sidebar_gutter_tooltip_text, data: { container: 'body', placement: 'left' } } = sidebar_gutter_toggle_icon - if current_user = render "shared/issuable/sidebar_todo", todo: todo, issuable: issuable @@ -19,12 +19,11 @@ .block.assignee = render "shared/issuable/sidebar_assignees", issuable: issuable, can_edit_issuable: can_edit_issuable, signed_in: current_user.present? .block.milestone - .sidebar-collapsed-icon + .sidebar-collapsed-icon.has-tooltip{ title: milestone_tooltip_title(issuable.milestone), data: { container: 'body', html: 1, placement: 'left' } } = icon('clock-o', 'aria-hidden': 'true') %span.milestone-title - if issuable.milestone - %span.has-tooltip{ title: "#{issuable.milestone.title}
#{milestone_tooltip_title(issuable.milestone)}", data: { container: 'body', html: 1, placement: 'left' } } - = issuable.milestone.title + = issuable.milestone.title - else = _('None') .title.hide-collapsed @@ -34,7 +33,7 @@ = link_to _('Edit'), '#', class: 'js-sidebar-dropdown-toggle edit-link pull-right' .value.hide-collapsed - if issuable.milestone - = link_to issuable.milestone.title, milestone_path(issuable.milestone), class: "bold has-tooltip", title: milestone_tooltip_title(issuable.milestone), data: { container: "body", html: 1 } + = link_to issuable.milestone.title, milestone_path(issuable.milestone), class: "bold has-tooltip", title: milestone_tooltip_due_date(issuable.milestone), data: { container: "body", html: 1 } - else %span.no-value = _('None') @@ -50,7 +49,7 @@ = icon('spinner spin', 'aria-hidden': 'true') - if issuable.has_attribute?(:due_date) .block.due_date - .sidebar-collapsed-icon + .sidebar-collapsed-icon.has-tooltip{ data: { placement: 'left', container: 'body', html: 1 }, title: sidebar_due_date_tooltip_label(issuable) } = icon('calendar', 'aria-hidden': 'true') %span.js-due-date-sidebar-value = issuable.due_date.try(:to_s, :medium) || 'None' diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml index 304df38a096..21006a76b28 100644 --- a/app/views/shared/issuable/_sidebar_assignees.html.haml +++ b/app/views/shared/issuable/_sidebar_assignees.html.haml @@ -4,7 +4,7 @@ = _('Assignee') = icon('spinner spin') - else - .sidebar-collapsed-icon.sidebar-collapsed-user{ data: { toggle: "tooltip", placement: "left", container: "body" }, title: (issuable.assignee.name if issuable.assignee) } + .sidebar-collapsed-icon.sidebar-collapsed-user{ data: { toggle: "tooltip", placement: "left", container: "body" }, title: sidebar_assignee_tooltip_label(issuable) } - if issuable.assignee = link_to_member(@project, issuable.assignee, size: 24) - else diff --git a/app/views/shared/issuable/_sidebar_todo.html.haml b/app/views/shared/issuable/_sidebar_todo.html.haml index b77e104c072..74327fb1ba8 100644 --- a/app/views/shared/issuable/_sidebar_todo.html.haml +++ b/app/views/shared/issuable/_sidebar_todo.html.haml @@ -1,11 +1,11 @@ - is_collapsed = local_assigns.fetch(:is_collapsed, false) -- mark_content = is_collapsed ? icon('check-square', class: 'todo-undone') : _('Mark done') +- mark_content = is_collapsed ? icon('check-square', class: 'todo-undone') : _('Mark todo as done') - todo_content = is_collapsed ? icon('plus-square') : _('Add todo') %button.issuable-todo-btn.js-issuable-todo{ type: 'button', class: (is_collapsed ? 'btn-blank sidebar-collapsed-icon dont-change-state has-tooltip' : 'btn btn-default issuable-header-btn pull-right'), - title: (todo.nil? ? _('Add todo') : _('Mark done')), - 'aria-label' => (todo.nil? ? _('Add todo') : _('Mark done')), + title: (todo.nil? ? _('Add todo') : _('Mark todo as done')), + 'aria-label' => (todo.nil? ? _('Add todo') : _('Mark todo as done')), data: issuable_todo_button_data(issuable, todo, is_collapsed) } %span.issuable-todo-inner.js-issuable-todo-inner< - if todo diff --git a/app/views/shared/issuable/form/_merge_request_assignee.html.haml b/app/views/shared/issuable/form/_merge_request_assignee.html.haml index bf8613b0f0d..d7740eddcca 100644 --- a/app/views/shared/issuable/form/_merge_request_assignee.html.haml +++ b/app/views/shared/issuable/form/_merge_request_assignee.html.haml @@ -1,6 +1,6 @@ - merge_request = issuable .block.assignee - .sidebar-collapsed-icon.sidebar-collapsed-user{ data: { toggle: "tooltip", placement: "left", container: "body" }, title: (merge_request.assignee.name if merge_request.assignee) } + .sidebar-collapsed-icon.sidebar-collapsed-user{ data: { toggle: "tooltip", placement: "left", container: "body" }, title: sidebar_assignee_tooltip_label(issuable) } - if merge_request.assignee = link_to_member(@project, merge_request.assignee, size: 24) - else diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml index ee134480705..8e9a1b56bb8 100644 --- a/app/views/shared/milestones/_sidebar.html.haml +++ b/app/views/shared/milestones/_sidebar.html.haml @@ -4,12 +4,8 @@ %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 .block.milestone-progress.issuable-sidebar-header - %a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", "aria-label" => "Toggle sidebar" } + %a.gutter-toggle.pull-right.js-sidebar-toggle.has-tooltip{ role: "button", href: "#", "aria-label" => "Toggle sidebar", title: sidebar_gutter_tooltip_text, data: { container: 'body', placement: 'left' } } = sidebar_gutter_toggle_icon - - .sidebar-collapsed-icon - %span== #{milestone.percent_complete(current_user)}% - = milestone_progress_bar(milestone) .title.hide-collapsed %strong.bold== #{milestone.percent_complete(current_user)}% %span.hide-collapsed @@ -17,6 +13,11 @@ .value.hide-collapsed = milestone_progress_bar(milestone) + .block.milestone-progress.hide-expanded + .sidebar-collapsed-icon.has-tooltip{ title: milestone_progress_tooltip_text(milestone), data: { container: 'body', html: 1, placement: 'left' } } + %span== #{milestone.percent_complete(current_user)}% + = milestone_progress_bar(milestone) + .block.start_date.hide-collapsed .title Start date @@ -35,19 +36,25 @@ %span.collapsed-milestone-date - if milestone.start_date && milestone.due_date - if milestone.start_date.year == milestone.due_date.year - .milestone-date= milestone.start_date.strftime('%b %-d') + .milestone-date.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 1, placement: 'left' } } + = milestone.start_date.strftime('%b %-d') - else - .milestone-date= milestone.start_date.strftime('%b %-d %Y') + .milestone-date.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 1, placement: 'left' } } + = milestone.start_date.strftime('%b %-d %Y') .date-separator - - .due_date= milestone.due_date.strftime('%b %-d %Y') + .due_date.has-tooltip{ title: milestone_time_for(milestone.due_date, :end), data: { container: 'body', html: 1, placement: 'left' } } + = milestone.due_date.strftime('%b %-d %Y') - elsif milestone.start_date From - .milestone-date= milestone.start_date.strftime('%b %-d %Y') + .milestone-date.has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 1, placement: 'left' } } + = milestone.start_date.strftime('%b %-d %Y') - elsif milestone.due_date Until - .milestone-date= milestone.due_date.strftime('%b %-d %Y') + .milestone-date.has-tooltip{ title: milestone_time_for(milestone.due_date, :end), data: { container: 'body', html: 1, placement: 'left' } } + = milestone.due_date.strftime('%b %-d %Y') - else - None + .has-tooltip{ title: milestone_time_for(milestone.start_date, :start), data: { container: 'body', html: 1, placement: 'left' } } + None .title.hide-collapsed Due date - if @project && can?(current_user, :admin_milestone, @project) @@ -58,14 +65,14 @@ %span.bold= milestone.due_date.to_s(:medium) - else %span.no-value No due date - - remaining_days = milestone_remaining_days(milestone) + - remaining_days = remaining_days_in_words(milestone) - if remaining_days.present? = surround '(', ')' do %span.remaining-days= remaining_days - if !project || can?(current_user, :read_issue, project) .block.issues - .sidebar-collapsed-icon + .sidebar-collapsed-icon.has-tooltip{ title: milestone_issues_tooltip_text(milestone), data: { container: 'body', html: 1, placement: 'left' } } %strong = custom_icon('issues') %span= milestone.issues_visible_to_user(current_user).count @@ -93,7 +100,7 @@ = icon('spinner spin') .block.merge-requests - .sidebar-collapsed-icon + .sidebar-collapsed-icon.has-tooltip{ title: milestone_merge_requests_tooltip_text(milestone), data: { container: 'body', html: 1, placement: 'left' } } %strong = custom_icon('mr_bold') %span= milestone.merge_requests.count -- cgit v1.2.3 From 0446419a83b6e2641b5d1356f36945017102e97c Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Sat, 21 Apr 2018 01:18:18 +0800 Subject: Use qa selectors for secret variables The problem of using .js-ci-variable-input-value is that, whenever the value is hidden, then this selector won't be set, instead, .js-secret-value-placeholder would be set. If we just fill the value, the value is revealed. But if we visit this later, the values were be hidden. This means we don't have a consistent way to count the values. Adding an unique qa selector to both revealed and hidden values would make it easier to track the values. To make it look more consistent, let's also do the same for the key. --- app/views/ci/variables/_variable_row.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/ci/variables/_variable_row.html.haml b/app/views/ci/variables/_variable_row.html.haml index 440623b34f5..571eb28f195 100644 --- a/app/views/ci/variables/_variable_row.html.haml +++ b/app/views/ci/variables/_variable_row.html.haml @@ -17,14 +17,14 @@ .ci-variable-row-body %input.js-ci-variable-input-id{ type: "hidden", name: id_input_name, value: id } %input.js-ci-variable-input-destroy{ type: "hidden", name: destroy_input_name } - %input.js-ci-variable-input-key.ci-variable-body-item.form-control{ type: "text", + %input.js-ci-variable-input-key.ci-variable-body-item.qa-ci-variable-input-key.form-control{ type: "text", name: key_input_name, value: key, placeholder: s_('CiVariables|Input variable key') } .ci-variable-body-item - .form-control.js-secret-value-placeholder{ class: ('hide' unless id) } + .form-control.js-secret-value-placeholder.qa-ci-variable-input-value{ class: ('hide' unless id) } = '*' * 20 - %textarea.js-ci-variable-input-value.js-secret-value.form-control{ class: ('hide' if id), + %textarea.js-ci-variable-input-value.js-secret-value.qa-ci-variable-input-value.form-control{ class: ('hide' if id), rows: 1, name: value_input_name, placeholder: s_('CiVariables|Input variable value') } -- cgit v1.2.3 From e40bc1b190f51ca42ac12d79b87a0338f2ab0357 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Wed, 11 Apr 2018 12:04:35 -0500 Subject: Create autodevops settings sections --- app/views/projects/empty.html.haml | 2 +- .../settings/ci_cd/_autodevops_form.html.haml | 40 ++++++++++++++++++++++ app/views/projects/settings/ci_cd/_form.html.haml | 38 -------------------- app/views/projects/settings/ci_cd/show.html.haml | 16 +++++++-- app/views/shared/_auto_devops_callout.html.haml | 2 +- 5 files changed, 56 insertions(+), 42 deletions(-) create mode 100644 app/views/projects/settings/ci_cd/_autodevops_form.html.haml (limited to 'app/views') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index b15fe514a08..a417960a2de 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -22,7 +22,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_auto_devops_settings = link_to(s_('AutoDevOps|enable Auto DevOps (Beta)'), project_settings_ci_cd_path(@project, anchor: 'js-autodevops-settings')) - 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 } diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml new file mode 100644 index 00000000000..347bb4cded3 --- /dev/null +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -0,0 +1,40 @@ +.row.prepend-top-default + .col-lg-12 + = form_for @project, url: project_settings_ci_cd_path(@project) do |f| + = form_errors(@project) + %fieldset.builds-feature + .form-group + - message = auto_devops_warning_message(@project) + - if message + %p.settings-message.text-center + = message.html_safe + = f.fields_for :auto_devops_attributes, @auto_devops do |form| + .radio + = form.label :enabled_true do + = form.radio_button :enabled, 'true' + %strong Enable Auto DevOps + %br + %span.descr + The Auto DevOps pipeline configuration will be used when there is no .gitlab-ci.yml in the project. + + .radio + = form.label :enabled_false do + = form.radio_button :enabled, 'false' + %strong Disable Auto DevOps + %br + %span.descr + An explicit .gitlab-ci.yml needs to be specified before you can begin using Continuous Integration and Delivery. + + .radio + = form.label :enabled_ do + = form.radio_button :enabled, '' + %strong Instance default (#{Gitlab::CurrentSettings.auto_devops_enabled? ? 'enabled' : 'disabled'}) + %br + %span.descr + Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific .gitlab-ci.yml. + + %p.prepend-top-10.append-bottom-10 + You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages. + = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' + + = f.submit 'Save changes', class: "btn btn-save prepend-top-15" diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 20868f9ba5d..80c226ad273 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -3,44 +3,6 @@ = form_for @project, url: project_settings_ci_cd_path(@project) do |f| = form_errors(@project) %fieldset.builds-feature - .form-group - %h5 Auto DevOps (Beta) - %p - Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration. - = link_to 'Learn more about Auto DevOps', help_page_path('topics/autodevops/index.md') - - message = auto_devops_warning_message(@project) - - if message - %p.settings-message.text-center - = message.html_safe - = f.fields_for :auto_devops_attributes, @auto_devops do |form| - .radio - = form.label :enabled_true do - = form.radio_button :enabled, 'true' - %strong Enable Auto DevOps - %br - %span.descr - The Auto DevOps pipeline configuration will be used when there is no .gitlab-ci.yml in the project. - - .radio - = form.label :enabled_false do - = form.radio_button :enabled, 'false' - %strong Disable Auto DevOps - %br - %span.descr - An explicit .gitlab-ci.yml needs to be specified before you can begin using Continuous Integration and Delivery. - - .radio - = form.label :enabled_ do - = form.radio_button :enabled, '' - %strong Instance default (#{Gitlab::CurrentSettings.auto_devops_enabled? ? 'enabled' : 'disabled'}) - %br - %span.descr - Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific .gitlab-ci.yml. - %p - You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages. - = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' - - %hr .form-group.append-bottom-default.js-secret-runner-token = f.label :runners_token, "Runner token", class: 'label-light' .form-control.js-secret-value-placeholder diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 09268c9943b..7ff3b1986b8 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -5,17 +5,29 @@ - expanded = Rails.env.test? - general_expanded = @project.errors.empty? ? expanded : true -%section.settings#js-general-pipeline-settings.no-animate{ class: ('expanded' if general_expanded) } +%section.settings.general-ci-settings.no-animate{ class: ('expanded' if general_expanded) } .settings-header %h4 General pipelines settings %button.btn.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p - Update your CI/CD configuration, like job timeout or Auto DevOps. + Access your runner token, customize your pipeline configuration, and view your pipeline status and coverage report. .settings-content = render 'form' +%section.settings#js-autodevops-settings.autodevops-settings.no-animate{ class: ('expanded' if expanded) } + .settings-header + %h4 + Auto DevOps (Beta) + %button.btn.js-settings-toggle{ type: 'button' } + = expanded ? 'Collapse' : 'Expand' + %p + Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration. + = link_to 'Learn more about Auto DevOps', help_page_path('topics/autodevops/index.md') + .settings-content + = render 'autodevops_form' + %section.settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 diff --git a/app/views/shared/_auto_devops_callout.html.haml b/app/views/shared/_auto_devops_callout.html.haml index e9ac192f5f7..c6c8549ee81 100644 --- a/app/views/shared/_auto_devops_callout.html.haml +++ b/app/views/shared/_auto_devops_callout.html.haml @@ -9,7 +9,7 @@ - link = link_to(s_('AutoDevOps|Auto DevOps documentation'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer') = s_('AutoDevOps|Learn more in the %{link_to_documentation}').html_safe % { link_to_documentation: link } .banner-buttons - = link_to s_('AutoDevOps|Enable in settings'), project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings'), class: 'btn js-close-callout' + = link_to s_('AutoDevOps|Enable in settings'), project_settings_ci_cd_path(@project, anchor: 'js-autodevops-settings'), class: 'btn js-close-callout' %button.btn-transparent.banner-close.close.js-close-callout{ type: 'button', 'aria-label' => 'Dismiss Auto DevOps box' } -- cgit v1.2.3 From ea7127dea929bd47b9142f1550841e196898b7b3 Mon Sep 17 00:00:00 2001 From: Jose Ivan Vargas Date: Tue, 17 Apr 2018 11:37:16 -0500 Subject: Changed anchor not to have the js prefix, add i18n --- app/views/projects/empty.html.haml | 2 +- .../settings/ci_cd/_autodevops_form.html.haml | 26 +++++++++++----------- app/views/projects/settings/ci_cd/show.html.haml | 14 ++++++------ app/views/shared/_auto_devops_callout.html.haml | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index a417960a2de..2f69da593cd 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -22,7 +22,7 @@ %hr %p - - link_to_auto_devops_settings = link_to(s_('AutoDevOps|enable Auto DevOps (Beta)'), project_settings_ci_cd_path(@project, anchor: 'js-autodevops-settings')) + - link_to_auto_devops_settings = link_to(s_('AutoDevOps|enable Auto DevOps (Beta)'), project_settings_ci_cd_path(@project, anchor: 'autodevops-settings')) - 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 } diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml index 347bb4cded3..7b410101c05 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -5,6 +5,7 @@ %fieldset.builds-feature .form-group - message = auto_devops_warning_message(@project) + - ci_file_formatted = '.gitlab-ci.yml'.html_safe - if message %p.settings-message.text-center = message.html_safe @@ -12,29 +13,28 @@ .radio = form.label :enabled_true do = form.radio_button :enabled, 'true' - %strong Enable Auto DevOps + %strong= s_('CICD|Enable Auto DevOps') %br - %span.descr - The Auto DevOps pipeline configuration will be used when there is no .gitlab-ci.yml in the project. + = s_('CICD|The Auto DevOps pipeline configuration will be used when there is no %{ci_file} in the project.').html_safe % { ci_file: ci_file_formatted } .radio = form.label :enabled_false do = form.radio_button :enabled, 'false' - %strong Disable Auto DevOps + %strong= s_('CICD|Disable Auto DevOps') %br - %span.descr - An explicit .gitlab-ci.yml needs to be specified before you can begin using Continuous Integration and Delivery. + = s_('CICD|An explicit %{ci_file} needs to be specified before you can begin using Continuous Integration and Delivery.').html_safe % { ci_file: ci_file_formatted } .radio = form.label :enabled_ do = form.radio_button :enabled, '' - %strong Instance default (#{Gitlab::CurrentSettings.auto_devops_enabled? ? 'enabled' : 'disabled'}) + %strong= s_('CICD|Instance default (%{state})') % { state: "#{Gitlab::CurrentSettings.auto_devops_enabled? ? _('enabled') : _('disabled')}" } %br - %span.descr - Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific .gitlab-ci.yml. + = s_('CICD|Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific %{ci_file}.').html_safe % { ci_file: ci_file_formatted } - %p.prepend-top-10.append-bottom-10 - You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages. - = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' + = form.label :domain, class:"prepend-top-10" do + = _('Domain') + = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' + .help-block + = s_('CICD|You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages.') - = f.submit 'Save changes', class: "btn btn-save prepend-top-15" + = f.submit 'Save changes', class: "btn btn-success prepend-top-15" diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 7ff3b1986b8..5f596a019f7 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -5,7 +5,7 @@ - expanded = Rails.env.test? - general_expanded = @project.errors.empty? ? expanded : true -%section.settings.general-ci-settings.no-animate{ class: ('expanded' if general_expanded) } +%section.settings#js-general-pipeline-settings.no-animate{ class: ('expanded' if general_expanded) } .settings-header %h4 General pipelines settings @@ -16,15 +16,15 @@ .settings-content = render 'form' -%section.settings#js-autodevops-settings.autodevops-settings.no-animate{ class: ('expanded' if expanded) } +%section.settings#autodevops-settings.no-animate{ class: ('expanded' if expanded) } .settings-header %h4 - Auto DevOps (Beta) - %button.btn.js-settings-toggle{ type: 'button' } - = expanded ? 'Collapse' : 'Expand' + = s_('CICD|Auto DevOps (Beta)') + %button.btn.btn-default.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') %p - Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration. - = link_to 'Learn more about Auto DevOps', help_page_path('topics/autodevops/index.md') + = s_('CICD|Auto DevOps will automatically build, test, and deploy your application based on a predefined Continuous Integration and Delivery configuration.') + = link_to s_('CICD|Learn more about Auto DevOps'), help_page_path('topics/autodevops/index.md') .settings-content = render 'autodevops_form' diff --git a/app/views/shared/_auto_devops_callout.html.haml b/app/views/shared/_auto_devops_callout.html.haml index c6c8549ee81..d3fa324e460 100644 --- a/app/views/shared/_auto_devops_callout.html.haml +++ b/app/views/shared/_auto_devops_callout.html.haml @@ -9,7 +9,7 @@ - link = link_to(s_('AutoDevOps|Auto DevOps documentation'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer') = s_('AutoDevOps|Learn more in the %{link_to_documentation}').html_safe % { link_to_documentation: link } .banner-buttons - = link_to s_('AutoDevOps|Enable in settings'), project_settings_ci_cd_path(@project, anchor: 'js-autodevops-settings'), class: 'btn js-close-callout' + = link_to s_('AutoDevOps|Enable in settings'), project_settings_ci_cd_path(@project, anchor: 'autodevops-settings'), class: 'btn js-close-callout' %button.btn-transparent.banner-close.close.js-close-callout{ type: 'button', 'aria-label' => 'Dismiss Auto DevOps box' } -- cgit v1.2.3 From c62557b0f732f1bcf7263ea380b1a4213effdacb Mon Sep 17 00:00:00 2001 From: Ash McKenzie Date: Mon, 23 Apr 2018 17:18:36 +1000 Subject: Update repository storages documentation URL --- app/views/admin/application_settings/_repository_storage.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/admin/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml index ac31977e1a9..4eebb59110a 100644 --- a/app/views/admin/application_settings/_repository_storage.html.haml +++ b/app/views/admin/application_settings/_repository_storage.html.haml @@ -21,7 +21,7 @@ .help-block Manage repository storage paths. Learn more in the = succeed "." do - = link_to "repository storages documentation", help_page_path("administration/repository_storages") + = link_to "repository storages documentation", help_page_path("administration/repository_storage_paths") .sub-section %h4 Circuit breaker .form-group -- cgit v1.2.3 From ee274f89f9eae953265a6d6449e1214537fd184d Mon Sep 17 00:00:00 2001 From: Takuya Noguchi Date: Mon, 23 Apr 2018 23:53:21 +0900 Subject: Update links to /ci/lint with ones to project ci/lint --- app/views/projects/jobs/index.html.haml | 2 +- app/views/projects/pipelines/_with_tabs.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/jobs/index.html.haml b/app/views/projects/jobs/index.html.haml index 9963cc93633..fe1c338b634 100644 --- a/app/views/projects/jobs/index.html.haml +++ b/app/views/projects/jobs/index.html.haml @@ -15,7 +15,7 @@ - unless @repository.gitlab_ci_yml = link_to 'Get started with Pipelines', help_page_path('ci/quick_start/README'), class: 'btn btn-info' - = link_to ci_lint_path, class: 'btn btn-default' do + = link_to project_ci_lint_path(@project), class: 'btn btn-default' do %span CI lint .content-list.builds-content-list diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index 852143ecb2a..218e7338c83 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -26,7 +26,7 @@ %ul - pipeline.yaml_errors.split(",").each do |error| %li= error - You can also test your .gitlab-ci.yml in the #{link_to "Lint", ci_lint_path} + You can also test your .gitlab-ci.yml in the #{link_to "Lint", project_ci_lint_path(@project)} - if pipeline.project.builds_enabled? && !pipeline.ci_yaml_file .bs-callout.bs-callout-warning -- cgit v1.2.3 From aeed6b5a34e2c1c98a374e6c6178d84e07779531 Mon Sep 17 00:00:00 2001 From: Bob Van Landuyt Date: Wed, 18 Apr 2018 12:44:12 +0200 Subject: Only show push-to-master authorized users Hide the push to master instructions for users that are not allowed to do that. Also hide buttons that would direct them to commit directly in master --- app/views/projects/empty.html.haml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 2f69da593cd..a066f9f4cca 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -58,7 +58,9 @@ touch README.md git add README.md git commit -m "add README" - git push -u origin master + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin master %fieldset %h5 Existing folder @@ -69,7 +71,9 @@ git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')} git add . git commit -m "Initial commit" - git push -u origin master + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin master %fieldset %h5 Existing Git repository @@ -78,8 +82,10 @@ cd existing_repo git remote rename origin old-origin git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')} - git push -u origin --all - git push -u origin --tags + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin --all + git push -u origin --tags - if can? current_user, :remove_project, @project .prepend-top-20 -- cgit v1.2.3 From 52dfdcf755409081d46bd91e6c012aece0006e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=20Karabanova=20=F0=9F=90=B1?= Date: Tue, 24 Apr 2018 13:59:54 +0000 Subject: Broken link fix --- app/views/projects/registry/repositories/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml index 2c80f7c3fa3..76f57320f99 100644 --- a/app/views/projects/registry/repositories/index.html.haml +++ b/app/views/projects/registry/repositories/index.html.haml @@ -29,7 +29,7 @@ docker login #{Gitlab.config.registry.host_port} %br %p - - deploy_token = link_to(_('deploy token'), help_page_path('user/projects/deploy_tokens/index', anchor: 'read-container-registry-images'), target: '_blank') + - deploy_token = link_to(_('deploy token'), help_page_path('user/project/deploy_tokens/index', anchor: 'read-container-registry-images'), target: '_blank') = s_('ContainerRegistry|You can also %{deploy_token} for read-only access to the registry images.').html_safe % { deploy_token: deploy_token } %br %p -- cgit v1.2.3 From 5e768299cb5e81e0f7f0cdc4defdb42f16a0875e Mon Sep 17 00:00:00 2001 From: George Tsiolis Date: Thu, 19 Apr 2018 16:47:36 +0300 Subject: Show group id in group settings --- app/views/groups/edit.html.haml | 2 ++ app/views/shared/_group_form.html.haml | 7 +++++++ 2 files changed, 9 insertions(+) (limited to 'app/views') diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 86cd0759a2c..3375e01b3a1 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -1,4 +1,6 @@ - breadcrumb_title "General Settings" +- @content_class = "limit-container-width" unless fluid_layout + .panel.panel-default.prepend-top-default .panel-heading Group settings diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index cb21f90696f..403d22c79f8 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -32,6 +32,13 @@ required: true, title: 'You can choose a descriptive name different from the path.' +- if @group.persisted? + .form-group.group-name-holder + = f.label :id, class: 'control-label' do + = _("Group ID") + .col-sm-10 + = f.text_field :id, class: 'form-control', readonly: true + .form-group.group-description-holder = f.label :description, class: 'control-label' .col-sm-10 -- cgit v1.2.3 From 18ded5f3b6fb7d8d6190bea22301d486daa1ab3a Mon Sep 17 00:00:00 2001 From: Mark Lapierre Date: Sun, 15 Apr 2018 17:28:59 -0400 Subject: Change language to be more inclusive of those with accessibility requirements Prepare change for internationalization Update locale/gitlab.pot --- app/views/projects/forks/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 app/views/projects/forks/new.html.haml (limited to 'app/views') diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml old mode 100644 new mode 100755 index 475c6ba4d3d..a603b1024eb --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -12,7 +12,7 @@ - if @namespaces.present? .fork-thumbnail-container.js-fork-content %h5.prepend-top-0.append-bottom-0.prepend-left-default.append-right-default - Click to fork the project + = _("Select a namespace to fork the project") - @namespaces.each do |namespace| = render 'fork_button', namespace: namespace - else -- cgit v1.2.3 From 9cc2123e47661db37fbaff96f99999697aa60432 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 25 Apr 2018 19:01:36 +0800 Subject: Select everything so we could hit protect Add missing QA selectors as well --- .../projects/protected_branches/_create_protected_branch.html.haml | 4 ++-- .../projects/protected_branches/_update_protected_branch.html.haml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/protected_branches/_create_protected_branch.html.haml b/app/views/projects/protected_branches/_create_protected_branch.html.haml index 12ccae10260..24b53555cdc 100644 --- a/app/views/projects/protected_branches/_create_protected_branch.html.haml +++ b/app/views/projects/protected_branches/_create_protected_branch.html.haml @@ -1,8 +1,8 @@ - content_for :merge_access_levels do .merge_access_levels-container = dropdown_tag('Select', - options: { toggle_class: 'js-allowed-to-merge wide', - dropdown_class: 'dropdown-menu-selectable capitalize-header', + options: { toggle_class: 'js-allowed-to-merge qa-allowed-to-merge-select wide', + dropdown_class: 'dropdown-menu-selectable qa-allowed-to-merge-dropdown capitalize-header', data: { field_name: 'protected_branch[merge_access_levels_attributes][0][access_level]', input_id: 'merge_access_levels_attributes' }}) - content_for :push_access_levels do .push_access_levels-container diff --git a/app/views/projects/protected_branches/_update_protected_branch.html.haml b/app/views/projects/protected_branches/_update_protected_branch.html.haml index 98363f2018a..f242459f69b 100644 --- a/app/views/projects/protected_branches/_update_protected_branch.html.haml +++ b/app/views/projects/protected_branches/_update_protected_branch.html.haml @@ -1,7 +1,7 @@ %td = hidden_field_tag "allowed_to_merge_#{protected_branch.id}", protected_branch.merge_access_levels.first.access_level = dropdown_tag( (protected_branch.merge_access_levels.first.humanize || 'Select') , - options: { toggle_class: 'js-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header', + options: { toggle_class: 'js-allowed-to-merge qa-allowed-to-merge', dropdown_class: 'dropdown-menu-selectable js-allowed-to-merge-container capitalize-header', data: { field_name: "allowed_to_merge_#{protected_branch.id}", access_level_id: protected_branch.merge_access_levels.first.id }}) %td = hidden_field_tag "allowed_to_push_#{protected_branch.id}", protected_branch.push_access_levels.first.access_level -- cgit v1.2.3 From 9904ac8129d67ea760f2fa3727f7062805b0e4f7 Mon Sep 17 00:00:00 2001 From: James Edwards-Jones Date: Wed, 25 Apr 2018 20:42:23 +0100 Subject: Backports EE changes from disabling branch unprotect UI --- app/views/projects/protected_branches/_branches_list.html.haml | 2 +- .../projects/protected_branches/shared/_protected_branch.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/protected_branches/_branches_list.html.haml b/app/views/projects/protected_branches/_branches_list.html.haml index 5377d745371..24d2b971472 100644 --- a/app/views/projects/protected_branches/_branches_list.html.haml +++ b/app/views/projects/protected_branches/_branches_list.html.haml @@ -1,4 +1,4 @@ - can_admin_project = can?(current_user, :admin_project, @project) = render layout: 'projects/protected_branches/shared/branches_list', locals: { can_admin_project: can_admin_project } do - = render partial: 'projects/protected_branches/protected_branch', collection: @protected_branches, locals: { can_admin_project: can_admin_project} + = render partial: 'projects/protected_branches/protected_branch', collection: @protected_branches diff --git a/app/views/projects/protected_branches/shared/_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_protected_branch.html.haml index f5b21f0e887..2d3b2af00c2 100644 --- a/app/views/projects/protected_branches/shared/_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_protected_branch.html.haml @@ -21,4 +21,4 @@ - if can_admin_project %td - = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, protected_branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: 'btn btn-warning' + = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, protected_branch], disabled: local_assigns[:disabled], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-warning" -- cgit v1.2.3 From c1b416e19fac44acc37eff35ae38e3022f3822eb Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Mon, 23 Apr 2018 13:55:12 +0200 Subject: remove peek performance_bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/views/peek/_bar.html.haml | 5 ----- 1 file changed, 5 deletions(-) (limited to 'app/views') diff --git a/app/views/peek/_bar.html.haml b/app/views/peek/_bar.html.haml index b4d86e1601c..a911449672b 100644 --- a/app/views/peek/_bar.html.haml +++ b/app/views/peek/_bar.html.haml @@ -5,8 +5,3 @@ peek_url: peek_routes.results_url, profile_url: url_for(params.merge(lineprofiler: 'true')) }, class: Peek.env } - -#peek-view-performance-bar.hidden - = render_server_response_time - %span#serverstats - %ul.performance-bar -- cgit v1.2.3 From 54caf961641348e8983a31fa7fe855fd5bf94e18 Mon Sep 17 00:00:00 2001 From: schwedenmut Date: Thu, 26 Apr 2018 11:18:32 +0000 Subject: Resolve "User deletion modal with same info for delete user / delete user and contributions" --- app/views/admin/users/_user.html.haml | 4 ++-- app/views/admin/users/show.html.haml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/users/_user.html.haml b/app/views/admin/users/_user.html.haml index 2ff4221efbd..badf3dd74b3 100644 --- a/app/views/admin/users/_user.html.haml +++ b/app/views/admin/users/_user.html.haml @@ -43,7 +43,7 @@ delete_user_url: admin_user_path(user), block_user_url: block_admin_user_path(user), username: user.name, - delete_contributions: 'false' }, type: 'button' } + delete_contributions: false }, type: 'button' } = s_('AdminUsers|Delete user') %li @@ -52,5 +52,5 @@ delete_user_url: admin_user_path(user, hard_delete: true), block_user_url: block_admin_user_path(user), username: user.name, - delete_contributions: 'true' }, type: 'button' } + delete_contributions: true }, type: 'button' } = s_('AdminUsers|Delete user and contributions') diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index ec3be869797..814ccdae8f3 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -183,7 +183,7 @@ delete_user_url: admin_user_path(@user), block_user_url: block_admin_user_path(@user), username: @user.name, - delete_contributions: 'false' }, type: 'button' } + delete_contributions: false }, type: 'button' } = s_('AdminUsers|Delete user') - else - if @user.solo_owned_groups.present? @@ -215,7 +215,7 @@ delete_user_url: admin_user_path(@user, hard_delete: true), block_user_url: block_admin_user_path(@user), username: @user.name, - delete_contributions: 'true' }, type: 'button' } + delete_contributions: true }, type: 'button' } = s_('AdminUsers|Delete user and contributions') - else %p -- cgit v1.2.3 From 66a78bb609076610bb99a5074fcacfa7394a1845 Mon Sep 17 00:00:00 2001 From: Dylan Griffith Date: Fri, 27 Apr 2018 14:50:15 +0000 Subject: Resolve "Add how to use nip.io to Auto DevOps and Kubernetes documentation" --- app/views/projects/settings/ci_cd/_autodevops_form.html.haml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views') diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml index 7b410101c05..71e77dae69e 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -36,5 +36,6 @@ = form.text_field :domain, class: 'form-control', placeholder: 'domain.com' .help-block = s_('CICD|You need to specify a domain if you want to use Auto Review Apps and Auto Deploy stages.') + = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md', anchor: 'auto-devops-base-domain'), target: '_blank' = f.submit 'Save changes', class: "btn btn-success prepend-top-15" -- cgit v1.2.3