Merge branch 'szzh' into develop
This commit is contained in:
commit
7e6546d828
|
@ -127,7 +127,7 @@ module ApplicationHelper
|
||||||
# * :text - Link text (default to attachment filename)
|
# * :text - Link text (default to attachment filename)
|
||||||
# * :download - Force download (default: false)
|
# * :download - Force download (default: false)
|
||||||
def link_to_short_attachment(attachment, options={})
|
def link_to_short_attachment(attachment, options={})
|
||||||
text = h(truncate(options.delete(:text) || attachment.filename, length: 25, omission: '...'))
|
text = h(truncate(options.delete(:text) || attachment.filename, length: 23, omission: '...'))
|
||||||
route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path
|
route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path
|
||||||
html_options = options.slice!(:only_path)
|
html_options = options.slice!(:only_path)
|
||||||
url = send(route_method, attachment, attachment.filename, options)
|
url = send(route_method, attachment, attachment.filename, options)
|
||||||
|
|
|
@ -57,19 +57,19 @@
|
||||||
var workDescription = $("#softapplication_application_developers").val();
|
var workDescription = $("#softapplication_application_developers").val();
|
||||||
if(workDescription.length ==0)
|
if(workDescription.length ==0)
|
||||||
{
|
{
|
||||||
$("#span_softapplication_application_developers").text(<%= l(:label_no_softapplication_developers) %>);
|
$("#span_softapplication_application_developers").text("<%= l(:label_no_softapplication_developers) %>");
|
||||||
$("#span_softapplication_application_developers").css('color','#ff0000');
|
$("#span_softapplication_application_developers").css('color','#ff0000');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(workDescription.length <= 125)
|
if(workDescription.length <= 125)
|
||||||
{
|
{
|
||||||
$("#span_softapplication_application_developers").text(<%= l(:label_field_correct) %>);
|
$("#span_softapplication_application_developers").text("<%= l(:label_field_correct) %>");
|
||||||
$("#span_softapplication_application_developers").css('color','#008000');
|
$("#span_softapplication_application_developers").css('color','#008000');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#span_softapplication_application_developers").text(<%= l(:label_softapplication_developers_condition) %>);
|
$("#span_softapplication_application_developers").text("<%= l(:label_softapplication_developers_condition) %>");
|
||||||
$("#span_softapplication_application_developers").css('color','#ff0000');
|
$("#span_softapplication_application_developers").css('color','#ff0000');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,60 +22,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<% object = [] %>
|
<% object = [] %>
|
||||||
<% object << 'course' %>
|
<% object << 'course' %>
|
||||||
<%= error_messages_for object %>
|
<%= error_messages_for object %>
|
||||||
|
|
||||||
|
|
||||||
<!--[form:course]-->
|
|
||||||
<% unless @course.new_record? %>
|
<% unless @course.new_record? %>
|
||||||
<p><%= render :partial => "avatar/avatar_form", :locals => {source: @course} %></p>
|
<p><%= render :partial => "avatar/avatar_form", :locals => {source: @course} %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!-- <p><%#= f.text_field :name, :required => true, :size => 60, :style => "width:490px;" %></p> -->
|
<p>
|
||||||
<p><label for="course_name" style="font-size: 13px;"><%= l(:label_tags_course_name) %><span class="required">
|
<label for="course_name" style="font-size: 13px;">
|
||||||
* </span></label><input id="course_name" type="text" value="<%= @course.name %>" style="width:490px;" size="60" name="course[name]">
|
<%= l(:label_tags_course_name) %>
|
||||||
|
<span class="required">* </span>
|
||||||
|
</label>
|
||||||
|
<input id="course_name" type="text" value="<%= @course.name %>" style="width:490px;size:60;" name = "course[name]" maxlength="100">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- <p><%#= f.text_field :extra, :required => true, :size => 60, :style => "width:488px;", :disabled => @course.extra_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %>
|
|
||||||
<%# unless @course.extra_frozen? %>
|
|
||||||
<em class="info"><%#= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%#= l(:text_course_identifier_info).html_safe %></em>
|
|
||||||
<%# end %></p> -->
|
|
||||||
|
|
||||||
<!-- added by bai 新增开课时间、结课时间、课时 -->
|
|
||||||
|
|
||||||
<%= f.fields_for @course do |m| %>
|
<%= f.fields_for @course do |m| %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- added by bai 新增开课时间、结课时间、课时 -->
|
|
||||||
<!--
|
|
||||||
<%# unless @course.nil?%>
|
|
||||||
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%#= l(:label_setup_time) %><span class="required"> * </span></span>
|
|
||||||
<span class="info" style="width: 10px"><%#= text_field_tag :setup_time, @course.setup_time, :placeholder => "在此选择开课日期" %></span>
|
|
||||||
<span><%#= calendar_for('setup_time')%></span>
|
|
||||||
</td></tr></table></p>
|
|
||||||
<%# else %>
|
|
||||||
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%#= l(:label_setup_time) %><span class="required"> * </span></span>
|
|
||||||
<span class="info" style="width: 10px"><%#= text_field_tag :setup_time, nil, :placeholder => "在此选择开课日期" %></span>
|
|
||||||
<span><%#= calendar_for('setup_time')%></span>
|
|
||||||
</td></tr></table></p>
|
|
||||||
<%# end %>
|
|
||||||
|
|
||||||
<%# unless @course.nil?%>
|
|
||||||
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%#= l(:label_endup_time) %><span class="required"> * </span></span>
|
|
||||||
<span class="info" style="width: 10px"><%#= text_field_tag :endup_time, @course.endup_time, :placeholder => "在此选择结课日期" %></span>
|
|
||||||
<span><%#= calendar_for('endup_time')%></span>
|
|
||||||
</td></tr></table></p>
|
|
||||||
<%# else %>
|
|
||||||
<p><table><tr><td><span class="info" align="right" style="width: 90px; font-weight: bold ;margin-left:20px"><%#= l(:label_endup_time) %><span class="required"> * </span></span>
|
|
||||||
<span class="info" style="width: 10px"><%#= text_field_tag :endup_time, nil, :placeholder => "在此选择结课日期" %></span>
|
|
||||||
<span><%#= calendar_for('endup_time')%></span>
|
|
||||||
</td></tr></table></p>
|
|
||||||
<%# end %>
|
|
||||||
-->
|
|
||||||
<% unless @course.nil? %>
|
<% unless @course.nil? %>
|
||||||
<p>
|
<p>
|
||||||
<table>
|
<table>
|
||||||
|
@ -98,12 +59,9 @@
|
||||||
<span class="info" style="width: 10px;"><%= text_field_tag :class_period, nil, :placeholder => "在此输入课时", :maxlength => 5 %></span><strong><%= l(:label_class_hour) %></strong>
|
<span class="info" style="width: 10px;"><%= text_field_tag :class_period, nil, :placeholder => "在此输入课时", :maxlength => 5 %></span><strong><%= l(:label_class_hour) %></strong>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></p>
|
</table>
|
||||||
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- end -->
|
|
||||||
|
|
||||||
<!-- added by bai 增加了“年度”和“学期” -->
|
|
||||||
<p>
|
<p>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -127,16 +85,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</p>
|
</p>
|
||||||
<!-- end -->
|
|
||||||
|
|
||||||
|
|
||||||
<!--added by Wen -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- end -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <p style="margin-left:-10px;"><%#= m.text_field :password, :required => true, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> -->
|
|
||||||
<p style="margin-left:-10px;">
|
<p style="margin-left:-10px;">
|
||||||
<label for="course[course]_password" style="font-size: 13px;"><%= l(:label_new_course_password) %>
|
<label for="course[course]_password" style="font-size: 13px;"><%= l(:label_new_course_password) %>
|
||||||
<span class="required">
|
<span class="required">
|
||||||
|
@ -144,8 +92,6 @@
|
||||||
</p>
|
</p>
|
||||||
<em class="info" style="margin-left:95px;"><%= l(:text_command) %></em>
|
<em class="info" style="margin-left:95px;"><%= l(:text_command) %></em>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- <p style="margin-left:-10px;padding-right: 20px;"><%#= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %></p> -->
|
|
||||||
<p style="padding-right: 20px;">
|
<p style="padding-right: 20px;">
|
||||||
<label for="course_description" style="font-size: 13px;">
|
<label for="course_description" style="font-size: 13px;">
|
||||||
<%= l(:label_new_course_description) %>
|
<%= l(:label_new_course_description) %>
|
||||||
|
@ -156,23 +102,15 @@
|
||||||
</textarea>
|
</textarea>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:-10px;">
|
<p style="margin-left:-10px;">
|
||||||
<em style="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %><%= l(:label_course_public_info) %></em>
|
<em style="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %><%= l(:label_course_public_info) %></em>
|
||||||
</p><!-- modified by bai -->
|
</p><!-- modified by bai -->
|
||||||
<p style="display:none;"><%= f.text_field :course_type, :value => 1 %></p>
|
<p style="display:none;"><%= f.text_field :course_type, :value => 1 %></p>
|
||||||
|
|
||||||
|
|
||||||
<%= wikitoolbar_for 'course_description' %>
|
<%= wikitoolbar_for 'course_description' %>
|
||||||
|
|
||||||
<% @course.custom_field_values.each do |value| %>
|
<% @course.custom_field_values.each do |value| %>
|
||||||
<p><%= custom_field_tag_with_label :course, value %></p>
|
<p><%= custom_field_tag_with_label :course, value %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= call_hook(:view_courses_form, :course => @course, :form => f) %>
|
<%= call_hook(:view_courses_form, :course => @course, :form => f) %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--[eoform:course]-->
|
<!--[eoform:course]-->
|
||||||
|
|
||||||
<% unless @course.extra_frozen? %>
|
<% unless @course.extra_frozen? %>
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<% if @events_by_day != nil && @events_by_day.size >0 %>
|
<% if @events_by_day != nil && @events_by_day.size >0 %>
|
||||||
<div class="content-title-top-avtive">
|
<div class="content-title-top-avtive">
|
||||||
<!-- <h3><%#= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe %></h3> -->
|
|
||||||
<p class="subtitle">
|
<p class="subtitle">
|
||||||
<%#= l(:label_date_from_to, :start => format_date(@date_from), :end => format_date(@date_to - 1)) %>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
||||||
|
@ -13,9 +11,9 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %></td>
|
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %></td>
|
||||||
<td>
|
<td>
|
||||||
<table width="580px" border="0">
|
<table width="580px" border="0" style="width: 100%;table-layout: fixed">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<td colspan="2" valign="top" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||||
<strong> <%= h(e.event_title) if @course.nil? || (e.course != nil && @course.id != e.course.id) %></strong>
|
<strong> <%= h(e.event_title) if @course.nil? || (e.course != nil && @course.id != e.course.id) %></strong>
|
||||||
<span class="font_lighter">
|
<span class="font_lighter">
|
||||||
<% if @canShowRealName %>
|
<% if @canShowRealName %>
|
||||||
|
@ -25,11 +23,9 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<%= l(:label_new_activity) %>
|
||||||
<%= l(:label_new_activity) %> </span>
|
</span>
|
||||||
|
<%= link_to "#{eventToLanguageCourse(e.event_type, @course)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Course)) ? course_files_path(e.container) : e.event_url%>
|
||||||
|
|
||||||
<%= link_to "#{eventToLanguageCourse(e.event_type, @course)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Course)) ? course_files_path(e.container) : e.event_url,:style => "word-break:break-all;word-wrap: break-word;" %>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -53,7 +49,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<ul class="course_sub_menu">
|
<ul class="course_sub_menu">
|
||||||
<% User.current.courses.each do |course| %>
|
<% User.current.courses.each do |course| %>
|
||||||
<% if !course_endTime_timeout?(course) %>
|
<% if !course_endTime_timeout?(course) %>
|
||||||
<li><%= link_to course.name.truncate(10, omission: '...'), {:controller => 'courses',:action => 'show',id:course.id} %></li>
|
<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 %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
<ul class="project_sub_menu" style="top: 0px">
|
<ul class="project_sub_menu" style="top: 0px">
|
||||||
<% end %>
|
<% end %>
|
||||||
<% User.current.projects.each do |project| %>
|
<% User.current.projects.each do |project| %>
|
||||||
<li><%= link_to project.name.truncate(10, omission: '...'), {:controller => 'projects', :action => 'show',id: project.id, host: Setting.project_domain } %></li>
|
<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 %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -51,7 +51,8 @@
|
||||||
<br/>
|
<br/>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %> </span>
|
<% end %>
|
||||||
|
</span>
|
||||||
<% unless @course_page.nil? %>
|
<% unless @course_page.nil? %>
|
||||||
<span class="font_welcome_trustie"><%= @course_page.title %> </span>
|
<span class="font_welcome_trustie"><%= @course_page.title %> </span>
|
||||||
|
|
||||||
|
@ -98,7 +99,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if school_course.count < 10 %>
|
<% if school_course.count < 9 %>
|
||||||
<span>
|
<span>
|
||||||
<%= render :partial => 'more_course', :locals => {:school_id => nil}%>
|
<%= render :partial => 'more_course', :locals => {:school_id => nil}%>
|
||||||
</span>
|
</span>
|
||||||
|
@ -110,7 +111,7 @@
|
||||||
<div class="d-p-projectlist-box">
|
<div class="d-p-projectlist-box">
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
<%= render :partial => 'course_list', :locals => {:course_list => school_course} %>
|
<%= render :partial => 'course_list', :locals => {:course_list => school_course} %>
|
||||||
<% if school_course.count < 10 %>
|
<% if school_course.count < 9 %>
|
||||||
<li>
|
<li>
|
||||||
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %>
|
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %>
|
||||||
</li>
|
</li>
|
||||||
|
@ -123,9 +124,9 @@
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
||||||
<h3 style="padding-bottom:0px ;margin-left: 5px; color: #e8770d;">
|
<h3 style="padding-bottom:0px ;margin-left: 5px; color: #e8770d;">
|
||||||
<strong>问题和反馈动态</strong>
|
<strong><%= l(:label_issue_feedback_activities)%></strong>
|
||||||
<%= link_to "我要提问", newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE"} %>
|
<%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE"} %>
|
||||||
<%= link_to "我要反馈", suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE"} %>
|
<%= link_to l(:label_my_feedback), suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE"} %>
|
||||||
</h3>
|
</h3>
|
||||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
||||||
|
|
||||||
|
@ -143,13 +144,13 @@
|
||||||
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
||||||
</span>
|
</span>
|
||||||
<span class="memo_author">
|
<span class="memo_author">
|
||||||
楼主: <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.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>
|
||||||
<span class="memo_last_person">
|
<span class="memo_last_person">
|
||||||
最后回复:<% 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 %>
|
<%= 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>
|
||||||
<span class="memo_reply">
|
<span class="memo_reply">
|
||||||
回复(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
<%= l(:label_reply)%>(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue