dev_repository_hjq
sw 11 years ago
commit 73d2e2e5e2

@ -82,6 +82,7 @@ module Mobile
desc "用户搜索"
params do
requires :name, type: String, desc: '用户名关键字'
requires :search_by, type: String,desc: '搜索依据0 昵称1 用户名2 邮箱'
end
get 'search/search_user' do
us = UsersService.new

@ -314,28 +314,28 @@ module WelcomeHelper
str = ' '.html_safe
case event.event_type
when 'news'
str << content_tag("span", l(:field_user_active_published)) <<
str << content_tag("span", l('user.active.published')) <<
content_tag("span", find_all_event_type(event)) <<
':&nbsp;'.html_safe <<
link_to(strip_tags(event.event_description).gsub(/&nbsp;/,''), event.event_url, {:title => event.event_description})
when 'issue', 'message' , 'bid' , 'wiki-page' , 'document'
str << content_tag("span", l(:field_user_active_published)) <<
str << content_tag("span", l('user.active.published')) <<
content_tag("span", find_all_event_type(event)) <<
':&nbsp;'.html_safe <<
link_to(event.event_title, event.event_url, {:title => event.event_title})
when 'reply' ,'Reply', 'Memo'
str << content_tag("span", l(:field_user_active_published)) <<
str << content_tag("span", l('user.active.published')) <<
content_tag("span", find_all_event_type(event)) <<
':&nbsp;'.html_safe <<
link_to(strip_tags(event.event_description).gsub(/&nbsp;/,''), event.event_url, {:title => event.event_description})
when 'attachment'
str << content_tag('span', l(:field_user_active_uploaded)) <<
str << content_tag('span', l('user.active.uploaded')) <<
content_tag('span', find_all_event_type(event)) <<
':&nbsp;'.html_safe <<
link_to(event.event_title, event.event_url, {:title => event.event_title}) <<
link_to(('&nbsp;['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container.project), :class => "attachments_list_color")
else
str << content_tag("span", l(:field_user_active_updated)) <<
str << content_tag("span", l('user.active.updated')) <<
content_tag("span", find_all_event_type(event)) <<
':&nbsp;'.html_safe << link_to(event.event_title, event.event_url, {:title => event.event_title})
end

@ -68,7 +68,7 @@
</tr>
<tr>
<td>
<%=link_to "主页", home_path %> >
<%=link_to l(:field_homepage), home_path %> >
<span>
<%=link_to @user.name, user_path %>
</span>
@ -343,7 +343,7 @@
<% if @user.user_extensions.identity == 2 %>
<%= render_menu :user_enterprise_menu %>
<% else %>
<%= render_menu :user_menu,@user %>
<%= render_menu :user_menu, @user %>
<% end %>
</div>

@ -151,9 +151,9 @@
<!-- modified by fq -->
<% if !User.current.user_extensions.nil? && !User.current.user_extensions.student_id.nil? %>
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => "请输入学号" %>
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => l(:label_account_identity_studentID) %>
<% else %>
<%= text_field_tag :no, nil, :placeholder => "请输入学号" %></span>
<%= text_field_tag :no, nil, :placeholder => l(:label_account_identity_studentID) %></span>
<% end %>
<!-- end -->
@ -217,18 +217,18 @@
<label for="occupation_name"><%= l(:field_occupation) %></label>
<span class="required">&nbsp;</span>
<% if User.current.user_extensions.nil? %>
<input id="province" name="province" style="display: none" type="text" value="请单击选择省份及学校" readonly>
<input id="province" name="province" style="display: none" type="text" value=<%= l(:field_occupation_click) %> readonly>
<input id="occupation" name="occupation" style="display: none" type="text" value="" />
<input id="occupation_name" type="text" style="display: none" readonly/>
<% else %>
<% if User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
<input id="province" name="province" style="display: none" type="text" value="请单击选择省份及学校" readonly>
<input id="province" name="province" style="display: none" type="text" value=<%= l(:field_occupation_click) %> readonly>
<input id="occupation" name="occupation" style="display: none" type="text" value="<%= @user.user_extensions.occupation %>" />
<input id="occupation_name" type="text" style="display: none" readonly/>
<% elsif User.current.user_extensions.school.nil? %>
<input id="province" name="province" style="display: none" type="text" value="请单击选择省份及学校" readonly>
<input id="province" name="province" style="display: none" type="text" value=<%= l(:field_occupation_click) %> readonly>
<input id="occupation" name="occupation" style="display: none" type="text" />
<input id="occupation_name" type="text" style="display: none" readonly/>
<% else %>

