Commit d905a431 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'affix-assignee' into 'master'

Affix milestone/assignee UI element

See merge request !1536
parents 19eb8638 896c0462
...@@ -15,3 +15,9 @@ class @Issue ...@@ -15,3 +15,9 @@ class @Issue
"issue" "issue"
updateTaskState updateTaskState
) )
$('.issuable-affix').affix offset:
top: ->
@top = $('.issue-details').outerHeight(true) + 25
bottom: ->
@bottom = $('.footer').outerHeight(true)
...@@ -20,6 +20,12 @@ class @MergeRequest ...@@ -20,6 +20,12 @@ class @MergeRequest
if $("a.btn-close").length if $("a.btn-close").length
$("li.task-list-item input:checkbox").prop("disabled", false) $("li.task-list-item input:checkbox").prop("disabled", false)
$('.issuable-affix').affix offset:
top: ->
@top = $('.merge-request-details').outerHeight(true) + 70
bottom: ->
@bottom = $('.footer').outerHeight(true)
# Local jQuery finder # Local jQuery finder
$: (selector) -> $: (selector) ->
this.$el.find(selector) this.$el.find(selector)
......
@media (max-width: $screen-sm-max) {
.issuable-affix {
margin-top: 20px;
}
}
@media (max-width: $screen-md-max) {
.issuable-affix {
position: static;
}
}
@media (min-width: $screen-md-max) {
.issuable-affix {
&.affix-top {
position: static;
}
&.affix {
position: fixed;
top: 70px;
width: 220px;
}
}
}
...@@ -94,8 +94,15 @@ ...@@ -94,8 +94,15 @@
} }
} }
.issue-show-labels .color-label { .issue-show-labels {
padding: 6px 10px; a {
margin-right: 5px;
margin-bottom: 5px;
display: inline-block;
.color-label {
padding: 6px 10px;
}
}
} }
form.edit-issue { form.edit-issue {
......
...@@ -95,7 +95,14 @@ ...@@ -95,7 +95,14 @@
color: #999; color: #999;
.merge-request-labels { .merge-request-labels {
display: inline-block; a {
margin-right: 5px;
margin-bottom: 5px;
display: inline-block;
.color-label {
padding: 6px 10px;
}
}
} }
} }
} }
......
...@@ -14,24 +14,24 @@ ...@@ -14,24 +14,24 @@
.voting_notes#notes= render "projects/notes/notes_with_form" .voting_notes#notes= render "projects/notes/notes_with_form"
.col-md-3 .col-md-3
%div .issuable-affix
.clearfix .clearfix
%span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'} %span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'}
= cross_project_reference(@project, @issue) = cross_project_reference(@project, @issue)
%hr
.context
%cite.cgray
= render partial: 'issue_context', locals: { issue: @issue }
%hr
.clearfix
.votes-holder
%h6 Votes
#votes= render 'votes/votes_block', votable: @issue
- if @issue.labels.any?
%hr %hr
%h6 Labels .context
.issue-show-labels %cite.cgray
- @issue.labels.each do |label| = render partial: 'issue_context', locals: { issue: @issue }
= link_to project_issues_path(@project, label_name: label.name) do %hr
%p= render_colored_label(label) .clearfix
.votes-holder
%h6 Votes
#votes= render 'votes/votes_block', votable: @issue
- if @issue.labels.any?
%hr
%h6 Labels
.issue-show-labels
- @issue.labels.each do |label|
= link_to project_issues_path(@project, label_name: label.name) do
= render_colored_label(label)
%h4.page-title .issue
.issue-box{ class: issue_box_class(@issue) } .issue-details
- if @issue.closed? %h4.page-title
Closed .issue-box{ class: issue_box_class(@issue) }
- else - if @issue.closed?
Open Closed
Issue ##{@issue.iid} - else
%small.creator Open
· created by #{link_to_member(@project, @issue.author)} #{issue_timestamp(@issue)} Issue ##{@issue.iid}
%small.creator
· created by #{link_to_member(@project, @issue.author)} #{issue_timestamp(@issue)}
.pull-right .pull-right
- if can?(current_user, :write_issue, @project) - if can?(current_user, :write_issue, @project)
= link_to new_project_issue_path(@project), class: "btn btn-grouped new-issue-link", title: "New Issue", id: "new_issue_link" do = link_to new_project_issue_path(@project), class: "btn btn-grouped new-issue-link", title: "New Issue", id: "new_issue_link" do
%i.fa.fa-plus %i.fa.fa-plus
New Issue New Issue
- if can?(current_user, :modify_issue, @issue) - if can?(current_user, :modify_issue, @issue)
- if @issue.closed? - if @issue.closed?
= link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-grouped btn-reopen" = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-grouped btn-reopen"
- else - else
= link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close", title: "Close Issue" = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-grouped btn-close", title: "Close Issue"
= link_to edit_project_issue_path(@project, @issue), class: "btn btn-grouped issuable-edit" do = link_to edit_project_issue_path(@project, @issue), class: "btn btn-grouped issuable-edit" do
%i.fa.fa-pencil-square-o %i.fa.fa-pencil-square-o
Edit Edit
%hr %hr
%h3.issue-title %h3.issue-title
= gfm escape_once(@issue.title) = gfm escape_once(@issue.title)
%div %div
- if @issue.description.present? - if @issue.description.present?
.description .description
.wiki .wiki
= preserve do = preserve do
= markdown(@issue.description, parse_tasks: true) = markdown(@issue.description, parse_tasks: true)
%hr %hr
= render "projects/issues/discussion" .issue-discussion
= render "projects/issues/discussion"
...@@ -10,22 +10,23 @@ ...@@ -10,22 +10,23 @@
= render "projects/merge_requests/show/participants" = render "projects/merge_requests/show/participants"
= render "projects/notes/notes_with_form" = render "projects/notes/notes_with_form"
.col-md-3 .col-md-3
.clearfix .issuable-affix
%span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'} .clearfix
= cross_project_reference(@project, @merge_request) %span.slead.has_tooltip{:"data-original-title" => 'Cross-project reference'}
%hr = cross_project_reference(@project, @merge_request)
.context %hr
%cite.cgray .context
= render partial: 'projects/merge_requests/show/context', locals: { merge_request: @merge_request } %cite.cgray
%hr = render partial: 'projects/merge_requests/show/context', locals: { merge_request: @merge_request }
.votes-holder
%h6 Votes
#votes= render 'votes/votes_block', votable: @merge_request
- if @merge_request.labels.any?
%hr %hr
%h6 Labels .votes-holder
.merge-request-show-labels %h6 Votes
- @merge_request.labels.each do |label| #votes= render 'votes/votes_block', votable: @merge_request
= link_to project_merge_requests_path(@project, label_name: label.name) do
%p= render_colored_label(label) - if @merge_request.labels.any?
%hr
%h6 Labels
.merge-request-show-labels
- @merge_request.labels.each do |label|
= link_to project_merge_requests_path(@project, label_name: label.name) do
= render_colored_label(label)
.merge-request{'data-url' => project_merge_request_path(@project, @merge_request)} .merge-request{'data-url' => project_merge_request_path(@project, @merge_request)}
= render "projects/merge_requests/show/mr_title" .merge-request-details
%hr = render "projects/merge_requests/show/mr_title"
= render "projects/merge_requests/show/mr_box" %hr
%hr = render "projects/merge_requests/show/mr_box"
.append-bottom-20 %hr
.slead .append-bottom-20
%span From .slead
- if @merge_request.for_fork? %span From
%strong.label-branch< - if @merge_request.for_fork?
- if @merge_request.source_project %strong.label-branch<
= link_to @merge_request.source_project_namespace, project_path(@merge_request.source_project) - if @merge_request.source_project
- else = link_to @merge_request.source_project_namespace, project_path(@merge_request.source_project)
\ #{@merge_request.source_project_namespace} - else
\:#{@merge_request.source_branch} \ #{@merge_request.source_project_namespace}
%span into \:#{@merge_request.source_branch}
%strong.label-branch #{@merge_request.target_project_namespace}:#{@merge_request.target_branch} %span into
- else %strong.label-branch #{@merge_request.target_project_namespace}:#{@merge_request.target_branch}
%strong.label-branch #{@merge_request.source_branch} - else
%span into %strong.label-branch #{@merge_request.source_branch}
%strong.label-branch #{@merge_request.target_branch} %span into
- if @merge_request.open? %strong.label-branch #{@merge_request.target_branch}
%span.pull-right - if @merge_request.open?
.btn-group %span.pull-right
%a.btn.dropdown-toggle{ data: {toggle: :dropdown} } .btn-group
%i.fa.fa-download %a.btn.dropdown-toggle{ data: {toggle: :dropdown} }
Download as %i.fa.fa-download
%span.caret Download as
%ul.dropdown-menu %span.caret
%li= link_to "Email Patches", project_merge_request_path(@project, @merge_request, format: :patch) %ul.dropdown-menu
%li= link_to "Plain Diff", project_merge_request_path(@project, @merge_request, format: :diff) %li= link_to "Email Patches", project_merge_request_path(@project, @merge_request, format: :patch)
%li= link_to "Plain Diff", project_merge_request_path(@project, @merge_request, format: :diff)
= render "projects/merge_requests/show/how_to_merge" = render "projects/merge_requests/show/how_to_merge"
= render "projects/merge_requests/show/state_widget" = render "projects/merge_requests/show/state_widget"
- if @commits.present? - if @commits.present?
%ul.nav.nav-tabs.merge-request-tabs %ul.nav.nav-tabs.merge-request-tabs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment