Permalink
Browse files

removing join and join links

  • Loading branch information...
timdiggins committed Sep 28, 2011
1 parent 1d37ca7 commit 5293815acce5a2f43cae15fe95c7f3d7364805e2
@@ -3,19 +3,20 @@ class UsersController < ApplicationController
before_filter :admin_login_required, :only => [ :become, :destroy, :trust ]
def new
- @user = User.new(params[:user])
+ # @user = User.new(params[:user])
store_location(params[:return_to]) if params[:return_to]
end
def create
- @user = User.new(params[:user])
-
- return render(:action => :new) unless @user.save
-
- self.current_user = @user
-
- redirect_back_or_default(root_url)
- flash[:notice] = "Thanks for signing up! You have been logged in."
+ # @user = User.new(params[:user])
+#
+ # return render(:action => :new) unless @user.save
+#
+ # self.current_user = @user
+#
+ # redirect_back_or_default(root_url)
+ flash[:error] = "No new signups, sorry"
+ return render(:action => :new)
end
def show
@@ -7,7 +7,6 @@
<% else %>
<li><%= link_to "Login", login_url %></li>
- <li><%= link_to "Join", signup_url %></li>
<% end %>
</ul>
@@ -16,9 +16,6 @@
<div class="loginRequired">
<p><%= link_to "Login to #{@post.comments.count>0 ?'add your view':'start this discussion off.'}", login_url(:return_to=>post_path(@post, :anchor=>'commentForm')), :class=>'button'%>
</p>
- <p>
- No account yet? <%= link_to "Join now", signup_url(:return_to=>post_path(@post, :anchor=>'commentForm')) %> - it's quick and easy.
- </p>
</div>
<% end %>
</div>
@@ -33,9 +33,7 @@
<% end -%>
- <p class="formOptions">
- Not signed up yet? <%= link_to "Join now!", signup_url(:return_to=>params[:return_to]) %>
- </p>
+ <%= render :partial => 'users/join_suspended' %>
</div>
</div>
@@ -0,0 +1,5 @@
+<p class="formOptions">
+ NB: Joining the Connected Republic has been disabled. <br/>
+ The site is beginning to go into archive mode. Logging-in will be disabled before the end of 2011 and the site will become static after that.<br/>
+ At present, you can still <%= link_to "login", login_url(:return_to=>params[:return_to]) %> if you are already a member.<br/>
+</p>
@@ -4,7 +4,7 @@
<div id="peopleInfo">
<p>All of the members of the Connected Republic.</p>
<% if !logged_in? %>
- <p><%= link_to "Join?", signup_url, :id => 'joinButton' %><br />
+ <p>
<%= link_to "login", login_url %>, if you're already a member.</p>
<% end %>
@@ -1,37 +1,9 @@
<div id="page">
<div class="largeForm">
- <h1><%= @page_title = "Join" %></h1>
-
- <% form_for @user do | f | -%>
- <%= f.error_messages %>
-
- <fieldset>
- <p>
- <%= f.label :login, "Desired user name" %>
- <%= f.text_field :login, :class => "largeInput" %>
- </p>
- <p>
- <%= f.label :email, "Your email" %>
- <%= f.text_field :email, :class => "largeInput" %>
- </p>
-
- <p>
- <%= f.label :password %>
- <%= f.password_field :password, :class => "largeInput" %>
- </p>
- </fieldset>
-
- <p class="submitBlock">
- <%= submit_tag 'Sign up' %>
- </p>
-
- <p class="formOptions">
- Already signed up? <%= link_to "Sign in here", login_url(:return_to=>params[:return_to]) %>.
- </p>
-
- <% end -%>
-
+ <h1><%= @page_title = "No new signups on the Connected Republic" %></h1>
+
+ <%= render :partial => 'users/join_suspended' %>
</div>
@@ -2,19 +2,22 @@
class SignupTest < ActionController::IntegrationTest
- should "be able to signup" do
+ should "be able to see new" do
+ get_ok "/signup"
+ end
+
+ should "not be able to signup" do
get_ok '/signup'
- assert_select 'h1', 'Join'
+ assert_select 'h1', /No new signups/
- post '/users', { :user => { :password => " ", :login => "freddy", :email => "freddy@codora.com" } }
- assert_validation_error "Password can't be blank"
+ # post '/users', { :user => { :password => " ", :login => "freddy", :email => "freddy@codora.com" } }
+ # assert_validation_error "Password can't be blank"
post_via_redirect '/users', { :user => { :password => "aa", :login => "freddy", :email => "freddy@codora.com" } }
assert_response_ok
- assert_flash "Thanks for signing up! You have been logged in."
- assert_logged_in User.find_by_login("freddy")
+ # assert_flash "Thanks for signing up! You have been logged in."
+ assert_nil User.find_by_login("freddy")
- assert User.find_by_login('freddy').is_new, "freddy should have been marked as new"
end
@@ -87,7 +87,6 @@ def assert_doesnt_have_current_user_links
click_link 'become_self'
get_ok "users/#{admin_user.login}"
- view
assert_has_current_user_links
get_ok "users/#{user.login}"

0 comments on commit 5293815

Please sign in to comment.