diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-09 10:22:22 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-09 10:22:22 -0700 |
commit | 916f255bed04cc7ec68d2df26527b862f0ea73e8 (patch) | |
tree | bf0a2839600b927b42f9585b37b66fbce67f2cef /app/views | |
parent | f77ffdafad0a94c8a2af7070710fbfbe88994040 (diff) | |
parent | fe214a217ca95c2c4a53c501f372367fecaf7f99 (diff) | |
download | gitlab-ce-916f255bed04cc7ec68d2df26527b862f0ea73e8.tar.gz |
Merge branch 'master' into sh-break-out-invited-group-members
Diffstat (limited to 'app/views')
25 files changed, 185 insertions, 62 deletions
diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index ab08d5c4906..495ee6a04ea 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -6,6 +6,5 @@ = form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'fieldset-form' } do |form| = render 'shared/service_settings', form: form, subject: @service - - unless @service.is_a?(KubernetesService) - .footer-block.row-content-block - = form.submit 'Save', class: 'btn btn-success' + .footer-block.row-content-block + = form.submit 'Save', class: 'btn btn-success' diff --git a/app/views/ci/variables/_environment_scope.html.haml b/app/views/ci/variables/_environment_scope.html.haml new file mode 100644 index 00000000000..15e61d85881 --- /dev/null +++ b/app/views/ci/variables/_environment_scope.html.haml @@ -0,0 +1,21 @@ +- form_field = local_assigns.fetch(:form_field, nil) +- variable = local_assigns.fetch(:variable, nil) + +- if @project + - environment_scope = variable&.environment_scope || '*' + - environment_scope_label = environment_scope == '*' ? s_('CiVariable|All environments') : environment_scope + + %input{ type: "hidden", name: "#{form_field}[variables_attributes][][environment_scope]", value: environment_scope } + = dropdown_tag(environment_scope_label, + options: { wrapper_class: 'ci-variable-body-item js-variable-environment-dropdown-wrapper', + toggle_class: 'js-variable-environment-toggle wide', + filter: true, + dropdown_class: "dropdown-menu-selectable", + placeholder: s_('CiVariable|Search environments'), + footer_content: true, + data: { selected: environment_scope } }) do + %ul.dropdown-footer-list + %li + %button{ class: "dropdown-create-new-item-button js-dropdown-create-new-item", title: s_('CiVariable|New environment') } + = s_('CiVariable|Create wildcard') + %code diff --git a/app/views/ci/variables/_environment_scope_header.html.haml b/app/views/ci/variables/_environment_scope_header.html.haml new file mode 100644 index 00000000000..4ba4ceec16c --- /dev/null +++ b/app/views/ci/variables/_environment_scope_header.html.haml @@ -0,0 +1,2 @@ +.bold.table-section.section-15.append-right-10 + = s_('CiVariables|Scope') diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index 4a9e05951f9..055c46334bb 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -36,11 +36,11 @@ .d-flex.flex-column.flex-md-row.row-content-block.second-block %span.flex-grow-1.align-self-md-center.col-form-label = _("Members with access to %{strongStart}%{group_name}%{strongEnd}").html_safe % { group_name: @group.name, strongStart: '<strong>', strongEnd: '</strong>' } - = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form' do + = form_tag group_group_members_path(@group), method: :get, class: 'form-inline user-search-form' do .form-group.flex-grow .position-relative.mr-md-2 = search_field_tag :search, params[:search], { placeholder: _('Search'), class: 'form-control', spellcheck: false } - %button.member-search-btn.border-left{ type: "submit", "aria-label" => _("Submit search") } + %button.user-search-btn.border-left{ type: "submit", "aria-label" => _("Submit search") } = icon("search") - if can_manage_members = label_tag '2fa', '2FA', class: 'col-form-label label-bold pr-md-2' @@ -56,11 +56,11 @@ .d-flex.flex-column.flex-md-row.row-content-block.second-block %span.flex-grow-1 = _("Members with pending access to %{strongStart}%{group_name}%{strongEnd}").html_safe % { group_name: @group.name, strongStart: '<strong>', strongEnd: '</strong>' } - = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form' do + = form_tag group_group_members_path(@group), method: :get, class: 'form-inline user-search-form' do .form-group .position-relative.mr-md-2 = search_field_tag :search_invited, params[:search_invited], { placeholder: _('Search'), class: 'form-control', spellcheck: false } - %button.member-search-btn.border-left{ type: "submit", "aria-label" => _("Submit search") } + %button.user-search-btn.border-left{ type: "submit", "aria-label" => _("Submit search") } = icon("search") %ul.content-list.members-list = render partial: 'shared/members/member', collection: @invited_members, as: :member diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index 2163446425c..bf077eb09d2 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -1,4 +1,4 @@ -- @can_bulk_update = can?(current_user, :admin_issue, @group) +- @can_bulk_update = can?(current_user, :admin_issue, @group) && @group.feature_available?(:group_bulk_edit) - page_title "Issues" = content_for :meta_tags do diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml index b5a2bab4799..0780fab513b 100644 --- a/app/views/groups/merge_requests.html.haml +++ b/app/views/groups/merge_requests.html.haml @@ -1,4 +1,4 @@ -- @can_bulk_update = can?(current_user, :admin_merge_request, @group) +- @can_bulk_update = can?(current_user, :admin_merge_request, @group) && @group.feature_available?(:group_bulk_edit) - page_title "Merge Requests" diff --git a/app/views/projects/buttons/_star.html.haml b/app/views/projects/buttons/_star.html.haml index 090d1549aa7..02e5297528b 100644 --- a/app/views/projects/buttons/_star.html.haml +++ b/app/views/projects/buttons/_star.html.haml @@ -8,7 +8,8 @@ = sprite_icon('star-o', { css_class: 'icon' }) %span= s_('ProjectOverview|Star') %span.star-count.count-badge-count.d-flex.align-items-center - = @project.star_count + = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'count' do + = @project.star_count - else .count-badge.d-inline-flex.align-item-stretch.append-right-8 @@ -16,4 +17,5 @@ = sprite_icon('star-o', { css_class: 'icon' }) %span= s_('ProjectOverview|Star') %span.star-count.count-badge-count.d-flex.align-items-center - = @project.star_count + = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'count' do + = @project.star_count diff --git a/app/views/projects/forks/_fork_button.html.haml b/app/views/projects/forks/_fork_button.html.haml index 3f0798a898d..c7ed6a5094d 100644 --- a/app/views/projects/forks/_fork_button.html.haml +++ b/app/views/projects/forks/_fork_button.html.haml @@ -5,9 +5,9 @@ .bordered-box.fork-thumbnail.text-center.prepend-left-default.append-right-default.prepend-top-default.append-bottom-default.forked = link_to project_path(forked_project) do - if /no_((\w*)_)*avatar/.match(avatar) - = group_icon(namespace, class: "avatar rect-avatar s100 identicon") + = group_icon(namespace, class: "avatar rect-avatar s100 identicon mx-auto") - else - .avatar-container.s100 + .avatar-container.s100.mx-auto = image_tag(avatar, class: "avatar s100") %h5.prepend-top-default = namespace.human_name @@ -18,9 +18,9 @@ class: ("disabled has-tooltip" unless can_create_project), title: (_('You have reached your project limit') unless can_create_project) do - if /no_((\w*)_)*avatar/.match(avatar) - = group_icon(namespace, class: "avatar rect-avatar s100 identicon") + = group_icon(namespace, class: "avatar rect-avatar s100 identicon mx-auto") - else - .avatar-container.s100 + .avatar-container.s100.mx-auto = image_tag(avatar, class: "avatar s100") %h5.prepend-top-default = namespace.human_name diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index 5d307d6a70d..2b56ada8b73 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -43,7 +43,7 @@ } } Auto DevOps - if @pipeline.detached_merge_request_pipeline? - %span.js-pipeline-url-mergerequest.badge.badge-info.has-tooltip{ title: "This pipeline is run on the source branch" } + %span.js-pipeline-url-mergerequest.badge.badge-info.has-tooltip{ title: "The code of a detached pipeline is tested against the source branch instead of merged results" } detached - if @pipeline.stuck? %span.js-pipeline-url-stuck.badge.badge-warning diff --git a/app/views/projects/project_members/_team.html.haml b/app/views/projects/project_members/_team.html.haml index f220299ec30..5310c1fad01 100644 --- a/app/views/projects/project_members/_team.html.haml +++ b/app/views/projects/project_members/_team.html.haml @@ -6,11 +6,11 @@ %span.flex-project-title = _("Members of <strong>%{project_name}</strong>").html_safe % { project_name: sanitize(project.name, tags: []) } %span.badge.badge-pill= members.total_count - = form_tag project_project_members_path(project), method: :get, class: 'form-inline member-search-form flex-project-members-form' do + = form_tag project_project_members_path(project), method: :get, class: 'form-inline user-search-form flex-users-form' do .form-group .position-relative = search_field_tag :search, params[:search], { placeholder: _('Find existing members by name'), class: 'form-control', spellcheck: false } - %button.member-search-btn{ type: "submit", "aria-label" => _("Submit search") } + %button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") } = icon("search") = render 'shared/members/sort_dropdown' %ul.content-list.members-list.qa-members-list diff --git a/app/views/projects/services/prometheus/_metrics.html.haml b/app/views/projects/services/prometheus/_metrics.html.haml index 3aefb3fdbb9..7685dee08fc 100644 --- a/app/views/projects/services/prometheus/_metrics.html.haml +++ b/app/views/projects/services/prometheus/_metrics.html.haml @@ -8,15 +8,16 @@ .col-lg-9 .card.js-panel-monitored-metrics{ data: { active_metrics: active_common_project_prometheus_metrics_path(project, :json), metrics_help_path: help_page_path('user/project/integrations/prometheus_library/index') } } .card-header - = s_('PrometheusService|Common metrics') + %strong + = s_('PrometheusService|Common metrics') %span.badge.badge-pill.js-monitored-count 0 .card-body .loading-metrics.js-loading-metrics - %p.prepend-top-10.prepend-left-10 + %p.m-3 = icon('spinner spin', class: 'metrics-load-spinner') = s_('PrometheusService|Finding and configuring metrics...') .empty-metrics.hidden.js-empty-metrics - %p.text-tertiary.prepend-top-10.prepend-left-10 + %p.text-tertiary.m-3 = s_('PrometheusService|Waiting for your first deployment to an environment to find common metrics') %ul.list-unstyled.metrics-list.hidden.js-metrics-list diff --git a/app/views/projects/starrers/_starrer.html.haml b/app/views/projects/starrers/_starrer.html.haml new file mode 100644 index 00000000000..377d62f8abd --- /dev/null +++ b/app/views/projects/starrers/_starrer.html.haml @@ -0,0 +1,19 @@ +- starrer = local_assigns.fetch(:starrer) + +.col-lg-3.col-md-4.col-sm-12 + .card + .card-body + = image_tag avatar_icon_for_user(starrer.user, 40), class: "avatar s40", alt: '' + + .user-info + .block-truncated + = link_to starrer.user.name, user_path(starrer.user), class: 'user js-user-link', data: { user_id: starrer.user.id } + + .block-truncated + %span.cgray= starrer.user.to_reference + + - if starrer.user == current_user + %span.badge.badge-success.prepend-left-5= _("It's you") + + .block-truncated + = time_ago_with_tooltip(starrer.starred_since) diff --git a/app/views/projects/starrers/index.html.haml b/app/views/projects/starrers/index.html.haml new file mode 100644 index 00000000000..e55ed99f643 --- /dev/null +++ b/app/views/projects/starrers/index.html.haml @@ -0,0 +1,32 @@ +- page_title _("Starrers") + +.top-area.adjust + .nav-text + - full_count_title = "#{@public_count} public and #{@private_count} private" + #{pluralize(@total_count, 'starrer')}: #{full_count_title} + - if @starrers.size > 0 || params[:search].present? + .nav-controls + = form_tag request.original_url, method: :get, class: 'form-inline user-search-form flex-users-form' do + .form-group + .position-relative + = search_field_tag :search, params[:search], { placeholder: _('Search'), class: 'form-control', spellcheck: false } + %button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") } + = icon("search") + .dropdown.inline.user-sort-dropdown + = dropdown_toggle(starrers_sort_options_hash[@sort], { toggle: 'dropdown' }) + %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable + %li.dropdown-header + = _("Sort by") + - starrers_sort_options_hash.each do |value, title| + %li + = link_to filter_starrer_path(sort: value), class: ("is-active" if @sort == value) do + = title +- if @starrers.size > 0 + .row.prepend-top-10 + = render partial: 'starrer', collection: @starrers, as: :starrer + = paginate @starrers, theme: 'gitlab' +- else + - if params[:search].present? + .nothing-here-block= _('No starrers matched your search') + - else + .nothing-here-block= _('Nobody has starred this repository yet') diff --git a/app/views/search/_filter.html.haml b/app/views/search/_filter.html.haml index c8b6a3258ab..bee4aff605f 100644 --- a/app/views/search/_filter.html.haml +++ b/app/views/search/_filter.html.haml @@ -2,10 +2,11 @@ = hidden_field_tag :group_id, params[:group_id] - if params[:project_id].present? = hidden_field_tag :project_id, params[:project_id] -.dropdown - %button.dropdown-menu-toggle.js-search-group-dropdown{ type: "button", data: { toggle: "dropdown", default_label: _('Group:'), group_id: params[:group_id] } } +.dropdown.form-group.mb-lg-0.mx-lg-1 + %label.d-block{ for: "dashboard_search_group" } + = _("Group") + %button.dropdown-menu-toggle.js-search-group-dropdown.mt-0{ type: "button", id: "dashboard_search_group", data: { toggle: "dropdown", group_id: params[:group_id] } } %span.dropdown-toggle-text - = _("Group:") - if @group.present? = @group.name - else @@ -17,10 +18,11 @@ = dropdown_content = dropdown_loading -.dropdown.project-filter - %button.dropdown-menu-toggle.js-search-project-dropdown{ type: "button", data: { toggle: "dropdown", default_label: _('Project:') } } +.dropdown.project-filter.form-group.mb-lg-0.mx-lg-1 + %label.d-block{ for: "dashboard_search_project" } + = _("Project") + %button.dropdown-menu-toggle.js-search-project-dropdown.mt-0{ type: "button", id: "dashboard_search_project", data: { toggle: "dropdown"} } %span.dropdown-toggle-text - = _("Project:") - if @project.present? = @project.full_name - else diff --git a/app/views/search/_form.html.haml b/app/views/search/_form.html.haml index db0dcc8adfb..464db94b7f4 100644 --- a/app/views/search/_form.html.haml +++ b/app/views/search/_form.html.haml @@ -1,16 +1,21 @@ -= form_tag search_path, method: :get, class: 'js-search-form' do |f| += form_tag search_path, method: :get, class: 'search-page-form js-search-form' do |f| = hidden_field_tag :snippets, params[:snippets] = hidden_field_tag :scope, params[:scope] + = hidden_field_tag :repository_ref, params[:repository_ref] - .search-holder - .search-field-holder - = search_field_tag :search, params[:search], placeholder: _("Search for projects, issues, etc."), class: "form-control search-text-input js-search-input", id: "dashboard_search", autofocus: true, spellcheck: false - = icon("search", class: "search-icon") - %button.search-clear.js-search-clear{ class: ("hidden" if !params[:search].present?), type: "button", tabindex: "-1" } - = icon("times-circle") - %span.sr-only - = _("Clear search") + .d-lg-flex.align-items-end + .search-field-holder.form-group.mr-lg-1.mb-lg-0 + %label{ for: "dashboard_search" } + = _("What are you searching for?") + .position-relative + = search_field_tag :search, params[:search], placeholder: _("Search for projects, issues, etc."), class: "form-control search-text-input js-search-input", id: "dashboard_search", autofocus: true, spellcheck: false + = icon("search", class: "search-icon") + %button.search-clear.js-search-clear{ class: ("hidden" if !params[:search].present?), type: "button", tabindex: "-1" } + = icon("times-circle") + %span.sr-only + = _("Clear search") - unless params[:snippets].eql? 'true' = render 'filter' - = button_tag _("Search"), class: "btn btn-success btn-search" - = render_if_exists 'search/form_elasticsearch' + .d-flex-center.flex-column.flex-lg-row + = button_tag _("Search"), class: "btn btn-success btn-search form-control mt-lg-0 ml-lg-1 align-self-end" + = render_if_exists 'search/form_elasticsearch' diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml index cb8a8a24be8..de9947528cf 100644 --- a/app/views/search/_results.html.haml +++ b/app/views/search/_results.html.haml @@ -2,17 +2,25 @@ = render partial: "search/results/empty" = render_if_exists 'shared/promotions/promote_advanced_search' - else - .row-content-block + .row-content-block.d-md-flex.text-left.align-items-center - unless @search_objects.is_a?(Kaminari::PaginatableWithoutCount) = search_entries_info(@search_objects, @scope, @search_term) - unless @show_snippets - if @project - - link_to_project = link_to(@project.full_name, [@project.namespace.becomes(Namespace), @project]) - = _("in project %{link_to_project}").html_safe % { link_to_project: link_to_project } + - link_to_project = link_to(@project.full_name, [@project.namespace.becomes(Namespace), @project], class: 'ml-md-1') + - if @scope == 'blobs' + - repository_ref = params[:repository_ref].to_s.presence || @project.default_branch + = s_("SearchCodeResults|in") + .mx-md-1 + = render partial: "shared/ref_switcher", locals: { ref: repository_ref, form_path: request.fullpath, field_name: 'repository_ref' } + = s_('SearchCodeResults|of %{link_to_project}').html_safe % { link_to_project: link_to_project } + - else + = _("in project %{link_to_project}").html_safe % { link_to_project: link_to_project } - elsif @group - - link_to_group = link_to(@group.name, @group) + - link_to_group = link_to(@group.name, @group, class: 'ml-md-1') = _("in group %{link_to_group}").html_safe % { link_to_group: link_to_group } = render_if_exists 'shared/promotions/promote_advanced_search' + .results.prepend-top-10 - if @scope == 'commits' %ul.content-list.commit-list diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml index 3260d05f509..9235678bc1d 100644 --- a/app/views/search/show.html.haml +++ b/app/views/search/show.html.haml @@ -1,6 +1,10 @@ - @hide_top_links = true -- breadcrumb_title _("Search") - page_title @search_term +- @hide_breadcrumbs = true + +.page-title-holder.d-flex.align-items-center + %h1.page-title< + = _('Search') .prepend-top-default = render 'search/form' diff --git a/app/views/shared/_ref_switcher.html.haml b/app/views/shared/_ref_switcher.html.haml index 7cbc5810c10..74e0a088656 100644 --- a/app/views/shared/_ref_switcher.html.haml +++ b/app/views/shared/_ref_switcher.html.haml @@ -1,12 +1,19 @@ -- dropdown_toggle_text = @ref || @project.default_branch -= form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do - = hidden_field_tag :destination, destination +- return unless @project + +- ref = local_assigns.fetch(:ref, @ref) +- form_path = local_assigns.fetch(:form_path, switch_project_refs_path(@project)) +- dropdown_toggle_text = ref || @project.default_branch +- field_name = local_assigns.fetch(:field_name, 'ref') + += form_tag form_path, method: :get, class: "project-refs-form" do + - if defined?(destination) + = hidden_field_tag :destination, destination - if defined?(path) = hidden_field_tag :path, path - @options && @options.each do |key, value| = hidden_field_tag key, value, id: nil .dropdown - = dropdown_toggle dropdown_toggle_text, { toggle: "dropdown", selected: dropdown_toggle_text, ref: @ref, refs_url: refs_project_path(@project, sort: 'updated_desc'), field_name: 'ref', submit_form_on_click: true, visit: true }, { toggle_class: "js-project-refs-dropdown qa-branches-select" } + = dropdown_toggle dropdown_toggle_text, { toggle: "dropdown", selected: dropdown_toggle_text, ref: ref, refs_url: refs_project_path(@project, sort: 'updated_desc'), field_name: field_name, submit_form_on_click: true, visit: true }, { toggle_class: "js-project-refs-dropdown qa-branches-select" } .dropdown-menu.dropdown-menu-selectable.git-revision-dropdown.dropdown-menu-paging.qa-branches-dropdown{ class: ("dropdown-menu-right" if local_assigns[:align_right]) } .dropdown-page-one = dropdown_title _("Switch branch/tag") diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 07a7b5ce9de..214e87052da 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -33,8 +33,6 @@ = render_if_exists 'shared/issuable/approvals', issuable: issuable, presenter: presenter, form: form -= render_if_exists "shared/issuable/form/merge_request_blocks", issuable: issuable, form: form - = render 'shared/issuable/form/branch_chooser', issuable: issuable, form: form = render 'shared/issuable/form/merge_params', issuable: issuable diff --git a/app/views/shared/issuable/_label_dropdown.html.haml b/app/views/shared/issuable/_label_dropdown.html.haml index 483652852b6..bca5db16bd3 100644 --- a/app/views/shared/issuable/_label_dropdown.html.haml +++ b/app/views/shared/issuable/_label_dropdown.html.haml @@ -1,4 +1,5 @@ - project = @target_project || @project +- edit_context = local_assigns.fetch(:edit_context, nil) || project - show_create = local_assigns.fetch(:show_create, true) - extra_options = local_assigns.fetch(:extra_options, true) - filter_submit = local_assigns.fetch(:filter_submit, true) @@ -8,7 +9,7 @@ - classes = local_assigns.fetch(:classes, []) - selected = local_assigns.fetch(:selected, nil) - dropdown_title = local_assigns.fetch(:dropdown_title, "Filter by label") -- dropdown_data = label_dropdown_data(@project, labels: labels_filter_path_with_defaults, default_label: "Labels") +- dropdown_data = label_dropdown_data(edit_context, labels: labels_filter_path_with_defaults(only_group_labels: edit_context.is_a?(Group)), default_label: "Labels") - dropdown_data.merge!(data_options) - label_name = local_assigns.fetch(:label_name, "Labels") - no_default_styles = local_assigns.fetch(:no_default_styles, false) diff --git a/app/views/shared/issuable/form/_metadata.html.haml b/app/views/shared/issuable/form/_metadata.html.haml index 1e03440a5dc..90a6a98235d 100644 --- a/app/views/shared/issuable/form/_metadata.html.haml +++ b/app/views/shared/issuable/form/_metadata.html.haml @@ -23,6 +23,7 @@ = render "shared/issuable/label_dropdown", classes: ["js-issuable-form-dropdown"], selected: issuable.labels, data_options: { field_name: "#{issuable.class.model_name.param_key}[label_ids][]", show_any: false }, dropdown_title: "Select label" = render_if_exists "shared/issuable/form/weight", issuable: issuable, form: form + = render_if_exists "shared/issuable/form/merge_request_blocks", issuable: issuable, form: form - if has_due_date .col-lg-6 diff --git a/app/views/shared/members/_sort_dropdown.html.haml b/app/views/shared/members/_sort_dropdown.html.haml index 77f05edab5a..feca109dade 100644 --- a/app/views/shared/members/_sort_dropdown.html.haml +++ b/app/views/shared/members/_sort_dropdown.html.haml @@ -1,5 +1,5 @@ = label_tag :sort_by, 'Sort by', class: 'col-form-label label-bold pr-2' -.dropdown.inline.qa-member-sort-dropdown +.dropdown.inline.qa-user-sort-dropdown = dropdown_toggle(member_sort_options_hash[@sort], { toggle: 'dropdown' }) %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable %li.dropdown-header diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml index 67cb1aa549c..bb05658c719 100644 --- a/app/views/shared/projects/_list.html.haml +++ b/app/views/shared/projects/_list.html.haml @@ -17,15 +17,20 @@ - contributed_projects_illustration_path = 'illustrations/profile-page/contributed-projects.svg' - contributed_projects_current_user_empty_message_header = s_('UserProfile|Explore public groups to find projects to contribute to.') - contributed_projects_visitor_empty_message = s_('UserProfile|This user hasn\'t contributed to any projects') +- starred_projects_illustration_path = 'illustrations/starred_empty.svg' +- starred_projects_current_user_empty_message_header = s_('UserProfile|Star projects to track their progress and show your appreciation.') +- starred_projects_visitor_empty_message = s_('UserProfile|This user hasn\'t starred any projects') - own_projects_illustration_path = 'illustrations/profile-page/personal-project.svg' - own_projects_current_user_empty_message_header = s_('UserProfile|You haven\'t created any personal projects.') - own_projects_current_user_empty_message_description = s_('UserProfile|Your projects can be available publicly, internally, or privately, at your choice.') - own_projects_visitor_empty_message = s_('UserProfile|This user doesn\'t have any personal projects') - explore_page_empty_message = s_('UserProfile|Explore public groups to find projects to contribute to.') -- primary_button_label = _('New project') -- primary_button_link = new_project_path -- secondary_button_label = _('Explore groups') -- secondary_button_link = explore_groups_path +- new_project_button_label = _('New project') +- new_project_button_link = new_project_path +- explore_projects_button_label = _('Explore projects') +- explore_projects_button_link = explore_projects_path +- explore_groups_button_label = _('Explore groups') +- explore_groups_button_link = explore_groups_path .js-projects-list-holder - if any_projects?(projects) @@ -48,15 +53,21 @@ - if @contributed_projects = render partial: 'shared/empty_states/profile_tabs', locals: { illustration_path: contributed_projects_illustration_path, current_user_empty_message_header: contributed_projects_current_user_empty_message_header, - primary_button_label: primary_button_label, - primary_button_link: primary_button_link, - secondary_button_label: secondary_button_label, - secondary_button_link: secondary_button_link, + primary_button_label: new_project_button_label, + primary_button_link: new_project_button_link, + secondary_button_label: explore_groups_button_label, + secondary_button_link: explore_groups_button_link, visitor_empty_message: contributed_projects_visitor_empty_message } + - elsif @starred_projects + = render partial: 'shared/empty_states/profile_tabs', locals: { illustration_path: starred_projects_illustration_path, + current_user_empty_message_header: starred_projects_current_user_empty_message_header, + primary_button_label: explore_projects_button_label, + primary_button_link: explore_projects_button_link, + visitor_empty_message: starred_projects_visitor_empty_message } - else = render partial: 'shared/empty_states/profile_tabs', locals: { illustration_path: own_projects_illustration_path, current_user_empty_message_header: own_projects_current_user_empty_message_header, current_user_empty_message_description: own_projects_current_user_empty_message_description, - primary_button_label: primary_button_label, - primary_button_link: primary_button_link, + primary_button_label: new_project_button_label, + primary_button_link: new_project_button_link, visitor_empty_message: defined?(explore_page) && explore_page ? explore_page_empty_message : own_projects_visitor_empty_message } diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index f40a9cffb29..b7474d891dc 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -63,7 +63,9 @@ - if project.archived %span.d-flex.icon-wrapper.badge.badge-warning archived - if stars - %span.d-flex.align-items-center.icon-wrapper.stars.has-tooltip{ data: { container: 'body', placement: 'top' }, title: _('Stars') } + = link_to project_starrers_path(project), + class: "d-flex align-items-center icon-wrapper stars has-tooltip", + title: _('Stars'), data: { container: 'body', placement: 'top' } do = sprite_icon('star', size: 14, css_class: 'append-right-4') = number_with_delimiter(project.star_count) - if forks diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index b3a73030859..73bee7c2586 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -111,6 +111,10 @@ %li.js-projects-tab = link_to user_projects_path, data: { target: 'div#projects', action: 'projects', toggle: 'tab', endpoint: user_projects_path(format: :json) } do = s_('UserProfile|Personal projects') + - if profile_tab?(:starred) + %li.js-starred-tab + = link_to user_starred_projects_path, data: { target: 'div#starred', action: 'starred', toggle: 'tab', endpoint: user_starred_projects_path(format: :json) } do + = s_('UserProfile|Starred projects') - if profile_tab?(:snippets) %li.js-snippets-tab = link_to user_snippets_path, data: { target: 'div#snippets', action: 'snippets', toggle: 'tab', endpoint: user_snippets_path(format: :json) } do @@ -142,6 +146,10 @@ #projects.tab-pane -# This tab is always loaded via AJAX + - if profile_tab?(:starred) + #starred.tab-pane + -# This tab is always loaded via AJAX + - if profile_tab?(:snippets) #snippets.tab-pane -# This tab is always loaded via AJAX |