From 14d1fa00697b6f821b491267b0d7c569378499c6 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Tue, 17 Mar 2015 16:11:05 +0800 Subject: [PATCH 01/26] =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8E=E5=B0=B1=E4=B8=8A=E4=BC=A0=E5=B9=B6=E6=8F=92=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/kindeditor/plugins/image/image.js | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/public/assets/kindeditor/plugins/image/image.js b/public/assets/kindeditor/plugins/image/image.js index 69029eda5..fd7f5a501 100644 --- a/public/assets/kindeditor/plugins/image/image.js +++ b/public/assets/kindeditor/plugins/image/image.js @@ -215,7 +215,51 @@ KindEditor.plugin('image', function(K) { } }); uploadbutton.fileBox.change(function(e) { - localUrlBox.val(uploadbutton.fileBox.val()); + //localUrlBox.val(uploadbutton.fileBox.val()); + if (dialog.isLoading) { + return; + } + // insert local image + if (showLocal && showRemote && tabs && tabs.selectedIndex === 1 || !showRemote) { + if (uploadbutton.fileBox.val() == '') { + alert(self.lang('pleaseSelectFile')); + return; + } + dialog.showLoading(self.lang('uploadLoading')); + uploadbutton.submit(); + localUrlBox.val(''); + return; + } + // insert remote image + var url = K.trim(urlBox.val()), + width = widthBox.val(), + height = heightBox.val(), + title = titleBox.val(), + align = ''; + alignBox.each(function() { + if (this.checked) { + align = this.value; + return false; + } + }); + if (url == 'http://' || K.invalidUrl(url)) { + alert(self.lang('invalidUrl')); + urlBox[0].focus(); + return; + } + if (!/^\d*$/.test(width)) { + alert(self.lang('invalidWidth')); + widthBox[0].focus(); + return; + } + if (!/^\d*$/.test(height)) { + alert(self.lang('invalidHeight')); + heightBox[0].focus(); + return; + } + clickFn.call(self, url, title, width, height, 0, align); + + }); if (allowFileManager) { viewServerBtn.click(function(e) { From 4111e2a9408bbeb0b213a0ec2ddab4942d437868 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 17 Mar 2015 17:02:32 +0800 Subject: [PATCH 02/26] =?UTF-8?q?1=E3=80=81=E8=AE=A8=E8=AE=BA=E5=8C=BA?= =?UTF-8?q?=E6=96=B0=E5=AD=90=E7=95=8C=E9=9D=A2=202=E3=80=81=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=8F=B3=E4=BE=A7=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_project_show.html.erb | 100 ++++++++---------- app/views/layouts/base_projects.html.erb | 3 +- public/stylesheets/application.css | 127 +++++++++++++++++++---- 3 files changed, 150 insertions(+), 80 deletions(-) diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 1d9408e86..d5449e44d 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -24,10 +24,6 @@ -
-

<%= h @board.name %>

-
- <% if !User.current.logged? %>
<% if @project.project_type == 1 %> @@ -39,62 +35,52 @@
<% end %> -
- - 共有 - <%= link_to @topic_count,:controller => 'boards',:action => 'index' %> - 个贴子 - - <% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> - - <%= link_to l(:label_message_new), - new_board_message_path(@board), - :class => 'icon icon-add', - :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> - - <% end %> -
-
- <% if @topics.any? %> - <% @topics.each do |topic| %> - - - - - -
- <%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %> - - - - - - - - - -
- <%= link_to h(topic.subject.truncate(40,ommision:'...')), board_message_path(@board, topic),title:topic.subject.to_s %> - - - - - - - - -
<%= link_to (topic.replies_count), board_message_path(@board, topic) %>
回答
-
- <%= authoring topic.created_on, topic.author %>
-
- <% end %> - + + +
+
+

<%= h @board.name %>

+
+
+
项目讨论区共有<%= @topic_count %>个帖子
+ <% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> + <%= link_to l(:label_message_new), new_board_message_path(@board), + :class => 'problem_new_btn fl', + :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> + <% end %> +
+
+ + <% if @topics.any? %> + <% @topics.each do |topic| %> +
+ + <%= link_to image_tag(url_to_avatar(topic.author), :class => "problem_pic talk_pic fl"), user_path(topic.author) %> + +
+
+ <%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %> + <% if topic.sticky? %> + 置顶 + <% end %> +
+
+ 由<%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> + 添加于<%= format_time topic.created_on %> +
+
+ 回复<%= link_to (topic.replies_count), board_message_path(@board, topic), :style =>"color:#fff;" %> +
+
+ <% end %> +
    + <%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %> +
<% else %>

<%= l(:label_no_data) %>

<% end %> + +
<% other_formats_links do |f| %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 3098a5cda..bb145f1e4 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -126,7 +126,8 @@ <%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :style => "color:#3CA5C6;font-weight:bold" %>) | <%= l(:project_module_attachments) %>( - <%= link_to "#{@project.attachments.count}", project_files_path(@project), :style => "color:#3CA5C6;font-weight:bold" %>)
+ <%= link_to "#{@project.attachments.count}", project_files_path(@project), :style => "color:#3CA5C6;font-weight:bold" %>) +
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 5786c5758..a8f5c5853 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -75,9 +75,9 @@ a:hover.subnav_green{ background:#14ad5a;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} .lg-foot:hover{ color:#787b7e;} /*右侧内容--动态*/ - -.project_r_h{ height:40px; background:#eaeaea; margin-bottom: 5px;} -.project_h2{ background:#64bdd9; color:#fff; height:30px; width:90px; text-align:center; font-weight:normal; padding-top:3px; font-size:16px; padding-top:9px;} +/*右侧内容--动态*/ +.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;} +.project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} .project_r_box{ border:1px solid #e2e1e1; width:670px; margin-top:10px;} .project_h3 { color:#646464; font-size:14px; padding:0 10px; border-bottom:1px solid #e2e1e1;} a.more{ float:right; font-size:12px; font-weight:normal; color:#a9a9a9; margin-top:3px;} @@ -100,42 +100,124 @@ a:hover.more{ color:#64bdd9;} .box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;} .box_close:hover{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} /*邮件邀请*/ -.box_main{ width:345px; margin:0 auto;padding-left:28px;} -.box_h3{ color:#15bccf; text-align:center; font-size:16px;margin-right:40px;} +.box_main{ width:345px; margin:0 auto;} +.box_main02{ width:390px; margin:15px auto;} +.box_h3{ color:#15bccf; text-align:center; font-size:16px;} .box_p{ color:#404040; margin-bottom:5px;} .fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:10px; padding-left:5px; width:290px;} .icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;} .icon_addm:hover{background:url(../images/img_floatbox.png) 0 -61px no-repeat; } .icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px} .icon_removem:hover{background:url(../images/img_floatbox.png) -22px -61px no-repeat;} -.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff !important; height:26px; padding-top:8px; margin-bottom:10px;} +.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;} .btn_free:hover{ background:#d63502;} /*成员邀请*/ -.invi_search{ width:345px; margin:0 auto;} +.invi_search{ margin-left:50px;} .invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;} .invi_search_btn{ background:#15bccf; color:#fff; text-align: center; width:40px; height:22px;border:1px solid #15bccf; padding-top:2px; cursor:pointer;} .invi_search_btn:hover{ background:#0da1b2; border:1px solid #0da1b2;} -.rolebox{ margin-left: -40px;} +.rolebox{ margin:10px 0;} /*问题跟踪*/ .problem_top{ margin:10px 0 ;} .problem_search_input{ border:1px solid #64bdd9; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;} .problem_search_btn{ background:#64bdd9; color:#fff; text-align: center; width:40px; height:22px;border:1px solid #64bdd9; padding-top:2px; cursor:pointer;} .problem_search_btn:hover{ background:#3da1c1; border:1px solid #3da1c1;} -.problem_new_btn{ margin-left:10px; border:1px solid #ff7143; color:#ff7143; width:60px; height:22px; text-align:center; padding-top:2px;} -.problem_new_btn:hover{ background:#ff7143; color:#fff;} -.problem_p{ color:#535252; margin-right: 8px;} +.problem_new_btn{ margin-left:10px; border:1px solid #ff7143; color:#ff7143 !important; width:60px; height:19px; font-size:12px; text-align:center; padding-top:4px;margin-top:-2px;} +.problem_new_btn:hover{ background:#ff7143; color:#fff !important;} +.problem_p{ color:#535252; margin-top:5px;} .problem_p span{ color:#ff3e00;} -.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3;} +.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3; margin-top:5px;} +.problem_pic:hover{border:1px solid #64bdd9;} +.problem_txt{ width:610px; margin-left:10px; color:#777777;} +.problem_name{ color:#ff5722 !important;} +.problem_line{margin-top:5px;} +.problem_name:hover{ color:#d33503;} +.problem_tit{ color:#0781b4 !important; width:430px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +.problem_tit:hover{ color:#09658c !important; } +.problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} +/****翻页***/ +.wlist{} +.wlist a{ float:right; border:1px solid #64bdd9; padding:0 5px; margin-left:3px; color:#64bdd9;} +.wlist_l a{ float:left; margin-right:3px; margin-left:0px;} +.wlist a:hover{border:1px solid #64bdd9; background-color:#64bdd9; color:#fff; text-decoration:none;} +.wlist_select a { background-color:#48aac9; color:#fff;} +/****讨论区***/ +.talk_top{ margin:10px 0; font-size:14px; color:#4c4c4c;} +.talk_top span{ color:#ff7143;} +.talk_txt{ width:460px; margin-left:10px; color:#676868;} +.talk_up{ color:#f63c00;} +.talk_pic{width:32px; height:32px; padding:2px;} +.talk_btn{ background:#64bdd9; width:50px; height:22px; color:#fff; text-align:center; margin-top:9px; padding-top:2px;} +.talk_btn:hover{ background:#2a9dc1;} +/****讨论区内页***/ +.mt0{ margin-top:0px;} +.talk_info{ color:#7d7d7d; margin-left:50px; margin-top:10px;} +.talk_edit{ color:#426e9a; margin-right:5px;} +.talk_edit:hover{ color:#ff5722;} +.talk_reply { background:#eeeeee; padding:10px; margin-bottom:10px;} +.talkpage_text{ border:1px solid #64bdd9; width:600px; color:#7d7d7d; padding:5px; margin:10px 0 10px 50px;} +/****新建讨论***/ +.talk_new{ padding-left:15px; color:#4c4c4c;} +.c_red{ color:#F00;} +.talk_input{ border:1px solid #64bdd9; height:22px; width:595px; margin-bottom:10px;} +.talk_text{ border:1px solid #64bdd9; height:100px;width:595px; margin-bottom:10px;} +.talk_new ul li{ } +.view_span{font-weight:normal; color:#999;} +.sb{width:70px; height:26px; color:#606060;} +.ml60{ margin-left:60px;} +.blue_btn{ background:#64bdd9; display:block; font-size:14px;color:#fff; height:28px; width:50px; text-align:center; margin-left:10px; margin-top:10px;} +.blue_btn:hover{ background:#329cbd;} +.grey_btn{ background:#d9d9d9; color:#656565;} +.grey_btn:hover{ background:#717171; color:#fff;} +/****资源库***/ +.f_l{ float:left;} +.f_r{ float:right;} +.resource a{ text-align:center;} +.b_lblue{ background:#64bdd9;} +.b_dblue{ background:#55a1b9; cursor:pointer;} +.f_b{ font-weight: bold;} +.c_blue{ color:#64bdd9;} +a.c_dblue{ color: #3ca5c6;} +a:hover.c_dblue{ color: #0781b4;} +.c_grey{ color:#999999;} +.c_grey02{ color:#666666;} +.f_14{ font-size:14px;} +.c_dblue{ color:#3e6d8e;} +.w90{width:90px;} +.ml10{margin-left:10px;} +.resource{ width:670px;} +.re_top{width:660px; height:40px; background:#eaeaea; padding:5px;} +.re_top input{ float:left;} +.re_search{ margin-top:7px; margin-left:5px;} +.re_schbox{ width:240px; height:24px; border:1px solid #64bdd9; color:#666666;} +.re_schbtn{ width:60px; height:26px; color:#fff; margin-right:5px; border:none; margin-left:0px; } +a.re_fabu { display:block; width:90px; height:35px; font-size:14px; color:#fff; text-align:center; padding-top:5px; } +a:hover.re_fabu{background:#55a1b9;} +.re_con{ margin:5px; width:665px;} +.re_con_top{color:#494949; } +.re_con_top span{ color:#999999; font-weight:bold;} +a.re_select{ display:block; width:88px; height:22px; border:1px solid #ff9900; color:#ff9900; margin-left:10px;} +a:hover.re_select{ background:#ff9900; color:#fff; text-decoration:none;} +.re_open{display:block; width:46px; height:22px; border:1px solid #64bdd9; color:#64bdd9; margin-left:10px;} +a:hover.re_open{ background:#64bdd9; color:#fff; text-decoration:none;} +a.re_de{ color:#6883b6; margin-left:15px;} +.re_con_box{ border-bottom:1px dashed #dadada; padding-bottom:10px; margin-bottom:10px;} + +.upload_con { } +.upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;} +.upload_box{ width:430px; height:80px;} +a.upload_btn02{ display:block; float:left; margin-top:15px; width:80px; height:30px; text-align: center; color:#fff; font-size:14px; background:#15bccf; margin-right:15px;} +a:hover.upload_btn02{ background:#55a1b9;} +a.upload_btn_grey{background:#a3a3a3;} +a:hover.upload_btn_grey{background:#8a8a8a;} +.upload_btn{width:80px; height:26px;} +.upload_check{ margin-top:4px;} +/****其他未更新页面***/ +.setting{ background:url(../images/setting.jpg) 0 0 no-repeat; width:670px; height:443px;} +.newproblem{} + -/****标签(和资源库的tag样式一致)***/ -.project_Label{ width:220px; padding:10px; background:#fff; margin-top:0px; padding-top:5px;} -a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} -.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } -.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} -.re_tag{ width: auto; padding:0 5px; height:22px; border:1px solid #f8df8c; background:#fffce6; margin-right:10px; } -.re_tag a{ color:#0d90c3;} -.tag_h span,.tag_h a{ margin-bottom:0px;} /*企业版样式*/ .content_syqy{ width:940px; height:400px; border:1px;} .content_syqy .list{ font-size:14px; font-weight:normal; margin-left:10px; font-weight:bold; padding-top:10px} @@ -1414,8 +1496,8 @@ input#openid_url { background: url(../images/openid-bg.gif) no-repeat; backgroun .clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; } /***** Links *****/ -a, a:link, a:visited{ color: #169 ; text-decoration: none; } -a:hover, a:active{ color: #c61a1a; text-decoration: underline;} +a, a:link, a:visited{ color: #0781B4 ; text-decoration: none; } +a:hover, a:active{ color: #09658c;} a img{ border: 0; } a.issue.closed, a.issue.closed:link, a.issue.closed:visited { color: #999; text-decoration: line-through; } @@ -3086,3 +3168,4 @@ input[class~='m3p10'], .m3p10 { } */ + From 216bc570043f91e87c1e3cab6bbf4b8f1b181af1 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 17 Mar 2015 17:21:49 +0800 Subject: [PATCH 03/26] =?UTF-8?q?1=E3=80=81=E8=BF=9B=E5=85=A5=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=AD=90=E8=AE=A8=E8=AE=BA=E5=8C=BA=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E7=9A=84=E9=A1=B5=E9=9D=A2=202=E3=80=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=81=AB=E7=8B=90=E6=B5=8F=E8=A7=88=E5=99=A8=E2=80=9C=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E4=BF=A1=E6=81=AF=E2=80=9D=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/messages/_project_show.html.erb | 3 +++ public/stylesheets/application.css | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb index b0a593180..01465188c 100644 --- a/app/views/messages/_project_show.html.erb +++ b/app/views/messages/_project_show.html.erb @@ -57,6 +57,9 @@
+
+

<%= h @board.name %>

+
<%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @topic,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index a8f5c5853..6d50d8bd2 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -70,13 +70,13 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:10px; background:#fff; padding-top:5px; color:#6d6d6d;} -.course_description{max-height: 105px;overflow:hidden;} +.course_description{max-height: 110px;overflow:hidden;} .course_description_none{max-height: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} .lg-foot:hover{ color:#787b7e;} /*右侧内容--动态*/ /*右侧内容--动态*/ -.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;} +.project_r_h{height:40px; background:#eaeaea; margin-bottom:10px;} .project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} .project_r_box{ border:1px solid #e2e1e1; width:670px; margin-top:10px;} .project_h3 { color:#646464; font-size:14px; padding:0 10px; border-bottom:1px solid #e2e1e1;} From 943258aebe37afff36f04a7191129c7bcdb1ff87 Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 17 Mar 2015 17:29:35 +0800 Subject: [PATCH 04/26] =?UTF-8?q?#2025=20=E9=A1=B9=E7=9B=AE--=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=BA=93=EF=BC=9A=E4=B8=8A=E4=BC=A0=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=88=86=E7=B1=BB=E8=B5=84=E6=BA=90=E4=B8=BA?= =?UTF-8?q?=E2=80=9C=E8=AF=BE=E4=BB=B6=E2=80=9D=E6=88=96=E2=80=9C=E7=A0=94?= =?UTF-8?q?=E7=A9=B6=E6=8A=A5=E5=91=8A=E2=80=9D=EF=BC=8C=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=90=8E=EF=BC=8C=E9=83=BD=E6=98=AF=E6=BA=90?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/attachments.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 8ea71909b..8fbaa5981 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -135,8 +135,11 @@ function uploadBlob(blob, uploadUrl, attachmentId, options) { loadstartEventHandler: $.noop, progressEventHandler: $.noop }, options); - - uploadUrl = uploadUrl + '?attachment_id=' + attachmentId; + if(uploadUrl.indexOf('?') > 0){ + uploadUrl = uploadUrl + '&attachment_id=' + attachmentId; + }else{ + uploadUrl = uploadUrl + '?attachment_id=' + attachmentId; + } if (blob instanceof window.File) { uploadUrl += '&filename=' + encodeURIComponent(blob.name); } From cfaf788e3718434542c408e2bc6018cab0111601 Mon Sep 17 00:00:00 2001 From: whimlex Date: Tue, 17 Mar 2015 18:04:35 +0800 Subject: [PATCH 05/26] =?UTF-8?q?=E6=96=B0=E7=89=88=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=88=90=E5=91=98=EF=BC=8C=E5=85=B3=E6=B3=A8=E8=80=85=EF=BC=8C?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=9B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E9=99=85=E5=8C=96=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_project_file.html.erb | 6 +- app/views/projects/_member_list.html.erb | 2 +- app/views/projects/watcherlist.html.erb | 2 +- app/views/users/_my_joinedcourse.html.erb | 4 +- config/locales/commons/en.yml | 5 +- config/locales/commons/zh.yml | 16 +++-- config/locales/en.yml | 16 +---- config/locales/projects/en.yml | 55 ++++++++++++++- config/locales/projects/zh.yml | 82 ++++++++++++++++++++++- config/locales/zh.yml | 28 ++------ 10 files changed, 158 insertions(+), 58 deletions(-) diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb index aa597f3f2..b4d849cd6 100644 --- a/app/views/files/_project_file.html.erb +++ b/app/views/files/_project_file.html.erb @@ -1,7 +1,7 @@ <% attachmenttypes = @project.attachmenttypes %> <% sufixtypes = @project.contenttypes %>
-

资源共享区

+

<%= l(:lable_file_sharingarea) %>

@@ -16,12 +16,12 @@
diff --git a/app/views/tags/_show_attachments.html.erb b/app/views/tags/_show_attachments.html.erb index a76211fc6..ca6a2dd7a 100644 --- a/app/views/tags/_show_attachments.html.erb +++ b/app/views/tags/_show_attachments.html.erb @@ -24,19 +24,19 @@    <%= file.description %>
- <%= l('label_attachment_category')%> + <%= l('attachment.category')%> <%=result_come_from file%>
- <%= l('label_attachment_download_num')%> + <%= l('attachment.download_num')%> <%= file.downloads%>| - <%= l('label_attachment_size')%> + <%= l('attachment.size')%> <%= number_to_human_size(file.filesize) %>| - <%= l('label_attachment_sharer')%> + <%= l('attachment.sharer')%> <%= link_to file.author, user_path(file.author), target: "_blank" unless file.author.blank? %> | - <%= l('label_attachment_upload_time')%> + <%= l('attachment.upload_time')%> <%= format_time(file.created_on) %>
diff --git a/config/locales/commons/en.yml b/config/locales/commons/en.yml index 561fc09cc..b9a6e89c4 100644 --- a/config/locales/commons/en.yml +++ b/config/locales/commons/en.yml @@ -138,10 +138,7 @@ en: circular_dependency: "This relation would create a circular dependency" cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks" - attachment_all: "All" - attachment_browse: "Attachment Content Browse" - attachment_sufix_browse: "Attachment Type Browse" - attachment_type: "Attachment Type" + general_text_No: 'No' general_text_Yes: 'Yes' general_text_no: 'no' @@ -166,7 +163,7 @@ en: label_requirement: Calls label_forum: Forum label_contest: Contest - + label_attachment_plural: Files diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index 35087eb06..a238e1234 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -173,7 +173,7 @@ zh: label_requirement: 需求 label_forum: 公共贴吧 label_contest: 竞赛 - + label_attachment_plural: 文件 field_description: 描述 diff --git a/config/locales/contests/en.yml b/config/locales/contests/en.yml index e124e3f1a..1c2784050 100644 --- a/config/locales/contests/en.yml +++ b/config/locales/contests/en.yml @@ -2,3 +2,13 @@ en: # Text direction: Left-to-Right (ltr) or Right-to-Left (rtl) direction: ltr + # + # 竞赛托管平台 + # + # 主页 + # + label_current_hot_contest: Latest Hot Competition + label_current_attendingcontest_work: Latest Competition Work + label_issue_feedback_activities: Question&Feedback + label_more_information: More... + label_release_time: Release-time \ No newline at end of file diff --git a/config/locales/contests/zh.yml b/config/locales/contests/zh.yml index 08115110b..1c4c4d126 100644 --- a/config/locales/contests/zh.yml +++ b/config/locales/contests/zh.yml @@ -3,4 +3,15 @@ # by tsechingho (http://github.com/tsechingho) zh: # Text direction: Left-to-Right (ltr) or Right-to-Left (rtl) - direction: ltr \ No newline at end of file + direction: ltr + + # + # 竞赛托管平台 + # + # 主页 + # + label_current_hot_contest: 最新热门竞赛 + label_current_attendingcontest_work: 最新参赛作品 + label_issue_feedback_activities: 问题和反馈动态 + label_more_information: 更多>> + label_release_time: 发布时间 diff --git a/config/locales/en.yml b/config/locales/en.yml index ac98c4005..e84a26815 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -71,10 +71,9 @@ en: field_summary: Summary field_job_category: Job category # added by bai - field_filename: File - field_file_dense: File Dense - field_filesize: Size - field_downloads: Downloads + + + field_author: Author field_created_on: Created field_closed_on: Closed @@ -340,7 +339,7 @@ en: label_create_new_projects: Create a project label_work_scores_people: The total number of users given scores label_project_grade: Score - label_relation_files: Select an existing resource + # Personal signature tips @@ -482,7 +481,7 @@ en: label_attachment: Files label_attachment_new: New file label_attachment_delete: Delete file - label_attachment_plural: Files + label_file_added: File added label_report: Report label_report_plural: Reports @@ -792,7 +791,7 @@ en: label_cross_project_hierarchy: With project hierarchy label_cross_project_system: With all projects label_gantt_progress_line: Progress line - label_files_filter: Files Filter: + button_check_all: Check all button_uncheck_all: Uncheck all @@ -1430,13 +1429,7 @@ en: label_your_course: your course label_have_message: have a new message lable_not_receive_mail: Click here don't receive email form site! -#added by linchun as competition# - label_current_hot_contest: Latest Hot Competition - label_current_attendingcontest_work: Latest Competition Work - label_issue_feedback_activities: Question&Feedback - label_more_information: More... - label_release_time: Release-time label_weixin: WeiXin @@ -1571,7 +1564,6 @@ en: label_trustie_team: The Trustie development team label_memos_max_length: The content of the post up to 65535 characters in length label_forums_max_length: Post Bar describing the maximum length of 65535 characters - label_unknow_type: Unknow type review_assignments: Review assignments label_my_school: My school diff --git a/config/locales/projects/en.yml b/config/locales/projects/en.yml index 458311bda..ba6b81a5c 100644 --- a/config/locales/projects/en.yml +++ b/config/locales/projects/en.yml @@ -37,7 +37,7 @@ en: label_unapply_project: Cancel the application label_member: Members - project_module_attachments: Resources + project_module_attachments: Files label_invite: Invitation label_invite_new_user: "Send e-mail to invite new user" @@ -95,6 +95,29 @@ en: # # 资源库 # + lable_file_sharingarea: Files + + label_upload_files: Upload + + + # 资源库(附件)公用 + label_relation_files: Select an existing resource + label_search_by_keyword: "Search by keywords" + label_files_filter: "Files Filter:" + + 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_filetype: File Typ + field_downloads: Downloads + field_file_dense: Dense + diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index b68d9b64d..a58536e10 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -101,16 +101,23 @@ zh: label_upload_files: 上传文件 - # 附件公用 + # 资源库(附件)公用 label_relation_files: 关联已有资源 label_search_by_keyword: "按关键字搜索:" label_files_filter: "资源过滤:" - attachment_all: "全部" + + field_filename: 文件 + field_filesize: 大小 + field_filecontenttype: 内容分类 + field_filetype: 文件格式 + field_file_dense: 是否公开 + field_downloads: 下载次数 + attachment_sufix_browse: "文件类型" attachment_browse: "内容类型" + attachment_all: "全部" attachment_type: "分类" - - + label_unknow_type: 未知类型 # # 项目托管平台 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 626a12abd..dc1937926 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -99,10 +99,9 @@ zh: lastname_empty: 姓氏不能为空 enterprise_empty: 企业名不能为空 field_lastname_eg: '(例:张三丰,请填写[张])' - field_filename: 文件 - field_file_dense: 是否公开 - field_filesize: 大小 - field_downloads: 下载次数 + + + field_author: 作者 field_created_on: 创建于 field_updated_on: 更新于 @@ -566,7 +565,7 @@ zh: label_file_upload: 上传资料 label_course_file_upload: 上传了课件 label_attachment_delete: 删除文件 - label_attachment_plural: 文件 + label_file_added: 文件已添加 label_report: 报表 label_report_plural: 报表 @@ -1918,12 +1917,6 @@ zh: lable_not_receive_mail: 点此设置接收本站邮件偏好! label_contest_notification: 竞赛通知 - #english site translation - label_current_hot_contest: 最新热门竞赛 - label_current_attendingcontest_work: 最新参赛作品 - label_issue_feedback_activities: 问题和反馈动态 - label_more_information: 更多>> - label_release_time: 发布时间 label_weixin: 微信扫码 @@ -2032,13 +2025,6 @@ zh: label_enterprise_nil: 该模块为最新上线模块,目前还没有创建企业项目! label_enterprises: 组织 - label_tags_opensource: 开源项目 - label_attachment_category: 所属分类 - label_attachment_download_num: 下载 - label_attachment_size: 大小 - label_attachment_sharer: 共享者 - label_attachment_upload_time: 上传时间 - #api label_recently_updated_notification: 最近更新了通知 From 1cdf397bc09c53353948cc1fcfbec154bfac95f2 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 18 Mar 2015 20:04:59 +0800 Subject: [PATCH 14/26] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B3=E6=B3=A8?= =?UTF-8?q?=E3=80=81=E7=94=B3=E8=AF=B7=E6=96=B9=E6=B3=95=E4=B8=AD=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/watchers_helper.rb | 4 ++-- app/views/boards/_project_show.html.erb | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index b9e658bb5..221331338 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -43,7 +43,7 @@ module WatchersHelper ) method = watched ? 'delete' : 'post' - link_to text, url, :remote => true, :method => method, :class => css + link_to text, url, :remote => true, :method => method, :style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 22px; line-height: 22px; background: none repeat scroll 0% 0% #64BDD9; TES" end ############## added by linchun @@ -278,7 +278,7 @@ module WatchersHelper ) method = applied ? 'delete' : 'post' - link_to text, url, :remote => true, :method => method ,:class=>css + link_to text, url, :remote => true, :method => method ,:style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 22px; line-height: 22px; background: none repeat scroll 0% 0% #64BDD9; TES" end def exit_project_link(project) diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index d5449e44d..7ddd37ad6 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -44,7 +44,7 @@
项目讨论区共有<%= @topic_count %>个帖子
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> - <%= link_to l(:label_message_new), new_board_message_path(@board), + <%= link_to l(:label_message_new), new_board_message_path(@board), :class => 'problem_new_btn fl', :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> <% end %> @@ -61,14 +61,14 @@
<%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %> <% if topic.sticky? %> - 置顶 + 置顶 <% end %>
- 由<%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> - 添加于<%= format_time topic.created_on %> + 由<%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> + 添加于<%= format_time topic.created_on %>
-
+
回复<%= link_to (topic.replies_count), board_message_path(@board, topic), :style =>"color:#fff;" %>
From cf3d836cf3e61751aaa37dc594171b8aca39d978 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Thu, 19 Mar 2015 09:37:37 +0800 Subject: [PATCH 15/26] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=97=B6=E5=87=BA=E7=8E=B0=E3=80=8A"?= =?UTF-8?q?=E4=BA=B2=E7=88=B1=E7=9A=84Trustie=E7=94=A8=E6=88=B7=EF=BC=8C?= =?UTF-8?q?=E6=82=A8=E5=A5=BD=EF=BC=81"=E3=80=8B=20Signed-off-by:=20alan?= =?UTF-8?q?=20<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/mailer.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index c5be3f4fd..c24ab84e7 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -41,7 +41,8 @@ a:hover.mail_reply{ background:#06a9bc; text-decoration:none;}
-

<%= l(:mail_issue_greetings)%>

+ +
<%= yield %>
From 39193a0d710333fbf1d3977cbfdc8f060b386c53 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 Mar 2015 10:04:01 +0800 Subject: [PATCH 16/26] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E4=B8=AD=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/application.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 3c487db5a..e665e11dc 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -109,8 +109,8 @@ a:hover.more{ color:#64bdd9;} .icon_addm:hover{background:url(../images/img_floatbox.png) 0 -61px no-repeat; } .icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px} .icon_removem:hover{background:url(../images/img_floatbox.png) -22px -61px no-repeat;} -.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;} -.btn_free:hover{ background:#d63502;} +.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff !important; height:25px; padding-top:5px; margin-bottom:10px;} +.btn_free:hover{ background:#d63502;text-decoration:none;} /*成员邀请*/ .invi_search{ margin-left:50px;} .invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;} From 28a61c261709389028b5174de7a2e8ed2b36c8fa Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 19 Mar 2015 10:13:43 +0800 Subject: [PATCH 17/26] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=97=A0=E6=B3=95=E6=90=9C=E5=88=B0=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E7=9A=84=E7=A7=81=E6=9C=89=E8=AF=BE=E7=A8=8B=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 2 +- app/services/users_service.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index dc6cf8119..4512344ad 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -38,7 +38,7 @@ class CoursesService if name.blank? raise 'sumbit empty' end - @courses = courses_all.visible + @courses = courses_all.visible(current_user) if params[:name].present? @courses_all = @courses.like(params[:name]) else diff --git a/app/services/users_service.rb b/app/services/users_service.rb index f75a84c5b..39ca37d26 100644 --- a/app/services/users_service.rb +++ b/app/services/users_service.rb @@ -193,7 +193,6 @@ class UsersService @current_user.save #raise @current_user.errors.full_message #return @current_user - else raise 'wrong password' end From 371f25b61ffcd4b1cbe3032365aa4431d417c332 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 Mar 2015 10:44:03 +0800 Subject: [PATCH 18/26] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=86=E9=A1=B5=E5=BC=82=E5=B8=B8=EF=BC=88?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E5=BC=95=E8=B5=B7=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/invite_members_by_mail.html.erb | 2 ++ public/stylesheets/application.css | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb index 63f69e120..c222bece1 100644 --- a/app/views/projects/invite_members_by_mail.html.erb +++ b/app/views/projects/invite_members_by_mail.html.erb @@ -45,6 +45,7 @@
+

<%= l(:label_invite_new_user)%>

<%= l(:label_invite_email_tips)%> @@ -62,5 +63,6 @@ <%#= submit_tag '免费发送', :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %> <% end %> +

\ No newline at end of file diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index e665e11dc..3374d1177 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -13,7 +13,7 @@ ul.wlist{ margin-left: -40px; border-bottom:none; } ul.wlist li{float: left;} ul.wlist li a{ border:1px solid #15bccf; padding:4px; margin-left:3px;} ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;} -.wlist_select { background-color:#64bdd9; color:#fff; padding: 4px 3px 3px 3px; margin-left:3px;margin-top: -5px; border:1px solid #64bdd9;} +.wlist_select { background-color:#64bdd9; color:#fff; padding: 5px 3px 3px 3px; margin-left:3px;margin-top: 0px; border:1px solid #64bdd9;} /*20150203项目界面优化样式 By: huangjignquan*/ .project_new{font-size: 15px; padding: 5px;} @@ -104,7 +104,7 @@ a:hover.more{ color:#64bdd9;} .box_main02{ width:390px; margin:15px auto;} .box_h3{ color:#15bccf; text-align:center; font-size:16px;} .box_p{ color:#404040; margin-bottom:5px;} -.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:10px; padding-left:5px; width:290px;} +.fb_item{ color:#919191; border:1px solid #919191; height:25px; margin-bottom:10px; padding-left:5px; width:290px;} .icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;} .icon_addm:hover{background:url(../images/img_floatbox.png) 0 -61px no-repeat; } .icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px} @@ -112,11 +112,11 @@ a:hover.more{ color:#64bdd9;} .btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff !important; height:25px; padding-top:5px; margin-bottom:10px;} .btn_free:hover{ background:#d63502;text-decoration:none;} /*成员邀请*/ -.invi_search{ margin-left:50px;} -.invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;} +.invi_search{ margin-left:25px;} +.invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px;} .invi_search_btn{ background:#15bccf; color:#fff; text-align: center; width:40px; height:22px;border:1px solid #15bccf; padding-top:2px; cursor:pointer;} .invi_search_btn:hover{ background:#0da1b2; border:1px solid #0da1b2;} -.rolebox{ margin:10px 0;} +.rolebox{ margin:10px 0;margin-left:-38px;} /*问题跟踪*/ .problem_top{ margin:10px 0 ;} .problem_search_input{ border:1px solid #64bdd9; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;} From c209bccba071660df05770fae36253d63e6a1fcd Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 19 Mar 2015 11:15:58 +0800 Subject: [PATCH 19/26] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=95=B0=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_projects.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index bb145f1e4..4572b703b 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -126,7 +126,7 @@ <%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :style => "color:#3CA5C6;font-weight:bold" %>) | <%= l(:project_module_attachments) %>( - <%= link_to "#{@project.attachments.count}", project_files_path(@project), :style => "color:#3CA5C6;font-weight:bold" %>) + <%= link_to "#{@project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count}", project_files_path(@project), :style => "color:#3CA5C6;font-weight:bold" %>)
From 0424fc55db47992311424d7ba7f09dd60bfbfdd5 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 19 Mar 2015 11:26:31 +0800 Subject: [PATCH 20/26] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=95=B0=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_projects.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 4572b703b..ef9bb56f0 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -126,7 +126,8 @@ <%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :style => "color:#3CA5C6;font-weight:bold" %>) | <%= l(:project_module_attachments) %>( - <%= link_to "#{@project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count}", project_files_path(@project), :style => "color:#3CA5C6;font-weight:bold" %>) + <% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> + <%= link_to "#{attaments_num}", project_files_path(@project), :style => "color:#3CA5C6;font-weight:bold" %>)
@@ -170,8 +171,8 @@ <% unless @project.enabled_modules.where("name = 'files'").empty? %>
- ID:<%= @project.id %> + 项目ID:<%= @project.id %>
diff --git a/app/views/tags/_project_tag.html.erb b/app/views/tags/_project_tag.html.erb index 8694d69ca..d10506d0d 100644 --- a/app/views/tags/_project_tag.html.erb +++ b/app/views/tags/_project_tag.html.erb @@ -1,32 +1,30 @@ -
+
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
+
<% if User.current.logged? %> <%= toggle_link (l(:label_add_tag)), 'put-tag-form', {:focus => 'tags_name'} %> <% end %> + - +
diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb index 225a09aec..b97012723 100644 --- a/app/views/tags/_tag_name.html.erb +++ b/app/views/tags/_tag_name.html.erb @@ -31,7 +31,12 @@ <% if @tags.size > 0 %> <% @tags.each do |tag| %> -
+ + <% if object_flag == '2' %> + + <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %> + <% else %> +
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %> @@ -43,13 +48,6 @@ :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> - <% when '2' %> - <% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %> - - <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, - :taggable_id => obj.id, :taggable_type => object_flag %> - - <% end %> <% when '3' %> <% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %> @@ -101,6 +99,7 @@ <% end %>
- <% end %> + <% end %> + <% end %> <% end %> <% end %> \ No newline at end of file diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 3374d1177..742202bea 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -69,11 +69,19 @@ a.ml105{ margin-left:120px;} a:hover.subnav_green{ background:#14ad5a;} /*简介*/ -.project_intro{ width:220px; padding:10px; background:#fff; padding-top:5px; color:#6d6d6d;} -.course_description{max-height: 110px;overflow:hidden;} +.project_intro{ width:220px; padding:5px 0px 10px 10px; background:#fff; color:#6d6d6d;} +.course_description{max-height: 105px;overflow:hidden;} .course_description_none{max-height: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} .lg-foot:hover{ color:#787b7e;} +/****标签(和资源库的tag样式一致)***/ +.project_Label{ width:220px; padding-left:10px; padding-right:10px; background:#fff; margin-top:10px;} +a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} +.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } +.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} +.re_tag{ width: auto; padding-left:4px;padding-right: 4px; height:22px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px;font-size:12px; } +.re_tag a{ color:#0d90c3;} +.tag_h span,.tag_h a{ margin-top:5px;} /*右侧内容--动态*/ /*右侧内容--动态*/ .project_r_h{height:40px; background:#eaeaea; margin-bottom:10px;} From 7b3af413cd436b2ed6516967ec39ad03ce4f4b69 Mon Sep 17 00:00:00 2001 From: dingxu Date: Thu, 19 Mar 2015 16:51:07 +0800 Subject: [PATCH 23/26] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E9=A1=B9=E7=9B=AE:=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E9=82=AE=E7=AE=B1=E5=B7=B2=E8=A2=AB=E6=B3=A8=E5=86=8C=E6=88=96?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=E7=BB=99=E5=87=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 1 + app/views/issues/_action_menu.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 44e5fd8a3..e9a27cf44 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -340,6 +340,7 @@ class ProjectsController < ApplicationController @is_zhuce =false flash[:notice] = l(:notice_email_sent, :value => email) else + flash[:error] = l(:notice_registed_success, :value => email) @is_zhuce = true end respond_to do |format| diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index 61cea920c..bcd7b30c5 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -12,7 +12,7 @@ <% end %> -<%= watcher_link(@issue, User.current) %> + <%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %> <%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
From b95852dfcd3a0615d5e08d3545fb8ca98793a433 Mon Sep 17 00:00:00 2001 From: whimlex Date: Thu, 19 Mar 2015 17:21:11 +0800 Subject: [PATCH 24/26] =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=9A=E4=BF=AE=E6=94=B9=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=B8=80=E4=BA=9Bbug=EF=BC=9A=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E4=B8=AA=E4=BA=BA=E5=BE=97=E5=88=86=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user_extensions.rb | 56 ++++++++++--------- app/views/attachments/_form.html.erb | 2 +- app/views/attachments/_form_course.html.erb | 2 +- app/views/attachments/destroy.js.erb | 2 +- app/views/files/_new.html.erb | 10 +--- app/views/layouts/base_contest.html.erb | 6 +- app/views/layouts/base_newcontest.html.erb | 2 +- app/views/layouts/base_projects.html.erb | 4 +- app/views/layouts/base_users.html.erb | 12 ++-- app/views/projects/_member_list.html.erb | 2 +- app/views/projects/_tools_expand.html.erb | 2 +- app/views/projects/watcherlist.html.erb | 2 +- app/views/welcome/_hot_projects_list.html.erb | 2 +- app/views/welcome/index.html.erb | 2 +- config/locales/commons/en.yml | 5 +- config/locales/commons/zh.yml | 8 ++- config/locales/en.yml | 7 +-- config/locales/projects/en.yml | 42 +++++++++----- config/locales/projects/zh.yml | 30 +++++++--- config/locales/users/en.yml | 8 +-- config/locales/users/zh.yml | 8 +-- config/locales/zh.yml | 14 ++--- 22 files changed, 121 insertions(+), 107 deletions(-) diff --git a/app/models/user_extensions.rb b/app/models/user_extensions.rb index 92690d1db..09c88e6df 100644 --- a/app/models/user_extensions.rb +++ b/app/models/user_extensions.rb @@ -32,40 +32,42 @@ class UserExtensions < ActiveRecord::Base def get_brief_introduction 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' + 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 - user_identity = '' + 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 - +# end + + def self.introduction(user, message) unless user.user_extensions.nil? info = user.user_extensions diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 22dc447f2..872797d5c 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -49,7 +49,7 @@ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> - <%= 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', diff --git a/app/views/attachments/_form_course.html.erb b/app/views/attachments/_form_course.html.erb index b2089d629..43f99056b 100644 --- a/app/views/attachments/_form_course.html.erb +++ b/app/views/attachments/_form_course.html.erb @@ -38,7 +38,7 @@ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> -<%= 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', diff --git a/app/views/attachments/destroy.js.erb b/app/views/attachments/destroy.js.erb index 04cd4e02d..4893d22fe 100644 --- a/app/views/attachments/destroy.js.erb +++ b/app/views/attachments/destroy.js.erb @@ -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("已上传"+""+count+""+"个文件"); diff --git a/app/views/files/_new.html.erb b/app/views/files/_new.html.erb index 6e8e806cf..76aab9a73 100644 --- a/app/views/files/_new.html.erb +++ b/app/views/files/_new.html.erb @@ -8,10 +8,10 @@ <% if versions.any? %> - + <% if attachmenttypes.any? %> @@ -31,14 +31,10 @@ <% end %>

<% end %> -

<%= l(:field_version) %>

<%= l(:field_version) %>

<%= 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'} %> <%= l(:attachment_type) %>
- - +

<%=l(:label_attachment_plural)%><%= render :partial => 'attachments/form', locals: {project: project} %>

- -

<%=l(:label_attachment_plural)%><%= render :partial => 'attachments/form', locals: {project: project} %>

<%= submit_tag l(:button_add) %> <% end %> diff --git a/app/views/layouts/base_contest.html.erb b/app/views/layouts/base_contest.html.erb index a11defebf..42a7eccd1 100644 --- a/app/views/layouts/base_contest.html.erb +++ b/app/views/layouts/base_contest.html.erb @@ -194,7 +194,7 @@ <% if show_more_fans?(@bid) %> - <%= link_to l(:label_more), :controller => 'bids', :action => 'show_bid_user'%> + <%= link_to l(:button_more), :controller => 'bids', :action => 'show_bid_user'%> <% end %>
@@ -217,7 +217,7 @@ <% if show_more_bid_project?(@bid) %> - <%= link_to l(:label_more), :controller => 'bids', :action => 'show_project'%> + <%= link_to l(:button_more), :controller => 'bids', :action => 'show_project'%> <% end %> @@ -244,7 +244,7 @@ <% if show_more_participate?(@bid) %> - <%= link_to l(:label_more), :controller => "bids", :action => "show_participator"%> + <%= link_to l(:button_more), :controller => "bids", :action => "show_participator"%> <% end %> diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb index f3c598598..26015d536 100644 --- a/app/views/layouts/base_newcontest.html.erb +++ b/app/views/layouts/base_newcontest.html.erb @@ -215,7 +215,7 @@ <%= l(:label_x_followers, :count => @contest.watcher_users.count) %> <% if show_more_fans?(@contest) %> - <%= link_to l(:label_more), show_contest_user_contest_path(@contest) %> + <%= link_to l(:button_more), show_contest_user_contest_path(@contest) %> <% end %>
diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index bb145f1e4..07aee32c4 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -169,7 +169,7 @@ <% end%> <% unless @project.enabled_modules.where("name = 'files'").empty? %> <% end %> - + diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index d68e6abe5..213c9ed07 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -258,10 +258,10 @@ <% else %> - <%= l(:label_identity)%>: + <%= l(:label_identity)%>: - <%= l(:label_account_student) %> + <%= l(:label_account_identity_student) %> @@ -269,10 +269,10 @@ <% elsif @user.user_extensions.identity == 3 %> - <%= l(:label_identity)%>: + <%= l(:label_identity)%>: - <%= l(:label_account_developer) %> + <%= l(:label_account_identity_developer) %> <% end %> @@ -295,7 +295,7 @@ <% if show_more_watchers?(@user) %>
- <%= link_to l(:label_more), :controller => "users", :action => "user_watchlist"%> + <%= link_to l(:button_more), :controller => "users", :action => "user_watchlist"%>
<% end %>
@@ -319,7 +319,7 @@ <% if show_more_fans?(@user) %>
- <%= link_to l(:label_more), :controller => "users", :action => "user_fanslist"%> + <%= link_to l(:button_more), :controller => "users", :action => "user_fanslist"%>
<% end %> diff --git a/app/views/projects/_member_list.html.erb b/app/views/projects/_member_list.html.erb index 590ffbe3c..ca42e1c86 100644 --- a/app/views/projects/_member_list.html.erb +++ b/app/views/projects/_member_list.html.erb @@ -3,7 +3,7 @@
<% 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" %> diff --git a/app/views/projects/_tools_expand.html.erb b/app/views/projects/_tools_expand.html.erb index b6e5f8c0d..f62b0822a 100644 --- a/app/views/projects/_tools_expand.html.erb +++ b/app/views/projects/_tools_expand.html.erb @@ -42,7 +42,7 @@
  • <% 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 %>
  • diff --git a/app/views/projects/watcherlist.html.erb b/app/views/projects/watcherlist.html.erb index 126f6c265..0a7a222d4 100644 --- a/app/views/projects/watcherlist.html.erb +++ b/app/views/projects/watcherlist.html.erb @@ -17,7 +17,7 @@

    <% 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 %> diff --git a/app/views/welcome/_hot_projects_list.html.erb b/app/views/welcome/_hot_projects_list.html.erb index d14a6901b..ff41fa532 100644 --- a/app/views/welcome/_hot_projects_list.html.erb +++ b/app/views/welcome/_hot_projects_list.html.erb @@ -10,7 +10,7 @@ <% 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' %>)

    <%=project.description.truncate(90, omission: '...')%> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 51139ac89..ba0002eff 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -115,7 +115,7 @@

    <%= l(:lable_bar_active)%> <%= 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" }%>

    - <%= link_to l(:label_more), forums_path %> + <%= link_to l(:button_more), forums_path %>
    <% topics = find_new_forum_topics(12) %> diff --git a/config/locales/commons/en.yml b/config/locales/commons/en.yml index b9a6e89c4..296e8bc30 100644 --- a/config/locales/commons/en.yml +++ b/config/locales/commons/en.yml @@ -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 # diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index a238e1234..efb08ec6e 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -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上传头像模块 # diff --git a/config/locales/en.yml b/config/locales/en.yml index e84a26815..3566dcd24 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 diff --git a/config/locales/projects/en.yml b/config/locales/projects/en.yml index ba6b81a5c..221ad7969 100644 --- a/config/locales/projects/en.yml +++ b/config/locales/projects/en.yml @@ -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 + 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 # diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index a58536e10..26aee543c 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -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,8 +122,19 @@ 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: 资源库 # diff --git a/config/locales/users/en.yml b/config/locales/users/en.yml index fbfe1444e..ed10c69ee 100644 --- a/config/locales/users/en.yml +++ b/config/locales/users/en.yml @@ -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 diff --git a/config/locales/users/zh.yml b/config/locales/users/zh.yml index 1362380a0..c6f7e4142 100644 --- a/config/locales/users/zh.yml +++ b/config/locales/users/zh.yml @@ -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: 技术得分 @@ -87,10 +88,9 @@ zh: label_technicl_title_associate_professor: 副教授 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: 需求 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index dc1937926..3552fde66 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -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: From 073cb07f70d3d9c35a8ac5dbd61939d32a31f80c Mon Sep 17 00:00:00 2001 From: dingxu Date: Thu, 19 Mar 2015 17:23:53 +0800 Subject: [PATCH 25/26] =?UTF-8?q?=E9=82=80=E8=AF=B7=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=EF=BC=9A=E8=A7=92=E8=89=B2=E3=80=81=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=83=BD=E4=B8=BA=E7=A9=BA=E6=B7=BB=E5=8A=A0=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E3=80=81=E5=8D=95=E4=B8=80=E8=A7=92=E8=89=B2=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9=E3=80=81=20?= =?UTF-8?q?=E5=B1=95=E5=BC=80=E6=9D=A1=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/members_controller.rb | 2 +- config/locales/projects/zh.yml | 1 + config/locales/zh.yml | 2 +- public/stylesheets/application.css | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index ba312c74a..aaaa4484d 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -109,7 +109,7 @@ class MembersController < ApplicationController end if params[:flag] unless members.present? && members.all? {|m| m.valid? } - flash[:error] = members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') + flash[:error] = members.empty? ? l(:label_user_role_null) :members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') else flash[:notice] = l(:label_invite_success) end diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index a58536e10..1bc62a000 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -179,6 +179,7 @@ zh: label_invite_email_tips: 输入好友邮箱地址,Trustie会自动为该邮箱注册用户! notice_registed_success: 您输入的邮箱为空或者该邮箱已被注册! label_email_format_error: 您所填写的电子邮件格式不正确 + label_user_role_null: 用户和角色不能留空! label_send_email: 免费发送 label_input_email: 请输入邮箱地址 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 5628598cc..486a5611a 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -129,7 +129,7 @@ zh: field_priority: 优先级 field_fixed_version: 目标版本 field_user: 用户 - field_principal: 用户/用户组 + field_principal: 用户 field_role: 角色 field_homepage: 主页 field_time: 课时 diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 742202bea..ca8f0c3b6 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -70,7 +70,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*简介*/ .project_intro{ width:220px; padding:5px 0px 10px 10px; background:#fff; color:#6d6d6d;} -.course_description{max-height: 105px;overflow:hidden;} +.course_description{max-height: 103px;overflow:hidden;} .course_description_none{max-height: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} .lg-foot:hover{ color:#787b7e;} From 6995ead66ce4acd5f1307c488ad22cbad1db4c7f Mon Sep 17 00:00:00 2001 From: whimlex Date: Thu, 19 Mar 2015 17:28:12 +0800 Subject: [PATCH 26/26] =?UTF-8?q?=E9=A1=B9=E7=9B=AEID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_projects.html.erb | 2 +- config/locales/projects/en.yml | 6 ++---- config/locales/projects/zh.yml | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 308d471fa..9c999aa05 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -93,7 +93,7 @@ <%= image_tag(url_to_avatar(@project), :style => 'width:61px; height:61px;') %>
    - 项目ID:<%= @project.id %> + <%= l(:label_project_id)%><%= @project.id %>
    diff --git a/config/locales/projects/en.yml b/config/locales/projects/en.yml index 221ad7969..5aca81426 100644 --- a/config/locales/projects/en.yml +++ b/config/locales/projects/en.yml @@ -31,7 +31,7 @@ en: # # 左边栏 # - label_id: "ID:" + label_project_id: "Projcet ID:" label_apply_project: Apply to Join label_exit_project: Exit @@ -51,6 +51,7 @@ en: project_module_boards: Forums project_module_boards_post: New Post project_module_files: Resources + label_upload_files: New File project_module_repository: Repository project_module_create_repository: New Repository @@ -102,9 +103,6 @@ en: # lable_file_sharingarea: Resources - label_upload_files: New file - - # 资源库(附件)公用 label_relation_files: Select an existing resource label_search_by_keyword: "Search by keywords" diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 26aee543c..2442f8e4f 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -34,7 +34,7 @@ zh: # # 左边栏 # - label_id: "ID:" + label_project_id: "项目ID:" label_apply_project: 申请加入 label_exit_project: 退出项目