This commit is contained in:
zhuhao 2014-11-27 17:06:51 +08:00
commit 05a5b18710
45 changed files with 531 additions and 274 deletions

View File

@ -25,6 +25,7 @@ class AttachmentsController < ApplicationController
#before_filter :login_without_softapplication, only: [:download]
accept_api_auth :show, :download, :upload
require 'iconv'
include AttachmentsHelper
def show
@ -346,8 +347,18 @@ class AttachmentsController < ApplicationController
def add_exist_file_to_courses
file = Attachment.find(params[:file_id])
courses = params[:courses][:course]
@message = ""
courses.each do |course|
c = Course.find(course);
if course_contains_attachment?(c,file)
if @message && @message == ""
@message += l(:label_course_prompt) + c.name + l(:label_contain_resource) + file.filename + l(:label_quote_resource_failed)
next
else
@message += "<br/>" + l(:label_course_prompt) + c.name + l(:label_contain_resource) + file.filename + l(:label_quote_resource_failed)
next
end
end
attach_copied_obj = file.copy
attach_copied_obj.tag_list.add(file.tag_list) # tag关联
attach_copied_obj.container = c

View File

@ -188,10 +188,10 @@ class ContestsController < ApplicationController
# Added by Longjun
def destroy_contest
@contest = Contest.find(params[:id])
if @contest.author_id == User.current.id
if @contest.author_id == User.current.id || User.current.admin?
@contest.destroy
redirect_to action: 'index'
redirect_to welcome_contest_url
else
render_403 :message => :notice_not_contest_delete_authorized
end

View File

@ -28,6 +28,7 @@ class FilesController < ApplicationController
include SortHelper
include FilesHelper
helper :project_score
include CoursesHelper
def show_attachments obj
@attachments = []

View File

@ -58,7 +58,7 @@ class SchoolController < ApplicationController
options_s = ""
school.each do |s|
options_s << "<li style = 'width: 33%; float: left'><a id=#{s.id} onclick='test(this.id, this.text)'>#{s.name}</a></li>"
options_s << "<li style = 'width: 33%; float: left'><a style='cursor: pointer;' id=#{s.id} onclick='test(this.id, this.text)'>#{s.name}</a></li>"
end
res = Hash.new
@ -78,7 +78,7 @@ class SchoolController < ApplicationController
@school.each do |s|
#options << "<option value=#{s.id}>#{s.name}</option>"
options << "<li style = 'width: 33%; float: left'><a id=#{s.id} onclick='test(this.id, this.text)'>#{s.name}</a></li>"
options << "<li style = 'width: 33%; float: left'><a style='cursor: pointer;' id=#{s.id} onclick='test(this.id, this.text)'>#{s.name}</a></li>"
end
@ -91,7 +91,7 @@ class SchoolController < ApplicationController
options = ""
@school.each do |s|
options << "<li style = 'width: 33%; float: left'><a id=#{s.id} onclick='test(this.id)'>#{s.name}</a></li>"
options << "<li style = 'width: 33%; float: left'><a style='cursor: pointer;' id=#{s.id} onclick='test(this.id)'>#{s.name}</a></li>"
end
render :text => options
@ -105,7 +105,7 @@ class SchoolController < ApplicationController
options = ""
@school.each do |s|
options << "<li style = 'width: 33%; float: left'> <a id=#{s.id} onclick='test(this.id)'>#{s.name}</a></li>"
options << "<li style = 'width: 33%; float: left'> <a style='cursor: pointer;' id=#{s.id} onclick='test(this.id)'>#{s.name}</a></li>"
end
options = "<div class='flash error' id='flash_error'>#{l(:label_school_not_fount)}</div>" if options.blank?

View File

@ -47,7 +47,6 @@ class WordsController < ApplicationController
# 删除留言功能要调用destroy也记得在destroy.js中修改
# deny api. api useless
@show_real_name = params[:show_real_name] || false
parent_id = params[:reference_id]
author_id = User.current.id
reply_user_id = params[:reference_user_id]

View File

@ -44,7 +44,7 @@ class ZipdownController < ApplicationController
if homework != nil
unless homework.attachments.empty?
zipfile = zip_homework_by_user homework
send_file zipfile, :filename => homework.name+".zip", :type => detect_content_type(zipfile) if(zipfile)
send_file zipfile, :filename => homework.user.user_extensions.student_id + "_" + homework.user.lastname + homework.user.firstname + "_" + homework.name+".zip", :type => detect_content_type(zipfile) if(zipfile)
else
render file: 'public/no_file_found.html'
end

View File

@ -251,7 +251,7 @@ module ApplicationHelper
end
def toggle_link(name, id, options={})
onclick = "$('##{id}').toggle(); "
onclick = "$('##{id}').slideToggle(); "
onclick << (options[:focus] ? "$('##{options[:focus]}').focus(); " : "this.blur(); ")
onclick << "return false;"
link_to(name, "#", :onclick => onclick)

View File

@ -67,6 +67,15 @@ module AttachmentsHelper
end
end
def course_contains_attachment? course,attachment
course.attachments.each do |att|
if att.id == attachment.id || (!att.copy_from.nil? && !attachment.copy_from.nil? && att.copy_from == attachment.copy_from) || att.copy_from == attachment.id || att.id == attachment.copy_from
return true
end
end
false
end
private
def deletable? container, user=User.current

View File

@ -450,9 +450,9 @@ module CoursesHelper
end
#课程实践年份下拉框
def course_time_option
def course_time_option year
type = []
now_year = Time.now.year
now_year = year.nil? ? Time.now.year : (Time.now.year <= year ? Time.now.year : year)
for i in (now_year..now_year + 10)
option = []
option << i
@ -486,6 +486,20 @@ module CoursesHelper
term
end
def course_in_current_or_next_term course
is_current_term = false
is_next_term = false
if course.time == Time.now.year && course.term == cur_course_term
is_current_term = true
end
if cur_course_term == "秋季学期" && course.time == (Time.now.year + 1) && course.term == "春季学期"
is_next_term = true
elsif cur_course_term == "春季学期" && course.time == Time.now.year && course.term == "秋季学期"
is_next_term = true
end
is_current_term || is_next_term
end
#获取课程动态
def get_course_activity courses, activities
@course_ids=activities.keys()

View File

@ -47,18 +47,18 @@ module FilesHelper
def courses_check_box_tags(name,courses,current_course,attachment)
s = ''
courses.each do |course|
if !(attachment.container_type && attachment.container_id == course.id) && is_course_teacher(User.current,course)
s << "<label>#{ check_box_tag name, course.id, false, :id => nil } #{h course.name}</label><br/>"
if !(attachment.container_type && attachment.container_id == course.id) && is_course_teacher(User.current,course) && course_in_current_or_next_term(course)
s << "<label>#{ check_box_tag name, course.id, false, :id => nil } #{h course.name}</label>&nbsp;[#{get_course_term course}]<br/>"
end
end
s.html_safe
end
#判断用户是否拥有课程,需用户在该课程中角色为教师
#判断用户是否拥有课程,需用户在该课程中角色为教师且该课程属于当前学期或下一学期
def has_course? user
result = false
user.courses.each do |course|
if is_course_teacher(user,course)
if is_course_teacher(User.current,course) && course_in_current_or_next_term(course)
return true
end
end
@ -86,7 +86,7 @@ module FilesHelper
def visable_attachemnts attachments
result = []
attachments.each do |attachment|
if attachment.is_public? || attachment.author_id == User.current.id
if attachment.is_public? || (attachment.container_type == "Course" && attachment.author.member_of_course?(Course.find(attachment.container_id)))|| attachment.author_id == User.current.id
result << attachment
end
end
@ -94,9 +94,15 @@ module FilesHelper
end
def get_qute_number attachment
if attachment.copy_from.nil?
return 0
if attachment.copy_from
result = Attachment.find_by_sql("select count(*) as number from attachments where copy_from = #{attachment.copy_from}")
else
result = Attachment.find_by_sql("select count(*) as number from attachments where copy_from = #{attachment.id}")
end
if result.nil? || result.count <= 0
return 0
else
return result[0].number
end
count = Attachment.find_by_sql("select count(*) from attachments where copy_from = #{attachment.copy_from}")
end
end

