Commit 9c843041 authored by Job van der Voort's avatar Job van der Voort

add responsive sidebar to issues, milestones and MRs

parent d718209b
...@@ -2,8 +2,10 @@ responsive_resize = -> ...@@ -2,8 +2,10 @@ responsive_resize = ->
current_width = $(window).width() current_width = $(window).width()
if current_width < 985 if current_width < 985
$('.responsive-side').addClass("ui right wide sidebar") $('.responsive-side').addClass("ui right wide sidebar")
$('.responsive-side-left').addClass("ui left sidebar")
else else
$('.responsive-side').removeClass("ui right wide sidebar") $('.responsive-side').removeClass("ui right wide sidebar")
$('.responsive-side-left').removeClass("ui left sidebar")
$ -> $ ->
# Depending on window size, set the sidebar offscreen. # Depending on window size, set the sidebar offscreen.
......
...@@ -2,10 +2,19 @@ ...@@ -2,10 +2,19 @@
z-index: 1000 !important; z-index: 1000 !important;
background: #fff; background: #fff;
padding: 10px; padding: 10px;
border-left: 1px solid #e1e1e1;
width: 285px; width: 285px;
} }
.ui.left.sidebar {
border-right: 1px solid #e1e1e1;
border-left: 0;
}
.ui.right.sidebar {
border-left: 1px solid #e1e1e1;
border-right: 0;
}
.sidebar-expand-button { .sidebar-expand-button {
background: #f9f9f9; background: #f9f9f9;
color: #555; color: #555;
...@@ -27,3 +36,14 @@ ...@@ -27,3 +36,14 @@
padding-right: 25px; padding-right: 25px;
} }
} }
.left.sidebar-expand-button {
left: 0px;
right: auto;
border: 1px solid #E1E1E1;
border-left: 0;
&:hover {
padding-right: 14px;
padding-left: 25px;
}
}
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
%hr %hr
.row .row
.col-md-3 .left.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x
.col-md-3.responsive-side-left
= render 'shared/filter', entity: 'issue' = render 'shared/filter', entity: 'issue'
.col-md-9 .col-md-9
= render 'shared/issues' = render 'shared/issues'
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
List all merge requests from all projects you have access to. List all merge requests from all projects you have access to.
%hr %hr
.row .row
.col-md-3 .left.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x
.col-md-3.responsive-side-left
= render 'shared/filter', entity: 'merge_request' = render 'shared/filter', entity: 'merge_request'
.col-md-9 .col-md-9
= render 'shared/merge_requests' = render 'shared/merge_requests'
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.dashboard.row .dashboard.row
.activities.col-md-8 .activities.col-md-8
= render 'activities' = render 'activities'
.side.col-md-4.responsive-side .side.col-md-4.left.responsive-side
= render 'sidebar' = render 'sidebar'
.sidebar-expand-button.hidden-lg.hidden-md .sidebar-expand-button.hidden-lg.hidden-md
......
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
%hr %hr
.row .row
.col-md-3 .left.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x
.col-md-3.responsive-side-left
= render 'shared/filter', entity: 'issue' = render 'shared/filter', entity: 'issue'
.col-md-9 .col-md-9
= render 'shared/issues' = render 'shared/issues'
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
To see all merge requests you should visit #{link_to 'dashboard', merge_requests_dashboard_path} page. To see all merge requests you should visit #{link_to 'dashboard', merge_requests_dashboard_path} page.
%hr %hr
.row .row
.col-md-3 .left.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x
.col-md-3.responsive-side-left
= render 'shared/filter', entity: 'merge_request' = render 'shared/filter', entity: 'merge_request'
.col-md-9 .col-md-9
= render 'shared/merge_requests' = render 'shared/merge_requests'
= render "head" = render "head"
.row .row
.col-md-3 .left.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x
.col-md-3.responsive-side-left
= render 'shared/project_filter', project_entities_path: project_issues_path(@project), = render 'shared/project_filter', project_entities_path: project_issues_path(@project),
labels: true, redirect: 'issues' labels: true, redirect: 'issues'
.col-md-9.issues-holder .col-md-9.issues-holder
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
%span (#{@merge_requests.total_count}) %span (#{@merge_requests.total_count})
%hr %hr
.row .row
.col-md-3 .left.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x
.col-md-3.responsive-side-left
= render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project), = render 'shared/project_filter', project_entities_path: project_merge_requests_path(@project),
labels: true, redirect: 'merge_requests' labels: true, redirect: 'merge_requests'
.col-md-9 .col-md-9
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
New Milestone New Milestone
.row .row
.col-md-3.hidden-sm .left.sidebar-expand-button.hidden-lg.hidden-md
%i.icon-list.icon-2x
.col-md-3.responsive-side-left
%ul.nav.nav-pills.nav-stacked %ul.nav.nav-pills.nav-stacked
%li{class: ("active" if (params[:f] == "active" || !params[:f]))} %li{class: ("active" if (params[:f] == "active" || !params[:f]))}
= link_to project_milestones_path(@project, f: "active") do = link_to project_milestones_path(@project, f: "active") do
......
.side-filters.hidden-xs.hidden-sm .side-filters
= form_tag filter_path(entity), method: 'get' do = form_tag filter_path(entity), method: 'get' do
- if current_user - if current_user
%fieldset.scope-filter %fieldset.scope-filter
......
.side-filters.hidden-xs.hidden-sm .side-filters
= form_tag project_entities_path, method: 'get' do = form_tag project_entities_path, method: 'get' do
- if current_user - if current_user
%fieldset %fieldset
......
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