Style wiki sub nav links

This commit is contained in:
Annabel Dunstone 2016-06-15 09:31:41 -05:00 committed by Jacob Schatz
parent 8e84153044
commit a4c9b4fbe9
7 changed files with 95 additions and 84 deletions

View file

@ -1,5 +1,5 @@
%ul.nav-links.sub-nav .nav-links.sub-nav
%div{ class: (container_class) } %ul{ class: (container_class) }
- page_specific_javascripts asset_path("graphs/application.js") - page_specific_javascripts asset_path("graphs/application.js")
= nav_link(action: :show) do = nav_link(action: :show) do

View file

@ -1,5 +1,5 @@
.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,9 @@
= 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
- if can?(current_user, :create_wiki, @project) - if can?(current_user, :create_wiki, @project)
= link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do = nav_link do
= link_to '#modal-new-wiki', "data-toggle" => "modal" do
New Page New Page
= render 'projects/wikis/new' = render 'projects/wikis/new'

View file

@ -1,4 +1,7 @@
%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

View file

@ -1,7 +1,9 @@
- @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) }
.top-area
.nav-text.wiki-page .nav-text.wiki-page
%strong %strong
- if @page.persisted? - if @page.persisted?
@ -16,4 +18,4 @@
= render 'main_links' = render 'main_links'
= render 'form' = render 'form'

View file

@ -1,7 +1,9 @@
- @no_container = true
- page_title "Git Access", "Wiki" - page_title "Git Access", "Wiki"
= render 'nav' = render 'nav'
.row-content-block %div{ class: (container_class) }
.row-content-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 @@
.pull-right .pull-right
= render "shared/clone_panel", project: @project_wiki = render "shared/clone_panel", project: @project_wiki
.git-empty.prepend-top-default .git-empty.prepend-top-default
%fieldset %fieldset
%legend Install Gollum: %legend Install Gollum:
%pre.dark %pre.dark

View file

@ -1,12 +1,14 @@
- @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'

View file

@ -1,7 +1,9 @@
- @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 @@
.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)