View File

@ -1,5 +1,7 @@
<% if !@save_flag%>
<% if !@save_flag && @save_message %>
$("#error_show").html("<%= @save_message.join(', ') %>");
<% elsif @message && @message != "" %>
$("#error_show").html("<%= @message.html_safe %>");
<% else %>
closeModal();
<% end %>

View File

@ -22,7 +22,7 @@
<%= link_to "留言", get_homework_jours_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
(<span id="jours_count" class="c_red f_12"><%= @jours_count %></span>)
</li>
<li style="padding-top: 5px;">
<li>
<%= link_to "作品打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), class: "tb_all" unless @bid.homeworks.empty? %>
</li>
</ul>

View File

@ -2,8 +2,14 @@
<%= form_tag(:controller => 'bids', :action => 'contest', :method => :get) do %>
<table width="940px">
<tr>
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_contest_innovate) %></td>
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
<td class="info_font" style="width: 220px; color: #15bccf" rowspan="2">
<a href="http://<%= Setting.host_contest%>" style="color: #15bccf;">
<%=l(:label_contest_innovate_community)%>
</a>
</td>
<td class="location-list">
<strong><%= l(:label_user_location) %> :</strong>
</td>
<td rowspan="2">
<% if User.current.logged? %>
<% unless User.current.user_extensions.identity == 1 %>
@ -20,8 +26,10 @@
</td>
</tr>
<tr>
<td style="padding-left: 8px"><a><%= link_to request.host()+"/contest", :controller => 'bids', :action => 'index' %> </a></td>
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'bids', :action => 'contest' %></td>
<td >
<%=link_to l(:field_homepage), home_path %> >
<a><%= l(:label_contest_innovate) %></a>
</td>
</tr>
</table>
<% end %>

View File

@ -20,7 +20,7 @@
<%= render :partial => 'messages/form', :locals => {:f => f} %>
<p>
<!--<input type="button" onclick="submitCoursesBoard();" class = "ButtonColor m3p10 h30" value="<%= l(:button_submit)%>">-->
<a href="#" onclick="$('#message-form').submit();"class="ButtonColor m3p10"><%= l(:button_submit)%></a>
<a href="#" onclick="submitCoursesBoard();"class="ButtonColor m3p10"><%= l(:button_submit)%></a>
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'ButtonColor m3p10' %>
</p>
<% end %>

View File

@ -2,8 +2,14 @@
<%= form_tag({:controller => 'contests', :action => 'index'}, :method => :get) do %>
<table width="940px">
<tr>
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_contest_innovate) %></td>
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
<td class="info_font" style="width: 220px; color: #15bccf" rowspan="2">
<a href="http://<%= Setting.host_contest%>" style="color: #15bccf;">
<%=l(:label_contest_innovate_community)%>
</a>
</td>
<td class="location-list">
<strong><%= l(:label_user_location) %> :</strong>
</td>
<td rowspan="2">
<% if User.current.logged? %>
<% unless User.current.user_extensions.identity == 1 %>
@ -29,7 +35,7 @@
</td>
<td >
<%=link_to l(:field_homepage), home_path %> >
<%=link_to l(:label_contest_innovate), :controller => 'contests', :action => 'index' %>
<a><%= l(:label_contest_innovate) %></a>
<!-- end longjun -->
</td>
</tr>

View File

@ -38,12 +38,13 @@
<table>
<tr>
<td>
<span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px"><%= l(:label_class_period) %>
<span class="required"> *&nbsp;&nbsp;</span></span>
<span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:22px">
<%= l(:label_class_period) %>
<span class="required"> *&nbsp;&nbsp;</span>
</span>
<span class="info" style="width: 10px;">
<%= text_field_tag :class_period, @course.class_period, :placeholder => "#{l(:lable_input_class)}", :maxlength => 5 %>
</span>
<span>&nbsp;<strong><%= l(:label_class_hour) %></strong></span>
<span>&nbsp;
<strong>
<%= l(:label_class_hour) %>
@ -98,7 +99,7 @@
</strong>
</td>
<td class="info" style="width: 10px">
<%= select_tag :time,options_for_select(course_time_option,@course.time), {} %>
<%= select_tag :time,options_for_select(course_time_option(@course.time),@course.time), {} %>
</td>
<td class="info" style="width: 10px">
<%= select_tag :term,options_for_select(course_term_option,@course.term || cur_course_term),{} %>

View File

@ -41,7 +41,7 @@
<p class="f_l c_grey02 font">文件大小:<%= number_to_human_size(file.filesize) %></p>
<%= link_to( l(:button_delete), attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if delete_allowed && file.container_id == @course.id && file.container_type == "Course"%>
<p class="f_r c_grey02" ><%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %>&nbsp;&nbsp;|&nbsp;&nbsp;下载<%= file.downloads %>&nbsp;&nbsp;<!--|&nbsp;&nbsp;引用<%#=get_qute_number file %>--> </p>
<p class="f_r c_grey02" ><%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %>&nbsp;&nbsp;|&nbsp;&nbsp;下载<%= file.downloads %>&nbsp;&nbsp;|&nbsp;&nbsp;引用<%= get_qute_number file %> </p>
</div>
<div class="cl"></div>
<div class="tag_h">

View File

@ -1,6 +1,6 @@
<% for attachment in attachments %>
<% if attachments.count > 1 && attachment != attachments.first%>
<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<% end %>
<%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
<% if attachment.is_text? %>

View File

@ -1,4 +1,4 @@
<li class="pic_head">
<li class="pic_head" style="line-height: 1.2;">
<% if is_student_batch_homework %>
<!-- 学生匿评 不现实姓名、头像,以及相关的连接 -->
<a><%= image_tag(url_to_avatar("匿名"), :width => "40", :height => "40")%></a>
@ -19,6 +19,10 @@
<% homework_filename = homework.name %>
<% end %>
<%= link_to homework_filename , homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type), :title => homework_filename, :remote => true%>
<span class="c_grey ">
提交时间:
<%= format_time homework.created_at%>
</span>
</li>
<li class="wdown">
<%= link_to "(#{homework.attachments.count.to_s}个附件)", zipdown_download_user_homework_path(:homework => homework)%>
@ -51,7 +55,7 @@
<% if is_my_homework %>
<!-- 我的作品,在未开启匿评和未使用匿评,显示为编辑和删除 -->
<% if @bid.comment_status == 0 || @bid.open_anonymous_evaluation == 0 %>
<li class="wmine" style="padding-top: 4px;">
<li class="wmine">
<%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
<% if homework.user == User.current || User.current.admin? %>
<!-- 作业创建者显示删除作业 -->

