summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-01-30 00:30:25 -0500
committerJacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home>2016-01-30 00:30:25 -0500
commite2b6e9c3c531649535e47de0814dd4cb651411fa (patch)
tree61f47d00c4f0c86bb6de536364d2e297b26ad5a0
parent541fcc37bf0c8979cc1495b63ac71912cc28f825 (diff)
downloadgitlab-ce-e2b6e9c3c531649535e47de0814dd4cb651411fa.tar.gz
Add ajax calls to return JSON
Fix subtitles on minimize. Fix styles for show.
-rw-r--r--app/assets/stylesheets/framework/mobile.scss2
-rw-r--r--app/assets/stylesheets/framework/sidebar.scss9
-rw-r--r--app/controllers/projects/issues_controller.rb4
-rw-r--r--app/views/projects/issues/show.html.haml1
-rw-r--r--app/views/projects/merge_requests/_show.html.haml1
-rw-r--r--app/views/shared/issuable/_sidebar.html.haml2
6 files changed, 14 insertions, 5 deletions
diff --git a/app/assets/stylesheets/framework/mobile.scss b/app/assets/stylesheets/framework/mobile.scss
index 0997dfc287c..3bfac2ad9b5 100644
--- a/app/assets/stylesheets/framework/mobile.scss
+++ b/app/assets/stylesheets/framework/mobile.scss
@@ -116,7 +116,7 @@
display: none;
}
- aside {
+ aside:not(.right-sidebar){
display: none;
}
diff --git a/app/assets/stylesheets/framework/sidebar.scss b/app/assets/stylesheets/framework/sidebar.scss
index 1616c140c0d..b7f532c0771 100644
--- a/app/assets/stylesheets/framework/sidebar.scss
+++ b/app/assets/stylesheets/framework/sidebar.scss
@@ -284,6 +284,15 @@
@include collapsed-sidebar;
}
+ .page-gutter {
+ &.right-sidebar-collapsed {
+ @include collapsed-gutter;
+ }
+ &.right-sidebar-expanded {
+ @include expanded-gutter;
+ }
+ }
+
.collapse-nav {
display: none;
}
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index 68244883803..1b6ea280ad4 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -98,7 +98,9 @@ class Projects::IssuesController < Projects::ApplicationController
format.json do
render json: {
saved: @issue.valid?,
- assignee_avatar_url: @issue.assignee.try(:avatar_url)
+ assignee_avatar_url: @issue.assignee.try(:avatar_url),
+ milestone: @issue.milestone.title,
+ labels: @issue.labels.pluck(:id,:title,:color)
}
end
end
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml
index a567c22c823..030f4a2e644 100644
--- a/app/views/projects/issues/show.html.haml
+++ b/app/views/projects/issues/show.html.haml
@@ -57,6 +57,5 @@
%section.col-md-12
.issuable-discussion
= render 'projects/issues/discussion'
- = render 'shared/show_aside'
= render 'shared/issuable/sidebar', issuable: @issue \ No newline at end of file
diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml
index c2ecb48b094..da67645bc2b 100644
--- a/app/views/projects/merge_requests/_show.html.haml
+++ b/app/views/projects/merge_requests/_show.html.haml
@@ -73,7 +73,6 @@
%section.col-md-12
.issuable-discussion
= render "projects/merge_requests/discussion"
- = render 'shared/show_aside'
#commits.commits.tab-pane
- # This tab is always loaded via AJAX
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml
index f4f04a42196..0ed2c9c710d 100644
--- a/app/views/shared/issuable/_sidebar.html.haml
+++ b/app/views/shared/issuable/_sidebar.html.haml
@@ -23,7 +23,7 @@
%a.btn.btn-default.disabled{href: '#'}
Next
- = form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, html: {class: 'issuable-context-form inline-update js-issuable-update'} do |f|
+ = form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, html: {class: 'issuable-context-form inline-update js-issuable-update', 'data-type' => 'json'} do |f|
.block.assignee
.sidebar-collapsed-icon
- if issuable.assignee