diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 5e67e0a2c..845f32dab 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -243,8 +243,10 @@ class ProjectsController < ApplicationController
# Author lizanle
# Description 项目动态展示方法,删除了不必要的代码
def show
-
- # 试图跳转到请求的按钮
+ # params[:login]为邮箱邀请用户加入,主要功能:
+ # 1、自动注册
+ # 2、加入项目、创建角色
+ # 3、用户得分
if params[:login]
login = params[:login]
login = login.sub(/%40/,'@')
@@ -252,6 +254,7 @@ class ProjectsController < ApplicationController
password = params[:password]
us = UsersService.new
user = us.register_auto(login,mail, password)
+
Member.create(:role_ids => [4], :user_id => user.id,:project_id => @project.id)
UserGrade.create(:user_id => user.id, :project_id => @project.id)
User.current = user unless User.current.nil?
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index ce3924119..acc268275 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -53,7 +53,8 @@ class Mailer < ActionMailer::Base
@subject = "#{invitor.name} #{l(:label_invite_project)} #{project.name} "
@password = newpass(6)
@project_url = url_for(:controller => 'projects', :action => 'show', :id => project.id,
- :password => @password, :login => email)
+ :password => @password,
+ :login => email)
mail :to => email, :subject => @subject
end
diff --git a/app/services/users_service.rb b/app/services/users_service.rb
index c1f716fd1..3a92bf8f1 100644
--- a/app/services/users_service.rb
+++ b/app/services/users_service.rb
@@ -44,12 +44,14 @@ class UsersService
#location = get_user_location @user
#{:id => @user.id, :img_url => img_url, :nickname => @user.login, :gender => gender, :work_unit => work_unit, :mail => @user.mail, :location => location, :brief_introduction => @user.user_extensions.brief_introduction}
end
+
+ # 自动注册功能 FOR:邮件邀请
def register_auto(login,mail,password)
@user = User.new
@user.admin = false
@user.register
@user.login = login
- @user.mail =mail
+ @user.mail = mail
password_confirmation = password
should_confirmation_password = true
if !password.blank? && !password_confirmation.blank? && should_confirmation_password
@@ -59,9 +61,7 @@ class UsersService
else
@user.password = ""
end
-
@user = automatically_register(@user)
-
if @user.id != nil
ue = @user.user_extensions ||= UserExtensions.new
ue.user_id = @user.id
@@ -69,6 +69,7 @@ class UsersService
end
@user
end
+
#显示用户
#id用户id
def show_user(params)
diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb
index 9a65556d8..0135ee239 100644
--- a/app/views/attachments/_project_file_links.html.erb
+++ b/app/views/attachments/_project_file_links.html.erb
@@ -64,7 +64,7 @@
<% images = attachments.select(&:thumbnailable?) %>
<% if images.any? %>
<% images.each do |attachment| %>
-
<%= thumbnail_issue_tag(attachment) %>
+ <%= thumbnail_issue_tag(attachment) %>
<% end %>
<% end %>
<% end %>
diff --git a/app/views/contests/_form_contest.html.erb b/app/views/contests/_form_contest.html.erb
index ec993fae8..344d69571 100644
--- a/app/views/contests/_form_contest.html.erb
+++ b/app/views/contests/_form_contest.html.erb
@@ -67,7 +67,7 @@
<%= f.text_field :deadline,
:required => true,
:size => 60,
- :style => "width:150px;",
+ :style => "width:150px;float:left;",
:readonly => true,
:placeholder => "#{l(:label_deadline)}"
%>
diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb
index 1266f4611..e4c1290aa 100644
--- a/app/views/issues/_edit.html.erb
+++ b/app/views/issues/_edit.html.erb
@@ -5,12 +5,14 @@
<% if @edit_allowed || !@allowed_statuses.empty? %>
<%= render :partial => 'form', :locals => {:f => f} %>
+
+
<% end %>
-
+
<% if @journals.present? %>
diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb
index 8890e88a4..096dadf8b 100644
--- a/app/views/layouts/base_projects.html.erb
+++ b/app/views/layouts/base_projects.html.erb
@@ -228,9 +228,9 @@
请选择项目类型:
确定
diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb
index a5f476079..7eda0e473 100644
--- a/app/views/projects/settings/_new_repositories.html.erb
+++ b/app/views/projects/settings/_new_repositories.html.erb
@@ -25,7 +25,7 @@
<%= checked_image repository.is_default? %> |
<%=h repository.scm_name %> |
<%if repository.scm_name=="Git"%>
-
<%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>20)%> |
<%else %>
<%=h truncate(repository.url,:length=>10) %> |
@@ -33,8 +33,8 @@
<% if repository.scm_name=="Git"%>
<%if User.current.allowed_to?(:manage_repository, @project) %>
- <%= link_to(l(:label_user_plural), committers_repository_path(repository),
- :class => 'c_blue') %>
+ <%= link_to(l(:label_user_plural), committers_repository_path(repository)
+ ) %>
<% end %>
<% end %>
|
diff --git a/app/views/projects/settings/_versions.html.erb b/app/views/projects/settings/_versions.html.erb
index 2ca875681..5b0f27953 100644
--- a/app/views/projects/settings/_versions.html.erb
+++ b/app/views/projects/settings/_versions.html.erb
@@ -42,9 +42,9 @@
<%= link_to_if_authorized(h(version.wiki_page_title), {:controller => 'wiki',
- :action => 'show',
- :project_id => version.project,
- :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
+ :action => 'show',
+ :project_id => version.project,
+ :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
|
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 3e88bb30a..d00ad37e7 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -3152,6 +3152,18 @@ input[class~='m3p10'], .m3p10 {
.break_word{word-break: break-all;word-wrap: break-word;}
.break_word_firefox{white-space: pre-wrap;word-break: break-all;}
+/*日历选择图*/
+img.ui-datepicker-trigger {
+ display:block;
+ background:url(/images/public_icon.png) -31px 0 no-repeat;
+ cursor: pointer;
+ vertical-align: middle;
+ margin-left: 5px;
+ margin-top: 5px;
+ width:16px;
+ height:15px;
+ float:left;
+}
/*lizanle 日誌搜索結果樣式*/
.search_results {
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 2f45bbd69..125a36064 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -131,6 +131,7 @@ a.c_green{ color:#28be6c;}
.c_blue{ color:#15bccf;}
.c_red{ color:#F00;}
.c_green{ color:#28be6c;}
+.c_grey{color:#999;}
.c_dblue{ color:#09658c;}
.b_blue{background:#64bdd9;}
.b_green{background:#28be6c;}
@@ -404,7 +405,7 @@ div.flash.warning, .conflict {
/*弹出框*/
.black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);}
.white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
-.white_content02{display:none;position:fixed;top:15%;left:30%;width:200px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
+.white_content02{display:none;position:fixed;top:15%;left:30%;width:310px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
.floatbox{ width:420px; border:3px solid #15bccf; background:#fff; padding:5px;}
a.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;}
a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|