View File

@ -46,7 +46,7 @@
</div>
<div style="clear: both;"></div>
<div>
<%= render :partial => "words/journal_reply", :locals => {:journal => jour,:show_name=> show_name, :show_real_name => true } %>
<%= render :partial => "words/journal_reply", :locals => {:journal => jour,:show_name=> show_name} %>
</div>
</div>
<div class="cl"></div>

View File

@ -1,4 +1,3 @@
<% show_real_name ||= false %>
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
<div class="recall" id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
@ -15,11 +14,7 @@
回复
<% parent_jour = JournalsForMessage.find reply.m_reply_id %>
<% if show_name && parent_jour %>
<% if show_real_name%>
<%= link_to parent_jour.user.lastname+parent_jour.user.firstname, user_path(parent_jour.user) %>
<% else %>
<%= link_to parent_jour.user.name, user_path(parent_jour.user) %>
<% end %>
<% else %>
<%= l(:label_anonymous) %>
<% end %>

View File

@ -61,16 +61,24 @@
</span>
</li>
<li style=" margin-left:130px;"><%= l(:label_activity_time) %><span class="c_grey" ><%=format_time @homework.created_at %></span></li>
<li style=" margin-left:130px;">
<%= l(:label_activity_time) %>
<span class="c_grey" >
<%=format_time @homework.created_at %>
</span>
</li>
</ul>
<div class="cl"></div>
<% if @homework.users.count > 0 %>
<div><%= l(:label_participation_person) %>
<div>
<%= l(:label_participation_person) %>
<% if @is_anonymous_comments && @is_comprehensive_evaluation != 1 %>
<%= l(:label_anonymous) %>
<%else%>
<% @homework.users.each do |homework_user| %>
<span class="c_grey"><%= link_to homework_user, user_path(homework_user)%></span>
<span class="c_grey">
<%= link_to homework_user, user_path(homework_user)%>
</span>
<% if @homework.users.count > 1 && homework_user != @homework.users.last %>
、&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<% end %>
@ -84,15 +92,23 @@
<%= @homework.description %>
<% else %>
<div style="font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 10px;padding-left: 10px ">
<strong><%= l(:label_homework_without_description) %></strong>
<strong>
<%= l(:label_homework_without_description) %>
</strong>
</div>
<% end %>
</p>
<p style=" border-bottom:none; color:#333; margin-top:8px;"><strong><%= l(:label_attachment) %>
<p style=" border-bottom:none; color:#333; margin-top:8px;">
<strong>
<%= l(:label_attachment) %>
</strong>
<span>
<% if @homework.attachments.empty?%>
<span style="color: #999999">尚未提交附件</span>
<% else%>
<% options = {:author => true } %>
<%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %>
<% end%>
</span>
</p>

View File

@ -1,7 +1,7 @@
<% if @save_succ %>
var pre_append = $('<%= j(
render :partial => "journal_reply_items",
:locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm, :show_real_name => true}
:locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm}
) %>').hide();
$('#journal_reply_ul_<%=@jfm.m_parent_id%>').append(pre_append);
pre_append.fadeIn(600);

View File

