Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
1ebec832
Commit
1ebec832
authored
Dec 18, 2011
by
Felix Schäfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#486] More menu items on the wiki annotate view.
parent
d71a74bc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
wiki_controller.rb
app/controllers/wiki_controller.rb
+1
-0
annotate.rhtml
app/views/wiki/annotate.rhtml
+9
-2
No files found.
app/controllers/wiki_controller.rb
View file @
1ebec832
...
...
@@ -173,6 +173,7 @@ class WikiController < ApplicationController
def
annotate
@annotate
=
@page
.
annotate
(
params
[
:version
])
render_404
unless
@annotate
@editable
=
editable?
end
verify
:method
=>
:delete
,
:only
=>
[
:destroy
],
:redirect_to
=>
{
:action
=>
:show
}
...
...
app/views/wiki/annotate.rhtml
View file @
1ebec832
<div
class=
"contextual"
>
<%=
link_to
(
l
(
:button_edit
),
{
:action
=>
'edit'
,
:id
=>
@page
.
title
},
:class
=>
'icon icon-edit'
)
%>
<%=
link_to
(
l
(
:label_history
),
{
:action
=>
'history'
,
:id
=>
@page
.
title
},
:class
=>
'icon icon-history'
)
%>
<%
if
@editable
%>
<%=
link_to_if_authorized
(
l
(
:button_edit
),
{
:action
=>
'edit'
,
:id
=>
@page
.
title
},
:class
=>
'icon icon-edit'
,
:accesskey
=>
accesskey
(
:edit
))
if
@annotate
.
content
.
version
==
@page
.
content
.
version
%>
<%=
watcher_link
(
@page
,
User
.
current
)
%>
<%=
link_to_if_authorized
(
l
(
:button_lock
),
{
:action
=>
'protect'
,
:id
=>
@page
.
title
,
:protected
=>
1
},
:method
=>
:post
,
:class
=>
'icon icon-lock'
)
if
!
@page
.
protected?
%>
<%=
link_to_if_authorized
(
l
(
:button_unlock
),
{
:action
=>
'protect'
,
:id
=>
@page
.
title
,
:protected
=>
0
},
:method
=>
:post
,
:class
=>
'icon icon-unlock'
)
if
@page
.
protected?
%>
<%=
link_to_if_authorized
(
l
(
:button_rename
),
{
:action
=>
'rename'
,
:id
=>
@page
.
title
},
:class
=>
'icon icon-move'
)
if
@annotate
.
content
.
version
==
@page
.
content
.
version
%>
<%=
link_to_if_authorized
(
l
(
:button_delete
),
{
:action
=>
'destroy'
,
:id
=>
@page
.
title
},
:method
=>
:delete
,
:confirm
=>
l
(
:text_are_you_sure
),
:class
=>
'icon icon-del'
)
%>
<%
end
%>
<%=
link_to_if_authorized
(
l
(
:label_history
),
{
:action
=>
'history'
,
:id
=>
@page
.
title
},
:class
=>
'icon icon-history'
)
%>
</div>
<h2>
<%=
h
(
@page
.
pretty_title
)
%>
</h2>
...
...
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