Commit 952bdfae authored by Mike Greiling's avatar Mike Greiling

update wiki pages with new design

parent a1518055
...@@ -5,31 +5,27 @@ ...@@ -5,31 +5,27 @@
padding-right: 7px; padding-right: 7px;
} }
.top-area { .wiki-page-header {
@extend .top-area;
position: relative; position: relative;
button.sidebar-toggle { .wiki-page-title {
position: absolute; margin: 0;
right: 0; font-size: 22px;
top: 11px;
display: block;
}
@media (min-width: $screen-sm-min) {
padding-right: 40px;
} }
@media (min-width: $screen-md-min) { .wiki-last-edit-by {
padding-right: 0; color: $gl-gray-light;
button.sidebar-toggle { strong {
display: none; color: $gl-text-color;
} }
} }
}
.wiki-page-header { .light {
@extend .top-area; font-weight: normal;
color: $gl-gray-light;
}
.git-access-header { .git-access-header {
padding: 16px 0 11px; padding: 16px 0 11px;
...@@ -38,13 +34,30 @@ ...@@ -38,13 +34,30 @@
} }
.git-clone-holder { .git-clone-holder {
width: 480px; width: 100%;
padding-bottom: 40px; padding-bottom: 40px;
} }
@media (max-width: $screen-xs-max) { button.sidebar-toggle {
position: absolute;
right: 0;
top: 11px;
display: block;
}
@media (min-width: $screen-sm-min) {
padding-right: 40px;
.git-clone-holder { .git-clone-holder {
width: 100%; width: 480px;
}
}
@media (min-width: $screen-md-min) {
padding-right: 0;
button.sidebar-toggle {
display: none;
} }
} }
} }
......
...@@ -34,9 +34,6 @@ ...@@ -34,9 +34,6 @@
- if @page && @page.persisted? - if @page && @page.persisted?
= f.submit 'Save changes', class: "btn-save btn" = f.submit 'Save changes', class: "btn-save btn"
.pull-right .pull-right
- if can?(current_user, :admin_wiki, @project)
= link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-danger btn-grouped" do
Delete
= link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, @page), class: "btn btn-cancel btn-grouped" = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, @page), class: "btn btn-cancel btn-grouped"
- else - else
= f.submit 'Create page', class: "btn-create btn" = f.submit 'Create page', class: "btn-create btn"
......
...@@ -2,25 +2,33 @@ ...@@ -2,25 +2,33 @@
- page_title "Edit", @page.title.capitalize, "Wiki" - page_title "Edit", @page.title.capitalize, "Wiki"
%div{ class: container_class } %div{ class: container_class }
.top-area .wiki-page-header
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" } %button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
= icon('angle-double-left') = icon('angle-double-left')
.nav-text .nav-text
%strong %h2.wiki-page-title
- 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)
- else - else
= @page.title.capitalize = @page.title.capitalize
%span.light %span.light
· ·
- if @page.persisted?
Edit Page Edit Page
- else
Create Page
.nav-controls .nav-controls
- if !(@page && @page.persisted?)
- 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 = link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
New Page New Page
- if @page.persisted?
= link_to namespace_project_wiki_history_path(@project.namespace, @project, @page), class: "btn" do
Page History
- if can?(current_user, :admin_wiki, @project)
= link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-danger" do
Delete
= render 'form' = render 'form'
......
- page_title "History", @page.title.capitalize, "Wiki" - page_title "History", @page.title.capitalize, "Wiki"
%div{ class: container_class } %div{ class: container_class }
.top-area .wiki-page-header
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" } %button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
= icon('angle-double-left') = icon('angle-double-left')
.nav-text .nav-text
%strong %h2.wiki-page-title
= 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)
%span.light %span.light
· ·
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
- page_title "Pages", "Wiki" - page_title "Pages", "Wiki"
%div{ class: container_class } %div{ class: container_class }
.top-area .wiki-page-header
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" } %button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
= icon('angle-double-left') = icon('angle-double-left')
.nav-text .nav-text
%strong %h2.wiki-page-title
Wiki Pages Wiki Pages
%ul.content-list %ul.content-list
......
...@@ -2,16 +2,18 @@ ...@@ -2,16 +2,18 @@
- page_title @page.title.capitalize, "Wiki" - page_title @page.title.capitalize, "Wiki"
%div{ class: container_class } %div{ class: container_class }
.top-area .wiki-page-header
%button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" } %button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" }
= icon('angle-double-left') = icon('angle-double-left')
.nav-text .nav-text
%strong= @page.title.capitalize %h2.wiki-page-title= @page.title.capitalize
%span.wiki-last-edit-by %span.wiki-last-edit-by
· Last edited by
last edited by #{@page.commit.author.name} #{time_ago_with_tooltip(@page.commit.authored_date)} %strong
#{@page.commit.author.name}
#{time_ago_with_tooltip(@page.commit.authored_date)}
.nav-controls .nav-controls
= render 'main_links' = render 'main_links'
...@@ -21,7 +23,6 @@ ...@@ -21,7 +23,6 @@
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
......
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