course_group
z9hang 11 years ago
commit d1ad7b71c8

@ -37,6 +37,7 @@ class ContestsController < ApplicationController
def index def index
render_404
# @contests = Contest.visible # @contests = Contest.visible
# @contests ||= [] # @contests ||= []
@offset, @limit = api_offset_and_limit(:limit => 10) @offset, @limit = api_offset_and_limit(:limit => 10)

@ -427,6 +427,7 @@ class CoursesController < ApplicationController
end end
def index def index
render_404
@course_type = params[:course_type] @course_type = params[:course_type]
@school_id = params[:school_id] @school_id = params[:school_id]
per_page_option = 10 per_page_option = 10
@ -474,7 +475,7 @@ class CoursesController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { format.html {
render :layout => 'base' # render :layout => 'base'
} }
format.atom { format.atom {
courses = Course.visible.order('created_on DESC').limit(Setting.feeds_limit.to_i).all courses = Course.visible.order('created_on DESC').limit(Setting.feeds_limit.to_i).all

@ -105,6 +105,7 @@ class ProjectsController < ApplicationController
end end
def index def index
render_404
#调用存储过程更新提交次数 #调用存储过程更新提交次数
#ActiveRecord::Base.connection.execute("CALL sp_project_status_cursor();") #ActiveRecord::Base.connection.execute("CALL sp_project_status_cursor();")
#Modified by nie #Modified by nie
@ -156,8 +157,8 @@ class ProjectsController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { format.html {
render :layout => 'base' # render :layout => 'base'
# scope = Project # scope = Project
# unless params[:closed] # unless params[:closed]
# scope = scope.active # scope = scope.active

@ -295,6 +295,7 @@ class UsersController < ApplicationController
#end #end
def index def index
@status = params[:status] || 1 @status = params[:status] || 1
sort_init 'login', 'asc' sort_init 'login', 'asc'
sort_update %w(login firstname lastname mail admin created_on last_login_on) sort_update %w(login firstname lastname mail admin created_on last_login_on)
@ -352,7 +353,8 @@ class UsersController < ApplicationController
respond_to do |format| respond_to do |format|
format.html { format.html {
@groups = Group.all.sort @groups = Group.all.sort
render :layout => @user_base_tag # render :layout => @user_base_tag
render_404
} }
format.api format.api
end end

@ -1830,12 +1830,11 @@ module ApplicationHelper
main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.project_domain} main_project_link = link_to l(:label_project_deposit), {:controller => 'welcome', :action => 'index', :host => Setting.project_domain}
main_contest_link = link_to l(:label_contest_innovate), {:controller => 'welcome', :action => 'index', :host => Setting.contest_domain} main_contest_link = link_to l(:label_contest_innovate), {:controller => 'welcome', :action => 'index', :host => Setting.contest_domain}
course_all_course_link = link_to l(:label_course_all), {:controller => 'courses', :action => 'index'} # course_all_course_link = link_to l(:label_course_all), {:controller => 'courses', :action => 'index'}
course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher', :host => Setting.course_domain} course_teacher_all_link = link_to l(:label_teacher_all), {:controller => 'users', :action => 'index', :role => 'teacher', :host => Setting.course_domain}
courses_link = link_to l(:label_course_practice), {:controller => 'courses', :action => 'index'} # courses_link = link_to l(:label_course_practice), {:controller => 'courses', :action => 'index'}
projects_link = link_to l(:label_project_deposit), {:controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}
users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain} users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain}
contest_link = link_to l(:label_contest_innovate), {:controller => 'contests', :action => 'index'} # contest_link = link_to l(:label_contest_innovate), {:controller => 'contests', :action => 'index'}
bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'} bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'}
forum_link = link_to l(:label_project_module_forums), {:controller => "forums", :action => "index"} forum_link = link_to l(:label_project_module_forums), {:controller => "forums", :action => "index"}
stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index'} stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index'}
@ -1844,7 +1843,7 @@ module ApplicationHelper
#@nav_dispaly_project_label #@nav_dispaly_project_label
nav_list = Array.new nav_list = Array.new
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label && @show_course == 1 nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label && @show_course == 1
nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label && @show_course == 1 # nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label && @show_course == 1
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label && @show_course == 1 nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label && @show_course == 1
nav_list.push(main_project_link) if @nav_dispaly_main_project_label nav_list.push(main_project_link) if @nav_dispaly_main_project_label
@ -1852,9 +1851,9 @@ module ApplicationHelper
nav_list.push(main_contest_link) if @nav_dispaly_main_contest_label && @show_contest == 1 nav_list.push(main_contest_link) if @nav_dispaly_main_contest_label && @show_contest == 1
nav_list.push(courses_link) if @nav_dispaly_course_label && @show_course == 1 nav_list.push(courses_link) if @nav_dispaly_course_label && @show_course == 1
nav_list.push(projects_link) if @nav_dispaly_project_label # nav_list.push(projects_link) if @nav_dispaly_project_label
nav_list.push(users_link) if @nav_dispaly_user_label nav_list.push(users_link) if @nav_dispaly_user_label
nav_list.push(contest_link) if @nav_dispaly_contest_label && @show_contest == 1 # nav_list.push(contest_link) if @nav_dispaly_contest_label && @show_contest == 1
nav_list.push(bids_link) if @nav_dispaly_bid_label nav_list.push(bids_link) if @nav_dispaly_bid_label
nav_list.push(forum_link) if @nav_dispaly_forum_label nav_list.push(forum_link) if @nav_dispaly_forum_label
nav_list.push(stores_link) if @nav_dispaly_store_all_label nav_list.push(stores_link) if @nav_dispaly_store_all_label

@ -11,7 +11,7 @@
<body> <body>
<% email = @user.mail.split("@")[1] %> <% email = @user.mail.split("@")[1] %>
<div style="border: 1px solid #c0c0c0 ; width:850px;" > <div style="border: 1px solid #c0c0c0 ; width:850px; margin-top: 10px" >
<h3 style=" padding-bottom: 8px; margin-top:5px; border-bottom: 1px solid #c0c0c0;color:black; "> <h3 style=" padding-bottom: 8px; margin-top:5px; border-bottom: 1px solid #c0c0c0;color:black; ">
<span id = "jihuo" style=" margin-left: 4%;"></span>邮箱激活</h3> <span id = "jihuo" style=" margin-left: 4%;"></span>邮箱激活</h3>
@ -19,9 +19,10 @@
<div style="margin-left:auto; margin-right:auto"> <div style="margin-left:auto; margin-right:auto">
<center> <center>
<div > <div >
<h4 style="font-size: 18px;margin-top: 10px; margin-bottom: 10px;">请在24小时内点击邮件中的链接继续完成注册</h4> <h4 style="font-size: 18px;margin-top: 10px; padding-bottom: 10px;">请在24小时内点击邮件中的链接继续完成注册</h4>
<div class="to-email"> <div class="to-email" style="padding-bottom: 8px; font-size: 14px">
<span class="summary">邮件已发送到邮箱</span> <div class="to-email" style="padding-bottom: 8px; font-size: 14px">
<span >邮件已发送到邮箱</span>
<a href="#" class="f-blue"><%= @user.mail %></a> <a href="#" class="f-blue"><%= @user.mail %></a>
</div> </div>
<p> <p>
@ -33,12 +34,7 @@
padding: 10px 16px; padding: 10px 16px;
line-height: 1.33;" target="_blank">立即查收邮件</a></p> line-height: 1.33;" target="_blank">立即查收邮件</a></p>
<span class="tracking-ad" >
<a href="javascript:void(0);" >没收到邮件?</a>
</span>
<div style = "margin-top: 10px; margin-bottom:10px;">
<span style="font-size: 16px">请先检查是否在垃圾邮件中</span>
</div> </div>

