Commit 1cc3d14a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch '18533-graphs-wiki-subnav' into 'master'

Resolve "Graphs and Wiki subnav"

## What does this MR do?
Styles sub nav in `Wiki` and `Graphs`

## What are the relevant issue numbers?
Closes #18533 

## Screenshots (if relevant)
![Screen_Shot_2016-06-15_at_9.32.43_AM](/uploads/111dae6e1b9c7d8038ac88b9be6f76a2/Screen_Shot_2016-06-15_at_9.32.43_AM.png)

cc @dzaporozhets 

See merge request !4678
parents 15516150 ff84cc0b
...@@ -149,6 +149,7 @@ v 8.9.0 (unreleased) ...@@ -149,6 +149,7 @@ v 8.9.0 (unreleased)
- Ensure Todos counters doesn't count Todos for projects pending delete - Ensure Todos counters doesn't count Todos for projects pending delete
- Add left/right arrows horizontal navigation - Add left/right arrows horizontal navigation
- Add tooltip to pin/unpin navbar - Add tooltip to pin/unpin navbar
- Add new sub nav style to Wiki and Graphs sub navigation
v 8.8.5 v 8.8.5
- Import GitHub repositories respecting the API rate limit !4166 - Import GitHub repositories respecting the API rate limit !4166
......
...@@ -111,10 +111,6 @@ ...@@ -111,10 +111,6 @@
width: 50%; width: 50%;
line-height: 28px; line-height: 28px;
&.wiki-page {
padding: 16px 10px 11px;
}
/* Small devices (phones, tablets, 768px and lower) */ /* Small devices (phones, tablets, 768px and lower) */
@media (max-width: $screen-sm-min) { @media (max-width: $screen-sm-min) {
width: 100%; width: 100%;
......
...@@ -14,19 +14,27 @@ ...@@ -14,19 +14,27 @@
font-size: 10px; font-size: 10px;
} }
#contributors-master {
@include make-md-column(12);
svg {
width: 100%;
}
}
#contributors { #contributors {
.contributors-list { .contributors-list {
margin: 0 0 10px; margin: 0 0 10px;
list-style: none; list-style: none;
padding: 0; padding: 0;
}
.person { svg {
&:nth-child(even) { width: 100%;
float: right; }
} }
float: left; .person {
@include make-md-column(6);
margin-top: 10px; margin-top: 10px;
@media (max-width: $screen-sm-min) { @media (max-width: $screen-sm-min) {
......
- page_specific_javascripts asset_path("graphs/application.js") .nav-links.sub-nav
%ul.nav-links %ul{ class: (container_class) }
- page_specific_javascripts asset_path("graphs/application.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
......
- @no_container = true
- page_title "Continuous Integration", "Graphs" - page_title "Continuous Integration", "Graphs"
= render 'head' = render 'head'
.row-content-block.append-bottom-default
%div{ class: (container_class) }
.sub-header-block
.oneline .oneline
A collection of graphs for Continuous Integration A collection of graphs for Continuous Integration
#charts.ci-charts #charts.ci-charts
.row .row
.col-md-6 .col-md-6
= render 'projects/graphs/ci/overall' = render 'projects/graphs/ci/overall'
......
- @no_container = true
- page_title "Commits", "Graphs" - page_title "Commits", "Graphs"
= render 'head' = render 'head'
.row-content-block.append-bottom-default %div{ class: (container_class) }
.sub-header-block
.tree-ref-holder .tree-ref-holder
= render 'shared/ref_switcher', destination: 'graphs_commits' = render 'shared/ref_switcher', destination: 'graphs_commits'
%ul.breadcrumb.repo-breadcrumb %ul.breadcrumb.repo-breadcrumb
= commits_breadcrumbs = commits_breadcrumbs
%p.lead %p.lead
Commit statistics for Commit statistics for
%strong #{@ref} %strong #{@ref}
#{@commits_graph.start_date.strftime('%b %d')} - #{@commits_graph.end_date.strftime('%b %d')} #{@commits_graph.start_date.strftime('%b %d')} - #{@commits_graph.end_date.strftime('%b %d')}
.row .row
.col-md-6 .col-md-6
%ul %ul
%li %li
...@@ -36,7 +38,7 @@ ...@@ -36,7 +38,7 @@
%p.slead %p.slead
Commits per day of month Commits per day of month
%canvas#month-chart %canvas#month-chart
.row .row
.col-md-6 .col-md-6
%div %div
%p.slead %p.slead
......
- @no_container = true
- page_title "Languages", "Graphs" - page_title "Languages", "Graphs"
= render 'head' = render 'head'
.row-content-block.append-bottom-default %div{ class: (container_class) }
.sub-header-block
.oneline .oneline
Programming languages used in this repository Programming languages used in this repository
.row .row
.col-md-8 .col-md-8
%canvas#languages-chart{ height: 400 } %canvas#languages-chart{ height: 400 }
.col-md-4 .col-md-4
......
- @no_container = true
- page_title "Contributors", "Graphs" - page_title "Contributors", "Graphs"
= render 'head' = render 'head'
.row-content-block.append-bottom-default %div{ class: (container_class) }
.sub-header-block
.tree-ref-holder .tree-ref-holder
= render 'shared/ref_switcher', destination: 'graphs' = render 'shared/ref_switcher', destination: 'graphs'
%ul.breadcrumb.repo-breadcrumb %ul.breadcrumb.repo-breadcrumb
= commits_breadcrumbs = commits_breadcrumbs
.loading-graph .loading-graph
.center .center
%h3.page-title %h3.page-title
%i.fa.fa-spinner.fa-spin %i.fa.fa-spinner.fa-spin
Building repository graph. Building repository graph.
%p.slead Please wait a moment, this page will automatically refresh when ready. %p.slead Please wait a moment, this page will automatically refresh when ready.
.stat-graph.hide .stat-graph.hide
.header.clearfix .header.clearfix
%h3#date_header.page-title %h3#date_header.page-title
%p.light %p.light
Commits to #{@ref}, excluding merge commits. Limited to 6,000 commits. Commits to #{@ref}, excluding merge commits. Limited to 6,000 commits.
%input#brush_change{:type => "hidden"} %input#brush_change{:type => "hidden"}
.graphs .graphs.row
#contributors-master #contributors-master
#contributors.clearfix #contributors.clearfix
%ol.contributors-list.clearfix %ol.contributors-list.clearfix
......
- if (@page && @page.persisted?) - if (@page && @page.persisted?)
- if can?(current_user, :create_wiki, @project)
= link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
New Page
= link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do = link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do
Page History Page History
- if can?(current_user, :create_wiki, @project) - if can?(current_user, :create_wiki, @project)
......
.top-area .nav-links.sub-nav
%ul.nav-links %ul{ class: (container_class) }
= nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do = nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do
= link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home) = link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home)
...@@ -10,9 +10,4 @@ ...@@ -10,9 +10,4 @@
= 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
.nav-controls = render 'projects/wikis/new'
- if can?(current_user, :create_wiki, @project)
= link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
New Page
= render 'projects/wikis/new'
%div#modal-new-wiki.modal - @no_container = true
%div{ class: (container_class) }
%div#modal-new-wiki.modal
.modal-dialog .modal-dialog
.modal-content .modal-content
.modal-header .modal-header
......
- @no_container = true
- page_title "Edit", @page.title.capitalize, "Wiki" - page_title "Edit", @page.title.capitalize, "Wiki"
= render 'nav' = render 'nav'
.top-area %div{ class: (container_class) }
.nav-text.wiki-page .top-area
.nav-text
%strong %strong
- if @page.persisted? - if @page.persisted?
= link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page) = link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page)
...@@ -13,7 +15,10 @@ ...@@ -13,7 +15,10 @@
Edit Page Edit Page
.nav-controls .nav-controls
- if can?(current_user, :create_wiki, @project)
= link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
New Page
= render 'main_links' = render 'main_links'
= render 'form' = render 'form'
- @no_container = true
- page_title "Git Access", "Wiki" - page_title "Git Access", "Wiki"
= render 'nav' = render 'nav'
.row-content-block %div{ class: (container_class) }
.sub-header-block
%span.oneline %span.oneline
Git access for Git access for
%strong= @project_wiki.path_with_namespace %strong= @project_wiki.path_with_namespace
...@@ -9,7 +11,7 @@ ...@@ -9,7 +11,7 @@
.pull-right .pull-right
= render "shared/clone_panel", project: @project_wiki = render "shared/clone_panel", project: @project_wiki
.git-empty.prepend-top-default .prepend-top-default
%fieldset %fieldset
%legend Install Gollum: %legend Install Gollum:
%pre.dark %pre.dark
......
- page_title "History", @page.title.capitalize, "Wiki" - page_title "History", @page.title.capitalize, "Wiki"
= render 'nav' = render 'nav'
%div{ class: (container_class) }
.top-area .top-area
.nav-text .nav-text
%strong %strong
= link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page) = link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page)
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
· ·
History History
.table-holder .table-holder
%table.table %table.table
%thead %thead
%tr %tr
......
- @no_container = true
- page_title "Pages", "Wiki" - page_title "Pages", "Wiki"
= render 'nav' = render 'nav'
%ul.content-list %div{ class: (container_class) }
%ul.content-list
- @wiki_pages.each do |wiki_page| - @wiki_pages.each do |wiki_page|
%li %li
= link_to wiki_page.title, namespace_project_wiki_path(@project.namespace, @project, wiki_page) = link_to wiki_page.title, namespace_project_wiki_path(@project.namespace, @project, wiki_page)
%small (#{wiki_page.format}) %small (#{wiki_page.format})
.pull-right .pull-right
%small Last edited #{time_ago_with_tooltip(wiki_page.commit.authored_date)} %small Last edited #{time_ago_with_tooltip(wiki_page.commit.authored_date)}
= paginate @wiki_pages, theme: 'gitlab' = paginate @wiki_pages, theme: 'gitlab'
- @no_container = true
- page_title @page.title.capitalize, "Wiki" - page_title @page.title.capitalize, "Wiki"
= render 'nav' = render 'nav'
.top-area %div{ class: (container_class) }
.top-area
.nav-text .nav-text
%strong= @page.title.capitalize %strong= @page.title.capitalize
...@@ -12,13 +14,13 @@ ...@@ -12,13 +14,13 @@
.nav-controls .nav-controls
= render 'main_links' = render 'main_links'
- if @page.historical? - if @page.historical?
.warning_message .warning_message
This is an old version of this page. This is an old version of this page.
You can view the #{link_to "most recent version", namespace_project_wiki_path(@project.namespace, @project, @page)} or browse the #{link_to "history", namespace_project_wiki_history_path(@project.namespace, @project, @page)}. You can view the #{link_to "most recent version", namespace_project_wiki_path(@project.namespace, @project, @page)} or browse the #{link_to "history", namespace_project_wiki_history_path(@project.namespace, @project, @page)}.
.wiki-holder.prepend-top-default.append-bottom-default .wiki-holder.prepend-top-default.append-bottom-default
.wiki .wiki
= preserve do = preserve do
= render_wiki_content(@page) = render_wiki_content(@page)
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