From b80251a24730f8c2cdf1c4bd257b9830ae4a9e89 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 16 Apr 2015 15:16:15 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E9=93=BE=E6=8E=A5=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E5=A4=84=E6=94=B9=E6=88=90=E4=B8=8D=E8=83=BD=E7=82=B9=E5=87=BB?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E8=BF=87=E9=95=BF=EF=BC=8C=E5=B8=83=E5=B1=80=E5=8F=98=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_projects.html.erb | 9 +++++---- app/views/wiki/show.html.erb | 2 +- public/stylesheets/project.css | 2 +- public/stylesheets/public.css | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index fb50605b6..24f2c6ebf 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -81,7 +81,7 @@ <%= l(:label_projects_community) %> -

+

- + <%= l(:label_project_name) %><%= @project.name %> <% if @project.is_public? %> <%= l(:label_public)%> @@ -182,7 +182,7 @@

<%= l(:label_project_overview)%>:

-
+
<%= textilizable(@project.description) if @project.description && !@project.description.blank? %>
@@ -205,7 +205,7 @@
-
+
<%= render_flash_messages %> @@ -213,6 +213,7 @@ <%= call_hook :view_layouts_base_content %>
+
<%= render :partial => 'layouts/new_footer'%> diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index 1d585a571..a23aa6c04 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -73,7 +73,7 @@ <% end %> -
+