@ -41,13 +41,13 @@
<div class="Newwork">
<div id="tb_" class="tb_">
<ul>
<li id="tb_1" class="hovertab" onclick="switchTab(1);this.blur();return false;" style="width: auto; padding:10px 10px 0;">
<li id="tb_1" class="hovertab" onclick="switchTab(1);this.blur();return false;" style="width: auto; padding:5px 10px 0;">
修改作业
</li>
<li id="tb_2" class="normaltab" onclick="switchTab(2);this.blur();return false;">
成员
</li>
<li class="N_top" style="width: 747px;line-height: 1.9;">
<li class="N_top" style="width: 747px;">
<%= link_to(l(:label_project_new), {:controller => 'projects',
:action => 'new',
:course => 0,
@ -60,22 +60,26 @@
<div class="N_con">
<%= form_for(@homework) do |f|%>
<p>
<label><span class="c_red">*</span>&nbsp;&nbsp;作品名称&nbsp;&nbsp;&nbsp;&nbsp;</label>
<label>
<span class="c_red">*</span>
&nbsp;&nbsp;作品名称&nbsp;&nbsp;&nbsp;&nbsp;
</label>
<%= f.text_field :name, :required => true, :name => "homework_name", :class => "w430 bo", :maxlength => 254, :placeholder => "作品名称", :onblur => "regexName();"%>
<span id="homework_attach_name_span"></span>
</p>
<p>
<label style="float:left;padding-left:10px;">
<span class="c_red"></span>
&nbsp;&nbsp;作业描述&nbsp;&nbsp;&nbsp;&nbsp;
<label style="float:left;">
<span class="c_red">*</span>
&nbsp;&nbsp;作业描述&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</label>
<%= f.text_area :description, :rows => 8, :name => "homework_description", :class => "w620",
:maxlength => 3000, :placeholder => "最多3000个汉字" %>
</p>
<div class="cl"></div>
<p>
<label style="float: left;">&nbsp;&nbsp;&nbsp;添加附件&nbsp;&nbsp;&nbsp;&nbsp;</label>
<%#= render :partial => 'attachments/form' %>
<label style="float: left;">
&nbsp;&nbsp;&nbsp;添加附件&nbsp;&nbsp;&nbsp;&nbsp;
</label>
<% unless @homework.attachments.empty?%>
<p style=" padding: 3px 0 3px 0;padding-left: 90px;">
<% options = {:author => true, :deletable => attach_delete(@homework)} %>

View File

@ -41,10 +41,10 @@
<div class="Newwork">
<div id="tb_" class="tb_">
<ul>
<li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);" style="width: auto; padding:10px 10px 0;">
<li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);" style="width: auto; padding:5px 10px 0;">
创建作品
</li>
<li class="N_top" style="width: 835px;line-height: 1.9;">
<li class="N_top" style="width: 835px;">
<%= link_to(l(:label_project_new), {:controller => 'projects',
:action => 'new',
:course => 0,
@ -72,19 +72,20 @@
<span id="homework_attach_name_span"></span>
</p>
<p>
<label style="float:left;padding-right: 3px;">
<label style="float:left;">
<span class="c_red">
*
</span>
&nbsp;&nbsp;作品描述&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;作品描述&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</label>
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :placeholder => "最多3000个汉字", :onblur => "regexDescription();"%>
<span id="homework_attach_description_span" style="padding-left: 100px;"></span>
</p>
<div class="cl"></div>
<p>
<label style="float: left;">&nbsp;&nbsp;&nbsp;添加附件&nbsp;&nbsp;&nbsp;&nbsp;</label>
<%#= render :partial => 'attachments/form' %>
<label style="float: left;">
&nbsp;&nbsp;&nbsp;添加附件&nbsp;&nbsp;&nbsp;&nbsp;
</label>
<p style=" padding: 3px 0 3px 0;padding-left: 90px;">
<%= render :partial => 'attachments/form' %>
</p>

View File

@ -13,8 +13,14 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf"><%=l(:label_contest_innovate_community)%></td>
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td class="info_font" style="width: 240px; color: #15bccf" rowspan="2">
<a href="http://<%= Setting.host_contest%>" style="color: #15bccf;">
<%=l(:label_contest_innovate_community)%>
</a>
</td>
<td style="width: 430px; color: #15bccf">
<strong><%= l(:label_user_location) %> : </strong>
</td>
<td rowspan="2" width="305px">
<div class="project-search" style="float: right">
<%= form_tag({:controller => 'softapplications', :action => 'search'}, :method => :get, :id => "search_softapplications") do %>
@ -28,8 +34,8 @@
</tr>
<tr>
<td style="padding-left: 8px"><%=link_to request.host()+"/softapplications", :controller=>'softapplications', :action=>'index' %></td>
<td ><%=link_to l(:field_homepage), home_path %> >
<td >
<%=link_to l(:field_homepage), home_path %> >
<%=link_to l(:label_contest_work), :controller=>'softapplications', :action=>'index' %>
</td>
</tr>

View File

@ -1,15 +1,21 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf"><%=l(:label_contest_innovate_community)%></td>
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td class="info_font" style="width: 240px; color: #15bccf" rowspan="2">
<a href="http://<%= Setting.host_contest%>" style="color: #15bccf;">
<%=l(:label_contest_innovate_community)%>
</a>
</td>
<td style="width: 430px; color: #15bccf">
<strong><%= l(:label_user_location) %> : </strong>
</td>
<td rowspan="2" width="250px"></td>
</tr>
<tr>
<td style="padding-left: 8px"><%=link_to request.host()+"/contests", :controller=>'contests', :action=>'index' %></td>
<td ><%=link_to l(:field_homepage), home_path %> >
<%=link_to l(:label_contest_innovate), :controller=>'contests', :action=>'index' %> >
<td >
<%=link_to l(:field_homepage), home_path %> >
<a><%= l(:label_contest_innovate) %></a>
<span>
<% contest = @softapplication.contests.first %><%= contest ? link_to(contest.name, show_contest_contest_path(contest)) : '尚未加入竞赛'%>
</span>

View File

@ -11,12 +11,12 @@
<div id="put-tag-form-issue" style="display: none">
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
:update => "tags_show",
:complete => '$("#put-tag-form-issue").hide();' do |f| %>
:complete => '$("#put-tag-form-issue").slideUp();' do |f| %>
<%= f.text_field :name ,:id => "name-issue",:size=>"30" %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<%= f.submit "add"%>
<%= link_to_function l(:button_cancel), '$("#put-tag-form-issue").hide();'%>
<%= link_to_function l(:button_cancel), '$("#put-tag-form-issue").slideUp();'%>
<% end %>
</div>
</div>
@ -29,12 +29,12 @@
<div id="put-tag-form" style="display: none">
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
:update => "tags_show",
:complete => '$("#put-tag-form").hide();' do |f| %>
:complete => '$("#put-tag-form").slideUp();' do |f| %>
<%= f.text_field :name ,:id => "name",:size=>"28"%>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<%= f.submit "add"%>
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();'%>
<%= link_to_function l(:button_cancel), '$("#put-tag-form").slideUp();'%>
<% end %>
</div>
</div>

View File

@ -36,8 +36,14 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf"">企业众包社区</td>
<td style="width: 430px; color: #15bccf""><strong><%= l(:label_user_location) %> : </strong></td>
<td class="info_font" style="width: 240px; color: #15bccf">
企业众包社区
</td>
<td style="width: 430px; color: #15bccf">
<strong>
<%= l(:label_user_location) %> :
</strong
></td>
<td rowspan="2" width="250px">
<div class="project-search">
<%= form_tag(calls_path, :method => :get) do %>
@ -50,9 +56,18 @@
</td>
</tr>
<tr>
<td style="padding-left: 8px"><a><%= link_to request.host()+"/calls", :controller => 'bids', :action => 'index' %> </a></td>
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_requirement_enterprise), :controller => 'bids', :action => 'index' %> >
<span><%=link_to @bid.name ,bid_path %></span></td>
<td style="padding-left: 8px">
<a>
</a>
</td>
<td >
<%=link_to l(:field_homepage), home_path %> >
<%=link_to l(:label_requirement_enterprise), :controller => 'bids', :action => 'index' %> >
<span>
<%=link_to @bid.name ,bid_path %>
</span>
</td>
</tr>
</table>
</div>
@ -70,45 +85,93 @@
<td>
<table>
<tr>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= link_to @bid.name,bid_path %></td>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all">
<%= link_to @bid.name,bid_path %>
</td>
</tr>
<% if User.current.login? %>
<tr>
<td align="center"> <%= link_to(l(:label_fork_homework_new), fork_path(@bid)) %></td>
<td align="center">
<%= link_to(l(:label_fork_homework_new), fork_path(@bid)) %>
</td>
</tr>
<tr>
<td align="center"> <span style="margin-right:10px;"><span class="icon-fav icon"></span><%= watcher_link(@bid, User.current) %></span></td>
<td align="center">
<span style="margin-right:10px;">
<span class="icon-fav icon"></span>
<%= watcher_link(@bid, User.current) %>
</span>
</td>
</tr>
<% end %>
</table></td>
</table>
</td>
</tr>
</table>
<table>
<tr>
<td><%= l(:label_investor) %><%= link_to(@user, user_path(@user))%></td>
<td>
<%= l(:label_investor) %>
<%= link_to(@user, user_path(@user))%>
</td>
</tr>
<tr>
<% if @bid.reward_type.nil? or @bid.reward_type == 1%>
<td><%= l(:label_bids_reward_method) %><span style="color: #ed8924; font-weight: bold"><%= l(:label_call_bonus) %>&nbsp;<%= l(:label_RMB_sign) %><%= @bid.budget%></span></td>
<td>
<%= l(:label_bids_reward_method) %>
<span style="color: #ed8924; font-weight: bold">
<%= l(:label_call_bonus) %>&nbsp;
<%= l(:label_RMB_sign) %>
<%= @bid.budget%>
</span>
</td>
<% elsif @bid.reward_type == 2%>
<td><%= l(:label_bids_reward_method) %><%= @bid.budget%></td>
<td>
<%= l(:label_bids_reward_method) %>
<%= @bid.budget%>
</td>
<% else %>
<td><%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %>&nbsp;<%= @bid.budget%>&nbsp;<%= l(:label_bids_credit_number) %></td>
<td>
<%= l(:label_bids_reward_method) %>
<%= l(:label_bids_credit) %>&nbsp;
<%= @bid.budget%>&nbsp;
<%= l(:label_bids_credit_number) %>
</td>
<% end %>
</tr>
<tr>
<td><%= l(:label_investment_time_limit) %><%= @bid.deadline%></td>
<td>
<%= l(:label_investment_time_limit) %>
<%= @bid.deadline%>
</td>
</tr>
<tr>
<td><div style="color:#ed8924 ; font-size: 14px">被&nbsp;<strong><%= link_to(Bid.where('parent_id = ?', @bid.id).count, show_course_path(@bid)) %></strong>&nbsp;
个高校课程引用为作业!</div></td>
<td>
<div style="color:#ed8924 ; font-size: 14px">被&nbsp;
<strong>
<%= link_to(Bid.where('parent_id = ?', @bid.id).count, show_course_path(@bid)) %>
</strong>&nbsp;
个高校课程引用为作业!
</div>
</td>
</tr>
<tr>
<td><div style="color:#ed8924 ; font-size: 14px">有&nbsp;<strong><%= link_to(count_bid_project, show_bid_project_path(@bid)) %></strong>&nbsp;
个项目正在实现该需求!</div></td>
<td>
<div style="color:#ed8924 ; font-size: 14px">
有&nbsp;
<strong><%= link_to(count_bid_project, show_bid_project_path(@bid)) %></strong>&nbsp;
个项目正在实现该需求!
</div>
</td>
</tr>
<td><div style="color: #ed8924; font-size: 14px">有&nbsp;<strong><%= link_to(count_bid_user, show_bid_user_path(@bid)) %></strong>&nbsp;
个高校用户正在努力完成此需求!</div></td>
<tr>
<td>
<div style="color: #ed8924; font-size: 14px">
有&nbsp;
<strong><%= link_to(count_bid_user, show_bid_user_path(@bid)) %></strong>&nbsp;
个高校用户正在努力完成此需求!
</div>
</td>
</tr>
</table>
<div>
@ -121,10 +184,12 @@
<!--tags-->
<div class="user_fans">
<div class="font_title_left">
<strong><%= l(:label_tag) %></strong>
<strong>
<%= l(:label_tag) %>
</strong>
</div>
<div class="user_underline"></div>
<table style="font-family:微软雅黑">
<table style="font-family:'微软雅黑'">
<tr>
<td><!-- added by william -for tag -->
<%= render :partial => 'tags/tag', :locals => {:obj => @bid, :object_flag => "4"}%>
@ -144,11 +209,12 @@
<td style="padding-top: 5px">
<% if @bid.watcher_users.size>0 %>
<% for user in @bid.watcher_users%>
<%= link_to image_tag(url_to_avatar(user), :class => "avatar", :title => user.name ),user_path(user) %>
<% end %>
<% else %>
<p class="font_lighter"><%= l(:label_project_no_follow) %></p>
<p class="font_lighter">
<%= l(:label_project_no_follow) %>
</p>
<% end%>
</td>
</tr>
@ -177,10 +243,7 @@
</table>
</div>
</div>
</div>
</div>
<!-- end -->
</div>
@ -190,7 +253,6 @@
<%= render_menu :bid_menu %>
</div>
<% end %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
@ -199,12 +261,10 @@
</div>
</div>
</div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<div id="ajax-modal" style="display:none;"></div>
</div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>

View File

@ -29,8 +29,16 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf"><%=l(:label_contest_innovate_community)%></td>
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td class="info_font" style="width: 240px;" rowspan="2">
<a href="http://<%= Setting.host_contest%>" style="color: #15bccf;">
<%=l(:label_contest_innovate_community)%>
</a>
</td>
<td style="width: 430px; color: #15bccf">
<strong>
<%= l(:label_user_location) %> :
</strong>
</td>
<td rowspan="2" width="250px">
<div class="project-search">
<%= form_tag(:controller => 'bids', :action => 'contest', :method => :get) do %>
@ -43,9 +51,13 @@
</td>
</tr>
<tr>
<td style="padding-left: 8px"><%=link_to request.host()+"/contest", :controller => 'bids', :action => 'contest' %></td>
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'bids', :action => 'contest' %> >
<span><%= link_to @bid.name, bid_path %></span></td>
<td >
<%=link_to l(:field_homepage), home_path %> >
<%= l(:label_contest_innovate)%> >
<span>
<%= link_to @bid.name, bid_path %>
</span>
</td>
</tr>
</table>
</div>
@ -62,7 +74,9 @@
<td>
<table>
<tr>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @bid.name %></td>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all">
<%= h @bid.name %>
</td>
</tr>
<% if User.current.login? %> <!--added by linchun-->
<tr colspan='3'>
@ -100,8 +114,12 @@
:action => 'show_project' %>
</td>
<tr class="font_aram">
<td align="center" width="70px"> <%= l(:label_participator) %></td>
<td align="center" width="70px"> <%= l(:label_bidding_project) %></td>
<td align="center" width="70px">
<%= l(:label_participator) %>
</td>
<td align="center" width="70px">
<%= l(:label_bidding_project) %>
</td>
</tr>
</table>
<div class="user_underline"></div>
@ -110,14 +128,22 @@
<div class="inf_user_image">
<table>
<tr>
<td><%= l(:lable_contest_user) %><%= link_to(@user.name, user_path(@user))%></td>
</tr>
<tr>
<td><%= l(:label_bids_reward_method) %><%= @bid.budget%></td>
<td>
<%= l(:lable_contest_user) %>
<%= link_to(@user.name, user_path(@user))%>
</td>
</tr>
<tr>
<td><%= l(:label_limit_time) %> : <%= @bid.deadline%></td>
<td>
<%= l(:label_bids_reward_method) %>
<%= @bid.budget%>
</td>
</tr>
<tr>
<td>
<%= l(:label_limit_time) %> :
<%= @bid.deadline%>
</td>
</tr>
</table>
</div>
@ -130,7 +156,6 @@
<div style="padding-bottom: 8px">
<% if @bid.description.size>0 %>
<div class="font_lighter_sidebar">
<%= textilizable @bid.description %>
</div>
<% else %>
@ -139,7 +164,10 @@
</div>
<% end %>
<div class="created_on_project">
<strong style="color: #068d9c"><%= l(:label_create_time) %></strong><%= format_time(@bid.created_on) %>
<strong style="color: #068d9c">
<%= l(:label_create_time) %>
</strong>
<%= format_time(@bid.created_on) %>
</div>
</div>
<div class="user_underline"></div>
@ -158,9 +186,13 @@
<div class="user_fans">
<div class="user_underline"></div>
<div class="font_title_left">
<strong><%= l(:label_x_followers, :count => @bid.watcher_users.count) %></strong>
<strong>
<%= l(:label_x_followers, :count => @bid.watcher_users.count) %>
</strong>
<% if show_more_fans?(@bid) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), :controller => 'bids', :action => 'show_bid_user'%></span>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;">
<%= link_to l(:label_more), :controller => 'bids', :action => 'show_bid_user'%>
</span>
<% end %>
</div>
<div class="left_wf">
@ -177,9 +209,13 @@
<div class="user_fans">
<div class="user_underline"></div>
<div class="font_title_left">
<strong><%= l(:label_bidding_project) %></strong>
<strong>
<%= l(:label_bidding_project) %>
</strong>
<% if show_more_bid_project?(@bid) %>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), :controller => 'bids', :action => 'show_project'%></span>
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;">
<%= link_to l(:label_more), :controller => 'bids', :action => 'show_project'%>
</span>
<% end %>
</div>
<div class="left_wf">
@ -200,7 +236,9 @@
<!--fans fq-->
<div class="user_fans">
<div class="font_title_left">
<strong><%= l(:label_x_join_in_contest, :count => @bid.join_in_contests.count) %></strong>
<strong>
<%= l(:label_x_join_in_contest, :count => @bid.join_in_contests.count) %>
</strong>
<% if show_more_participate?(@bid) %>
<span style="font-size: 12px; display: inline; float: right;" >
<%= link_to l(:label_more), :controller => "bids", :action => "show_participator"%>
@ -210,7 +248,9 @@
<div class="left_wf">
<table>
<tr>
<td style="padding-top: 5px"> <%= show_participate_picture(@bid) %> </td>
<td style="padding-top: 5px">
<%= show_participate_picture(@bid) %>
</td>
</tr>
</table>
</div>
@ -234,7 +274,9 @@
</div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
<span>
<%= l(:label_loading) %>
</span>
</div>
<div id="ajax-modal" style="display:none;"></div>

View File

@ -34,7 +34,11 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td>
<td class="info_font" style="width: 240px;" rowspan="2">
<a href="http://<%= Setting.host_course%>" style="color: #15bccf;">
高校课程实践社区
</a>
</td>
<td style="color: #15bccf">
<strong>
<%= l(:label_user_location) %> :
@ -50,14 +54,16 @@
</td>
</tr>
<tr>
<td style="padding-left: 8px">
<%= link_to request.host()+"/course", :controller => 'courses', :action => 'index' %>
</td>
<td>
<p class="top-content-list">
<%= link_to "主页", home_path %>
> <a href="http://<%= Setting.host_course%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
> <%= link_to @course.name, nil %>
>
<a href="http://<%= Setting.host_course%>" class="link_other_item">
<%=l(:label_courses_management_platform)%>
</a>
>
<%= link_to @course.name, nil %>
</p>
</td>
</tr>

View File

@ -29,7 +29,8 @@
background: #15bccf;
color: #fff;
text-align: center;
padding: 5px !important;
padding-left: 5px !important;
padding-right: 5px !important;
}
.span_wping a:hover{ background-color:#03a1b3;}
</style>
@ -46,15 +47,16 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf">高校课程实践社区</td>
<td class="info_font" style="width: 240px;" rowspan="2">
<a href="http://<%= Setting.host_course%>" style="color: #15bccf;">
高校课程实践社区
</a>
</td>
<td style="width: auto; color: #15bccf">
<strong><%= l(:label_user_location) %> : </strong>
</td>
</tr>
<tr>
<td style="padding-left: 8px">
<a><%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index' %></a>
</td>
<td>
<p class="top-content-list-homework"><%= link_to "主页", home_path %>
>

View File

@ -27,8 +27,10 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf">
<td class="info_font" style="width: 240px; color: #15bccf" rowspan="2">
<a href="http://<%= Setting.host_contest%>" style="color: #15bccf;">
<%=l(:label_contest_innovate_community)%>
</a>
</td>
<td style="width: 430px; color: #15bccf">
<strong><%= l(:label_user_location) %> : </strong>
@ -44,11 +46,8 @@
</td>
</tr>
<tr>
<td style="padding-left: 8px">
<%=link_to request.host()+"/contests", :controller=>'contests', :action=>'index' %>
</td>
<td><%=link_to l(:field_homepage), home_path %> >
<%=link_to l(:label_contest_innovate), :controller=>'contests', :action=>'index' %> >
<a><%= l(:label_contest_innovate) %></a> >
<span title="<%= @contest.name%>">
<%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %>
</span>

View File

@ -30,8 +30,14 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf">软件项目托管社区</td>
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td class="info_font" style="width: 240px;" rowspan="2">
<a href="http://<%= Setting.host_name%>" style="color: #15bccf;">
软件项目托管社区
</a>
</td>
<td style="width: 430px; color: #15bccf">
<strong><%= l(:label_user_location) %> : </strong>
</td>
<td rowspan="2" width="250px">
<div class="top-content-search">
<%= form_tag(projects_search_path, :method => :get) do %>
@ -43,8 +49,12 @@
</td>
</tr>
<tr>
<td style="padding-left: 8px"><%= link_to request.host()+"/projects", :controller => 'projects', :action => 'index', :project_type => 0 %></td>
<td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to @project, project_path(@project) %></p></td>
<td>
<p class="top-content-list">
<%=link_to l(:label_home),home_path %> >
<%=link_to @project, project_path(@project) %>
</p>
</td>
</tr>
</table>
</div>
@ -54,7 +64,9 @@
<% @project = Project.find_by_id(@project.id)%>
<table>
<tr>
<td><%= image_tag(url_to_avatar(@project), :class => 'avatar2') %></td>
<td>
<%= image_tag(url_to_avatar(@project), :class => 'avatar2') %>
</td>
<td>
<div class="info-course">
<%= link_to @project.name, project_path(@project)%>
@ -86,15 +98,26 @@
<% @project.versions.each do |version| %>
<% files_count += version.attachments.count %>
<% end %>
<td class="font_index"><%=link_to "#{@project.members.count}", project_member_path(@project) %></td>
<td class="font_index"><%=link_to @project.watcher_users.count, :controller=>"projects", :action=>"watcherlist", :id => @project %></td>
<td class="font_index"><%=link_to "#{@project.issues.count}", project_issues_path(@project) %></td>
<!-- <td class="font_index"><%=link_to files_count, project_files_path(@project) %></td> -->
<td class="font_index">
<%=link_to "#{@project.members.count}", project_member_path(@project) %>
</td>
<td class="font_index">
<%=link_to @project.watcher_users.count, :controller=>"projects", :action=>"watcherlist", :id => @project %>
</td>
<td class="font_index">
<%=link_to "#{@project.issues.count}", project_issues_path(@project) %>
</td>
</tr>
<tr class="font_aram">
<td align="center" width="70px"> <%= l(:label_member) %></td>
<td align="center" width="100px"><%= l(:label_user_watchered) %></td>
<td align="center" width="70px"> <%= l(:label_project_issues) %></td>
<td align="center" width="70px">
<%= l(:label_member) %>
</td>
<td align="center" width="100px">
<%= l(:label_user_watchered) %>
</td>
<td align="center" width="70px">
<%= l(:label_project_issues) %>
</td>
<!-- <td align="center" width="58px"><%#= l(:label_attachment) %></td> -->
</tr>
</table>
@ -109,7 +132,10 @@
<%= textilizable @project.description %>
</div>
<div class="created_on_project">
<strong style="color: #15bccf"><%= l(:label_create_time) %></strong><%= format_time(@project.created_on) %>
<strong style="color: #15bccf">
<%= l(:label_create_time) %>
</strong>
<%= format_time(@project.created_on) %>
</div>
</div>
<div class="user_underline"></div>

View File

@ -101,8 +101,12 @@
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 238px; color: #15bccf"><%= l(:label_user_home) %></td>
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td class="info_font" style="width: 238px; color: #15bccf" rowspan="2">
<%= l(:label_user_home) %>
</td>
<td style="width: 430px; color: #15bccf">
<strong><%= l(:label_user_location) %> : </strong>
</td>
<td rowspan="2" width="250px">
<div class="top-content-search <%='hidden' if show_search_bar(params) %>">
<%= form_tag(:controller => 'users', :action => 'search', :method => :get) do %>
@ -113,12 +117,11 @@
</td>
</tr>
<tr>
<td style="padding-left: 8px">
<%=link_to request.host()+"/users" ,:controller => 'users', :action => 'index' %>
</td>
<td>
<%=link_to "主页", home_path %> >
<span><%=link_to @user.name, user_path %></span>
<span>
<%=link_to @user.name, user_path %>
</span>
</td>
</tr>
</table>
@ -131,23 +134,28 @@
<div class="inf_user_image">
<table>
<tr>
<td align="left" valign="middle" ><%= image_tag(url_to_avatar(@user), :class => 'avatar2') %></td>
<td align="left" valign="middle" >
<%= image_tag(url_to_avatar(@user), :class => 'avatar2') %>
</td>
<td>
<table>
<tr>
<!-- added by bai -->
<!-- modified by zjc 姓名添加超链接 -->
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all"><%= link_to h (@user.name) %>
<%= image_tag(gender_avatar_uri(@user), weight:"25px", height:"25px") if (@user.user_extensions && (@user.user_extensions.identity != 2) )%></td>
<td class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all">
<%= link_to h (@user.name) %>
<%= image_tag(gender_avatar_uri(@user), weight:"25px", height:"25px") if (@user.user_extensions && (@user.user_extensions.identity != 2) )%>
</td>
</tr>
<tr>
<td align="center"> <% unless User.current == @user %>
<td align="center">
<% unless User.current == @user %>
<%= watcher_link(@user, User.current) %>
<% else %>
<%= link_to(l(:label_user_edit), my_account_path(@user)) if User.current %>
<% end %></td>
<% end %>
</td>
</tr>
<tr>
<td class="score">
<div id="score_div">
@ -156,8 +164,8 @@
</td>
</tr>
<!-- end -->
</table></td>
</table>
</td>
</tr>
</table>
<div>
@ -228,7 +236,10 @@
<% unless @user.user_extensions.nil? %>
<% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %>
<tr>
<td style="padding-left: 5px" width="70px"><%= l(:field_occupation) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<td style="padding-left: 5px" width="70px">
<%= l(:field_occupation) %>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<% unless @user.user_extensions.school.nil? %>
<a href="http://course.trustie.net/?school_id=<%= @user.user_extensions.school.id%>"><%= @user.user_extensions.school.name %></a>
<% end %>
@ -236,21 +247,31 @@
</tr>
<% elsif @user.user_extensions.identity == 3 %>
<tr>
<td style="padding-left: 5px" width="70px"><%= l(:field_occupation) %></td>
<td style="padding-left: 5px" width="70px">
<%= l(:field_occupation) %>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.user_extensions.occupation %>
</td>
</tr>
<% elsif @user.user_extensions.identity == 2 %>
<tr>
<td style="padding-left: 18px" width="70px"><%= l(:label_company_name) %></td>
<td style="padding-left: 18px" width="70px">
<%= l(:label_company_name) %>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.firstname %>
</td>
</tr>
<% end %>
<tr>
<td style="padding-left: 31px" width="76px"><%= l(:label_location) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.location %><%= @user.user_extensions.location_city %></td>
<td style="padding-left: 31px" width="76px">
<%= l(:label_location) %>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.user_extensions.location %>
<%= @user.user_extensions.location_city %>
</td>
</tr>
<tr>
<% if @user.user_extensions.identity == 0 %>
@ -307,7 +328,9 @@
<div class="user_underline"></div>
<div class="user_fans">
<div class="font_title_left">
<strong><%= l(:label_user_watcher) %></strong>
<strong>
<%= l(:label_user_watcher) %>
</strong>
<% if show_more_watchers?(@user) %>
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" >
<%= link_to l(:label_more), :controller => "users", :action => "user_watchlist"%>
@ -318,7 +341,9 @@
<div class="left_wf">
<table>
<tr>
<td style="padding-top: 5px"> <%= show_watcher_profile(@user) %> </td>
<td style="padding-top: 5px">
<%= show_watcher_profile(@user) %>
</td>
</tr>
</table>
</div>
@ -327,7 +352,9 @@
<!--fans-->
<div class="user_fans">
<div class="font_title_left">
<strong><%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count) %></strong>
<strong>
<%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count) %>
</strong>
<% if show_more_fans?(@user) %>
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" >
<%= link_to l(:label_more), :controller => "users", :action => "user_fanslist"%>
@ -337,7 +364,9 @@
<div class="left_wf">
<table>
<tr>
<td style="padding-top: 5px"> <%= show_fans_picture(@user) %> </td>
<td style="padding-top: 5px">
<%= show_fans_picture(@user) %>
</td>
</tr>
</table>
</div>

View File

@ -44,7 +44,7 @@
<span>
<%= link_to (image_tag "/images/sidebar/add.png"), 'javascript:void(0);',
:class => "tags_icona",
:onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').toggle(); readmore(this);" if User.current.logged? %>
:onclick=>"$('#put-tag-form-#{obj.class}-#{obj.id}').slideToggle(); readmore(this);" if User.current.logged? %>
<%#= toggle_link (image_tag "/images/sidebar/add.png"), "put-tag-form-#{obj.class}-#{obj.id}", {:focus => "put-tag-form-#{obj.class}-#{obj.id} #name"} if User.current.logged? %>
</span>
&nbsp;&nbsp;
@ -72,7 +72,7 @@
<div id="put-tag-form" style="display: none">
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
:update => "tags_show",
:complete => '$("#put-tag-form").hide();' do |f| %>
:complete => '$("#put-tag-form").slideUp();' do |f| %>
<%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
@ -80,7 +80,7 @@
<a href="#" onclick='$("#tags_name").parent().submit();' class="ButtonColor m3p10" >
<%= l(:button_project_tags_add)%>
</a>
<%= link_to_function l(:button_cancel), '$("#put-tag-form").hide();',:class=>'ButtonColor m3p10'%>
<%= link_to_function l(:button_cancel), '$("#put-tag-form").slideUp();',:class=>'ButtonColor m3p10'%>
<% end %>
</div>
<% end %>

