This commit is contained in:
dingxu 2015-03-19 17:24:14 +08:00
commit f4dff55377
22 changed files with 122 additions and 108 deletions

View File

@ -33,39 +33,41 @@ class UserExtensions < ActiveRecord::Base
return self.brief_introduction
end
# added by meng
def show_identity
if self.identity == 0
if User.current.language == 'zh'
user_identity = '教师'
else
user_identity = 'Teacher'
end
elsif self.identity == 1
if User.current.language == 'zh'
user_identity = '学生'
else
user_identity = 'Student'
end
elsif self.identity == 2
if User.current.language == 'zh'
user_identity = '企业'
else
user_identity = 'Enterprise'
end
elsif self.identity == 3
if User.current.language == 'zh'
user_identity = '开发者'
else
user_identity = 'Developer'
end
if User.current.language == 'zh'||User.current.language == ''
case self.identity
when 0
user_identity = l(:label_account_identity_teacher)
when 1
user_identity = l(:label_account_identity_student)
when 2
user_identity = l(:label_account_identity_enterprise)
when 3
user_identity = l(:label_account_identity_developer)
else
user_identity = ''
end
else
case self.identity
when 0
user_identity = l(:label_account_identity_teacher)
when 1
user_identity = l(:label_account_identity_student)
when 2
user_identity = l(:label_account_identity_enterprise)
when 3
user_identity = l(:label_account_identity_developer)
else
user_identity = ''
end
end
return user_identity
end
# end
def self.introduction(user, message)
unless user.user_extensions.nil?
info = user.user_extensions

View File

@ -49,7 +49,7 @@
<span class="add_attachment" style="font-weight:normal;">
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()' %>
<%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()' %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => 'file_selector',

View File

@ -38,7 +38,7 @@
<span class="add_attachment">
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %>
<%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()" %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => 'file_selector',

View File

@ -1,7 +1,7 @@
$('#attachments_<%= j params[:attachment_id] %>').remove();
var count=$('#attachments_fields>span').length;
if(count<=0){
$("#upload_file_count").text("未上传文件");
$("#upload_file_count").text(<%= l(:label_no_file_uploaded)%>);
$(".remove_all").remove();
}else{
$("#upload_file_count").html("已上传"+"<span id=\"count\">"+count+"</span>"+"个文件");

View File

@ -8,10 +8,10 @@
<table>
<tr>
<% if versions.any? %>
<td><p><%= l(:field_version) %></p></td>
<td><p style="padding-left: 50px;"><%= l(:field_version) %></p></td>
<td>
<%= select_tag "version_id", content_tag('option', '') +
options_from_collection_for_select(versions, "id", "name"), {style: 'width:100px'} %>
options_from_collection_for_select(versions, "id", "name"), {style: 'width:230px'} %>
</td>
<% if attachmenttypes.any? %>
<td><%= l(:attachment_type) %></label></td>
@ -31,14 +31,10 @@
<% end %>
</p>
<% end %>
</tr>
</table>
<p style="padding-left: 54px;"> <%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', locals: {project: project} %></p>
</p>
<p><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', locals: {project: project} %></p>
</div>
<%= submit_tag l(:button_add) %>
<% end %>

View File

@ -194,7 +194,7 @@
</strong>
<% if show_more_fans?(@bid) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;">
<%= link_to l(:label_more), :controller => 'bids', :action => 'show_bid_user'%>
<%= link_to l(:button_more), :controller => 'bids', :action => 'show_bid_user'%>
</span>
<% end %>
</div>
@ -217,7 +217,7 @@
</strong>
<% if show_more_bid_project?(@bid) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;">
<%= link_to l(:label_more), :controller => 'bids', :action => 'show_project'%>
<%= link_to l(:button_more), :controller => 'bids', :action => 'show_project'%>
</span>
<% end %>
</div>
@ -244,7 +244,7 @@
</strong>
<% if show_more_participate?(@bid) %>
<span style="font-size: 12px; display: inline; float: right;" >
<%= link_to l(:label_more), :controller => "bids", :action => "show_participator"%>
<%= link_to l(:button_more), :controller => "bids", :action => "show_participator"%>
</span>
<% end %>
</div>

View File

@ -215,7 +215,7 @@
<%= l(:label_x_followers, :count => @contest.watcher_users.count) %>
</strong>
<% if show_more_fans?(@contest) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), show_contest_user_contest_path(@contest) %></span>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:button_more), show_contest_user_contest_path(@contest) %></span>
<% end %>
</div>
<div class="left_wf">

View File

@ -170,7 +170,7 @@
<% end%>
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
<div class="subNav">
<%= link_to l(:label_course_file), project_files_path(@project), :style => "color:#3CA5C6" %>
<%= link_to l(:project_module_files), project_files_path(@project), :style => "color:#3CA5C6" %>
<% unless attaments_num == 0 %>
<span class="subnav_num">(<%= attaments_num %>)</span>
<% end %>
@ -189,7 +189,7 @@
</div>
<% end %>
<div class="subNav subNav_jiantou"><%= l(:label_more) %></div>
<div class="subNav subNav_jiantou"><%= l(:label_project_more) %></div>
<ul class="navContent" style="padding-left: 0px">
<%= render 'projects/tools_expand' %>
</ul>

View File

@ -258,10 +258,10 @@
<% else %>
<tr>
<td style=" float: right" width="70px" >
<%= l(:label_identity)%>
<span style="float: right"><%= l(:label_identity)%></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= l(:label_account_student) %>
<%= l(:label_account_identity_student) %>
</td>
</tr>
@ -269,10 +269,10 @@
<% elsif @user.user_extensions.identity == 3 %>
<tr>
<td style=" float: right" width="70px" >
<%= l(:label_identity)%>
<span style="float: right"><%= l(:label_identity)%></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= l(:label_account_developer) %>
<%= l(:label_account_identity_developer) %>
</td>
</tr>
<% end %>
@ -295,7 +295,7 @@
</strong>
<% if show_more_watchers?(@user) %>
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" >
<%= link_to l(:label_more), :controller => "users", :action => "user_watchlist"%>
<%= link_to l(:button_more), :controller => "users", :action => "user_watchlist"%>
</div>
<% end %>
</div>
@ -319,7 +319,7 @@
</strong>
<% if show_more_fans?(@user) %>
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" >
<%= link_to l(:label_more), :controller => "users", :action => "user_fanslist"%>
<%= link_to l(:button_more), :controller => "users", :action => "user_fanslist"%>
</div>
<% end %>
</div>

View File

@ -3,7 +3,7 @@
<div class="well">
<% next if member.new_record? %>
<% unless member.created_on.nil? %>
<%= content_tag "p", (User.current.language == ""|| User.current.language == "zh")?("#{format_date(member.created_on)}"+" "+"#{l(:label_member_since)}"):("#{l(:label_member_since)}+" "+#{format_date(member.created_on)}"), :class => "float_right member_since" %>
<%= content_tag "p", (User.current.language == ""|| User.current.language == "zh")?("#{format_date(member.created_on)}"+" "+"#{l(:label_member_since)}"):("#{l(:label_member_since)}"+" "+"#{format_date(member.created_on)}"), :class => "float_right member_since" %>
<% end %>
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :class => 'avatar')) %>
<%= content_tag "div", link_to(member.user.name, user_path(member.user)), :class => "nomargin avatar_name" %>

View File

@ -42,7 +42,7 @@
</li>
<li>
<% unless @project.enabled_modules.where("name = 'dts'").empty? %>
<%= link_to l(:label_module_share) ,share_show_path(@project) %>
<%= link_to l(:project_module_dts) ,share_show_path(@project) %>
<% end %>
</li>

View File

@ -17,7 +17,7 @@
<tr>
<td colspan="2" width="580px" ><p class="font_description">
<% unless user.memberships.empty? %>
<%= l(:label_contribute_to, :project_count => "#{user.memberships.count}") %>
<%= l(:label_contribute_to, :count => user.memberships.count) %>
<% for member in user.memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>

View File

