Merge branch 'develop' into szzh
This commit is contained in:
commit
97f66a2b08
|
@ -496,12 +496,14 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
def render_403(options={})
|
||||
@project = nil
|
||||
render_error({:message => :notice_not_authorized, :status => 403}.merge(options))
|
||||
#render_error({:message => :notice_not_authorized, :status => 403}.merge(options))
|
||||
render :template => 'common/403'
|
||||
return false
|
||||
end
|
||||
|
||||
def render_404(options={})
|
||||
render_error({:message => :notice_file_not_found, :status => 404}.merge(options))
|
||||
#render_error({:message => :notice_file_not_found, :status => 404}.merge(options))
|
||||
render :template => 'common/404'
|
||||
return false
|
||||
end
|
||||
|
||||
|
|
|
@ -544,7 +544,6 @@ class CoursesController < ApplicationController
|
|||
|
||||
def finishcourse
|
||||
yesterday = Date.today.prev_day.to_time
|
||||
|
||||
@course_prefs.endup_time = yesterday
|
||||
@save_flag = @course_prefs.save
|
||||
get_courses
|
||||
|
|
|
@ -62,11 +62,12 @@ class WelcomeController < ApplicationController
|
|||
|
||||
def course
|
||||
@course_page = FirstPage.where("page_type = 'course'").first
|
||||
if params[:school_id]
|
||||
@school_id = params[:school_id]
|
||||
elsif User.current.logged? && User.current.user_extensions.try(:school)
|
||||
@school_id = User.current.user_extensions.school.try(:id)
|
||||
end
|
||||
#if params[:school_id]
|
||||
# @school_id = params[:school_id]
|
||||
#elsif User.current.logged? && User.current.user_extensions.try(:school)
|
||||
# @school_id = User.current.user_extensions.school.try(:id)
|
||||
#end
|
||||
@school_id = params[:school_id] || User.current.user_extensions.school.try(:id)
|
||||
@logoLink ||= logolink()
|
||||
end
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ class WordsController < ApplicationController
|
|||
#modify by nwb
|
||||
#添加对课程留言的支持
|
||||
referer = request.headers["Referer"]
|
||||
obj_id = referer.match(%r(/([0-9]{1,})(/|$)))[1]
|
||||
obj_id = referer.match(%r(/([0-9]{1,})(/|\?|$)))[1]
|
||||
if referer.match(/project/)
|
||||
obj = Project.find_by_id(obj_id)
|
||||
elsif referer.match(/course/)
|
||||
|
|
|
@ -31,7 +31,8 @@ class ZipdownController < ApplicationController
|
|||
end
|
||||
send_file zipfile, :filename => obj.name+".zip", :type => detect_content_type(zipfile) if zipfile
|
||||
|
||||
#rescue NameError, ActiveRecord::RecordNotFound => e
|
||||
rescue Exception => e
|
||||
render file: 'public/no_file_found.html' , :layout => 'course_base'
|
||||
#logger.error "[ZipDown] ===> #{e}"
|
||||
#@error = e
|
||||
end
|
||||
|
|
|
@ -136,31 +136,33 @@ module WelcomeHelper
|
|||
|
||||
#获取课程列表
|
||||
# add by nwb
|
||||
def find_miracle_course(sum=10, max_rate=7, school_id)
|
||||
def find_miracle_course(sum=10, max_rate=7, school_id, time,term)
|
||||
if User.current.user_extensions.nil? && User.current.user_extensions.school.nil? and school_id.nil?
|
||||
Course.active.visible.
|
||||
joins(:memberships).
|
||||
where("courses.time = #{time} and courses.term = #{term}").
|
||||
group('members.course_id').
|
||||
reorder("courses.created_at DESC, COUNT(members.course_id) DESC").take sum
|
||||
else
|
||||
if school_id.nil?
|
||||
Course.active.visible.
|
||||
joins(:memberships).
|
||||
where("#{Course.table_name}.school_id = ?", User.current.user_extensions.school.id).
|
||||
where("#{Course.table_name}.school_id = ? and courses.time = ? and courses.term = ?", User.current.user_extensions.school.id, time, term).
|
||||
group('members.course_id').
|
||||
reorder("courses.created_at DESC, COUNT(members.course_id) DESC").take sum
|
||||
reorder("COUNT(members.course_id) DESC").take sum
|
||||
else
|
||||
if school_id == "0"
|
||||
Course.active.visible.
|
||||
joins(:memberships).
|
||||
where("courses.time = #{time} and courses.term = #{term}").
|
||||
group('members.course_id').
|
||||
reorder("courses.created_at DESC, COUNT(members.course_id) DESC").take sum
|
||||
reorder("COUNT(members.course_id) DESC").take sum
|
||||
else
|
||||
Course.active.visible.
|
||||
joins(:memberships).
|
||||
where("#{Course.table_name}.school_id = ?", school_id).
|
||||
where("#{Course.table_name}.school_id = ? and courses.time = ? and courses.term = ?", school_id, time, term).
|
||||
group('members.course_id').
|
||||
reorder("courses.created_at DESC, COUNT(members.course_id) DESC").take sum
|
||||
reorder("COUNT(members.course_id) DESC").take sum
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -229,16 +231,28 @@ module WelcomeHelper
|
|||
end
|
||||
|
||||
# modif by nwb
|
||||
def find_all_new_hot_course limit = 9 ,school_id = 0
|
||||
def find_all_new_hot_course limit = 9 ,school_id = nil, year_now, course_term
|
||||
#sort_project_by_hot_rails 1, 'course_ac_para DESC', limit
|
||||
time_now = Time.new.strftime("%Y")
|
||||
if school_id
|
||||
courses = Course.includes(:school, :members).visible.joins(:course_status).where("#{Course.table_name}.created_at like '%#{time_now}%' and #{Course.table_name}.school_id <>
|
||||
?", school_id).order("course_ac_para DESC").limit(limit).all
|
||||
else
|
||||
courses = Course.includes(:school, :members).visible.joins(:course_status).where("#{Course.table_name}.created_at like '%#{time_now}%' and #{Course.table_name}.school_id is not NULL
|
||||
").order("course_ac_para DESC").limit(limit).all
|
||||
end
|
||||
#time_now = Time.new.strftime("%Y")
|
||||
#if school_id
|
||||
#courses = Course.includes(:school, :members).visible.joins(:course_status).where("#{Course.table_name}.created_at like '%#{time_now}%' and #{Course.table_name}.school_id <>
|
||||
# ?", school_id).order("course_ac_para DESC").limit(limit).all
|
||||
#else
|
||||
# courses = Course.includes(:school, :members).visible.joins(:course_status).where("#{Course.table_name}.created_at like '%#{time_now}%' and #{Course.table_name}.school_id is not NULL
|
||||
# ").order("course_ac_para DESC").limit(limit).all
|
||||
# end
|
||||
school_id.nil? ?
|
||||
courses = Course.includes(:school, :members).visible.
|
||||
joins(:memberships).
|
||||
where("courses.time = ? and courses.term = ? and courses.school_id is not NULL", year_now, course_term).
|
||||
group('members.course_id').
|
||||
reorder("COUNT(members.course_id) DESC").limit(limit).all
|
||||
:
|
||||
courses = Course.includes(:school, :members).visible.
|
||||
joins(:course_status).
|
||||
where("courses.time = ? and courses.term = ? and courses.school_id <> ?",year_now, course_term, school_id).
|
||||
group('members.course_id').
|
||||
reorder("COUNT(members.course_id) DESC").limit(limit).all
|
||||
courses
|
||||
end
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
|
||||
<p style="margin-left:-10px;padding-right: 20px;">
|
||||
<%= f.text_area :description, :rows => 8, :value => @bid.description, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %></p>
|
||||
<!-- <p><%= select_tag 'bid_reward_type', "<option value = '0'>#{l(:label_choose_reward)}</option><option value = '1'>#{l(:label_money)}</option><option value = '3'>#{l(:label_bids_credit)}</option><option value = '2'>#{l(:label_reward_1)}</option>".html_safe,
|
||||
<!-- <p><%#= select_tag 'bid_reward_type', "<option value = '0'>#{l(:label_choose_reward)}</option><option value = '1'>#{l(:label_money)}</option><option value = '3'>#{l(:label_bids_credit)}</option><option value = '2'>#{l(:label_reward_1)}</option>".html_safe,
|
||||
:onChange => "show('bid_reward_type', 'bid_budget', '"+l(:label_bids_reward_what)+"','"+l(:label_bids_new_money)+"','"+l(:label_bids_new_credit)+"','"+l(:label_bids_new_content)+"')" %>
|
||||
<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
|
||||
<%#= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
|
||||
</p> -->
|
||||
<p><%= f.text_field :deadline, :value => nil,:required => true, :size => 60, :style => "width:150px;" %><%= calendar_for('bid_deadline')%>
|
||||
<p><%= f.text_field :deadline, :value => nil,:required => true, :size => 60, :style => "width:150px;" , :readonly => true %><%= calendar_for('bid_deadline')%>
|
||||
<!--
|
||||
<p><%= f.select :homework_type, homework_type_option %>
|
||||
<p><%#= f.select :homework_type, homework_type_option %>
|
||||
</p>
|
||||
-->
|
||||
<p><%= f.select :is_evaluation, is_evaluation_option %>
|
||||
|
|
|
@ -30,6 +30,6 @@
|
|||
<!-- 设置奖项设置的打开 关闭开关-->
|
||||
|
||||
</p>
|
||||
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('bid_deadline')%>
|
||||
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :placeholder => "#{l(:label_deadline)}", :readonly => true %><%= calendar_for('bid_deadline')%>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -33,4 +33,4 @@
|
|||
<!-- 设置奖项设置的打开 关闭开关-->
|
||||
</p>
|
||||
<!-- <em class="info" style="margin-left:95px;"><%= l(:text_contest_reward) %></em> -->
|
||||
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('bid_deadline')%></p>
|
||||
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :readonly => true, :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('bid_deadline')%></p>
|
||||
|
|
|
@ -19,41 +19,48 @@
|
|||
|
||||
|
||||
<% if journals.size >0 %>
|
||||
<ul class="message-for-user">
|
||||
<% for journal in journals%>
|
||||
<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="font_lighter"><%= label %></span>
|
||||
<div> <%= textilizable journal.notes%> </div>
|
||||
<span class="font_lighter"><%= l(:label_bids_published) %> <%= time_tag(journal.created_on).html_safe %> <%= l(:label_bids_published_ago) %></span>
|
||||
<ul class="message-for-user">
|
||||
<% for journal in journals%>
|
||||
<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="font_lighter"><%= label %></span>
|
||||
<div> <%= textilizable journal.notes%> </div>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_bids_published) %>
|
||||
<%= time_tag(journal.created_on).html_safe %>
|
||||
<%= l(:label_bids_published_ago) %>
|
||||
</span>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<span>
|
||||
<% if reply_allow %>
|
||||
<%= link_to(l(:button_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
|
||||
:method => 'post', :title => l(:button_quote))%>
|
||||
<%= link_to l(:label_bid_respond_quote),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"}
|
||||
%>
|
||||
<% end %>
|
||||
<% if @user==User.current|| User.current.admin? %>
|
||||
<%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= ids %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
</div>
|
||||
<span>
|
||||
<% if reply_allow %>
|
||||
<%= link_to(l(:button_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal},
|
||||
:remote => true,:method => 'post', :title => l(:button_quote))%>
|
||||
<%= link_to l(:label_bid_respond_quote),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"}
|
||||
%>
|
||||
<% end %>
|
||||
<% if @user==User.current|| User.current.admin? %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
||||
:class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= ids %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
|
|
@ -29,17 +29,21 @@
|
|||
<p><span id="bid_name_span"></span></p>
|
||||
|
||||
<p><%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %></p>
|
||||
<p><%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;", :onchange => "regexDeadLine();") %>
|
||||
<p><%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;", :readonly => true, :onchange => "regexDeadLine();") %>
|
||||
<%= calendar_for('bid_deadline')%>
|
||||
<span id="bid_deadline_span">
|
||||
</span>
|
||||
</p>
|
||||
<p><%= f.select :is_evaluation, is_evaluation_option %>
|
||||
<p>
|
||||
<%= f.select :is_evaluation, is_evaluation_option %>
|
||||
</p>
|
||||
<p><%= f.select :proportion, proportion_option %>
|
||||
<p>
|
||||
<%= f.select :proportion, proportion_option %>
|
||||
</p>
|
||||
<p><%= hidden_field_tag 'course_id', @course.id %>
|
||||
<p>
|
||||
<%= hidden_field_tag 'course_id', @course.id %>
|
||||
</p>
|
||||
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
||||
<p><%= render :partial => 'attachments/form', :locals => {:container => @homework} %></p>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_attachment_plural) %></legend>
|
||||
<p><%= render :partial => 'attachments/form', :locals => {:container => @bid} %></p>
|
||||
</fieldset>
|
|
@ -69,7 +69,7 @@ border-top: 1px solid #acaeb1; border-bottom: 1px solid #acaeb1; margin-top: 30p
|
|||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><%= text_field_tag 'bid_deadline', "#{l(:label_deadline)}", :class => 'noline', :required => true,
|
||||
:onfocus => "clearInfo('bid_deadline', '#{l(:label_deadline)}')", :onblur => "showInfo('bid_deadline', '#{l(:label_deadline)}')"%>
|
||||
:onfocus => "clearInfo('bid_deadline', '#{l(:label_deadline)}')", :readonly => true, :onblur => "showInfo('bid_deadline', '#{l(:label_deadline)}')"%>
|
||||
<%= calendar_for('bid_deadline')%></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -55,6 +55,6 @@
|
|||
<div class="box tabular">
|
||||
<%#= render :partial => 'homework_form', :locals => { :f => f } %>
|
||||
<%= render :partial => 'homework_form', :locals => { :f => f } %>
|
||||
<input type="button" onclick="submitHomework(<%= @bid.id%>);" value="<%= l(:button_create)%>" class="enterprise">
|
||||
<input type="button" onclick="submitHomework(<%= @bid.id%>);" value="<%= l(:button_create)%>" class="enterprise">
|
||||
<% end %>
|
||||
</div>
|
|
@ -17,7 +17,7 @@
|
|||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link(preview_board_message_path(@board), 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%> |
|
||||
<%#= preview_link(preview_board_message_path(@board), 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' ,:class => 'whiteButton m3p10' %></p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'messages/form', :locals => {:f => f} %>
|
||||
<p><%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link(preview_board_message_path(@board), 'message-form', target='preview', {:class => 'whiteButton m3p10'}) %>
|
||||
|
|
||||
<%#= preview_link(preview_board_message_path(@board), 'message-form', target='preview', {:class => 'whiteButton m3p10'}) %>
|
||||
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;', :class => 'whiteButton m3p10' %></p>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>没有访问权限</title>
|
||||
<style>
|
||||
body{ font-size:12px; font-family:"微软雅黑","宋体"; 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{ margin:0; padding:0;}
|
||||
div,img,tr,td{ border:0;}
|
||||
table,tr,td{border:0 cellspacing:0; cellpadding:0;}
|
||||
ul,li{ list-style-type:none}
|
||||
.cl{ clear:both; overflow:hidden; }
|
||||
a{ text-decoration:none; }
|
||||
a:hover{ }
|
||||
|
||||
.error_content{ width:550px; height:200px; margin:0 auto; padding:10px 0;}
|
||||
.error_left{color:#15bccf; font-size:100px; font-weight:bold; font-style:oblique; width:200px; height:120px; padding-right:30px; float:left;}
|
||||
.error_right{ width:240px; height:120px; float:left;color:#15bccf; font-size: 17px; font-weight:bold; padding-left:30px; margin-top:40px; border-left:1px dashed #CCC; }
|
||||
.error_link{ margin-top:8px;}
|
||||
.error_link a{ display:block; width:80px; height:28px; font-size:14px; font-weight:bold; color:#fff; text-align:center; background:#15bccf; float:left; margin-right:10px;}
|
||||
.error_link a:hover{ background:#ff8417;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="error_content">
|
||||
<div class="error_left">403</div>
|
||||
<div class="error_right">
|
||||
<p>ERROR FORBIDDEN<br />
|
||||
没有访问权限!建议您</p>
|
||||
<div class="error_link">
|
||||
<!---<a href="http://forge.trustie.net/" target="_blank">返回首页</a>---->
|
||||
<a href="#" target="_blank">后退一步</a>
|
||||
<a href="http://user.trustie.net/users/5/user_newfeedback" target="_blank">给我留言</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>页面不见了</title>
|
||||
<style>
|
||||
body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff;}
|
||||
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
|
||||
div,img,tr,td{ border:0;}
|
||||
table,tr,td{border:0 cellspacing:0; cellpadding:0;}
|
||||
ul,li{ list-style-type:none}
|
||||
.cl{ clear:both; overflow:hidden; }
|
||||
a{ text-decoration:none; }
|
||||
a:hover{ }
|
||||
|
||||
.error_content{ width:550px; height:200px; margin:0 auto; padding:10px 0;}
|
||||
.error_left{color:#15bccf; font-size:100px; font-weight:bold; font-style:oblique; width:200px; height:120px; padding-right:30px; float:left;}
|
||||
.error_right{ width:240px; height:120px; float:left;color:#15bccf; font-size: 18px; font-weight:bold; padding-left:30px; margin-top:40px; border-left:1px dashed #CCC; }
|
||||
.error_link{ margin-top:8px;}
|
||||
.error_link a{ display:block; width:80px; height:28px; font-size:14px; font-weight:bold; color:#fff; text-align:center; background:#15bccf; float:left; margin-right:10px;}
|
||||
.error_link a:hover{ background:#ff8417;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="error_content">
|
||||
<div class="error_left">404</div>
|
||||
<div class="error_right">
|
||||
<p><span style="font-size:24px;">ERROR PAGE</span><br />
|
||||
页面不见了!建议您</p>
|
||||
<div class="error_link">
|
||||
<!---<a href="http://forge.trustie.net/" target="_blank">返回首页</a>---->
|
||||
<a href="#" target="_blank">后退一步</a>
|
||||
<a href="http://user.trustie.net/users/5/user_newfeedback" target="_blank">给我留言</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +1,3 @@
|
|||
<fieldset class="preview"><legend><%= l(:label_preview) %></legend>
|
||||
<%= textilizable @text, :attachments => @attachments, :object => @previewed %>
|
||||
<%= textilizable @text, :attachments => @attachments, :object => @previewed %>
|
||||
</fieldset>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
:method => :put } do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= preview_link preview_contestnotifications_path(id: @contestnotification),
|
||||
<%#= preview_link preview_contestnotifications_path(id: @contestnotification),
|
||||
'contestnotifications-form'
|
||||
%>
|
||||
<% end %>
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
:required => true,
|
||||
:size => 60,
|
||||
:style => "width:150px;",
|
||||
:readonly => true,
|
||||
:placeholder => "#{l(:label_deadline)}"
|
||||
%>
|
||||
<%= calendar_for('contest_deadline')%>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//验证作品名称
|
||||
function regexName()
|
||||
{
|
||||
var name = $("#softapplication_name").val();
|
||||
var name = $.trim($("#softapplication_name").val());
|
||||
if(name.length == 0)
|
||||
{
|
||||
$("#spane_name_notice").text("<%= l(:label_no_softapplication_name) %>");
|
||||
|
@ -31,7 +31,7 @@
|
|||
//验证作品简介
|
||||
function regexDescription()
|
||||
{
|
||||
var name = $("#softapplication_description").val();
|
||||
var name = $.trim($("#softapplication_description").val());
|
||||
if(name.length ==0)
|
||||
{
|
||||
$("#span_sofapplication_description").text("<%= l(:label_no_softapplication_description) %>");
|
||||
|
@ -56,7 +56,7 @@
|
|||
//验证运行平台
|
||||
function regexWorkdescription()
|
||||
{
|
||||
var workDescription = $("#softapplication_android_min_version_available").val();
|
||||
var workDescription = $.trim($("#softapplication_android_min_version_available").val());
|
||||
if(workDescription.length ==0)
|
||||
{
|
||||
$("#spane_workdescription_notice").text("<%= l(:label_no_softapplication_platform) %>");
|
||||
|
@ -80,7 +80,7 @@
|
|||
//验证开发人员
|
||||
function regexDevelopers()
|
||||
{
|
||||
var workDescription = $("#softapplication_application_developers").val();
|
||||
var workDescription = $.trim($("#softapplication_application_developers").val());
|
||||
if(workDescription.length ==0)
|
||||
{
|
||||
$("#span_softapplication_application_developers").text("<%= l(:label_no_softapplication_developers) %>");
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<%#= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
|
||||
</p> -->
|
||||
<% time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') %>
|
||||
<p><%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}", :onchange => "regexDeadLine();") %>
|
||||
<p><%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}", :onchange => "regexDeadLine();", :readonly => true) %>
|
||||
<%= calendar_for('bid_deadline')%>
|
||||
<span id="bid_deadline_span">
|
||||
</span>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<% if @save_flag %>
|
||||
<% if Rails.env.development? %>
|
||||
console.debug('课程修改成功:结束时间改为<%=Course.find_by_extra(@course.extra).try(:endup_time)%>');
|
||||
<% end %>
|
||||
$('#content-title-top-div').html("<%= j(render partial: 'users/my_course_ex', :locals => {:memberships => @memberships,:user=>@user,
|
||||
:memberships_doing=>@memberships_doing,:memberships_done=>@memberships_done} )%>")
|
||||
$('#finish_course_<%=@course.id%>').replaceWith("<%= j(render partial: 'courses/set_course_time', :locals => {:course => @course} )%>")
|
||||
<% if Rails.env.development? %>
|
||||
console.debug('课程修改成功:结束时间改为<%=Course.find_by_extra(@course.extra).try(:endup_time)%>');
|
||||
<% end %>
|
||||
$('#content-title-top-div').html("<%= j(render partial: 'users/my_course_ex', :locals => {:memberships => @memberships,:user=>@user,
|
||||
:memberships_doing=>@memberships_doing,:memberships_done=>@memberships_done} )%>");
|
||||
$('#finish_course_<%=@course.id%>').replaceWith("<%= j(render partial: 'courses/set_course_time', :locals => {:course => @course} )%>");
|
||||
<% else %>
|
||||
alert('权限不足,设置失败,请在论坛提交问题,等待管理员处理。');
|
||||
alert('权限不足,设置失败,请在论坛提交问题,等待管理员处理。');
|
||||
<% end %>
|
||||
|
||||
|
||||
|
|
|
@ -56,9 +56,9 @@
|
|||
</p>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
<%# other_formats_links do |f| %>
|
||||
<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<%# end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
|
|
|
@ -45,13 +45,13 @@
|
|||
|
||||
<% if User.current.logged? %>
|
||||
<p style="text-align:right;">
|
||||
<span class="my-project"><%= l(:label_my_projects) %></span>
|
||||
<span class="my-project"><%= l(:label_my_course) %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<% end %>
|
||||
<%# other_formats_links do |f| %>
|
||||
<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<%# end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
|
|
|
@ -107,14 +107,14 @@
|
|||
<% if @safe_attributes.include?('start_date') %>
|
||||
<p>
|
||||
<label for='issue_start_date'><%= l(:field_start_date) %></label>
|
||||
<%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
|
||||
<%= text_field_tag 'issue[start_date]', '', :size => 10, :readonly => true %><%= calendar_for('issue_start_date') %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('due_date') %>
|
||||
<p>
|
||||
<label for='issue_due_date'><%= l(:field_due_date) %></label>
|
||||
<%= text_field_tag 'issue[due_date]', '', :size => 10 %><%= calendar_for('issue_due_date') %>
|
||||
<%= text_field_tag 'issue[due_date]', '', :size => 10, :readonly => true %><%= calendar_for('issue_due_date') %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -42,48 +42,25 @@
|
|||
<ul class="sub_menu">
|
||||
<% if @show_course == 1 %>
|
||||
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
|
||||
|
||||
<% hasCourse=false %>
|
||||
<% User.current.courses.each do |course| %>
|
||||
<% if !course_endTime_timeout?(course) %>
|
||||
<% hasCourse=true %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if hasCourse %>
|
||||
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %>
|
||||
<ul class="course_sub_menu">
|
||||
<% hasCourse=false %>
|
||||
<% User.current.courses.each do |course| %>
|
||||
<% if !course_endTime_timeout?(course) %>
|
||||
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=course.name%>"><%= link_to course.name, {:controller => 'courses',:action => 'show',id:course.id} %></li>
|
||||
<% hasCourse=true %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => 'layouts/user_courses_list', :locals => {:hasCourse => hasCourse} %>
|
||||
<% end -%>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.projects.count>0 %>
|
||||
<li id="project_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
|
||||
<% if hasCourse %>
|
||||
<ul class="project_sub_menu" style="top: 35px">
|
||||
<% else %>
|
||||
<ul class="project_sub_menu" style="top: 0px">
|
||||
<% end %>
|
||||
<% User.current.projects.each do |project| %>
|
||||
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=project.name%>"><%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.project_domain } %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'layouts/user_project_list', :locals => {:hasCourse => hasCourse} %>
|
||||
<li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%>
|
||||
</li>
|
||||
<% end %>
|
||||
<li style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;">
|
||||
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')', { :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.user_domain }, {:class => 'my-message'} if User.current.logged?%>
|
||||
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')',
|
||||
{ :controller => 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.user_domain },
|
||||
{:class => 'my-message'} if User.current.logged?%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -98,7 +75,7 @@
|
|||
<script type="text/javascript">
|
||||
function setMessageCount () {
|
||||
var mes = $('#loggedas .my-message')
|
||||
mes.html(mes.html()+'('+<%=User.current.count_new_jour.to_s%>+")")
|
||||
mes.html(mes.html()+ '(' + <%=User.current.count_new_jour.to_s%> + ")")
|
||||
}
|
||||
|
||||
function addSlipMenu () {
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<% if hasCourse %>
|
||||
<li id="course_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %>
|
||||
<ul class="course_sub_menu">
|
||||
<% User.current.courses.each do |course| %>
|
||||
<% if !course_endTime_timeout?(course) %>
|
||||
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=course.name%>">
|
||||
<%= link_to course.name, {:controller => 'courses',:action => 'show',id:course.id} %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
|
@ -0,0 +1,12 @@
|
|||
<% if User.current.projects.count>0 %>
|
||||
<li id="project_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
|
||||
<ul class="project_sub_menu" style="top:<%= hasCourse ? 35 : 0 %>px;">
|
||||
<% User.current.projects.each do |project| %>
|
||||
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=project.name%>">
|
||||
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.project_domain } %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
|
@ -66,19 +66,19 @@
|
|||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align: top;font-size: 16px;text-align: center;">
|
||||
<span style=" word-wrap: break-word; word-break: break-all">
|
||||
<strong>
|
||||
<%= link_to course.name.to_s, homework_course_path(course) if course %>
|
||||
</strong>
|
||||
</span>
|
||||
<span style=" word-wrap: break-word; word-break: break-all">
|
||||
<strong>
|
||||
<%= link_to course.name.to_s, homework_course_path(course) if course %>
|
||||
</strong>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style=" word-wrap: break-word; word-break: break-all;font-size: 16px;text-align: center">
|
||||
<span style=" color:#ed8924">
|
||||
<!-- modified by zjc 添加超链接 -->
|
||||
<strong><%=link_to(@bid.name, respond_path(@bid)) %></strong>
|
||||
</span>
|
||||
<span style=" color:#ed8924">
|
||||
<!-- modified by zjc 添加超链接 -->
|
||||
<strong><%=link_to(@bid.name, respond_path(@bid)) %></strong>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -107,7 +107,7 @@
|
|||
|
||||
<tr>
|
||||
<td valign="top" style="padding-left: 8px; width:60px">主讲老师 :</td>
|
||||
<td class="font_lighter_sidebar"><%= link_to(@user.lastname+@user.firstname, user_path(@user)) %></td>
|
||||
<td class="font_lighter_sidebar"><%= link_to(course.teacher.lastname+course.teacher.firstname, user_path(course.teacher)) %></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
|
|
@ -58,7 +58,6 @@
|
|||
/*border-radius: 10px;*/
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="lz">
|
||||
<!-- 在这里添加赞和踩-->
|
||||
<span id="praise_tread" style="float: right"> <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @topic,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> </span>
|
||||
|
@ -132,24 +131,24 @@
|
|||
<td>
|
||||
<div class="contextual-borad">
|
||||
<%= link_to(
|
||||
"引用",
|
||||
{:action => 'quote', :id => message},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
l(:button_quote),
|
||||
{:action => 'quote', :id => message},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<%= link_to(
|
||||
#image_tag('edit.png'),
|
||||
"编辑",
|
||||
{:action => 'edit', :id => message},
|
||||
:title => l(:button_edit)
|
||||
#image_tag('edit.png'),
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :id => message},
|
||||
:title => l(:button_edit)
|
||||
) if message.course_editable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
#image_tag('delete.png'),
|
||||
"删除",
|
||||
{:action => 'destroy', :id => message},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
#image_tag('delete.png'),
|
||||
l(:button_delete),
|
||||
{:action => 'destroy', :id => message},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if message.course_destroyable_by?(User.current) %>
|
||||
</div></td>
|
||||
</tr>
|
||||
|
@ -175,10 +174,12 @@
|
|||
<% end %>
|
||||
<% if !@topic.locked? && authorize_for_course('messages', 'reply') %>
|
||||
<div id="reply" style="display:none;">
|
||||
|
||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
|
||||
<%#= submit_tag l(:button_submit) %>
|
||||
<input type="button" class="enterprise" value="<%=l(:button_submit) %>" onclick="submit_message_replay();" >
|
||||
<%#= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
</div>
|
||||
|
@ -190,4 +191,27 @@
|
|||
jQuery(document).ready(function($) {
|
||||
transpotUrl('#content');
|
||||
});
|
||||
function submit_message_replay()
|
||||
{
|
||||
if(regexContent())
|
||||
{
|
||||
$("#message-form").submit();
|
||||
}
|
||||
}
|
||||
function regexContent()
|
||||
{
|
||||
var content = $.trim($("#message_content").val());
|
||||
if(content.length ==0)
|
||||
{
|
||||
$("#message_content_span").text("<%= l(:label_reply_empty) %>");
|
||||
$("#message_content_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#message_content_span").text("<%= l(:label_field_correct) %>");
|
||||
$("#message_content_span").css('color','#008000');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -5,12 +5,22 @@
|
|||
<div class="box ph10_5">
|
||||
<!--[form:message]-->
|
||||
<% unless replying %>
|
||||
<p><label for="message_subject"><%= l(:field_subject) %><span class="required"> * </span></label><br/>
|
||||
<p>
|
||||
<label for="message_subject">
|
||||
<%= l(:field_subject) %>
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<br/>
|
||||
<%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :maxlength => 254 %><!--by young-->
|
||||
</p>
|
||||
<% else %>
|
||||
<p><label for="message_subject"><%= l(:field_subject) %><span class="required"> * </span></label><br/>
|
||||
<%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %>
|
||||
<p>
|
||||
<label for="message_subject">
|
||||
<%= l(:field_subject) %>
|
||||
<span class="required"> * </span>
|
||||
</label>
|
||||
<br/>
|
||||
<%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p>
|
||||
|
@ -31,7 +41,8 @@
|
|||
</p>
|
||||
<p>
|
||||
<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
|
||||
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %>
|
||||
<%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content', :onblur => "regexContent();" %>
|
||||
<span id="message_content_span"></span>
|
||||
</p>
|
||||
|
||||
<!--[eoform:message]-->
|
||||
|
|
|
@ -74,9 +74,9 @@
|
|||
<%= labelled_form_for @news, :url => course_news_index_path(@course),
|
||||
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
||||
<%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
|
||||
<%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %>|
|
||||
<%= preview_link preview_news_path(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
|
|
||||
<%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %>
|
||||
<%#= preview_link preview_news_path, 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'whiteButton m3p10' %>
|
||||
<% end if @course %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<%= render :partial => 'course_form', :locals => { :f => f, :is_new => false } %>
|
||||
<%#= submit_tag l(:button_save) %>
|
||||
<%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'whiteButton m3p10' %>
|
||||
<%= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> |
|
||||
<%#= preview_link preview_news_path(:course_id => @course, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -84,8 +84,8 @@
|
|||
<%#= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %><!-- button-submit -->
|
||||
<%= link_to l(:button_create), "#", :onclick => 'submitNews();',:onmouseover => 'submitFocus(this);', :class => 'whiteButton m3p10' %>
|
||||
|
|
||||
<%= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
|
|
||||
<%#= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'whiteButton m3p10' %>
|
||||
<% end if @project %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%#= submit_tag l(:button_save) %>
|
||||
<%= link_to l(:button_save), "#", :onclick => 'submitNews();',:onmouseover => 'this.focus()',:class => 'whiteButton m3p10' %>
|
||||
<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %> |
|
||||
<%#= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form',target='preview',{:class => 'whiteButton m3p10'} %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;',:class => 'whiteButton m3p10' %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<%= labelled_form_for @news, :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %>
|
||||
<%#= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
||||
<%= render :partial => 'news/form', :locals => {:f => f} %>
|
||||
<%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
<%#= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
<% end %>
|
||||
<% elsif @course %>
|
||||
<%= labelled_form_for @news, :url => course_news_index_path(@course),
|
||||
:html => {:id => 'news-form', :multipart => true} do |f| %>
|
||||
<%= render :partial => 'news/form', :locals => {:f => f} %>
|
||||
<%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
|
||||
<%= preview_link preview_news_path(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
<%#= preview_link preview_news_path(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
|
|
@ -68,7 +68,7 @@ border-top: 1px solid #acaeb1; border-bottom: 1px solid #acaeb1; margin-top: 30p
|
|||
<td colspan="2"><div class="tableline"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><%= text_field_tag 'bid_deadline', "#{l(:label_deadline)}", :class => 'noline', :required => true,
|
||||
<td colspan="2"><%= text_field_tag 'bid_deadline', "#{l(:label_deadline)}", :class => 'noline', :readonly => true, :required => true,
|
||||
:onfocus => "clearInfo('bid_deadline', '#{l(:label_deadline)}')", :onblur => "showInfo('bid_deadline', '#{l(:label_deadline)}')"%>
|
||||
<%= calendar_for('bid_deadline')%></td>
|
||||
</tr>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<%= f.text_field :issue_id, :size => 6 %>
|
||||
<span id="time_entry_issue"><%= h("#{@time_entry.issue.tracker.name} ##{@time_entry.issue.id}: #{@time_entry.issue.subject}") if @time_entry.issue %></span>
|
||||
</p>
|
||||
<p><%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
|
||||
<p><%= f.text_field :spent_on, :size => 10, :required => true, :readonly => true %><%= calendar_for('time_entry_spent_on') %></p>
|
||||
<p><%= f.text_field :hours, :size => 6, :required => true %></p>
|
||||
<p><%= f.text_field :comments, :size => 100, :maxlength => 255 %></p>
|
||||
<p><%= f.select :activity_id, activity_collection_for_select_options(@time_entry), :required => true %></p>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<p>
|
||||
<label><%= l(:field_spent_on) %></label>
|
||||
<%= text_field :time_entry, :spent_on, :size => 10 %><%= calendar_for('time_entry_spent_on') %>
|
||||
<%= text_field :time_entry, :spent_on, :size => 10, :readonly => true %><%= calendar_for('time_entry_spent_on') %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -2,15 +2,40 @@
|
|||
<%= error_messages_for 'version' %>
|
||||
|
||||
<div class="box tabular">
|
||||
<p style="margin-left:-10px;"><%= f.text_field :name, :size => 60, :required => true %></p>
|
||||
<p style="margin-left:-20px;"><%= f.text_field :description, :size => 60, :style => "margin-left:10px;" %></p>
|
||||
<p style="margin-left:-20px;"><span style="margin-left:10px;"><%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %></span></p>
|
||||
<p style="margin-left:-20px;"><span style="margin-left:10px;"><%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %></span></p>
|
||||
<p style="margin-left:-20px;"><span style="margin-left:10px;"><%= f.text_field :effective_date, :size => 10 %><%= calendar_for('version_effective_date') %></span></p>
|
||||
<p style="margin-left:-20px;"><span style="margin-left:10px;"><%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %></span></p>
|
||||
<p style="margin-left:-10px;">
|
||||
<%= f.text_field :name, :size => 60, :required => true %>
|
||||
</p>
|
||||
<p style="margin-left:-20px;">
|
||||
<%= f.text_field :description, :size => 60, :style => "margin-left:10px;" %>
|
||||
</p>
|
||||
<p style="margin-left:-20px;">
|
||||
<span style="margin-left:10px;">
|
||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
|
||||
</span>
|
||||
</p>
|
||||
<p style="margin-left:-20px;">
|
||||
<span style="margin-left:10px;">
|
||||
<%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %>
|
||||
</span>
|
||||
</p>
|
||||
<p style="margin-left:-20px;">
|
||||
<span style="margin-left:10px;">
|
||||
<%= f.text_field :effective_date, :size => 10, :readonly => true %>
|
||||
<%= calendar_for('version_effective_date') %>
|
||||
</span>
|
||||
</p>
|
||||
<p style="margin-left:-20px;">
|
||||
<span style="margin-left:10px;">
|
||||
<%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<% @version.custom_field_values.each do |value| %>
|
||||
<p style="margin-left:-20px;"><span style="margin-left:10px;"><%= custom_field_tag_with_label :version, value %></span></p>
|
||||
<p style="margin-left:-20px;">
|
||||
<span style="margin-left:10px;">
|
||||
<%= custom_field_tag_with_label :version, value %>
|
||||
</span>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -78,29 +78,28 @@
|
|||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||
<h3><strong><%= l(:lable_hot_course)%></strong></h3>
|
||||
<% if @school_id %>
|
||||
<% school_course = find_miracle_course(10,7, @school_id) %>
|
||||
<% else %>
|
||||
<%school_course=[]%>
|
||||
<% end %>
|
||||
<% if (school_course.count == 0) %>
|
||||
<span><%= render :partial => 'more_course', :locals => {:school_id => nil}%></span>
|
||||
|
||||
<% month_now = Time.now.strftime("%m").to_i %>
|
||||
<% year_now = Time.new.strftime("%Y") %>
|
||||
<!-- 3-8月份为查找春季课程,9-2月份为查找秋季课程 -->
|
||||
<% (month_now >= 3 && month_now < 9) ? course_term = "春季学期" : course_term = "秋季学期" %>
|
||||
<% @school_id.nil? ? cur_school_course = [] : cur_school_course = find_miracle_course(10,7,@school_id, year_now, course_term) %>
|
||||
|
||||
<% if cur_school_course.count == 0 %>
|
||||
<span><%= render :partial => 'more_course', :locals => {:school_id => nil}%></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<li>
|
||||
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_no_course)} %>
|
||||
</li>
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(9, @school_id)} %>
|
||||
<% else %>
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(10, @school_id)} %>
|
||||
<% end %>
|
||||
<% User.current.logged? ? course_count = 9 : course_count = 10 %>
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(course_count, @school_id, year_now, course_term)} %>
|
||||
</ul>
|
||||
</div>
|
||||
<% else %>
|
||||
<% if school_course.count < 9 %>
|
||||
<% if cur_school_course.count < 9 %>
|
||||
<span>
|
||||
<%= render :partial => 'more_course', :locals => {:school_id => nil}%>
|
||||
</span>
|
||||
|
@ -111,12 +110,12 @@
|
|||
<% end %>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => school_course} %>
|
||||
<% if school_course.count < 9 %>
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => cur_school_course} %>
|
||||
<% if cur_school_course.count < 9 %>
|
||||
<li>
|
||||
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %>
|
||||
</li>
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(9 - school_course.count, @school_id)} %>
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(9-cur_school_course.count, @school_id, year_now, course_term)} %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -136,19 +135,26 @@
|
|||
<% find_new_forum_topics(10).each do |topic| %>
|
||||
<li class="message-brief-intro" style="min-height: 65px; line-height:2em; ">
|
||||
<div style="display: inline-block; width: 100%;">
|
||||
<span class="memo_activity text_nowrap" style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
||||
<%= link_to '['+topic.forum.name + ']', forum_path(topic.forum), :class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray", :style => "font-size: 10pt !important;" %>
|
||||
<span class="memo_activity text_nowrap" title="<%= topic.subject%>"
|
||||
style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
||||
|
||||
<%= link_to '['+topic.forum.name + ']', forum_path(topic.forum), :class => 'memo_Bar_title' %>
|
||||
<%= link_to topic.subject, topic.event_url, :class => "gray", :style => "font-size: 10pt !important;" %>
|
||||
</span>
|
||||
|
||||
<div class='memo_activity memo_attr'>
|
||||
<span class='memo_timestamp'>
|
||||
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
||||
</span>
|
||||
<span class="memo_author">
|
||||
<%= l(:label_question_sponsor)%>: <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
|
||||
<span class="memo_author" title="<%= topic.author.login%>">
|
||||
<%= l(:label_question_sponsor)%>:
|
||||
<%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
|
||||
</span>
|
||||
<span class="memo_last_person">
|
||||
<%= l(:label_final_reply)%>:<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %><%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%><% end %>
|
||||
<span class="memo_last_person" title="<%= topic.last_reply.author.login unless (topic.last_reply.nil? || topic.last_reply.author.nil?)%>">
|
||||
<%= l(:label_final_reply)%>:
|
||||
<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %>
|
||||
<%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%>
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="memo_reply">
|
||||
<%= l(:label_reply)%>(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
|
||||
<p><%= submit_tag l(:button_save) %>
|
||||
<%= preview_link({:controller => 'wiki', :action => 'preview', :project_id => @project, :id => @page.title }, 'wiki_form') %></p>
|
||||
<%#= preview_link({:controller => 'wiki', :action => 'preview', :project_id => @project, :id => @page.title }, 'wiki_form') %></p>
|
||||
<%= wikitoolbar_for 'content_text' %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
|
||||
<%= form_tag({:controller => 'words', :action => 'create_reply'}, :remote => true) do %>
|
||||
<%= text_area_tag 'user_notes', "", :class => 'noline',
|
||||
:style => "resize: none;", :rows => 4,
|
||||
:placeholder => l(:label_projects_feedback_respond_content),
|
||||
:maxlength => 250 %>
|
||||
<%= text_area_tag 'user_notes', "", :class => 'noline',
|
||||
:style => "resize: none;", :rows => 4,
|
||||
:placeholder => l(:label_projects_feedback_respond_content),
|
||||
:maxlength => 250 %>
|
||||
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
|
||||
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %>
|
||||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %>
|
||||
<%= submit_tag l(:button_projects_feedback_respond), :name => nil , :class => "enterprise", :style => "float: right; margin-top: 1px; margin-right: 4px;"%>
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
|
||||
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %>
|
||||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %>
|
||||
<%= submit_tag l(:button_projects_feedback_respond), :name => nil ,
|
||||
:class => "enterprise",
|
||||
:style => "float: right; margin-top: 1px; margin-right: 4px;"%>
|
||||
|
||||
<% end %>
|
|
@ -100,7 +100,6 @@ RedmineApp::Application.routes.draw do
|
|||
#resources :contestnotifications, :only => [:index, :show, :edit, :update, :destroy]
|
||||
# match '/contestnotifications/:id/notificationcomments', :to => 'notificationcomments#create', :via => :post
|
||||
# match '/contestnotifications/:id/notificationcomments/:notificationcomment_id', :to => 'notificationcomments#destroy', :via => :delete
|
||||
match '/contestnotifications/preview', :to => 'previews#contestnotification', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
||||
## new added by linchun #新竞赛相关
|
||||
resources :contests, only: [:index] do
|
||||
resources :contestnotifications do
|
||||
|
@ -136,6 +135,19 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
match '/news/preview', :to => 'previews#news', :as => 'preview_news', :via => [:get, :post, :put]
|
||||
match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put]
|
||||
match '/issues/preview/edit/:id', :to => 'previews#issue', :as => 'preview_edit_issue', :via => [:get, :post, :put]
|
||||
match '/issues/preview', :to => 'previews#issue', :as => 'preview_issue', :via => [:get, :post, :put]
|
||||
match '/contestnotifications/preview', :to => 'previews#contestnotification', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
||||
|
||||
#resource :previews, only: [] do
|
||||
# collection do
|
||||
# match 'news', :via => [:get, :post, :put]
|
||||
# match 'issue', :via => [:get, :post, :put]
|
||||
# end
|
||||
#end
|
||||
|
||||
resources :stores do
|
||||
collection do
|
||||
match 'search', :via => [:get, :post]
|
||||
|
@ -188,11 +200,6 @@ RedmineApp::Application.routes.draw do
|
|||
match 'account/activate', :via => :get
|
||||
match 'account/valid_ajax', :via => :get
|
||||
|
||||
match '/news/preview', :to => 'previews#news', :as => 'preview_news', :via => [:get, :post, :put]
|
||||
match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put]
|
||||
match '/issues/preview/edit/:id', :to => 'previews#issue', :as => 'preview_edit_issue', :via => [:get, :post, :put]
|
||||
match '/issues/preview', :to => 'previews#issue', :as => 'preview_issue', :via => [:get, :post, :put]
|
||||
|
||||
match 'projects/:id/wiki', :to => 'wikis#edit', :via => :post
|
||||
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
|
||||
|
||||
|
|
|
@ -1,23 +1,41 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<title>Trustie 404 error</title>
|
||||
<style>
|
||||
body{
|
||||
font-family: Trebuchet MS,Georgia,"Times New Roman",serif;
|
||||
color:#303030;
|
||||
margin:10px;
|
||||
}
|
||||
h1{
|
||||
font-size:1.5em;
|
||||
}
|
||||
p{
|
||||
font-size:0.8em;
|
||||
}
|
||||
</style>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>页面不见了</title>
|
||||
<style>
|
||||
body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff;}
|
||||
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
|
||||
div,img,tr,td{ border:0;}
|
||||
table,tr,td{border:0 cellspacing:0; cellpadding:0;}
|
||||
ul,li{ list-style-type:none}
|
||||
.cl{ clear:both; overflow:hidden; }
|
||||
a{ text-decoration:none; }
|
||||
a:hover{ }
|
||||
|
||||
.content{ width:550px; height:200px; margin:0 auto; padding:10px 0;}
|
||||
.left{color:#15bccf; font-size:100px; font-weight:bold; font-style:oblique; width:200px; height:120px; padding-right:30px; float:left;}
|
||||
.right{ width:240px; height:120px; float:left;color:#15bccf; font-size: 18px; font-weight:bold; padding-left:30px; margin-top:40px; border-left:1px dashed #CCC; }
|
||||
.link{ margin-top:8px;}
|
||||
.link a{ display:block; width:80px; height:30px; font-size:14px; font-weight:bold; color:#fff; text-align:center; background:#15bccf; float:left; margin-right:10px;}
|
||||
.link a:hover{ background:#ff8417;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Page not found</h1>
|
||||
<p>The page you were trying to access doesn't exist or has been removed.</p>
|
||||
<p><a href="javascript:history.back()">Back</a></p>
|
||||
|
||||
<div class="content">
|
||||
<div class="left">404</div>
|
||||
<div class="right">
|
||||
<p><span style="font-size:24px;">ERROR PAGE</span><br />
|
||||
页面不见了!建议您</p>
|
||||
<div class="link">
|
||||
<!---<a href="http://forge.trustie.net/" target="_blank">返回首页</a>---->
|
||||
<a href="#" target="_blank">后退一步</a>
|
||||
<a href="http://user.trustie.net/users/5/user_newfeedback" target="_blank">给我留言</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue