diff options
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/_new_commit_form.html.haml | 7 | ||||
-rw-r--r-- | app/views/shared/issuable/_search_bar.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/issuable/_sidebar_assignees.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/projects/_project.html.haml | 9 |
4 files changed, 14 insertions, 7 deletions
diff --git a/app/views/shared/_new_commit_form.html.haml b/app/views/shared/_new_commit_form.html.haml index 62ba89e2576..5641c67e462 100644 --- a/app/views/shared/_new_commit_form.html.haml +++ b/app/views/shared/_new_commit_form.html.haml @@ -3,8 +3,11 @@ = render 'shared/commit_message_container', placeholder: placeholder -- if @project.empty_repo? - = hidden_field_tag 'branch_name', @ref +- if project.empty_repo? + - ref = local_assigns[:ref] || @ref + - branch_name_class = project.empty_repo_upload_experiment? ? 'js-branch-name' : nil + + = hidden_field_tag 'branch_name', ref, class: branch_name_class - else - if can?(current_user, :push_code, @project) .form-group.row.branch diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index d1e74cc771e..b82cfc86e26 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -195,7 +195,7 @@ #js-board-labels-toggle - if current_user #js-board-epics-swimlanes-toggle - .js-board-config{ data: { can_admin_list: user_can_admin_list, has_scope: board.scoped? } } + .js-board-config{ data: { can_admin_list: user_can_admin_list.to_s, has_scope: board.scoped?.to_s } } - if user_can_admin_list - if Feature.enabled?(:board_new_list, board.resource_parent, default_enabled: :yaml) .js-create-column-trigger{ data: board_list_data } diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml index 2b6920ed80f..26986c913f0 100644 --- a/app/views/shared/issuable/_sidebar_assignees.html.haml +++ b/app/views/shared/issuable/_sidebar_assignees.html.haml @@ -43,6 +43,9 @@ - options[:dropdown_class] += ' dropdown-extended-height' - options[:footer_content] = true - options[:wrapper_class] = 'js-sidebar-assignee-dropdown' + - options[:toggle_class] += ' js-invite-members-track' + - data['track-event'] = show_invite_members_track_event + - options[:data].merge!(data) - invite_text = _('Invite Members') - track_label = 'edit_assignee' diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index 115d0c9a7c5..a33cd7c3b53 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -12,9 +12,10 @@ - css_class += " no-description" if project.description.blank? && !show_last_commit_as_description - cache_key = project_list_cache_key(project, pipeline_status: pipeline_status) - updated_tooltip = time_ago_with_tooltip(project.last_activity_date) -- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) && project.last_pipeline.present? +- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) +- last_pipeline = project.last_pipeline if show_pipeline_status_icon - css_controls_class = compact_mode ? [] : ["flex-lg-row", "justify-content-lg-between"] -- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon +- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon && last_pipeline.present? - avatar_container_class = project.creator && use_creator_avatar ? '' : 'rect-avatar' %li.project-row.d-flex{ class: css_class } @@ -68,10 +69,10 @@ .controls.d-flex.flex-sm-column.align-items-center.align-items-sm-end.flex-wrap.flex-shrink-0.text-secondary{ class: css_controls_class.join(" ") } .icon-container.d-flex.align-items-center - - if show_pipeline_status_icon + - if show_pipeline_status_icon && last_pipeline.present? - pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref) %span.icon-wrapper.pipeline-status - = render 'ci/status/icon', status: project.last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path + = render 'ci/status/icon', status: last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path = render_if_exists 'shared/projects/archived', project: project - if stars |