View File

@ -25,8 +25,10 @@
<%= link_to course.school.name.try(:gsub, /(.+)$/, '\1'), options={:action => 'course', :school_id => course.school.id}, html_options={:method => 'get'} %>
<% end %>
(<%= course.members.count %>人)
<%# files_count = course.attachments.count.to_s %>
(<%= link_to "#{course.attachments.count.to_s}份", course_files_path(course) %>资料)
<% files_count = course.attachments.count %>
<% if files_count > 0%>
(<%= link_to "#{files_count.to_s}份", course_files_path(course) %>资料)
<% end %>
</div>
</li>
<% end %>

View File

@ -1,8 +1,7 @@
<% id = "journal_reply_ul_" + journal.id.to_s%>
<% show_real_name ||= false%>
<div id = '<%= id %>' >
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name, :show_real_name => show_real_name} %>
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name} %>
<% end %>
</div>

View File

@ -1,4 +1,3 @@
<% show_real_name ||= false %>
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
<div class="recall" id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
@ -11,19 +10,11 @@
</div>
<div class="recall_con">
<% id = 'project_respond_form_'+ reply.id.to_s %>
<% if show_real_name%>
<%= link_to reply.user.lastname+reply.user.firstname, user_path(reply.user) %>
<% else %>
<%= link_to reply.user.name, user_path(reply.user) %>
<% end %>
回复
<% parent_jour = JournalsForMessage.find reply.m_reply_id %>
<% if show_name && parent_jour %>
<% if show_real_name%>
<%= link_to parent_jour.user.lastname+parent_jour.user.firstname, user_path(parent_jour.user) %>
<% else %>
<%= link_to parent_jour.user.name, user_path(parent_jour.user) %>
<% end %>
<% else %>
<%= l(:label_anonymous) %>
<% end %>
@ -51,7 +42,7 @@
</div>
<div id='<%=id%>' class="respond-form">
<% if reply_allow %>
<%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name, :show_real_name => show_real_name} %>
<%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>
<% end %>
</div>
<div style="clear: both;"></div>

