Commit a4c9b4fb authored by Annabel Dunstone's avatar Annabel Dunstone Committed by Jacob Schatz

Style wiki sub nav links

parent 8e841530
%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
......
.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 @@ ...@@ -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
New Page = link_to '#modal-new-wiki', "data-toggle" => "modal" do
New Page
= render 'projects/wikis/new' = render 'projects/wikis/new'
%div#modal-new-wiki.modal - @no_container = true
.modal-dialog
.modal-content %div{ class: (container_class) }
.modal-header %div#modal-new-wiki.modal
%a.close{href: "#", "data-dismiss" => "modal"} × .modal-dialog
%h3.page-title New Wiki Page .modal-content
.modal-body .modal-header
%form.new-wiki-page %a.close{href: "#", "data-dismiss" => "modal"} ×
.form-group %h3.page-title New Wiki Page
= label_tag :new_wiki_path do .modal-body
%span Page slug %form.new-wiki-page
= text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'form-control', required: true, :'data-wikis-path' => namespace_project_wikis_path(@project.namespace, @project), autofocus: true .form-group
.form-actions = label_tag :new_wiki_path do
= button_tag 'Create Page', class: 'build-new-wiki btn btn-create' %span Page slug
= text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'form-control', required: true, :'data-wikis-path' => namespace_project_wikis_path(@project.namespace, @project), autofocus: true
.form-actions
= button_tag 'Create Page', class: 'build-new-wiki btn btn-create'
- @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
%strong .nav-text.wiki-page
- if @page.persisted? %strong
= link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page) - if @page.persisted?
- else = link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page)
= @page.title.capitalize - else
%span.light = @page.title.capitalize
· %span.light
Edit Page ·
Edit Page
.nav-controls .nav-controls
= 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) }
%span.oneline .row-content-block
Git access for %span.oneline
%strong= @project_wiki.path_with_namespace Git access for
%strong= @project_wiki.path_with_namespace
.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
:preserve :preserve
gem install gollum gem install gollum
%legend Clone Your Wiki: %legend Clone Your Wiki:
%pre.dark %pre.dark
:preserve :preserve
git clone #{ content_tag(:span, default_url_to_repo(@project_wiki), class: 'clone')} git clone #{ content_tag(:span, default_url_to_repo(@project_wiki), class: 'clone')}
cd #{h @project_wiki.path} cd #{h @project_wiki.path}
%legend Start Gollum And Edit Locally: %legend Start Gollum And Edit Locally:
%pre.dark %pre.dark
:preserve :preserve
gollum gollum
== Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin == Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.5.0 codename Knife) >> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024 >> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop >> Listening on 0.0.0.0:4567, CTRL+C to stop
- @no_container = true
- page_title "Pages", "Wiki" - page_title "Pages", "Wiki"
= render 'nav' = render 'nav'
%ul.content-list %div{ class: (container_class) }
- @wiki_pages.each do |wiki_page| %ul.content-list
%li - @wiki_pages.each do |wiki_page|
= link_to wiki_page.title, namespace_project_wiki_path(@project.namespace, @project, wiki_page) %li
%small (#{wiki_page.format}) = link_to wiki_page.title, namespace_project_wiki_path(@project.namespace, @project, wiki_page)
.pull-right %small (#{wiki_page.format})
%small Last edited #{time_ago_with_tooltip(wiki_page.commit.authored_date)} .pull-right
= paginate @wiki_pages, theme: 'gitlab' %small Last edited #{time_ago_with_tooltip(wiki_page.commit.authored_date)}
= 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) }
.nav-text .top-area
%strong= @page.title.capitalize .nav-text
%strong= @page.title.capitalize
%span.wiki-last-edit-by %span.wiki-last-edit-by
· ·
last edited by #{@page.commit.author.name} #{time_ago_with_tooltip(@page.commit.authored_date)} last edited by #{@page.commit.author.name} #{time_ago_with_tooltip(@page.commit.authored_date)}
.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