Merge branch 'develop' into 'develop'

项目没有数据的页面调整为新版;项目3类成员页面调整;组织列表新增新建功能;issue显示加长;

项目没有数据的页面调整为新版;项目3类成员页面调整;组织列表新增新建功能;issue显示加长;

See merge request !35
This commit is contained in:
黄井泉 2016-12-02 13:36:25 +08:00
commit 9a83b81269
15 changed files with 57 additions and 29 deletions

View File

@ -543,12 +543,12 @@ class ProjectsController < ApplicationController
@users -= watched.watcher_users if @watched @users -= watched.watcher_users if @watched
end end
@watchers = @project.watcher_users @watchers = @project.watcher_users
@limit = 20 @limit = 32
@is_remote = true @is_remote = true
@watchers_count = @watchers.count @watchers_count = @watchers.count
@watcher_pages = Paginator.new @watchers_count, @limit, params['page'] || 1 @watcher_pages = Paginator.new @watchers_count, @limit, params['page'] || 1
@offset ||= @watcher_pages.offset @offset ||= @watcher_pages.offset
@watchers = paginateHelper @watchers, 20 @watchers = paginateHelper @watchers, @limit
end end
end end
@ -611,14 +611,14 @@ class ProjectsController < ApplicationController
@applied_members = appied_project_members(@project, @members) @applied_members = appied_project_members(@project, @members)
end end
end end
@members = paginateHelper @members @members = paginateHelper @members, 32
end end
def member_forked def member_forked
@forked_projects = Project.where(:forked_from_project_id => @project.id) @forked_projects = Project.where(:forked_from_project_id => @project.id)
@limit = 20 @limit = 32
@is_remote = true @is_remote = true
@forked_count = @forked_projects.count @forked_count = @forked_projects.count
@forked_pages = Paginator.new @forked_count, @limit, params['page'] || 1 @forked_pages = Paginator.new @forked_count, @limit, params['page'] || 1

View File

@ -94,6 +94,7 @@
<%= render :partial => "files/tag_yun_project", :locals => {:tag_list => @tag_list,:project => @project, :tag_name => @tag_name}%> <%= render :partial => "files/tag_yun_project", :locals => {:tag_list => @tag_list,:project => @project, :tag_name => @tag_name}%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<% if @tip_all_attachments > 0 %>
<div class="re_con_top"> <div class="re_con_top">
<p class="f_l fontBlue f_b f_14" id="tip_attachment_count"> <p class="f_l fontBlue f_b f_14" id="tip_attachment_count">
<%= render :partial => "files/tip_attachment_count" %> <%= render :partial => "files/tip_attachment_count" %>
@ -124,5 +125,8 @@
<div id="course_list"> <div id="course_list">
<%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %> <%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %>
</div> </div>
<% else %>
<%= render :partial => "projects/no_data" %>
<% end %>
</div> </div>
<%# html_title(l(:label_attachment_plural)) -%> <%# html_title(l(:label_attachment_plural)) -%>

View File

@ -4,7 +4,7 @@
</div> </div>
<div class="clear"> <div class="clear">
<div> <div>
<ul class="new_roadmap_nav fl" > <ul class="new_roadmap_nav fl" style="margin-left: 0px">
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);"> <li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
<%= link_to "所有<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@issues_filter.count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %> <%= link_to "所有<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@issues_filter.count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
</li> </li>

View File

