course_group
z9hang 11 years ago
commit c2d618ce9c

@ -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

@ -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?

@ -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]

@ -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

@ -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)

@ -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

@ -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>

@ -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 %>

@ -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 %>

@ -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>

@ -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),{} %>

@ -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? %>

@ -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? %>
<!-- 作业创建者显示删除作业 -->

@ -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>

@ -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 %>
<%= link_to parent_jour.user.name, user_path(parent_jour.user) %>
<% else %>
<%= l(:label_anonymous) %>
<% end %>

@ -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>
<% options = {:author => true } %>
<%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %>
<% 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>

@ -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);

@ -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)} %>

@ -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>

@ -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,9 +34,9 @@
</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 %> >
<%=link_to l(:label_contest_work), :controller=>'softapplications', :action=>'index' %>
<td >
<%=link_to l(:field_homepage), home_path %> >
<%=link_to l(:label_contest_work), :controller=>'softapplications', :action=>'index' %>
</td>
</tr>
</table>

@ -1,18 +1,24 @@
<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' %> >
<span>
<% contest = @softapplication.contests.first %><%= contest ? link_to(contest.name, show_contest_contest_path(contest)) : '尚未加入竞赛'%>
</span>
<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>
</td>
</tr>

@ -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>

@ -34,27 +34,42 @@
<div id="main">
<!-- added by bai -->
<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 rowspan="2" width="250px">
<div class="project-search">
<%= form_tag(calls_path, :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 20 %>
<%= hidden_field_tag 'reward_type', params[:reward_type] %>
<%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<% end %>
</div>
</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>
</tr>
</table>
<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 rowspan="2" width="250px">
<div class="project-search">
<%= form_tag(calls_path, :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 20 %>
<%= hidden_field_tag 'reward_type', params[:reward_type] %>
<%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<% end %>
</div>
</td>
</tr>
<tr>
<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>
<!-- end -->
@ -66,50 +81,98 @@
<tr>
<td align="left" valign="middle">
<%= image_tag(url_to_avatar(@user), :class => "avatar2") %>
</td>
</td>
<td>
<table>
<tr>
<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>
</tr>
<tr>
<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>
<tr>
<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>
</tr>
<tr>
<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>
</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>
<% 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) %>
<%= @bid.budget%>
</td>
<% else %>
<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>
</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>
<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>
<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>
<%= link_to l(:label_x_followers, :count => @bid.watcher_users.count)+"("+@bid.watcher_users.count.to_s+")", respond_path(@bid) %> &nbsp;
@ -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>

@ -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>
@ -58,27 +70,29 @@
<tr>
<td align="left" width="100px">
<%= image_tag(url_to_avatar(@user), :class => "avatar2") %>
</td>
</td>
<td>
<table>
<tr>
<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'>
<td valign="middle">
<span style="display:block; margin-left:20px;">
<%= join_in_contest(@bid, User.current)%>
</span>
<span style="display:block; margin-left:20px;">
<span class="icon-fav icon"></span>
<%= watcher_link(@bid, User.current) %>
</span>
<table>
<tr>
<td class="info_font" style=" word-wrap: break-word; word-break: break-all">
<%= h @bid.name %>
</td>
</tr>
<% end %>
</table>
<!-- added by bai 增加了竞赛的配置 -->
</tr>
<% if User.current.login? %> <!--added by linchun-->
<tr colspan='3'>
<td valign="middle">
<span style="display:block; margin-left:20px;">
<%= join_in_contest(@bid, User.current)%>
</span>
<span style="display:block; margin-left:20px;">
<span class="icon-fav icon"></span>
<%= watcher_link(@bid, User.current) %>
</span>
</td>
</tr>
<% end %>
</table>
<!-- added by bai 增加了竞赛的配置 -->
<% if User.current.logged? %>
<% if @bid.author.id == User.current.id %>
<%= link_to l(:label_contest_modify_settings), {:controller => 'bids', :action => 'settings', :id => @bid} %>
@ -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>
<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(:label_bids_reward_method) %>
<%= @bid.budget%>
</td>
</tr>
<tr>
<td><%= l(:label_limit_time) %> : <%= @bid.deadline%></td>
<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>

@ -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>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save