View File

@ -1,5 +1,4 @@
<% show_real_name ||= false%>
<%= form_tag(words_create_reply_path(:show_real_name=>show_real_name), :remote => true) do %>
<%= form_tag(words_create_reply_path, :remote => true) do %>
<%= text_area_tag 'user_notes', "", :class => 'noline',
:style => "resize: none;", :rows => 4,
:placeholder => l(:label_projects_feedback_respond_content),

View File

@ -1,7 +1,7 @@
<% if @save_succ %>
var pre_append = $('<%= j(
render :partial => "words/journal_reply_items",
:locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm,:show_name => @show_name, :show_real_name=>@show_real_name}
:locals => {:reply => @jfm, :journal => @jfm.parent, :m_reply_id => @jfm,:show_name => @show_name}
) %>').hide();
$('#journal_reply_ul_<%=@jfm.m_parent_id%>').append(pre_append);
pre_append.fadeIn(600);

View File

@ -2205,3 +2205,7 @@ zh:
label_my_score: 我的评分
field_open_anonymous_evaluation: 是否使用匿评
label_course_empty_select: 尚未选择课程!
label_course_prompt: 课程:
label_contain_resource: 已包含资源:
label_quote_resource_failed: ",此资源引用失败! "

View File

@ -0,0 +1,9 @@
class UpdateStudentScore < ActiveRecord::Migration
def up
sql = ActiveRecord::Base.connection()
sql.update_sql("update seems_rateable_rates set stars = 5 where stars > 5")
end
def down
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20141120091234) do
ActiveRecord::Schema.define(:version => 20141127072548) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false

View File

@ -1,5 +1,5 @@
/* CSS Document */
body{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; background:#fff; font-style:normal;}
body{ font-size:12px !important; font-family:"微软雅黑","宋体" !important; line-height:1.9; background:#fff; font-style:normal;}
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,textarea{ margin:0; padding:0;}
div,img,tr,td,textarea{ border:0;}
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
@ -15,7 +15,7 @@ a:hover{ text-decoration:underline;}
/* TAB 切换效果 */
.tb_{ background-color: #eaeaea; height:40px; }
.tb_ ul{height:40px; }
.tb_ li{float:left;height:30px;width: 90px;cursor:pointer; font-size:14px; padding-top:10px; text-align:center; }
.tb_ li{float:left;height:35px;width: 90px;cursor:pointer; font-size:14px; padding-top:5px; text-align:center; }
a.tb_all{ margin-left:235px; font-size:12px; display:block; height:23px; padding-top:4px; width:90px; color:#7a7a7a; border:1px solid #cbcbcb; background:#fff; text-align: center;}
a:hover.tb_all{ background:#eaeaea; text-decoration:none;}
@ -38,13 +38,13 @@ a:hover.tb_all{ background:#eaeaea; text-decoration:none;}
.pic_head a{ text-align:center; width:42px; overflow:hidden;text-overflow:ellipsis; white-space:nowrap;}
.pic_head img{ border:1px solid #fff;}
.pic_head img:hover{border:1px solid #15bccf;}
.dis ul li.wname a{ width:260px; font-size:14px; color:#595959; padding:25px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.dis ul li.wdown a{padding-top:25px; color:#3d7ec2; margin-right:35px;}
.wscore{ padding-top:25px; color:#888888; width:96px;}
.dis ul li.wname a{ width:260px; font-size:14px; color:#595959; padding:15px 0 0 0px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.dis ul li.wdown a{padding-top:22px; color:#3d7ec2; margin-right:35px;}
.wscore{ padding-top:22px; color:#888888; width:96px;}
.dis ul li.wping{margin-left:12px; }
.dis ul li.wping a{ margin-top:18px; margin-bottom:3px; width:43px; height:23px; background:#15bccf; color:#fff; text-align:center; padding-top:8px;}
.dis ul li.wping a{ margin-top:18px; margin-bottom:3px; width:43px; height:23px; background:#15bccf; color:#fff; text-align:center; padding-top:3px;}
.dis ul li.wping a:hover{ background-color:#03a1b3;}
ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px;line-height: 1.9; }
ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
.wlist span{ border:1px solid #15bccf; padding:0 5px; margin-left:3px;}
.wlist a{ border:1px solid #15bccf; padding:0 5px; margin-left:3px;}
.wlist a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
@ -55,7 +55,7 @@ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px;line-hei
.c_grey{ color:#999; font-weight:normal;}
.dis ul li.wname02 a{ width:200px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.dis ul li.wmine{ margin:12px 0 0 10px;}
.dis ul li.wmine a{ color:#3d7ec2; text-align:center; width:50px; font-weight: bold;line-height: 1.9;}
.dis ul li.wmine a{ color:#3d7ec2; text-align:center; width:50px; font-weight: bold;}
.wzan{ margin:15px 0 0 25px; width:32px; height:44px;}
.wzan a{ display: block;text-align: center;}
a.wzan_img{background:url(images/pic_zan.png) 0 -59px no-repeat; display:block; height:31px; width:30px; color:#fff;}
@ -83,8 +83,8 @@ a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
.ping_star span a{ float:right; width:20px; height:20px; background:url(images/star.png) -2px 0 no-repeat; margin-right:3px;}
.ping_star span a:hover{background:url(images/star.png) -24px 0 no-repeat;}
.ping_con textarea{ height:76px; border:1px solid #15bccf; margin-bottom:5px; color:#666; font-size:12px;}
a.ping_sub{ float:right; height:22px; width:60px; margin-right:20px; background:#15bccf; color:#fff; text-align:center;padding-top: 5px;}
a.ping_sub1{ float:right; height:22px; width:60px; background:#15bccf; color:#fff; text-align:center;line-height: 1.9;}
a.ping_sub{ float:right; height:22px; width:60px; margin-right:20px; background:#15bccf; color:#fff; text-align:center;}
a.ping_sub1{ float:right; height:22px; width:60px; background:#15bccf; color:#fff; text-align:center;}
a:hover.ping_sub{ background:#14a8b9;}
.recall{ border-top:1px solid #CCC; padding:5px 0;}
.recall_head{ float:left;}
@ -128,9 +128,9 @@ a:hover.ping_sub{ background:#14a8b9;}
.w430{ width:430px;}
.w350{ width:350px;}
.w620{ width:580px; height:160px; border:1px solid #CCC !important; padding-left: 3px !important;}
.w620{ width:580px; height:160px; border:1px solid #CCC;}
.bo{height:26px; border:1px solid #CCC !important; padding: 0 !important;}
a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;line-height: 1.9;}
a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;}
a:hover.tijiao{ background:#0f99a9 !important;}
.members_left{ float:left; width:570px; margin-right:20px;}
.members_left{}