@ -10,7 +10,7 @@
</span>
<% end %>
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
(<%= link_to l(:label_project_member_amount, :count=>projectCount(project)), project_member_path(project) ,:course =>'0' %>)
(<%= link_to l(:label_project_member_amount, :count => projectCount(project)), project_member_path(project) ,:course =>'0' %>)
</div>
<div style=" float: left;margin:5px; margin-left: 10px; width: 380px;min-height: 42px;">
<span class='font_lighter' title ='<%= project.short_description%>'> <%=project.description.truncate(90, omission: '...')%> </span>

View File

@ -115,7 +115,7 @@
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
<h3 style="color: rgb(21, 188, 207);"><strong> <%= l(:lable_bar_active)%> </strong> <%= link_to l(:label_my_question) , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
<%= link_to l(:label_my_feedback) , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> </h3>
<span style="margin-top: -30px;float: right; display: block;"> <%= link_to l(:label_more), forums_path %> </span>
<span style="margin-top: -30px;float: right; display: block;"> <%= link_to l(:button_more), forums_path %> </span>
</div>
<div class="welcome-box-list-new memo_activity">
<% topics = find_new_forum_topics(12) %>

View File

@ -163,7 +163,6 @@ en:
label_requirement: Calls
label_forum: Forum
label_contest: Contest
label_attachment_plural: Files
@ -203,12 +202,12 @@ en:
button_cancel: Cancel
label_submit: Submit
button_project_tags_add: Add
label_more: "More>>"
button_download: Download
button_more: "More»"
button_delete: Delete
button_unfollow: Unfollow
button_follow: Follow
button_browse: Browse
#

View File

@ -173,7 +173,7 @@ zh:
label_requirement: 需求
label_forum: 公共贴吧
label_contest: 竞赛
label_attachment_plural: 文件
field_description: 描述
@ -207,14 +207,16 @@ zh:
button_cancel: 取消
label_submit: 提交
button_project_tags_add: 增加
label_more: "更多>>"
button_download: 下载
button_more: 更多
button_more: "更多»"
button_delete: 删除
button_unfollow: 取消关注
button_follow: 关注
button_watch: 跟踪
button_unwatch: 取消跟踪
button_browse: 浏览
#
# Trustie上传头像模块
#

View File

@ -107,7 +107,6 @@ en:
field_last_login_on: Last connection
field_effective_date: Date
field_version: Version
field_type: Type
field_host: Host
field_port: Port
@ -479,7 +478,6 @@ en:
label_change_status: Change status
label_history: History
label_attachment: Files
label_attachment_new: New file
label_attachment_delete: Delete file
label_file_added: File added
@ -611,12 +609,10 @@ en:
label_latest_revision_plural: Latest revisions
label_view_revisions: View revisions
label_view_all_revisions: View all revisions
label_max_size: Maximum size
label_sort_highest: Move to top
label_sort_higher: Move up
label_sort_lower: Move down
label_sort_lowest: Move to bottom
label_roadmap: Roadmap
label_roadmap_due_in: "Due in %{value}"
label_roadmap_overdue: "%{value} late"
label_roadmap_no_issues: No issues for this version
@ -721,7 +717,6 @@ en:
label_plugins: Plugins
label_ldap_authentication: LDAP authentication
label_downloads_abbr: D/L
label_optional_description: Optional description
label_add_another_file: Add another file
label_preferences: Preferences
label_chronological_order: In chronological order
@ -1028,7 +1023,7 @@ en:
label_leave_message: Message content
label_message: message board
field_add: Add before %{time}
button_more: More
label_bidding_project: projects
button_bidding: I will participate in it

View File

@ -19,7 +19,9 @@ en:
#
lable_hot_projects: Hot Projects
label_private: private
label_project_member_amount: "%{count} members"
label_project_member_amount:
one: "%{count} member"
other: "%{count} members"
label_project_score_tips: "Considering all activities of the project, project's score reflects the activity level of project"
label_project_score: Score
@ -37,7 +39,7 @@ en:
label_unapply_project: Cancel the application
label_member: Members
project_module_attachments: Files
project_module_attachments: Resources
label_invite: Invitation
label_invite_new_user: "Send e-mail to invite new user"
@ -48,19 +50,20 @@ en:
project_module_boards: Forums
project_module_boards_post: New Post
# 与课程公用资源库
project_module_files: Resources
project_module_repository: Repository
project_module_create_repository: New Repository
label_project_more: More
project_module_news: News
project_module_wiki: Wiki
project_module_code_review: Code Review
project_module_calendar: Calendar
project_module_gantt: Gantt
project_module_documents: Documents
label_project_tool_response: Response
label_module_share: DTS Test Tool
label_roadmap: Roadmap
label_project_tool_response: Feedback
project_module_dts: DTS Test Tool
label_project_overview: "Profile:"
label_expend_information: More Information
@ -87,7 +90,9 @@ en:
# 关注者列表
#
label_followers: Followers
label_contribute_to: "Participates %{project_count} projects—"
label_contribute_to:
one: "Participates %{count} project—"
other: "Participates %{count} projects—"
#
@ -95,9 +100,9 @@ en:
#
# 资源库
#
lable_file_sharingarea: Files
lable_file_sharingarea: Resources
label_upload_files: Upload
label_upload_files: New file
# 资源库(附件)公用
@ -108,18 +113,26 @@ en:
attachment_all: "All"
attachment_browse: "Attachment Content Browse"
attachment_sufix_browse: "Attachment Type Browse"
attachment_type: "Attachment Type"
label_unknow_type: Unknow type
field_filename: File
field_filesize: Size
field_filecontenttype: Content Typ
field_filecontenttype: Content
field_filetype: File Typ
field_downloads: Downloads
field_file_dense: Dense
# 资源库(附件)公用 > 上传文件
label_attachment_new: New file
field_version: Version
attachment_type: "Attachment Type"
label_attachment_plural: Files
label_no_file_uploaded: No file uploaded
label_max_size: Maximum size
label_optional_description: Description
label_file_count: "%{count} files were uploaded successfully"
#
# 项目托管平台
@ -164,7 +177,6 @@ en:
project_module_issue_tracking: Issue tracking
project_module_time_tracking: Time tracking
project_module_course: 课程
project_module_files: Files
project_module_boards: Forums
#

View File

@ -22,7 +22,9 @@ zh:
#
lable_hot_projects: 热门项目
label_private: 私有
label_project_member_amount: "%{count}人"
label_project_member_amount:
one: "%{count}人"
other: "%{count}人"
label_project_score_tips: 项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度
label_project_score: 项目评分
@ -50,18 +52,20 @@ zh:
project_module_boards: 讨论区
project_module_boards_post: 发帖
# 与课程公用资源库
project_module_files: 资源库
project_module_repository: 版本库
project_module_create_repository: 创建版本库
label_project_more: 更多
project_module_news: 新闻
project_module_wiki: Wiki
project_module_code_review: 代码审查
project_module_calendar: 日历
project_module_gantt: 甘特图
project_module_documents: 文档
label_roadmap: 里程碑 #版本路线图
project_module_dts: DTS测试工具
label_project_tool_response: 用户反馈
label_module_share: DTS测试工具
label_project_overview: "项目简介:"
label_expend_information: 展开更多信息
@ -88,7 +92,9 @@ zh:
# 关注者列表
#
label_followers: 关注
label_contribute_to: 参与了 %{project_count} 个项目:
label_contribute_to:
one: "参与了 %{count}个项目:"
other: "参与了 %{count}个项目:"
#
@ -101,7 +107,7 @@ zh:
label_upload_files: 上传文件
# 资源库(附件)公用
# 资源库(附件)公用 > 关联资源
label_relation_files: 关联已有资源
label_search_by_keyword: "按关键字搜索:"
label_files_filter: "资源过滤:"
@ -116,9 +122,20 @@ zh:
attachment_sufix_browse: "文件类型"
attachment_browse: "内容类型"
attachment_all: "全部"
attachment_type: "分类"
label_unknow_type: 未知类型
# 资源库(附件)公用 > 上传文件
label_attachment_new: 新建文件
field_version: 版本
attachment_type: "分类"
label_attachment_plural: 文件
label_no_file_uploaded: 未上传文件
label_max_size: 最大文件大小
label_optional_description: 可选的描述
#
# 项目托管平台
#
@ -166,7 +183,6 @@ zh:
project_moule_boards_show: 项目论坛
project_module_time_tracking: 时间跟踪
project_module_course: 课程
project_module_files: 资源库
#

View File

