diff options
Diffstat (limited to 'app/views/dashboard')
-rw-r--r-- | app/views/dashboard/_activities.html.haml | 3 | ||||
-rw-r--r-- | app/views/dashboard/_groups_head.html.haml | 4 | ||||
-rw-r--r-- | app/views/dashboard/_projects_head.html.haml | 17 | ||||
-rw-r--r-- | app/views/dashboard/_projects_nav.html.haml | 8 | ||||
-rw-r--r-- | app/views/dashboard/_snippets_head.html.haml | 3 | ||||
-rw-r--r-- | app/views/dashboard/issues.html.haml | 6 | ||||
-rw-r--r-- | app/views/dashboard/merge_requests.html.haml | 1 | ||||
-rw-r--r-- | app/views/dashboard/projects/_nav.html.haml | 23 | ||||
-rw-r--r-- | app/views/dashboard/projects/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/dashboard/todos/_todo.html.haml | 98 | ||||
-rw-r--r-- | app/views/dashboard/todos/index.html.haml | 1 |
11 files changed, 75 insertions, 91 deletions
diff --git a/app/views/dashboard/_activities.html.haml b/app/views/dashboard/_activities.html.haml index 4edb0f324dc..8750b80ccfd 100644 --- a/app/views/dashboard/_activities.html.haml +++ b/app/views/dashboard/_activities.html.haml @@ -1,8 +1,7 @@ .nav-block.activities = render 'shared/event_filter' .controls - = link_to dashboard_projects_path(rss_url_options), class: 'btn gl-button btn-default btn-icon d-none d-sm-inline-flex has-tooltip', title: 'Subscribe' do - = sprite_icon('rss', css_class: 'gl-icon') + = render Pajamas::ButtonComponent.new(href: dashboard_projects_path(rss_url_options), icon: 'rss', button_options: { title: _('Subscribe'), aria: { label: _('Subscribe') }, class: 'gl-display-none gl-sm-display-inline-flex' }) .content_list .loading diff --git a/app/views/dashboard/_groups_head.html.haml b/app/views/dashboard/_groups_head.html.haml index 1c82b30ed8d..09e2e35c617 100644 --- a/app/views/dashboard/_groups_head.html.haml +++ b/app/views/dashboard/_groups_head.html.haml @@ -3,8 +3,8 @@ - if current_user.can_create_group? .page-title-controls - = link_to _("New group"), new_group_path, class: "gl-button btn btn-confirm", data: { qa_selector: "new_group_button", testid: "new-group-button" } - + = render Pajamas::ButtonComponent.new(href: new_group_path, variant: :confirm, button_options: { data: { qa_selector: "new_group_button", testid: "new-group-button" } }) do + = _("New group") .top-area = gl_tabs_nav({ class: 'gl-flex-grow-1 gl-border-0' }) do = gl_tab_link_to _("Your groups"), dashboard_groups_path diff --git a/app/views/dashboard/_projects_head.html.haml b/app/views/dashboard/_projects_head.html.haml index 9c492a0da34..10e653fd427 100644 --- a/app/views/dashboard/_projects_head.html.haml +++ b/app/views/dashboard/_projects_head.html.haml @@ -1,6 +1,3 @@ -- project_tab_filter = local_assigns.fetch(:project_tab_filter, "") -- feature_project_list_filter_bar = Feature.enabled?(:project_list_filter_bar) - = content_for :flash_message do = render 'shared/project_limit' @@ -9,17 +6,13 @@ - if current_user.can_create_project? .page-title-controls - = link_to _("New project"), new_project_path, class: "gl-button btn btn-confirm", data: { qa_selector: 'new_project_button' } + = render Pajamas::ButtonComponent.new(href: new_project_path, variant: :confirm, button_options: { data: { qa_selector: 'new_project_button' } }) do + = _("New project") .top-area - .scrolling-tabs-container.inner-page-scroll-tabs.gl-flex-grow-1.gl-min-w-0.gl-w-full + .scrolling-tabs-container.inner-page-scroll-tabs.gl-flex-grow-1.gl-min-w-0 .fade-left= sprite_icon('chevron-lg-left', size: 12) .fade-right= sprite_icon('chevron-lg-right', size: 12) = render 'dashboard/projects_nav' - - unless feature_project_list_filter_bar - .nav-controls - = render 'shared/projects/search_form' - = render 'shared/projects/dropdown' -- if feature_project_list_filter_bar - .project-filters - = render 'shared/projects/search_bar', project_tab_filter: project_tab_filter + .nav-controls + = render 'shared/projects/search_form' diff --git a/app/views/dashboard/_projects_nav.html.haml b/app/views/dashboard/_projects_nav.html.haml index 29c820ddc58..7cbd2fb14ec 100644 --- a/app/views/dashboard/_projects_nav.html.haml +++ b/app/views/dashboard/_projects_nav.html.haml @@ -3,11 +3,11 @@ = gl_tabs_nav({ class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-w-full nav gl-tabs-nav' }) do = gl_tab_link_to dashboard_projects_path, { item_active: is_your_projects_path, class: 'shortcuts-activity', data: { placement: 'right' } } do - = _("Your projects") + = s_("ProjectList|Yours") = gl_tab_counter_badge(limited_counter_with_delimiter(@total_user_projects_count)) = gl_tab_link_to starred_dashboard_projects_path, { data: { placement: 'right' } } do - = _("Starred projects") + = s_("ProjectList|Starred") = gl_tab_counter_badge(limited_counter_with_delimiter(@total_starred_projects_count)) - = gl_tab_link_to _("Explore projects"), explore_root_path, { item_active: is_explore_projects_path, data: { placement: 'right' } } - = gl_tab_link_to _("Explore topics"), topics_explore_projects_path, { data: { placement: 'right' } } + = gl_tab_link_to s_("ProjectList|Explore"), explore_root_path, { item_active: is_explore_projects_path, data: { placement: 'right' } } + = gl_tab_link_to s_("ProjectList|Topics"), topics_explore_projects_path, { data: { placement: 'right' } } = render_if_exists "dashboard/removed_projects_tab" diff --git a/app/views/dashboard/_snippets_head.html.haml b/app/views/dashboard/_snippets_head.html.haml index be2124fdd7e..5a798c249d1 100644 --- a/app/views/dashboard/_snippets_head.html.haml +++ b/app/views/dashboard/_snippets_head.html.haml @@ -4,7 +4,8 @@ - if current_user && current_user.snippets.any? || @snippets.any? .page-title-controls - if can?(current_user, :create_snippet) - = link_to _("New snippet"), new_snippet_path, class: "gl-button btn btn-confirm", title: _("New snippet") + = render Pajamas::ButtonComponent.new(href: new_snippet_path, variant: :confirm, button_options: { title: _("New snippet") }) do + = _("New snippet") .top-area = gl_tabs_nav({ class: 'gl-border-0' }) do diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index 79f6bfc866a..5293f685d06 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -1,6 +1,7 @@ - @hide_top_links = true - page_title _("Issues") - @breadcrumb_link = issues_dashboard_path(assignee_username: current_user.username) +- add_page_specific_style 'page_bundles/issuable_list' - add_page_specific_style 'page_bundles/dashboard' = content_for :meta_tags do = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{current_user.name} issues") @@ -15,10 +16,7 @@ = render 'shared/new_project_item_select', path: 'issues/new', label: _("issue"), with_feature_enabled: 'issues', type: :issues - if ::Feature.enabled?(:vue_issues_dashboard) - .js-issues-dashboard{ data: { calendar_path: url_for(safe_params.merge(calendar_url_options)), - empty_state_svg_path: image_path('illustrations/issue-dashboard_results-without-filter.svg'), - is_signed_in: current_user.present?.to_s, - rss_path: url_for(safe_params.merge(rss_url_options)) } } + .js-issues-dashboard{ data: dashboard_issues_list_data(current_user) } - else .top-area = render 'shared/issuable/nav', type: :issues, display_count: !@no_filters_set diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml index 8a639d08a27..c921375edd1 100644 --- a/app/views/dashboard/merge_requests.html.haml +++ b/app/views/dashboard/merge_requests.html.haml @@ -1,6 +1,7 @@ - @hide_top_links = true - page_title _("Merge requests") - @breadcrumb_link = merge_requests_dashboard_path(assignee_username: current_user.username) +- add_page_specific_style 'page_bundles/issuable_list' = render_dashboard_ultimate_trial(current_user) diff --git a/app/views/dashboard/projects/_nav.html.haml b/app/views/dashboard/projects/_nav.html.haml index 3e39872902d..45e3267813f 100644 --- a/app/views/dashboard/projects/_nav.html.haml +++ b/app/views/dashboard/projects/_nav.html.haml @@ -1,19 +1,4 @@ -- inactive_class = 'btn p-2' -- active_class = 'btn p-2 active' -- project_tab_filter = local_assigns.fetch(:project_tab_filter, "") -- is_explore_trending = project_tab_filter == :explore_trending -- feature_project_list_filter_bar = Feature.enabled?(:project_list_filter_bar) - -.nav-block{ class: ("w-100" if feature_project_list_filter_bar) } - - if feature_project_list_filter_bar - .btn-group.button-filter-group.d-flex.m-0.p-0 - - if project_tab_filter == :explore || is_explore_trending - = link_to s_('DashboardProjects|Trending'), trending_explore_projects_path, class: is_explore_trending ? active_class : inactive_class - = link_to s_('DashboardProjects|All'), explore_projects_path, class: is_explore_trending ? inactive_class : active_class - - else - = link_to s_('DashboardProjects|All'), dashboard_projects_path, class: params[:personal].present? ? inactive_class : active_class - = link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true), class: params[:personal].present? ? active_class : inactive_class - - else - = gl_tabs_nav do - = gl_tab_link_to s_('DashboardProjects|All'), dashboard_projects_path, { item_active: params[:personal].blank? } - = gl_tab_link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true), { item_active: params[:personal].present? } +.nav-block + = gl_tabs_nav do + = gl_tab_link_to s_('DashboardProjects|All'), dashboard_projects_path, { item_active: params[:personal].blank? } + = gl_tab_link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true), { item_active: params[:personal].present? } diff --git a/app/views/dashboard/projects/index.html.haml b/app/views/dashboard/projects/index.html.haml index 0d9257e659a..f427c347dd3 100644 --- a/app/views/dashboard/projects/index.html.haml +++ b/app/views/dashboard/projects/index.html.haml @@ -12,7 +12,7 @@ = render "projects/last_push" - if show_projects?(@projects, params) = render 'dashboard/projects_head' - = render 'nav' unless Feature.enabled?(:project_list_filter_bar) + = render 'nav' = render 'projects' - else = render "zero_authorized_projects" diff --git a/app/views/dashboard/todos/_todo.html.haml b/app/views/dashboard/todos/_todo.html.haml index 47bc8f5c95b..9dfeaa3d07d 100644 --- a/app/views/dashboard/todos/_todo.html.haml +++ b/app/views/dashboard/todos/_todo.html.haml @@ -1,60 +1,66 @@ -%li.todo.gl-hover-border-blue-200.gl-hover-bg-blue-50.gl-hover-cursor-pointer{ class: "todo-#{todo.done? ? 'done' : 'pending'}", id: dom_id(todo), data: { url: todo_target_path(todo) } } - .gl-display-flex.gl-flex-direction-row - .todo-avatar.gl-display-none.gl-sm-display-inline-block - = author_avatar(todo, size: 40) - - .todo-item.flex-fill.gl-overflow-hidden.gl-overflow-x-auto.gl-align-self-center{ data: { qa_selector: "todo_item_container" } } - .todo-title.gl-mb-3.gl-md-mb-0 - - if todo_author_display?(todo) - = todo_target_state_pill(todo) - - %span.title-item.author-name.bold - - if todo.author - = link_to_author(todo, self_added: todo.self_added?) - - else - = _('(removed)') - - %span.title-item.action-name{ data: { qa_selector: "todo_action_name_content" } } - = todo_action_name(todo) - - %span.title-item.todo-label.todo-target-link +%li.todo.gl-hover-border-blue-200.gl-hover-bg-blue-50.gl-hover-cursor-pointer.gl-relative{ class: "todo-#{todo.done? ? 'done' : 'pending'}", id: dom_id(todo) } + .gl-display-flex.gl-flex-direction-column.gl-sm-flex-direction-row.gl-sm-align-items-center + .todo-item.gl-overflow-hidden.gl-overflow-x-auto.gl-align-self-center.gl-w-full{ data: { qa_selector: "todo_item_container" } } + .todo-title.gl-pt-2.gl-pb-3.gl-px-2.gl-md-mb-1.gl-font-sm.gl-text-gray-500 + + = todo_target_state_pill(todo) + + %span.todo-target-title{ data: { qa_selector: "todo_target_title_content" }, :id => dom_id(todo) + "_describer" } + = todo_target_title(todo) + + - if !todo.for_design? && !todo.member_access_requested? + · + + %span + = todo_parent_path(todo) + + %span.todo-label - if todo.target - = todo_target_link(todo) + = link_to todo_target_name(todo), todo_target_path(todo), class: 'todo-target-link gl-text-gray-500! gl-text-decoration-none!', :'aria-describedby' => dom_id(todo) + "_describer", :'aria-label' => todo_target_aria_label(todo) - else = _("(removed)") - %span.title-item.todo-target-title{ data: { qa_selector: "todo_target_title_content" } } - = todo_target_title(todo) - - %span.title-item.todo-project.todo-label - = s_('Todo|at %{todo_parent_path}').html_safe % { todo_parent_path: todo_parent_path(todo) } + .todo-body.gl-mb-2.gl-px-2.gl-display-flex.gl-align-items-flex-start.gl-lg-align-items-center + .todo-avatar.gl-display-none.gl-sm-display-inline-block + = author_avatar(todo, size: 24) + .todo-note + - if todo_author_display?(todo) + .author-name.bold.gl-display-inline + - if todo.author + = link_to_author(todo, self_added: todo.self_added?) + - else + = _('(removed)') - - if todo.self_assigned? - %span.title-item.action-name - = todo_self_addressing(todo) + %span.action-name{ data: { qa_selector: "todo_action_name_content" } }< + = todo_action_name(todo) + - if todo.note.present? + \: + - unless todo.note.present? || todo.self_assigned? + \. - %span.title-item - · + - if todo.self_assigned? + %span.action-name< + = todo_self_addressing(todo) + \. + - if todo.note.present? + %span.action-description.gl-font-style-italic< + = first_line_in_markdown(todo, :body, 100, is_todo: true, project: todo.project, group: todo.group) - %span.title-item.todo-timestamp - #{time_ago_with_tooltip(todo.created_at)} - = todo_due_date(todo) + .todo-timestamp.gl-white-space-nowrap.gl-sm-ml-3.gl-mt-2.gl-mb-2.gl-sm-my-0.gl-px-2.gl-sm-px-0 + %span.todo-timestamp.gl-font-sm.gl-text-gray-500 + = todo_due_date(todo) + #{time_ago_with_tooltip(todo.created_at)} - - if todo.note.present? - .todo-body - .todo-note.break-word - .md - = first_line_in_markdown(todo, :body, 150, project: todo.project, group: todo.group) - .todo-actions.gl-ml-3 + .todo-actions.gl-mr-4.gl-px-2.gl-sm-px-0.gl-sm-mx-0 - if todo.pending? - = link_to dashboard_todo_path(todo), method: :delete, class: 'gl-button gl-bg-gray-50 btn btn-default btn-loading d-flex align-items-center js-done-todo', data: { href: dashboard_todo_path(todo) } do + = render Pajamas::ButtonComponent.new(button_options: { class: 'btn-loading btn-icon gl-display-flex js-done-todo has-tooltip', title: _('Mark as done')}, method: :delete, href: dashboard_todo_path(todo)), 'aria-label' => _('Mark as done') do = gl_loading_icon(inline: true) - = _('Done') - = link_to restore_dashboard_todo_path(todo), method: :patch, class: 'gl-button gl-bg-gray-50 btn btn-default btn-loading d-flex align-items-center js-undo-todo hidden', data: { href: restore_dashboard_todo_path(todo) } do + = sprite_icon('check', css_class: 'js-todo-button-icon') + = render Pajamas::ButtonComponent.new(button_options: { class: 'btn-loading btn-icon gl-display-flex js-undo-todo hidden has-tooltip', title: _('Undo')}, method: :patch, href: restore_dashboard_todo_path(todo)), 'aria-label' => _('Undo') do = gl_loading_icon(inline: true) - = _('Undo') + = sprite_icon('redo', css_class: 'js-todo-button-icon') - else - = link_to restore_dashboard_todo_path(todo), method: :patch, class: 'gl-button gl-bg-gray-50 btn btn-default btn-loading d-flex align-items-center js-add-todo', data: { href: restore_dashboard_todo_path(todo) } do + = render Pajamas::ButtonComponent.new(button_options: { class: 'btn-loading btn-icon gl-display-flex js-add-todo has-tooltip', title: _('Add a to do')}, method: :patch, href: restore_dashboard_todo_path(todo)), 'aria-label' => _('Add a to do') do = gl_loading_icon(inline: true) - = _('Add a to do') + = sprite_icon('todo-add', css_class: 'js-todo-button-icon') diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index deb1ac9e360..c0bd3ee3f0d 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -5,6 +5,7 @@ = render_two_factor_auth_recovery_settings_check = render_dashboard_ultimate_trial(current_user) - add_page_specific_style 'page_bundles/todos' +- add_page_specific_style 'page_bundles/issuable' .page-title-holder.d-flex.align-items-center %h1.page-title.gl-font-size-h-display= _("To-Do List") |