diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index ac2a5236b..2c4dbecfe 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -20,6 +20,9 @@ class TagsController < ApplicationController # $selected_tags = Array.new # $related_tags = Array.new NUMBERS = Setting.tags_show_search_results + + # 预设几个可以添加的tag + @preTags = %w|预设A 预设B 预设C 预设D 预设E 预设F | # 接收参数解释: # params[:q]这是在其他页面点击tag,跳转到该页面后的结果显示 ;params[:selected_tags],这是在过滤页面增删tag进行过滤传过来的参数 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7f8a8bd2b..fdb77098c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1477,16 +1477,7 @@ module ApplicationHelper user.watcher_users.count end #end - #author : nyan - def stringCut240(str) - (str.length > 240) ? (str[0,240]<<"......") : str - end - #author : xianbo - def objCut12(obj) - for obj1 in obj[0..11] - obj2 = obj1 - end - end + def hadcommittedhomework(cur,curb) @attaches=HomeworkAttach.find_by_sql("select * from homework_attaches where(bid_id = #{curb})") diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index b27a5289a..2d2934cc2 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -261,12 +261,12 @@ module ProjectsHelper def rolesToLanguage rolesArray rolesArray = ([] << rolesArray) unless rolesArray.is_a?(Array) rolesArray.map{ |roleName| - case roleName - when "Manager" + case roleName.to_sym + when :Manager l :default_role_manager - when "Developer" + when :Developer l :default_role_developer - when "Reporter" + when :Reporter l :default_role_reporter else 'Unkown' diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index a6dcc32c1..e2bad8e91 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -215,6 +215,7 @@ div.pagination{
+ <% @preTags = %w|预设A 预设B 预设C 预设D 预设E 预设Z | %> <%= render :partial => 'tags/tag', :locals => {:obj => file, :object_flag => "6"}%>
diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb index 3e81482ef..7044d69dd 100644 --- a/app/views/projects/new.html.erb +++ b/app/views/projects/new.html.erb @@ -3,14 +3,14 @@ <% if @course_tag == '1' %>

<%=l(:label_course_new)%>

-

<%=raw l(:label_course_news_description)%>

+

<%=raw l(:label_course_news_description)%>

<%= render :partial => 'course_form', :locals => { :f => f } %> <%= submit_tag l(:button_create), :class => "enterprise"%> <% else %>

<%=l(:label_project_new)%>

-

<%=l(:label_project_new_description)%>

+

<%=raw l(:label_project_new_description)%>

<%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_create), :class => "enterprise"%> diff --git a/app/views/tags/_tag.html.erb b/app/views/tags/_tag.html.erb index 7eb360d53..0d9467025 100644 --- a/app/views/tags/_tag.html.erb +++ b/app/views/tags/_tag.html.erb @@ -48,6 +48,22 @@ <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%> <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%> <%= f.submit l(:button_project_tags_add),:class => "small" %> + <%#= link_to_function l(:button_cancel), "$(\"#put-tag-form-#{obj.class}-#{obj.id}\").hide();"%> <% end %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 2369b25d0..6ce5e2095 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -113,7 +113,7 @@ <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> <% end %> -

<%= h stringCut240(act.content) %>

+

<%= h act.content.truncate(240, omission: '...') %>

diff --git a/app/views/welcome/_search_project.html.erb b/app/views/welcome/_search_project.html.erb index c139be6f1..fda9dae7c 100644 --- a/app/views/welcome/_search_project.html.erb +++ b/app/views/welcome/_search_project.html.erb @@ -17,15 +17,19 @@ form #q, form #search_type{ height: 33px; } form #q{ + font-size: 13px; border-top-left-radius: 5px; border-bottom-left-radius: 5px; border-right: none; } form #search_type{ + font-size: 13px; color: #363739; border-top-right-radius: 5px; border-bottom-right-radius: 5px; + border-bottom-left-radius: 0px; + border-top-left-radius: 0px; border-left: 1px outset #83A9A9; margin-left: -4px; -webkit-appearance: none; diff --git a/config/locales/en.yml b/config/locales/en.yml index b25519d3c..08255e98d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1391,6 +1391,10 @@ en: label_bids_published: published label_bids_published_ago: ago label_welcome_trustie: Trustie forge + label_welcome_trustie_project: Online projects hosting platform + label_welcome_trustie_course: Online Courses practice platform + label_welcome_trustie_project_description: Software for Chinese college students and practitioners to provide social-oriented project management, code hosting, resource sharing, cooperation and exchange. + label_welcome_trustie_course_description: Teachers and Students for Chinese universities to provide social-oriented curriculum management, resource sharing, cooperation achieved, collaborative research. label_welcome_trustie_description: a socialized collaboration platform for project management, collaborative research, software development and software crowdsourcing for creative university students and entrepreneurs. label_user_project: Projects label_bid_respond_quote: Respond diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 3c9218683..a006ae53c 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -448,7 +448,7 @@ zh: project_module_time_tracking: 时间跟踪 project_module_news: 新闻 project_module_documents: 文档 - project_module_files: 版本下载 + project_module_files: 资料下载 project_module_wiki: Wiki project_module_repository: 版本库 project_module_boards: 讨论区 @@ -515,7 +515,7 @@ zh: label_requirement: 需求 label_new_course: 课程列表 label_course_practice: 课程实践 - label_course_all: 所有课程 + label_course_all: 课程列表 label_teacher_all: 所有教师 label_project_deposit: 项目托管 label_software_user: 软件创客 diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 4ac63b56c..2845c3ce0 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1,6 +1,16 @@ /* Redmine - project management software Copyright (C) 2006-2013 Jean-Philippe Lang */ +function cleanArray (actual){ + var newArray = new Array(); + for (var i = 0; i< actual.length; i++){ + if (actual[i]){ + newArray.push(actual[i]); + } + } + return newArray; +} + function checkAll(id, checked) { if (checked) { $('#'+id).find('input[type=checkbox]').attr('checked', true);