@ -1,7 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>快速进入项目通道</title>
<title><%= l('project.join.title')%></title>
<style>
#popbox{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
#popbox div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
@ -47,8 +47,8 @@
<div id="popbox">
<div class="C" >
<div class="C_top">
<h2>快速进入项目通道</h2>
<p>只要持有项目的ID就可快速申请加入所在项目。项目页面搜索不到的私有项目只能从此通道进入哦</p>
<h2><%= l('project.join.title')%></h2>
<p><%= l('project.join.description')%></p>
</div>
<div class="C_form">
<%= form_tag({:controller => 'applied_project',
@ -58,13 +58,13 @@
:id => 'new-watcher-form') do %>
<ul>
<li style="padding-top: 15px;">
<span class="tips">项&nbsp;目&nbsp;ID</span>
<span class="tips"><%= l('project.join.id.label')%></span>
<input type="hidden" name="project_join" value="1">
<input type="hidden" name="user_id" value="<%= User.current.id%>">
<input class=" width190" name="project_id" id="project_id" type="text" value="" >
<input type="text" style="display: none"/>
</li>
<li class="mB5">项目ID是所在项目网址中显示的序号</li>
<li class="mB5"><%= l('project.join.id.tips')%></li>
<li>
<a href="#" class="btn" style="margin-left: 50px;" onclick="submit_form(this);">
<%= l(:label_apply_project) %>

@ -15,12 +15,12 @@
</span>
</div>
<strong><%= l(:field_description) %></strong>:&nbsp;&nbsp;<%= file.description %>
<div class="c9 gray-color"> 所属分类:<%=result_come_from file%> </div>
<div class="c9 gray-color"> <%= l('attachment.category')%><%=result_come_from file%> </div>
<span class="gray blue-color">
下载:<%= file.downloads%>|
大小:<%= number_to_human_size(file.filesize) %>|
共享者:<a class="gray" ><%= link_to file.author, user_path(file.author), target: "_blank" unless file.author.blank? %></a>|
上传时间:<%= format_time(file.created_on) %>
<%= l('attachment.download_num')%><%= file.downloads%>|
<%= l('attachment.size')%><%= number_to_human_size(file.filesize) %>|
<%= l('attachment.sharer')%><a class="gray" ><%= link_to file.author, user_path(file.author), target: "_blank" unless file.author.blank? %></a>|
<%= l('attachment.upload_time')%><%= format_time(file.created_on) %>
</span>
<div style="display: none"></div>
</td>

@ -3,7 +3,7 @@
<hr />
<% contests_results.each do |contest| %>
<p class="font_description2">
<strong><%= l(:label_tags_contest) %>:<%= link_to "#{contest.name}",
<strong><%= l(:label_tags_contest_name) %>:<%= link_to "#{contest.name}",
:controller => "contests",:action => "show_contest",:id => contest.id %></strong>
<br />
<strong><%= l(:label_tags_contest_description) %>:</strong><%= textilizable contest.description %>

@ -3,7 +3,7 @@
<hr />
<% courses_results.each do |course| %>
<p class="font_description2">
<strong><%= l(:label_course) %>:<%= link_to "#{course.name}",course_path(course) %></strong>
<strong><%= l(:label_tags_course_name) %>:<%= link_to "#{course.name}",course_path(course) %></strong>
<br />
<strong><%= l(:label_new_course_description) %>:</strong><%= textilizable course.description %>
<%= course.updated_at %>

@ -1,4 +1,4 @@
<%= link_to '+ 添加标签', 'javascript:void(0);',
<%= link_to l(:label_add_tag), 'javascript:void(0);',
:class => "yellowBtn f_l",
:onclick=>"$('#add_tag_#{obj.id}').slideToggle();" if User.current.logged? %> <!-- $('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this); -->

@ -23,7 +23,7 @@
<%= l(:label_user_plural) %>(<%= @users_tags_num %>) |
<%= l(:label_tags_call)%>(<%= @bids_tags_num %>) |
<%= l(:field_filename)%>(<%= @attachments_tags_num %>) |
开源项目(<%= @open_source_projects_num %>) |
<%= l(:label_tags_opensource)%>(<%= @open_source_projects_num %>) |
<%= l(:label_tags_contest)%>(<%= @contests_tags_num %>) |
</div>
<div id="show_results">

@ -1,5 +1,5 @@
<% content_for :content do %>
<h3 style="color: red;">总标签数:<%= @tags.size %>个</h3>
<h3 style="color: red;"><%= l(:label_tags_count) %><%= @tags.size %>个</h3>
<hr />
<% i = 0 %>
<div id="show_all_tags">

@ -16,8 +16,8 @@
<div class="menu">
<%= link_to "#{l(:label_course_new)}", new_course_path, class: 'icon icon-add' if @user == User.current %>
<ul>
<li mode='doing' class="on">进行中</li>
<li mode='end'>已完结</li>
<li mode='doing' class="on"><%= l('user.courses.doing')%></li>
<li mode='end'><%= l('user.courses.done')%></li>
</ul>
</div>

@ -2,7 +2,7 @@
<div class="menu-div">
<div class="menu">
<span style="color: #000; font-weight: bold;">
<%= "#{@user.name}的动态" %>
<%= l(:label_user_activity, :name => @user.name) %>
</span>
<ul><%#链接绑定在页面最下方的jQuery%>
<li mode='all' class="<%= "on" if @state.eql?(0) %>">

@ -1,8 +1,8 @@
<%
select_option = []
(select_option << [l(:label_select_project), 'projects']) if project_type == Project::ProjectType_project
(select_option << [l(:label_select_course), 'courses']) if project_type == Project::ProjectType_course
select_option << [l(:label_select_user), 'users']
(select_option << [l('welcome.search.select.project'), 'projects']) if project_type == Project::ProjectType_project
(select_option << [l('welcome.search.select.course'), 'courses']) if project_type == Project::ProjectType_course
select_option << [l('welcome.search.select.user'), 'users']
#select_option << ['教师', 'users_teacher'],
#select_option << ['学生', 'users_student']
%>
@ -49,7 +49,7 @@ form #search_type{
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<div class="project-search" style="float: right">
<div class='search_widget'>
<%= text_field_tag :q, nil, :placeholder => l(:label_search_information), :size => 27, style: "float:left" %>
<%= text_field_tag :q, nil, :placeholder => l('welcome.search.information'), :size => 27, style: "float:left" %>
<%= select_tag(:search_type, options_for_select(select_option), :style => "float:right" ) %>
</div>
<%#= hidden_field_tag 'project_type', project_type %>

@ -1,8 +1,8 @@
<%
select_option = []
(select_option << [l(:label_select_project), 'projects']) if project_type == Project::ProjectType_project
(select_option << [l(:label_select_course), 'courses']) if project_type == Project::ProjectType_course
select_option << [l(:label_select_user), 'users']
(select_option << [l('welcome.search.select.project'), 'projects']) if project_type == Project::ProjectType_project
(select_option << [l('welcome.search.select.course'), 'courses']) if project_type == Project::ProjectType_course
select_option << [l('welcome.search.select.user'), 'users']
%>
<style type="text/css">
form #q, form #search_type{
@ -90,10 +90,10 @@ form #search_by
<div class="project-search" style="float: right">
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil,:style =>"float: right; margin-left:3px;margin-top:2px" %>
<div class='search_widget' >
<%= text_field_tag :q, nil, :placeholder => l(:label_search_information), style:"float:left;" %>
<%= text_field_tag :q, nil, :placeholder => l('welcome.search.information'), style:"float:left;" %>
<input type="text" name="search_by_input" style="display: none" id="search_by_input" value="0">
<%= select_tag(:search_type, options_for_select(select_option), :onchange => "searchTypeChange();", :style => "float:right" ) %>
<%= select_tag(:search_by,options_for_select([[l(:label_select_user_nickname),"0"],[l(:label_select_user_showname),"1"],[l(:label_select_user_email),"2"]]), :onchange => "searchByChange();",:style => "float:right" ) %>
<%= select_tag(:search_by,options_for_select([[l('welcome.search.select.userinfo.nickname'),"0"],[l('welcome.search.select.userinfo.showname'),"1"],[l('welcome.search.select.userinfo.email'),"2"]]), :onchange => "searchByChange();",:style => "float:right" ) %>
</div>
<%#= hidden_field_tag 'project_type', project_type %>
</div>

@ -140,7 +140,7 @@
<!--搜索框-->
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<%= text_field_tag 'name', params[:name], :placeholder => l(:label_search_information), name: "name", :class => 'blueinputbar', :style => 'width:240px; padding-right:50px;'%>
<%= text_field_tag 'name', params[:name], :placeholder => l('welcome.search.information'), name: "name", :class => 'blueinputbar', :style => 'width:240px; padding-right:50px;'%>
&nbsp;
<%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %>

@ -0,0 +1,90 @@
en:
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
direction: ltr
#
# Trustie账户模块
#
# 公共变量
#
label_max_number: "Trustie username is your public identity displayed on Trustie website, only for letters and numbers."
field_login: Account/Email
field_password: Password
text_caracters_minimum: "Must be at least %{count} characters long."
field_password_confirmation: Confirmation
field_new_password: New password
notice_account_wrong_password: Wrong password
notice_account_password_updated: "Password was successfully updated."
notice_can_t_change_password: "This account uses an external authentication source. Impossible to change the password."
field_mail: Email
field_identity_url: OpenID URL
button_submit: Submit
#
# Trustie账户模块
#
# 登陆
#
lable_user_name: Username
label_login_prompt: Email/Trustie account
label_stay_logged_in: "Keep me signed in"
label_password_lost: "Forget password"
button_login: Login
# account_controller中判断用户名或密码输入有误的提示信息
notice_account_invalid_creditentials: "Invalid user or password."
# account_controller中判断未激活的提示信息
notice_account_invalid_creditentials_new: "Please check your email to activate your account."
#
# Trustie账户模块
#
# 注册
#
label_register: Sign up
label_login_with_open_id_option: or login with OpenID
label_mail_attention: "QQ-mail may not receive this e-mail, if other mailboxes not received, probably in spam."
label_mail_attention1: "Activation email sent for Gmail and Edu-mail which sometimes slower, please be patient."
# register中js判断密码设置是否合法提示信息
setting_password_min_length_limit: "Password length greater than at least %{count} characters."
setting_password_error: "Password length inadequate or password inconsistent."
setting_password_success: "Password set successfully."
# account_controller中register方法判断注册成功的提示信息
notice_account_register_done: "Successful account creation, please use the link in the registration confirmation email to activate your account, if our messages are not in your inbox, it could in the spam box, please check it carefully."
#
# Trustie账户模块
#
# 忘记密码
#
label_password_forget: Forget password
notice_account_unknown_email: Unknown user
# account_controller中lost_password方法判断的邮件发送提示信息
notice_account_lost_email_sent: "An email with a temporary login link will be sent to that email address, which you can use to login and configure a new password."
#
# Trustie账户模块
#
# 登出
#
label_logout: Logout
#
# Trustie账户模块
#
# 激活
#
label_regiter_account: Registering for an account
label_email_valid: E-mail activation
notice_email_register_time: "Please click on the link in the email to continue to complete the registration within 24 hours"
notice_email_arrival: "An activation email has been sent to the email address you register."
label_check_email: "Now check your email"
label_mail_resend: "Resend the activation email"
notice_account_activated: "Your Trustie account has been activated. You can now sign in."

@ -0,0 +1,92 @@
# Chinese (China) translations for Ruby on Rails
# by tsechingho (http://github.com/tsechingho)
zh:
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
direction: ltr
#
# Trustie账户模块
#
# 公共变量
#
label_max_number: "登录名是在网站中显示的您的公开标识,只能为英文和数字。"
field_login: 登录名
field_password: 密码
text_caracters_minimum: "至少需要 %{count} 个字符。"
field_password_confirmation: 密码确认
field_new_password: 新密码
notice_account_wrong_password: 密码错误
notice_account_password_updated: 密码更新成功
notice_can_t_change_password: 该帐号使用了外部认证,因此无法更改密码。
field_mail: 邮件地址
field_identity_url: OpenID URL
button_submit: 提交
#
# Trustie账户模块
#
# 登陆
#
lable_user_name: 登录名
label_login_prompt: 邮箱/登录名
label_stay_logged_in: "保持登录状态"
label_password_lost: "忘记密码?"
button_login: 登录
# account_controller中判断用户名或密码输入有误的提示信息
notice_account_invalid_creditentials: "无效的用户名或密码"
# account_controller中判断未激活的提示信息
notice_account_invalid_creditentials_new: "您还未到邮箱激活"
#
# Trustie账户模块
#
# 注册
#
label_register: 注册
label_login_with_open_id_option: 或使用OpenID登录
label_mail_attention: "qq邮箱可能收不到此邮件其他邮箱如果没有收到可能在垃圾邮件中"
label_mail_attention1: "其中gmail与教育网邮箱的激活邮件有时比较慢请耐心等待。"
# register中js判断密码设置是否合法提示信息
setting_password_min_length_limit: "密码长度至少大于 %{count} 个字符。"
setting_password_error: "密码长度不够或密码不一致"
setting_password_success: "密码设置成功"
# account_controller中register方法判断注册成功的提示信息
notice_account_register_done: "帐号创建成功,请使用注册确认邮件中的链接来激活您的帐号,如果您的邮件没有在收件箱中可能在垃圾箱中,请您注意查收。"
#
# Trustie账户模块
#
# 忘记密码
#
label_password_forget: 忘记密码
notice_account_unknown_email: 未知用户
# account_controller中lost_password方法判断的邮件发送提示信息
notice_account_lost_email_sent: 系统已将引导您设置新密码的邮件发送给您。
#
# Trustie账户模块
#
# 登出
#
label_logout: 退出
#
# Trustie账户模块
#
# 激活
#
label_regiter_account: 注册帐号
label_email_valid: 邮箱激活
notice_email_register_time: 请在24小时内点击邮件中的链接继续完成注册
notice_email_arrival: 邮件已发送到邮箱
label_check_email: 立即查收邮件
label_mail_resend: 重新发送激活邮件
notice_account_activated: 您的帐号已被激活。

@ -0,0 +1,13 @@
en:
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
direction: ltr
#
# Trustie管理员模块
#
# 管理员设置账号激活通知方式
#
label_registration_activation_by_email: account activation by email
label_registration_manual_activation: manual account activation
label_registration_automatic_activation: automatic account activation

@ -0,0 +1,16 @@
# Chinese (China) translations for Ruby on Rails
# by tsechingho (http://github.com/tsechingho)
zh:
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
direction: ltr
#
# Trustie管理员模块
#
# 管理员设置账号激活通知方式
#
label_registration_activation_by_email: 通过邮件认证激活帐号
label_registration_manual_activation: 手动激活帐号
label_registration_automatic_activation: 自动激活帐号

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
en:
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
direction: ltr

@ -0,0 +1,22 @@
# Chinese (China) translations for Ruby on Rails
# by tsechingho (http://github.com/tsechingho)
zh:
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
direction: ltr
#
# Trustie按钮类
#
# 底部承办单位等信息
#
label_hosted_organization: 主办单位
label_hosted_by: 国防科学技术大学并行与分布处理国家重点实验室
label_sponsor: 计算机科学与技术系
label_co_organizer_NUDT: 国防科学技术大学计算机学院
label_co_organizer_EECS: 北京大学信息科学技术学院软件研究所
label_co_organizer_BHU: 北京航空航天大学计算机学院
label_co_organizer_CAS: 中国科学院软件研究所
label_co_organizer_InforS: 山东中创软件商用中间件股份有限公司
label_rights_reserved: 版权©2007~2014
label_contact_us: 联系我们
label_license: 湘ICP备09019772

@ -0,0 +1,4 @@
en:
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
direction: ltr

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save