modify register bug
This commit is contained in:
parent
c7c5ae54e5
commit
4fb040bc61
|
@ -77,7 +77,7 @@ class MyController < ApplicationController
|
||||||
# ue.save
|
# ue.save
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# added by bai 往数据库里写职业、性别和地区
|
# added by bai 往数据库里写职业、性别和地区
|
||||||
if @user.user_extensions.nil?
|
if @user.user_extensions.nil?
|
||||||
se = UserExtensions.new
|
se = UserExtensions.new
|
||||||
se.user_id = @user.id
|
se.user_id = @user.id
|
||||||
|
@ -89,7 +89,9 @@ class MyController < ApplicationController
|
||||||
se = @user.user_extensions
|
se = @user.user_extensions
|
||||||
se.occupation = params[:occupation]
|
se.occupation = params[:occupation]
|
||||||
se.gender = params[:gender]
|
se.gender = params[:gender]
|
||||||
|
if params[:province] && params[:city]
|
||||||
se.location = params[:province]+params[:city]
|
se.location = params[:province]+params[:city]
|
||||||
|
end
|
||||||
se.save
|
se.save
|
||||||
end
|
end
|
||||||
# end
|
# end
|
||||||
|
|
|
@ -192,7 +192,7 @@ class ProjectsController < ApplicationController
|
||||||
|
|
||||||
@projects = []
|
@projects = []
|
||||||
@projects_status.each do |obj|
|
@projects_status.each do |obj|
|
||||||
@projects << Project.find_by_id("#{obj.project_id}")
|
@projects << Project.visible.find_by_id("#{obj.project_id}") unless Project.visible.find_by_id("#{obj.project_id}").nil?
|
||||||
end
|
end
|
||||||
#end
|
#end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
@ -366,7 +366,9 @@ class ProjectsController < ApplicationController
|
||||||
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
||||||
m = Member.new(:user => User.current, :roles => [r])
|
m = Member.new(:user => User.current, :roles => [r])
|
||||||
project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id)
|
project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id)
|
||||||
project_status = ProjectStatus.create(:project_id => @project.id)
|
if params[:project][:is_public] == 1
|
||||||
|
project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0)
|
||||||
|
end
|
||||||
@project.members << m
|
@project.members << m
|
||||||
@project.project_infos << project
|
@project.project_infos << project
|
||||||
end
|
end
|
||||||
|
@ -435,7 +437,7 @@ class ProjectsController < ApplicationController
|
||||||
@subprojects = @project.children.visible.all
|
@subprojects = @project.children.visible.all
|
||||||
@news = @project.news.limit(5).includes(:author, :project).reorder("#{News.table_name}.created_on DESC").all
|
@news = @project.news.limit(5).includes(:author, :project).reorder("#{News.table_name}.created_on DESC").all
|
||||||
@trackers = @project.rolled_up_trackers
|
@trackers = @project.rolled_up_trackers
|
||||||
@user = User.find_by_id(ProjectInfo.find_by_project_id(@project.id).user_id)
|
@user = User.find_by_id(ProjectInfo.find_by_project_id(@project.id).user_id)
|
||||||
|
|
||||||
cond = @project.project_condition(Setting.display_subprojects_issues?)
|
cond = @project.project_condition(Setting.display_subprojects_issues?)
|
||||||
@open_issues_by_tracker = Issue.visible.open.where(cond).count(:group => :tracker)
|
@open_issues_by_tracker = Issue.visible.open.where(cond).count(:group => :tracker)
|
||||||
|
@ -562,6 +564,14 @@ class ProjectsController < ApplicationController
|
||||||
@course.term = params[:project][:course][:term]
|
@course.term = params[:project][:course][:term]
|
||||||
@course.save
|
@course.save
|
||||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||||||
|
|
||||||
|
if params[:project][:is_public] == '0'
|
||||||
|
project_status = ProjectStatus.find_by_project_id(@project.id)
|
||||||
|
project_status.destroy
|
||||||
|
elsif params[:project][:is_public] == '1'
|
||||||
|
project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0)
|
||||||
|
end
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
|
|
|
@ -94,11 +94,11 @@ module ProjectsHelper
|
||||||
def render_project_hierarchy(projects)
|
def render_project_hierarchy(projects)
|
||||||
render_project_nested_lists(projects) do |project|
|
render_project_nested_lists(projects) do |project|
|
||||||
#Modified by young
|
#Modified by young
|
||||||
if (project.project_type==1)
|
if (project.project_type==1)
|
||||||
s = link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")+"<span style='color:#F00;'>(#{l(:label_course)})</span>".html_safe
|
s = link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")+"<span style='color:#F00;'>(#{l(:label_course)})</span>".html_safe
|
||||||
else
|
else
|
||||||
s = link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")
|
s = link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")
|
||||||
end
|
end
|
||||||
#Ended by young
|
#Ended by young
|
||||||
if project.description.present?
|
if project.description.present?
|
||||||
#Delete by nie.
|
#Delete by nie.
|
||||||
|
|
|
@ -64,9 +64,9 @@ module UsersHelper
|
||||||
# added by fq
|
# added by fq
|
||||||
# <div class="pagination" >
|
# <div class="pagination" >
|
||||||
# <ul>
|
# <ul>
|
||||||
# <li><%= link_to("<EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>̬", {:controller => 'users', :action => 'show'}) %></li>
|
# <li><%= link_to("所有动态", {:controller => 'users', :action => 'show'}) %></li>
|
||||||
# <li><%= link_to("ֻ<EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>", {:controller => 'users', :action => 'show', :type => 1}) %></li>
|
# <li><%= link_to("只看自己", {:controller => 'users', :action => 'show', :type => 1}) %></li>
|
||||||
# <li><%= link_to("<EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD>", {:controller => 'users', :action => 'show', :type => 2}) %></li>
|
# <li><%= link_to("所有反馈", {:controller => 'users', :action => 'show', :type => 2}) %></li>
|
||||||
# </ul></div>
|
# </ul></div>
|
||||||
|
|
||||||
def show_activity(state)
|
def show_activity(state)
|
||||||
|
|
|
@ -64,6 +64,7 @@ class Project < ActiveRecord::Base
|
||||||
has_many :project_infos, :dependent => :destroy
|
has_many :project_infos, :dependent => :destroy
|
||||||
has_one :project_status, :class_name => "ProjectStatus", :dependent => :destroy
|
has_one :project_status, :class_name => "ProjectStatus", :dependent => :destroy
|
||||||
has_one :project_status, :class_name => "ProjectStatus", :dependent => :destroy
|
has_one :project_status, :class_name => "ProjectStatus", :dependent => :destroy
|
||||||
|
has_one :project_status, :class_name => "ProjectStatus", :dependent => :destroy
|
||||||
#end
|
#end
|
||||||
|
|
||||||
has_one :wiki, :dependent => :destroy
|
has_one :wiki, :dependent => :destroy
|
||||||
|
|
|
@ -88,6 +88,7 @@ class User < Principal
|
||||||
has_many :courses, :through => :students_for_courses, :source => :project
|
has_many :courses, :through => :students_for_courses, :source => :project
|
||||||
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
||||||
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
||||||
|
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
||||||
#####
|
#####
|
||||||
|
|
||||||
######added by nie
|
######added by nie
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<!-- added by bai -->
|
<!-- added by bai 增加地区-->
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
function showcity(province, cityField) {
|
function showcity(province, cityField) {
|
||||||
switch (province) {
|
switch (province) {
|
||||||
|
@ -213,9 +213,22 @@
|
||||||
|
|
||||||
<!-- added by bai 增加了身份、性别和地区-->
|
<!-- added by bai 增加了身份、性别和地区-->
|
||||||
|
|
||||||
<p><em class="info"><%= l(:label_identity) %><%= select_tag 'identity', "<option value = '0'>#{l(:label_teacher)}</option><option value = '1'>#{l(:label_student)}</option><option value = '2'>#{l(:label_other)}</option>".html_safe %></em></p>
|
|
||||||
<p><em class="info"><%= l(:label_gender) %><%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe %></em></p>
|
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_identity) %><span class="required"> *</span></strong></td>
|
||||||
<p><%= l(:label_location) %><select onchange="showcity(this.value, document.getElementById('userCity'));" name="province" id="userProvince">
|
<td class="info" style="width: 10px">
|
||||||
|
<%= select_tag 'identity', "<option value = '0'>#{l(:label_teacher)}</option>
|
||||||
|
<option value = '1'>#{l(:label_student)}</option>
|
||||||
|
<option value = '2'>#{l(:label_other)}</option>".html_safe %></td></tr></table></p>
|
||||||
|
|
||||||
|
|
||||||
|
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_gender) %></strong></td>
|
||||||
|
<td class="info" style="width: 10px">
|
||||||
|
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option>
|
||||||
|
<option value = '1'>#{l(:label_gender_female)}</option>".html_safe %></td></tr></table></p>
|
||||||
|
|
||||||
|
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_location) %><span class="required"> *</span></strong></td>
|
||||||
|
<td class="info" style="width: 80px">
|
||||||
|
<select onchange="showcity(this.value, document.getElementById('userCity'));" name="province" id="userProvince">
|
||||||
<option value="">--请选择省份--</option>
|
<option value="">--请选择省份--</option>
|
||||||
<option value="北京">北京</option>
|
<option value="北京">北京</option>
|
||||||
<option value="上海">上海</option>
|
<option value="上海">上海</option>
|
||||||
|
@ -252,9 +265,14 @@
|
||||||
<option value="澳门">澳门特别行政区</option>
|
<option value="澳门">澳门特别行政区</option>
|
||||||
<option value="台湾">台湾</option>
|
<option value="台湾">台湾</option>
|
||||||
<option value="海外">海外</option>
|
<option value="海外">海外</option>
|
||||||
</select>
|
</select></td>
|
||||||
<select name="city" id="userCity"></select></p>
|
<td class="info" style="width: 100px">
|
||||||
|
<select name="city" id="userCity"></select></td></tr></table></p>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p><table><tr><td><%= submit_tag l(:button_submit) %></td></tr></table></p>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if Setting.openid? %>
|
<% if Setting.openid? %>
|
||||||
<p><%= f.text_field :identity_url %></p>
|
<p><%= f.text_field :identity_url %></p>
|
||||||
|
@ -267,5 +285,4 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<%= submit_tag l(:button_submit) %>
|
|
||||||
<% end %>
|
|
||||||
|
|
|
@ -13,6 +13,14 @@
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<!-- 在这里添加赞和踩-->
|
||||||
|
<span id="praise_tread" style="float: right">
|
||||||
|
<%= render :partial => "/praise_tread/praise_tread",
|
||||||
|
:locals => {:obj => @bid,:show_flag => true,:user_id =>User.current.id}%>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<% if @bid.reward_type.nil? or @bid.reward_type == 1%>
|
<% if @bid.reward_type.nil? or @bid.reward_type == 1%>
|
||||||
|
|
|
@ -143,7 +143,7 @@ body table tr td span6 {
|
||||||
<td><p >在桌面上点击鼠标右键,选择TortoiseGit的Settings进行设置</p></td>
|
<td><p >在桌面上点击鼠标右键,选择TortoiseGit的Settings进行设置</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到,<span5> 其中的name和email要和forge.trustie.net上的登陆名和密码保持一致</span5>
|
<td align="left">Name和Email是用来设置自己的用户名和联系方式的(user.name和user.email必须填写,这些将在版本库提交时用到,<span5> 其中的name和email要和forge.trustie.net上的登陆名和邮箱保持一致</span5>
|
||||||
,方便代码贡献统计 )。 </td>
|
,方便代码贡献统计 )。 </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -58,7 +58,8 @@
|
||||||
|
|
||||||
<strong class="font_small_watch"><%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@user.watcher_users(@user.id).count.to_s+")", :controller=>"users", :action=>"user_fanslist" %></strong>
|
<strong class="font_small_watch"><%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@user.watcher_users(@user.id).count.to_s+")", :controller=>"users", :action=>"user_fanslist" %></strong>
|
||||||
|
|
||||||
<p><%= toggle_link l(:label_brief_introduction), 'introduction', {:focus => 'new_form_project_message'} %></p>
|
<!-- added by bai 个人签名-->
|
||||||
|
<p><%= toggle_link l(:label_brief_introduction), 'introduction', {:focus => 'new_form_user_introduction'} %></p>
|
||||||
|
|
||||||
<% unless @user.user_extensions.nil? %>
|
<% unless @user.user_extensions.nil? %>
|
||||||
<%= @user.user_extensions.brief_introduction %>
|
<%= @user.user_extensions.brief_introduction %>
|
||||||
|
@ -70,16 +71,22 @@
|
||||||
<table border="0" width="100%" align="center" >
|
<table border="0" width="100%" align="center" >
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= f.text_area 'user_introduction', :rows => 3, :cols => 65, :placeholder => "#{l(:label_my_brief_introduction)}", :style => "resize: none;", :class => 'noline'%></td>
|
<td><%= f.text_area 'user_introduction', :rows => 3,
|
||||||
|
:cols => 65,
|
||||||
|
:placeholder => "#{l(:label_my_brief_introduction)}",
|
||||||
|
:style => "resize: none;",
|
||||||
|
:class => 'noline'%></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table border="0" width="200px" align="center">
|
<table border="0" width="200px" align="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"> <%= submit_tag l(:button_submit), :name => nil , :class => "bid_btn" %></td>
|
<td align="right"> <%= submit_tag l(:button_submit), :name => nil ,
|
||||||
|
:class => "bid_btn" %></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- end -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -35,18 +35,18 @@
|
||||||
<!-- added by bai 增加账户里的性别-->
|
<!-- added by bai 增加账户里的性别-->
|
||||||
<% unless @user.user_extensions.nil? %>
|
<% unless @user.user_extensions.nil? %>
|
||||||
<% if @user.user_extensions.gender == 0 %>
|
<% if @user.user_extensions.gender == 0 %>
|
||||||
<p>
|
<p style="width:400px;padding-left: 26px;">
|
||||||
<%= l(:label_gender) %><%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe ,:class =>'gender' %>
|
<%= l(:label_gender) %> <%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe ,:class =>'gender' %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<p>
|
<p style="width:400px;padding-left: 26px;">
|
||||||
<%= l(:label_gender) %><%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1' selected='selected'>#{l(:label_gender_female)}</option>".html_safe %>
|
<%= l(:label_gender) %> <%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1' selected='selected'>#{l(:label_gender_female)}</option>".html_safe ,:class =>'gender' %>
|
||||||
</p>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p><%= l(:label_gender) %><%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe %></p>
|
<p style="width:400px;padding-left: 26px;"><%= l(:label_gender) %> <%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option><option value = '1'>#{l(:label_gender_female)}</option>".html_safe ,:class =>'gender' %></p>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
@ -61,10 +61,10 @@
|
||||||
|
|
||||||
<!-- added by bai 单位-->
|
<!-- added by bai 单位-->
|
||||||
<% unless @user.user_extensions.nil?%>
|
<% unless @user.user_extensions.nil?%>
|
||||||
<p><%= l(:field_occupation)%><%= text_field_tag "occupation", @user.user_extensions.occupation%>
|
<p style="width:400px;padding-left: 26px;"><%= l(:field_occupation)%><%= text_field_tag "occupation", @user.user_extensions.occupation, :class => 'occupation'%>
|
||||||
</p>
|
</p>
|
||||||
<%else%>
|
<%else%>
|
||||||
<p><%= l(:field_occupation)%><%= text_field_tag "occupation"%>
|
<p style="width:400px;padding-left: 26px;"><%= l(:field_occupation)%><%= text_field_tag "occupation", nil, :class => 'occupation'%>
|
||||||
</p>
|
</p>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
||||||
|
@ -284,7 +284,8 @@ $().ready(funtion(){
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script> -->
|
</script> -->
|
||||||
<p><%= l(:label_location) %><select onchange="showcity(this.value, document.getElementById('userCity'));" name="province" id="userProvince">
|
<p style="width:400px;padding-left: 26px;"><%= l(:label_location) %>
|
||||||
|
<select onchange="showcity(this.value, document.getElementById('userCity'));" name="province" id="userProvince" class="location">
|
||||||
<option value="">--请选择省份--</option>
|
<option value="">--请选择省份--</option>
|
||||||
<option value="北京">北京</option>
|
<option value="北京">北京</option>
|
||||||
<option value="上海">上海</option>
|
<option value="上海">上海</option>
|
||||||
|
@ -322,7 +323,7 @@ $().ready(funtion(){
|
||||||
<option value="台湾">台湾</option>
|
<option value="台湾">台湾</option>
|
||||||
<option value="海外">海外</option>
|
<option value="海外">海外</option>
|
||||||
</select>
|
</select>
|
||||||
<select name="city" id="userCity"></select></p>
|
<select name="city" id="userCity" class="location"></select></p>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
|
||||||
<% if Setting.openid? %>
|
<% if Setting.openid? %>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
<%= wikitoolbar_for 'project_description' %>
|
<%= wikitoolbar_for 'project_description' %>
|
||||||
|
|
||||||
|
|
||||||
<% @project.custom_field_values.each do |value| %>
|
<% @project.custom_field_values.each do |value| %>
|
||||||
<p><%= custom_field_tag_with_label :project, value %></p>
|
<p><%= custom_field_tag_with_label :project, value %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<%= form_tag({:controller => 'projects',
|
<%= form_tag({:controller => 'projects',
|
||||||
:action => 'project_respond'}) do %>
|
:action => 'project_respond'}) do %>
|
||||||
<%= text_area_tag 'project_respond', "", :class => 'noline', :required => true, :style => "resize: none;", :rows => 6, :placeholder => l(:label_projects_feedback_respond_content) %>
|
<%= text_area_tag 'project_respond', "", :class => 'noline', :required => true, :style => "resize: none;", :rows => 6, :placeholder => l(:label_projects_feedback_respond_content) %>
|
||||||
|
|
||||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
|
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
|
||||||
<%= submit_tag l(:button_projects_feedback_respond), :name => nil , :class => "bid_btn"%> </td>
|
<%= submit_tag l(:button_projects_feedback_respond), :name => nil , :class => "bid_btn"%> </td>
|
||||||
|
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<%= content_tag('span', "#{(@project.repository.nil? || @project.repository.changesets[0].nil?) ? '0' : distance_of_time_in_words(Time.now, @project.repository.changesets[0].committed_on)}", :class => "info") %><%= content_tag('span', l(:label_since_last_commits)) %>
|
<%= content_tag('span', "#{(@project.repository.nil? || @project.repository.changesets[0].nil?) ? '0' : distance_of_time_in_words(Time.now, @project.repository.changesets[0].committed_on)}", :class => "info") %><%= content_tag('span', l(:label_since_last_commits)) %>
|
||||||
</p>
|
</p>
|
||||||
<p class="stats">
|
<p class="stats">
|
||||||
<%= content_tag('span', "#{@project.repository.nil? ? '0' : @project.repository.changesets.count }", :class => "info") %><%= content_tag('span', l(:label_commit_on)) %>
|
<%= content_tag('span', "#{@project.repository.nil? ? '0' : @project.project_status.changesets_count }", :class => "info") %><%= content_tag('span', l(:label_commit_on)) %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<!-- <%= content_tag('span', "#{l(:default_role_manager)}: ") %> -->
|
<!-- <%= content_tag('span', "#{l(:default_role_manager)}: ") %> -->
|
||||||
<% @admin = @project.project_infos%>
|
<% @admin = @project.project_infos%>
|
||||||
<% if @admin.size > 0 %>
|
<% if @admin.size > 0 %>
|
||||||
<%= content_tag('a', @admin.collect{|u| link_to(u.user.name, user_path(u.user_id))}.join(", ").html_safe) %>
|
<%= content_tag('a', @admin.collect{|u| link_to(u.user.name, user_path(u.user_id))}.join(", ").html_safe) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="licences">
|
<div class="licences">
|
||||||
|
|
|
@ -50,6 +50,22 @@
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
|
<%= sort_project(@s_type)%>
|
||||||
|
<!-- <div class="pagination_list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<%= link_to l(:label_sort_by_time), projects_path(:project_sort_type => '0'),:class=>"test_new" %>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to l(:label_sort_by_active), projects_path(:project_sort_type => '1'),:class=>"test_new" %>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to l(:label_sort_by_influence), projects_path(:project_sort_type => '2'),:class=>"test_new" %>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
<div id="projects-index">
|
<div id="projects-index">
|
||||||
<%= render_project_hierarchy(@projects)%>
|
<%= render_project_hierarchy(@projects)%>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,7 +34,7 @@ begin
|
||||||
declare v_uid bigint(22);
|
declare v_uid bigint(22);
|
||||||
declare v int(10);
|
declare v int(10);
|
||||||
declare _done TINYINT(1) default 0;
|
declare _done TINYINT(1) default 0;
|
||||||
declare cur_user cursor for select project_id,count(*) from (select project_id,repositories.id from repositories inner join changesets where repositories.id = changesets.repository_id)t group by project_id;
|
declare cur_user cursor for select project_id,count(*) from (select project_id,repositories.id from repositories inner join changesets where repositories.id = changesets.repository_id and project_id in (SELECT `projects`.id FROM `projects` WHERE (((projects.status <> 9) AND (projects.is_public = 1)))))t group by project_id;
|
||||||
declare continue handler for not found set _done = 1;
|
declare continue handler for not found set _done = 1;
|
||||||
open cur_user;
|
open cur_user;
|
||||||
loop_xxx:loop
|
loop_xxx:loop
|
||||||
|
|
89
db/schema.rb
89
db/schema.rb
|
@ -13,14 +13,6 @@
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20130918004629) do
|
ActiveRecord::Schema.define(:version => 20130918004629) do
|
||||||
|
|
||||||
create_table "a_user_watchers", :force => true do |t|
|
|
||||||
t.string "name"
|
|
||||||
t.text "description"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
t.integer "member_id"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
t.string "act_type", :null => false
|
t.string "act_type", :null => false
|
||||||
|
@ -77,7 +69,6 @@ ActiveRecord::Schema.define(:version => 20130918004629) do
|
||||||
t.string "description"
|
t.string "description"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "reward"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "bids", :force => true do |t|
|
create_table "bids", :force => true do |t|
|
||||||
|
@ -284,9 +275,9 @@ ActiveRecord::Schema.define(:version => 20130918004629) do
|
||||||
add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
|
add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
|
||||||
|
|
||||||
create_table "issue_relations", :force => true do |t|
|
create_table "issue_relations", :force => true do |t|
|
||||||
t.integer "issue_from_id", :null => false
|
t.integer "issue_from_id", :null => false
|
||||||
t.integer "issue_to_id", :null => false
|
t.integer "issue_to_id", :null => false
|
||||||
t.string "relation_type", :null => false
|
t.string "relation_type", :default => "", :null => false
|
||||||
t.integer "delay"
|
t.integer "delay"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -428,22 +419,6 @@ ActiveRecord::Schema.define(:version => 20130918004629) do
|
||||||
add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id"
|
add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id"
|
||||||
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
||||||
|
|
||||||
create_table "messages_for_bids", :force => true do |t|
|
|
||||||
t.string "message"
|
|
||||||
t.integer "user_id"
|
|
||||||
t.integer "bid_id"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "messages_for_users", :force => true do |t|
|
|
||||||
t.integer "messager_id"
|
|
||||||
t.integer "user_id"
|
|
||||||
t.string "message"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "news", :force => true do |t|
|
create_table "news", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.string "title", :limit => 60, :default => "", :null => false
|
t.string "title", :limit => 60, :default => "", :null => false
|
||||||
|
@ -504,18 +479,6 @@ ActiveRecord::Schema.define(:version => 20130918004629) do
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "project_statuses", ["changesets_count"], :name => "index_project_statuses_on_changesets_count"
|
|
||||||
add_index "project_statuses", ["watchers_count"], :name => "index_project_statuses_on_watchers_count"
|
|
||||||
|
|
||||||
create_table "project_tags", :force => true do |t|
|
|
||||||
t.integer "project_id"
|
|
||||||
t.integer "tag_id"
|
|
||||||
t.string "description"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
t.integer "user_id"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "projects", :force => true do |t|
|
create_table "projects", :force => true do |t|
|
||||||
t.string "name", :default => "", :null => false
|
t.string "name", :default => "", :null => false
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
@ -583,6 +546,26 @@ ActiveRecord::Schema.define(:version => 20130918004629) do
|
||||||
t.string "issues_visibility", :limit => 30, :default => "default", :null => false
|
t.string "issues_visibility", :limit => 30, :default => "default", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "seems_rateable_cached_ratings", :force => true do |t|
|
||||||
|
t.integer "cacheable_id", :limit => 8
|
||||||
|
t.string "cacheable_type"
|
||||||
|
t.float "avg", :null => false
|
||||||
|
t.integer "cnt", :null => false
|
||||||
|
t.string "dimension"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "seems_rateable_rates", :force => true do |t|
|
||||||
|
t.integer "rater_id", :limit => 8
|
||||||
|
t.integer "rateable_id"
|
||||||
|
t.string "rateable_type"
|
||||||
|
t.float "stars", :null => false
|
||||||
|
t.string "dimension"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "settings", :force => true do |t|
|
create_table "settings", :force => true do |t|
|
||||||
t.string "name", :default => "", :null => false
|
t.string "name", :default => "", :null => false
|
||||||
t.text "value"
|
t.text "value"
|
||||||
|
@ -593,20 +576,13 @@ ActiveRecord::Schema.define(:version => 20130918004629) do
|
||||||
|
|
||||||
create_table "shares", :force => true do |t|
|
create_table "shares", :force => true do |t|
|
||||||
t.date "created_on"
|
t.date "created_on"
|
||||||
t.string "title"
|
|
||||||
t.string "share_type"
|
|
||||||
t.string "url"
|
t.string "url"
|
||||||
t.datetime "created_at", :null => false
|
t.string "title"
|
||||||
t.datetime "updated_at", :null => false
|
t.integer "share_type"
|
||||||
t.integer "project_id"
|
|
||||||
t.integer "user_id"
|
|
||||||
t.string "description"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "students", :force => true do |t|
|
|
||||||
t.string "name"
|
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "project_id"
|
||||||
|
t.integer "user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "students_for_courses", :force => true do |t|
|
create_table "students_for_courses", :force => true do |t|
|
||||||
|
@ -667,7 +643,7 @@ ActiveRecord::Schema.define(:version => 20130918004629) do
|
||||||
create_table "tokens", :force => true do |t|
|
create_table "tokens", :force => true do |t|
|
||||||
t.integer "user_id", :default => 0, :null => false
|
t.integer "user_id", :default => 0, :null => false
|
||||||
t.string "action", :limit => 30, :default => "", :null => false
|
t.string "action", :limit => 30, :default => "", :null => false
|
||||||
t.string "value", :limit => 40
|
t.string "value", :limit => 40, :default => "", :null => false
|
||||||
t.datetime "created_on", :null => false
|
t.datetime "created_on", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -693,7 +669,6 @@ ActiveRecord::Schema.define(:version => 20130918004629) do
|
||||||
t.integer "zip_code"
|
t.integer "zip_code"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "identity"
|
|
||||||
t.string "technical_title"
|
t.string "technical_title"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -717,14 +692,6 @@ ActiveRecord::Schema.define(:version => 20130918004629) do
|
||||||
add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count"
|
add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count"
|
||||||
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
|
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
|
||||||
|
|
||||||
create_table "user_tags", :force => true do |t|
|
|
||||||
t.integer "user_id"
|
|
||||||
t.integer "tag_id"
|
|
||||||
t.string "description"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "users", :force => true do |t|
|
create_table "users", :force => true do |t|
|
||||||
t.string "login", :default => "", :null => false
|
t.string "login", :default => "", :null => false
|
||||||
t.string "hashed_password", :limit => 40, :default => "", :null => false
|
t.string "hashed_password", :limit => 40, :default => "", :null => false
|
||||||
|
|
|
@ -1182,6 +1182,12 @@ ul.properties li span {font-style:italic;}
|
||||||
.total-hours { font-size: 110%; font-weight: bold; }
|
.total-hours { font-size: 110%; font-weight: bold; }
|
||||||
.total-hours span.hours-int { font-size: 120%; }
|
.total-hours span.hours-int { font-size: 120%; }
|
||||||
.gender { width: 20%; }
|
.gender { width: 20%; }
|
||||||
|
/*added by bai 增加了性别、地区和单位的样式 */
|
||||||
|
#my_account_form select.gender { width: 20%; }
|
||||||
|
#my_account_form select.location {width: 31%;}
|
||||||
|
#my_account_form .occupation { width: 56%; }
|
||||||
|
/*end*/
|
||||||
|
|
||||||
.autoscroll {overflow-x: auto; padding:1px; margin-bottom: 1.2em;}
|
.autoscroll {overflow-x: auto; padding:1px; margin-bottom: 1.2em;}
|
||||||
#user_login, #user_firstname, #user_lastname, #user_mail, #my_account_form select, #user_form select, #user_identity_url { width: 60%; }
|
#user_login, #user_firstname, #user_lastname, #user_mail, #my_account_form select, #user_form select, #user_identity_url { width: 60%; }
|
||||||
|
|
||||||
|
@ -1203,7 +1209,7 @@ p.pagination {margin-top:8px; font-size: 90%}
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 3px 0 3px 0;
|
padding: 3px 0 3px 0;
|
||||||
padding-left: 100px; /* width of left column containing the label elements *//*by young*/
|
padding-left: 100px; /* width of left column containing the label elements *//*by young*/
|
||||||
min-height: 1.8em;
|
/*/*min-height: 1.8em;*/ by bai*/
|
||||||
clear:left;
|
clear:left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1292,9 +1298,10 @@ p.other-formats { text-align: right; font-size:0.9em; color: #666; }
|
||||||
|
|
||||||
a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px 3px 16px; }
|
a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px 3px 16px; }
|
||||||
|
|
||||||
em.info {font-style:normal;font-size:90%;color:#888;display:block;}
|
/*modified by bai 改变了字体颜色和加粗*/
|
||||||
|
em.info {font-style:normal; font-size:90%; color:#505050; font-weight:bold; display:block;}
|
||||||
em.info.error {padding-left:20px; background:url(../images/exclamation.png) no-repeat 0 50%;}
|
em.info.error {padding-left:20px; background:url(../images/exclamation.png) no-repeat 0 50%;}
|
||||||
|
/*end*/
|
||||||
textarea.text_cf {width:90%;}
|
textarea.text_cf {width:90%;}
|
||||||
|
|
||||||
#tab-content-modules fieldset p {margin:3px 0 4px 0;}
|
#tab-content-modules fieldset p {margin:3px 0 4px 0;}
|
||||||
|
|
Loading…
Reference in New Issue