课程合并
This commit is contained in:
parent
1c4f7f99e8
commit
3536883248
|
@ -175,9 +175,13 @@ class BidsController < ApplicationController
|
|||
if BidingProject.cerate_bidding(@bid.id, project.id, bid_message)
|
||||
flash[:notice] = l(:label_bidding_succeed)
|
||||
end
|
||||
else
|
||||
if @bid.reward_type == 3
|
||||
flash[:error] = l(:label_bidding_homework_fail)
|
||||
else
|
||||
flash[:error] = l(:label_bidding_fail)
|
||||
end
|
||||
end
|
||||
@bidding_project = @bid.biding_projects
|
||||
respond_to do |format|
|
||||
# format.html { redirect_to_referer_or {render :text => 'Watcher added.', :layout => true}}
|
||||
|
|
|
@ -559,6 +559,7 @@ class ProjectsController < ApplicationController
|
|||
if validate_parent_id && @project.save
|
||||
@course = Course.find_by_extra(@project.identifier)
|
||||
@course.state = params[:project][:course][:state]
|
||||
@course.term = params[:project][:course][:term]
|
||||
@course.save
|
||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||||
respond_to do |format|
|
||||
|
|
|
@ -122,6 +122,17 @@ class UsersController < ApplicationController
|
|||
# added by fq
|
||||
def user_courses
|
||||
case params[:type]
|
||||
when "2"
|
||||
@membership = @user.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
|
||||
@memberships = []
|
||||
@membership.each do |membership|
|
||||
if membership.project.project_type == 1
|
||||
@membership << membership
|
||||
end
|
||||
end
|
||||
@state = 2
|
||||
|
||||
when "1"
|
||||
@membership = @user.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
|
||||
|
@ -137,9 +148,9 @@ class UsersController < ApplicationController
|
|||
end
|
||||
@bid = @bid.group_by {|bid| bid.courses.first.id}
|
||||
@state = 1
|
||||
|
||||
else
|
||||
@membership = @user.memberships.all(:conditions => Project.visible_condition(User.current))
|
||||
|
||||
@memberships = []
|
||||
@membership.each do |membership|
|
||||
if membership.project.project_type == 1
|
||||
|
|
|
@ -102,6 +102,10 @@ module UsersHelper
|
|||
s = content_tag('span', '我的作业', :class => "current-page")
|
||||
content << content_tag('li', link_to('我的课程', {:controller => 'users', :action => 'user_courses'}))
|
||||
content << content_tag('li', s, :class => "current-page")
|
||||
when 2
|
||||
s = content_tag('span', '课程通知', :class => "current-page")
|
||||
content << content_tag('li', link_to('课程通知', {:controller => 'users', :action => 'user_courses'}))
|
||||
content << content_tag('li', s, :class => "current-page")
|
||||
end
|
||||
content_tag('div', content, :class => "pagination")
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
class Course < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
|
||||
attr_accessible :code, :extra, :name, :state, :tea_id, :time , :location, :state
|
||||
belongs_to :project, :class_name => 'Project', :foreign_key => :extra
|
||||
attr_accessible :code, :extra, :name, :state, :tea_id, :time , :location, :state, :term
|
||||
belongs_to :project, :class_name => 'Project', :foreign_key => :extra # 定义一个project方法, 该方法通过extra来调用project表
|
||||
belongs_to :teacher, :class_name => 'User', :foreign_key => :tea_id # 定义一个方法teacher,该方法通过tea_id来调用User表
|
||||
has_many :bid
|
||||
validates_presence_of :state
|
||||
validates_presence_of :state, :term
|
||||
safe_attributes 'extra',
|
||||
'time',
|
||||
'name',
|
||||
|
@ -13,7 +13,8 @@ class Course < ActiveRecord::Base
|
|||
'code',
|
||||
'location',
|
||||
'tea_id',
|
||||
'state'
|
||||
'state',
|
||||
'term'
|
||||
|
||||
|
||||
end
|
||||
|
|
|
@ -8,9 +8,13 @@
|
|||
<%= submit_tag l(:button_create) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ?', 5, 7)).size >0) %>
|
||||
<div class='icon icon-add'>
|
||||
<%= toggle_link l(:button_bidding), 'put-bid-form' %>
|
||||
</div>
|
||||
<% elsif @homework_list.empty? %>
|
||||
<div class="font_lighter_sidebar" style="padding-left: 10px">暂无学生提交作业!</div>
|
||||
<% end %>
|
||||
|
||||
<div id='bidding_project_list'>
|
||||
<%= render :partial => 'homework_list', :locals => {:homework => @homework_list} %>
|
||||
|
|
|
@ -5,9 +5,12 @@
|
|||
<td class="font_lighter" style="font-size: 15px;"><%= l(:label_homework_project) %>(<%= @bidding_project.count%>)</td>
|
||||
<% if User.current.logged? %>
|
||||
<td>
|
||||
<% if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ?', 5, 7)).size >0) %>
|
||||
<div class='icon icon-add'>
|
||||
<%= toggle_link l(:button_bidding_homework), 'put-bid-form' %>
|
||||
</div></td>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<td><%= link_to image_tag(url_to_avatar(@project), :class => 'avatar2') %></td>
|
||||
<td align="center">
|
||||
<div class="info_font" style=" word-wrap: break-word; word-break: break-all">
|
||||
<%= textilizable @project.name %>
|
||||
<%= @project.name %>
|
||||
</div>
|
||||
<%= join_in_course(@project, User.current)%>
|
||||
</td>
|
||||
|
@ -67,7 +67,7 @@
|
|||
<!--info-->
|
||||
|
||||
<div class="inf_user_context">
|
||||
<table style="font-family:微软雅黑" width="220">
|
||||
<table style="font-family:微软雅黑" >
|
||||
<!-- <tr>
|
||||
<td valign="top" style="padding-left: 8px;">课程口令:</td><td class="font_lighter_sidebar"><%= @course.state%></td>
|
||||
</tr> -->
|
||||
|
@ -75,9 +75,11 @@
|
|||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;">主讲老师:</td><td class="font_lighter_sidebar"><%= @course.teacher.lastname+@course.teacher.firstname %></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;">教师单位:</td><td class="font_lighter_sidebar">PDL(未定)</td>
|
||||
<td valign="top" style="padding-left: 8px;">课程学期:</td><td class="font_lighter_sidebar"><%= @course.term %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;">教师单位:</td><td class="font_lighter_sidebar"><%= @course.teacher.user_extensions.occupation %></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
|
|
@ -26,51 +26,39 @@
|
|||
<div id="sidebar">
|
||||
<div class="main_context">
|
||||
<div class="spaceleft">
|
||||
<div>
|
||||
<table style="padding-top: 20px ;width: 232px ; height: 80px;">
|
||||
<tr>
|
||||
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all; color: #ed8924 "><%= h @bid.name %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"> <%= watcher_link(@bid, User.current) %> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="user_underline"></div>
|
||||
|
||||
<!-- info -->
|
||||
<div class="inf_user_image">
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left" valign="middle">
|
||||
<%= link_to image_tag(url_to_avatar(@bid.courses.first), :class => "avatar2"), project_path(@bid.courses.first), :class => "avatar" %>
|
||||
</td>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info_font" style=" word-wrap: break-word; word-break: break-all">作业</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @bid.name %></td>
|
||||
</tr>
|
||||
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td><%= l(:label_teacher) %> : <%= link_to(@user.lastname+@user.firstname, user_path(@user))%></td>
|
||||
<td style="text-align: justify ; text-justify: inter-ideograph; width: 180px"><%= l(:label_teacher_homework) %> : <%= link_to(@user.lastname+@user.firstname, user_path(@user)) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= l(:label_course_homework) %> : <%= link_to(@bid.courses.first.name, project_path(@bid.courses.first)) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= l(:label_limit_time) %>: <%= @bid.deadline %></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
<!-- <div>
|
||||
<%= link_to "问答"+"("+@bid.watcher_users.count.to_s+")", respond_path(@bid) %>
|
||||
<%= link_to l(:label_commit_homework)+ ":" +"("+@bid.biding_projects.count.to_s+")", project_for_bid_path(@bid) %>
|
||||
<%= link_to l(:label_responses)+"("+@bid.commit.to_s+")", respond_path(@bid)%>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- tags -->
|
||||
<div class="user_fans">
|
||||
<div class="font_title_left">
|
||||
<strong><%= l(:label_tag) %></strong>
|
||||
</div><div class="user_underline"></div>
|
||||
<table style="font-family:微软雅黑">
|
||||
<div class="user_underline"></div>
|
||||
<table style="font-family:微软雅黑; padding-left: 8px">
|
||||
<tr>
|
||||
<td><!-- added by william -for tag -->
|
||||
<%= render :partial => 'tags/tag', :locals => {:obj => @bid, :object_flag => "4"}%>
|
||||
</td>
|
||||
<td><!-- added by william -for tag --> <%= render :partial => 'tags/tag', :locals => {:obj => @bid, :object_flag => "4"}%> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
@ -85,46 +73,56 @@
|
|||
<div class="left_wf">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="padding-top: 5px">
|
||||
<% if @bid.homework_type == 1%>
|
||||
<td style="padding-top: 5px"> <% if @bid.homework_type == 1%>
|
||||
<% if @bid.homeworks.size>0 %>
|
||||
<% for homework in @bid.homeworks %>
|
||||
<%= link_to image_tag(url_to_avatar(homework.user), :class => "avatar", :title => homework.user.name), user_path(homework.user), :class => "avatar" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="font_lighter"><%= l(:label_no_course_project) %></p>
|
||||
<% end %>
|
||||
<p class="font_lighter">
|
||||
<%= l(:label_no_course_project) %>
|
||||
</p> <% end %>
|
||||
<% else %>
|
||||
<% if @bid.projects.size>0 %>
|
||||
<% for project in @bid.projects%>
|
||||
<%= link_to image_tag(url_to_avatar(project), :class => "avatar", :title => project.name), project_path(project), :class => "avatar" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="font_lighter"><%= l(:label_no_course_project) %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<p class="font_lighter">
|
||||
<%= l(:label_no_course_project) %>
|
||||
</p> <% end %>
|
||||
<% end %> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="user_underline"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- end -->
|
||||
</div>
|
||||
<div id="content">
|
||||
|
||||
<div class="tabs_new">
|
||||
<ul>
|
||||
<li><%= link_to l(:label_question_student), { :controller => 'bids', :action => 'show' },:class => link_class(:respond)%></li>
|
||||
<li><%= link_to l(:label_homework_commit), { :controller => 'bids', :action => 'show_project' },:class => link_class(:project)%></li>
|
||||
<li>
|
||||
<%= link_to l(:label_question_student), {:controller => 'bids', :action => 'show' },:class => link_class(:respond)%>
|
||||
</li>
|
||||
<li>
|
||||
<% if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ?', 5, 7)).size >0) %>
|
||||
<%= link_to l(:label_homework_commit), {:controller => 'bids', :action => 'show_project' },:class => link_class(:project)%>
|
||||
<% else %>
|
||||
<%= link_to l(:label_homework_info), {:controller => 'bids', :action => 'show_project' },:class => link_class(:project)%>
|
||||
|
||||
<% end %>
|
||||
</li>
|
||||
<!-- <li><%= link_to l(:label_homework_statistics), { :controller => 'bids', :action => 'homework_statistics' },:class => link_class(:homework_statistics)%></li> -->
|
||||
<!-- <li><%= link_to l(:label_homework_respond), { :controller => 'bids', :action => 'homework_respond' },:class => link_class(:homework_respond)%></li>
|
||||
--><ul>
|
||||
</div>
|
||||
|
||||
<%= yield %>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
<div style="clear:both;"></div>
|
||||
|
|
|
@ -89,10 +89,10 @@
|
|||
<div class="inf_user_context">
|
||||
<table style="font-family:微软雅黑" width="240">
|
||||
<tr>
|
||||
<td style="padding-left: 8px" width="70px"><%= l(:label_user_joinin) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= format_date(@user.created_on) %></td>
|
||||
<td style="padding-left: 8px" width="70px"><%= l(:label_user_joinin) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= format_time(@user.created_on) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><%= l(:label_user_login) %></td><td class="font_lighter_sidebar" style="padding-left: 0px"><%= format_date(@user.last_login_on) %></td>
|
||||
<td style="padding-left: 8px"><%= l(:label_user_login) %></td><td class="font_lighter_sidebar" style="padding-left: 0px"><%= format_time(@user.last_login_on) %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px;"><%= l(:label_user_mail) %></td><td class="font_lighter_sidebar" style="padding-left: 0px; word-wrap: break-word; word-break: break-all"><%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></td>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;" %></p>
|
||||
<p style="margin-left:-10px;"><%= f.text_area :summary, :cols => 60, :rows => 2, :style => "width:490px;margin-left:10px;" %></p>
|
||||
<!-- <p style="margin-left:-10px;"><%= f.text_area :summary, :cols => 60, :rows => 2, :style => "width:490px;margin-left:10px;" %></p> -->
|
||||
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15, :class => 'wiki-edit', :style => "width:490px;" %></p>
|
||||
<p id="attachments_form" style="margin-left:-10px;"><label style="padding-right: 15px;"><%= l(:label_attachment_plural) %></label><%= render :partial => 'attachments/form', :locals => {:container => @news} %></p>
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,11 @@
|
|||
</div>
|
||||
|
||||
<div id="add-news" style="display:none;">
|
||||
<% if @project.project_type == 1 %>
|
||||
<h3><%=l(:bale_news_notice)%></h3>
|
||||
<% else %>
|
||||
<h3><%=l(:label_news_new)%></h3>
|
||||
<% end %>
|
||||
<%= labelled_form_for @news, :url => project_news_index_path(@project),
|
||||
:html => { :id => 'news-form', :multipart => true } do |f| %>
|
||||
<%= render :partial => 'news/form', :locals => { :f => f } %>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<%= error_messages_for 'project' %>
|
||||
<%= error_messages_for 'course' %>
|
||||
|
||||
<!--[form:project]-->
|
||||
<% unless @project.new_record? %>
|
||||
<p><%= render :partial=>"avatar/avatar_form",:locals=> {source:@project} %></p>
|
||||
|
@ -17,7 +19,8 @@
|
|||
<!-- added by huang -->
|
||||
<p style="margin-left:-10px;"><%= m.text_field :state, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
|
||||
<em class="info" style="margin-left:95px;"><%= l(:text_command) %></em>
|
||||
|
||||
<p style="margin-left:-10px;"><%= m.text_field :term, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
|
||||
<!-- <p style="margin-left:-28px;"><em class="info"><%= l(:label_term) %> <%= select_tag 'term', "<option value = '0'>#{l(:label_spring)}</option><option value = '1'>#{l(:label_summer)}</option><option value = '2'>#{l(:label_autumn)}</option>".html_safe %></em></p> -->
|
||||
<% end %>
|
||||
<!-- <p style="margin-left:-10px;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></p> -->
|
||||
<p style="display:none;"><%= f.text_field :project_type, :value => 1 %></p>
|
||||
|
|
|
@ -27,8 +27,11 @@
|
|||
<% else %>
|
||||
<%= check_box_tag 'membership[role_ids][]', role.id %><%=h role %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if role == Role.find(7) %>
|
||||
<% else %>
|
||||
<%= check_box_tag 'membership[role_ids][]', role.id %><%=h role %>
|
||||
<% end %>
|
||||
<% end %></label>
|
||||
<% end %></p>
|
||||
</div>
|
||||
|
@ -66,8 +69,18 @@
|
|||
<% end %>
|
||||
|
||||
<% else %>
|
||||
<%=h member.roles.sort.collect(&:to_s).join(', ') %>
|
||||
<% end %></span>
|
||||
|
||||
<% if member.roles.sort.collect(&:to_s).join(', ') =='Manager' %>
|
||||
Manager
|
||||
<% elsif member.roles.sort.collect(&:to_s).join(', ') =='Developer' %>
|
||||
Developer
|
||||
<% elsif member.roles.sort.collect(&:to_s).join(', ') =='Reporter' %>
|
||||
Reporter
|
||||
<% else %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</span>
|
||||
|
||||
|
||||
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
|
||||
|
|
|
@ -9,8 +9,9 @@
|
|||
<td>
|
||||
<table width="580" border="0">
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><strong> <%= link_to_user(membership.user) if membership.respond_to?(:user) %></strong>
|
||||
<span class="font_lighter"> <%= l(:label_create_project) %></span> <%= link_to_project(membership.project) %></td>
|
||||
<td colspan="2" valign="top"><span><%= link_to_project(membership.project) %></span><span style="float: right"><%= l(:label_homework) %> (<span style="color: #ed8924"><%= link_to (membership.project.homeworks.count), {:controller => 'projects', :action => 'homework', :id => membership.project.identifier} %></span>)
|
||||
<%= l(:label_course_news)%> (<span style="color: #ed8924"><%= link_to (membership.project.news.count), {:controller => 'news', :action => 'index', :project_id => membership.project.identifier} %></span>)
|
||||
<%= l(:label_member)%>(<span style="color: #ed8924"><%= link_to (membership.project.members.count) %></span>) </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" >
|
||||
|
@ -20,7 +21,16 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"> <%= format_time(membership.created_on) %></span></td><!-- modified by ming -->
|
||||
<td align="right" ><%= h membership.roles.sort.collect(&:to_s).join(', ') %> </td>
|
||||
<td align="right" >
|
||||
|
||||
<% if membership.roles.sort.collect(&:to_s).join(', ') =='Manager' %>
|
||||
Teacher
|
||||
<% elsif membership.roles.sort.collect(&:to_s).join(', ') =='Reporter' %>
|
||||
Student
|
||||
<% elsif membership.roles.sort.collect(&:to_s).join(', ') =='TA' %>
|
||||
TA
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
@ -32,9 +42,13 @@
|
|||
</ul>
|
||||
<% else %>
|
||||
<% if @user != User.current %>
|
||||
<p class="font_description"><%= l(:label_project_un) %></p>
|
||||
<p class="font_description">
|
||||
<%= l(:label_project_un) %>
|
||||
</p>
|
||||
<% else %>
|
||||
<p class="font_description"><%= l(:label_project_unadd) %><%= link_to"#{l(:label_new)}",:controller=>'projects',:action=>'new'%></p>
|
||||
<p class="font_description">
|
||||
<%= l(:label_project_unadd) %><%= link_to"#{l(:label_new)}",:controller=>'projects',:action=>'new'%>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<!-- < added by huang > -->
|
||||
<div class="content_frame">
|
||||
<% unless @memberships.empty? %>
|
||||
<ul class="user_project_sort">
|
||||
<% for membership in @memberships %>
|
||||
<li>
|
||||
<table width="660" border="0" align="center" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(membership.project), :class => 'avatar'), project_path(membership.project) %></td>
|
||||
<td>
|
||||
<table width="580" border="0">
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><span><%= link_to_project(membership.project) %></span>
|
||||
<span style="float: right"><%= l(:label_homework) %> (<span style="color: #ed8924">8</span>)
|
||||
<%= l(:label_course_news)%> (<span style="color: #ed8924">8</span>)
|
||||
<%= l(:label_member)%>(<span style="color: #ed8924"><%=link_to (membership.project.members.count)%></span>)
|
||||
</span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" >
|
||||
<p class="font_description">
|
||||
<%= membership.project.description%>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"> <%= format_time(membership.created_on) %></span></td><!-- modified by ming -->
|
||||
<td align="right" ><%= h membership.roles.sort.collect(&:to_s).join(', ') %> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<% if @user != User.current %>
|
||||
<p class="font_description"><%= l(:label_project_un) %></p>
|
||||
<% else %>
|
||||
<p class="font_description"><%= l(:label_project_unadd) %><%= link_to"#{l(:label_new)}",:controller=>'projects',:action=>'new'%></p>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<%= call_hook :view_account_left_bottom, :user => @user %>
|
||||
</div>
|
|
@ -1,10 +1,11 @@
|
|||
<!-- added by fq -->
|
||||
|
||||
<%= user_course @state%>
|
||||
|
||||
<% if @state == 0 %>
|
||||
<%= render :partial => 'my_course' %>
|
||||
<% else %>
|
||||
<% elsif @state == 1 %>
|
||||
<%= render :partial => 'my_homework' %>
|
||||
<% else @state == 2 %>
|
||||
<%= render :partial => 'my_notice' %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -222,6 +222,7 @@ zh:
|
|||
field_couurse_time: 学时
|
||||
field_course_code: 学分
|
||||
field_state: 加入课程口令
|
||||
field_term: 学期
|
||||
#end
|
||||
field_description: 描述
|
||||
field_summary: 摘要
|
||||
|
@ -521,6 +522,10 @@ zh:
|
|||
label_user_login_tips: 您还没有登录,请登录后留言
|
||||
#end
|
||||
#by huang
|
||||
label_term: 学期
|
||||
label_spring: 春季
|
||||
label_summer: 夏季
|
||||
label_autumn: 秋季
|
||||
label_followers: 关注
|
||||
label_teacher: 教师
|
||||
label_limit_time: 截止日期
|
||||
|
@ -579,6 +584,7 @@ zh:
|
|||
label_report_plural: 报表
|
||||
label_news: 新闻
|
||||
label_news_new: 添加新闻
|
||||
bale_news_notice: 添加通知 #huang
|
||||
label_news_notice: 发布课程通知
|
||||
label_news_plural: 新闻
|
||||
label_news_latest: 最近的新闻
|
||||
|
@ -586,8 +592,9 @@ zh:
|
|||
label_news_added: 新闻已添加
|
||||
label_settings: 配置
|
||||
label_overview: 课程动态
|
||||
label_question_student: 学生提问 #huang
|
||||
label_question_student: 学生反馈 #huang
|
||||
label_homework_commit: 提交作业 #huang
|
||||
label_homework_info: 作业情况 #huang
|
||||
label_course_file: 资料下载
|
||||
label_course_news: 课程通知
|
||||
label_version: 版本
|
||||
|
@ -1271,6 +1278,7 @@ zh:
|
|||
label_wrong_date: 时间格式错误,请输入正确的时间 yyyy-mm-dd
|
||||
label_bidding_succeed: 应标成功
|
||||
label_bidding_fail: 应标失败,该项目已经应标
|
||||
label_bidding_homework_fail: 作业提交失败,该作业已经被提交!
|
||||
|
||||
label_requirement_list: 需求列表
|
||||
|
||||
|
@ -1282,7 +1290,7 @@ zh:
|
|||
label_x_homework_project: #modify by huang
|
||||
zero: 已提交的作业
|
||||
one: 已提交的作业
|
||||
other: 已提交的uzoye
|
||||
other: 已提交的作业
|
||||
#end
|
||||
label_x_responses: #modify by men
|
||||
zero: 留言
|
||||
|
@ -1477,6 +1485,7 @@ zh:
|
|||
#added by bai
|
||||
label_identity: 身份
|
||||
label_teacher: 教 师
|
||||
label_teacher_homework: 教师姓名
|
||||
label_student: 学生
|
||||
label_other: 其他
|
||||
label_gender: 性别
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
class AddTermToCourses < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :courses, :term, :string
|
||||
add_column :courses, :string, :string
|
||||
end
|
||||
end
|
|
@ -230,11 +230,15 @@ ul.tool li{list-style-type:none;
|
|||
font-size:12px;
|
||||
font-family:微软雅黑;
|
||||
}
|
||||
.justify_side > span{
|
||||
text-align: justify;
|
||||
width: 180px;
|
||||
}
|
||||
.font_lighter_sidebar{
|
||||
/*font-family:微软雅黑;*/
|
||||
color:#919294;
|
||||
font-size:13px;
|
||||
padding-left: 12px;
|
||||
padding-left: 0px;
|
||||
padding-right: 8px;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue