Commit fc90db7c authored by Fatih Acet's avatar Fatih Acet

Merge branch 'create-mr-banner' into 'master'

MR banner & flash notices updates

### What does this MR do?
* Moves the create MR banner below subnav
* Changes MR banner background to white
* Moves flash notices underneath subnav
* Adds container within flash notices to align with content

Closes #22767 
### Why was this MR needed?
It looked a bit out of place between the two navs & had unneeded spacing.

### Screenshots (if relevant)
Before:   
<img src="/uploads/c1676a1923893a7ba7e1c6d6a50d4ea6/Screen_Shot_2016-09-09_at_7.17.31_PM.png" width="800px">
After:   
<img src="/uploads/74a2d6c8c43b9a15cd535a2a7adb2685/Screen_Shot_2016-09-28_at_3.41.29_PM.png" width="800px">

Before:   
<img src="/uploads/285e3de31326c48de43bb48abd4d907c/Screen_Shot_2016-09-29_at_10.57.55_AM.png" width="800px">
After:    
<img src="/uploads/0877e3e45755e5ca36694c52ad2e6198/Screen_Shot_2016-09-29_at_10.56.04_AM.png" width="800px">

With both alert and broadcast message:
![Screen_Shot_2016-09-29_at_11.06.51_AM](/uploads/ba3963a73b5c82940533c369ec54ec50/Screen_Shot_2016-09-29_at_11.06.51_AM.png)


See merge request !6581
parents df100ca2 a2af7790
...@@ -21,6 +21,7 @@ v 8.13.0 (unreleased) ...@@ -21,6 +21,7 @@ v 8.13.0 (unreleased)
- Add missing values to linter !6276 (Katarzyna Kobierska Ula Budziszewska) - Add missing values to linter !6276 (Katarzyna Kobierska Ula Budziszewska)
- Fix Long commit messages overflow viewport in file tree - Fix Long commit messages overflow viewport in file tree
- Revert avoid touching file system on Build#artifacts? - Revert avoid touching file system on Build#artifacts?
- Add broadcast messages and alerts below sub-nav
- Update ruby-prof to 0.16.2. !6026 (Elan Ruusamäe) - Update ruby-prof to 0.16.2. !6026 (Elan Ruusamäe)
- Fix unnecessary escaping of reserved HTML characters in milestone title. !6533 - Fix unnecessary escaping of reserved HTML characters in milestone title. !6533
- Add organization field to user profile - Add organization field to user profile
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
margin: 0; margin: 0;
margin-bottom: $gl-padding; margin-bottom: $gl-padding;
font-size: 14px; font-size: 14px;
position: relative;
z-index: 1;
.flash-notice { .flash-notice {
@extend .alert; @extend .alert;
...@@ -33,6 +35,12 @@ ...@@ -33,6 +35,12 @@
} }
} }
.content-wrapper {
.flash-notice .container-fluid {
background-color: transparent;
}
}
@media (max-width: $screen-md-min) { @media (max-width: $screen-md-min) {
ul.notes { ul.notes {
.flash-container.timeline-content { .flash-container.timeline-content {
......
.scrolling-tabs-container.sub-nav-scroll = content_for :sub_nav do
= render 'shared/nav_scroll' .scrolling-tabs-container.sub-nav-scroll
.nav-links.sub-nav.scrolling-tabs = render 'shared/nav_scroll'
%ul{ class: (container_class) } .nav-links.sub-nav.scrolling-tabs
= nav_link(controller: :system_info) do %ul{ class: (container_class) }
= link_to admin_system_info_path, title: 'System Info' do = nav_link(controller: :system_info) do
%span = link_to admin_system_info_path, title: 'System Info' do
System Info %span
= nav_link(controller: :background_jobs) do System Info
= link_to admin_background_jobs_path, title: 'Background Jobs' do = nav_link(controller: :background_jobs) do
%span = link_to admin_background_jobs_path, title: 'Background Jobs' do
Background Jobs %span
= nav_link(controller: :logs) do Background Jobs
= link_to admin_logs_path, title: 'Logs' do = nav_link(controller: :logs) do
%span = link_to admin_logs_path, title: 'Logs' do
Logs %span
= nav_link(controller: :health_check) do Logs
= link_to admin_health_check_path, title: 'Health Check' do = nav_link(controller: :health_check) do
%span = link_to admin_health_check_path, title: 'Health Check' do
Health Check %span
= nav_link(controller: :requests_profiles) do Health Check
= link_to admin_requests_profiles_path, title: 'Requests Profiles' do = nav_link(controller: :requests_profiles) do
%span = link_to admin_requests_profiles_path, title: 'Requests Profiles' do
Requests Profiles %span
Requests Profiles
.scrolling-tabs-container.sub-nav-scroll = content_for :sub_nav do
= render 'shared/nav_scroll' .scrolling-tabs-container.sub-nav-scroll
.nav-links.sub-nav.scrolling-tabs = render 'shared/nav_scroll'
%ul{ class: (container_class) } .nav-links.sub-nav.scrolling-tabs
= nav_link(controller: :dashboard, html_options: {class: 'home'}) do %ul{ class: (container_class) }
= link_to admin_root_path, title: 'Overview' do = nav_link(controller: :dashboard, html_options: {class: 'home'}) do
%span = link_to admin_root_path, title: 'Overview' do
Overview %span
= nav_link(controller: [:admin, :projects]) do Overview
= link_to admin_namespaces_projects_path, title: 'Projects' do = nav_link(controller: [:admin, :projects]) do
%span = link_to admin_namespaces_projects_path, title: 'Projects' do
Projects %span
= nav_link(controller: :users) do Projects
= link_to admin_users_path, title: 'Users' do = nav_link(controller: :users) do
%span = link_to admin_users_path, title: 'Users' do
Users %span
= nav_link(controller: :groups) do Users
= link_to admin_groups_path, title: 'Groups' do = nav_link(controller: :groups) do
%span = link_to admin_groups_path, title: 'Groups' do
Groups %span
= nav_link path: 'builds#index' do Groups
= link_to admin_builds_path, title: 'Builds' do = nav_link path: 'builds#index' do
%span = link_to admin_builds_path, title: 'Builds' do
Builds %span
= nav_link path: ['runners#index', 'runners#show'] do Builds
= link_to admin_runners_path, title: 'Runners' do = nav_link path: ['runners#index', 'runners#show'] do
%span = link_to admin_runners_path, title: 'Runners' do
Runners %span
Runners
.flash-container.flash-container-page .flash-container.flash-container-page
- if alert - if alert
.flash-alert .flash-alert
= alert %div{ class: (container_class) }
%span= alert
- elsif notice - elsif notice
.flash-notice .flash-notice
= notice %div{ class: (container_class) }
%span= notice
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
.container-fluid .container-fluid
= render "layouts/nav/#{nav}" = render "layouts/nav/#{nav}"
.content-wrapper{ class: "#{layout_nav_class}" } .content-wrapper{ class: "#{layout_nav_class}" }
= yield :sub_nav
= render "layouts/broadcast" = render "layouts/broadcast"
= render "layouts/flash" = render "layouts/flash"
= yield :flash_message = yield :flash_message
......
.nav-block.activity-filter-block - @no_container = true
- if current_user
.controls
= link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "Feed", class: 'btn rss-btn' do
%i.fa.fa-rss
= render 'shared/event_filter' %div{ class: container_class }
.nav-block.activity-filter-block
- if current_user
.controls
= link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "Feed", class: 'btn rss-btn' do
= icon('rss')
.content_list.project-activity{:"data-href" => activity_project_path(@project)} = render 'shared/event_filter'
= spinner
.content_list.project-activity{:"data-href" => activity_project_path(@project)}
= spinner
:javascript :javascript
var activity = new Activities(); var activity = new Activities();
......
- if event = last_push_event - if event = last_push_event
- if show_last_push_widget?(event) - if show_last_push_widget?(event)
.row-content-block.top-block.clear-block.hidden-xs .row-content-block.top-block.hidden-xs.white
%div{ class: container_class } %div{ class: container_class }
.event-last-push .event-last-push
.event-last-push-text .event-last-push-text
......
.scrolling-tabs-container.sub-nav-scroll = content_for :sub_nav do
= render 'shared/nav_scroll' .scrolling-tabs-container.sub-nav-scroll
.nav-links.sub-nav.scrolling-tabs = render 'shared/nav_scroll'
%ul{ class: (container_class) } .nav-links.sub-nav.scrolling-tabs
= nav_link(controller: %w(tree blob blame edit_tree new_tree find_file)) do %ul{ class: (container_class) }
= link_to project_files_path(@project) do = nav_link(controller: %w(tree blob blame edit_tree new_tree find_file)) do
Files = link_to project_files_path(@project) do
Files
= nav_link(controller: [:commit, :commits]) do = nav_link(controller: [:commit, :commits]) do
= link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do = link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do
Commits Commits
= nav_link(controller: %w(network)) do = nav_link(controller: %w(network)) do
= link_to namespace_project_network_path(@project.namespace, @project, current_ref) do = link_to namespace_project_network_path(@project.namespace, @project, current_ref) do
Network Network
= nav_link(controller: :compare) do = nav_link(controller: :compare) do
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: current_ref) do = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: current_ref) do
Compare Compare
= nav_link(html_options: {class: branches_tab_class}) do = nav_link(html_options: {class: branches_tab_class}) do
= link_to namespace_project_branches_path(@project.namespace, @project) do = link_to namespace_project_branches_path(@project.namespace, @project) do
Branches Branches
= nav_link(controller: [:tags, :releases]) do = nav_link(controller: [:tags, :releases]) do
= link_to namespace_project_tags_path(@project.namespace, @project) do = link_to namespace_project_tags_path(@project.namespace, @project) do
Tags Tags
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
- if current_user - if current_user
= auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "#{@project.name}:#{@ref} commits") = auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "#{@project.name}:#{@ref} commits")
= render "head" = content_for :sub_nav do
= render "head"
%div{ class: container_class } %div{ class: container_class }
.row-content-block.second-block.content-component-block .row-content-block.second-block.content-component-block
......
.scrolling-tabs-container.sub-nav-scroll = content_for :sub_nav do
= render 'shared/nav_scroll' .scrolling-tabs-container.sub-nav-scroll
.nav-links.sub-nav.scrolling-tabs = render 'shared/nav_scroll'
%ul{ class: (container_class) } .nav-links.sub-nav.scrolling-tabs
%ul{ class: (container_class) }
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/chart.js') = page_specific_javascript_tag('lib/chart.js')
= page_specific_javascript_tag('graphs/graphs_bundle.js') = page_specific_javascript_tag('graphs/graphs_bundle.js')
= nav_link(action: :show) do = nav_link(action: :show) do
= link_to 'Contributors', namespace_project_graph_path = link_to 'Contributors', namespace_project_graph_path
= nav_link(action: :commits) do = nav_link(action: :commits) do
= link_to 'Commits', commits_namespace_project_graph_path = link_to 'Commits', commits_namespace_project_graph_path
= nav_link(action: :languages) do = nav_link(action: :languages) do
= link_to 'Languages', languages_namespace_project_graph_path = link_to 'Languages', languages_namespace_project_graph_path
- if @project.feature_available?(:builds, current_user) - if @project.feature_available?(:builds, current_user)
= nav_link(action: :ci) do = nav_link(action: :ci) do
= link_to ci_namespace_project_graph_path do = link_to ci_namespace_project_graph_path do
Continuous Integration Continuous Integration
.scrolling-tabs-container.sub-nav-scroll = content_for :sub_nav do
= render 'shared/nav_scroll' .scrolling-tabs-container.sub-nav-scroll
.nav-links.sub-nav.scrolling-tabs = render 'shared/nav_scroll'
%ul{ class: (container_class) } .nav-links.sub-nav.scrolling-tabs
- if project_nav_tab?(:issues) && !current_controller?(:merge_requests) %ul{ class: (container_class) }
= nav_link(controller: :issues) do - if project_nav_tab?(:issues) && !current_controller?(:merge_requests)
= link_to namespace_project_issues_path(@project.namespace, @project), title: 'Issues' do = nav_link(controller: :issues) do
%span = link_to namespace_project_issues_path(@project.namespace, @project), title: 'Issues' do
Issues %span
Issues
= nav_link(controller: :boards) do = nav_link(controller: :boards) do
= link_to namespace_project_board_path(@project.namespace, @project), title: 'Board' do = link_to namespace_project_board_path(@project.namespace, @project), title: 'Board' do
%span %span
Board Board
- if project_nav_tab?(:merge_requests) && current_controller?(:merge_requests) - if project_nav_tab?(:merge_requests) && current_controller?(:merge_requests)
= nav_link(controller: :merge_requests) do = nav_link(controller: :merge_requests) do
= link_to namespace_project_merge_requests_path(@project.namespace, @project), title: 'Merge Requests' do = link_to namespace_project_merge_requests_path(@project.namespace, @project), title: 'Merge Requests' do
%span %span
Merge Requests Merge Requests
- if project_nav_tab? :labels - if project_nav_tab? :labels
= nav_link(controller: :labels) do = nav_link(controller: :labels) do
= link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do = link_to namespace_project_labels_path(@project.namespace, @project), title: 'Labels' do
%span %span
Labels Labels
- if project_nav_tab? :milestones - if project_nav_tab? :milestones
= nav_link(controller: :milestones) do = nav_link(controller: :milestones) do
= link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do = link_to namespace_project_milestones_path(@project.namespace, @project), title: 'Milestones' do
%span %span
Milestones Milestones
\ No newline at end of file
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
- page_title "Issues" - page_title "Issues"
- new_issue_email = @project.new_issue_address(current_user) - new_issue_email = @project.new_issue_address(current_user)
= render "projects/issues/head" = content_for :sub_nav do
= render "projects/issues/head"
= content_for :meta_tags do = content_for :meta_tags do
- if current_user - if current_user
......
.scrolling-tabs-container.sub-nav-scroll = content_for :sub_nav do
= render 'shared/nav_scroll' .scrolling-tabs-container.sub-nav-scroll
.nav-links.sub-nav.scrolling-tabs = render 'shared/nav_scroll'
%ul{ class: (container_class) } .nav-links.sub-nav.scrolling-tabs
- if project_nav_tab? :pipelines %ul{ class: (container_class) }
= nav_link(controller: :pipelines) do - if project_nav_tab? :pipelines
= link_to project_pipelines_path(@project), title: 'Pipelines', class: 'shortcuts-pipelines' do = nav_link(controller: :pipelines) do
%span = link_to project_pipelines_path(@project), title: 'Pipelines', class: 'shortcuts-pipelines' do
Pipelines %span
Pipelines
- if project_nav_tab? :builds - if project_nav_tab? :builds
= nav_link(controller: %w(builds)) do = nav_link(controller: %w(builds)) do
= link_to project_builds_path(@project), title: 'Builds', class: 'shortcuts-builds' do = link_to project_builds_path(@project), title: 'Builds', class: 'shortcuts-builds' do
%span %span
Builds Builds
- if project_nav_tab? :environments - if project_nav_tab? :environments
= nav_link(controller: %w(environments)) do = nav_link(controller: %w(environments)) do
= link_to project_environments_path(@project), title: 'Environments', class: 'shortcuts-environments' do = link_to project_environments_path(@project), title: 'Environments', class: 'shortcuts-environments' do
%span %span
Environments Environments
- if can?(current_user, :read_cycle_analytics, @project) - if can?(current_user, :read_cycle_analytics, @project)
= nav_link(controller: %w(cycle_analytics)) do = nav_link(controller: %w(cycle_analytics)) do
= link_to project_cycle_analytics_path(@project), title: 'Cycle Analytics' do = link_to project_cycle_analytics_path(@project), title: 'Cycle Analytics' do
%span %span
Cycle Analytics Cycle Analytics
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
= content_for :meta_tags do = content_for :meta_tags do
- if current_user - if current_user
= auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "#{@project.name}:#{@ref} commits") = auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "#{@project.name}:#{@ref} commits")
= render 'projects/last_push'
= render "projects/commits/head" = render "projects/commits/head"
= render 'projects/last_push'
%div{ class: container_class } %div{ class: container_class }
.tree-controls .tree-controls
......
.scrolling-tabs-container.sub-nav-scroll = content_for :sub_nav do
= render 'shared/nav_scroll' .scrolling-tabs-container.sub-nav-scroll
.nav-links.sub-nav.scrolling-tabs = render 'shared/nav_scroll'
%ul{ class: (container_class) } .nav-links.sub-nav.scrolling-tabs
= nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do %ul{ class: (container_class) }
= link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home) = nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do
= link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home)
= nav_link(path: 'wikis#pages') do = nav_link(path: 'wikis#pages') do
= link_to 'Pages', namespace_project_wiki_pages_path(@project.namespace, @project) = link_to 'Pages', namespace_project_wiki_pages_path(@project.namespace, @project)
= nav_link(path: 'wikis#git_access') do = nav_link(path: 'wikis#git_access') do
= link_to namespace_project_wikis_git_access_path(@project.namespace, @project) do = link_to namespace_project_wikis_git_access_path(@project.namespace, @project) do
Git Access Git Access
= render 'projects/wikis/new' = render 'projects/wikis/new'
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