for president do

president
xianbo 11 years ago
parent 9c5066b81c
commit 284b0b15f6

@ -32,7 +32,7 @@ group :assets do
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
@ -42,14 +42,6 @@ group :ldap do
gem "net-ldap", "~> 0.3.1"
end
group :test do
# shoulda的版本做了改动
#gem "shoulda", "~> 3.3.2"
gem "shoulda", "> 3.3.2"
gem "mocha", "~> 0.13.3"
gem 'capybara', '~> 2.0.0'
gem 'nokogiri', '< 1.6.0'
end
platforms :mri, :mingw do
group :rmagick do

@ -52,15 +52,6 @@ GEM
rails (>= 3, < 5)
arel (3.0.2)
builder (3.0.0)
capybara (2.0.3)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 1.0.0)
childprocess (0.5.3)
ffi (~> 1.0, >= 1.0.11)
coderay (1.0.9)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
@ -68,30 +59,28 @@ GEM
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.1)
coffee-script-source (1.3.3)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
fastercsv (1.5.0)
ffi (1.9.3-x86-mingw32)
hike (1.2.3)
fastercsv (1.5.4)
hike (1.2.1)
i18n (0.6.1)
iconv (1.0.4)
journey (1.0.4)
jquery-rails (2.0.3)
railties (>= 3.1.0, < 5.0)
thor (~> 0.14)
json (1.8.0)
mail (2.5.4)
json (1.7.7)
libv8 (3.11.8.13)
mail (2.5.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.4)
mime-types (1.23)
mocha (0.13.3)
metaclass (~> 0.0.1)
multi_json (1.7.6)
mysql2 (0.3.11-x86-mingw32)
mime-types (1.19)
multi_json (1.5.0)
mysql2 (0.3.11)
net-ldap (0.3.1)
nokogiri (1.5.11-x86-mingw32)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
@ -99,9 +88,9 @@ GEM
rack-openid (1.3.1)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-ssl (1.3.3)
rack-ssl (1.3.2)
rack
rack-test (0.6.2)
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.13)
actionmailer (= 3.2.13)
@ -118,48 +107,40 @@ GEM
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.3.2)
rdoc (3.12.2)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
rmagick (2.13.2)
ref (1.0.2)
rmagick (2.13.1)
ruby-openid (2.1.8)
rubyzip (1.1.4)
sass (3.2.7)
sass-rails (3.2.6)
rubyzip (1.0.0)
sass (3.1.20)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.42.0)
childprocess (>= 0.5.0)
multi_json (~> 1.0)
rubyzip (~> 1.0)
websocket (~> 1.0.4)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
shoulda-context (1.2.1)
shoulda-matchers (2.6.1)
activesupport (>= 3.0.0)
sprockets (2.2.2)
sprockets (2.2.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thor (0.18.1)
tilt (1.4.1)
treetop (1.4.14)
therubyracer (0.11.3)
libv8 (~> 3.11.8.12)
ref
thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
uglifier (1.0.3)
tzinfo (0.3.33)
uglifier (1.2.6)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
websocket (1.0.7)
xpath (1.0.0)
nokogiri (~> 1.3)
multi_json (~> 1.3)
zip-zip (0.3)
rubyzip (>= 1.0.0)
PLATFORMS
x86-mingw32
ruby
DEPENDENCIES
activerecord-jdbc-adapter (= 1.2.5)
@ -167,22 +148,22 @@ DEPENDENCIES
acts-as-taggable-on (= 2.4.1)
better_errors!
builder (= 3.0.0)
capybara (~> 2.0.0)
coderay (~> 1.0.6)
coffee-rails (~> 3.2.1)
fastercsv (~> 1.5.0)
i18n (~> 0.6.0)
iconv
jquery-rails (~> 2.0.2)
mocha (~> 0.13.3)
mysql2 (~> 0.3.11)
net-ldap (~> 0.3.1)
nokogiri (< 1.6.0)
rack-mini-profiler!
rack-openid
rails (= 3.2.13)
rmagick (>= 2.0.0)
ruby-openid (~> 2.1.4)
rubyzip
sass-rails (~> 3.2.3)
seems_rateable!
shoulda (> 3.3.2)
therubyracer
uglifier (>= 1.0.3)
zip-zip

@ -116,17 +116,17 @@ class RepositoriesController < ApplicationController
if request.post? && @repository.save
if(params[:repository_scm]=="Git")
system "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+" "+@repository_tag
system "echo -e '"+@repo_name+"-write:"+
" "+@repo_name+"' >> "+@root_path+"group.passwd"
#system "echo -e '"+@repo_name+"-write:"+
# " "+@repo_name+"' >> "+@root_path+"group.passwd"
system "mkdir "+@root_path+"htdocs/"+User.current.login.to_s
system "git init --bare "+@project_path
system "mv "+@project_path+"/hooks/post-update{.sample,}"
system "chmod a+x "+@project_path+"/hooks/post-update"
system "echo -e 'Allow from all \n Order Deny,Allow \n "+
"<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+
"Require group "+@repo_name+"-write \n "+
"</Limit> \n ' >> "+
@root_path+"htdocs/"+ @repository_name+"/.htaccess"
#system "mv "+@project_path+"/hooks/post-update{.sample,}"
#system "chmod a+x "+@project_path+"/hooks/post-update"
#system "echo -e 'Allow from all \n Order Deny,Allow \n "+
# "<Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> \n"+
# "Require group "+@repo_name+"-write \n "+
# "</Limit> \n ' >> "+
# @root_path+"htdocs/"+ @repository_name+"/.htaccess"
system "cd "+@project_path+" ;git update-server-info"
# if(create_repo_file&&create_passwd&&create_group&&init_repository&&add_privilege&&init_server_info)
# else

@ -816,7 +816,8 @@ class UsersController < ApplicationController
# 必填自己的工作单位,其实就是学校
def auth_user_extension
if @user == User.current && @user.user_extensions.school.nil?
user_identity = @user.extensions.identity
if @user == User.current && (user_identity.eql?(User::TEACHER)||user_identity.eql?(User::STUDENT) ) && @user.user_extensions.school.nil?
flash[:error] = l(:error_complete_occupation)
redirect_to my_account_path
end

@ -1661,7 +1661,7 @@ module ApplicationHelper
#@nav_dispaly_project_label
nav_list = Array.new
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label
#nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label
nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label

@ -20,7 +20,7 @@
module RepositoriesHelper
ROOT_PATH="/home/pdl/redmine-2.3.2-0/apache2/"
PROJECT_PATH_CUT = 40
REPO_IP_ADDRESS = "repository.trustie.net"
REPO_IP_ADDRESS = "10.0.47.204:8082"
def format_revision(revision)
if revision.respond_to? :format_identifier

@ -1,5 +1,4 @@
<!--add by huang-->
<% cache "footer" do %>
<div class="clearfix"></div>
<div id="footer" style="margin-left:-5px;padding-top: 20px;clear: both;font-size: 12px;">
<div style="border-top:solid 1px #C6E9F1;"></div>
@ -29,7 +28,7 @@
</div>
</div>
</div>
<div class="debug">
<div class="debug hidden">
<%= debug(params) if Rails.env.development? %>
<script src="http://s4.cnzz.com/z_stat.php?id=1000482288&web_id=1000482288" language="JavaScript"></script>
@ -46,4 +45,3 @@
</script>
</div>
<% end %>

@ -19,12 +19,13 @@
@nav_dispaly_store_all_label = 1
else
@nav_dispaly_project_all_label = 1
@nav_dispaly_course_all_label = 1
@nav_dispaly_project_label = 1
#@nav_dispaly_course_all_label = 1
@nav_dispaly_forum_label = 1
@nav_dispaly_bid_label = 1
@nav_dispaly_contest_label = 1
#@nav_dispaly_bid_label = 1
#@nav_dispaly_contest_label = 1
@nav_dispaly_store_all_label = 1
@nav_dispaly_user_label = 1
#@nav_dispaly_user_label = 1
end
%>
<div id="top-menu" style="background-color: #15bccf;height:40px;margin-top: 10px;margin-bottom: 10px;">

@ -1,6 +1,5 @@
<div class="clearfix"></div>
<div class="linkother">
<a href="http://forge.trustie.net" class="link_other_item"><%=l(:label_projects_management_platform)%></a>
<a href="http://course.trustie.net" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
<a href="http://contest.trustie.net" class="link_other_item"><%=l(:label_contests_management_platform)%></a>
</div>
<a href="http://<%=Setting.project_domain%>" class="link_other_item"><%=l(:label_projects_management_platform)%></a>
<a href="http://<%=Setting.course_domain%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
</div>

@ -36,7 +36,13 @@
<%= image_tag '/images/transparent.png', size: "75x75" %>
</div>
<div class="welcome_left" id="welcome_left">
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_project) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_project_description) %></span>
<span class="" style="font-weight: bold; font-size: 18px; color: #e8770d;display: inline-block; margin-top: 5px;">
micROS多态智能集群机器人操作系统
</span>
<br/>
<span class="" style="font-weight:bold; font-size:18px;color:#15bccf; display:inline-block; margin-top:5px;">
中国开源社区
</span>
</div>
<div class="search-bar" id="search-bar">
<%= render :partial => "search_project", :locals => {:project_type => 0}%>
@ -54,7 +60,6 @@
<ul class="d-p-projectlist">
<% projects = find_miracle_project(10, 3) %>
<% projects.map do |project| %>
<% cache cache_key_for_project(project) do %>
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
<div style="float: left;">
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
@ -75,7 +80,6 @@
:id => "tooltip-#{project.id}" %>
</div>
</li>
<% end %>
<% end; reset_cycle %>
</ul>
</div>
@ -83,12 +87,11 @@
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<ul class="user-welcome-message-list">
<h3 style="color: rgb(21, 188, 207)"><strong>用户动态</strong></h3>
<h3 style="color: rgb(21, 188, 207)"><strong>开发动态</strong></h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
<div class="user-message-box-list" style="margin-top: 10px;">
<%activities = find_all_activities%>
<% activities.each do |event| %>
<% cache cache_key_for_event(event) do %>
<li style="display: block;height:60px; padding-bottom: 4px;">
<div class="inner-right" style="float: left; height: 100%; ">
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
@ -99,7 +102,6 @@
<p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
</div>
</li>
<% end %><!-- cache -->
<% end %>
</div>
</ul>
@ -107,7 +109,6 @@
<div class="right" style="float: right; width: 48%; ">
<ul class="welcome-message-list">
<% cache 'forum_links' do %>
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
<h3 style="color: rgb(21, 188, 207);">
<strong>贴吧动态</strong>
@ -115,11 +116,9 @@
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%></h3>
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
</div>
<% end %>
<div class="welcome-box-list-new memo_activity">
<% topics = find_new_forum_topics(7) %>
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
<% cache cache_key_for_topic(topic) do %>
<li class="message-brief-intro">
<div class='memo_title text_nowrap'>
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %>
@ -139,7 +138,6 @@
</span>
</div>
</li>
<% end %> <!-- cache -->
<% end %>
</div>
</ul>
@ -147,4 +145,4 @@
<div class="clearfix"></div>
<%= render partial: 'link_to_another' %>
<%= render partial: 'link_to_another' %>