<% other_formats_links do |f| %> <%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %> <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %> diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 4cb344430..2f4ca5843 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -71,7 +71,7 @@ a:hover.problem_pic{border:1px solid #64bdd9;} .pro_txt_w{width:610px;} a.problem_name{ color:#ff5722; } a:hover.problem_name{ color:#d33503;} -a.problem_tit{ color:#0781b4; width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} +a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} a.problem_tit02{ color:#0781b4; font-weight:bold;width:400px; } a:hover.problem_tit,a:hover.problem_tit02{ color:#09658c; } .problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 16d5ccd13..9ff4985cc 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -44,6 +44,7 @@ h4{ font-size:14px; color:#3b3b3b;} .clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} .clearfix{clear:both;zoom:1} .break_word{ word-break:break-all; word-wrap: break-word;} +.hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .flow_hidden{ width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} /* Spacing */ From 9fa7b04ce51e997f5ea8ea7fc6d96713c7c150fa Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 16 Apr 2015 15:30:24 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E7=BB=84=E7=BB=87=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/settings/_new_edit.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/settings/_new_edit.html.erb b/app/views/projects/settings/_new_edit.html.erb index 246395b6e..3c897853e 100644 --- a/app/views/projects/settings/_new_edit.html.erb +++ b/app/views/projects/settings/_new_edit.html.erb @@ -17,7 +17,7 @@
  • - + <%= select_tag :organization_id,options_for_select(project_organizations_id_option,@project.organization_id),{} %>
  • From bfc83d1a8cf390149de1f0d0a9be35e74e0fdbeb Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 16 Apr 2015 15:48:13 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8D=E8=83=BD=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/settings/_new_edit.html.erb | 2 +- public/stylesheets/project.css | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/projects/settings/_new_edit.html.erb b/app/views/projects/settings/_new_edit.html.erb index 3c897853e..58c328e87 100644 --- a/app/views/projects/settings/_new_edit.html.erb +++ b/app/views/projects/settings/_new_edit.html.erb @@ -1,6 +1,6 @@ <%= labelled_form_for @project do |f| %>
      -
    • +
    • <%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
    • diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index eafceae21..3811d751b 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -378,6 +378,8 @@ blockquote { .pro_st_dis{display:block; } .pro_st_undis{display:none;} +.upbtn { margin: 40px 0px 0px 15px;display: block;padding: 2px 5px;border: 1px solid #EAEAEA;} + .upimg{ border:1px solid #eaeaea; display:block; width:60px; height:60px; padding:1px;} .upimg:hover{ border:1px solid #64bdd9; } .box{ margin-bottom:10px;} From be97e4732d32d7a961b58b3f941c44ebe47888ab Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 16 Apr 2015 15:58:38 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E7=9B=AE=E6=A0=87=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_attributes.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 5efa3a3f4..7a93668d0 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -36,8 +36,8 @@
    • - <% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %> + <%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), {:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true}, :class => "w150" %> From 332a9b45fba0fee92a7b720ad9651f29773294df Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 16 Apr 2015 16:10:24 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=B5=84=E6=BA=90=E5=BC=B9=E6=A1=86=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/views/files/_project_file_new.html.erb | 2 +- public/stylesheets/project.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/files/_project_file_new.html.erb b/app/views/files/_project_file_new.html.erb index 0ec274ee8..ad489742e 100644 --- a/app/views/files/_project_file_new.html.erb +++ b/app/views/files/_project_file_new.html.erb @@ -11,7 +11,7 @@ showModal('ajax-modal', '513px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("") - $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().css("top","40%").css("left","30%"); $('#ajax-modal').parent().addClass("popbox_polls"); } diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 3811d751b..c6b58b8f3 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -213,7 +213,7 @@ a:hover.ping_sub{ background:#14a8b9;} /*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/ /*上传资源弹出框样式*/ -.popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} +/*#popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}*/ .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; margin:15px auto;} From 611952eb0529126bb63586cb6dcfd26b89400ea2 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 16 Apr 2015 16:36:34 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=97=B6=E5=80=99=E8=AE=BE=E5=AE=9A=E9=BB=98=E8=AE=A4=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=B1=BB=E5=9E=8B=20=E6=96=B0=E5=BB=BA=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=A0=B7=E5=BC=8F=E5=BC=82=E5=B8=B8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 1 + app/views/issues/_form.html.erb | 4 ++-- app/views/issues/show.html.erb | 2 +- app/views/projects/_form.html.erb | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a70488618..51c209e9d 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -173,6 +173,7 @@ class ProjectsController < ApplicationController @project.safe_attributes = params[:project] @project.organization_id = params[:organization_id] @project.user_id = User.current.id + @project.project_new_type = 1 if validate_parent_id && @project.save @project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id') # Add current user as a project member if he is not admin diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 3afc47c20..7349a5f1d 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -4,12 +4,12 @@
      • <% if @issue.safe_attribute? 'tracker_id' %> - + <%= f.select :tracker_id, @issue.project.trackers.collect { |t| [t.name, t.id] }, {:required => true, :no_label => true}, :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", - :class => "w150" + :class => "w90" %> <% end %>
      • diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 51d92b90f..a42562c06 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -3,7 +3,7 @@ <% html_title "#{@issue.tracker.name} #{@issue.source_from}'#'#{@issue.project_index}: #{@issue.subject}" %>
        -
        + diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb index d0544cadb..1e3f4b620 100644 --- a/app/views/projects/_form.html.erb +++ b/app/views/projects/_form.html.erb @@ -10,7 +10,7 @@

        - <%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %> + <%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:0px;" %>

        <%#= f.text_field :enterprise_name, :size => 60, :style => "width:490px;" %> From ce5b2d9996f1df78e0976bfc5929f4dca749bf0f Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 16 Apr 2015 17:29:04 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E5=9B=9E=E5=A4=8D=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_project_show.html.erb | 8 ++++---- app/views/issues/_edit.html.erb | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index fa16fcb51..43cea4b4f 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -45,14 +45,14 @@

        -
        <%= l(:label_project_board_count , :count => @topic_count)%>
        +
        <%= l(:label_project_board_count , :count => @topic_count)%>
        <% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> <%= link_to l(:project_module_boards_post), new_board_message_path(@board), :class => 'problem_new_btn fl c_dorange', :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> <% end %> -
        -
        +
        +
        <% if @topics.any? %> <% @topics.each do |topic| %> @@ -67,7 +67,7 @@ <%= l(:label_post_by)%><%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %>  <%= l(:label_post_by_time)%><%= format_time topic.created_on %>
        - <%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :style =>"color:#fff;line-height: 18px;" %> + <%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :class => "talk_btn fr c_white" %>
        <% end %> diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index 5ce65ab12..fa3153012 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -5,9 +5,9 @@ <% if @edit_allowed || !@allowed_statuses.empty? %> <% end %>
        From e9cf61e0f484add972fa46057d75003523952d1f Mon Sep 17 00:00:00 2001 From: whimlex Date: Thu, 16 Apr 2015 17:56:19 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=AE=8C=E6=88=90=E5=BA=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_attributes.html.erb | 6 +++-- public/javascripts/project.js | 35 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 7a93668d0..4ce029217 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -8,7 +8,8 @@ <% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %> <%= f.select :status_id, (@allowed_statuses.collect { |p| [p.name, p.id] }), - {:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", :no_label => true}, + {:no_label => true}, + :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", :class => "w150" %> <% else %> <%= h(@issue.status.name) %> @@ -92,7 +93,8 @@
      • <% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %> <%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }), - {:required => @issue.required_attribute?('done_ratio'), :no_label => true, :onchange => "PrecentChange(this.value)"}, + {:required => @issue.required_attribute?('done_ratio'), :no_label => true}, + :onchange => "PrecentChange(this.value)", :class => "w150" %> <% end %>
      • diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 6f043c0a3..3085769ba 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -239,4 +239,39 @@ function showAndScrollTo(id, focus) { $('#'+focus).focus(); } $('html, body').animate({scrollTop: $('#'+id).offset().top}, 400); + + + + /*缺陷完成度决定缺陷状态*/ +function PrecentChange(obj){ + var _v= obj; + if(_v==100) + { + //var select=$("select[id='issue_status_id']"); + $("select[id='issue_status_id']").find("option[value='3']").attr("selected","selected"); + } + else if(_v==0) + { + //alert(1); + $("select[id='issue_status_id']").find("option[value='1']").attr("selected","selected"); + } + else if(_v!=100&&_v!=0) + { + // alert(2); + $("select[id='issue_status_id']").find("option[value='2']").attr("selected","selected"); + } +} + +// Can't use Rails' remote select because we need the form data +// 根据缺陷状态值改变完成度状态 +function updateIssueFrom(url) { + + $.ajax({ + url: url, + type: 'post', + data: $('#issue-form').serialize() + }); + +} + } \ No newline at end of file From fb0657191814db4b17af5b7c71925a0a51d94f8e Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 16 Apr 2015 17:56:45 +0800 Subject: [PATCH 09/17] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E5=BC=95=E7=94=A8=E5=BC=BA=E5=88=B6=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/quote_resource_show_project.js.erb | 2 +- app/views/messages/_project_show.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/files/quote_resource_show_project.js.erb b/app/views/files/quote_resource_show_project.js.erb index 440004357..d1a44e90f 100644 --- a/app/views/files/quote_resource_show_project.js.erb +++ b/app/views/files/quote_resource_show_project.js.erb @@ -7,5 +7,5 @@ showModal('ajax-modal', '513px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before(""); -$('#ajax-modal').parent().css("top","").css("left",""); +$('#ajax-modal').parent().css("top","30%").css("left","35%"); $('#ajax-modal').parent().addClass("popbox_polls"); \ No newline at end of file diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb index 3dbfe3a8d..069fd9d80 100644 --- a/app/views/messages/_project_show.html.erb +++ b/app/views/messages/_project_show.html.erb @@ -50,11 +50,11 @@
        ">
        <%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %>
        -
        +
        <%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %> <%= format_time(message.created_on) %>
        -

        <%= textAreailizable message,:content,:attachments => message.attachments %>

        +

        <%= textAreailizable message,:content,:attachments => message.attachments %>

        <%= link_to_attachments_course message, :author => false %>
        From 440eb8dc7f3eea315d2885d04e72b2f9b63bd765 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 16 Apr 2015 19:08:16 +0800 Subject: [PATCH 10/17] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=88=90=E5=91=98=E4=B8=80=E6=8E=92=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=202=E3=80=81=E9=A1=B9=E7=9B=AE=E5=8A=A8=E6=80=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=BC=BA=E5=88=B6=E6=8D=A2=E8=A1=8C=203=E3=80=81?= =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E6=8F=90=E7=A4=BA=E7=94=A8=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/messages/_form_project.html.erb | 2 +- app/views/projects/settings/_new_members.html.erb | 8 ++++---- app/views/projects/show.html.erb | 14 +++++++------- config/locales/zh.yml | 1 + 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/views/messages/_form_project.html.erb b/app/views/messages/_form_project.html.erb index af8aeb3a5..3e932b047 100644 --- a/app/views/messages/_form_project.html.erb +++ b/app/views/messages/_form_project.html.erb @@ -1,7 +1,7 @@ <%= error_messages_for 'message' %> <% replying ||= false %> <% extra_option = replying ? { readonly: true} : { maxlength: 200 } %> -

        <%= l(:label_message_new) %>

        +

        <%= l(:label_message_reply) %>

      • <% if replying %> diff --git a/app/views/projects/settings/_new_members.html.erb b/app/views/projects/settings/_new_members.html.erb index 0d273fc29..3356a351a 100644 --- a/app/views/projects/settings/_new_members.html.erb +++ b/app/views/projects/settings/_new_members.html.erb @@ -16,15 +16,15 @@ <%= call_hook(:view_projects_settings_members_table_header, :project => @project) %> <% members.each do |member| %>
      • - <%= link_to_user_header member.principal,false,:class => "w150 c_orange fl" %> - + <%= link_to_user_header member.principal,false,:class => "w90 c_orange fl" %> + <%= h member.roles.sort.collect(&:to_s).join(', ') %> <%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member), :method => :put, :html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}} ) do |f| %> <% roles.each do |role| %> -
          +
            <%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(role), :disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %> @@ -32,7 +32,7 @@ <% end %> <%= hidden_field_tag 'membership[role_ids][]', '' %> -
            +
            <%= l(:button_change)%> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index b45621850..d4cfd88c8 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -9,7 +9,7 @@ <% if e.forge_act_type == "ProjectCreateInfo"%>
            <%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %> -
            +
            <%= link_to e.user, user_path(e.user), :class => "problem_name c_orange fl" %> <%= l(:label_project_create) %> : <%= link_to e.project.name, :class => "problem_tit fl fb" %>


            <%= l :label_create_time %> :<%= format_time(e.project.created_on) %>

            @@ -24,7 +24,7 @@ <% if e.forge_act_type == "Issue" %>
            <%= image_tag(url_to_avatar(act.author), :width => "42", :height => "42") %> -
            +
            <%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= link_to act.author, user_path(act.author), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : @@ -44,7 +44,7 @@ <% elsif e.forge_act_type == "Journal" %>
            <%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %> -
            +
            <%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : @@ -60,7 +60,7 @@ <% elsif e.forge_act_type == "Message" %>
            <%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %> -
            +
            <%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : @@ -80,7 +80,7 @@ <% elsif e.forge_act_type == "News" %>
            <%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %> -
            +
            <%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : @@ -98,7 +98,7 @@ <% elsif e.forge_act_type == "Document" %>
            <%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %> -
            +
            <%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : @@ -113,7 +113,7 @@ <% elsif e.forge_act_type == "Attachment" %>
            <%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %> -
            +
            <%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 6f1218788..a34ab933e 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -717,6 +717,7 @@ zh: label_message_plural: 帖子 label_message_last: 最新的帖子 label_message_new: 发布新帖 + label_message_reply: 回复帖子 label_message_posted: 发帖成功 label_send_information: 给用户发送帐号信息 From d1e7777040d361ef1994078ecf51ed1b97c07f5b Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 16 Apr 2015 20:00:07 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/watcherlist.html.erb | 3 +-- config/locales/projects/zh.yml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/watcherlist.html.erb b/app/views/projects/watcherlist.html.erb index 4eacf836f..76e7c9d04 100644 --- a/app/views/projects/watcherlist.html.erb +++ b/app/views/projects/watcherlist.html.erb @@ -12,8 +12,7 @@ <%= user.nil? ? '' : (image_tag(url_to_avatar(user), :width => 32, :height => 32)) %> <%= l(:label_username)%> - <%= link_to_user(user) %> - + <%= link_to(user.name, user_path(user),:class => "ml10 c_blue02") %> <%= format_date(user.created_on) %>
            diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index 8b957d68b..bd09f2538 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -239,6 +239,7 @@ zh: # 新建问题 field_tracker: 跟踪 + field_untracker: 取消跟踪 field_subject: 主题 field_quote: 描述 label_change_properties: 修改属性 From 8babe384fd8a3d2c38569dd9dfdaf613a92286f7 Mon Sep 17 00:00:00 2001 From: whimlex Date: Thu, 16 Apr 2015 20:11:33 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/issues_helper.rb | 4 +- app/views/issues/_history.html.erb | 4 +- public/javascripts/project.js | 256 ++++++++++++++--------------- public/stylesheets/pleft.css | 2 +- public/stylesheets/project.css | 4 + 5 files changed, 132 insertions(+), 138 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 54cef5c7a..9c4fab9de 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -340,9 +340,9 @@ module IssuesHelper if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key) # Link to the attachment if it has not been removed if options[:token].nil? - value = link_to_attachment(atta, :download => true, :only_path => options[:only_path]) + value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :class=> "info_foot_num c_blue") else - value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :token => options[:token]) + value = link_to_attachment(atta, :download => true, :only_path => options[:only_path], :token => options[:token], :class=> "info_foot_num c_blue") end if options[:only_path] != false && atta.is_text? value += link_to( diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index 50ddbceee..b0f1ad38d 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -12,8 +12,8 @@

            <% if journal.details.any? %> <% details_to_strings(journal.details).each do |string| %> - <%= string %> - <% end %> +

            <%= string %>

            + <% end %> <% end %>

            diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 3085769ba..b5f769723 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -13,9 +13,10 @@ function regexName(content) { } } -function submitSerch(content) -{ - if(regexName(content)){$("#project_search_form").submit();} +function submitSerch(content) { + if (regexName(content)) { + $("#project_search_form").submit(); + } } @@ -25,15 +26,13 @@ function submitSerch(content) // // }) //}) -function expand_tools_expand(content) -{ - if (content=="invit"){ +function expand_tools_expand(content) { + if (content == "invit") { $("#expand_tools_expand_invit").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd"); $("#expand_tools_expand_invit").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt"); $("#expand_tools_expand_invit").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500); } - else - { + else { $("#expand_tools_expand").toggleClass("currentDd").siblings(".subNav").removeClass("currentDd"); $("#expand_tools_expand").toggleClass("currentDt").siblings(".subNav").removeClass("currentDt"); $("#expand_tools_expand").next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500); @@ -43,235 +42,226 @@ function expand_tools_expand(content) } // 描述显示更多信息 -function show_more_msg(){ - $("#course_description").toggleClass("course_description_none"); - var information = $("#expend_more_information"); - var arrow = $("#arrow"); - var val = information.attr("value"); - if (val=="展开更多信息" ) - { +function show_more_msg() { + $("#course_description").toggleClass("course_description_none"); + var information = $("#expend_more_information"); + var arrow = $("#arrow"); + var val = information.attr("value"); + if (val == "展开更多信息") { $("#expend_more_information").text("收起描述信息"); - information.attr("value","收起描述信息"); - arrow.attr("src","/images/jiantouup.jpg") + information.attr("value", "收起描述信息"); + arrow.attr("src", "/images/jiantouup.jpg") } - else - { + else { $("#expend_more_information").text("展开更多信息"); - information.attr("value","展开更多信息"); - arrow.attr("src","/images/jiantou.jpg") + information.attr("value", "展开更多信息"); + arrow.attr("src", "/images/jiantou.jpg") } } /////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////项目讨论区 -function regexSubject() -{ +function regexSubject() { var content = $.trim($("#message_subject").val()); - if(content.length ==0) - { + if (content.length == 0) { $("#subject_span").text("主题不能为空"); - $("#subject_span").css('color','#ff0000'); + $("#subject_span").css('color', '#ff0000'); return false; } - else - { + else { $("#subject_span").text("填写正确"); - $("#subject_span").css('color','#008000'); + $("#subject_span").css('color', '#008000'); return true; } return false; } -function regexContent() -{ +function regexContent() { var content = $.trim($("#message_content").val()); - if(content.length ==0) - { + if (content.length == 0) { $("#message_content_span").text("描述不能为空"); - $("#message_content_span").css('color','#ff0000'); + $("#message_content_span").css('color', '#ff0000'); return false; } - else - { + else { $("#message_content_span").text("填写正确"); - $("#message_content_span").css('color','#008000'); + $("#message_content_span").css('color', '#008000'); return true; } return false; } // 项目编辑和提交 -function submitProjectsBoard() -{ - if(regexSubject()&®exContent()){$("#message-form").submit();} +function submitProjectsBoard() { + if (regexSubject() && regexContent()) { + $("#message-form").submit(); + } } // 提交新闻 -function regexTitle() -{ +function regexTitle() { var name = $("#news_title").val(); - if(name.length ==0) - { + if (name.length == 0) { $("#title_notice_span").text("标题不能为空"); - $("#title_notice_span").css('color','#ff0000'); + $("#title_notice_span").css('color', '#ff0000'); $("#title_notice_span").focus(); return false; } - else if(name.length <= 60) - { + else if (name.length <= 60) { $("#title_notice_span").text("填写正确"); - $("#title_notice_span").css('color','#008000'); + $("#title_notice_span").css('color', '#008000'); return true; } - else - { + else { $("#title_notice_span").text("标题超过60个字符"); - $("#title_notice_span").css('color','#ff0000'); + $("#title_notice_span").css('color', '#ff0000'); $("#title_notice_span").focus(); return false; } } -function regexDescription() -{ +function regexDescription() { var name = $("#news_description").val(); - if(name.length ==0) - { + if (name.length == 0) { $("#description_notice_span").text("描述不能为空"); - $("#description_notice_span").css('color','#ff0000'); + $("#description_notice_span").css('color', '#ff0000'); $("#description_notice_span").focus(); return false; } - else - { + else { $("#description_notice_span").text("填写正确"); - $("#description_notice_span").css('color','#008000'); + $("#description_notice_span").css('color', '#008000'); return true; } } -function submitNews() -{ - if(regexTitle() && regexDescription()) - { +function submitNews() { + if (regexTitle() && regexDescription()) { $("#news-form").submit(); } } -function submitFocus(obj) -{ +function submitFocus(obj) { $(obj).focus(); } //当项目描述长度小于112px时,不显示更多按钮 -$(function(){ +$(function () { // alert($("#course_description_content").height()); - if($("#course_description_content").height()>112) - { + if ($("#course_description_content").height() > 112) { $("#lg-foot").show(); } }); //配置项目信息 -function course_setting(id) -{ +function course_setting(id) { //alert(id); - $('#tb_'+id).removeClass().addClass("hwork_hovertab"); - $('#tbc_0'+id).removeClass().addClass("dis"); - $('#tb_'+(3-id)).removeClass().addClass("hwork_normaltab"); - $('#tbc_0'+(3-id)).removeClass().addClass("undis"); + $('#tb_' + id).removeClass().addClass("hwork_hovertab"); + $('#tbc_0' + id).removeClass().addClass("dis"); + $('#tb_' + (3 - id)).removeClass().addClass("hwork_normaltab"); + $('#tbc_0' + (3 - id)).removeClass().addClass("undis"); } //项目类型 -function show_window () { - $('#light').css('display','block'); - $('#fade').css('display','block'); +function show_window() { + $('#light').css('display', 'block'); + $('#fade').css('display', 'block'); } -function close_window(type){ - $('#light').css('display','none'); - $('#fade').css('display','none'); +function close_window(type) { + $('#light').css('display', 'none'); + $('#fade').css('display', 'none'); - $("#" + type).attr("checked","checked"); + $("#" + type).attr("checked", "checked"); } //弹框l ///////////////////////////////////////////// //项目配置 -function project_setting(n) -{ - for(var i = 1;i < 9; i++) - { - if(i == n) - { - $("#pro_st_tb_"+i).removeClass().addClass("pro_st_hovertab"); - $("#pro_st_tbc_0"+i).removeClass().addClass("pro_st_dis"); +function project_setting(n) { + for (var i = 1; i < 9; i++) { + if (i == n) { + $("#pro_st_tb_" + i).removeClass().addClass("pro_st_hovertab"); + $("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_dis"); } - else - { - $("#pro_st_tb_"+i).removeClass().addClass("pro_st_normaltab"); - $("#pro_st_tbc_0"+i).removeClass().addClass("pro_st_undis"); + else { + $("#pro_st_tb_" + i).removeClass().addClass("pro_st_normaltab"); + $("#pro_st_tbc_0" + i).removeClass().addClass("pro_st_undis"); } } } //配置--成员---申请列表--拒绝 -function refusal_applied_member() -{ +function refusal_applied_member() { $('#new_membership').append(""); $('#new_membership').submit(); } //新闻描述显示更多信息 -function news_show_more_des(id) -{ +function news_show_more_des(id) { $('#news_description_' + id).toggleClass("news_description_none"); } -$(document).ready(function(){ - $("#issue_project_id").css("width","100%"); - $("#issue_project_id").css("overflow ","hidden"); +$(document).ready(function () { + $("#issue_project_id").css("width", "100%"); + $("#issue_project_id").css("overflow ", "hidden"); // $(".jstEditor").css("margin-left ","80px"); //issue_project_id }); function showAndScrollTo(id, focus) { - $('#'+id).show(); + $('#' + id).show(); if (focus !== null) { - $('#'+focus).focus(); - } - $('html, body').animate({scrollTop: $('#'+id).offset().top}, 400); - - - - /*缺陷完成度决定缺陷状态*/ -function PrecentChange(obj){ - var _v= obj; - if(_v==100) - { - //var select=$("select[id='issue_status_id']"); - $("select[id='issue_status_id']").find("option[value='3']").attr("selected","selected"); + $('#' + focus).focus(); } - else if(_v==0) - { - //alert(1); - $("select[id='issue_status_id']").find("option[value='1']").attr("selected","selected"); - } - else if(_v!=100&&_v!=0) - { - // alert(2); - $("select[id='issue_status_id']").find("option[value='2']").attr("selected","selected"); + $('html, body').animate({scrollTop: $('#' + id).offset().top}, 400); + + + /*缺陷完成度决定缺陷状态*/ + function PrecentChange(obj) { + var _v = obj; + if (_v == 100) { + //var select=$("select[id='issue_status_id']"); + $("select[id='issue_status_id']").find("option[value='3']").attr("selected", "selected"); + } + else if (_v == 0) { + //alert(1); + $("select[id='issue_status_id']").find("option[value='1']").attr("selected", "selected"); + } + else if (_v != 100 && _v != 0) { + // alert(2); + $("select[id='issue_status_id']").find("option[value='2']").attr("selected", "selected"); + } } -} // Can't use Rails' remote select because we need the form data // 根据缺陷状态值改变完成度状态 -function updateIssueFrom(url) { - - $.ajax({ - url: url, - type: 'post', - data: $('#issue-form').serialize() - }); - -} + function updateIssueFrom(url) { + + $.ajax({ + url: url, + type: 'post', + data: $('#issue-form').serialize() + }); + + } + +// firefox pre标签换行 + $(document).ready(function () { + var userAgent = navigator.userAgent.toLowerCase(); + var browser = { + version: (userAgent.match(/.+(?:rv|it|ra|ie)[/: ]([d.]+)/) || [])[1], + safari: /webkit/.test(userAgent), + opera: /opera/.test(userAgent), + msie: /msie/.test(userAgent) && !/opera/.test(userAgent), + mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent) + }; + if (browser.mozilla || browser.opera) { + $("pre").addClass("break_word_firefox"); + } + else { + $("pre").addClass("break_word"); + } + + }); + } \ No newline at end of file diff --git a/public/stylesheets/pleft.css b/public/stylesheets/pleft.css index a64d3671f..cc7e18465 100644 --- a/public/stylesheets/pleft.css +++ b/public/stylesheets/pleft.css @@ -50,7 +50,7 @@ a:hover.subnav_green{ background:#14ad5a;} .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} .course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;} .course_description_none{max-height: none;} -.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;} +.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} .lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} /****标签(和资源库的tag样式一致)***/ .project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index c6b58b8f3..556623e55 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -501,3 +501,7 @@ a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px p.other-formats { text-align: right; font-size:0.9em; color: #666; } .other-formats span + span:before { content: "| "; } + +/*pre标签换行*/ +.break_word{word-break: break-all;word-wrap: break-word;} +.break_word_firefox{white-space: pre-wrap;word-break: break-all;} From 0ea683e1b497f88a004d588cf5119a15cde3841e Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 17 Apr 2015 07:45:37 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E4=BF=AE=E6=94=B9issue=E4=B8=AD=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E9=99=84=E4=BB=B6=E7=9A=84=E7=BC=A9=E7=95=A5=E5=9B=BE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 14 ++++++++++++++ app/views/attachments/_project_file_links.html.erb | 6 ++---- app/views/issues/_edit.html.erb | 4 ++-- app/views/issues/_history.html.erb | 2 +- app/views/issues/show.html.erb | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index dc52de3e3..599f27215 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -325,6 +325,20 @@ module ApplicationHelper :title => attachment.filename end + def thumbnail_issue_tag(attachment) + imagesize = attachment.thumbnail(:size => "50*50") + imagepath = named_attachment_path(attachment, attachment.filename) + if imagesize + link_to image_tag(imagesize), + imagepath, + :title => attachment.filename + else + link_to image_tag(imagepath , height: '73', width: '100'), + imagepath, + :title => attachment.filename + end + end + # 图片缩略图链接 def thumbnail_small_tag(attachment) imagesize = attachment.thumbnail(:size => "200*200") diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index d32025787..7a9d1a6ca 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -5,7 +5,7 @@ <%if is_float%>
            <% end%> - + <% if options[:length] %> <%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%> <% else %> @@ -62,11 +62,9 @@ <% if defined?(thumbnails) && thumbnails %> <% images = attachments.select(&:thumbnailable?) %> <% if images.any? %> -
            <% images.each do |attachment| %> -
            <%= thumbnail_tag(attachment) %>
            +
            <%= thumbnail_issue_tag(attachment) %>
            <% end %> -
            <% end %> <% end %>
            diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index fa3153012..1266f4611 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -18,7 +18,7 @@ <%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
            <% end %> -
            说明 +
            回复 <%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
            @@ -29,7 +29,7 @@ - +
            diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index 50ddbceee..8239517c0 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -13,7 +13,7 @@ <% if journal.details.any? %> <% details_to_strings(journal.details).each do |string| %> <%= string %> - <% end %> + <% end %> <% end %>

            diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index a42562c06..d68e1fc7d 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -115,7 +115,7 @@
            <% end %> -
            +

            <%= l(:button_submit) %> From fbcd9f9a96081e1bad159221e3ab940000c7d809 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 17 Apr 2015 08:28:07 +0800 Subject: [PATCH 14/17] =?UTF-8?q?wiki=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../attachments/_project_file_links.html.erb | 2 +- app/views/wiki/show.html.erb | 2 +- public/stylesheets/project.css | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index 7a9d1a6ca..97cbefce9 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -53,7 +53,7 @@ <% end %> <% if options[:author] %> - <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>, + <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange ml20" %>, <%= format_time(attachment.created_on) %> <% end %> diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index a23aa6c04..28fab1243 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -45,7 +45,7 @@ <% end %>
            <%= render(:partial => "wiki/content", :locals => {:content => @content}) %> -<%= link_to_attachment_project @page, :author => false %> +<%= link_to_attachment_project @page, :author => true %>
            diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index c6b58b8f3..e3b124474 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -466,6 +466,21 @@ img.ui-datepicker-trigger { .wiki_con_box{ line-height:1.9; color:#2d2d2d;} .wiki_page_con{ border-bottom:1px dashed #CCC; margin-bottom:10px; padding-bottom:10px;} #wiki_new_box{ display:none;} +/*wiki显示附加*/ +.wiki-page { + font-size: 14px; + color: #09658C !important; + font-weight: bold; + width: 630px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + margin-bottom: 10px; +} +/*.author{*/ + /*color: #FF5722;*/ + /*margin-left:20px;*/ +/*}*/ /*里程碑进度条*/ table.progress { @@ -501,3 +516,4 @@ a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px p.other-formats { text-align: right; font-size:0.9em; color: #666; } .other-formats span + span:before { content: "| "; } + From fec0a7472dd889dd4ab916972ec5910313166ea0 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 17 Apr 2015 08:43:58 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E6=96=B0=E9=97=BB=E6=8D=A2=E8=A1=8C?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_project_news.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index 54f6dc70b..75b51ab6c 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -29,7 +29,7 @@ <%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %> <%= l(:label_add_news) %>:<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
            -

            <%= news.description %>

            +

            <%= news.description %>

            <%= l(:label_create_time) %> :<%= format_time(news.created_on) %>
            From 54b81bdfb3e19be7ed54916f4f9b2724d60b7df1 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 17 Apr 2015 10:13:47 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 10 ++++++++++ app/views/attachments/_project_file_links.html.erb | 2 +- app/views/layouts/_join_exit_project.html.erb | 2 +- app/views/layouts/base_projects.html.erb | 5 ++--- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 599f27215..b4526c1f5 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -49,6 +49,16 @@ module ApplicationHelper end end + def get_project_type_css(value) + if value == 1 + "pr_friend" + elsif value == 1 + "pr_keyan" + else + "pr_kafa" + end + end + # Time 2015-03-24 16:38:05 # Author lizanle # Description after save后需要进行资源记录的更新 diff --git a/app/views/attachments/_project_file_links.html.erb b/app/views/attachments/_project_file_links.html.erb index 97cbefce9..d8b53acd0 100644 --- a/app/views/attachments/_project_file_links.html.erb +++ b/app/views/attachments/_project_file_links.html.erb @@ -53,7 +53,7 @@ <% end %> <% if options[:author] %> - <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange ml20" %>, + <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>, <%= format_time(attachment.created_on) %> <% end %> diff --git a/app/views/layouts/_join_exit_project.html.erb b/app/views/layouts/_join_exit_project.html.erb index 64e9f64d2..13baae37f 100644 --- a/app/views/layouts/_join_exit_project.html.erb +++ b/app/views/layouts/_join_exit_project.html.erb @@ -10,6 +10,6 @@ <% if ((User.current.member_of? @project) && User.current.login? && User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project)) %> <%= link_to "#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %> - <%= link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%> + <%= link_to "#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%> <% end %>
            diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 24f2c6ebf..d71722ce8 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -182,7 +182,7 @@

            <%= l(:label_project_overview)%>:

            -
            +
            <%= textilizable(@project.description) if @project.description && !@project.description.blank? %>
            @@ -205,7 +205,7 @@
            - +
            <%= render_flash_messages %> @@ -213,7 +213,6 @@ <%= call_hook :view_layouts_base_content %>
            -
            <%= render :partial => 'layouts/new_footer'%> From 19617680316b3ea591d67211a8ff1b888f545fc8 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 17 Apr 2015 10:37:40 +0800 Subject: [PATCH 17/17] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=89=8D=E5=8E=BB=E6=8E=89=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84?= =?UTF-8?q?*=20=E5=8E=BB=E6=8E=89=E8=B7=9F=E8=B8=AA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_action_menu.html.erb | 2 +- app/views/issues/_form.html.erb | 34 +++++++++++++------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index 4b23897d3..49ea0d57e 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -1,5 +1,5 @@ -<%= watcher_link_issue(@issue, User.current) %> +<%#= watcher_link_issue(@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 => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %> diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 7349a5f1d..5679c92d4 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -52,7 +52,7 @@
          • <% if @issue.safe_attribute? 'description' %> - + <%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %> <%= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %> <%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %> @@ -87,7 +87,7 @@

          • - + <%= render :partial => 'attachments/form', :locals => {:container => @issue} %>
          • @@ -95,22 +95,22 @@ <%= render :partial => 'issues/attributes' %>
            -
            - + + - - <%= link_to "", - {:controller => 'watchers', :action => 'new', :project_id => @issue.project}, - :remote => true, - :method => 'get', + + <%#= link_to "", +# {:controller => 'watchers', :action => 'new', :project_id => @issue.project}, +# :remote => true, +# :method => 'get', :class => "pic_sch mt5 ml5" %> - - <%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript watchers_autocomplete_for_user_path(:user => @available_watchers, :format => 'js', :flag => 'ture') }')" %> -
            - - <%= watchers_checkboxes(@issue, @available_watchers) %> - -
            -
            + + <%#= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript watchers_autocomplete_for_user_path(:user => @available_watchers, :format => 'js', :flag => 'ture') }')" %> + + + + + + <%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %> <% end %> \ No newline at end of file