8e4a33f2e2
Update snippets UI ## What does this MR do? Updates snippets UI _(mainly mobile view)_ to new UI proposed in #18849. ## Are there points in the code the reviewer needs to double check? Does anyone know the implementation difference between `app/views/snippets/show.html.haml` and `app/views/projects/snippets/show.html.haml`? I have only been updating the latter as it's the only one I can find implemented. I assume the former is rendered somewhere seeing as there is controllers for it too. But this doesn't seem very DRY from my current perspective. ## Why was this MR needed? ## Screenshots (if relevant) ![Screen_Shot_2016-09-06_at_14.20.10](/uploads/ac124a3b0896872ce851b9f56fbe339c/Screen_Shot_2016-09-06_at_14.20.10.png) ![Screen_Shot_2016-09-06_at_14.20.32](/uploads/8d3c7b1d1a5f562ceb6dc22bde695289/Screen_Shot_2016-09-06_at_14.20.32.png) ![Screen_Shot_2016-09-06_at_14.20.48](/uploads/6b1c31ece6d2400bbfc3c673d9e82d4b/Screen_Shot_2016-09-06_at_14.20.48.png) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #18849 See merge request !6210
72 lines
2.7 KiB
Text
72 lines
2.7 KiB
Text
%li{ class: mr_css_classes(merge_request) }
|
|
- if @bulk_edit
|
|
.issue-check
|
|
= check_box_tag dom_id(merge_request, "selected"), nil, false, 'data-id' => merge_request.id, class: "selected_issue"
|
|
|
|
.merge-request-title.title
|
|
%span.merge-request-title-text
|
|
= link_to merge_request.title, merge_request_path(merge_request)
|
|
%ul.controls
|
|
- if merge_request.merged?
|
|
%li
|
|
MERGED
|
|
- elsif merge_request.closed?
|
|
%li
|
|
= icon('ban')
|
|
CLOSED
|
|
|
|
- if merge_request.pipeline
|
|
%li
|
|
= render_pipeline_status(merge_request.pipeline)
|
|
|
|
- if merge_request.open? && merge_request.broken?
|
|
%li
|
|
= link_to merge_request_path(merge_request), class: "has-tooltip", title: "Cannot be merged automatically", data: { container: 'body' } do
|
|
= icon('exclamation-triangle')
|
|
|
|
- if merge_request.assignee
|
|
%li
|
|
= link_to_member(merge_request.source_project, merge_request.assignee, name: false, title: "Assigned to :name")
|
|
|
|
- upvotes, downvotes = merge_request.upvotes, merge_request.downvotes
|
|
- if upvotes > 0
|
|
%li
|
|
= icon('thumbs-up')
|
|
= upvotes
|
|
|
|
- if downvotes > 0
|
|
%li
|
|
= icon('thumbs-down')
|
|
= downvotes
|
|
|
|
- note_count = merge_request.mr_and_commit_notes.user.count
|
|
%li
|
|
= link_to merge_request_path(merge_request, anchor: 'notes'), class: ('no-comments' if note_count.zero?) do
|
|
= icon('comments')
|
|
= note_count
|
|
|
|
.merge-request-info
|
|
#{merge_request.to_reference} ·
|
|
opened #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')}
|
|
by #{link_to_member(@project, merge_request.author, avatar: false)}
|
|
- if merge_request.target_project.default_branch != merge_request.target_branch
|
|
|
|
= link_to namespace_project_commits_path(merge_request.project.namespace, merge_request.project, merge_request.target_branch) do
|
|
= icon('code-fork')
|
|
= merge_request.target_branch
|
|
- if merge_request.milestone
|
|
|
|
= link_to namespace_project_merge_requests_path(merge_request.project.namespace, merge_request.project, milestone_title: merge_request.milestone.title) do
|
|
= icon('clock-o')
|
|
= merge_request.milestone.title
|
|
- if merge_request.labels.any?
|
|
|
|
- merge_request.labels.each do |label|
|
|
= link_to_label(label, project: merge_request.project, type: 'merge_request')
|
|
- if merge_request.tasks?
|
|
|
|
%span.task-status
|
|
= merge_request.task_status
|
|
|
|
.pull-right.hidden-xs
|
|
%span updated #{time_ago_with_tooltip(merge_request.updated_at, placement: 'bottom', html_class: 'merge_request_updated_ago')}
|