@ -19,7 +19,7 @@
<p><%= f.text_field :login, :size => 25, :required => true %><span id="valid_user_login"></span> <p><%= f.text_field :login, :size => 25, :required => true %><span id="valid_user_login"></span>
<em class="info" style="color: #acaeb1"><%= l(:label_max_number) %></em> <em class="info" style="color: #acaeb1"><%= l(:label_max_number) %></em>
</p> </p>
<p><%= f.password_field :password, :size => 25, :required => true %> <p><%= f.password_field :password, :size => 25, :required => true %><span id="valid_user_password"></span>
<em class="info" style="color: #acaeb1"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em> <em class="info" style="color: #acaeb1"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em>
</p> </p>
<p><%= f.password_field :password_confirmation, :size => 25, :required => true %><span id="valid_password" style="padding-left: 10px;"></span></p> <p><%= f.password_field :password_confirmation, :size => 25, :required => true %><span id="valid_password" style="padding-left: 10px;"></span></p>
@ -56,10 +56,12 @@
<p><%= custom_field_tag_with_label :user, value %></p> <p><%= custom_field_tag_with_label :user, value %></p>
<% end %> <% end %>
</div> </div>
<% password_min_length = Setting.password_min_length %>
<script type="text/javascript"> <script type="text/javascript">
jQuery(document).ready(function () { jQuery(document).ready(function () {
var $login = $('#user_login') var $login = $('#user_login')
var $mail = $('#user_mail') var $mail = $('#user_mail')
var $password = $('#user_password')
var $password_confirmation = $('#user_password_confirmation') var $password_confirmation = $('#user_password_confirmation')
$login.blur(function (event) { $login.blur(function (event) {
if ($(this).is('#user_login')) { if ($(this).is('#user_login')) {
@ -92,11 +94,26 @@
}); });
} }
; ;
});
$password.blur(function () {
var pas1 = document.getElementById("user_password").value;
var password_min_length = <%= password_min_length %>
if (pas1.length >= password_min_length) {
$('#valid_user_password').html('<span class="green">'+ "</span>");
}
else {
$('#valid_user_password').html('<span class="red">' + "<%= l(:setting_password_min_length_limit, :count => password_min_length) %>" + "</span>");
}
}); });
$password_confirmation.blur(function () { $password_confirmation.blur(function () {
var password_min_length = <%= password_min_length %>
var pas1 = document.getElementById("user_password").value; var pas1 = document.getElementById("user_password").value;
var pas2 = document.getElementById("user_password_confirmation").value; var pas2 = document.getElementById("user_password_confirmation").value;
if (pas1 == pas2) { if (pas1.length >= password_min_length && pas1 == pas2 ) {
$('#valid_password').html('<span class="green">' + "<%= l(:setting_password_success) %>"+ "</span>"); $('#valid_password').html('<span class="green">' + "<%= l(:setting_password_success) %>"+ "</span>");
} }
else { else {

@ -56,7 +56,7 @@
<td> <td>
<p class="top-content-list"> <p class="top-content-list">
<%= link_to "主页", home_path %> <%= link_to "主页", home_path %>
> <%= link_to l(:label_course_all), :controller => 'courses', :action => 'index' %> > <a href="http://<%= Setting.host_course%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
> <%= link_to @course.name, nil %> > <%= link_to @course.name, nil %>
</p> </p>
</td> </td>

@ -44,7 +44,7 @@
</tr> </tr>
<tr> <tr>
<td style="padding-left: 8px"><%= link_to request.host()+"/projects", :controller => 'projects', :action => 'index', :project_type => 0 %></td> <td style="padding-left: 8px"><%= link_to request.host()+"/projects", :controller => 'projects', :action => 'index', :project_type => 0 %></td>
<td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to l(:label_project_deposit),:controller => 'projects', :action => 'index', :project_type => 0 %> > <%=link_to @project, project_path(@project) %></p></td> <td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to @project, project_path(@project) %></p></td>
</tr> </tr>
</table> </table>
</div> </div>

@ -113,8 +113,7 @@
<%=link_to request.host()+"/users" ,:controller => 'users', :action => 'index' %> <%=link_to request.host()+"/users" ,:controller => 'users', :action => 'index' %>
</td> </td>
<td> <td>
<%=link_to "主页", home_path %> > <%=link_to "主页", home_path %> >
<%=link_to "软件创客", :controller => 'users', :action => 'index' %> >
<span><%=link_to @user.name, user_path %></span> <span><%=link_to @user.name, user_path %></span>
</td> </td>
</tr> </tr>

@ -106,7 +106,7 @@
<div> <div>
<!-- 昵称 --> <!-- 昵称 -->
<p style="width:630px;padding-left: 40px;"> <p style="width:630px;padding-left: 40px;">
<%= f.text_field :login, :required => true, :size => 25, :name => "login", :readonly => true %> <%= f.text_field :login, :required => true, :size => 25, :name => "login", :readonly => true, :style => 'border:1px solid #d3d3d3;'%>
<span class='font_lighter'><%= l(:label_max_number) %></span> <span class='font_lighter'><%= l(:label_max_number) %></span>
<br/> <br/>
</p> </p>

@ -7,5 +7,3 @@
<%= link_to l(:label_course_join_student), join_private_courses_courses_path ,:remote => true, :class => 'icon icon-add' %> <%= link_to l(:label_course_join_student), join_private_courses_courses_path ,:remote => true, :class => 'icon icon-add' %>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<% end %> <% end %>
<%= link_to l(:label_more), {:controller => 'courses', :action => 'index', :school_id => school_id} %>

@ -160,8 +160,6 @@
<%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add') %> <%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add') %>
<% end %> <% end %>
<% end %> <% end %>
&nbsp;&nbsp;
<%= link_to l(:label_more), {:controller => 'contests', :action => 'index'}, :target => "_blank" %>
</span> </span>
<div class="d-p-projectlist-box"> <div class="d-p-projectlist-box">
<div class="d-p-projectlist"> <div class="d-p-projectlist">
@ -258,7 +256,6 @@
<div id="J_Slide" class="d-p-index-box d-p-index-left"> <div id="J_Slide" class="d-p-index-box d-p-index-left">
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3> <h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), {:controller => 'softapplications', :action => 'index'}, :target => "_blank" %></span>
<div class="d-p-projectlist-box"> <div class="d-p-projectlist-box">
<% if Softapplication.count > 0%> <% if Softapplication.count > 0%>
<div class="d-p-projectlist"> <div class="d-p-projectlist">

@ -1,5 +1,4 @@
<% @nav_dispaly_project_label = 1 <% @nav_dispaly_forum_label = 1 %>
@nav_dispaly_forum_label = 1 %>
<%= stylesheet_link_tag 'welcome' %> <%= stylesheet_link_tag 'welcome' %>
<%= javascript_include_tag 'welcome' %> <%= javascript_include_tag 'welcome' %>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
@ -68,12 +67,6 @@
:project_type =>( @project_type||=0)}, :project_type =>( @project_type||=0)},
:class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %> :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
<% end %> <% end %>
&nbsp;&nbsp;
<%= link_to l(:label_more), { :controller => 'projects',
:action => 'index',
:project_type => 0,
:host => Setting.project_domain},
:target => "_blank" %>
</span> </span>
<div class="d-p-projectlist-box"> <div class="d-p-projectlist-box">
<ul class="d-p-projectlist"> <ul class="d-p-projectlist">
@ -118,9 +111,6 @@
<%= l(:lable_user_active)%> <%= l(:lable_user_active)%>
</strong> </strong>
</h3> </h3>
<span style="margin-top: -20px;float: right; display: block;">
<%= link_to l(:label_more), { :controller => 'users', :action => 'index'}, :target => "_blank" %>
</span>
<div class="user-message-box-list" style="margin-top: 10px;"> <div class="user-message-box-list" style="margin-top: 10px;">
<%activities = find_all_activities%> <%activities = find_all_activities%>
<% activities.each do |event| %> <% activities.each do |event| %>

@ -396,7 +396,8 @@ zh:
setting_repository_log_display_limit: 在文件变更记录页面上显示的最大修订版本数量 setting_repository_log_display_limit: 在文件变更记录页面上显示的最大修订版本数量
setting_openid: 允许使用OpenID登录和注册 setting_openid: 允许使用OpenID登录和注册
setting_password_min_length: 最短密码长度 setting_password_min_length: 最短密码长度
setting_password_error: 密码不一致 setting_password_min_length_limit: "密码长度至少大于 %{count} 个字符。"
setting_password_error: 密码长度不够或密码不一致
setting_password_success: 密码设置成功 setting_password_success: 密码设置成功
setting_new_project_user_role_id: 非管理员用户新建项目时将被赋予的(在该项目中的)角色 setting_new_project_user_role_id: 非管理员用户新建项目时将被赋予的(在该项目中的)角色
setting_default_projects_modules: 新建项目默认启用的模块 setting_default_projects_modules: 新建项目默认启用的模块
@ -1598,7 +1599,7 @@ zh:
label_tags_user_mail: 用户邮箱: label_tags_user_mail: 用户邮箱:
label_tags_user_name: 用户名: label_tags_user_name: 用户名:
label_tags_numbers: Tag统计 label_tags_numbers: Tag统计
label_max_number: 登录名是在网站中显示的您的公开标识,只能为英文 label_max_number: 登录名是在网站中显示的您的公开标识,只能为英文和数字
label_mail_attention: qq邮箱可能收不到此邮件其他邮箱如果没有收到可能在垃圾邮件中 label_mail_attention: qq邮箱可能收不到此邮件其他邮箱如果没有收到可能在垃圾邮件中
label_mail_attention1: 其中gmail与教育网邮箱的激活邮件有时比较慢请耐心等待。 label_mail_attention1: 其中gmail与教育网邮箱的激活邮件有时比较慢请耐心等待。
label_your_course: 您的课程《 label_your_course: 您的课程《

Loading…
Cancel
Save