新增项目成员列表

This commit is contained in:
huang 2015-04-08 11:24:40 +08:00
parent bf36da8dcb
commit d832514a55
5 changed files with 62 additions and 6 deletions

View File

@ -379,7 +379,7 @@ class ProjectsController < ApplicationController
# include CoursesHelper
def member
## 有角色参数的才是课程,没有的就是项目
@render_file = 'member_list'
@render_file = 'project_member_list'
# 判断是否课程
if @project.project_type == Project::ProjectType_course
@teachers= searchTeacherAndAssistant(@project)

View File

@ -8,10 +8,10 @@
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :class => 'avatar')) %>
<%= content_tag "div", link_to(member.user.name, user_path(member.user)), :class => "nomargin avatar_name" %>
<!--teacher's code disapeared moified by huang-->
<% if @project.project_type == 1 %>
<% unless member.user.user_extensions.identity ==0 %>
<!-- added by bai 加学号 -->
<!-- added by bai 加学号 -->
<%if @canShowCode# if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @project.id).first.nil?) %>
<%= content_tag "p", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :class => "nomargin avatar_name" %>
<% end %>
@ -28,7 +28,7 @@
</p>
</div>
<% end %>
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
</div>
<% end; reset_cycle %>

View File

@ -0,0 +1,23 @@
<div class="st_list">
<div class="st_box">
<a href="#" class="fr fb mb5" >加入时间</a>
<div class="cl"></div><!--st_box_top end-->
<% members.each do |member| %>
<div class="st_boxlist">
<a href="javascript:" class="st_img">
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 32, :height => 32)) %>
</a>
<span class="fl ml10 c_grey"><%= l(:label_username)%></span>
<%= link_to(member.user.name, user_path(member.user),:class => "ml10 c_blue02") %>
<span class="fr c_grey"><%= format_date(member.created_on)%></span>
</div>
<div class="cl"></div>
<% end%>
<ul class="wlist">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<div class="cl"></div>
</div>
</div>

View File

@ -3,6 +3,6 @@
</div>
<div class="member_content">
<%= error_messages_for 'member' %>
<%= render :partial => @render_file, :locals => {:members => @members} %>
<%= render :partial => @render_file, :locals => {:members => @members} %>
</div>

View File

@ -247,4 +247,37 @@ a.link_file_board{ background:url(../images/pic_file.png) 0 3px no-repeat !impor
/*新闻*/
.hwork_new{ color:#4c4c4c;}
.hwork_text{ border:1px solid #64bdd9; height:100px;width:555px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;}
.hwork_input{ border:1px solid #64bdd9; height:22px; width:555px; background:#fff; margin-bottom:10px; padding:5px;}
.hwork_input{ border:1px solid #64bdd9; height:22px; width:555px; background:#fff; margin-bottom:10px; padding:5px;}
/* 学生列表*/
.st_list{ width:670px;}
.st_search{ }
.st_search span{ font-size:14px; font-weight:bold; color:#606060; margin-right:35px;}
.st_search_input{ border:1px solid #1c9ec7; background:#fff; height:20px; color:#c4c4c4; width:200px; padding-left:5px; margin-bottom:5px;}
.st_search a{ background:#1c9ec7; color:#fff;border:1px solid #1c9ec7; text-align:center; display:block; width:60px; height:20px; float:left; font-size:12px; }
.st_search a:hover{ background:#048fbb; text-decoration:none;}
.classbox{ border:1px solid #f8df8c; background:#fffce6; color:#0d90c3; padding:0 3px; float:left; margin-left:15px;}
.st_addclass{ margin-top:5px;}
.st_addclass ul li,.st_addclass a,.st_addclass img{ float:left;}
.st_addclass img{ margin-top:3px;}
.st_addclass a{ color:#0d90c3;}
.st_box{ margin-top:10px; border-top:1px solid #CCC; padding-top:10px;}
.st_box ul li{ float:left;}
.st_box_top a{ font-weight:bold; color:#7a7a7a; float:left; margin-bottom:5px;}
.st_box_top a:hover{ color:#1c9ec7;}
a.st_up{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 0 no-repeat; margin-top:5px; margin-left:3px;}
a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;}
a.st_img { display:block;width:32px; height:32px; border:1px solid #CCC; padding:1px;}
a:hover.st_img { border:1px solid #1c9ec7; }
.st_boxlist{ border-bottom:1px dashed #CCC; height:43px; margin-bottom:10px; }
.st_boxlist a{ float:left;}
.st_boxlist ul{ float:left; width:200px; margin-left:10px;}
.st_boxlist ul li a{ color:#5d5d5d;}
.st_boxlist ul li a span{ color:#1c9ec7;}
.st_boxlist ul li a:hover span{ color:#ff8e15;}
.ml50{ margin-left:50px;}
.ml358{ margin-left:358px;}
.ml258{ margin-left:254px;}
.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;}