Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
83975759
Commit
83975759
authored
12 years ago
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wiki pages page
parent
8ffb6126
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
2 deletions
+32
-2
app/controllers/wikis_controller.rb
app/controllers/wikis_controller.rb
+4
-0
app/views/wikis/history.html.haml
app/views/wikis/history.html.haml
+3
-1
app/views/wikis/pages.html.haml
app/views/wikis/pages.html.haml
+18
-0
app/views/wikis/show.html.haml
app/views/wikis/show.html.haml
+3
-1
config/routes.rb
config/routes.rb
+4
-0
No files found.
app/controllers/wikis_controller.rb
View file @
83975759
...
...
@@ -6,6 +6,10 @@ class WikisController < ApplicationController
before_filter
:authorize_admin_wiki!
,
:only
=>
:destroy
layout
"project"
def
pages
@wikis
=
@project
.
wikis
.
group
(
:slug
).
order
(
"created_at"
)
end
def
show
if
params
[
:old_page_id
]
@wiki
=
@project
.
wikis
.
find
(
params
[
:old_page_id
])
...
...
This diff is collapsed.
Click to expand it.
app/views/wikis/history.html.haml
View file @
83975759
%h3
.page_title
Versions
%h3
.page_title
%span
.cgray
History for
=
@wikis
.
last
.
title
%br
%table
.admin-table
%thead
...
...
This diff is collapsed.
Click to expand it.
app/views/wikis/pages.html.haml
0 → 100644
View file @
83975759
%h3
.page_title
All Pages
%br
%table
.admin-table
%thead
%tr
%th
Title
%th
slug
%th
created by
%tbody
-
@wikis
.
each_with_index
do
|
wiki_page
,
i
|
%tr
%td
=
link_to
wiki_page
.
title
,
project_wiki_path
(
@project
,
wiki_page
,
:old_page_id
=>
wiki_page
.
id
)
(
#{
time_ago_in_words
(
wiki_page
.
created_at
)
}
ago)
%td
=
wiki_page
.
slug
%td
=
wiki_page
.
user
.
name
This diff is collapsed.
Click to expand it.
app/views/wikis/show.html.haml
View file @
83975759
%h3
%h3
.page_title
=
@wiki
.
title
%span
.right
=
link_to
pages_project_wikis_path
(
@project
),
:class
=>
"btn small grouped"
do
Pages
-
if
can?
current_user
,
:write_wiki
,
@project
=
link_to
history_project_wiki_path
(
@project
,
@wiki
),
:class
=>
"btn small grouped"
do
History
...
...
This diff is collapsed.
Click to expand it.
config/routes.rb
View file @
83975759
...
...
@@ -98,6 +98,10 @@ Gitlab::Application.routes.draw do
end
resources
:wikis
,
:only
=>
[
:show
,
:edit
,
:destroy
,
:create
]
do
collection
do
get
:pages
end
member
do
get
"history"
end
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment