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
705bd743
Commit
705bd743
authored
Feb 14, 2011
by
Eric Davis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[
#169
] Add a ROBOTS meta tag to several forms to hide from web spiders
Based on the patch by Yuki Sonoda
parent
7973847e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
0 deletions
+16
-0
application_helper.rb
app/helpers/application_helper.rb
+8
-0
new.rhtml
app/views/issue_moves/new.rhtml
+3
-0
edit.rhtml
app/views/issues/edit.rhtml
+3
-0
new.rhtml
app/views/issues/new.rhtml
+1
-0
edit.rhtml
app/views/wiki/edit.rhtml
+1
-0
No files found.
app/helpers/application_helper.rb
View file @
705bd743
...
...
@@ -898,6 +898,14 @@ module ApplicationHelper
def
favicon
"<link rel='shortcut icon' href='
#{
image_path
(
'/favicon.ico'
)
}
' />"
end
# Add a HTML meta tag to control robots (web spiders)
#
# @param [optional, String] content the content of the ROBOTS tag.
# defaults to no index, follow, and no archive
def
robot_exclusion_tag
(
content
=
"NOINDEX,FOLLOW,NOARCHIVE"
)
"<meta name='ROBOTS' content='
#{
h
(
content
)
}
' />"
end
# Returns true if arg is expected in the API response
def
include_in_api_response?
(
arg
)
...
...
app/views/issue_moves/new.rhtml
View file @
705bd743
...
...
@@ -74,3 +74,6 @@
<%=
submit_tag
l
(
:button_move_and_follow
),
:name
=>
'follow'
%>
<%
end
%>
<%
end
%>
<%
content_for
:header_tags
do
%>
<%=
robot_exclusion_tag
%>
<%
end
%>
app/views/issues/edit.rhtml
View file @
705bd743
<h2>
<%=
h
"
#{
@issue
.
tracker
.
name
}
#
#{
@issue
.
id
}
"
%>
</h2>
<%=
render
:partial
=>
'edit'
%>
<%
content_for
:header_tags
do
%>
<%=
robot_exclusion_tag
%>
<%
end
%>
app/views/issues/new.rhtml
View file @
705bd743
...
...
@@ -23,4 +23,5 @@
<%
content_for
:header_tags
do
%>
<%=
stylesheet_link_tag
'scm'
%>
<%=
robot_exclusion_tag
%>
<%
end
%>
app/views/wiki/edit.rhtml
View file @
705bd743
...
...
@@ -23,6 +23,7 @@
<%
content_for
:header_tags
do
%>
<%=
stylesheet_link_tag
'scm'
%>
<%=
robot_exclusion_tag
%>
<%
end
%>
<%
html_title
@page
.
pretty_title
%>
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