@ -1789,3 +1789,4 @@ en:
# ajax异步验证
modal_valid_passing: can be used.
lable_user_name: "nickname/email"

@ -2023,7 +2023,7 @@ zh:
label_search_intimation: 请输入要搜索的关键字
label_work_quantity: 个作品
label_projects_management_platform: 项目托管平台
label_courses_management_platform: 课程实践平台
label_courses_management_platform: 项目培训平台
label_contests_management_platform: 竞赛托管平台
label_organizers: 主办单位
@ -2041,4 +2041,4 @@ zh:
# ajax异步验证
modal_valid_passing: 可以使用
label_bug: 漏洞

@ -237,11 +237,20 @@ tags_max_length:
tags_show_search_results:
format: int
default: 5
#user_domain:
# default: user.trustie.net
#project_domain:
# default: forge.trustie.net
#contest_domain:
# default: contest.trustie.net
#course_domain:
# default: course.trustie.net
user_domain:
default: user.trustie.net
default: 10.0.47.204
project_domain:
default: forge.trustie.net
default: 10.0.47.204
contest_domain:
default: contest.trustie.net
default: 10.0.47.204
course_domain:
default: course.trustie.net
default: 10.0.47.204

File diff suppressed because it is too large Load Diff

@ -617,6 +617,8 @@ ul.tool li{list-style-type:none;
font-weight: bold;
font-size: 18px;
color:#15bccf;
display: inline-block;
margin-top: 5px;
}
.font_welcome_school{
@ -633,11 +635,14 @@ ul.tool li{list-style-type:none;
}
.font_welcome_tdescription{
font-family: "Microsoft YaHei";
font-family: "Microsoft YaHei";
font-size: 16px;
color: #5c5c5c;
text-align: justify;
text-justify: inter-ideograph;
display: inline-block;
margin-top: 5px;
float: right;
}
.inf_user_image{

@ -6,7 +6,7 @@
/************************** 页脚 footer 开始 *****************************/
.linkother{
width: 460px;
width: 310px;
margin: 70px auto -35px ;
}
.link_other_item{
@ -478,4 +478,4 @@ a.attachments_list_color {
font-size: 20px;
color:#e8770d;
}
/************************** 学校课程 结束 ****************************/
/************************** 学校课程 结束 ****************************/

Loading…
Cancel
Save