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
Tatuya Kamada
gitlab-ce
Commits
fd836f54
Commit
fd836f54
authored
Jan 11, 2013
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update empty error messages and warn if not viewing the most recent wiki page
parent
b55ed840
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
5 deletions
+22
-5
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+13
-0
app/controllers/wikis_controller.rb
app/controllers/wikis_controller.rb
+2
-3
app/views/wikis/empty.html.haml
app/views/wikis/empty.html.haml
+2
-2
app/views/wikis/show.html.haml
app/views/wikis/show.html.haml
+5
-0
No files found.
app/assets/stylesheets/common.scss
View file @
fd836f54
...
@@ -446,6 +446,19 @@ li.note {
...
@@ -446,6 +446,19 @@ li.note {
}
}
}
}
.warning_message
{
border-left
:
4px
solid
#ed9
;
color
:
#b90
;
padding
:
10px
;
margin-bottom
:
10px
;
background
:
#ffffe6
;
padding-left
:
20px
;
&
.centered
{
text-align
:
center
;
}
}
.oauth_select_holder
{
.oauth_select_holder
{
padding
:
20px
;
padding
:
20px
;
img
{
img
{
...
...
app/controllers/wikis_controller.rb
View file @
fd836f54
...
@@ -8,14 +8,13 @@ class WikisController < ProjectResourceController
...
@@ -8,14 +8,13 @@ class WikisController < ProjectResourceController
end
end
def
show
def
show
@most_recent_wiki
=
@project
.
wikis
.
where
(
slug:
params
[
:id
]).
ordered
.
first
if
params
[
:version_id
]
if
params
[
:version_id
]
@wiki
=
@project
.
wikis
.
find
(
params
[
:version_id
])
@wiki
=
@project
.
wikis
.
find
(
params
[
:version_id
])
else
else
@wiki
=
@
project
.
wikis
.
where
(
slug:
params
[
:id
]).
ordered
.
first
@wiki
=
@
most_recent_wiki
end
end
@note
=
@project
.
notes
.
new
(
noteable:
@wiki
)
if
@wiki
if
@wiki
render
'show'
render
'show'
else
else
...
...
app/views/wikis/empty.html.haml
View file @
fd836f54
%h3
.page_title
Empty page
%h3
.page_title
Empty page
%hr
%hr
.
alert-message.block-message.warning
.
error_message
%span
You are not allowed to create wiki pages
You are not allowed to create wiki pages
app/views/wikis/show.html.haml
View file @
fd836f54
...
@@ -10,6 +10,11 @@
...
@@ -10,6 +10,11 @@
%i
.icon-edit
%i
.icon-edit
Edit
Edit
%br
%br
-
if
@wiki
!=
@most_recent_wiki
.warning_message
This is an old version of this page.
You can view the
#{
link_to
"most recent version"
,
project_wiki_path
(
@project
,
@wiki
)
}
or browse the
#{
link_to
"history"
,
history_project_wiki_path
(
@project
,
@wiki
)
}
.
.file_holder
.file_holder
.file_content.wiki
.file_content.wiki
=
preserve
do
=
preserve
do
...
...
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