| |   |
| 16 | 16 | end |
| 17 | 17 | |
| 18 | 18 | def create |
| 19 | | @user = User.new(params[:user]) |
| 20 | | @user.login = params[:user][:login] |
| 19 | @user = User.new |
| 20 | @user.login = params[:login] |
| 21 | @user.email = params[:email] |
| 22 | @user.password = params[:password] |
| 23 | @user.password_confirmation = params[:password_confirmation] |
| 21 | 24 | @user.save! |
| 22 | 25 | flash[:notice] = "Thanks for signing up! You will receive an account activation email soon" |
| 23 | 26 | redirect_to root_path |
| toggle raw diff |
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -16,8 +16,11 @@ class UsersController < ApplicationController
end
def create
- @user = User.new(params[:user])
- @user.login = params[:user][:login]
+ @user = User.new
+ @user.login = params[:login]
+ @user.email = params[:email]
+ @user.password = params[:password]
+ @user.password_confirmation = params[:password_confirmation]
@user.save!
flash[:notice] = "Thanks for signing up! You will receive an account activation email soon"
redirect_to root_path |
| |   |
| 164 | 164 | out << apg_cell('#fff8ee', a[4], u) |
| 165 | 165 | out << apg_cell('#eee', a[5], u) |
| 166 | 166 | # total column |
| 167 | | out << %Q{<td style='border-top: 1px solid #ccc;'>} |
| 168 | | if @c.to_i > 0 then |
| 169 | | out << %Q{<a href='/archives/} |
| 170 | | # if sitename row, use a different slug |
| 171 | | u == "" ? out << %Q{#{SITENAME}'>} : out << %Q{project/#{u}'>} |
| 172 | | out << %Q{#{@c.to_s}</a>} |
| 173 | | else |
| 174 | | out << %Q{0} |
| 175 | | end |
| 167 | # out << %Q{<td style='border-top: 1px solid #ccc;'>} |
| 168 | # if @c.to_i > 0 then |
| 169 | # out << %Q{<a href='/archives/} |
| 170 | # # if sitename row, use a different slug |
| 171 | # u == "" ? out << %Q{#{SITENAME}'>} : out << %Q{project/#{u}'>} |
| 172 | # out << %Q{#{@c.to_s}</a>} |
| 173 | # else |
| 174 | # out << %Q{0} |
| 175 | # end |
| 176 | 176 | out << %Q{</td></tr>} |
| 177 | 177 | out |
| 178 | 178 | end |
| … | … | |
| 203 | 203 | out << rapg_row("issue", "12", "42") |
| 204 | 204 | out << rapg_row("howto", "12", "55") |
| 205 | 205 | out << rapg_row("other", "13", "45") |
| 206 | | out << %Q{<td style='padding-top: 4px'></td>} |
| 206 | #out << %Q{<td style='padding-top: 4px'></td>} |
| 207 | 207 | out << %Q{</tr>} |
| 208 | 208 | out << %Q{</table>} |
| 209 | 209 | out |
| toggle raw diff |
--- a/app/helpers/articles_helper.rb
+++ b/app/helpers/articles_helper.rb
@@ -164,15 +164,15 @@ module ArticlesHelper
out << apg_cell('#fff8ee', a[4], u)
out << apg_cell('#eee', a[5], u)
# total column
- out << %Q{<td style='border-top: 1px solid #ccc;'>}
- if @c.to_i > 0 then
- out << %Q{<a href='/archives/}
- # if sitename row, use a different slug
- u == "" ? out << %Q{#{SITENAME}'>} : out << %Q{project/#{u}'>}
- out << %Q{#{@c.to_s}</a>}
- else
- out << %Q{0}
- end
+# out << %Q{<td style='border-top: 1px solid #ccc;'>}
+# if @c.to_i > 0 then
+# out << %Q{<a href='/archives/}
+# # if sitename row, use a different slug
+# u == "" ? out << %Q{#{SITENAME}'>} : out << %Q{project/#{u}'>}
+# out << %Q{#{@c.to_s}</a>}
+# else
+# out << %Q{0}
+# end
out << %Q{</td></tr>}
out
end
@@ -203,7 +203,7 @@ module ArticlesHelper
out << rapg_row("issue", "12", "42")
out << rapg_row("howto", "12", "55")
out << rapg_row("other", "13", "45")
- out << %Q{<td style='padding-top: 4px'></td>}
+ #out << %Q{<td style='padding-top: 4px'></td>}
out << %Q{</tr>}
out << %Q{</table>}
out |
| |   |
| 17 | 17 | <tr> |
| 18 | 18 | <th>Project</th> |
| 19 | 19 | <th>Description</th> |
| 20 | <% if logged_in? %> |
| 20 | 21 | <th>Role</th> |
| 21 | | <th>Date Created</th> |
| 22 | <% end %> |
| 23 | <th>Created</th> |
| 22 | 24 | <th>Members</th> |
| 23 | 25 | <th>Activity</th> |
| 24 | 26 | </tr> |
| 25 | | <% if @member_projects != nil and @member_projects.size > 0 then %> |
| 27 | <% if logged_in? && @member_projects && @member_projects.size > 0 then %> |
| 26 | 28 | <% for project in @member_projects %> |
| 27 | 29 | <tr> |
| 28 | 30 | <td width=<%= STYLE_TABLE_COL_WIDTH_PROJECT_NAME %>><strong><%= link_to project.title, project_path(project.slug) %></strong></td> |
| … | … | |
| 40 | 40 | <tr> |
| 41 | 41 | <td width=<%= STYLE_TABLE_COL_WIDTH_PROJECT_NAME %>><strong><%= link_to project.title, project_path(project.slug) %></strong></td> |
| 42 | 42 | <td><%= project.description %></td> |
| 43 | <% if logged_in? %> |
| 43 | 44 | <td></td> |
| 45 | <% end %> |
| 44 | 46 | <td width=<%= STYLE_TABLE_COL_WIDTH_DDBBYY %>><%= format_date_ddbbyy(project.created_at) %></td> |
| 45 | 47 | <td><%= project.members.count.to_s %></td> |
| 46 | 48 | <td>0%</td> |
| toggle raw diff |
--- a/app/views/projects/ac_list.html.erb
+++ b/app/views/projects/ac_list.html.erb
@@ -17,12 +17,14 @@
<tr>
<th>Project</th>
<th>Description</th>
+<% if logged_in? %>
<th>Role</th>
- <th>Date Created</th>
+<% end %>
+ <th>Created</th>
<th>Members</th>
<th>Activity</th>
</tr>
- <% if @member_projects != nil and @member_projects.size > 0 then %>
+ <% if logged_in? && @member_projects && @member_projects.size > 0 then %>
<% for project in @member_projects %>
<tr>
<td width=<%= STYLE_TABLE_COL_WIDTH_PROJECT_NAME %>><strong><%= link_to project.title, project_path(project.slug) %></strong></td>
@@ -38,7 +40,9 @@
<tr>
<td width=<%= STYLE_TABLE_COL_WIDTH_PROJECT_NAME %>><strong><%= link_to project.title, project_path(project.slug) %></strong></td>
<td><%= project.description %></td>
+ <% if logged_in? %>
<td></td>
+ <% end %>
<td width=<%= STYLE_TABLE_COL_WIDTH_DDBBYY %>><%= format_date_ddbbyy(project.created_at) %></td>
<td><%= project.members.count.to_s %></td>
<td>0%</td> |
| |   |
| 1 | | <h1>Create new user</h1> |
| 1 | <% title "Register" %> |
| 2 | |
| 3 | <%= div_breadcrumb_open %> |
| 4 | <%= breadcrumb_home %> |
| 5 | <%= breadcrumb_title("Register") %> |
| 6 | <%= div_breadcrumb_close %> |
| 7 | |
| 8 | <%= div_content_open(STYLE_NORIGHTCOLUMN) %> |
| 9 | |
| 10 | <%= div_formattedtext_open %> |
| 2 | 11 | |
| 3 | 12 | <p> |
| 4 | 13 | Creating a user account allows you to create your own project or participate |
| … | … | |
| 15 | 15 | </p> |
| 16 | 16 | |
| 17 | 17 | <%= error_messages_for :user %> |
| 18 | | <% form_for :user, :url => users_path do |f| -%> |
| 18 | <% form_tag users_path, :id => 'input', :name => 'usersform' do -%> |
| 19 | 19 | <p> |
| 20 | | <%= f.label :login -%><br/> |
| 21 | | <%= f.text_field :login, :class => "text" -%> |
| 20 | <label for="login">Login</label><br/> |
| 21 | <%= text_field_tag 'login', params[:login], :class => "text" %> |
| 22 | 22 | </p> |
| 23 | 23 | |
| 24 | 24 | <p> |
| 25 | | <%= f.label :email -%><br/> |
| 26 | | <%= f.text_field :email, :class => "text" -%> |
| 25 | <label for="email">Email</label><br/> |
| 26 | <%= text_field_tag 'email', params[:email], :class => "text" %> |
| 27 | 27 | </p> |
| 28 | 28 | |
| 29 | 29 | <p> |
| 30 | | <%= f.label :password -%><br/> |
| 31 | | <%= f.password_field :password, :class => "text" -%> |
| 30 | <label for="password">Password</label><br/> |
| 31 | <%= password_field_tag 'password', '', :class => "text" %> |
| 32 | 32 | </p> |
| 33 | 33 | |
| 34 | 34 | <p> |
| 35 | | <%= f.label :password_confirmation -%><br/> |
| 36 | | <%= f.password_field :password_confirmation, :class => "text" %> |
| 35 | <label for="password_confirmation">Password</label><br/> |
| 36 | <%= password_field_tag 'password_confirmation', '', :class => "text" %> |
| 37 | 37 | </p> |
| 38 | 38 | |
| 39 | | <p><%= f.submit 'Sign up' %></p> |
| 39 | <p><a href="javascript:document.usersform.submit();">Register</a></p> |
| 40 | |
| 40 | 41 | <% end -%> |
| 42 | |
| 43 | <%= div_formattedtext_close %> |
| 44 | |
| 45 | <%= div_content_close %> |
| toggle raw diff |
--- a/app/views/users/new.html.erb
+++ b/app/views/users/new.html.erb
@@ -1,4 +1,13 @@
-<h1>Create new user</h1>
+<% title "Register" %>
+
+<%= div_breadcrumb_open %>
+<%= breadcrumb_home %>
+<%= breadcrumb_title("Register") %>
+<%= div_breadcrumb_close %>
+
+<%= div_content_open(STYLE_NORIGHTCOLUMN) %>
+
+<%= div_formattedtext_open %>
<p>
Creating a user account allows you to create your own project or participate
@@ -6,26 +15,31 @@
</p>
<%= error_messages_for :user %>
-<% form_for :user, :url => users_path do |f| -%>
+<% form_tag users_path, :id => 'input', :name => 'usersform' do -%>
<p>
- <%= f.label :login -%><br/>
- <%= f.text_field :login, :class => "text" -%>
+ <label for="login">Login</label><br/>
+ <%= text_field_tag 'login', params[:login], :class => "text" %>
</p>
<p>
- <%= f.label :email -%><br/>
- <%= f.text_field :email, :class => "text" -%>
+ <label for="email">Email</label><br/>
+ <%= text_field_tag 'email', params[:email], :class => "text" %>
</p>
<p>
- <%= f.label :password -%><br/>
- <%= f.password_field :password, :class => "text" -%>
+ <label for="password">Password</label><br/>
+ <%= password_field_tag 'password', '', :class => "text" %>
</p>
<p>
- <%= f.label :password_confirmation -%><br/>
- <%= f.password_field :password_confirmation, :class => "text" %>
+ <label for="password_confirmation">Password</label><br/>
+ <%= password_field_tag 'password_confirmation', '', :class => "text" %>
</p>
- <p><%= f.submit 'Sign up' %></p>
+ <p><a href="javascript:document.usersform.submit();">Register</a></p>
+
<% end -%>
+
+<%= div_formattedtext_close %>
+
+<%= div_content_close %>
\ No newline at end of file |
| |   |
| 2 | 2 | gitlab: |
| 3 | 3 | id: 2 |
| 4 | 4 | title: "Gitlab" |
| 5 | | description: 'Rails based source repository, like Sourceforge but with a blog, wiki etc. (as used by <%= SITENAME %>)' |
| 5 | description: 'Rails based dev team collaboration and source repository site, like GitHub or Gitorious but with a blog, wiki etc. (as used by <%= SITENAME %>)' |
| 6 | 6 | user_id: 1 |
| 7 | 7 | slug: "gitlab" |
| 8 | 8 | license: "GNU Affero General Public License (AGPLv3)" |
| toggle raw diff |
--- a/test/fixtures/projects.yml
+++ b/test/fixtures/projects.yml
@@ -2,7 +2,7 @@
gitlab:
id: 2
title: "Gitlab"
- description: 'Rails based source repository, like Sourceforge but with a blog, wiki etc. (as used by <%= SITENAME %>)'
+ description: 'Rails based dev team collaboration and source repository site, like GitHub or Gitorious but with a blog, wiki etc. (as used by <%= SITENAME %>)'
user_id: 1
slug: "gitlab"
license: "GNU Affero General Public License (AGPLv3)" |
| |   |
| 1 | 1 | Biggest credit is to Johan Sørensen of [Gitorious](http://www.gitorious.org), which |
| 2 | | this project is a fork of and Tom Preston-Werner who developed [Grit](http://grit.rubyforge.org) (the interface to [Git](http://git.or.cz)). |
| 2 | this project is forked from and Tom Preston-Werner who developed [Grit](http://grit.rubyforge.org) (the Ruby interface to [Git](http://git.or.cz)). |
| 3 | 3 | |
| 4 | 4 | The credit list includes sources of code either directly used in the project, or read to help figure something out: |
| 5 | 5 | |
| … | … | |
| 9 | 9 | * has_many_polymorphs |
| 10 | 10 | * paginating_find |
| 11 | 11 | * restful_authentication |
| 12 | | * Bluecloth |
| 13 | | * Coderay |
| 12 | * bluecloth |
| 13 | * coderay |
| 14 | 14 | |
| 15 | 15 | Also help appreciated from 'rsl' on #rubyonrails, 'krawek' on #gitorious and 'Ilari', 'Tv' on #git. |
| toggle raw diff |
--- a/test/fixtures/wiki_pages/_gitlab_credits.txt
+++ b/test/fixtures/wiki_pages/_gitlab_credits.txt
@@ -1,5 +1,5 @@
Biggest credit is to Johan Sørensen of [Gitorious](http://www.gitorious.org), which
-this project is a fork of and Tom Preston-Werner who developed [Grit](http://grit.rubyforge.org) (the interface to [Git](http://git.or.cz)).
+this project is forked from and Tom Preston-Werner who developed [Grit](http://grit.rubyforge.org) (the Ruby interface to [Git](http://git.or.cz)).
The credit list includes sources of code either directly used in the project, or read to help figure something out:
@@ -9,7 +9,7 @@ The credit list includes sources of code either directly used in the project, or
* has_many_polymorphs
* paginating_find
* restful_authentication
-* Bluecloth
-* Coderay
+* bluecloth
+* coderay
Also help appreciated from 'rsl' on #rubyonrails, 'krawek' on #gitorious and 'Ilari', 'Tv' on #git. |