@ -214,6 +214,9 @@
</div><!--issues_statistics end--> </div><!--issues_statistics end-->
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fr " >新建</a> <a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fr " >新建</a>
</div> </div>
<% if @issues.empty? %>
<%= render :partial => "projects/no_data" %>
<% else %>
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'xls', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %> <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'xls', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
<%= hidden_field_tag 'set_filter', '1' %> <%= hidden_field_tag 'set_filter', '1' %>
@ -236,7 +239,6 @@
<%= calendar_for('issue_create_date_start_show')%> <%= calendar_for('issue_create_date_start_show')%>
</div> </div>
</div> </div>
<div class="issues_con_list" style="position: relative;"> <div class="issues_con_list" style="position: relative;">
<ul id="issues_list_nav" > <ul id="issues_list_nav" >
<li id="issues_list_nav_1" onclick="HoverLi(1);all_reset_form();" class="issues_nav_hover"> <li id="issues_list_nav_1" onclick="HoverLi(1);all_reset_form();" class="issues_nav_hover">
@ -309,9 +311,7 @@
</div><!--issues_filter end--> </div><!--issues_filter end-->
<% end %> <% end %>
<% end %> <% end %>
<% if @issues.empty? %>
<p class="nodata mt10"><%= l(:label_no_data) %></p>
<% else %>
<div id="issue_list"> <div id="issue_list">
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %> <%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
</div> </div>

View File

@ -1,4 +1,4 @@
<div class="pro_new_info mb10"> <div class="pro_new_info">
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div> <div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
<p class="sy_tab_con_p ">没有数据可供显示!</p> <p class="sy_tab_con_p ">没有数据可供显示!</p>
</div> </div>

View File

@ -1,3 +1,4 @@
<% if @forked_count > 0 %>
<div class="pro_new_info mb10"> <div class="pro_new_info mb10">
<h2 class="clear">成员<span class="fr pro_new_font mr15" >本页面展示Fork了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2> <h2 class="clear">成员<span class="fr pro_new_font mr15" >本页面展示Fork了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
<ul class="clear pro_new_users_box"> <ul class="clear pro_new_users_box">
@ -24,4 +25,8 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% else %>
<div class="mb10">
<%= render :partial => "projects/no_data" %>
</div>
<% end %>

View File

@ -1,3 +1,4 @@
<% if @watchers.count > 0 %>
<div class="pro_new_info mb10"> <div class="pro_new_info mb10">
<h2 class="clear">成员<span class="fr pro_new_font mr15" > 本页面展示关注了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2> <h2 class="clear">成员<span class="fr pro_new_font mr15" > 本页面展示关注了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
<ul class="clear pro_new_users_box"> <ul class="clear pro_new_users_box">
@ -24,6 +25,11 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% else %>
<div class="mb10">
<%= render :partial => "projects/no_data" %>
</div>
<% end %>

View File

@ -62,6 +62,8 @@
</script> </script>
<% else %> <% else %>
<div class="mb10">
<%= render :partial => "projects/no_data" %> <%= render :partial => "projects/no_data" %>
</div>
<% end %> <% end %>

View File

@ -1,11 +1,11 @@
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher">系统提示</span> <span class="newsBlue homepageNewsPublisher">系统提示</span>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的课程成员申请:</span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的班级成员申请:</span>
</li> </li>
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl"> <li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
<a href="javascript:void(0);" class="newsGrey"> <a href="javascript:void(0);" class="newsGrey">
<% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教"}" %> <% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教"}" %>
<%= link_to content, user_path(User.find(ma.course_message_id), :course_id => ma.course_id), <%= link_to content, user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %> :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
<!--:onmouseover => "message_titile_show($(this),event)",--> <!--:onmouseover => "message_titile_show($(this),event)",-->
@ -14,7 +14,7 @@
</li> </li>
<div style="display: none" class="message_title_red system_message_style"> <div style="display: none" class="message_title_red system_message_style">
<p> <p>
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的课程成员申请,信息如下: <%= User.current.lastname + User.current.firstname %>老师您好!您有了新的班级成员申请,信息如下:
</p> </p>
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p> <p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
<p>申请课程:<%= Course.find(ma.course_id).name%></p> <p>申请课程:<%= Course.find(ma.course_id).name%></p>

View File

@ -9,7 +9,7 @@
</div> </div>
<div class=" fl ml5"> <div class=" fl ml5">
<div class="issues_list_titlebox clear"> <div class="issues_list_titlebox clear">
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a> <a href="<%= issue_path(activity) %>" class="issues_list_title fl" style="width: 320px" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="issues_list_small"> <div class="issues_list_small">

