diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 5b1e689d9..4e43514e8 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -310,7 +310,7 @@ <% end %> <% end %> <% if @issues.empty? %> -

<%= l(:label_no_data) %>

+

<%= l(:label_no_data) %>

<% else %>
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %> @@ -330,3 +330,4 @@
+ diff --git a/app/views/projects/_no_data.html.erb b/app/views/projects/_no_data.html.erb new file mode 100644 index 000000000..249a67af0 --- /dev/null +++ b/app/views/projects/_no_data.html.erb @@ -0,0 +1,4 @@ +
+
+

没有数据可供显示!

+
\ No newline at end of file diff --git a/app/views/projects/_project_issue_detail.html.erb b/app/views/projects/_project_issue_detail.html.erb index 947178cb5..7c7d3f237 100644 --- a/app/views/projects/_project_issue_detail.html.erb +++ b/app/views/projects/_project_issue_detail.html.erb @@ -58,7 +58,9 @@
  •  指派  : 

    - <%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %> + <% unless activity.assigned_to.nil? %> + <%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %> + <% end %> <%= select( :issue, :user_id, principals_options_for_isuue_list(activity.project), { :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0}, diff --git a/app/views/projects/_project_member_list.html.erb b/app/views/projects/_project_member_list.html.erb index 7bdac2ba4..eb2573d03 100644 --- a/app/views/projects/_project_member_list.html.erb +++ b/app/views/projects/_project_member_list.html.erb @@ -1,4 +1,4 @@ -
    +
    加入时间
    diff --git a/app/views/projects/_project_reply_banner.html.erb b/app/views/projects/_project_reply_banner.html.erb index 6efbf9fda..682c37a29 100644 --- a/app/views/projects/_project_reply_banner.html.erb +++ b/app/views/projects/_project_reply_banner.html.erb @@ -10,20 +10,16 @@
    <%#= format_date(activity.updated_on) %>
    <%if count>3 %>
    - <% if activity.class.to_s == 'HomeworkCommon' %> - + <% if activity.class.to_s == 'Issue' %> + 展开更多 <% elsif activity.class.to_s == 'Message' %> - - 展开更多 - - <% elsif activity.class.to_s == 'BlogComment' %> - + 展开更多 <% else %> - + 展开更多 <% end %> diff --git a/app/views/projects/member.html.erb b/app/views/projects/member.html.erb index 12944e1f5..e24dab160 100644 --- a/app/views/projects/member.html.erb +++ b/app/views/projects/member.html.erb @@ -1,17 +1,14 @@ -
    -

    <%= @subPage_title %>

    - <% if is_project_manager?(User.current, @project) %> - - <%=link_to "成员管理", :controller => 'projects', :action => 'settings', :id => @project.id, :tab => 'members' %> - - <% end %> +
    +
    +

    <%= @subPage_title %>

    + <% if is_project_manager?(User.current, @project) %> + + <%=link_to "成员管理", :controller => 'projects', :action => 'settings', :id => @project.id, :tab => 'members' %> + + <% end %> +
    +
    + <%= error_messages_for 'member' %> + <%= render :partial => @render_file, :locals => {:members => @members} %> +
    -
    - <%= error_messages_for 'member' %> - <%= render :partial => @render_file, :locals => {:members => @members} %> -
    - - - diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb index 87c19976b..26daa46a2 100644 --- a/app/views/projects/settings/_new_repositories.html.erb +++ b/app/views/projects/settings/_new_repositories.html.erb @@ -34,16 +34,16 @@ - - - + + + - - - + + +
    diff --git a/app/views/projects/settings/_new_versions.html.erb b/app/views/projects/settings/_new_versions.html.erb index a67b2f91e..1bd59dcbb 100644 --- a/app/views/projects/settings/_new_versions.html.erb +++ b/app/views/projects/settings/_new_versions.html.erb @@ -11,23 +11,23 @@ - - - - - + + + + + <% @project.shared_versions.each do |version| %> - - - - - + + +
    名称结束日期描述状态操作名称结束日期描述状态操作
    - <%= 'shared' if version.project != @project %> <%= link_to_version version %> + <%= format_date(version.effective_date) %><%=h version.description %><%= l("version_status_#{version.status}") %> + <%= format_date(version.effective_date) %><%= l("version_status_#{version.status}") %> <% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %> <%= link_to l(:button_edit), edit_version_path(version, :is_setting => true), :class => 'sy_btn_blue mr5', :remote => true %> <%= delete_link_version version_path(version, :is_setting => true), :class=>"sy_btn_grey mr5", :remote => true %> diff --git a/app/views/projects/watcherlist.html.erb b/app/views/projects/watcherlist.html.erb index a8a948a11..effef316b 100644 --- a/app/views/projects/watcherlist.html.erb +++ b/app/views/projects/watcherlist.html.erb @@ -1,30 +1,28 @@ -
    -

    <%= l(:label_user_watcher)%>

    -
    -
    -
    - 加入时间 -
    +
    +
    +

    <%= l(:label_user_watcher)%>

    +
    +
    +
    + 加入时间 +
    + + <% for user in @project.watcher_users %> +
    + + <%= user.nil? ? '' : (image_tag(url_to_avatar(user), :width => 32, :height => 32)) %> + + <%= l(:label_username)%> + <%= link_to(user.name, user_path(user),:class => "ml10 c_blue02") %> + <%= format_date(user.created_on) %> +
    +
    + <% end%> + - <% for user in @project.watcher_users %> -
    - - <%= user.nil? ? '' : (image_tag(url_to_avatar(user), :width => 32, :height => 32)) %> - - <%= l(:label_username)%> - <%= link_to(user.name, user_path(user),:class => "ml10 c_blue02") %> - <%= format_date(user.created_on) %> -
    - <% end%> +
    +
    - -
    -
    -
    - -<% html_title(l(:label_followers)) -%> - - \ No newline at end of file + <% html_title(l(:label_followers)) -%> +
    \ No newline at end of file diff --git a/app/views/pull_requests/_show.html.erb b/app/views/pull_requests/_show.html.erb index 710ebbfdf..a7dbc91f1 100644 --- a/app/views/pull_requests/_show.html.erb +++ b/app/views/pull_requests/_show.html.erb @@ -25,9 +25,24 @@ -
    - 在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %> -
    + +<% if @request.state == "merged" %> +
    + 改动已合并至 <%= @request.target_branch %> 分支 +
    +<% else %> + <% if is_project_manager?(User.current.id, @project.id) %> + <% if @request.state == "closed" %> + 该请求已被关闭 + <% else %> +
    + 在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %> +
    + <% end %> + <% end %> +<% end %> + +
      diff --git a/app/views/pull_requests/index.html.erb b/app/views/pull_requests/index.html.erb index 6f0061577..2e10d6598 100644 --- a/app/views/pull_requests/index.html.erb +++ b/app/views/pull_requests/index.html.erb @@ -41,10 +41,6 @@ }); <% else %> -
      -
      - 版本库中还没有提交代码,请先提交代码 -
      -
      + <%= render :partial => "projects/no_data" %> <% end %> diff --git a/app/views/users/_project_issue_detail.html.erb b/app/views/users/_project_issue_detail.html.erb index 81df1500b..cb160c3b5 100644 --- a/app/views/users/_project_issue_detail.html.erb +++ b/app/views/users/_project_issue_detail.html.erb @@ -62,7 +62,9 @@
    •  指派  : 

      - <%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %> + <% unless activity.assigned_to.nil? %> + <%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %> + <% end %> <%= select( :issue, :user_id, principals_options_for_isuue_list(activity.project), { :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0}, diff --git a/app/views/users/all_journals.js.erb b/app/views/users/all_journals.js.erb index 7060a7b1c..03079c96a 100644 --- a/app/views/users/all_journals.js.erb +++ b/app/views/users/all_journals.js.erb @@ -10,4 +10,8 @@ $('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :p $('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>'); <% elsif params[:type] == 'News' || params[:type] == 'Issue' || params[:type] == 'Syllabus' %> $('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>'); +<% elsif params[:type] == 'is_project_issue' %> +$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'projects/project_issue_reply', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>'); +<% elsif params[:type] == 'is_project_message' %> +$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'projects/project_message_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i,:is_course => @is_course, :is_board => @is_board}) %>'); <% end %> diff --git a/public/images/new_project/icons_smile.png b/public/images/new_project/icons_smile.png new file mode 100644 index 000000000..b760d82fc Binary files /dev/null and b/public/images/new_project/icons_smile.png differ diff --git a/public/javascripts/application.js b/public/javascripts/application.js index cd28689d6..440a090f9 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1495,6 +1495,41 @@ function expand_reply_homework(container, btnid, id, type, div_id, hw_status, us } } +// 项目中展开 +function expand_reply_project_acts(container, btnid, id, type, div_id, hw_status, user_activity_id) { + var target = $(container); + var btn = $(btnid); + if (btn.data('init') == '0') { + btn.data('init', 1); + $.get( + '/users/all_journals', + { + type: type, + id: id, + div_id: div_id, + hw_status: hw_status, + user_activity_id: user_activity_id + }, + function(data) { + } + ); + btn.html('收起回复'); + //target.show(); + } else if(btn.data('init') == '1') { + btn.data('init', 3); + btn.html('展开更多'); + target.hide(); + target.eq(0).show(); + target.eq(1).show(); + target.eq(2).show(); + } + else { + btn.data('init', 1); + btn.html('收起回复'); + target.show(); + } +} + //by yk 列表描述将文字和起来去掉空格多于100就显示省略号 function description_showwords_ellipsis(id,num){ var str = ""; diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css index b32ba32ae..7ba32756d 100644 --- a/public/stylesheets/css/common.css +++ b/public/stylesheets/css/common.css @@ -253,7 +253,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/ .w305{ width:305px;} .w350 {width:350px;} .w362 {width:362px;} -.h400{height: 400px !important;} +.h400{height:400px !important;} .w430{ width:430px;} .W440{ width:440px;} .w450 {width:450px;} @@ -271,7 +271,6 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/ .w607 {width:607px;} .w664{ width:664px;} .w683{ width:683px;} -.w350{ width:350px;} .w610{ width:610px;} .w600{ width:600px !important;} .w603{ width:603px !important;} diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index 342ac0730..615379597 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -877,6 +877,8 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;} .sy_new_table thead tr td{ border-bottom:1px solid #e5e5e5; font-weight: bold; background-image: linear-gradient(#fcfcfc, #eee);} .sy_new_table tbody tr:hover{ background:#f5f5f5;} .sy_new_table tbody tr td{ height:40px; line-height:40px; border-bottom:1px solid #e5e5e5; color:#888;} +.table-td-w180{display:inline-block;with:180px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;} +.table-td-w380{display:inline-block;with:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;} /*项目简介*/ .pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 998px;} .pro_new_info h2{ background: #eee; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px;} @@ -1008,4 +1010,8 @@ textarea.muban_textarea{ width: 98.5%;border:1px solid #ddd; background:#fff; co .alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;} .alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;} .close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;} -.close:hover{opacity: 0.5;} \ No newline at end of file +.close:hover{opacity: 0.5;} + +/* 课程大纲 */ +.icons_tishi{ width: 110px; height: 110px;margin: 135px auto 20px;} +.sy_tab_con_p{ font-size: 16px;text-align: center; margin-bottom:100px; color:#888;} \ No newline at end of file