@ -77,8 +77,6 @@ en:
label_technical_title: Title
label_bidding_user_studentcode: Student ID
label_account_developer: Developer
label_account_student: Student
#
@ -112,7 +110,7 @@ en:
label_layouts_feedback: "a message "
label_of_feedback: from
label_goto: Go to>>
label_goto: "Go to»"
label_activity_project: "Project"
label_active_call: call
@ -180,12 +178,12 @@ en:
#
label_responses: Messages
label_user_response: Feedback
label_leave_a_message: Leave him/her a message
label_leave_a_message: "Leave him/her a message"
button_leave_meassge: Submit
button_clear_meassge: Reset
label_user_login_new: Login
label_user_login_tips: You haven't logged in, please login first to leave a message!
label_user_login_tips: "You haven't logged in, please login first to leave a message!"
label_bid_respond_delete: Delete
label_bid_respond_quote: Respond

View File

@ -36,6 +36,7 @@ zh:
label_user_edit: "修改资料"
label_user_score: 个人综合得分
# 用户身份在/my的修改资料下
label_user_score_of_collaboration: 协同得分
label_user_score_of_influence: 影响力得分
label_user_score_of_skill: 技术得分
@ -88,9 +89,8 @@ zh:
label_technicl_title_lecturer: 讲师
label_technicl_title_teaching_assistant: 助教
# 用户身份(学生、开发者)标签在/my的修改资料下
label_bidding_user_studentcode: 学号
label_account_developer: 开发者
label_account_student: 学生
label_no_current_fans: 该用户暂无粉丝
label_no_current_watchers: 该用户暂未关注其他用户
@ -115,7 +115,7 @@ zh:
label_of_feedback:
label_layouts_feedback: 留言
label_goto: 前往>>
label_goto: "前往»"
label_activity_project: "项目:"
label_active_call: 需求

View File

@ -135,7 +135,6 @@ zh:
field_time: 课时
field_class_period: 学时
field_code: 学分
field_is_public: 公开
field_open_student: 学生列表公开
field_parent: 上级项目
field_is_in_roadmap: 在路线图中显示
@ -144,7 +143,6 @@ zh:
field_last_login_on: 最后登录
field_language: 语言
field_effective_date: 日期
field_version: 版本
field_type: 类型
field_host: 主机
field_port: 端口
@ -465,8 +463,6 @@ zh:
label_new_contest: 竞赛
label_requirement_focus: 关注需求
label_developer: 用户
label_account_developer: 开发者
label_account_student: 学生
label_enterprise_into: 进入企业
label_college_into: 进入高校
label_investor: 投资人:
@ -561,7 +557,7 @@ zh:
label_change_status: 变更状态
label_history: 历史记录
label_attachment: 文件
label_attachment_new: 新建文件
label_file_upload: 上传资料
label_course_file_upload: 上传了课件
label_attachment_delete: 删除文件
@ -691,13 +687,11 @@ zh:
label_latest_revision_plural: 最近的修订版本
label_view_revisions: 查看修订
label_view_all_revisions: 查看所有修订
label_no_file_uploaded: 未上传文件
label_max_size: 最大文件大小
label_sort_highest: 置顶
label_sort_higher: 上移
label_sort_lower: 下移
label_sort_lowest: 置底
label_roadmap: 里程碑 #版本路线图
label_roadmap_due_in: "截止日期到 %{value}"
label_roadmap_overdue: "%{value} 延期"
label_roadmap_no_issues: 该版本没有问题
@ -846,7 +840,7 @@ zh:
label_plugins: 插件
label_ldap_authentication: LDAP 认证
label_downloads_abbr: D/L
label_optional_description: 可选的描述
label_add_another_file: 添加其它文件
label_preferences: 首选项
label_chronological_order: 按时间顺序
@ -1093,7 +1087,7 @@ zh:
description_all_columns: 所有列
button_export: 导出
label_export_options: "%{export_format} 导出选项"
error_attachment_too_big: 该文件无法上传。超过文件大小限制 (%{max_size})
error_pic_type: "仅支持如下图片格式:"
notice_failed_to_save_time_entries: "无法保存下列所选取的 %{total} 个项目中的 %{count} 工时: %{ids}。"
label_x_issues: