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
12b2d3c1
Commit
12b2d3c1
authored
Jul 09, 2012
by
Felix Schäfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show the register link everywhere it's needed #979
Contributed by Harald Klimach
parent
37c762b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
base.rhtml
app/views/layouts/base.rhtml
+3
-3
account_test.rb
test/integration/account_test.rb
+9
-0
No files found.
app/views/layouts/base.rhtml
View file @
12b2d3c1
...
...
@@ -39,8 +39,8 @@
<%=
render
:partial
=>
'search/quick_search'
,
:locals
=>
{
:search_term
=>
@question
}
%>
</div>
<%
if
User
.
current
.
logged?
||
!
Setting
.
login_required?
%>
<ul
id=
"account-nav"
>
<%
if
User
.
current
.
logged?
||
!
Setting
.
login_required?
%>
<%
main_top_menu_items
.
each
do
|
item
|
%>
<%=
render_menu_node
(
item
)
%>
<%
end
%>
...
...
@@ -75,7 +75,8 @@
</ul>
</li>
<%
end
%>
<%=
render_menu_node
(
help_menu_item
)
%>
<%=
render_menu_node
(
help_menu_item
)
%>
<%
end
%>
<%
unless
User
.
current
.
logged?
%>
<%
if
Setting
.
self_registration?
%>
<li>
...
...
@@ -99,7 +100,6 @@
</li>
<%
end
%>
</ul>
<%
end
%>
</div>
</div>
<div
id=
"breadcrumb"
>
...
...
test/integration/account_test.rb
View file @
12b2d3c1
...
...
@@ -101,6 +101,15 @@ class AccountTest < ActionController::IntegrationTest
assert_equal
0
,
Token
.
count
end
def
test_self_register_link_present
Setting
.
self_registration
=
'3'
Setting
.
login_required
=
'1'
get
"/"
follow_redirect!
assert_select
"a[href*=?]"
,
"/account/register"
,
:text
=>
"Register"
end
def
test_register_with_automatic_activation
Setting
.
self_registration
=
'3'
...
...
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