diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7fb0dcb7e..823db4729 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -488,6 +488,14 @@ module ApplicationHelper end end + def render_project_settings_tabs(tabs) + if tabs.any? + render :partial => 'common/project_tab', :locals => {:tabs => tabs} + else + content_tag 'p', l(:label_no_data), :class => "nodata" + end + end + # Renders the project quick-jump box def render_project_jump_box return unless User.current.logged? diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 6a708051a..17c39b3fe 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -67,6 +67,18 @@ module IssuesHelper s.html_safe end + def link_to_issue_type + if column_content[1].to_s == "缺陷" + class_type = "red_btn_cir ml10" + elsif column_content[1] == "功能" + class="blue_btn_cir ml10" + elsif column_content[1] == "支持" + class="green_btn_cir ml10" + else + class_type="orange_btn_cir ml10"> + end + end + def render_issue_subject_with_tree(issue) s = '' ancestors = issue.root? ? [] : issue.ancestors.visible.all diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 3c1663fcb..4a790790e 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -29,7 +29,7 @@ module ProjectsHelper {:name => 'modules', :action => :select_project_modules, :partial => 'projects/settings/modules', :label => :label_module_plural}, {:name => 'members', :action => :manage_members, :partial => 'projects/settings/members', :label => :label_member_plural}, {:name => 'versions', :action => :manage_versions, :partial => 'projects/settings/versions', :label => :label_version_plural}, - {:name => 'categories', :action => :manage_categories, :partial => 'projects/settings/issue_categories', :label => :label_issue_category_plural}, + # {:name => 'categories', :action => :manage_categories, :partial => 'projects/settings/issue_categories', :label => :label_issue_category_plural}, # {:name => 'wiki', :action => :manage_wiki, :partial => 'projects/settings/wiki', :label => :label_wiki}, {:name => 'repositories', :action => :manage_repository, :partial => 'projects/settings/repositories', :label => :label_repository_plural}, #{:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural}, diff --git a/app/views/common/_project_tab.html.erb b/app/views/common/_project_tab.html.erb new file mode 100644 index 000000000..95ac48c59 --- /dev/null +++ b/app/views/common/_project_tab.html.erb @@ -0,0 +1,28 @@ +<% selected_tab = params[:tab] ? params[:tab].to_s : tabs.first[:name] %> +
+
+ + +
+
+ + +<% tabs.each do |tab| -%> + <%= content_tag('div', render(:partial => tab[:partial], :locals => {:tab => tab} ), + :id => "tab-content-#{tab[:name]}", + :style => (tab[:name] != selected_tab ? 'display:none' : nil), + :class => 'hwork_normaltab') %> +<% end -%> diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index fb2fa9e55..0f86f466e 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -6,6 +6,7 @@ //issue_project_id } + <%= labelled_fields_for :issue, @issue do |f| %> <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %> @@ -22,8 +23,8 @@ <% if @issue.safe_attribute? 'tracker_id' %>

<%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, {:required => true}, - :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %>

- + :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %>

+ <% end %> diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 727e7a1a5..5a05501d9 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -5,15 +5,15 @@ <% end %>
- <% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %> <% unless issue.author.nil? || issue.author.name == "Anonymous" %> - <%= image_tag(url_to_avatar(issue.author), :width => "42", :height => "42") %> +
<%= link_to issue.author.name, user_path(issue.author), :class => "problem_name c_orange fl" %> - <%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>): - <%=link_to column_content[4], issue_path(issue.id), :class => "problem_tit fl" %>
-

<%= textilizable issue, :description %>


+ <%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>): + <%=link_to column_content[4], issue_path(issue.id), :class => "problem_tit02 fl" %> + +

<% unless issue.assigned_to_id.nil? %> <%= l(:field_assigned_to) %> @@ -22,6 +22,8 @@ <%= l(:label_updated_time_on, format_date(issue.updated_on)).html_safe %>

+ 001 +
<% end %>
diff --git a/app/views/issues/new.html.erb b/app/views/issues/new.html.erb index 51ebd139e..a2facd5ab 100644 --- a/app/views/issues/new.html.erb +++ b/app/views/issues/new.html.erb @@ -26,9 +26,9 @@

<% end %> - +

<%= render :partial => 'attachments/form', :locals => {:container => @issue} %>

- + <% if @issue.safe_attribute? 'watcher_user_ids' -%>

<% end %> @@ -170,10 +167,18 @@
-

<%= l(:label_project_overview) %>

<%= @project.description %> +

<%= l(:label_course_brief_introduction)%>:

+
+ <%= textilizable(@project.description) if @project.description && !@project.description.blank? %> +
-
<%= l(:label_expend_information) %>
-
+
+ <%= l(:label_expend_information)%> + + + +
+

<%= l(:label_tag)%>:

diff --git a/app/views/projects/_project_members.html.erb b/app/views/projects/_project_members.html.erb new file mode 100644 index 000000000..3f91f9269 --- /dev/null +++ b/app/views/projects/_project_members.html.erb @@ -0,0 +1,49 @@ +
+ +
+
+

添加成员

+ <%= form_for(@member, {:as => :membership, :url => course_memberships_path(@project), :remote => true, :method => :post}) do |f| %> + + <% end%> +
\ No newline at end of file diff --git a/app/views/projects/settings.html.erb b/app/views/projects/settings.html.erb index a5ecac20a..68f49689b 100644 --- a/app/views/projects/settings.html.erb +++ b/app/views/projects/settings.html.erb @@ -4,6 +4,6 @@ <% if @project.project_type == 1 %> <%= render_tabs course_settings_tabs %> <% else %> - <%= render_tabs project_settings_tabs %> + <%= render_project_settings_tabs project_settings_tabs %> <% end %> <% html_title(l(:label_settings)) -%> diff --git a/public/javascripts/project.js b/public/javascripts/project.js index bdeb446d0..6dc772f1e 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -127,3 +127,21 @@ function submitFocus(obj) { $(obj).focus(); } + +//当项目描述长度小于112px时,不显示更多按钮 +$(function(){ + if($("#course_description_content").height()>112) + { + $("#lg-foot").show(); + } +}); + +//配置项目信息 +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"); +} \ No newline at end of file diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index c6445971d..b79b78beb 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -52,22 +52,37 @@ a.invi_search_btn{ background:#15bccf; color:#fff; text-align: center; width:40p a:hover.invi_search_btn{ background:#0da1b2; border:1px solid #0da1b2;} .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_top{ margin:10px 0 ;} +.problem_search_input{ border:1px solid #64bdd9; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:5px;} a.problem_search_btn{ background:#64bdd9; color:#fff; text-align: center; width:40px; height:22px;border:1px solid #64bdd9; padding-top:2px; cursor:pointer;} a:hover.problem_search_btn{ background:#3da1c1; border:1px solid #3da1c1;} -a.problem_new_btn{ margin-left:10px; border:1px solid #ff7143; color:#ff7143; padding:1px 3px; font-size:12px; text-align:center; padding-top:2px;} +a.problem_new_btn{ margin-left:10px; border:1px solid #ff7143; color:#ff7143; width:60px; height:21px; font-size:12px; text-align:center; padding-top:3px;} a:hover.problem_new_btn{ background:#ff7143; color:#fff;} .problem_p{ color:#535252; margin-top:5px;} .problem_p span{ color:#ff3e00;} a.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3; margin-top:5px;} a:hover.problem_pic{border:1px solid #64bdd9;} -.problem_txt{ width:610px; margin-left:10px; color:#777777;} -a.problem_name{ color:#ff5722;} +.issues_icon{ background:url(../images/public_icon.png) 0 -342px no-repeat; width:16px; height:21px;} +.problem_txt{ width:600px; margin-left:10px; color:#777777; } +.pro_txt_w{width:610px;} +a.problem_name{ color:#ff5722; } a:hover.problem_name{ color:#d33503;} -a.problem_tit{ color:#0781b4; width:430px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} -a:hover.problem_tit{ color:#09658c; } +a.problem_tit{ color:#0781b4; 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;} +a.pro_mes{ float:left; color:#a0a0a0; display:block; width:100px; height:20px; } +a.pro_mes_w{ height:20px; float:left;display:block; color:#999999;} + +.pro_page_top{ font-size:14px; border-bottom:2px solid #64bdd9; margin-bottom:10px; padding-bottom:5px;} +.pro_page_tit{color:#3e4040; font-weight:bold;width:480px; float:left; font-size:14px; margin-bottom:5px;} +.pro_pic_box{ margin-left:60px; } +.pro_pic{ width:100px; border:2px solid #CCC; margin:10px 0;} +.pro_info_box{ margin-left:60px; background:#f0fbff; height:80px; padding:10px 0;} +.pro_info_box ul{} +.pro_info_box ul li{ margin-bottom:10px;} +.pro_info_p{ color:#0781b4; float:left; } +.edit_pro_box{overflow:hidden;display:none; margin-bottom:30px; border-bottom:1px dashed #CCC; padding-bottom:10px;} /****翻页***/ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; } ul.wlist li{float: left;} @@ -280,4 +295,35 @@ a:hover.st_img { border:1px solid #1c9ec7; } .ml65{ margin-left:65px;} a:hover.st_add{ color:#ff8e15;} .classbox_on{ border:1px solid #f8df8c; background:#f6f098; padding:0 3px; float:left; margin-left:15px;} -.classbox_on a{ color:#716cad;} \ No newline at end of file +.classbox_on a{ color:#716cad;} + +/*项目配置*/ +.hwork_new{ color:#4c4c4c;} +.c_red{ color:#F00;} +.hwork_input{ border:1px solid #64bdd9; height:22px; width:555px; background:#fff; margin-bottom:10px; padding:5px;} +.hwork_input02{ border:1px solid #64bdd9; height:15px; width:120px; background:#fff; margin-bottom:10px; padding:5px;} +.hwork_text{ border:1px solid #64bdd9; height:100px;width:555px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;} +.hwork_new ul li{ } +.ml21{ margin-left:21px;} +.ml9{ margin-left:9px;} +.hwork_ttl{height:24px;} +.hwork_ctt{height:auto; padding-left:10px;clear:both;} +.hwork_tb_{ border-bottom:3px solid #e4e4e4; text-align:center;} +.hwork_tb_ ul{height:24px;} +.hwork_tb_ li{float:left;height: 24px;width: auto; padding:0 10px;cursor:pointer;} +.hwork_normaltab { color:#15bccf ; border-bottom:3px solid #e4e4e4; } +.hwork_hovertab { color:#656767; font-weight:bold; border-bottom:3px solid #15bccf; } +.hwork_dis{display:block; } +.hwork_undis{display:none;} +.project_none{ display:none;} +.about_project{ overflow:hidden;display:none;} +/* 新建问题 */ +.newpro_box{ color:#6d6d6d;} +.newpro_box02{ color:#6d6d6d; margin-bottom:10px; } +.newpro_box ul li{ } +.newpro_box input{ height:26px; float:left; margin-bottom:10px;} +.newpro_box textarea{ height:150px; float:left; margin-bottom:10px;} +.newpro_box select{ height:26px; float:left; margin-bottom:10px;} +.label{ width:80px; text-align:right; font-size:14px; display:block; float:left;} +.label02{ width:110px; text-align:right; font-size:14px; display:block; float:left;} +.collapsible{ border-left:none;border-right:none;border-bottom:none; border-top:1px solid #e4e4e4; padding-top:10px; } diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 8f2563168..77d4db195 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -8,11 +8,42 @@ a:link,a:visited{color:#7f7f7f;text-decoration:none;} a:hover,a:active{color:#000;} /*常用*/ +select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; } +.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; margin-bottom:10px; background:#dbdbdb;} +.sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;} +table{ background:#fff;} +.more{ font-weight:normal; color:#999; font-size:12px;} +.no_line{ border-bottom:none;} +.no_border{ border:none;} + +/* font & color */ +h2{ font-size:18px; color:#15bccf;} +h3{ font-size:14px; color:#e8770d;} +h4{ font-size:14px; color:#3b3b3b;} +.f12{font-size:12px; font-weight:normal;} +.f14{font-size:14px;} +.f16{font-size:16px;} +.f18{font-size:18px;} +.fb{font-weight:bold;} +.lh20{line-height:20px;} +.lh22{line-height:22px;} +.lh24{line-height:24px;} +.lh26{line-height:26px;} +.fmYh{font-family:"MicroSoft Yahei";} +.font999{ color:#999;} +.fontRed{color:#770000;} + +/* Float & Clear */ .cl{ clear:both; overflow:hidden; } -.fl{ float: left;} -.fr{ float:right;} +.fl{float:left;display:inline;} +.fr{float:right;display:inline;} .f_l{ float:left;} .f_r{ float:right;} +.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;} + +/* Spacing */ .ml2{ margin-left:2px;} .ml3{ margin-left:3px;} .ml4{ margin-left:4px;} @@ -21,6 +52,7 @@ a:hover,a:active{color:#000;} .ml10{ margin-left:10px;} .ml15{ margin-left:15px;} .ml20{ margin-left:20px;} +.ml40{ margin-left:40px;} .ml45{ margin-left:45px;} .ml55{ margin-left:55px;} .ml30{ margin-left:30px;} @@ -38,10 +70,13 @@ a:hover,a:active{color:#000;} .mb5{ margin-bottom:5px;} .mb10{ margin-bottom:10px;} .pl15{ padding-left:15px;} +.w90{ width:90px;} +.w150{ width:150px;} .w280{ width:280px;} .w430{ width:470px;} .w520{ width:520px;} .w557{ width:557px;} +.w583{ width:583px;} .w350{ width:350px;} .w610{ width:610px;} .w600{ width:600px;} @@ -49,14 +84,11 @@ a:hover,a:active{color:#000;} .h50{ height:50px;} .h150{ height:150px;} -h2{ font-size:18px; color:#15bccf;} -h3{ font-size:14px; color:#e8770d;} -h4{ font-size:14px; color:#3b3b3b;} - +/* Font & background Color */ a.b_grey{ background: #F5F5F5;} a.b_dgrey{ background: #CCC;} -a.c_orange{color:#e8770d;} -a:hover.c_orange{color: #F30;} +a.c_orange{color:#ff5722;} +a:hover.c_orange{color: #d33503;} a.c_lorange{color:#ff9900;} a:hover.c_lorange{color:#fff;} a.c_blue{ color:#15bccf;} @@ -75,10 +107,6 @@ a:hover.c_blue02{color: #0781b4;} a.c_red{ color:#F00;} a:hover.c_red{ color: #C00;} -.f14{ font-size:14px;} -.fb{ font-weight:bold;} -.f12{ font-size:12px; font-weight:normal;} - .b_grey{ background: #F5F5F5;} .b_dgrey{ background: #CCC;} .c_orange{color:#e8770d;} @@ -91,6 +119,7 @@ a:hover.c_red{ color: #C00;} .b_green{background:#28be6c;} .b_w{ background:#fff;} +/* commonBtn */ .grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;} a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;} a:hover.grey_btn{ background:#717171; color:#fff;} @@ -100,19 +129,21 @@ a:hover.blue_btn{ background:#329cbd;} .nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;} .more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;} .upbtn{ margin:42px 0 0 10px; border:none;} +.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} +.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;} /* commonpic */ .pic_date{ display:block; background:url(../images/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; float:left;} .pic_add{ display:block; background:url(../images/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; float:left;} .pic_sch{ display:block; background:url(../images/public_icon.png) -31px -195px no-repeat; width:16px; height:15px; float:left;} +.pic_mes{ display:block; background:url(../images/public_icon.png) 0px -376px no-repeat; width:20px; height:15px; padding-left:18px;} +.pic_img{ display:block; background:url(../images/public_icon.png) -31px -419px no-repeat; width:20px; height:15px; } +.pic_del{ display:block; background:url(../images/public_icon.png) 0px -235px no-repeat; width:20px; height:15px; } + -.more{ font-weight:normal; color:#999; font-size:12px;} -.no_line{ border-bottom:none;} -select,input,textarea{ border:1px solid #ccc; background:#fff; color:#999; padding-left:5px;} -.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;} -.sub_btn:hover{ background:#999; color:#fff; } -table{ background:#fff;} /*框架主类容*/ #Container{ width:940px; margin:0 auto; } @@ -151,7 +182,7 @@ div#menu ul ul a.parent {background: url(../images/item.png) -20px 6px no-repea div#menu ul ul a.parent:hover {background: url(../images/item.png) -20px -11px no-repeat;} /* menu::level1 */ div#menu a { padding: 5px 12px 0 10px;line-height: 30px; color: #fff;} -/*div#menu li { background: url(../images/main-delimiter.png) 98% 4px no-repeat; }*/ +div#menu li { background: url(images/main-delimiter.png) 98% 4px no-repeat; } div#menu li.last { background: none; } /* menu::level2 */ div#menu ul ul li { background: none; } @@ -164,7 +195,6 @@ div#menu ul ul li {width: 100%;} div#menu ul ul ul {padding: 0;margin: -38px 0 0 92px !important; width:140px; } div#menu ul ul ul li a{ width:125px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf;} - /*主类容*/ #Main{ background:#fff; margin-bottom:10px;} #content{} @@ -217,7 +247,8 @@ a:hover.close_btn {background-position:-66px 0;} .show_btn {background-position:-119px 0;} .msgserver a {color:#15bccf; } .msgserver a:hover { text-decoration:underline; } -.break_word{word-break: break-all;word-wrap: break-word;} + + /***** Ajax indicator ******/ #ajax-indicator { position: absolute; /* fixed not supported by IE */ @@ -324,6 +355,7 @@ div.flash.warning, .conflict { .conflict-details {font-size:80%;} /***** end Flash & error messages ****/ + /*弹出框*/ .black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);} .white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}