Style wiki sub nav links
This commit is contained in:
parent
8e84153044
commit
a4c9b4fbe9
7 changed files with 95 additions and 84 deletions
|
@ -1,5 +1,5 @@
|
|||
%ul.nav-links.sub-nav
|
||||
%div{ class: (container_class) }
|
||||
.nav-links.sub-nav
|
||||
%ul{ class: (container_class) }
|
||||
|
||||
- page_specific_javascripts asset_path("graphs/application.js")
|
||||
= nav_link(action: :show) do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.top-area
|
||||
%ul.nav-links
|
||||
.nav-links.sub-nav
|
||||
%ul{ class: (container_class) }
|
||||
= nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do
|
||||
= 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
|
||||
Git Access
|
||||
|
||||
.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
|
||||
= nav_link do
|
||||
= link_to '#modal-new-wiki', "data-toggle" => "modal" do
|
||||
New Page
|
||||
|
||||
= render 'projects/wikis/new'
|
||||
= render 'projects/wikis/new'
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
%div#modal-new-wiki.modal
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header
|
||||
%a.close{href: "#", "data-dismiss" => "modal"} ×
|
||||
%h3.page-title New Wiki Page
|
||||
.modal-body
|
||||
%form.new-wiki-page
|
||||
.form-group
|
||||
= label_tag :new_wiki_path do
|
||||
%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
|
||||
|
||||
%div{ class: (container_class) }
|
||||
%div#modal-new-wiki.modal
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header
|
||||
%a.close{href: "#", "data-dismiss" => "modal"} ×
|
||||
%h3.page-title New Wiki Page
|
||||
.modal-body
|
||||
%form.new-wiki-page
|
||||
.form-group
|
||||
= label_tag :new_wiki_path do
|
||||
%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'
|
||||
|
|
|
@ -1,19 +1,21 @@
|
|||
- @no_container = true
|
||||
- page_title "Edit", @page.title.capitalize, "Wiki"
|
||||
= render 'nav'
|
||||
|
||||
.top-area
|
||||
.nav-text.wiki-page
|
||||
%strong
|
||||
- if @page.persisted?
|
||||
= link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page)
|
||||
- else
|
||||
= @page.title.capitalize
|
||||
%span.light
|
||||
·
|
||||
Edit Page
|
||||
%div{ class: (container_class) }
|
||||
.top-area
|
||||
.nav-text.wiki-page
|
||||
%strong
|
||||
- if @page.persisted?
|
||||
= link_to @page.title.capitalize, namespace_project_wiki_path(@project.namespace, @project, @page)
|
||||
- else
|
||||
= @page.title.capitalize
|
||||
%span.light
|
||||
·
|
||||
Edit Page
|
||||
|
||||
.nav-controls
|
||||
= render 'main_links'
|
||||
.nav-controls
|
||||
= render 'main_links'
|
||||
|
||||
|
||||
= render 'form'
|
||||
= render 'form'
|
||||
|
|
|
@ -1,32 +1,34 @@
|
|||
- @no_container = true
|
||||
- page_title "Git Access", "Wiki"
|
||||
|
||||
= render 'nav'
|
||||
.row-content-block
|
||||
%span.oneline
|
||||
Git access for
|
||||
%strong= @project_wiki.path_with_namespace
|
||||
%div{ class: (container_class) }
|
||||
.row-content-block
|
||||
%span.oneline
|
||||
Git access for
|
||||
%strong= @project_wiki.path_with_namespace
|
||||
|
||||
.pull-right
|
||||
= render "shared/clone_panel", project: @project_wiki
|
||||
.pull-right
|
||||
= render "shared/clone_panel", project: @project_wiki
|
||||
|
||||
.git-empty.prepend-top-default
|
||||
%fieldset
|
||||
%legend Install Gollum:
|
||||
%pre.dark
|
||||
:preserve
|
||||
gem install gollum
|
||||
.git-empty.prepend-top-default
|
||||
%fieldset
|
||||
%legend Install Gollum:
|
||||
%pre.dark
|
||||
:preserve
|
||||
gem install gollum
|
||||
|
||||
%legend Clone Your Wiki:
|
||||
%pre.dark
|
||||
:preserve
|
||||
git clone #{ content_tag(:span, default_url_to_repo(@project_wiki), class: 'clone')}
|
||||
cd #{h @project_wiki.path}
|
||||
%legend Clone Your Wiki:
|
||||
%pre.dark
|
||||
:preserve
|
||||
git clone #{ content_tag(:span, default_url_to_repo(@project_wiki), class: 'clone')}
|
||||
cd #{h @project_wiki.path}
|
||||
|
||||
%legend Start Gollum And Edit Locally:
|
||||
%pre.dark
|
||||
:preserve
|
||||
gollum
|
||||
== Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin
|
||||
>> Thin web server (v1.5.0 codename Knife)
|
||||
>> Maximum connections set to 1024
|
||||
>> Listening on 0.0.0.0:4567, CTRL+C to stop
|
||||
%legend Start Gollum And Edit Locally:
|
||||
%pre.dark
|
||||
:preserve
|
||||
gollum
|
||||
== Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin
|
||||
>> Thin web server (v1.5.0 codename Knife)
|
||||
>> Maximum connections set to 1024
|
||||
>> Listening on 0.0.0.0:4567, CTRL+C to stop
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
- @no_container = true
|
||||
- page_title "Pages", "Wiki"
|
||||
|
||||
= render 'nav'
|
||||
|
||||
%ul.content-list
|
||||
- @wiki_pages.each do |wiki_page|
|
||||
%li
|
||||
= link_to wiki_page.title, namespace_project_wiki_path(@project.namespace, @project, wiki_page)
|
||||
%small (#{wiki_page.format})
|
||||
.pull-right
|
||||
%small Last edited #{time_ago_with_tooltip(wiki_page.commit.authored_date)}
|
||||
= paginate @wiki_pages, theme: 'gitlab'
|
||||
%div{ class: (container_class) }
|
||||
%ul.content-list
|
||||
- @wiki_pages.each do |wiki_page|
|
||||
%li
|
||||
= link_to wiki_page.title, namespace_project_wiki_path(@project.namespace, @project, wiki_page)
|
||||
%small (#{wiki_page.format})
|
||||
.pull-right
|
||||
%small Last edited #{time_ago_with_tooltip(wiki_page.commit.authored_date)}
|
||||
= paginate @wiki_pages, theme: 'gitlab'
|
||||
|
|
|
@ -1,24 +1,26 @@
|
|||
- @no_container = true
|
||||
- page_title @page.title.capitalize, "Wiki"
|
||||
= render 'nav'
|
||||
|
||||
.top-area
|
||||
.nav-text
|
||||
%strong= @page.title.capitalize
|
||||
%div{ class: (container_class) }
|
||||
.top-area
|
||||
.nav-text
|
||||
%strong= @page.title.capitalize
|
||||
|
||||
%span.wiki-last-edit-by
|
||||
·
|
||||
last edited by #{@page.commit.author.name} #{time_ago_with_tooltip(@page.commit.authored_date)}
|
||||
%span.wiki-last-edit-by
|
||||
·
|
||||
last edited by #{@page.commit.author.name} #{time_ago_with_tooltip(@page.commit.authored_date)}
|
||||
|
||||
.nav-controls
|
||||
= render 'main_links'
|
||||
.nav-controls
|
||||
= render 'main_links'
|
||||
|
||||
- if @page.historical?
|
||||
.warning_message
|
||||
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)}.
|
||||
- if @page.historical?
|
||||
.warning_message
|
||||
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)}.
|
||||
|
||||
|
||||
.wiki-holder.prepend-top-default.append-bottom-default
|
||||
.wiki
|
||||
= preserve do
|
||||
= render_wiki_content(@page)
|
||||
.wiki-holder.prepend-top-default.append-bottom-default
|
||||
.wiki
|
||||
= preserve do
|
||||
= render_wiki_content(@page)
|
||||
|
|
Loading…
Reference in a new issue