Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
Conflicts: app/helpers/courses_helper.rb app/views/bids/_homework_list.html.erb config/locales/en.yml
This commit is contained in:
commit
2d77975221
|
@ -52,9 +52,14 @@ class FilesController < ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
if params[:tag_name]
|
||||
if params[:add_tag]
|
||||
@addTag=true
|
||||
#render :back
|
||||
tag_saveEx
|
||||
render :text =>"success"
|
||||
#render :text =>"success"
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
else
|
||||
@addTag=false
|
||||
container = (params[:version_id].blank? ? @project : @project.versions.find_by_id(params[:version_id]))
|
||||
|
@ -64,7 +69,27 @@ class FilesController < ApplicationController
|
|||
if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added')
|
||||
Mailer.attachments_added(attachments[:files]).deliver
|
||||
end
|
||||
redirect_to project_files_path(@project)
|
||||
|
||||
# 临时用
|
||||
sort_init 'created_on', 'desc'
|
||||
sort_update 'created_on' => "#{Attachment.table_name}.created_on",
|
||||
'filename' => "#{Attachment.table_name}.filename",
|
||||
'size' => "#{Attachment.table_name}.filesize",
|
||||
'downloads' => "#{Attachment.table_name}.downloads"
|
||||
|
||||
@containers = [ Project.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").find(@project.id)] #modify by Long Jun
|
||||
@containers += @project.versions.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").all.sort
|
||||
|
||||
@attachtype = 0
|
||||
@contenttype = 0
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {
|
||||
redirect_to project_files_path(@project)
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -102,11 +102,12 @@ class HomeworkAttachController < ApplicationController
|
|||
percent_m.to_s + "%"
|
||||
end
|
||||
@limit = 10
|
||||
@jours = @homework.journals_for_messages.order("created_on DESC")
|
||||
@jours = @homework.journals_for_messages.where("is_comprehensive_evaluation is null").order("created_on DESC")
|
||||
@feedback_count = @jours.count
|
||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||
@offset ||= @feedback_pages.offset
|
||||
@jour = @jours[@offset, @limit]
|
||||
@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation is not null").order("created_on DESC")
|
||||
end
|
||||
|
||||
#删除留言
|
||||
|
@ -127,13 +128,14 @@ class HomeworkAttachController < ApplicationController
|
|||
#添加留言
|
||||
def addjours
|
||||
@homework = HomeworkAttach.find(params[:jour_id])
|
||||
@homework.addjours User.current.id, params[:new_form][:user_message],0
|
||||
@jours = @homework.journals_for_messages.order("created_on DESC")
|
||||
@add_jour = @homework.addjours User.current.id, params[:new_form][:user_message],0,params[:is_comprehensive_evaluation]
|
||||
@jours = @homework.journals_for_messages.where("is_comprehensive_evaluation is null").order("created_on DESC")
|
||||
@limit = 10
|
||||
@feedback_count = @jours.count
|
||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||
@offset ||= @feedback_pages.offset
|
||||
@jour = @jours[@offset, @limit]
|
||||
@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation is not null").order("created_on DESC")
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
|
|
@ -689,7 +689,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def tag_saveEx
|
||||
@tags = params[:tag_name][:name]
|
||||
@tags = params[:tag_name]
|
||||
@obj_id = params[:obj_id]
|
||||
@obj_flag = params[:obj_flag]
|
||||
|
||||
|
|
|
@ -145,6 +145,27 @@ module BidsHelper
|
|||
people.include?(User.current)
|
||||
end
|
||||
|
||||
# 当前用户是否加入了此课程(包括教师)
|
||||
def is_cur_course_user? bid
|
||||
people = []
|
||||
#people << bid.author
|
||||
course = bid.courses.first
|
||||
course.members.each do |member|
|
||||
people << member.user
|
||||
end
|
||||
people.include?(User.current)
|
||||
end
|
||||
#当前用户是不是指定课程的学生
|
||||
def is_cur_course_student? course
|
||||
people = []
|
||||
course.members.each do |member|
|
||||
if [5,10].include? member.roles.first.id
|
||||
people << member.user
|
||||
end
|
||||
end
|
||||
people.include?(User.current)
|
||||
end
|
||||
|
||||
# def select_option_helper option
|
||||
# tmp = Hash.new
|
||||
# option.each do |project|
|
||||
|
|
|
@ -137,14 +137,24 @@ module CoursesHelper
|
|||
Course.find_by_extra(try(extra))
|
||||
end
|
||||
#判断制定用户是不是当前课程的老师
|
||||
def is_course_teacher user,project
|
||||
is_teacher = false
|
||||
searchTeacherAndAssistant(project).each do |teacher|
|
||||
if user == teacher.user
|
||||
is_teacher = true
|
||||
break
|
||||
def is_course_teacher user,course
|
||||
people = []
|
||||
course.members.each do |member|
|
||||
role_id = member.roles.first.id
|
||||
if TeacherRoles.include? role_id
|
||||
people << member.user
|
||||
end
|
||||
end
|
||||
is_teacher
|
||||
people.include?(user)
|
||||
end
|
||||
#当前用户是不是指定课程的学生
|
||||
def is_cur_course_student? course
|
||||
people = []
|
||||
course.members.each do |member|
|
||||
if StudentRoles.include? member.roles.first.id
|
||||
people << member.user
|
||||
end
|
||||
end
|
||||
people.include?(User.current)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -49,5 +49,9 @@ module TagsHelper
|
|||
end
|
||||
return @result
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
def tagname_val
|
||||
("#tag_name_name").value
|
||||
end
|
|
@ -13,8 +13,8 @@ class HomeworkAttach < ActiveRecord::Base
|
|||
"user_id"
|
||||
acts_as_attachable
|
||||
|
||||
def addjours user_id,message,status = 0
|
||||
jfm = self.journals_for_messages.build(:user_id => user_id,:notes =>message,:status => status)
|
||||
def addjours user_id,message,status = 0,is_comprehensive_evaluation = 0
|
||||
jfm = self.journals_for_messages.build(:user_id => user_id,:notes =>message,:status => status,:is_comprehensive_evaluation => is_comprehensive_evaluation)
|
||||
jfm.save
|
||||
jfm
|
||||
end
|
||||
|
|
|
@ -1,11 +1,33 @@
|
|||
<%= call_hook :view_account_login_top %>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
function clearInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == content) {
|
||||
$('#' + id).val('');
|
||||
}
|
||||
}
|
||||
|
||||
function showInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == '') {
|
||||
$('#' + id).val(content);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="login-form">
|
||||
<%= form_tag(signin_path) do %>
|
||||
<%= back_url_hidden_field_tag %>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="right"><label for="username"><%=l(:field_login)%>:</label></td>
|
||||
<td align="left"><%= text_field_tag 'username', params[:username], :tabindex => '1' %></td>
|
||||
<td align="right"><label for="username"><%=l(:lable_user_name)%>:</label></td>
|
||||
<td align="left">
|
||||
<%= text_field_tag 'username', params[:username], :tabindex => '1' , :value => "#{l(:label_login_prompt)}",
|
||||
:onfocus => "clearInfo('username','#{l(:label_login_prompt)}')",
|
||||
:onblur => "showInfo('username','#{l(:label_login_prompt)}')",
|
||||
:style => "resize: none;font-size: 12px;color: #818283;"%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><label for="password"><%=l(:field_password)%>:</label></td>
|
||||
|
|
|
@ -279,7 +279,7 @@
|
|||
|
||||
<% if @user.auth_source_id.nil? %>
|
||||
<p><%= f.text_field :login, :size => 25, :required => true %><span id="valid_user_login"></span>
|
||||
<em class="info"><%= l(:label_max_number) %></em></p>
|
||||
<em class="info"><%= l(:label_max_number) %></em></p>
|
||||
<p><%= f.password_field :password, :size => 25, :required => true %>
|
||||
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
|
||||
|
||||
|
@ -302,10 +302,16 @@
|
|||
<!-- added by bai 增加了身份、性别和地区-->
|
||||
|
||||
<span id = 'gender' style = 'display:none'>
|
||||
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_gender) %><span class="required"> </span></strong></td>
|
||||
<td class="info" style="width: 10px">
|
||||
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option>
|
||||
<option value = '1'>#{l(:label_gender_female)}</option>".html_safe %></td></tr></table></p></span>
|
||||
<p>
|
||||
<table><tr>
|
||||
<td class="info" align="right" style="width: 90px"><strong><%= l(:label_gender) %><span class="required"> </span></strong></td>
|
||||
<td class="info" style="width: 10px">
|
||||
<%= select_tag 'gender', "<option value = '0'>#{l(:label_gender_male)}</option>
|
||||
<option value = '1'>#{l(:label_gender_female)}</option>".html_safe %>
|
||||
</td>
|
||||
</tr></table>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
|
||||
<p><table><tr><td class="info" align="right" style="width: 90px"><strong><%= l(:label_location) %><span class="required"> *</span></strong></td>
|
||||
|
|
|
@ -12,6 +12,5 @@ fileSpan.find('a.remove-upload')
|
|||
})
|
||||
.off('click');
|
||||
var divattach = fileSpan.find('div.div_attachments');
|
||||
divattach.html('<%#= j(render :partial => 'tags/tagEx', :locals => {:obj => @attachment, :object_flag => "6"})%>');
|
||||
|
||||
divattach.html('<%= j(render :partial => 'tags/tagEx', :locals => {:obj => @attachment, :object_flag => "6"})%>');
|
||||
<% end %>
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<!-- fq -->
|
||||
<% is_teacher = is_course_teacher User.current,@bid.courses.first.project %>
|
||||
<% is_student = is_cur_course_student? @bid.courses.first %>
|
||||
<% is_teacher = is_course_teacher User.current,@bid.courses.first %>
|
||||
|
||||
<%= form_tag(:controller => 'bids', :action => "show_project", :method => :get) do %>
|
||||
<div class="project-search-block">
|
||||
<table width="100%" valign="center">
|
||||
<tr>
|
||||
<td ><span style="margin-left:0px"><%= l(:label_task_plural)%>(<%= @homework_list.count%>)</span>
|
||||
<%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), remote: false, class: "button_submit button_submit_font_white", style: "margin: 5px 10px;line-height: 20px;height: 20px;display: inline-block;" if(
|
||||
User.current.admin? ||
|
||||
!(User.current.roles_for_project(@bid.courses.first).map(&:id) & ([7,9])).empty? ) ||
|
||||
User.current.admin? ||
|
||||
!(User.current.roles_for_project(@bid.courses.first).map(&:id) & ([7,9])).empty? ) ||
|
||||
(Rails.env.development?) %>
|
||||
</td>
|
||||
<td align="right">
|
||||
|
@ -25,8 +27,8 @@
|
|||
<% @homework_list.each do |homework|%>
|
||||
<% if homework.attachments.any?%>
|
||||
<table width="660px" border="0" align="center">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(homework.user), :class => "avatar")%></td>
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(homework.user), :class => "avatar")%></td>
|
||||
<td>
|
||||
<table width="580px" border="0">
|
||||
<tr>
|
||||
|
@ -44,8 +46,12 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<td style="vertical-align: top">
|
||||
<% if display_id %>
|
||||
<% if is_student %>
|
||||
<%= link_to "互评>>" , homework_attach_path(homework)%>
|
||||
<% else %>
|
||||
<% if is_teacher %>
|
||||
<%= link_to "综评>>" , homework_attach_path(homework)%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -71,7 +77,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<% if display_id || is_teacher %>
|
||||
<% if is_cur_course_user? @bid %>
|
||||
<strong><%= l(:label_bidding_user_studentcode) %> : <%= homework.user.user_extensions.student_id%></strong>
|
||||
<% end %>
|
||||
</td>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<% versions = project.versions.sort %>
|
||||
<% attachmenttypes = project.attachmenttypes %>
|
||||
<%= error_messages_for 'attachment' %>
|
||||
<%= form_tag(project_files_path(project), :multipart => true,:name=>"upload_form", :class => "tabular") do %>
|
||||
<%= form_tag(project_files_path(project), :multipart => true,:remote => true,:method => :post,:name=>"upload_form", :class => "tabular") do %>
|
||||
<div class="box">
|
||||
<p>
|
||||
<table>
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
:url => {:controller => 'homework_attach',
|
||||
:action => 'addjours',
|
||||
:jour_id => homework_attach.id,
|
||||
:is_comprehensive_evaluation => is_comprehensive_evaluation,
|
||||
:sta => sta}) do |f|%>
|
||||
|
||||
<div id = 'pre_show'>
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
<% is_teacher = is_course_teacher User.current,homework.bid.courses.first %>
|
||||
<% if comprehensive_evaluation != nil && comprehensive_evaluation.count > 0 %>
|
||||
<% stars = homework.rates(:quality).where("rater_id = #{comprehensive_evaluation.first.user.id}").select("stars").first %>
|
||||
<div style="height: 100px; padding-bottom: 10px">
|
||||
<div style="font-size: 15px">
|
||||
<strong>作业综评:</strong>
|
||||
<span class="user" style="font-size: 15px">
|
||||
<div data-kls="HomeworkAttach" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled"
|
||||
style="height: 15px; width: 100px; overflow: hidden; z-index: 1; position: relative;">
|
||||
<% if stars != nil %>
|
||||
<div class="jRatingColor" style="width: <%=stars.stars * 2 * 10 %>%;"></div>
|
||||
<% else %>
|
||||
<div class="jRatingColor" style="width: 0px;"></div>
|
||||
<% end %>
|
||||
<div class="jRatingAverage" style="width: 0px; top: -20px;"></div>
|
||||
<div class="jStar" style="width: 115px; height: 20px; top: -40px;
|
||||
background: url('/images/seems_rateable/stars.png') repeat-x scroll 0% 0% transparent;">
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div style="font-size: 14px;">
|
||||
<div style="margin-left: 20px;margin-bottom: 10px;margin-top: 10px;"> <%= comprehensive_evaluation.first.notes%> </div>
|
||||
</div>
|
||||
<% if is_teacher %>
|
||||
<div style="text-align: center;">评分:
|
||||
<%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<% if is_teacher %>
|
||||
<div style="height: 200px; padding-bottom: 10px">
|
||||
<div style="font-size: 15px">
|
||||
<strong>作业综评:</strong>
|
||||
</div>
|
||||
<div style="text-align: center;">评分:
|
||||
<%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span>
|
||||
</div>
|
||||
<div>
|
||||
<%= render :partial => 'addjour', :locals => {:homework_attach => homework, :sta => 0,:is_comprehensive_evaluation => 1} %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="height: 80px; padding-bottom: 10px">
|
||||
<div style="font-size: 15px">
|
||||
<strong>作业综评:</strong>
|
||||
</div>
|
||||
<div style="text-align: center;font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 15px; "><strong>老师还未进行评价!</strong></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -38,10 +38,25 @@
|
|||
<% if jour.size > 0 %>
|
||||
<ul class="message-for-user">
|
||||
<% for journal in jour%>
|
||||
<% seems = homework.rates(:quality).where("rater_id = #{journal.user.id}").select("stars").first %>
|
||||
<li id='word_li_<%= journal.id.to_s %>' class="outer-message-for-user">
|
||||
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
|
||||
<span class="body">
|
||||
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
|
||||
<span class="user" style="font-size: 15px">
|
||||
<%= link_to journal.user, user_path(journal.user)%>
|
||||
<!--
|
||||
<% if seems != nil %>
|
||||
<div data-kls="HomeworkAttach" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled"
|
||||
style="height: 15px; width: 100px; overflow: hidden; z-index: 1; position: relative;">
|
||||
<div class="jRatingColor" style="width: <%=seems.stars * 2 * 10 %>%;"></div>
|
||||
<div class="jRatingAverage" style="width: 0px; top: -20px;"></div>
|
||||
<div class="jStar" style="width: 115px; height: 20px; top: -40px;
|
||||
background: url('/images/seems_rateable/stars.png') repeat-x scroll 0% 0% transparent;">
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
-->
|
||||
</span>
|
||||
<span class="font_lighter"><% label = l(:label_contest_requirement) %></span>
|
||||
<div> <%= textilizable journal.notes%> </div>
|
||||
<span class="font_lighter"><%= l(:label_bids_published) %>
|
||||
|
@ -70,4 +85,12 @@
|
|||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<!--分页-->
|
||||
<div class="pagination" style="float:left;">
|
||||
<ul>
|
||||
<%= pagination_links_full @feedback_pages %>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,4 +1,9 @@
|
|||
$('#message').html('<%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false} )) %>');
|
||||
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||
$('#new_form_user_message').val("");
|
||||
$('#new_form_reference_user_id').val("");
|
||||
<% if @add_jour.is_comprehensive_evaluation == 1 %>
|
||||
$('#comprehensive_evaluation').html('<%= escape_javascript(render(:partial => 'comprehensive_evaluation',
|
||||
:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework} )) %>');
|
||||
<% else %>
|
||||
$('#message').html('<%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
|
||||
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||
$('#new_form_user_message').val("");
|
||||
$('#new_form_reference_user_id').val("");
|
||||
<% end %>
|
|
@ -6,6 +6,9 @@
|
|||
height: 200px;
|
||||
}
|
||||
</style>
|
||||
<% is_student = is_cur_course_student? @homework.bid.courses.first %>
|
||||
<% is_teacher = is_course_teacher User.current,@homework.bid.courses.first %>
|
||||
|
||||
<p id="notice"><%= notice %></p>
|
||||
<!-- <%= image_tag(url_to_avatar(@user), :class => "avatar2") %> -->
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
|
@ -93,10 +96,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div style="float: left; padding-left: 100px; padding-top:35px ">
|
||||
<% score = @homework.average(:quality).try(:avg).try(:round, 2).to_s %>
|
||||
<div style="text-align: center">最终得分</div>
|
||||
<div style="padding-top: 1px; font-size: 15px; color: blue;text-align: center">
|
||||
<%= @homework.average(:quality).try(:avg).try(:round, 2).to_s %>
|
||||
分
|
||||
<% if score == "" %>
|
||||
0分
|
||||
<% else %>
|
||||
<%= score %>分
|
||||
<% end %>
|
||||
</div>
|
||||
<div style="padding-top: 3px">
|
||||
<%= rating_for @homework, :static => true, dimension: :quality, class: 'rateable div_inline' %>
|
||||
|
@ -114,42 +121,32 @@
|
|||
</div>
|
||||
<div class="underline-contests_one"></div>
|
||||
|
||||
<!--
|
||||
<div style="height: auto; padding-bottom: 10px">
|
||||
<div style="font-size: 15px">
|
||||
<strong>作业综评:</strong>
|
||||
</div>
|
||||
<div style="text-align: center;">评分:
|
||||
<%= rating_for @homework, :static => true, dimension: :quality, class: 'rateable div_inline' %>
|
||||
</div>
|
||||
<!-- 作业综评 -->
|
||||
<div id="comprehensive_evaluation">
|
||||
<%= render :partial => 'comprehensive_evaluation', :locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework} %>
|
||||
</div>
|
||||
<div class="underline-contests_one"></div>
|
||||
-->
|
||||
|
||||
<div class="underline-contests_one"></div>
|
||||
<div style="height: 50px">
|
||||
<div style="font-size: 15px"><strong>作业评论:</strong></div>
|
||||
<div style="text-align: center;">评分:
|
||||
<%= rating_for @homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span>
|
||||
</div>
|
||||
|
||||
<% if is_student %>
|
||||
<div style="text-align: center;">评分:
|
||||
<%= rating_for @homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% if !is_teacher %>
|
||||
<!--提示登录后对应用进行评价-->
|
||||
<div id='leave-message'>
|
||||
<%= render :partial => 'addjour', :locals => {:homework_attach => @homework, :sta => 0} %>
|
||||
<div id="leave-message">
|
||||
<%= render :partial => 'addjour', :locals => {:homework_attach => @homework, :sta => 0, :is_comprehensive_evaluation => nil} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!-- 留言列表区 -->
|
||||
<div id="message" style="font-size: 14px;">
|
||||
<%= render :partial => 'showjour', :locals => {:jour => @jour} %>
|
||||
</div>
|
||||
|
||||
<!--分页-->
|
||||
<div class="pagination" style="float:left;">
|
||||
<ul>
|
||||
<%= pagination_links_full @feedback_pages %>
|
||||
</ul>
|
||||
<%= render :partial => 'showjour', :locals => {:jour => @jour,:homework => @homework} %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
|
@ -57,6 +57,10 @@
|
|||
</legend>
|
||||
<div>
|
||||
<span id='name' style='display:none'>
|
||||
<p style="width:630px;padding-left: 26px;">
|
||||
<%= f.text_field :login, :required => true %>
|
||||
<span class='font_lighter'><%= l(:label_max_number) %></span>
|
||||
</p>
|
||||
<p style="width:530px;padding-left: 26px;">
|
||||
<%= f.text_field :lastname, :required => true %>
|
||||
<span class='font_lighter'><%= l(:field_lastname_eg) %></span>
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
<script>
|
||||
window.onload=function (){
|
||||
$('#upload_form').submit(function() {
|
||||
$(this).ajaxSubmit( {
|
||||
target : '#tags_show'
|
||||
});
|
||||
return false;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="tags">
|
||||
<%#begin
|
||||
|
@ -60,11 +50,7 @@
|
|||
<%= text_field "tag_name" ,"name"%>
|
||||
<input id="object_id" type="text" size="20" name="object_id" value='<%=obj.id%>' class="hidden">
|
||||
<input id="object_flag" type="text" size="20" name="object_flag" value='<%=object_flag%>' class="hidden">
|
||||
<%= button_tag "增加", :type=>"button", :onclick=>"tagAddClick(tags_show-"+obj.class.to_s + "-" +obj.id.to_s + ","+ obj.id.to_s + "," + object_flag.to_s + ")" %>
|
||||
<%#= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%#= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<input type="image" name="button" onclick="submitForm('<%=obj.id%>,<%=object_flag%>')" src="/commit.png"/>
|
||||
<%= submit_tag "增加", :name=>"add_tag" %>
|
||||
<%= submit_tag l(:button_add), :name=>"add_tag",:remote=>"false", :format => 'js' %>
|
||||
<div class='hidden'>
|
||||
<% preTags = @preTags.nil? ? [] : @preTags %>
|
||||
<% preTags.each do |tag|%>
|
||||
|
@ -113,13 +99,15 @@
|
|||
|
||||
|
||||
<script language="JavaScript">
|
||||
function submitForm(objId,objTag){
|
||||
function submitForm123(objId,objTag){
|
||||
alert("OK");
|
||||
$.ajax({
|
||||
type :"POST",
|
||||
type :"Get",
|
||||
url :'<%= users_tag_saveEx_path%>',
|
||||
remote:"true",
|
||||
format:"js",
|
||||
data: {
|
||||
tagname: $('tag_name').value,
|
||||
tagname: $('tag_name_name').val(),
|
||||
obj_id: encodeURIComponent(objId),
|
||||
obj_flag:encodeURIComponent(objTag)
|
||||
},
|
||||
|
@ -150,7 +138,7 @@
|
|||
type :"POST",
|
||||
url :'<%= users_tag_saveEx_path%>',
|
||||
data: {
|
||||
tagname: $('tag_name').value,
|
||||
tagname: $('tag_name_name').val(),
|
||||
obj_id: encodeURIComponent(objId),
|
||||
obj_flag:encodeURIComponent(objTag)
|
||||
},
|
||||
|
|
|
@ -1332,7 +1332,7 @@ en:
|
|||
label_tags_user_mail: User E-mail:
|
||||
label_tags_user_name: User Name:
|
||||
label_tags_numbers: Tag numbers:
|
||||
label_max_number: Must be at most 25 characters long.
|
||||
label_max_number: Open label nickname is displayed on the web site of your,Must be at most 25 characters long.
|
||||
label_all_revisions: All revisions:
|
||||
label_repository_name: Repository name
|
||||
label_upassword_info: The password can be shared in the group
|
||||
|
@ -1619,5 +1619,7 @@ en:
|
|||
|
||||
label_your_course: your course
|
||||
label_have_message : have a new message
|
||||
label_login_prompt: Email/NickName
|
||||
|
||||
# ajax异步验证
|
||||
modal_valid_passing: can be used.
|
||||
|
|
|
@ -284,7 +284,7 @@ zh:
|
|||
field_is_public: 公开
|
||||
field_parent: 上级项目
|
||||
field_is_in_roadmap: 在路线图中显示
|
||||
field_login: 账户/邮箱
|
||||
field_login: 昵称
|
||||
field_mail_notification: 邮件通知
|
||||
field_admin: 管理员
|
||||
field_last_login_on: 最后登录
|
||||
|
@ -598,6 +598,8 @@ zh:
|
|||
label_my_page_block: 我的工作台模块
|
||||
label_administration: 管理
|
||||
label_login: 登录
|
||||
label_login_prompt: 邮箱/账号
|
||||
lable_user_name: 登录名
|
||||
label_logout: 退出
|
||||
label_help: 帮助
|
||||
label_reported_issues: 已报告的问题
|
||||
|
@ -1495,7 +1497,7 @@ zh:
|
|||
label_tags_user_mail: 用户邮箱:
|
||||
label_tags_user_name: 用户名:
|
||||
label_tags_numbers: Tag统计:
|
||||
label_max_number: 至多25个字符。
|
||||
label_max_number: 昵称是在网站中显示的您的公开标识,至多25个字符。
|
||||
label_mail_attention: qq邮箱可能收不到此邮件,其他邮箱如果没有收到可能在垃圾邮件中,其中gmail与教育网邮箱的激活邮件有时比较慢,请耐心等待。
|
||||
label_your_course: 您的课程《
|
||||
label_have_message : 》有新的留言
|
||||
|
|
|
@ -184,6 +184,9 @@ RedmineApp::Application.routes.draw do
|
|||
|
||||
#added by young
|
||||
resources :users do
|
||||
collection do
|
||||
match "tag_saveEx" , via: [:get, :post]
|
||||
end
|
||||
member do
|
||||
match 'user_projects', :to => 'users#user_projects', :via => :get
|
||||
match 'user_activities', :to => 'users#show', :via => :get, :as => "user_activities"
|
||||
|
@ -235,7 +238,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'users/:id/memberships', :to => 'users#edit_membership', :via => :post, :as => 'user_memberships'
|
||||
################# added by william
|
||||
match 'users/tag_save', :to => 'users#tag_save', :via => :post, :as => 'tag'
|
||||
match 'users/tag_saveEx', :to => 'users#tag_saveEx', :via => :post
|
||||
match 'users/tag_saveEx', :to => 'users#tag_saveEx', :via => [:get, :post]
|
||||
|
||||
post 'watchers/watch', :to => 'watchers#watch', :as => 'watch'
|
||||
delete 'watchers/watch', :to => 'watchers#unwatch'
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddColoumToHomeworkJournalsForMessage < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :journals_for_messages, :is_comprehensive_evaluation, :integer
|
||||
end
|
||||
end
|
17
db/schema.rb
17
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20140519074133) do
|
||||
ActiveRecord::Schema.define(:version => 20140522025721) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -23,9 +23,9 @@ ActiveRecord::Schema.define(:version => 20140519074133) do
|
|||
add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type"
|
||||
add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
|
||||
|
||||
create_table "andoidcontests", :force => true do |t|
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
create_table "applied_projects", :force => true do |t|
|
||||
t.integer "project_id", :null => false
|
||||
t.integer "user_id", :null => false
|
||||
end
|
||||
|
||||
create_table "apply_project_masters", :force => true do |t|
|
||||
|
@ -57,11 +57,14 @@ ActiveRecord::Schema.define(:version => 20140519074133) do
|
|||
add_index "attachments", ["container_id", "container_type"], :name => "index_attachments_on_container_id_and_container_type"
|
||||
add_index "attachments", ["created_on"], :name => "index_attachments_on_created_on"
|
||||
|
||||
create_table "attachmentstypes", :force => true do |t|
|
||||
t.integer "typeId", :null => false
|
||||
create_table "attachmentstypes", :id => false, :force => true do |t|
|
||||
t.integer "id", :null => false
|
||||
t.integer "typeId"
|
||||
t.string "typeName", :limit => 50
|
||||
end
|
||||
|
||||
add_index "attachmentstypes", ["id"], :name => "id"
|
||||
|
||||
create_table "auth_sources", :force => true do |t|
|
||||
t.string "type", :limit => 30, :default => "", :null => false
|
||||
t.string "name", :limit => 60, :default => "", :null => false
|
||||
|
@ -651,8 +654,8 @@ ActiveRecord::Schema.define(:version => 20140519074133) do
|
|||
t.boolean "inherit_members", :default => false, :null => false
|
||||
t.integer "project_type"
|
||||
t.boolean "hidden_repo", :default => false, :null => false
|
||||
t.integer "user_id"
|
||||
t.integer "attachmenttype", :default => 1
|
||||
t.integer "user_id"
|
||||
end
|
||||
|
||||
add_index "projects", ["lft"], :name => "index_projects_on_lft"
|
||||
|
|
Loading…
Reference in New Issue