View File

@ -2,6 +2,7 @@
<div id="project-boardlist"> <div id="project-boardlist">
<div class="container-big mt10" > <div class="container-big mt10" >
<p class="list-h2">讨论区列表</p> <p class="list-h2">讨论区列表</p>
<% if topics.any? %>
<div class="category"> <div class="category">
<span class="grayTxt ">排序:</span> <span class="grayTxt ">排序:</span>
<%= link_to "时间", {:controller => 'boards', :action => 'index', :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %> <%= link_to "时间", {:controller => 'boards', :action => 'index', :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
@ -15,7 +16,6 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="bloglistbox"> <div class="bloglistbox">
<% if topics.any? %>
<% topics.each do |activity| %> <% topics.each do |activity| %>
<div class="list-file"> <div class="list-file">
<div><span class="item_list fl"></span> <div><span class="item_list fl"></span>
@ -59,11 +59,11 @@
</ul> </ul>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div>
</div>
<% else %> <% else %>
<p class="nodata"><%= l(:label_no_data) %></p> <%= render :partial => "projects/no_data" %>
<% end %> <% end %>
</div>
</div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
//如果右边的博客列表比左边的高度低则将右边的高度设为与左边对齐 //如果右边的博客列表比左边的高度低则将右边的高度设为与左边对齐

View File

@ -3,16 +3,16 @@
<div class="homepageContentContainer"> <div class="homepageContentContainer">
<div class="homepageContent"> <div class="homepageContent">
<div class="postContainer mb10"> <div class="postContainer mb10">
<div class="postBanner" style="padding-bottom:5px;"> <div class="postBanner" style="padding-bottom:5px;">s
<span class="linkGrey2 f16">组织列表</span> <span class="linkGrey2 f16">组织列表</span>
<a href="<%= new_organization_path %>" class="sy_btn_green fr" style="margin-top: -5px">新建组织</a>
<%#= form_tag url_for(:controller => 'users', :action => 'search_user_orgs', :id => User.current.id), :method => 'get', :id => "search_org_form", :class=>"resourcesSearchloadBox", :style=>"float:right; margin-top:-5px;" do %> <%#= form_tag url_for(:controller => 'users', :action => 'search_user_orgs', :id => User.current.id), :method => 'get', :id => "search_org_form", :class=>"resourcesSearchloadBox", :style=>"float:right; margin-top:-5px;" do %>
<!--<input type="text" name="search_orgs" placeholder="输入关键词进行搜索" class="searchResource" />--> <!--<input type="text" name="search_orgs" placeholder="输入关键词进行搜索" class="searchResource" />-->
<!--&lt;!&ndash;<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#search_org_form').submit();"></a>&ndash;&gt;--> <!--&lt;!&ndash;<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#search_org_form').submit();"></a>&ndash;&gt;-->
<!--<a href="javascript:void(0);" class="problem_search_btn fl" onclick="$('#search_org_form').submit();">搜索</a>--> <!--<a href="javascript:void(0);" class="problem_search_btn fl" onclick="$('#search_org_form').submit();">搜索</a>-->
<!--<%# end %>--> <!--<%# end %>-->
<div class="cl"></div>
</div> </div>
<div id="org_list"> <div id="org_list">
<% @orgs.each do |org| %> <% @orgs.each do |org| %>

View File

@ -19,9 +19,13 @@
<!-- <a href="javascript:void(0);" class="btn btn-green fr mr15 mt10"> 新建 </a>--> <!-- <a href="javascript:void(0);" class="btn btn-green fr mr15 mt10"> 新建 </a>-->
<%= link_to "新建", new_project_version_path(@project, :is_create => true), :class => 'btn btn-green fr mr15 mt10', :remote => true %> <%= link_to "新建", new_project_version_path(@project, :is_create => true), :class => 'btn btn-green fr mr15 mt10', :remote => true %>
</div> </div>
<% if @versions_count > 0 %>
<div id="version_list"> <div id="version_list">
<%= render :partial => "versions/list" %> <%= render :partial => "versions/list" %>
</div> </div>
<% else %>
<%= render :partial => "projects/no_data" %>
<% end %>
</div><!--new_roadmap end--> </div><!--new_roadmap end-->
<!--里程碑列表结束--> <!--里程碑列表结束-->

View File

@ -39,7 +39,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="new_roadmap_conbox mb10" > <% if @version.issues_count > 0 %>
<div class="new_roadmap_conbox mb10" >
<div class=" clear"> <div class=" clear">
<ul class="new_roadmap_nav fl" > <ul class="new_roadmap_nav fl" >
<li id="new_roadmap_nav_1" class="new_roadmap_nav_hover " onclick="HoverLi(1);"> <li id="new_roadmap_nav_1" class="new_roadmap_nav_hover " onclick="HoverLi(1);">
@ -103,7 +104,13 @@
<!--缺陷列表结束--> <!--缺陷列表结束-->
</div><!--new_roadmap_content_2 end--> </div><!--new_roadmap_content_2 end-->
</div><!--new_roadmap end--> </div><!--new_roadmap end-->
<% else %>
<div class="mb10">
<%= render :partial => "projects/no_data" %>
</div>
<% end %>
<!--里程碑详情结束--> <!--里程碑详情结束-->

View File

@ -772,7 +772,7 @@ input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
.issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #c8c8c8;} .issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #c8c8c8;}
.issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;} .issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;}
a.issues_list_title{ color:#444; max-width:260px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; } a.issues_list_title{ color:#444; max-width:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; }
a:hover.issues_list_title{color:#3b94d6;} a:hover.issues_list_title{color:#3b94d6;}
.issues_list_titlebox span{ font-size: 12px;color: #888; font-weight: normal; } .issues_list_titlebox span{ font-size: 12px;color: #888; font-weight: normal; }
.issues_ciricons_01{ width: 22px; height: 22px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 0 no-repeat;} .issues_ciricons_01{ width: 22px; height: 22px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 0 no-repeat;}
@ -788,7 +788,7 @@ a:hover.issues_list_title{color:#3b94d6;}
.hw_search_box{ position:relative; } .hw_search_box{ position:relative; }
.hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;padding-right: 25px;} .hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;padding-right: 25px;}
.hw_search_box a.hw_btn_search{display:block; width:20px; height:20px; background:url(/images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:5px; cursor:pointer;} .hw_search_box a.hw_btn_search{display:block; width:20px; height:20px; background:url(/images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:5px; cursor:pointer;}
.hw_search_box a:hover.hw_btn_search{background:url(../images/hw/icons_hw.png) -40px -57px no-repeat;} .hw_search_box a:hover.hw_btn_search{background:url(/images/hw/icons_hw.png) -40px -57px no-repeat;}
.hw_files_icon{display:block; width:17px; height:14px; background:url(../images/hw/icons_hw.png) 0 -135px no-repeat;} .hw_files_icon{display:block; width:17px; height:14px; background:url(../images/hw/icons_hw.png) 0 -135px no-repeat;}
/* 编辑删除 与课程相同 */ /* 编辑删除 与课程相同 */
.sy_icons_edit{ display: inline-block; padding:9px;background:url(/images/sy/sy_icons02.png) 0 1px no-repeat; } .sy_icons_edit{ display: inline-block; padding:9px;background:url(/images/sy/sy_icons02.png) 0 1px no-repeat; }
@ -888,7 +888,7 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
.table-td-w180{display:inline-block;with:180px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;} .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;} .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{ border:1px solid #ddd; background-color:#fff; width: 100%;}
.pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;} .pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;}
/*.pro_new_info p{ padding-bottom:2px; padding-left: 15px; color: #666; padding-right: 5px}*/ /*.pro_new_info p{ padding-bottom:2px; padding-left: 15px; color: #666; padding-right: 5px}*/
.pro_new_info_weight{ font-size: 16px; font-weight: bold;} .pro_new_info_weight{ font-size: 16px; font-weight: bold;}