From 8478589665438e509ae827eb7cf573bb140b3347 Mon Sep 17 00:00:00 2001 From: yury-n Date: Thu, 14 Jul 2016 17:36:05 +0300 Subject: Make the milestone page more responsive --- app/views/projects/milestones/show.html.haml | 17 ++++---- app/views/shared/milestones/_summary.html.haml | 60 ++++++++++++++------------ 2 files changed, 42 insertions(+), 35 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index f9ba77e87b5..e01aca3dda6 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -4,7 +4,7 @@ = render "projects/issues/head" %div{ class: container_class } - .detail-page-header + .detail-page-header.milestone-page-header .status-box{ class: status_box_class(@milestone) } - if @milestone.closed? Closed @@ -12,13 +12,14 @@ Past due - else Open - %span.identifier - Milestone ##{@milestone.iid} - - if @milestone.expires_at - %span.creator - · - = @milestone.expires_at - .pull-right + .header-text-content + %span.identifier + Milestone ##{@milestone.iid} + - if @milestone.expires_at + %span.creator + · + = @milestone.expires_at + .milestone-buttons - if can?(current_user, :admin_milestone, @project) - if @milestone.active? = link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-nr btn-grouped" diff --git a/app/views/shared/milestones/_summary.html.haml b/app/views/shared/milestones/_summary.html.haml index dee2472fa79..0a237136959 100644 --- a/app/views/shared/milestones/_summary.html.haml +++ b/app/views/shared/milestones/_summary.html.haml @@ -3,32 +3,38 @@ .context.prepend-top-default .milestone-summary %h4 Progress - %strong= milestone.issues_visible_to_user(current_user).size - issues: - %span.milestone-stat - %strong= milestone.issues_visible_to_user(current_user).opened.size - open and - %strong= milestone.issues_visible_to_user(current_user).closed.size - closed - %strong= milestone.merge_requests.size - merge requests: - %span.milestone-stat - %strong= milestone.merge_requests.opened.size - open and - %strong= milestone.merge_requests.merged.size - merged - %span.milestone-stat - %strong== #{milestone.percent_complete(current_user)}% - complete - %span.milestone-stat - %span.remaining-days= milestone_remaining_days(milestone) - %span.pull-right.tab-issues-buttons - - if project && can?(current_user, :create_issue, project) - = link_to new_namespace_project_issue_path(project.namespace, project, issue: { milestone_id: milestone.id }), class: "btn btn-grouped", title: "New Issue" do - New Issue - = link_to 'Browse Issues', milestones_browse_issuables_path(milestone, type: :issues), class: "btn btn-grouped" - %span.pull-right.tab-merge-requests-buttons.hidden - = link_to 'Browse Merge Requests', milestones_browse_issuables_path(milestone, type: :merge_requests), class: "btn btn-grouped" + .milestone-stats-and-buttons + .milestone-stats + %span.milestone-stat.with-drilldown + %strong= milestone.issues_visible_to_user(current_user).size + issues: + %span.milestone-stat + %strong= milestone.issues_visible_to_user(current_user).opened.size + open and + %strong= milestone.issues_visible_to_user(current_user).closed.size + closed + %span.milestone-stat.with-drilldown + %strong= milestone.merge_requests.size + merge requests: + %span.milestone-stat + %strong= milestone.merge_requests.opened.size + open and + %strong= milestone.merge_requests.merged.size + merged + %span.milestone-stat + %strong== #{milestone.percent_complete(current_user)}% + complete + %span.milestone-stat + %span.remaining-days= milestone_remaining_days(milestone) - = milestone_progress_bar(milestone) + .milestone-progress-buttons + %span.tab-issues-buttons + - if project && can?(current_user, :create_issue, project) + = link_to new_namespace_project_issue_path(project.namespace, project, issue: { milestone_id: milestone.id }), class: "btn", title: "New Issue" do + New Issue + = link_to 'Browse Issues', milestones_browse_issuables_path(milestone, type: :issues), class: "btn" + %span.tab-merge-requests-buttons.hidden + = link_to 'Browse Merge Requests', milestones_browse_issuables_path(milestone, type: :merge_requests), class: "btn" + + = milestone_progress_bar(milestone) -- cgit v1.2.1 From a08fba63be60dd011f4d1a639d4df8fbacb09d14 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Sat, 5 Nov 2016 17:28:29 +0000 Subject: Added empty state svg and set up blank conditional Added new spec step Added empty state to dashboard Split empty and filtered empty states Moved empty_state icons into their own folder and DRY up empty state html Fixed failing spec Added to groups page Review changes --- app/views/groups/issues.html.haml | 39 +++++++++++++------------ app/views/projects/issues/_issues.html.haml | 3 +- app/views/projects/issues/index.html.haml | 24 +++------------ app/views/shared/_issues.html.haml | 2 +- app/views/shared/empty_states/_issues.html.haml | 22 ++++++++++++++ app/views/shared/empty_states/icons/_issues.svg | 1 + 6 files changed, 50 insertions(+), 41 deletions(-) create mode 100644 app/views/shared/empty_states/_issues.html.haml create mode 100644 app/views/shared/empty_states/icons/_issues.svg (limited to 'app/views') diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index dc6c1bb69de..324a116a50e 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -3,24 +3,27 @@ - if current_user = auto_discovery_link_tag(:atom, url_for(params.merge(format: :atom, private_token: current_user.private_token)), title: "#{@group.name} issues") -.top-area - = render 'shared/issuable/nav', type: :issues - .nav-controls - - if current_user - = link_to url_for(params.merge(format: :atom, private_token: current_user.private_token)), class: 'btn' do - = icon('rss') - %span.icon-label - Subscribe - = render 'shared/new_project_item_select', path: 'issues/new', label: "New Issue" +- if group_issues(@group).exists? + .top-area + = render 'shared/issuable/nav', type: :issues + .nav-controls + - if current_user + = link_to url_for(params.merge(format: :atom, private_token: current_user.private_token)), class: 'btn' do + = icon('rss') + %span.icon-label + Subscribe + = render 'shared/new_project_item_select', path: 'issues/new', label: "New Issue" -= render 'shared/issuable/filter', type: :issues + = render 'shared/issuable/filter', type: :issues -.row-content-block.second-block - Only issues from - %strong #{@group.name} - group are listed here. - - if current_user - To see all issues you should visit #{link_to 'dashboard', issues_dashboard_path} page. + .row-content-block.second-block + Only issues from the + %strong #{@group.name} + group are listed here. + - if current_user + To see all issues you should visit #{link_to 'dashboard', issues_dashboard_path} page. -.prepend-top-default - = render 'shared/issues' + .prepend-top-default + = render 'shared/issues' +- else + = render 'shared/empty_states/issues', project_select_button: true diff --git a/app/views/projects/issues/_issues.html.haml b/app/views/projects/issues/_issues.html.haml index a4b752ad86d..34d5a3e1831 100644 --- a/app/views/projects/issues/_issues.html.haml +++ b/app/views/projects/issues/_issues.html.haml @@ -1,8 +1,7 @@ %ul.content-list.issues-list.issuable-list = render partial: "projects/issues/issue", collection: @issues - if @issues.blank? - %li - .nothing-here-block No issues to show + = render 'shared/empty_states/issues' - if @issues.present? = paginate @issues, theme: "gitlab" diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index c493ff3585b..26f3f0ac292 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -10,8 +10,8 @@ - if current_user = auto_discovery_link_tag(:atom, url_for(params.merge(format: :atom, private_token: current_user.private_token)), title: "#{@project.name} issues") -%div{ class: (container_class) } - - if @project.issues.any? +- if project_issues(@project).exists? + %div{ class: (container_class) } .top-area = render 'shared/issuable/nav', type: :issues .nav-controls @@ -36,21 +36,5 @@ = render 'issues' - if new_issue_email = render 'issue_by_email', email: new_issue_email - - else - .blank-state.blank-state-welcome - %h2.blank-state-title.blank-state-welcome-title - Welcome to GitLab Issues - %p.blank-state-text - Code, test, and deploy together - .blank-state - .blank-state-icon - = custom_icon("issues", size: 50) - %h3.blank-state-title - You don't have any issues right now. - %p.blank-state-text - Issues are the best way to track your project progress - - if can? current_user, :create_issue, @project - = link_to new_namespace_project_issue_path(@project.namespace, @project), class: "btn btn-new", title: "New Issue", id: "new_issue_link" do - New Issue - - if new_issue_email - = render 'issue_by_email', email: new_issue_email +- else + = render 'shared/empty_states/issues', button_path: new_namespace_project_issue_path(@project.namespace, @project) diff --git a/app/views/shared/_issues.html.haml b/app/views/shared/_issues.html.haml index a5df502d7b5..baa6d5f8206 100644 --- a/app/views/shared/_issues.html.haml +++ b/app/views/shared/_issues.html.haml @@ -13,4 +13,4 @@ = render 'projects/issues/issue', issue: issue = paginate @issues, theme: "gitlab" - else - .nothing-here-block No issues to show + = render 'shared/empty_states/issues' diff --git a/app/views/shared/empty_states/_issues.html.haml b/app/views/shared/empty_states/_issues.html.haml new file mode 100644 index 00000000000..e939278bc07 --- /dev/null +++ b/app/views/shared/empty_states/_issues.html.haml @@ -0,0 +1,22 @@ +- button_path = local_assigns.fetch(:button_path, false) +- project_select_button = local_assigns.fetch(:project_select_button, false) +- has_button = button_path || project_select_button + +.row.empty-state + .pull-right.col-xs-12{ class: "#{'col-sm-6' if has_button}" } + .svg-content + = render 'shared/empty_states/icons/issues.svg' + .col-xs-12{ class: "#{'col-sm-6' if has_button}" } + .text-content + - if has_button + %h4 + The Issue Tracker is a good place to add things that need to be improved or solved in a project! + %p + An issue can be a bug, a todo or a feature request that needs to be discussed in a project. + Besides, issues are searchable and filterable. + - if project_select_button + = render 'shared/new_project_item_select', path: 'issues/new', label: 'New issue' + - else + = link_to 'New issue', button_path, class: 'btn btn-new', title: 'New issue', id: 'new_issue_link' + - else + %h4.text-center There are no issues to show. diff --git a/app/views/shared/empty_states/icons/_issues.svg b/app/views/shared/empty_states/icons/_issues.svg new file mode 100644 index 00000000000..2e92bf19579 --- /dev/null +++ b/app/views/shared/empty_states/icons/_issues.svg @@ -0,0 +1 @@ + -- cgit v1.2.1 From 6c0f104f67dc34311e8b430282b3171a0fe04f02 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Fri, 18 Nov 2016 08:23:15 -0700 Subject: Remove view details link from MR widget --- app/views/projects/merge_requests/widget/_heading.html.haml | 3 --- 1 file changed, 3 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/merge_requests/widget/_heading.html.haml b/app/views/projects/merge_requests/widget/_heading.html.haml index a82c846baa7..0f0fc097e98 100644 --- a/app/views/projects/merge_requests/widget/_heading.html.haml +++ b/app/views/projects/merge_requests/widget/_heading.html.haml @@ -12,7 +12,6 @@ = succeed "." do = link_to @pipeline.short_sha, namespace_project_commit_path(@merge_request.source_project.namespace, @merge_request.source_project, @pipeline.sha), class: "monospace" %span.ci-coverage - = link_to "View details", pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: "js-show-tab", data: {action: 'pipelines'} - elsif @merge_request.has_ci? - # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX @@ -29,8 +28,6 @@ = succeed "." do = link_to commit.short_id, namespace_project_commit_path(@merge_request.source_project.namespace, @merge_request.source_project, commit), class: "monospace" %span.ci-coverage - - if details_path = ci_build_details_path(@merge_request) - = link_to "View details", details_path, :"data-no-turbolink" => "data-no-turbolink" .ci_widget = icon("spinner spin") -- cgit v1.2.1 From 512aa57d367527e7d5d61417981a99685db6e2f0 Mon Sep 17 00:00:00 2001 From: Dimitrie Hoekstra Date: Fri, 18 Nov 2016 17:28:02 +0100 Subject: If Build running change accept merge request when build succeeds button from orange to blue --- .../merge_requests/widget/open/_merge_when_build_succeeds.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml b/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml index 2b6b5e05e86..1aeb12e4661 100644 --- a/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml +++ b/app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml @@ -21,5 +21,5 @@ Remove Source Branch When Merged - if user_can_cancel_automatic_merge - = link_to cancel_merge_when_build_succeeds_namespace_project_merge_request_path(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request), remote: true, method: :post, class: "btn btn-grouped btn-warning btn-sm" do + = link_to cancel_merge_when_build_succeeds_namespace_project_merge_request_path(@merge_request.target_project.namespace, @merge_request.target_project, @merge_request), remote: true, method: :post, class: "btn btn-grouped btn-sm" do Cancel Automatic Merge -- cgit v1.2.1 From 452d1d0824f44664484c35a2acc7c008c8167196 Mon Sep 17 00:00:00 2001 From: Ruben Davila Date: Fri, 18 Nov 2016 21:19:04 -0500 Subject: Backport some changes done from Time Tracking feature in EE. --- app/views/shared/issuable/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 2fe9e82194b..9b9ad510444 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -125,7 +125,7 @@ - else .pull-right - if can?(current_user, :"destroy_#{issuable.to_ability_name}", @project) - = link_to 'Delete', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), data: { confirm: "#{issuable.class.name.titleize} will be removed! Are you sure?" }, + = link_to 'Delete', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), data: { confirm: "#{issuable.human_class_name} will be removed! Are you sure?" }, method: :delete, class: 'btn btn-danger btn-grouped' = link_to 'Cancel', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), class: 'btn btn-grouped btn-cancel' -- cgit v1.2.1 From ed88515d56f72ba9f77cac2a4dca121fd34f622f Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Sat, 19 Nov 2016 23:52:53 -0600 Subject: convert activities.js to es6 class syntax --- app/views/projects/_activity.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml index d011e51e696..4f15f2997fb 100644 --- a/app/views/projects/_activity.html.haml +++ b/app/views/projects/_activity.html.haml @@ -13,7 +13,7 @@ = spinner :javascript - var activity = new Activities(); + var activity = new gl.Activities(); $(document).on('page:restore', function (event) { activity.reloadActivities() }) -- cgit v1.2.1 From fa936c68083810043b8c84fcbcad9fb3ce717eb6 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Mon, 21 Nov 2016 20:29:34 +0800 Subject: External jobs do not have show page nor traces Fixes #24677 --- app/views/notify/pipeline_failed_email.html.haml | 16 ++++++++++++---- app/views/notify/pipeline_failed_email.text.erb | 4 +++- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml index 38c852f0a3a..a540a080768 100644 --- a/app/views/notify/pipeline_failed_email.html.haml +++ b/app/views/notify/pipeline_failed_email.html.haml @@ -158,12 +158,20 @@ %td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#8c8c8c;font-weight:500;font-size:15px;vertical-align:middle;"} = build.stage %td{align: "right", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:20px 0;color:#8c8c8c;font-weight:500;font-size:15px;"} - %a{href: pipeline_build_url(@pipeline, build), style: "color:#3777b0;text-decoration:none;"} + - case build + - when Ci::Build + %a{href: pipeline_build_url(@pipeline, build), style: "color:#3777b0;text-decoration:none;"} + = build.name + - when GenericCommitStatus = build.name %tr.build-log - %td{colspan: "2", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 0 15px;"} - %pre{style: "font-family:Monaco,'Lucida Console','Courier New',Courier,monospace;background-color:#fafafa;border-radius:3px;overflow:hidden;white-space:pre-wrap;word-break:break-all;font-size:13px;line-height:1.4;padding:12px;color:#333333;margin:0;"} - = build.trace_html(last_lines: 10).html_safe + - case build + - when Ci::Build + %td{colspan: "2", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 0 15px;"} + %pre{style: "font-family:Monaco,'Lucida Console','Courier New',Courier,monospace;background-color:#fafafa;border-radius:3px;overflow:hidden;white-space:pre-wrap;word-break:break-all;font-size:13px;line-height:1.4;padding:12px;color:#333333;margin:0;"} + = build.trace_html(last_lines: 10).html_safe + - when GenericCommitStatus + %td{colspan: "2"} %tr.footer %td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;"} %img{alt: "GitLab", height: "33", src: image_url('mailers/ci_pipeline_notif_v1/gitlab-logo-full-horizontal.gif'), style: "display:block;margin:0 auto 1em;", width: "90"}/ diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb index 8f8084b58e1..88473532482 100644 --- a/app/views/notify/pipeline_failed_email.text.erb +++ b/app/views/notify/pipeline_failed_email.text.erb @@ -19,10 +19,12 @@ Commit Author: <%= commit.author_name %> Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) had <%= failed.size %> failed <%= 'build'.pluralize(failed.size) %>. <% failed.each do |build| -%> -Build #<%= build.id %> ( <%= pipeline_build_url(@pipeline, build) %> ) +Build #<%= build.id %><%= if build.kind_of?(Ci::Build) then " ( #{pipeline_build_url(@pipeline, build)} )" end %> Stage: <%= build.stage %> Name: <%= build.name %> +<% if build.kind_of?(Ci::Build) -%> Trace: <%= build.trace_with_state(last_lines: 10)[:text] %> +<% end -%> <% end -%> -- cgit v1.2.1 From 34d1d1676d9771fc03524a75b7bd027f56962f1f Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Fri, 18 Nov 2016 11:58:29 +0100 Subject: Add framework for rendering partials [ci skip] --- app/views/projects/services/_mattermost_command_service.html.haml | 1 + app/views/shared/_service_settings.html.haml | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 app/views/projects/services/_mattermost_command_service.html.haml (limited to 'app/views') diff --git a/app/views/projects/services/_mattermost_command_service.html.haml b/app/views/projects/services/_mattermost_command_service.html.haml new file mode 100644 index 00000000000..1ed62fbfa5b --- /dev/null +++ b/app/views/projects/services/_mattermost_command_service.html.haml @@ -0,0 +1 @@ +Hello Jared! diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml index 601ef51737a..d2576bafe8a 100644 --- a/app/views/shared/_service_settings.html.haml +++ b/app/views/shared/_service_settings.html.haml @@ -1,6 +1,10 @@ = form_errors(@service) -- if @service.help.present? +- byebug + +- if lookup_context.template_exists?(@service.type.underscore, "projects/services", true) + = render 'projects/services/mattermost_command_service' +- elsif @service.help.present? .well = preserve do = markdown @service.help -- cgit v1.2.1 From 8e5ad7c01a3617f57d4750d0be8d8d7405e70137 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Fri, 18 Nov 2016 22:46:57 +0000 Subject: Added new .help-form styling and implemented with mattermost command service help well --- app/views/admin/services/_form.html.haml | 5 +- app/views/projects/services/_form.html.haml | 17 ++-- .../services/_mattermost_command_service.html.haml | 1 - .../services/mattermost_command/_help.html.haml | 100 +++++++++++++++++++++ app/views/shared/_service_settings.html.haml | 6 +- 5 files changed, 114 insertions(+), 15 deletions(-) delete mode 100644 app/views/projects/services/_mattermost_command_service.html.haml create mode 100644 app/views/projects/services/mattermost_command/_help.html.haml (limited to 'app/views') diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index cdbfc60f9a4..f313c2d9032 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -6,5 +6,6 @@ = form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'form-horizontal fieldset-form' } do |form| = render 'shared/service_settings', form: form - .form-actions - = form.submit 'Save', class: 'btn btn-save' + .footer-block.row-content-block + .form-actions + = form.submit 'Save', class: 'btn btn-save' diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index b41edeb2c7e..8ada4c4b962 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -9,12 +9,13 @@ = form_for(@service, as: :service, url: namespace_project_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |form| = render 'shared/service_settings', form: form - = form.submit 'Save changes', class: 'btn btn-save' -   - - if @service.valid? && @service.activated? - - unless @service.can_test? - - disabled_class = 'disabled' - - disabled_title = @service.disabled_title + .footer-block.row-content-block + = form.submit 'Save changes', class: 'btn btn-save' +   + - if @service.valid? && @service.activated? + - unless @service.can_test? + - disabled_class = 'disabled' + - disabled_title = @service.disabled_title - = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service), class: "btn #{disabled_class}", title: disabled_title - = link_to "Cancel", namespace_project_services_path(@project.namespace, @project), class: "btn btn-cancel" + = link_to 'Test settings', test_namespace_project_service_path(@project.namespace, @project, @service), class: "btn #{disabled_class}", title: disabled_title + = link_to "Cancel", namespace_project_services_path(@project.namespace, @project), class: "btn btn-cancel" diff --git a/app/views/projects/services/_mattermost_command_service.html.haml b/app/views/projects/services/_mattermost_command_service.html.haml deleted file mode 100644 index 1ed62fbfa5b..00000000000 --- a/app/views/projects/services/_mattermost_command_service.html.haml +++ /dev/null @@ -1 +0,0 @@ -Hello Jared! diff --git a/app/views/projects/services/mattermost_command/_help.html.haml b/app/views/projects/services/mattermost_command/_help.html.haml new file mode 100644 index 00000000000..b3386103e7c --- /dev/null +++ b/app/views/projects/services/mattermost_command/_help.html.haml @@ -0,0 +1,100 @@ +- pretty_path_with_namespace = "#{@project ? @project.namespace.name : 'namespace'} / #{@project ? @project.name : 'name'}" +- run_actions_text = "Run action on the GitLab project: #{pretty_path_with_namespace}" + +.well + %p + This service allows GitLab users to perform common operations on this + project by entering slash commands in Mattermost. + %p + See list of available commands in Mattermost after setting up this service, + by entering + %code /<command_trigger_word> help + %p + To setup this service: + %ul.list-unstyled + %li + 1. + = link_to 'Enable custom slash commands', 'https://docs.mattermost.com/developer/slash-commands.html#enabling-custom-commands' + on your Mattermost installation. + %li + 2. + = link_to 'Add a slash command', 'https://docs.mattermost.com/developer/slash-commands.html#set-up-a-custom-command' + in Mattermost with these options: + + %hr + + .help-form + .form-group + = label_tag :display_name, 'Display name', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :display_name, "GitLab / #{pretty_path_with_namespace}", class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#display_name') + + .form-group + = label_tag :description, 'Description', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :description, run_actions_text, class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#description') + + .form-group + = label_tag nil, 'Command trigger word', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.text-block + %p Fill in the word that works best for your team. + %p + Suggestions: + %code= @project ? @project.name : 'project_name' + %code= @project ? @project.namespace.name : 'namespace_name' + %code= @project ? @project.name_with_namespace : 'namespace_name/project_name' + + .form-group + = label_tag :request_url, 'Request URL', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :request_url, service_trigger_url(@service), class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#request_url') + + .form-group + = label_tag nil, 'Request method', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.text-block POST + + .form-group + = label_tag :response_username, 'Response username', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :response_username, 'GitLab', class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#response_username') + + .form-group + = label_tag :response_icon, 'Response icon', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :response_icon, asset_path('gitlab_logo.png'), class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#response_icon') + + .form-group + = label_tag nil, 'Autocomplete', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.text-block Yes + + .form-group + = label_tag :autocomplete_hint, 'Autocomplete hint', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :autocomplete_hint, '[help]', class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#autocomplete_hint') + + .form-group + = label_tag :autocomplete_description, 'Autocomplete description', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :autocomplete_description, run_actions_text, class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#autocomplete_description') + + %hr + + %ul.list-unstyled + %li + 3. After adding the slash command, paste the + %strong token + into the field below diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml index d2576bafe8a..85c54a0fcd4 100644 --- a/app/views/shared/_service_settings.html.haml +++ b/app/views/shared/_service_settings.html.haml @@ -1,9 +1,7 @@ = form_errors(@service) -- byebug - -- if lookup_context.template_exists?(@service.type.underscore, "projects/services", true) - = render 'projects/services/mattermost_command_service' +- if lookup_context.template_exists?('help', "projects/services/#{@service.to_param}", true) + = render "projects/services/#{@service.to_param}/help", subject: @service - elsif @service.help.present? .well = preserve do -- cgit v1.2.1 From e74e53ae98bd7656eb84e907e25f2ad0b70afde9 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Sat, 19 Nov 2016 20:56:25 +0000 Subject: Pass @service using subject --- app/views/admin/services/_form.html.haml | 2 +- app/views/projects/services/_form.html.haml | 2 +- app/views/projects/services/mattermost_command/_help.html.haml | 2 +- app/views/shared/_service_settings.html.haml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index f313c2d9032..e5b8ebdf613 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -4,7 +4,7 @@ %p #{@service.description} template = form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'form-horizontal fieldset-form' } do |form| - = render 'shared/service_settings', form: form + = render 'shared/service_settings', form: form, subject: @service .footer-block.row-content-block .form-actions diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 8ada4c4b962..db51c4f8a4e 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -7,7 +7,7 @@ %p= @service.description .col-lg-9 = form_for(@service, as: :service, url: namespace_project_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |form| - = render 'shared/service_settings', form: form + = render 'shared/service_settings', form: form, subject: @service .footer-block.row-content-block = form.submit 'Save changes', class: 'btn btn-save' diff --git a/app/views/projects/services/mattermost_command/_help.html.haml b/app/views/projects/services/mattermost_command/_help.html.haml index b3386103e7c..c6e0e883752 100644 --- a/app/views/projects/services/mattermost_command/_help.html.haml +++ b/app/views/projects/services/mattermost_command/_help.html.haml @@ -51,7 +51,7 @@ .form-group = label_tag :request_url, 'Request URL', class: 'col-sm-2 col-xs-12 control-label' .col-sm-10.col-xs-12.input-group - = text_field_tag :request_url, service_trigger_url(@service), class: 'form-control input-sm', readonly: 'readonly' + = text_field_tag :request_url, service_trigger_url(subject), class: 'form-control input-sm', readonly: 'readonly' .input-group-btn = clipboard_button(clipboard_target: '#request_url') diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml index 85c54a0fcd4..755d6acc777 100644 --- a/app/views/shared/_service_settings.html.haml +++ b/app/views/shared/_service_settings.html.haml @@ -1,7 +1,7 @@ = form_errors(@service) - if lookup_context.template_exists?('help', "projects/services/#{@service.to_param}", true) - = render "projects/services/#{@service.to_param}/help", subject: @service + = render "projects/services/#{@service.to_param}/help", subject: subject - elsif @service.help.present? .well = preserve do -- cgit v1.2.1 From bf8c7dc3b13ba3661e2c2d43fa107f6c3496b3b2 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Mon, 21 Nov 2016 20:58:35 +0800 Subject: Use has_trace? instead of case switch, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7617#note_18745170 https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7617#note_18745221 --- app/views/notify/pipeline_failed_email.html.haml | 5 ++--- app/views/notify/pipeline_failed_email.text.erb | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml index a540a080768..72825e7a7e1 100644 --- a/app/views/notify/pipeline_failed_email.html.haml +++ b/app/views/notify/pipeline_failed_email.html.haml @@ -165,12 +165,11 @@ - when GenericCommitStatus = build.name %tr.build-log - - case build - - when Ci::Build + - if build.has_trace? %td{colspan: "2", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 0 15px;"} %pre{style: "font-family:Monaco,'Lucida Console','Courier New',Courier,monospace;background-color:#fafafa;border-radius:3px;overflow:hidden;white-space:pre-wrap;word-break:break-all;font-size:13px;line-height:1.4;padding:12px;color:#333333;margin:0;"} = build.trace_html(last_lines: 10).html_safe - - when GenericCommitStatus + - else %td{colspan: "2"} %tr.footer %td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;"} diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb index 88473532482..d4c03c01bc7 100644 --- a/app/views/notify/pipeline_failed_email.text.erb +++ b/app/views/notify/pipeline_failed_email.text.erb @@ -22,7 +22,7 @@ Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) had <%= failed. Build #<%= build.id %><%= if build.kind_of?(Ci::Build) then " ( #{pipeline_build_url(@pipeline, build)} )" end %> Stage: <%= build.stage %> Name: <%= build.name %> -<% if build.kind_of?(Ci::Build) -%> +<% if build.has_trace? -%> Trace: <%= build.trace_with_state(last_lines: 10)[:text] %> <% end -%> -- cgit v1.2.1 From 1a5eedf3fedb09a3f6a7210ce435c95812c55013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Fri, 18 Nov 2016 18:30:07 +0100 Subject: Fix a wrong "The build for this merge request failed" message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also allow merge request to be merged with skipped pipeline and the "only allow merge when pipeline is green" feature enabled Signed-off-by: Rémy Coutable --- app/views/projects/merge_requests/widget/_open.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/merge_requests/widget/_open.html.haml b/app/views/projects/merge_requests/widget/_open.html.haml index 01314eb37d0..ac26aa569ba 100644 --- a/app/views/projects/merge_requests/widget/_open.html.haml +++ b/app/views/projects/merge_requests/widget/_open.html.haml @@ -23,7 +23,7 @@ = render 'projects/merge_requests/widget/open/merge_when_build_succeeds' - elsif !@merge_request.can_be_merged_by?(current_user) = render 'projects/merge_requests/widget/open/not_allowed' - - elsif !@merge_request.mergeable_ci_state? + - elsif !@merge_request.mergeable_ci_state? && (@pipeline.failed? || @pipeline.canceled?) = render 'projects/merge_requests/widget/open/build_failed' - elsif !@merge_request.mergeable_discussions_state? = render 'projects/merge_requests/widget/open/unresolved_discussions' -- cgit v1.2.1 From 67fde38806bd843c8008766edf49023e4c63df81 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Mon, 21 Nov 2016 13:43:31 +0100 Subject: Improve the mattermost help box Also added tests, and moved the slack test to a better location. --- .../services/mattermost_command/_help.html.haml | 100 --------------------- .../mattermost_slash_commands/_help.html.haml | 100 +++++++++++++++++++++ 2 files changed, 100 insertions(+), 100 deletions(-) delete mode 100644 app/views/projects/services/mattermost_command/_help.html.haml create mode 100644 app/views/projects/services/mattermost_slash_commands/_help.html.haml (limited to 'app/views') diff --git a/app/views/projects/services/mattermost_command/_help.html.haml b/app/views/projects/services/mattermost_command/_help.html.haml deleted file mode 100644 index c6e0e883752..00000000000 --- a/app/views/projects/services/mattermost_command/_help.html.haml +++ /dev/null @@ -1,100 +0,0 @@ -- pretty_path_with_namespace = "#{@project ? @project.namespace.name : 'namespace'} / #{@project ? @project.name : 'name'}" -- run_actions_text = "Run action on the GitLab project: #{pretty_path_with_namespace}" - -.well - %p - This service allows GitLab users to perform common operations on this - project by entering slash commands in Mattermost. - %p - See list of available commands in Mattermost after setting up this service, - by entering - %code /<command_trigger_word> help - %p - To setup this service: - %ul.list-unstyled - %li - 1. - = link_to 'Enable custom slash commands', 'https://docs.mattermost.com/developer/slash-commands.html#enabling-custom-commands' - on your Mattermost installation. - %li - 2. - = link_to 'Add a slash command', 'https://docs.mattermost.com/developer/slash-commands.html#set-up-a-custom-command' - in Mattermost with these options: - - %hr - - .help-form - .form-group - = label_tag :display_name, 'Display name', class: 'col-sm-2 col-xs-12 control-label' - .col-sm-10.col-xs-12.input-group - = text_field_tag :display_name, "GitLab / #{pretty_path_with_namespace}", class: 'form-control input-sm', readonly: 'readonly' - .input-group-btn - = clipboard_button(clipboard_target: '#display_name') - - .form-group - = label_tag :description, 'Description', class: 'col-sm-2 col-xs-12 control-label' - .col-sm-10.col-xs-12.input-group - = text_field_tag :description, run_actions_text, class: 'form-control input-sm', readonly: 'readonly' - .input-group-btn - = clipboard_button(clipboard_target: '#description') - - .form-group - = label_tag nil, 'Command trigger word', class: 'col-sm-2 col-xs-12 control-label' - .col-sm-10.col-xs-12.text-block - %p Fill in the word that works best for your team. - %p - Suggestions: - %code= @project ? @project.name : 'project_name' - %code= @project ? @project.namespace.name : 'namespace_name' - %code= @project ? @project.name_with_namespace : 'namespace_name/project_name' - - .form-group - = label_tag :request_url, 'Request URL', class: 'col-sm-2 col-xs-12 control-label' - .col-sm-10.col-xs-12.input-group - = text_field_tag :request_url, service_trigger_url(subject), class: 'form-control input-sm', readonly: 'readonly' - .input-group-btn - = clipboard_button(clipboard_target: '#request_url') - - .form-group - = label_tag nil, 'Request method', class: 'col-sm-2 col-xs-12 control-label' - .col-sm-10.col-xs-12.text-block POST - - .form-group - = label_tag :response_username, 'Response username', class: 'col-sm-2 col-xs-12 control-label' - .col-sm-10.col-xs-12.input-group - = text_field_tag :response_username, 'GitLab', class: 'form-control input-sm', readonly: 'readonly' - .input-group-btn - = clipboard_button(clipboard_target: '#response_username') - - .form-group - = label_tag :response_icon, 'Response icon', class: 'col-sm-2 col-xs-12 control-label' - .col-sm-10.col-xs-12.input-group - = text_field_tag :response_icon, asset_path('gitlab_logo.png'), class: 'form-control input-sm', readonly: 'readonly' - .input-group-btn - = clipboard_button(clipboard_target: '#response_icon') - - .form-group - = label_tag nil, 'Autocomplete', class: 'col-sm-2 col-xs-12 control-label' - .col-sm-10.col-xs-12.text-block Yes - - .form-group - = label_tag :autocomplete_hint, 'Autocomplete hint', class: 'col-sm-2 col-xs-12 control-label' - .col-sm-10.col-xs-12.input-group - = text_field_tag :autocomplete_hint, '[help]', class: 'form-control input-sm', readonly: 'readonly' - .input-group-btn - = clipboard_button(clipboard_target: '#autocomplete_hint') - - .form-group - = label_tag :autocomplete_description, 'Autocomplete description', class: 'col-sm-2 col-xs-12 control-label' - .col-sm-10.col-xs-12.input-group - = text_field_tag :autocomplete_description, run_actions_text, class: 'form-control input-sm', readonly: 'readonly' - .input-group-btn - = clipboard_button(clipboard_target: '#autocomplete_description') - - %hr - - %ul.list-unstyled - %li - 3. After adding the slash command, paste the - %strong token - into the field below diff --git a/app/views/projects/services/mattermost_slash_commands/_help.html.haml b/app/views/projects/services/mattermost_slash_commands/_help.html.haml new file mode 100644 index 00000000000..15aa2006c02 --- /dev/null +++ b/app/views/projects/services/mattermost_slash_commands/_help.html.haml @@ -0,0 +1,100 @@ +- pretty_path_with_namespace = "#{@project ? @project.namespace.name : 'namespace'} / #{@project ? @project.name : 'name'}" +- run_actions_text = "Perform common operations on this project: #{pretty_path_with_namespace}" + +.well + %p + This service allows GitLab users to perform common operations on this + project by entering slash commands in Mattermost. + %p + See list of available commands in Mattermost after setting up this service, + by entering + %code /<command_trigger_word> help + %p + To setup this service: + %ul.list-unstyled + %li + 1. + = link_to 'Enable custom slash commands', 'https://docs.mattermost.com/developer/slash-commands.html#enabling-custom-commands' + on your Mattermost installation + %li + 2. + = link_to 'Add a slash command', 'https://docs.mattermost.com/developer/slash-commands.html#set-up-a-custom-command' + in Mattermost with these options: + + %hr + + .help-form + .form-group + = label_tag :display_name, 'Display name', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :display_name, "GitLab / #{pretty_path_with_namespace}", class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#display_name') + + .form-group + = label_tag :description, 'Description', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :description, run_actions_text, class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#description') + + .form-group + = label_tag nil, 'Command trigger word', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.text-block + %p Fill in the word that works best for your team. + %p + Suggestions: + %code= 'gitlab' + %code= @project.path # Path contains no spaces, but dashes + %code= @project.path_with_namespace + + .form-group + = label_tag :request_url, 'Request URL', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :request_url, service_trigger_url(subject), class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#request_url') + + .form-group + = label_tag nil, 'Request method', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.text-block POST + + .form-group + = label_tag :response_username, 'Response username', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :response_username, 'GitLab', class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#response_username') + + .form-group + = label_tag :response_icon, 'Response icon', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :response_icon, asset_url('gitlab_logo.png'), class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#response_icon') + + .form-group + = label_tag nil, 'Autocomplete', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.text-block Yes + + .form-group + = label_tag :autocomplete_hint, 'Autocomplete hint', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :autocomplete_hint, '[help]', class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#autocomplete_hint') + + .form-group + = label_tag :autocomplete_description, 'Autocomplete description', class: 'col-sm-2 col-xs-12 control-label' + .col-sm-10.col-xs-12.input-group + = text_field_tag :autocomplete_description, run_actions_text, class: 'form-control input-sm', readonly: 'readonly' + .input-group-btn + = clipboard_button(clipboard_target: '#autocomplete_description') + + %hr + + %ul.list-unstyled + %li + 3. After adding the slash command, paste the + %strong token + into the field below -- cgit v1.2.1 From 438f0915e7fbd60e6cc597656e9b25284c52f7de Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 22 Nov 2016 01:12:19 +0800 Subject: Use partials instead of simple switch case: Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7617#note_18745137 --- app/views/notify/ci/builds/_build.html.haml | 2 ++ app/views/notify/ci/builds/_build.text.erb | 1 + .../generic_commit_statuses/_generic_commit_status.html.haml | 1 + .../notify/generic_commit_statuses/_generic_commit_status.text.erb | 1 + app/views/notify/pipeline_failed_email.html.haml | 7 +------ app/views/notify/pipeline_failed_email.text.erb | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 app/views/notify/ci/builds/_build.html.haml create mode 100644 app/views/notify/ci/builds/_build.text.erb create mode 100644 app/views/notify/generic_commit_statuses/_generic_commit_status.html.haml create mode 100644 app/views/notify/generic_commit_statuses/_generic_commit_status.text.erb (limited to 'app/views') diff --git a/app/views/notify/ci/builds/_build.html.haml b/app/views/notify/ci/builds/_build.html.haml new file mode 100644 index 00000000000..38cd4e5e145 --- /dev/null +++ b/app/views/notify/ci/builds/_build.html.haml @@ -0,0 +1,2 @@ +%a{href: pipeline_build_url(pipeline, build), style: "color:#3777b0;text-decoration:none;"} + = build.name diff --git a/app/views/notify/ci/builds/_build.text.erb b/app/views/notify/ci/builds/_build.text.erb new file mode 100644 index 00000000000..d510de3dbe9 --- /dev/null +++ b/app/views/notify/ci/builds/_build.text.erb @@ -0,0 +1 @@ +Build #<%= build.id %> ( <%= pipeline_build_url(@pipeline, build) %> ) diff --git a/app/views/notify/generic_commit_statuses/_generic_commit_status.html.haml b/app/views/notify/generic_commit_statuses/_generic_commit_status.html.haml new file mode 100644 index 00000000000..b6563b185b3 --- /dev/null +++ b/app/views/notify/generic_commit_statuses/_generic_commit_status.html.haml @@ -0,0 +1 @@ += build.name diff --git a/app/views/notify/generic_commit_statuses/_generic_commit_status.text.erb b/app/views/notify/generic_commit_statuses/_generic_commit_status.text.erb new file mode 100644 index 00000000000..8e89c52a1f3 --- /dev/null +++ b/app/views/notify/generic_commit_statuses/_generic_commit_status.text.erb @@ -0,0 +1 @@ +Build #<%= build.id %> diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml index 72825e7a7e1..58d331acb33 100644 --- a/app/views/notify/pipeline_failed_email.html.haml +++ b/app/views/notify/pipeline_failed_email.html.haml @@ -158,12 +158,7 @@ %td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#8c8c8c;font-weight:500;font-size:15px;vertical-align:middle;"} = build.stage %td{align: "right", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:20px 0;color:#8c8c8c;font-weight:500;font-size:15px;"} - - case build - - when Ci::Build - %a{href: pipeline_build_url(@pipeline, build), style: "color:#3777b0;text-decoration:none;"} - = build.name - - when GenericCommitStatus - = build.name + = render "notify/#{build.to_partial_path}", pipeline: @pipeline, build: build %tr.build-log - if build.has_trace? %td{colspan: "2", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 0 15px;"} diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb index d4c03c01bc7..ddb21cc17e8 100644 --- a/app/views/notify/pipeline_failed_email.text.erb +++ b/app/views/notify/pipeline_failed_email.text.erb @@ -19,7 +19,7 @@ Commit Author: <%= commit.author_name %> Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) had <%= failed.size %> failed <%= 'build'.pluralize(failed.size) %>. <% failed.each do |build| -%> -Build #<%= build.id %><%= if build.kind_of?(Ci::Build) then " ( #{pipeline_build_url(@pipeline, build)} )" end %> +<%= render "notify/#{build.to_partial_path}", pipeline: @pipeline, build: build %> Stage: <%= build.stage %> Name: <%= build.name %> <% if build.has_trace? -%> -- cgit v1.2.1 From 6bfa3c93ed49d65783de824e4e99fec79adedf4e Mon Sep 17 00:00:00 2001 From: Adam Niedzielski Date: Mon, 21 Nov 2016 15:16:57 +0100 Subject: Warn that branch does not exist instead of saying that there is nothing to merge in merge request page --- app/views/projects/merge_requests/widget/_open.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/merge_requests/widget/_open.html.haml b/app/views/projects/merge_requests/widget/_open.html.haml index 01314eb37d0..eda6938bf21 100644 --- a/app/views/projects/merge_requests/widget/_open.html.haml +++ b/app/views/projects/merge_requests/widget/_open.html.haml @@ -9,10 +9,10 @@ - if @project.archived? = render 'projects/merge_requests/widget/open/archived' - - elsif @merge_request.commits.blank? - = render 'projects/merge_requests/widget/open/nothing' - elsif @merge_request.branch_missing? = render 'projects/merge_requests/widget/open/missing_branch' + - elsif @merge_request.commits.blank? + = render 'projects/merge_requests/widget/open/nothing' - elsif @merge_request.unchecked? = render 'projects/merge_requests/widget/open/check' - elsif @merge_request.cannot_be_merged? && !resolved_conflicts -- cgit v1.2.1 From 5c747ded7ecc1d7da418a854d12ad2906b173b7b Mon Sep 17 00:00:00 2001 From: Liz Lam Date: Thu, 17 Nov 2016 23:17:59 -0800 Subject: Edit help text to clarify that tags are annotated. --- app/views/projects/tags/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index 3a097750d6e..c06a413eb2f 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -23,7 +23,7 @@ = label_tag :message, nil, class: 'control-label' .col-sm-10 = text_area_tag :message, nil, required: false, tabindex: 3, class: 'form-control', rows: 5 - .help-block Optionally, enter a message to create an annotated tag. + .help-block Optionally, add a message to the tag. %hr .form-group = label_tag :release_description, 'Release notes', class: 'control-label' -- cgit v1.2.1 From 10282283b04b6516542cb2fe86e33b886d17b129 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Thu, 20 Oct 2016 18:24:36 -0500 Subject: Cycle analytics second iteration - Vue app has been completely rewritten - New components - Basic CSS --- app/views/projects/cycle_analytics/show.html.haml | 192 +++++++++++++++++++--- app/views/shared/icons/_delta.svg | 3 + app/views/shared/icons/_down_arrow.svg | 3 + 3 files changed, 174 insertions(+), 24 deletions(-) create mode 100644 app/views/shared/icons/_delta.svg create mode 100644 app/views/shared/icons/_down_arrow.svg (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 247d612ba6f..06a6e24ac49 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -2,14 +2,17 @@ - page_title "Cycle Analytics" - content_for :page_specific_javascripts do - = page_specific_javascript_tag('cycle_analytics/cycle_analytics_bundle.js') + = page_specific_javascript_tag("cycle_analytics/cycle_analytics_bundle.js") = render "projects/pipelines/head" -#cycle-analytics{class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) }} +#cycle-analytics{ class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } } + .empty-dialog-message{ "v-if" => "!isEmptyDialogDismissed" } + %p There is nothing happened + = icon("times", class: "dismiss-icon", "@click" => "dismissEmptyDialog()") - .bordered-box.landing.content-block{"v-if" => "!isHelpDismissed"} - = icon('times', class: 'dismiss-icon', "@click" => "dismissLanding()") + .bordered-box.landing.content-block{"v-if" => "!isOverviewDialogDismissed"} + = icon("times", class: "dismiss-icon", "@click" => "dismissOverviewDialog()") .row .col-sm-3.col-xs-12.svg-container = custom_icon('icon_cycle_analytics_splash') @@ -20,21 +23,17 @@ Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project. = link_to "Read more", help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' - = icon("spinner spin", "v-show" => "isLoading") - .wrapper{"v-show" => "!isLoading && !hasError"} .panel.panel-default .panel-heading Pipeline Health - .content-block .container-fluid .row - .col-sm-3.col-xs-12.column{"v-for" => "item in analytics.summary"} + .col-sm-3.col-xs-12.column{"v-for" => "item in state.analytics.summary"} %h3.header {{item.value}} %p.text {{item.title}} - .col-sm-3.col-xs-12.column .dropdown.inline.js-ca-dropdown %button.dropdown-menu-toggle{"data-toggle" => "dropdown", :type => "button"} @@ -42,22 +41,167 @@ %i.fa.fa-chevron-down %ul.dropdown-menu.dropdown-menu-align-right %li - %a{'href' => "#", 'data-value' => '30'} + %a{ "href" => "#", "data-value" => "30" } Last 30 days %li - %a{'href' => "#", 'data-value' => '90'} + %a{ "href" => "#", "data-value" => "90" } Last 90 days + .panel.panel-default.stage-panel + .panel-heading + %nav.col-headers + %ul + %li.stage-header + %span.stage-name + Stage + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The phase of the development lifecycle.", "aria-hidden" => "true" } + %li.median-header + %span.stage-name + Median + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" } + %li.delta-header + %span.stage-name + = render "shared/icons/delta.svg" + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The difference between the previous and last measure, expressed as positive or negative values. E.g., if the previous value was 5 and the new value is 7, the delta is +2.", "aria-hidden" => "true" } + %li.event-header + %span.stage-name + {{ currentStage ? currentStage.legendTitle : 'Related Issues' }} + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" } + %li.total-time-header + %span.stage-name + Total Time + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The time taken by each data entry gathered by that stage.", "aria-hidden" => "true" } + .stage-panel-body + %nav.stage-nav + %ul + %stage-button{ "inline-template" => true, + "v-for" => "stage in state.stages", + ":stage" => "stage", + ":on-stage-click" => "selectStage" } + %li.stage-nav-item{ ":class" => "classObject", "@click" => "onClick(stage)" } + .stage-name + {{stage.name}} + .stage-median + 20 hrs 21 mins + .stage-delta + + 20 days + %span.stage-direction + = render "shared/icons/down_arrow.svg" + .section.stage-events + %template{ "v-if" => "isLoadingStage" } + = icon("spinner spin", "v-show" => "isLoadingStage") + %template{ "v-if" => "isEmptyStage" } + %p No results + %template{ "v-if" => "state.items.length && !isLoadingStage && !isEmptyStage" } + %component{ ":is" => "currentStage.component", ":items" => "state.items" } + +%script{ type: 'text/x-template', id: 'stage-issue-component' } + %div + .events-description + Time before an issue get scheluded + %ul.stage-event-list + %li.stage-event-item{ "v-for" => "issue in items" } + %item-issue-component{ ":issue" => "issue" } + +%script{ type: 'text/x-template', id: 'stage-plan-component' } + %div + .events-description + Time before an issue starts implementation + %ul.event-list + %li.event-item{ "v-for" => "commit in items" } + %item-commit-component{ ":commit" => "commit" } + +%script{ type: 'text/x-template', id: 'stage-code-component' } + %div + .events-description + Time spent coding + %ul + %li{ "v-for" => "mergeRequest in items" } + %item-merge-request-component{ ":merge-request" => "mergeRequest" } + +%script{ type: 'text/x-template', id: 'stage-test-component' } + %div + .events-description + The time taken to build and test the application + %ul + %li{ "v-for" => "build in items" } + %item-build-component{ ":build" => "build" } + + +%script{ type: 'text/x-template', id: 'stage-review-component' } + %div + .events-description + The time taken to review the code + %ul + %li{ "v-for" => "mergeRequest in items" } + %item-merge-request-component{ ":merge-request" => "mergeRequest" } + + +%script{ type: 'text/x-template', id: 'stage-staging-component' } + %div + .events-description + The time taken in staging + %ul + %li{ "v-for" => "build in items" } + %item-build-component{ ":build" => "build" } + +%script{ type: 'text/x-template', id: 'stage-production-component' } + %div + .events-description + The total time taken from idea to production + %ul + %li{ "v-for" => "issue in items" } + %item-issue-component{ ":issue" => "issue" } + +%script{ type: 'text/x-template', id: 'item-issue-component' } + .item-details + %img.avatar{:src => "https://secure.gravatar.com/avatar/3731e7dd4f2b4fa8ae184c0a7519dd58?s=64&d=identicon"}/ + %h5.item-title + %a{ :href => "issue.url" } + {{ issue.title }} + %a{ :href => "issue.url" } + = '#{{issue.id}}' + %span + Opened + %a{:href => "issue.url"} + {{ issue.datetime }} + %span + by + %a{:href => "issue.profile"} + {{ issue.author }} + .item-time + %span.hours{ "v-if" => "issue.totalTime.hours"} + {{ issue.totalTime.hours }} + %abbr{:title => "Hours"} hr + %span.minutes{ "v-if" => "issue.totalTime.minutes" } + {{ issue.totalTime.minutes }} + %abbr{:title => "Minutes"} mins + +%script{ type: 'text/x-template', id: 'item-commit-component' } + %div + %p + %h5 + %a{:href => "commit.url"} + {{ commit.title }} + %span + First + %a{:href => "#"} + {{ commit.hash }} + pushed by + %a{:href => "commit.profile"} + {{ commit.author }} + +%script{ type: 'text/x-template', id: 'item-merge-request-component' } + %div + %p + %h5 + merge request - + %a{:href => "mergeRequest.url"} + {{ mergeRequest.title }} - .bordered-box - %ul.content-list - %li{"v-for" => "item in analytics.stats"} - .container-fluid - .row - .col-xs-8.title-col - %p.title - {{item.title}} - %p.text - {{item.description}} - .col-xs-4.value-col - %span - {{item.value}} +%script{ type: 'text/x-template', id: 'item-build-component' } + %div + %p + %h5 + build - + %a{:href => "build.url"} + {{ build.title }} diff --git a/app/views/shared/icons/_delta.svg b/app/views/shared/icons/_delta.svg new file mode 100644 index 00000000000..7c0c0d3999c --- /dev/null +++ b/app/views/shared/icons/_delta.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/views/shared/icons/_down_arrow.svg b/app/views/shared/icons/_down_arrow.svg new file mode 100644 index 00000000000..123116f4ca9 --- /dev/null +++ b/app/views/shared/icons/_down_arrow.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file -- cgit v1.2.1 From b0d2dffc0dcaec59973afc87432935b0df320aeb Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 9 Nov 2016 01:02:06 -0500 Subject: Move ItemIssueComponent template to component JS file --- app/views/projects/cycle_analytics/show.html.haml | 24 ----------------------- 1 file changed, 24 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 06a6e24ac49..aa72a801938 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -152,30 +152,6 @@ %li{ "v-for" => "issue in items" } %item-issue-component{ ":issue" => "issue" } -%script{ type: 'text/x-template', id: 'item-issue-component' } - .item-details - %img.avatar{:src => "https://secure.gravatar.com/avatar/3731e7dd4f2b4fa8ae184c0a7519dd58?s=64&d=identicon"}/ - %h5.item-title - %a{ :href => "issue.url" } - {{ issue.title }} - %a{ :href => "issue.url" } - = '#{{issue.id}}' - %span - Opened - %a{:href => "issue.url"} - {{ issue.datetime }} - %span - by - %a{:href => "issue.profile"} - {{ issue.author }} - .item-time - %span.hours{ "v-if" => "issue.totalTime.hours"} - {{ issue.totalTime.hours }} - %abbr{:title => "Hours"} hr - %span.minutes{ "v-if" => "issue.totalTime.minutes" } - {{ issue.totalTime.minutes }} - %abbr{:title => "Minutes"} mins - %script{ type: 'text/x-template', id: 'item-commit-component' } %div %p -- cgit v1.2.1 From 1fc9b7aea867b9de2ccb5a8ca5fb8c546cc6c322 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 9 Nov 2016 01:17:20 -0500 Subject: Move StageIssueComponent template to component in JS file --- app/views/projects/cycle_analytics/show.html.haml | 8 -------- 1 file changed, 8 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index aa72a801938..5536198eab8 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -94,14 +94,6 @@ %template{ "v-if" => "state.items.length && !isLoadingStage && !isEmptyStage" } %component{ ":is" => "currentStage.component", ":items" => "state.items" } -%script{ type: 'text/x-template', id: 'stage-issue-component' } - %div - .events-description - Time before an issue get scheluded - %ul.stage-event-list - %li.stage-event-item{ "v-for" => "issue in items" } - %item-issue-component{ ":issue" => "issue" } - %script{ type: 'text/x-template', id: 'stage-plan-component' } %div .events-description -- cgit v1.2.1 From fe72c3fea31f34ddfffbf9aea59da60e8509eb0d Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 9 Nov 2016 01:19:42 -0500 Subject: Move StagePlanComponent template to component in JS file --- app/views/projects/cycle_analytics/show.html.haml | 8 -------- 1 file changed, 8 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 5536198eab8..bb4854d88c5 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -94,14 +94,6 @@ %template{ "v-if" => "state.items.length && !isLoadingStage && !isEmptyStage" } %component{ ":is" => "currentStage.component", ":items" => "state.items" } -%script{ type: 'text/x-template', id: 'stage-plan-component' } - %div - .events-description - Time before an issue starts implementation - %ul.event-list - %li.event-item{ "v-for" => "commit in items" } - %item-commit-component{ ":commit" => "commit" } - %script{ type: 'text/x-template', id: 'stage-code-component' } %div .events-description -- cgit v1.2.1 From f8c572a2f1ccc808cec63aee3a091930c81992fd Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 9 Nov 2016 02:15:50 -0500 Subject: Apply styling to ItemCommitComponent --- app/views/projects/cycle_analytics/show.html.haml | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index bb4854d88c5..ea3ae13b6d8 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -119,7 +119,6 @@ %li{ "v-for" => "mergeRequest in items" } %item-merge-request-component{ ":merge-request" => "mergeRequest" } - %script{ type: 'text/x-template', id: 'stage-staging-component' } %div .events-description @@ -136,20 +135,6 @@ %li{ "v-for" => "issue in items" } %item-issue-component{ ":issue" => "issue" } -%script{ type: 'text/x-template', id: 'item-commit-component' } - %div - %p - %h5 - %a{:href => "commit.url"} - {{ commit.title }} - %span - First - %a{:href => "#"} - {{ commit.hash }} - pushed by - %a{:href => "commit.profile"} - {{ commit.author }} - %script{ type: 'text/x-template', id: 'item-merge-request-component' } %div %p -- cgit v1.2.1 From f9cfc87c7ddac2393cdb8a150412ec37f2e04c56 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Tue, 15 Nov 2016 15:19:41 -0500 Subject: Move templates to its corresponding component --- app/views/projects/cycle_analytics/show.html.haml | 57 ----------------------- 1 file changed, 57 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index ea3ae13b6d8..a4255aceb2a 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -93,60 +93,3 @@ %p No results %template{ "v-if" => "state.items.length && !isLoadingStage && !isEmptyStage" } %component{ ":is" => "currentStage.component", ":items" => "state.items" } - -%script{ type: 'text/x-template', id: 'stage-code-component' } - %div - .events-description - Time spent coding - %ul - %li{ "v-for" => "mergeRequest in items" } - %item-merge-request-component{ ":merge-request" => "mergeRequest" } - -%script{ type: 'text/x-template', id: 'stage-test-component' } - %div - .events-description - The time taken to build and test the application - %ul - %li{ "v-for" => "build in items" } - %item-build-component{ ":build" => "build" } - - -%script{ type: 'text/x-template', id: 'stage-review-component' } - %div - .events-description - The time taken to review the code - %ul - %li{ "v-for" => "mergeRequest in items" } - %item-merge-request-component{ ":merge-request" => "mergeRequest" } - -%script{ type: 'text/x-template', id: 'stage-staging-component' } - %div - .events-description - The time taken in staging - %ul - %li{ "v-for" => "build in items" } - %item-build-component{ ":build" => "build" } - -%script{ type: 'text/x-template', id: 'stage-production-component' } - %div - .events-description - The total time taken from idea to production - %ul - %li{ "v-for" => "issue in items" } - %item-issue-component{ ":issue" => "issue" } - -%script{ type: 'text/x-template', id: 'item-merge-request-component' } - %div - %p - %h5 - merge request - - %a{:href => "mergeRequest.url"} - {{ mergeRequest.title }} - -%script{ type: 'text/x-template', id: 'item-build-component' } - %div - %p - %h5 - build - - %a{:href => "build.url"} - {{ build.title }} -- cgit v1.2.1 From 20efd43f1670ed9bca9912a2fa2ee70b12a24fdf Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Tue, 15 Nov 2016 17:15:30 -0500 Subject: Set stage descriptions dynamically --- app/views/projects/cycle_analytics/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index a4255aceb2a..8da0fbba783 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -92,4 +92,4 @@ %template{ "v-if" => "isEmptyStage" } %p No results %template{ "v-if" => "state.items.length && !isLoadingStage && !isEmptyStage" } - %component{ ":is" => "currentStage.component", ":items" => "state.items" } + %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.items" } -- cgit v1.2.1 From bbd1c788621e3e186f37c7d43d16915f68c3576a Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Tue, 15 Nov 2016 18:38:48 -0500 Subject: Show friendly message when stage has no data --- .../cycle_analytics/_empty_stage.html.haml | 12 ++++++++++ app/views/projects/cycle_analytics/show.html.haml | 2 +- app/views/shared/icons/_icon_no_data.svg | 27 ++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 app/views/projects/cycle_analytics/_empty_stage.html.haml create mode 100644 app/views/shared/icons/_icon_no_data.svg (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/_empty_stage.html.haml b/app/views/projects/cycle_analytics/_empty_stage.html.haml new file mode 100644 index 00000000000..f839ec9c018 --- /dev/null +++ b/app/views/projects/cycle_analytics/_empty_stage.html.haml @@ -0,0 +1,12 @@ +.empty-stage-container + .empty-stage + .icon-no-data + = render "shared/icons/icon_no_data.svg" + %h4 We don’t have enough data to show this stage. + %p + The test phase measures the median time to run the entire pipeline for that project. + It’s related to the time GitLab CI takes to run every job for the commits pushed + to that merge request defined in the previous stage. + Learn more about the + %a{ :href => "https://docs.gitlab.com/ce/user/project/cycle_analytics.html" } + expected workflow and calculations. diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 8da0fbba783..195b10e0779 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -90,6 +90,6 @@ %template{ "v-if" => "isLoadingStage" } = icon("spinner spin", "v-show" => "isLoadingStage") %template{ "v-if" => "isEmptyStage" } - %p No results + = render partial: "empty_stage" %template{ "v-if" => "state.items.length && !isLoadingStage && !isEmptyStage" } %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.items" } diff --git a/app/views/shared/icons/_icon_no_data.svg b/app/views/shared/icons/_icon_no_data.svg new file mode 100644 index 00000000000..ced8653b88c --- /dev/null +++ b/app/views/shared/icons/_icon_no_data.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1 From ee6b991f0b16e55009288b72a46204c23b08654b Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 16 Nov 2016 13:45:23 -0500 Subject: Remove delta column and use stage data from response --- app/views/projects/cycle_analytics/show.html.haml | 14 +++----------- app/views/shared/icons/_down_arrow.svg | 3 --- 2 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 app/views/shared/icons/_down_arrow.svg (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 195b10e0779..1984499b8d5 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -31,7 +31,7 @@ .content-block .container-fluid .row - .col-sm-3.col-xs-12.column{"v-for" => "item in state.analytics.summary"} + .col-sm-3.col-xs-12.column{"v-for" => "item in state.summary"} %h3.header {{item.value}} %p.text {{item.title}} .col-sm-3.col-xs-12.column @@ -58,10 +58,6 @@ %span.stage-name Median %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" } - %li.delta-header - %span.stage-name - = render "shared/icons/delta.svg" - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The difference between the previous and last measure, expressed as positive or negative values. E.g., if the previous value was 5 and the new value is 7, the delta is +2.", "aria-hidden" => "true" } %li.event-header %span.stage-name {{ currentStage ? currentStage.legendTitle : 'Related Issues' }} @@ -79,13 +75,9 @@ ":on-stage-click" => "selectStage" } %li.stage-nav-item{ ":class" => "classObject", "@click" => "onClick(stage)" } .stage-name - {{stage.name}} + {{ stage.title }} .stage-median - 20 hrs 21 mins - .stage-delta - + 20 days - %span.stage-direction - = render "shared/icons/down_arrow.svg" + {{ stage.value }} .section.stage-events %template{ "v-if" => "isLoadingStage" } = icon("spinner spin", "v-show" => "isLoadingStage") diff --git a/app/views/shared/icons/_down_arrow.svg b/app/views/shared/icons/_down_arrow.svg deleted file mode 100644 index 123116f4ca9..00000000000 --- a/app/views/shared/icons/_down_arrow.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file -- cgit v1.2.1 From 06fd2879ee4f5936e0be9744cbd208079f2542bd Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 16 Nov 2016 13:57:32 -0500 Subject: Provide stage legend on server response --- app/views/projects/cycle_analytics/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 1984499b8d5..cf496b46e4f 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -60,7 +60,7 @@ %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" } %li.event-header %span.stage-name - {{ currentStage ? currentStage.legendTitle : 'Related Issues' }} + {{ currentStage ? currentStage.legend : 'Related Issues' }} %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" } %li.total-time-header %span.stage-name -- cgit v1.2.1 From 2748a01a3a0dc6c6e946c41c68ec866bc87e8f8b Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 16 Nov 2016 16:11:27 -0500 Subject: Use stage description form endpoint response --- app/views/projects/cycle_analytics/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index cf496b46e4f..010f64b3bb5 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -83,5 +83,5 @@ = icon("spinner spin", "v-show" => "isLoadingStage") %template{ "v-if" => "isEmptyStage" } = render partial: "empty_stage" - %template{ "v-if" => "state.items.length && !isLoadingStage && !isEmptyStage" } - %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.items" } + %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } + %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } -- cgit v1.2.1 From 6efe1531bdad8f48bc24a0fa315d74132bd139b2 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Fri, 18 Nov 2016 15:18:49 -0500 Subject: Delete StageButton component --- app/views/projects/cycle_analytics/show.html.haml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 010f64b3bb5..bebe2782bd7 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -69,15 +69,11 @@ .stage-panel-body %nav.stage-nav %ul - %stage-button{ "inline-template" => true, - "v-for" => "stage in state.stages", - ":stage" => "stage", - ":on-stage-click" => "selectStage" } - %li.stage-nav-item{ ":class" => "classObject", "@click" => "onClick(stage)" } - .stage-name - {{ stage.title }} - .stage-median - {{ stage.value }} + %li.stage-nav-item{ ':class' => '{active: stage.active}', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" } + .stage-name + {{ stage.title }} + .stage-median + {{ stage.value }} .section.stage-events %template{ "v-if" => "isLoadingStage" } = icon("spinner spin", "v-show" => "isLoadingStage") -- cgit v1.2.1 From 8a26021b2e7adc669782721ebeabb58314a6e29d Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Fri, 18 Nov 2016 15:59:04 -0500 Subject: Fix empty stage presentation --- app/views/projects/cycle_analytics/show.html.haml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index bebe2782bd7..521ae085f61 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -69,15 +69,19 @@ .stage-panel-body %nav.stage-nav %ul - %li.stage-nav-item{ ':class' => '{active: stage.active}', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" } + %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" } .stage-name {{ stage.title }} .stage-median - {{ stage.value }} + %template{ "v-if" => "stage.value" } + {{ stage.value }} + %template{ "v-else" => true } + %span.stage-empty + No enough data .section.stage-events %template{ "v-if" => "isLoadingStage" } = icon("spinner spin", "v-show" => "isLoadingStage") - %template{ "v-if" => "isEmptyStage" } + %template{ "v-if" => "isEmptyStage && !isLoadingStage" } = render partial: "empty_stage" %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } -- cgit v1.2.1 From 4dbcf6723eaa8d89c2f4e36d4e8a6f2bc76fa1d1 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Fri, 18 Nov 2016 18:22:07 -0500 Subject: Add overview view for Cycle Analytics --- .../_empty_cycle_analytics.html.haml | 2 + .../projects/cycle_analytics/_overview.html.haml | 15 ++ app/views/projects/cycle_analytics/show.html.haml | 163 +++++++++++---------- .../icons/_icon_cycle_analytics_overview.svg | 81 ++++++++++ 4 files changed, 180 insertions(+), 81 deletions(-) create mode 100644 app/views/projects/cycle_analytics/_empty_cycle_analytics.html.haml create mode 100644 app/views/projects/cycle_analytics/_overview.html.haml create mode 100644 app/views/shared/icons/_icon_cycle_analytics_overview.svg (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/_empty_cycle_analytics.html.haml b/app/views/projects/cycle_analytics/_empty_cycle_analytics.html.haml new file mode 100644 index 00000000000..2a0352a3e19 --- /dev/null +++ b/app/views/projects/cycle_analytics/_empty_cycle_analytics.html.haml @@ -0,0 +1,2 @@ +%p There is nothing happened += icon("times", class: "dismiss-icon", "@click" => "dismissEmptyDialog()") diff --git a/app/views/projects/cycle_analytics/_overview.html.haml b/app/views/projects/cycle_analytics/_overview.html.haml new file mode 100644 index 00000000000..c8f0b547f80 --- /dev/null +++ b/app/views/projects/cycle_analytics/_overview.html.haml @@ -0,0 +1,15 @@ +.cycle-analytics-overview + .container + .row + .col-md-10.col-md-offset-1 + .row.overview-details + .col-md-6.overview-text + %h4 Introducing Cycle Analytics + %p + Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project. + To set up CA, you must first define a production environment by setting up your CI and then deploy to production. + %p + %a.btn{ href: help_page_path('user/project/cycle_analytics'), target: "_blank" } Read more + .col-md-6.overview-image + %span.overview-icon + = custom_icon ('icon_cycle_analytics_overview') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 521ae085f61..b9676794f44 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -1,87 +1,88 @@ - @no_container = true +- @cycle_analytics_not_set_up = false - page_title "Cycle Analytics" -- content_for :page_specific_javascripts do - = page_specific_javascript_tag("cycle_analytics/cycle_analytics_bundle.js") - = render "projects/pipelines/head" -#cycle-analytics{ class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } } - .empty-dialog-message{ "v-if" => "!isEmptyDialogDismissed" } - %p There is nothing happened - = icon("times", class: "dismiss-icon", "@click" => "dismissEmptyDialog()") - - .bordered-box.landing.content-block{"v-if" => "!isOverviewDialogDismissed"} - = icon("times", class: "dismiss-icon", "@click" => "dismissOverviewDialog()") - .row - .col-sm-3.col-xs-12.svg-container - = custom_icon('icon_cycle_analytics_splash') - .col-sm-8.col-xs-12.inner-content - %h4 - Introducing Cycle Analytics - %p - Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project. +- if @cycle_analytics_not_set_up + = render partial: "overview" +- else + - content_for :page_specific_javascripts do + = page_specific_javascript_tag("cycle_analytics/cycle_analytics_bundle.js") + #cycle-analytics{ class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } } + .empty-dialog-message{ "v-if" => "!isEmptyDialogDismissed" } + = render partial: "empty_cycle_analytics" + .bordered-box.landing.content-block{"v-if" => "!isOverviewDialogDismissed"} + = icon("times", class: "dismiss-icon", "@click" => "dismissOverviewDialog()") + .row + .col-sm-3.col-xs-12.svg-container + = custom_icon('icon_cycle_analytics_splash') + .col-sm-8.col-xs-12.inner-content + %h4 + Introducing Cycle Analytics + %p + Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project. - = link_to "Read more", help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' - = icon("spinner spin", "v-show" => "isLoading") - .wrapper{"v-show" => "!isLoading && !hasError"} - .panel.panel-default - .panel-heading - Pipeline Health - .content-block - .container-fluid - .row - .col-sm-3.col-xs-12.column{"v-for" => "item in state.summary"} - %h3.header {{item.value}} - %p.text {{item.title}} - .col-sm-3.col-xs-12.column - .dropdown.inline.js-ca-dropdown - %button.dropdown-menu-toggle{"data-toggle" => "dropdown", :type => "button"} - %span.dropdown-label Last 30 days - %i.fa.fa-chevron-down - %ul.dropdown-menu.dropdown-menu-align-right - %li - %a{ "href" => "#", "data-value" => "30" } - Last 30 days - %li - %a{ "href" => "#", "data-value" => "90" } - Last 90 days - .panel.panel-default.stage-panel - .panel-heading - %nav.col-headers - %ul - %li.stage-header - %span.stage-name - Stage - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The phase of the development lifecycle.", "aria-hidden" => "true" } - %li.median-header - %span.stage-name - Median - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" } - %li.event-header - %span.stage-name - {{ currentStage ? currentStage.legend : 'Related Issues' }} - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" } - %li.total-time-header - %span.stage-name - Total Time - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The time taken by each data entry gathered by that stage.", "aria-hidden" => "true" } - .stage-panel-body - %nav.stage-nav - %ul - %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" } - .stage-name - {{ stage.title }} - .stage-median - %template{ "v-if" => "stage.value" } - {{ stage.value }} - %template{ "v-else" => true } - %span.stage-empty - No enough data - .section.stage-events - %template{ "v-if" => "isLoadingStage" } - = icon("spinner spin", "v-show" => "isLoadingStage") - %template{ "v-if" => "isEmptyStage && !isLoadingStage" } - = render partial: "empty_stage" - %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } - %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } + = link_to "Read more", help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' + = icon("spinner spin", "v-show" => "isLoading") + .wrapper{"v-show" => "!isLoading && !hasError"} + .panel.panel-default + .panel-heading + Pipeline Health + .content-block + .container-fluid + .row + .col-sm-3.col-xs-12.column{"v-for" => "item in state.summary"} + %h3.header {{item.value}} + %p.text {{item.title}} + .col-sm-3.col-xs-12.column + .dropdown.inline.js-ca-dropdown + %button.dropdown-menu-toggle{"data-toggle" => "dropdown", :type => "button"} + %span.dropdown-label Last 30 days + %i.fa.fa-chevron-down + %ul.dropdown-menu.dropdown-menu-align-right + %li + %a{ "href" => "#", "data-value" => "30" } + Last 30 days + %li + %a{ "href" => "#", "data-value" => "90" } + Last 90 days + .panel.panel-default.stage-panel + .panel-heading + %nav.col-headers + %ul + %li.stage-header + %span.stage-name + Stage + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The phase of the development lifecycle.", "aria-hidden" => "true" } + %li.median-header + %span.stage-name + Median + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" } + %li.event-header + %span.stage-name + {{ currentStage ? currentStage.legend : 'Related Issues' }} + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" } + %li.total-time-header + %span.stage-name + Total Time + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The time taken by each data entry gathered by that stage.", "aria-hidden" => "true" } + .stage-panel-body + %nav.stage-nav + %ul + %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" } + .stage-name + {{ stage.title }} + .stage-median + %template{ "v-if" => "stage.value" } + {{ stage.value }} + %template{ "v-else" => true } + %span.stage-empty + No enough data + .section.stage-events + %template{ "v-if" => "isLoadingStage" } + = icon("spinner spin", "v-show" => "isLoadingStage") + %template{ "v-if" => "isEmptyStage && !isLoadingStage" } + = render partial: "empty_stage" + %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } + %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } diff --git a/app/views/shared/icons/_icon_cycle_analytics_overview.svg b/app/views/shared/icons/_icon_cycle_analytics_overview.svg new file mode 100644 index 00000000000..eea9c975c35 --- /dev/null +++ b/app/views/shared/icons/_icon_cycle_analytics_overview.svg @@ -0,0 +1,81 @@ + + + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1 From 283134a7def2ace2c3da5aa36db6bc29e46e8bed Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Fri, 18 Nov 2016 18:52:11 -0500 Subject: Remove unnecesary empty dialog --- app/views/projects/cycle_analytics/_empty_cycle_analytics.html.haml | 2 -- app/views/projects/cycle_analytics/show.html.haml | 2 -- 2 files changed, 4 deletions(-) delete mode 100644 app/views/projects/cycle_analytics/_empty_cycle_analytics.html.haml (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/_empty_cycle_analytics.html.haml b/app/views/projects/cycle_analytics/_empty_cycle_analytics.html.haml deleted file mode 100644 index 2a0352a3e19..00000000000 --- a/app/views/projects/cycle_analytics/_empty_cycle_analytics.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%p There is nothing happened -= icon("times", class: "dismiss-icon", "@click" => "dismissEmptyDialog()") diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index b9676794f44..50255fe7a29 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -10,8 +10,6 @@ - content_for :page_specific_javascripts do = page_specific_javascript_tag("cycle_analytics/cycle_analytics_bundle.js") #cycle-analytics{ class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } } - .empty-dialog-message{ "v-if" => "!isEmptyDialogDismissed" } - = render partial: "empty_cycle_analytics" .bordered-box.landing.content-block{"v-if" => "!isOverviewDialogDismissed"} = icon("times", class: "dismiss-icon", "@click" => "dismissOverviewDialog()") .row -- cgit v1.2.1 From 46d2b4307a3f9e3943205f1c7107c9a3abd6ac6c Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Sat, 19 Nov 2016 02:38:07 -0500 Subject: =?UTF-8?q?Add=20view=20to=20handle=20the=20case=20when=20user=20d?= =?UTF-8?q?oesn=E2=80=99t=20have=20access=20to=20stage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cycle_analytics/_empty_stage.html.haml | 2 +- .../projects/cycle_analytics/_no_access.html.haml | 7 ++++++ app/views/projects/cycle_analytics/show.html.haml | 24 +++++++++++++-------- app/views/shared/icons/_icon_lock.svg | 25 ++++++++++++++++++++++ 4 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 app/views/projects/cycle_analytics/_no_access.html.haml create mode 100644 app/views/shared/icons/_icon_lock.svg (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/_empty_stage.html.haml b/app/views/projects/cycle_analytics/_empty_stage.html.haml index f839ec9c018..06c42bff576 100644 --- a/app/views/projects/cycle_analytics/_empty_stage.html.haml +++ b/app/views/projects/cycle_analytics/_empty_stage.html.haml @@ -1,7 +1,7 @@ .empty-stage-container .empty-stage .icon-no-data - = render "shared/icons/icon_no_data.svg" + = custom_icon ('icon_no_data') %h4 We don’t have enough data to show this stage. %p The test phase measures the median time to run the entire pipeline for that project. diff --git a/app/views/projects/cycle_analytics/_no_access.html.haml b/app/views/projects/cycle_analytics/_no_access.html.haml new file mode 100644 index 00000000000..eb8df59748b --- /dev/null +++ b/app/views/projects/cycle_analytics/_no_access.html.haml @@ -0,0 +1,7 @@ +.no-access-stage-container + .no-access-stage + .icon-lock + = custom_icon ('icon_lock') + %h4 You need permission. + %p + Want to see the data? Please ask administer for access. diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 50255fe7a29..da9823e78fe 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -72,15 +72,21 @@ .stage-name {{ stage.title }} .stage-median - %template{ "v-if" => "stage.value" } - {{ stage.value }} - %template{ "v-else" => true } - %span.stage-empty + %template{ "v-if" => "stage.isUserAllowed" } + %span{ "v-if" => "stage.value" } + {{ stage.value }} + %span.stage-empty{ "v-else" => true } No enough data + %template{ "v-else" => true } + %span.not-available + Not available .section.stage-events %template{ "v-if" => "isLoadingStage" } - = icon("spinner spin", "v-show" => "isLoadingStage") - %template{ "v-if" => "isEmptyStage && !isLoadingStage" } - = render partial: "empty_stage" - %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } - %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } + = icon("spinner spin") + %template{ "v-if" => "currentStage && !currentStage.isUserAllowed" } + = render partial: "no_access" + %template{ "v-else" => true } + %template{ "v-if" => "isEmptyStage && !isLoadingStage" } + = render partial: "empty_stage" + %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } + %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } diff --git a/app/views/shared/icons/_icon_lock.svg b/app/views/shared/icons/_icon_lock.svg new file mode 100644 index 00000000000..6ec671a76ed --- /dev/null +++ b/app/views/shared/icons/_icon_lock.svg @@ -0,0 +1,25 @@ + + + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.1 From 73b8390768f1e243a16862acdbf4b8be7666acef Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 21 Nov 2016 12:51:34 -0500 Subject: Remove unnecesary variable This will be removed until we figure out in what scenario we should display the overview message. --- app/views/projects/cycle_analytics/show.html.haml | 167 +++++++++++----------- 1 file changed, 82 insertions(+), 85 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index da9823e78fe..12180c82eae 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -1,92 +1,89 @@ - @no_container = true - @cycle_analytics_not_set_up = false - page_title "Cycle Analytics" +- content_for :page_specific_javascripts do + = page_specific_javascript_tag("cycle_analytics/cycle_analytics_bundle.js") = render "projects/pipelines/head" -- if @cycle_analytics_not_set_up - = render partial: "overview" -- else - - content_for :page_specific_javascripts do - = page_specific_javascript_tag("cycle_analytics/cycle_analytics_bundle.js") - #cycle-analytics{ class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } } - .bordered-box.landing.content-block{"v-if" => "!isOverviewDialogDismissed"} - = icon("times", class: "dismiss-icon", "@click" => "dismissOverviewDialog()") - .row - .col-sm-3.col-xs-12.svg-container - = custom_icon('icon_cycle_analytics_splash') - .col-sm-8.col-xs-12.inner-content - %h4 - Introducing Cycle Analytics - %p - Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project. +#cycle-analytics{ class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } } + .bordered-box.landing.content-block{"v-if" => "!isOverviewDialogDismissed"} + = icon("times", class: "dismiss-icon", "@click" => "dismissOverviewDialog()") + .row + .col-sm-3.col-xs-12.svg-container + = custom_icon('icon_cycle_analytics_splash') + .col-sm-8.col-xs-12.inner-content + %h4 + Introducing Cycle Analytics + %p + Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project. - = link_to "Read more", help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' - = icon("spinner spin", "v-show" => "isLoading") - .wrapper{"v-show" => "!isLoading && !hasError"} - .panel.panel-default - .panel-heading - Pipeline Health - .content-block - .container-fluid - .row - .col-sm-3.col-xs-12.column{"v-for" => "item in state.summary"} - %h3.header {{item.value}} - %p.text {{item.title}} - .col-sm-3.col-xs-12.column - .dropdown.inline.js-ca-dropdown - %button.dropdown-menu-toggle{"data-toggle" => "dropdown", :type => "button"} - %span.dropdown-label Last 30 days - %i.fa.fa-chevron-down - %ul.dropdown-menu.dropdown-menu-align-right - %li - %a{ "href" => "#", "data-value" => "30" } - Last 30 days - %li - %a{ "href" => "#", "data-value" => "90" } - Last 90 days - .panel.panel-default.stage-panel - .panel-heading - %nav.col-headers - %ul - %li.stage-header - %span.stage-name - Stage - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The phase of the development lifecycle.", "aria-hidden" => "true" } - %li.median-header - %span.stage-name - Median - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" } - %li.event-header - %span.stage-name - {{ currentStage ? currentStage.legend : 'Related Issues' }} - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" } - %li.total-time-header - %span.stage-name - Total Time - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The time taken by each data entry gathered by that stage.", "aria-hidden" => "true" } - .stage-panel-body - %nav.stage-nav - %ul - %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" } - .stage-name - {{ stage.title }} - .stage-median - %template{ "v-if" => "stage.isUserAllowed" } - %span{ "v-if" => "stage.value" } - {{ stage.value }} - %span.stage-empty{ "v-else" => true } - No enough data - %template{ "v-else" => true } - %span.not-available - Not available - .section.stage-events - %template{ "v-if" => "isLoadingStage" } - = icon("spinner spin") - %template{ "v-if" => "currentStage && !currentStage.isUserAllowed" } - = render partial: "no_access" - %template{ "v-else" => true } - %template{ "v-if" => "isEmptyStage && !isLoadingStage" } - = render partial: "empty_stage" - %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } - %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } + = link_to "Read more", help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' + = icon("spinner spin", "v-show" => "isLoading") + .wrapper{"v-show" => "!isLoading && !hasError"} + .panel.panel-default + .panel-heading + Pipeline Health + .content-block + .container-fluid + .row + .col-sm-3.col-xs-12.column{"v-for" => "item in state.summary"} + %h3.header {{item.value}} + %p.text {{item.title}} + .col-sm-3.col-xs-12.column + .dropdown.inline.js-ca-dropdown + %button.dropdown-menu-toggle{"data-toggle" => "dropdown", :type => "button"} + %span.dropdown-label Last 30 days + %i.fa.fa-chevron-down + %ul.dropdown-menu.dropdown-menu-align-right + %li + %a{ "href" => "#", "data-value" => "30" } + Last 30 days + %li + %a{ "href" => "#", "data-value" => "90" } + Last 90 days + .panel.panel-default.stage-panel + .panel-heading + %nav.col-headers + %ul + %li.stage-header + %span.stage-name + Stage + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The phase of the development lifecycle.", "aria-hidden" => "true" } + %li.median-header + %span.stage-name + Median + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" } + %li.event-header + %span.stage-name + {{ currentStage ? currentStage.legend : 'Related Issues' }} + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" } + %li.total-time-header + %span.stage-name + Total Time + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The time taken by each data entry gathered by that stage.", "aria-hidden" => "true" } + .stage-panel-body + %nav.stage-nav + %ul + %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" } + .stage-name + {{ stage.title }} + .stage-median + %template{ "v-if" => "stage.isUserAllowed" } + %span{ "v-if" => "stage.value" } + {{ stage.value }} + %span.stage-empty{ "v-else" => true } + No enough data + %template{ "v-else" => true } + %span.not-available + Not available + .section.stage-events + %template{ "v-if" => "isLoadingStage" } + = icon("spinner spin") + %template{ "v-if" => "currentStage && !currentStage.isUserAllowed" } + = render partial: "no_access" + %template{ "v-else" => true } + %template{ "v-if" => "isEmptyStage && !isLoadingStage" } + = render partial: "empty_stage" + %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } + %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } -- cgit v1.2.1 From 5112181192d4c1984ed04960802f9fbbff353fb0 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 21 Nov 2016 14:02:38 -0500 Subject: =?UTF-8?q?Do=20not=20show=20overview=20message=20if=20there?= =?UTF-8?q?=E2=80=99s=20already=20CA=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/cycle_analytics/show.html.haml | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 12180c82eae..0fb2ebb8c35 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -1,5 +1,4 @@ - @no_container = true -- @cycle_analytics_not_set_up = false - page_title "Cycle Analytics" - content_for :page_specific_javascripts do = page_specific_javascript_tag("cycle_analytics/cycle_analytics_bundle.js") @@ -7,18 +6,19 @@ = render "projects/pipelines/head" #cycle-analytics{ class: container_class, "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } } - .bordered-box.landing.content-block{"v-if" => "!isOverviewDialogDismissed"} - = icon("times", class: "dismiss-icon", "@click" => "dismissOverviewDialog()") - .row - .col-sm-3.col-xs-12.svg-container - = custom_icon('icon_cycle_analytics_splash') - .col-sm-8.col-xs-12.inner-content - %h4 - Introducing Cycle Analytics - %p - Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project. + - if @cycle_analytics_no_data + .bordered-box.landing.content-block{"v-if" => "!isOverviewDialogDismissed"} + = icon("times", class: "dismiss-icon", "@click" => "dismissOverviewDialog()") + .row + .col-sm-3.col-xs-12.svg-container + = custom_icon('icon_cycle_analytics_splash') + .col-sm-8.col-xs-12.inner-content + %h4 + Introducing Cycle Analytics + %p + Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project. - = link_to "Read more", help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' + = link_to "Read more", help_page_path('user/project/cycle_analytics'), target: '_blank', class: 'btn' = icon("spinner spin", "v-show" => "isLoading") .wrapper{"v-show" => "!isLoading && !hasError"} .panel.panel-default -- cgit v1.2.1 From cf94db702e486562cda04e3eaf6b5e915e4e7f36 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Mon, 14 Nov 2016 19:26:37 +0000 Subject: Removed button styling from restricted visibility levels and added checkboxes with icons Review changes --- app/views/admin/application_settings/_form.html.haml | 5 ++--- 1 file changed, 2 insertions(+), 3 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 a236335131a..95cae5ea24b 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -22,9 +22,8 @@ .form-group = f.label :restricted_visibility_levels, class: 'control-label col-sm-2' .col-sm-10 - - data_attrs = { toggle: 'buttons' } - .btn-group{ data: data_attrs } - - restricted_level_checkboxes('restricted-visibility-help').each do |level| + - restricted_level_checkboxes('restricted-visibility-help').each do |level| + .checkbox = level %span.help-block#restricted-visibility-help Selected levels cannot be used by non-admin users for projects or snippets. -- cgit v1.2.1 From b9f08c78abb5d6c0103a76c9fba65bb43fa31915 Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Mon, 21 Nov 2016 20:53:18 +0100 Subject: Evalute time_ago method instead of printing it --- app/views/profiles/chat_names/_chat_name.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/profiles/chat_names/_chat_name.html.haml b/app/views/profiles/chat_names/_chat_name.html.haml index 6b32d377e1a..1ec1e7c70e4 100644 --- a/app/views/profiles/chat_names/_chat_name.html.haml +++ b/app/views/profiles/chat_names/_chat_name.html.haml @@ -19,7 +19,7 @@ = chat_name.chat_name %td - if chat_name.last_used_at - time_ago_with_tooltip(chat_name.last_used_at) + = time_ago_with_tooltip(chat_name.last_used_at) - else Never -- cgit v1.2.1 From 618d4d6db51db29d7061b0e2e81b89e46a7b30c8 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 21 Nov 2016 15:08:05 -0500 Subject: No enough data to Not enough data --- app/views/projects/cycle_analytics/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 0fb2ebb8c35..ce1393267eb 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -73,7 +73,7 @@ %span{ "v-if" => "stage.value" } {{ stage.value }} %span.stage-empty{ "v-else" => true } - No enough data + Not enough data %template{ "v-else" => true } %span.not-available Not available -- cgit v1.2.1 From 796596812faa96465d89b7616510d7b5de58c8c9 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 21 Nov 2016 16:02:09 -0500 Subject: administer to administrator --- app/views/projects/cycle_analytics/_no_access.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/_no_access.html.haml b/app/views/projects/cycle_analytics/_no_access.html.haml index eb8df59748b..0ffc79b3181 100644 --- a/app/views/projects/cycle_analytics/_no_access.html.haml +++ b/app/views/projects/cycle_analytics/_no_access.html.haml @@ -4,4 +4,4 @@ = custom_icon ('icon_lock') %h4 You need permission. %p - Want to see the data? Please ask administer for access. + Want to see the data? Please ask administrator for access. -- cgit v1.2.1 From b3700f96013d06cbe48e0fbf1aa89f91fd9fa35d Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 21 Nov 2016 16:11:01 -0500 Subject: Fix CSS declaration --- app/views/projects/cycle_analytics/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index ce1393267eb..580371ac000 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -66,9 +66,9 @@ %nav.stage-nav %ul %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" } - .stage-name + .stage-nav-item-cell.stage-name {{ stage.title }} - .stage-median + .stage-nav-item-cell.stage-median %template{ "v-if" => "stage.isUserAllowed" } %span{ "v-if" => "stage.value" } {{ stage.value }} -- cgit v1.2.1 From 9514018793a5a1de764fca55fa0b03a91cea29db Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Mon, 21 Nov 2016 14:31:12 -0700 Subject: Scroll CA stage panel on mobile --- app/views/projects/cycle_analytics/show.html.haml | 91 ++++++++++++----------- 1 file changed, 46 insertions(+), 45 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index 580371ac000..ef1b38d5e21 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -42,48 +42,49 @@ %li %a{ "href" => "#", "data-value" => "90" } Last 90 days - .panel.panel-default.stage-panel - .panel-heading - %nav.col-headers - %ul - %li.stage-header - %span.stage-name - Stage - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The phase of the development lifecycle.", "aria-hidden" => "true" } - %li.median-header - %span.stage-name - Median - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" } - %li.event-header - %span.stage-name - {{ currentStage ? currentStage.legend : 'Related Issues' }} - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" } - %li.total-time-header - %span.stage-name - Total Time - %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The time taken by each data entry gathered by that stage.", "aria-hidden" => "true" } - .stage-panel-body - %nav.stage-nav - %ul - %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" } - .stage-nav-item-cell.stage-name - {{ stage.title }} - .stage-nav-item-cell.stage-median - %template{ "v-if" => "stage.isUserAllowed" } - %span{ "v-if" => "stage.value" } - {{ stage.value }} - %span.stage-empty{ "v-else" => true } - Not enough data - %template{ "v-else" => true } - %span.not-available - Not available - .section.stage-events - %template{ "v-if" => "isLoadingStage" } - = icon("spinner spin") - %template{ "v-if" => "currentStage && !currentStage.isUserAllowed" } - = render partial: "no_access" - %template{ "v-else" => true } - %template{ "v-if" => "isEmptyStage && !isLoadingStage" } - = render partial: "empty_stage" - %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } - %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } + .stage-panel-container + .panel.panel-default.stage-panel + .panel-heading + %nav.col-headers + %ul + %li.stage-header + %span.stage-name + Stage + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The phase of the development lifecycle.", "aria-hidden" => "true" } + %li.median-header + %span.stage-name + Median + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6.", "aria-hidden" => "true" } + %li.event-header + %span.stage-name + {{ currentStage ? currentStage.legend : 'Related Issues' }} + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The collection of events added to the data gathered for that stage.", "aria-hidden" => "true" } + %li.total-time-header + %span.stage-name + Total Time + %i.has-tooltip.fa.fa-question-circle{ "data-placement" => "top", title: "The time taken by each data entry gathered by that stage.", "aria-hidden" => "true" } + .stage-panel-body + %nav.stage-nav + %ul + %li.stage-nav-item{ ':class' => '{ active: stage.active }', '@click' => 'selectStage(stage)', "v-for" => "stage in state.stages" } + .stage-nav-item-cell.stage-name + {{ stage.title }} + .stage-nav-item-cell.stage-median + %template{ "v-if" => "stage.isUserAllowed" } + %span{ "v-if" => "stage.value" } + {{ stage.value }} + %span.stage-empty{ "v-else" => true } + Not enough data + %template{ "v-else" => true } + %span.not-available + Not available + .section.stage-events + %template{ "v-if" => "isLoadingStage" } + = icon("spinner spin") + %template{ "v-if" => "currentStage && !currentStage.isUserAllowed" } + = render partial: "no_access" + %template{ "v-else" => true } + %template{ "v-if" => "isEmptyStage && !isLoadingStage" } + = render partial: "empty_stage" + %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } + %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } -- cgit v1.2.1 From 334347febc3dafdb39ef9bc6b552c6eb886bcbfc Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Mon, 21 Nov 2016 22:11:21 +0000 Subject: Frontend review changes --- .../mattermost_slash_commands/_help.html.haml | 36 +++++----- app/views/shared/_service_settings.html.haml | 77 +++++++++++----------- 2 files changed, 57 insertions(+), 56 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/services/mattermost_slash_commands/_help.html.haml b/app/views/projects/services/mattermost_slash_commands/_help.html.haml index 15aa2006c02..a676c0290a0 100644 --- a/app/views/projects/services/mattermost_slash_commands/_help.html.haml +++ b/app/views/projects/services/mattermost_slash_commands/_help.html.haml @@ -2,24 +2,24 @@ - run_actions_text = "Perform common operations on this project: #{pretty_path_with_namespace}" .well - %p - This service allows GitLab users to perform common operations on this - project by entering slash commands in Mattermost. - %p - See list of available commands in Mattermost after setting up this service, - by entering - %code /<command_trigger_word> help - %p - To setup this service: - %ul.list-unstyled - %li - 1. - = link_to 'Enable custom slash commands', 'https://docs.mattermost.com/developer/slash-commands.html#enabling-custom-commands' - on your Mattermost installation - %li - 2. - = link_to 'Add a slash command', 'https://docs.mattermost.com/developer/slash-commands.html#set-up-a-custom-command' - in Mattermost with these options: + This service allows GitLab users to perform common operations on this + project by entering slash commands in Mattermost. + %br + See list of available commands in Mattermost after setting up this service, + by entering + %code /<command_trigger_word> help + %br + %br + To setup this service: + %ul.list-unstyled + %li + 1. + = link_to 'Enable custom slash commands', 'https://docs.mattermost.com/developer/slash-commands.html#enabling-custom-commands' + on your Mattermost installation + %li + 2. + = link_to 'Add a slash command', 'https://docs.mattermost.com/developer/slash-commands.html#set-up-a-custom-command' + in Mattermost with these options: %hr diff --git a/app/views/shared/_service_settings.html.haml b/app/views/shared/_service_settings.html.haml index 755d6acc777..9c5053dace5 100644 --- a/app/views/shared/_service_settings.html.haml +++ b/app/views/shared/_service_settings.html.haml @@ -7,43 +7,44 @@ = preserve do = markdown @service.help -.form-group - = form.label :active, "Active", class: "control-label" - .col-sm-10 - = form.check_box :active - -- if @service.supported_events.present? +.service-settings .form-group - = form.label :url, "Trigger", class: 'control-label' - + = form.label :active, "Active", class: "control-label" .col-sm-10 - - @service.supported_events.each do |event| - %div - = form.check_box service_event_field_name(event), class: 'pull-left' - .prepend-left-20 - = form.label service_event_field_name(event), class: 'list-label' do - %strong - = event.humanize - - - field = @service.event_field(event) - - - if field - %p - = form.text_field field[:name], class: "form-control", placeholder: field[:placeholder] - - %p.light - = service_event_description(event) - -- @service.global_fields.each do |field| - - type = field[:type] - - - if type == 'fieldset' - - fields = field[:fields] - - legend = field[:legend] - - %fieldset - %legend= legend - - fields.each do |subfield| - = render 'shared/field', form: form, field: subfield - - else - = render 'shared/field', form: form, field: field + = form.check_box :active + + - if @service.supported_events.present? + .form-group + = form.label :url, "Trigger", class: 'control-label' + + .col-sm-10 + - @service.supported_events.each do |event| + %div + = form.check_box service_event_field_name(event), class: 'pull-left' + .prepend-left-20 + = form.label service_event_field_name(event), class: 'list-label' do + %strong + = event.humanize + + - field = @service.event_field(event) + + - if field + %p + = form.text_field field[:name], class: "form-control", placeholder: field[:placeholder] + + %p.light + = service_event_description(event) + + - @service.global_fields.each do |field| + - type = field[:type] + + - if type == 'fieldset' + - fields = field[:fields] + - legend = field[:legend] + + %fieldset + %legend= legend + - fields.each do |subfield| + = render 'shared/field', form: form, field: subfield + - else + = render 'shared/field', form: form, field: field -- cgit v1.2.1 From 78df7346e91afc95be2b8c91d63966aa3342e7d8 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Mon, 21 Nov 2016 17:26:19 -0500 Subject: Add custom copy for each empty stage --- app/views/projects/cycle_analytics/_empty_stage.html.haml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/cycle_analytics/_empty_stage.html.haml b/app/views/projects/cycle_analytics/_empty_stage.html.haml index 06c42bff576..b200ce22970 100644 --- a/app/views/projects/cycle_analytics/_empty_stage.html.haml +++ b/app/views/projects/cycle_analytics/_empty_stage.html.haml @@ -4,9 +4,4 @@ = custom_icon ('icon_no_data') %h4 We don’t have enough data to show this stage. %p - The test phase measures the median time to run the entire pipeline for that project. - It’s related to the time GitLab CI takes to run every job for the commits pushed - to that merge request defined in the previous stage. - Learn more about the - %a{ :href => "https://docs.gitlab.com/ce/user/project/cycle_analytics.html" } - expected workflow and calculations. + {{currentStage.emptyStageText}} -- cgit v1.2.1 From de21cfd1417e4e1f3d8076cd5e4bfc8a0f4b39ac Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Sat, 19 Nov 2016 14:44:06 +0000 Subject: Swapped buttons for checkboxes --- app/views/admin/application_settings/_form.html.haml | 6 ++---- 1 file changed, 2 insertions(+), 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 a236335131a..de6b2272c43 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -32,10 +32,8 @@ .form-group = f.label :import_sources, class: 'control-label col-sm-2' .col-sm-10 - - data_attrs = { toggle: 'buttons' } - .btn-group{ data: data_attrs } - - import_sources_checkboxes('import-sources-help').each do |source| - = source + - import_sources_checkboxes('import-sources-help').each do |source| + .checkbox= source %span.help-block#import-sources-help Enabled sources for code import during project creation. OmniAuth must be configured for GitHub = link_to "(?)", help_page_path("integration/github") -- cgit v1.2.1 From 9124b5966c50766df6fe623856f325adfb191504 Mon Sep 17 00:00:00 2001 From: Dimitrie Hoekstra Date: Tue, 22 Nov 2016 00:14:40 +0100 Subject: Converted all status icons to be managed by scss colors only and deleted any classes or styles within the svg's, plus gave status badges a hover style only if clickable --- app/views/projects/builds/_sidebar.html.haml | 3 ++- app/views/projects/ci/builds/_build_pipeline.html.haml | 4 ++-- app/views/projects/commit/_commit_box.html.haml | 2 +- app/views/projects/commit/_pipeline_status_group.html.haml | 2 +- .../_generic_commit_status_pipeline.html.haml | 4 ++-- app/views/projects/pipelines/_info.html.haml | 6 ++---- app/views/shared/icons/_icon_status_canceled.svg | 7 +------ app/views/shared/icons/_icon_status_created.svg | 2 +- app/views/shared/icons/_icon_status_failed.svg | 7 +------ app/views/shared/icons/_icon_status_pending.svg | 7 +------ app/views/shared/icons/_icon_status_running.svg | 7 +------ app/views/shared/icons/_icon_status_skipped.svg | 2 +- app/views/shared/icons/_icon_status_success.svg | 7 +------ app/views/shared/icons/_icon_status_warning.svg | 7 +------ 14 files changed, 18 insertions(+), 49 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/builds/_sidebar.html.haml b/app/views/projects/builds/_sidebar.html.haml index 28f519f11b2..f5562046953 100644 --- a/app/views/projects/builds/_sidebar.html.haml +++ b/app/views/projects/builds/_sidebar.html.haml @@ -128,7 +128,8 @@ .build-job{class: sidebar_build_class(build, @build), data: {stage: build.stage}} = link_to namespace_project_build_path(@project.namespace, @project, build) do = icon('arrow-right') - = ci_icon_for_status(build.status) + %span{class: "ci-status-icon-#{build.status}"} + = ci_icon_for_status(build.status) %span - if build.name = build.name diff --git a/app/views/projects/ci/builds/_build_pipeline.html.haml b/app/views/projects/ci/builds/_build_pipeline.html.haml index 93dca81e6f9..423a1282eb2 100644 --- a/app/views/projects/ci/builds/_build_pipeline.html.haml +++ b/app/views/projects/ci/builds/_build_pipeline.html.haml @@ -5,9 +5,9 @@ .ci-status-text= subject.name - elsif can?(current_user, :read_build, @project) = link_to namespace_project_build_path(subject.project.namespace, subject.project, subject), data: { toggle: 'tooltip', title: "#{subject.name} - #{subject.status}", container: '.pipeline-graph', placement: 'bottom' } do - %span.ci-status-icon + %span{class: "ci-status-icon ci-status-icon-#{subject.status}"} = ci_icon_for_status(subject.status) .ci-status-text= subject.name - else - %span.ci-status-icon + %span{class: "ci-status-icon ci-status-icon-#{subject.status}"} = ci_icon_for_status(subject.status) diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 503cbd13b5e..65151ac3a56 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -68,7 +68,7 @@ - if @commit.status .well-segment.pipeline-info - .icon-container + %div{class: "icon-container ci-status-icon-#{@commit.status}"} = ci_icon_for_status(@commit.status) Pipeline = link_to "##{@commit.pipelines.last.id}", pipelines_namespace_project_commit_path(@project.namespace, @project, @commit.id), class: "monospace" diff --git a/app/views/projects/commit/_pipeline_status_group.html.haml b/app/views/projects/commit/_pipeline_status_group.html.haml index 18daa2ee693..2b26ad9d6fa 100644 --- a/app/views/projects/commit/_pipeline_status_group.html.haml +++ b/app/views/projects/commit/_pipeline_status_group.html.haml @@ -1,6 +1,6 @@ - group_status = CommitStatus.where(id: subject).status %button.dropdown-menu-toggle.has-tooltip{ type: 'button', data: { toggle: 'dropdown', title: "#{name} - #{group_status}" } } - %span.ci-status-icon + %span{class: "ci-status-icon ci-status-icon-#{group_status}"} = ci_icon_for_status(group_status) %span.ci-status-text = name diff --git a/app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml b/app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml index 1c457244a7a..7b82d913d29 100644 --- a/app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml +++ b/app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml @@ -1,10 +1,10 @@ %a{ data: { toggle: 'tooltip', title: "#{subject.name} - #{subject.status}", container: '.pipeline-graph', placement: 'bottom' } } - if subject.target_url = link_to subject.target_url do - %span.ci-status-icon + %span{class: "ci-status-icon ci-status-icon-#{subject.status}"} = ci_icon_for_status(subject.status) %span.ci-status-text= subject.name - else - %span.ci-status-icon + %span{class: "ci-status-icon ci-status-icon-#{subject.status}"} = ci_icon_for_status(subject.status) %span.ci-status-text= subject.name diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index a0de125d765..095bd254d6b 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -1,8 +1,6 @@ .page-content-header .header-main-content - = link_to namespace_project_pipeline_path(@project.namespace, @project, @pipeline), class: "ci-status ci-#{@pipeline.status}" do - = ci_icon_for_status(@pipeline.status) - = ci_label_for_status(@pipeline.status) + = ci_status_with_icon(@pipeline.status) %strong Pipeline ##{@commit.pipelines.last.id} triggered #{time_ago_with_tooltip(@commit.authored_date)} by = author_avatar(@commit, size: 24) @@ -25,7 +23,7 @@ .info-well - if @commit.status .well-segment.pipeline-info - .icon-container + %div{class: "icon-container ci-status-icon-#{@commit.status}"} = ci_icon_for_status(@commit.status) = pluralize @pipeline.statuses.count(:id), "build" - if @pipeline.ref diff --git a/app/views/shared/icons/_icon_status_canceled.svg b/app/views/shared/icons/_icon_status_canceled.svg index 1b2d0891244..41a210a8ed9 100644 --- a/app/views/shared/icons/_icon_status_canceled.svg +++ b/app/views/shared/icons/_icon_status_canceled.svg @@ -1,6 +1 @@ - - - - - - + diff --git a/app/views/shared/icons/_icon_status_created.svg b/app/views/shared/icons/_icon_status_created.svg index dca5d289767..1f5c3b51b03 100644 --- a/app/views/shared/icons/_icon_status_created.svg +++ b/app/views/shared/icons/_icon_status_created.svg @@ -1 +1 @@ - + diff --git a/app/views/shared/icons/_icon_status_failed.svg b/app/views/shared/icons/_icon_status_failed.svg index e56e0887416..af267b8938a 100644 --- a/app/views/shared/icons/_icon_status_failed.svg +++ b/app/views/shared/icons/_icon_status_failed.svg @@ -1,6 +1 @@ - - - - - - + diff --git a/app/views/shared/icons/_icon_status_pending.svg b/app/views/shared/icons/_icon_status_pending.svg index 117f0367161..516231d1b44 100644 --- a/app/views/shared/icons/_icon_status_pending.svg +++ b/app/views/shared/icons/_icon_status_pending.svg @@ -1,6 +1 @@ - - - - - - + diff --git a/app/views/shared/icons/_icon_status_running.svg b/app/views/shared/icons/_icon_status_running.svg index 920d7952eb5..d2618bce200 100644 --- a/app/views/shared/icons/_icon_status_running.svg +++ b/app/views/shared/icons/_icon_status_running.svg @@ -1,6 +1 @@ - - - - - - + diff --git a/app/views/shared/icons/_icon_status_skipped.svg b/app/views/shared/icons/_icon_status_skipped.svg index e0a2d4282f0..701f33bcbea 100644 --- a/app/views/shared/icons/_icon_status_skipped.svg +++ b/app/views/shared/icons/_icon_status_skipped.svg @@ -1 +1 @@ - + diff --git a/app/views/shared/icons/_icon_status_success.svg b/app/views/shared/icons/_icon_status_success.svg index 67b378b3571..b7c21ba6971 100644 --- a/app/views/shared/icons/_icon_status_success.svg +++ b/app/views/shared/icons/_icon_status_success.svg @@ -1,6 +1 @@ - - - - - - + diff --git a/app/views/shared/icons/_icon_status_warning.svg b/app/views/shared/icons/_icon_status_warning.svg index d0ad4bd65b1..9191e0050a6 100644 --- a/app/views/shared/icons/_icon_status_warning.svg +++ b/app/views/shared/icons/_icon_status_warning.svg @@ -1,6 +1 @@ - - - - - - + -- cgit v1.2.1 From ccddde50879ba8fe694a461f63b01b9f0de6a7df Mon Sep 17 00:00:00 2001 From: Dimitrie Hoekstra Date: Tue, 22 Nov 2016 00:58:16 +0100 Subject: additional fixes --- app/views/projects/ci/pipelines/_pipeline.html.haml | 5 +++-- app/views/projects/merge_requests/widget/_heading.html.haml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/ci/pipelines/_pipeline.html.haml b/app/views/projects/ci/pipelines/_pipeline.html.haml index 2a2d24be736..4c7b14a04db 100644 --- a/app/views/projects/ci/pipelines/_pipeline.html.haml +++ b/app/views/projects/ci/pipelines/_pipeline.html.haml @@ -4,8 +4,9 @@ %tr.commit %td.commit-link - = link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id) do - = ci_status_with_icon(status) + = link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id), class: "ci-status ci-#{status}" do + = ci_icon_for_status(status) + = ci_label_for_status(status) %td = link_to namespace_project_pipeline_path(pipeline.project.namespace, pipeline.project, pipeline.id) do diff --git a/app/views/projects/merge_requests/widget/_heading.html.haml b/app/views/projects/merge_requests/widget/_heading.html.haml index a82c846baa7..09c41f947b0 100644 --- a/app/views/projects/merge_requests/widget/_heading.html.haml +++ b/app/views/projects/merge_requests/widget/_heading.html.haml @@ -1,7 +1,7 @@ - if @pipeline .mr-widget-heading - %w[success success_with_warnings skipped canceled failed running pending].each do |status| - .ci_widget{ class: "ci-#{status}", style: ("display:none" unless @pipeline.status == status) } + .ci_widget{ class: "ci-status-icon-#{status}", style: ("display:none" unless @pipeline.status == status) } = ci_icon_for_status(status) %span Pipeline -- cgit v1.2.1 From a2fb636153669f06083903b473fbe8efc8fe3455 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 22 Nov 2016 13:35:05 +0800 Subject: Use local instead of instance variable in partial Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7617#note_18762989 --- app/views/notify/ci/builds/_build.text.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/notify/ci/builds/_build.text.erb b/app/views/notify/ci/builds/_build.text.erb index d510de3dbe9..f495a2e5486 100644 --- a/app/views/notify/ci/builds/_build.text.erb +++ b/app/views/notify/ci/builds/_build.text.erb @@ -1 +1 @@ -Build #<%= build.id %> ( <%= pipeline_build_url(@pipeline, build) %> ) +Build #<%= build.id %> ( <%= pipeline_build_url(pipeline, build) %> ) -- cgit v1.2.1 From 7ec8cc121a9db954a3a0b5c8ebfc05cb471823db Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 22 Nov 2016 13:44:25 +0800 Subject: Move partials to links directory, feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7617#note_18762971 --- app/views/notify/ci/builds/_build.html.haml | 2 -- app/views/notify/ci/builds/_build.text.erb | 1 - .../notify/generic_commit_statuses/_generic_commit_status.html.haml | 1 - .../notify/generic_commit_statuses/_generic_commit_status.text.erb | 1 - app/views/notify/links/ci/builds/_build.html.haml | 2 ++ app/views/notify/links/ci/builds/_build.text.erb | 1 + .../links/generic_commit_statuses/_generic_commit_status.html.haml | 1 + .../links/generic_commit_statuses/_generic_commit_status.text.erb | 1 + app/views/notify/pipeline_failed_email.html.haml | 2 +- app/views/notify/pipeline_failed_email.text.erb | 2 +- 10 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 app/views/notify/ci/builds/_build.html.haml delete mode 100644 app/views/notify/ci/builds/_build.text.erb delete mode 100644 app/views/notify/generic_commit_statuses/_generic_commit_status.html.haml delete mode 100644 app/views/notify/generic_commit_statuses/_generic_commit_status.text.erb create mode 100644 app/views/notify/links/ci/builds/_build.html.haml create mode 100644 app/views/notify/links/ci/builds/_build.text.erb create mode 100644 app/views/notify/links/generic_commit_statuses/_generic_commit_status.html.haml create mode 100644 app/views/notify/links/generic_commit_statuses/_generic_commit_status.text.erb (limited to 'app/views') diff --git a/app/views/notify/ci/builds/_build.html.haml b/app/views/notify/ci/builds/_build.html.haml deleted file mode 100644 index 38cd4e5e145..00000000000 --- a/app/views/notify/ci/builds/_build.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%a{href: pipeline_build_url(pipeline, build), style: "color:#3777b0;text-decoration:none;"} - = build.name diff --git a/app/views/notify/ci/builds/_build.text.erb b/app/views/notify/ci/builds/_build.text.erb deleted file mode 100644 index f495a2e5486..00000000000 --- a/app/views/notify/ci/builds/_build.text.erb +++ /dev/null @@ -1 +0,0 @@ -Build #<%= build.id %> ( <%= pipeline_build_url(pipeline, build) %> ) diff --git a/app/views/notify/generic_commit_statuses/_generic_commit_status.html.haml b/app/views/notify/generic_commit_statuses/_generic_commit_status.html.haml deleted file mode 100644 index b6563b185b3..00000000000 --- a/app/views/notify/generic_commit_statuses/_generic_commit_status.html.haml +++ /dev/null @@ -1 +0,0 @@ -= build.name diff --git a/app/views/notify/generic_commit_statuses/_generic_commit_status.text.erb b/app/views/notify/generic_commit_statuses/_generic_commit_status.text.erb deleted file mode 100644 index 8e89c52a1f3..00000000000 --- a/app/views/notify/generic_commit_statuses/_generic_commit_status.text.erb +++ /dev/null @@ -1 +0,0 @@ -Build #<%= build.id %> diff --git a/app/views/notify/links/ci/builds/_build.html.haml b/app/views/notify/links/ci/builds/_build.html.haml new file mode 100644 index 00000000000..38cd4e5e145 --- /dev/null +++ b/app/views/notify/links/ci/builds/_build.html.haml @@ -0,0 +1,2 @@ +%a{href: pipeline_build_url(pipeline, build), style: "color:#3777b0;text-decoration:none;"} + = build.name diff --git a/app/views/notify/links/ci/builds/_build.text.erb b/app/views/notify/links/ci/builds/_build.text.erb new file mode 100644 index 00000000000..f495a2e5486 --- /dev/null +++ b/app/views/notify/links/ci/builds/_build.text.erb @@ -0,0 +1 @@ +Build #<%= build.id %> ( <%= pipeline_build_url(pipeline, build) %> ) diff --git a/app/views/notify/links/generic_commit_statuses/_generic_commit_status.html.haml b/app/views/notify/links/generic_commit_statuses/_generic_commit_status.html.haml new file mode 100644 index 00000000000..b6563b185b3 --- /dev/null +++ b/app/views/notify/links/generic_commit_statuses/_generic_commit_status.html.haml @@ -0,0 +1 @@ += build.name diff --git a/app/views/notify/links/generic_commit_statuses/_generic_commit_status.text.erb b/app/views/notify/links/generic_commit_statuses/_generic_commit_status.text.erb new file mode 100644 index 00000000000..8e89c52a1f3 --- /dev/null +++ b/app/views/notify/links/generic_commit_statuses/_generic_commit_status.text.erb @@ -0,0 +1 @@ +Build #<%= build.id %> diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml index 58d331acb33..001d9c48555 100644 --- a/app/views/notify/pipeline_failed_email.html.haml +++ b/app/views/notify/pipeline_failed_email.html.haml @@ -158,7 +158,7 @@ %td{style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#8c8c8c;font-weight:500;font-size:15px;vertical-align:middle;"} = build.stage %td{align: "right", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:20px 0;color:#8c8c8c;font-weight:500;font-size:15px;"} - = render "notify/#{build.to_partial_path}", pipeline: @pipeline, build: build + = render "notify/links/#{build.to_partial_path}", pipeline: @pipeline, build: build %tr.build-log - if build.has_trace? %td{colspan: "2", style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:0 0 15px;"} diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb index ddb21cc17e8..ab91c7ef350 100644 --- a/app/views/notify/pipeline_failed_email.text.erb +++ b/app/views/notify/pipeline_failed_email.text.erb @@ -19,7 +19,7 @@ Commit Author: <%= commit.author_name %> Pipeline #<%= @pipeline.id %> ( <%= pipeline_url(@pipeline) %> ) had <%= failed.size %> failed <%= 'build'.pluralize(failed.size) %>. <% failed.each do |build| -%> -<%= render "notify/#{build.to_partial_path}", pipeline: @pipeline, build: build %> +<%= render "notify/links/#{build.to_partial_path}", pipeline: @pipeline, build: build %> Stage: <%= build.stage %> Name: <%= build.name %> <% if build.has_trace? -%> -- cgit v1.2.1 From b86a784e1d9bb3dc789e2b289efe7b25e844d5aa Mon Sep 17 00:00:00 2001 From: Nur Rony Date: Tue, 22 Nov 2016 01:26:47 +0600 Subject: resolves lowercase issue in system note for labels, label description and title removes unnecessary changelog entry makes toggle commit list and compare link as secondary removes unnecessary function call --- app/views/projects/notes/_note.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index 89ae64554c0..ba8895438c5 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -16,7 +16,7 @@ commented - if note.system %span{class: 'system-note-message'} - = h(note.note_html.downcase.html_safe) + = note.redacted_note_html %a{ href: "##{dom_id(note)}" } = time_ago_with_tooltip(note.created_at, placement: 'bottom', html_class: 'note-created-ago') - unless note.system? -- cgit v1.2.1 From 9d3186e44aa9690c0c6c3af6f979132baf34cb41 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 22 Nov 2016 10:25:09 +0000 Subject: Disabled award emoji button when user is not logged in Closes #24680 --- app/views/award_emoji/_awards_block.html.haml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/award_emoji/_awards_block.html.haml b/app/views/award_emoji/_awards_block.html.haml index fbe3ab912b6..d8912eda314 100644 --- a/app/views/award_emoji/_awards_block.html.haml +++ b/app/views/award_emoji/_awards_block.html.haml @@ -1,7 +1,10 @@ - grouped_emojis = awardable.grouped_awards(with_thumbs: inline) .awards.js-awards-block{ class: ("hidden" if !inline && grouped_emojis.empty?), data: { award_url: toggle_award_url(awardable) } } - awards_sort(grouped_emojis).each do |emoji, awards| - %button.btn.award-control.js-emoji-btn.has-tooltip{ type: "button", class: (award_active_class(awards, current_user)), data: { placement: "bottom", title: award_user_list(awards, current_user) } } + %button.btn.award-control.js-emoji-btn.has-tooltip{ type: "button", + disabled: !current_user, + class: (award_active_class(awards, current_user)), + data: { placement: "bottom", title: award_user_list(awards, current_user) } } = emoji_icon(emoji, sprite: false) %span.award-control-text.js-counter = awards.count -- cgit v1.2.1 From afa5afc5e38633126c4c5d318c246239b074155c Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Tue, 22 Nov 2016 16:43:26 +0000 Subject: changes environment.last_deployment to a try expression so it does not fail if environment is not yet set --- app/views/projects/builds/show.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index d8cbfd7173a..b40d193eb39 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -40,13 +40,13 @@ This build is the most recent deployment to #{environment_link_for_build(@build.project, @build)}. - else This build is an out-of-date deployment to #{environment_link_for_build(@build.project, @build)}. - - if environment.last_deployment + - if environment.try(:last_deployment) View the most recent deployment #{deployment_link(environment.last_deployment)}. - elsif @build.complete? && !@build.success? The deployment of this build to #{environment_link_for_build(@build.project, @build)} did not succeed. - else This build is creating a deployment to #{environment_link_for_build(@build.project, @build)} - - if environment.last_deployment + - if environment.try(:last_deployment) and will overwrite the = link_to 'latest deployment', deployment_link(environment.last_deployment) -- cgit v1.2.1 From 9e87eaf83f6f75e013ef3a7aa565caada70a1390 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Tue, 22 Nov 2016 14:47:02 -0600 Subject: sort pipeline graph builds and build groups by name --- app/views/projects/commit/_pipeline_stage.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/commit/_pipeline_stage.html.haml b/app/views/projects/commit/_pipeline_stage.html.haml index 289aa5178b1..f9a9c8707f5 100644 --- a/app/views/projects/commit/_pipeline_stage.html.haml +++ b/app/views/projects/commit/_pipeline_stage.html.haml @@ -1,4 +1,4 @@ -- status_groups = statuses.group_by(&:group_name) +- status_groups = statuses.sort_by(&:name).group_by(&:group_name) - status_groups.each do |group_name, grouped_statuses| - if grouped_statuses.one? - status = grouped_statuses.first -- cgit v1.2.1 From 125cabd335222b61affc74264ee7e88b61324df0 Mon Sep 17 00:00:00 2001 From: Nur Rony Date: Tue, 22 Nov 2016 15:53:15 +0600 Subject: resolves updated and resolved status is not showin --- app/views/discussions/_discussion.html.haml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views') diff --git a/app/views/discussions/_discussion.html.haml b/app/views/discussions/_discussion.html.haml index e4b4ea675d2..2bce2780484 100644 --- a/app/views/discussions/_discussion.html.haml +++ b/app/views/discussions/_discussion.html.haml @@ -32,6 +32,7 @@ an outdated diff = time_ago_with_tooltip(discussion.created_at, placement: "bottom", html_class: "note-created-ago") + = render "discussions/headline", discussion: discussion .discussion-body.js-toggle-content{ class: ("hide" unless expanded) } - if discussion.diff_discussion? && discussion.diff_file -- cgit v1.2.1 From 3789cfe056c1d8a5fb91267cc2b1dd0f9f5902a9 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Tue, 15 Nov 2016 19:48:30 +0200 Subject: Add a starting date to milestones --- app/views/groups/milestones/new.html.haml | 13 +------------ app/views/projects/milestones/_form.html.haml | 7 +------ app/views/projects/milestones/show.html.haml | 6 ++++-- app/views/shared/_milestone_expired.html.haml | 6 ++++-- app/views/shared/milestones/_form_dates.html.haml | 15 +++++++++++++++ app/views/shared/milestones/_top.html.haml | 4 ++-- 6 files changed, 27 insertions(+), 24 deletions(-) create mode 100644 app/views/shared/milestones/_form_dates.html.haml (limited to 'app/views') diff --git a/app/views/groups/milestones/new.html.haml b/app/views/groups/milestones/new.html.haml index 0dfaf743992..63cadfca530 100644 --- a/app/views/groups/milestones/new.html.haml +++ b/app/views/groups/milestones/new.html.haml @@ -36,19 +36,8 @@ = f.collection_select :project_ids, @group.projects.non_archived, :id, :name, { selected: @group.projects.non_archived.pluck(:id) }, required: true, multiple: true, class: 'select2' - .col-md-6 - .form-group - = f.label :due_date, "Due Date", class: "control-label" - .col-sm-10 - = f.text_field :due_date, class: "datepicker form-control", placeholder: "Select due date" + = render "shared/milestones/form_dates", f: f .form-actions = f.submit 'Create Milestone', class: "btn-create btn" = link_to "Cancel", group_milestones_path(@group), class: "btn btn-cancel" - - -:javascript - $(".datepicker").datepicker({ - dateFormat: "yy-mm-dd", - onSelect: function(dateText, inst) { $("#milestone_due_date").val(dateText) } - }).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $('#milestone_due_date').val())); diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index cbf1ba04170..513710e8e66 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -14,12 +14,7 @@ = render 'projects/notes/hints' .clearfix .error-alert - .col-md-6 - .form-group - = f.label :due_date, "Due Date", class: "control-label" - .col-sm-10 - = f.text_field :due_date, class: "datepicker form-control", placeholder: "Select due date" - %a.inline.prepend-top-5.js-clear-due-date{ href: "#" } Clear due date + = render "shared/milestones/form_dates", f: f .form-actions - if @milestone.new_record? diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index e01aca3dda6..c3a6096aa54 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -10,15 +10,17 @@ Closed - elsif @milestone.expired? Past due + - elsif @milestone.upcoming? + Upcoming - else Open .header-text-content %span.identifier Milestone ##{@milestone.iid} - - if @milestone.expires_at + - if @milestone.due_date || @milestone.start_date %span.creator · - = @milestone.expires_at + = milestone_date_range(@milestone) .milestone-buttons - if can?(current_user, :admin_milestone, @project) - if @milestone.active? diff --git a/app/views/shared/_milestone_expired.html.haml b/app/views/shared/_milestone_expired.html.haml index b8eef15fbec..5e9007aaaac 100644 --- a/app/views/shared/_milestone_expired.html.haml +++ b/app/views/shared/_milestone_expired.html.haml @@ -1,5 +1,7 @@ - if milestone.expired? and not milestone.closed? %span.cred (Expired) -- if milestone.expires_at +- if milestone.upcoming? + %span.clgray (Upcoming) +- if milestone.due_date || milestone.start_date %span - = milestone.expires_at + = milestone_date_range(milestone) diff --git a/app/views/shared/milestones/_form_dates.html.haml b/app/views/shared/milestones/_form_dates.html.haml new file mode 100644 index 00000000000..748b10a1298 --- /dev/null +++ b/app/views/shared/milestones/_form_dates.html.haml @@ -0,0 +1,15 @@ +.col-md-6 + .form-group + = f.label :start_date, "Start Date", class: "control-label" + .col-sm-10 + = f.text_field :start_date, class: "datepicker form-control", placeholder: "Select start date" + %a.inline.prepend-top-5.js-clear-start-date{ href: "#" } Clear start date +.col-md-6 + .form-group + = f.label :due_date, "Due Date", class: "control-label" + .col-sm-10 + = f.text_field :due_date, class: "datepicker form-control", placeholder: "Select due date" + %a.inline.prepend-top-5.js-clear-due-date{ href: "#" } Clear due date + +:javascript + new gl.DueDateSelectors(); diff --git a/app/views/shared/milestones/_top.html.haml b/app/views/shared/milestones/_top.html.haml index 548215243db..497446c1ef3 100644 --- a/app/views/shared/milestones/_top.html.haml +++ b/app/views/shared/milestones/_top.html.haml @@ -12,10 +12,10 @@ Open %span.identifier Milestone #{milestone.title} - - if milestone.expires_at + - if milestone.due_date || milestone.start_date %span.creator · - = milestone.expires_at + = milestone_date_range(milestone) - if group .pull-right - if can?(current_user, :admin_milestones, group) -- cgit v1.2.1 From 6683fdcfb0ae4ceb368b6f5f63dde0a10a4a3e1b Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 14 Nov 2016 16:55:31 +0200 Subject: Add nested groups support to the routing Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/wikis/_nav.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/wikis/_nav.html.haml b/app/views/projects/wikis/_nav.html.haml index 09c4411d67e..afdef70e1cf 100644 --- a/app/views/projects/wikis/_nav.html.haml +++ b/app/views/projects/wikis/_nav.html.haml @@ -7,7 +7,7 @@ = link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home) = nav_link(path: 'wikis#pages') do - = link_to 'Pages', namespace_project_wiki_pages_path(@project.namespace, @project) + = link_to 'Pages', namespace_project_wikis_pages_path(@project.namespace, @project) = nav_link(path: 'wikis#git_access') do = link_to namespace_project_wikis_git_access_path(@project.namespace, @project) do -- cgit v1.2.1 From 02c6cbf53f4799bc888db7767c2d9a5e04a30002 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 23 Nov 2016 14:18:06 +0100 Subject: Add tests --- app/views/projects/builds/show.html.haml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index b40d193eb39..108674dbba6 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -40,8 +40,7 @@ This build is the most recent deployment to #{environment_link_for_build(@build.project, @build)}. - else This build is an out-of-date deployment to #{environment_link_for_build(@build.project, @build)}. - - if environment.try(:last_deployment) - View the most recent deployment #{deployment_link(environment.last_deployment)}. + View the most recent deployment #{deployment_link(environment.last_deployment)}. - elsif @build.complete? && !@build.success? The deployment of this build to #{environment_link_for_build(@build.project, @build)} did not succeed. - else -- cgit v1.2.1 From 934eaee94e0a16b4f76a19521a13ce86fdea8d9c Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 23 Nov 2016 14:00:06 +0000 Subject: Fixed dragging issues on issue boards Closes #24654 --- app/views/projects/boards/components/_board_list.html.haml | 2 +- app/views/projects/boards/components/_card.html.haml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/boards/components/_board_list.html.haml b/app/views/projects/boards/components/_board_list.html.haml index d86e0ed8540..34fdb1f6a74 100644 --- a/app/views/projects/boards/components/_board_list.html.haml +++ b/app/views/projects/boards/components/_board_list.html.haml @@ -35,7 +35,7 @@ ":issue" => "issue", ":issue-link-base" => "issueLinkBase", ":disabled" => "disabled", - "key" => "id" } + ":key" => "issue.id" } %li.board-list-count.text-center{ "v-if" => "showCount" } = icon("spinner spin", "v-show" => "list.loadingMore" ) %span{ "v-if" => "list.issues.length === list.issuesSize" } diff --git a/app/views/projects/boards/components/_card.html.haml b/app/views/projects/boards/components/_card.html.haml index 72b31b8cdae..34effac17b2 100644 --- a/app/views/projects/boards/components/_card.html.haml +++ b/app/views/projects/boards/components/_card.html.haml @@ -1,6 +1,7 @@ %li.card{ ":class" => '{ "user-can-drag": !disabled && issue.id, "is-disabled": disabled || !issue.id, "is-active": issueDetailVisible }', ":index" => "index", "@mousedown" => "mouseDown", + "@mousemove" => "mouseMove", "@mouseup" => "showIssue($event)" } %h4.card-title = icon("eye-slash", class: "confidential-icon", "v-if" => "issue.confidential") -- cgit v1.2.1 From b7e29af0b51bf39ae3c761b349494719cd860ebe Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Wed, 23 Nov 2016 13:04:20 -0600 Subject: Fix `LFS enabled` select box. It was not displaying the proper value and had an out of place look to it. --- app/views/projects/edit.html.haml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 0aa8801c2d8..3a5af2723c6 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -92,14 +92,15 @@ = project_feature_access_select(:wiki_access_level) - if Gitlab.config.lfs.enabled && current_user.admin? - .checkbox - = f.label :lfs_enabled do - = f.check_box :lfs_enabled - %strong LFS - %br - %span.descr + .row + .col-md-9 + = f.label :lfs_enabled, 'LFS', class: 'label-light' + %span.help-block Git Large File Storage = link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs') + .col-md-3 + = f.select :lfs_enabled, [%w(Enabled true), %w(Disabled false)], {}, selected: @project.lfs_enabled?, class: 'pull-right form-control', data: { field: 'lfs_enabled' } + - if Gitlab.config.registry.enabled .form-group.js-container-registry{ style: ("display: none;" if @project.project_feature.send(:repository_access_level) == 0) } -- cgit v1.2.1 From 8434a642f19798f8ed8ce283af6a1006920bef30 Mon Sep 17 00:00:00 2001 From: vrod Date: Sat, 19 Nov 2016 15:58:31 -0200 Subject: Simplify copy on "Create a new list" dropdown in Issue Boards --- app/views/shared/issuable/_filter.html.haml | 4 ++-- app/views/shared/issuable/_label_page_default.html.haml | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index ed93857e6d4..b7e5e928993 100644 --- a/app/views/shared/issuable/_filter.html.haml +++ b/app/views/shared/issuable/_filter.html.haml @@ -40,9 +40,9 @@ - if can?(current_user, :admin_list, @project) .dropdown.pull-right %button.btn.btn-create.js-new-board-list{ type: "button", data: { toggle: "dropdown", labels: labels_filter_path, namespace_path: @project.try(:namespace).try(:path), project_path: @project.try(:path) } } - Create new list + Add list .dropdown-menu.dropdown-menu-paging.dropdown-menu-align-right.dropdown-menu-issues-board-new.dropdown-menu-selectable - = render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Create a new list" } + = render partial: "shared/issuable/label_page_default", locals: { show_footer: true, show_create: true, show_boards_content: true, title: "Add list" } - if can?(current_user, :admin_label, @project) = render partial: "shared/issuable/label_page_create" = dropdown_loading diff --git a/app/views/shared/issuable/_label_page_default.html.haml b/app/views/shared/issuable/_label_page_default.html.haml index c0dc63be2bf..a8f01026ca5 100644 --- a/app/views/shared/issuable/_label_page_default.html.haml +++ b/app/views/shared/issuable/_label_page_default.html.haml @@ -1,17 +1,15 @@ - title = local_assigns.fetch(:title, 'Assign labels') - show_create = local_assigns.fetch(:show_create, true) - show_footer = local_assigns.fetch(:show_footer, true) -- filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search labels') +- filter_placeholder = local_assigns.fetch(:filter_placeholder, 'Search') - show_boards_content = local_assigns.fetch(:show_boards_content, false) .dropdown-page-one = dropdown_title(title) - if show_boards_content .issue-board-dropdown-content %p - Each label that exists in your issue tracker can have its own dedicated - list. Select a label below to add a list to your Board and it will - automatically be populated with issues that have that label. To create - a list for a label that doesn't exist yet, simply create the label below. + Create lists from the labels you use in your project. Issues with that + label will automatically be added to the list. = dropdown_filter(filter_placeholder) = dropdown_content - if @project && show_footer -- cgit v1.2.1 From 5b9c4f48724c8a8eb9556719239be996366fd005 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 23 Nov 2016 17:31:35 -0600 Subject: properly escape username validation error message flash --- app/views/profiles/update_username.js.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/profiles/update_username.js.haml b/app/views/profiles/update_username.js.haml index de1337a2a24..5307e0b48cb 100644 --- a/app/views/profiles/update_username.js.haml +++ b/app/views/profiles/update_username.js.haml @@ -2,5 +2,6 @@ :plain new Flash("Username successfully changed", "notice") - else + - error = @user.errors.full_messages.first :plain - new Flash("Username change failed - #{@user.errors.full_messages.first}", "alert") + new Flash("Username change failed - #{escape_javascript error.html_safe}", "alert") -- cgit v1.2.1 From 5e26745e312a5c792f5864d46fb0378d90790504 Mon Sep 17 00:00:00 2001 From: Luis Alonso Chavez Armendariz Date: Wed, 23 Nov 2016 16:34:58 -0700 Subject: Fix title case to sentence case --- app/views/shared/issuable/_sidebar.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index f166fac105d..02427650219 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -9,12 +9,12 @@ %a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", aria: { label: "Toggle sidebar" } } = sidebar_gutter_toggle_icon - if current_user - %button.btn.btn-default.issuable-header-btn.pull-right.js-issuable-todo{ type: "button", aria: { label: (todo.nil? ? "Add Todo" : "Mark Done") }, data: { todo_text: "Add Todo", mark_text: "Mark Done", issuable_id: issuable.id, issuable_type: issuable.class.name.underscore, url: namespace_project_todos_path(@project.namespace, @project), delete_path: (dashboard_todo_path(todo) if todo) } } + %button.btn.btn-default.issuable-header-btn.pull-right.js-issuable-todo{ type: "button", aria: { label: (todo.nil? ? "Add todo" : "Mark done") }, data: { todo_text: "Add todo", mark_text: "Mark done", issuable_id: issuable.id, issuable_type: issuable.class.name.underscore, url: namespace_project_todos_path(@project.namespace, @project), delete_path: (dashboard_todo_path(todo) if todo) } } %span.js-issuable-todo-text - if todo - Mark Done + Mark done - else - Add Todo + Add todo = icon('spin spinner', class: 'hidden js-issuable-todo-loading') = form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, format: :json, html: {class: 'issuable-context-form inline-update js-issuable-update'} do |f| -- cgit v1.2.1 From 18a54116e2f1d2ac88d03ad7ed48213dab580854 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 24 Nov 2016 10:38:24 +0000 Subject: Fixed dragging issue moving wrong issue after multiple drags of issue --- app/views/projects/boards/components/_card.html.haml | 1 + 1 file changed, 1 insertion(+) (limited to 'app/views') diff --git a/app/views/projects/boards/components/_card.html.haml b/app/views/projects/boards/components/_card.html.haml index 34effac17b2..1f31496e73f 100644 --- a/app/views/projects/boards/components/_card.html.haml +++ b/app/views/projects/boards/components/_card.html.haml @@ -1,5 +1,6 @@ %li.card{ ":class" => '{ "user-can-drag": !disabled && issue.id, "is-disabled": disabled || !issue.id, "is-active": issueDetailVisible }', ":index" => "index", + ":data-issue-id" => "issue.id", "@mousedown" => "mouseDown", "@mousemove" => "mouseMove", "@mouseup" => "showIssue($event)" } -- cgit v1.2.1 From 60cd47bc8ede7411cc2eea7c1fb72dd290eb679a Mon Sep 17 00:00:00 2001 From: Luis Alonso Chavez Armendariz Date: Fri, 25 Nov 2016 00:29:26 -0700 Subject: Fix bad selection on dropdown menu for tags filter --- app/views/projects/tags/index.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index 7a0d9dcc94f..b43b13de4ca 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -10,15 +10,16 @@ .nav-controls = form_tag(filter_tags_path, method: :get) do = search_field_tag :search, params[:search], { placeholder: 'Filter by tag name', id: 'tag-search', class: 'form-control search-text-input input-short', spellcheck: false } + .dropdown.inline %button.dropdown-toggle.btn{ type: 'button', data: { toggle: 'dropdown'} } %span.light - = @sort.humanize + = projects_sort_options_hash[@sort] = icon('caret-down') %ul.dropdown-menu.dropdown-menu-align-right %li - = link_to filter_tags_path(sort: nil) do - Name + = link_to filter_tags_path(sort: sort_value_name) do + = sort_title_name = link_to filter_tags_path(sort: sort_value_recently_updated) do = sort_title_recently_updated = link_to filter_tags_path(sort: sort_value_oldest_updated) do -- cgit v1.2.1