Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
97522f273e
|
@ -130,7 +130,7 @@ class MyController < ApplicationController
|
|||
@user.pref.save
|
||||
@user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : [])
|
||||
set_language_if_valid @user.language
|
||||
flash[:notice] = l(:notice_account_updated)
|
||||
flash.now[:notice] = l(:notice_account_updated)
|
||||
redirect_to user_path(@user)
|
||||
return
|
||||
else
|
||||
|
@ -160,7 +160,7 @@ class MyController < ApplicationController
|
|||
@user.destroy
|
||||
if @user.destroyed?
|
||||
logout_user
|
||||
flash[:notice] = l(:notice_account_deleted)
|
||||
flash.now[:notice] = l(:notice_account_deleted)
|
||||
end
|
||||
redirect_to home_path
|
||||
end
|
||||
|
@ -170,7 +170,7 @@ class MyController < ApplicationController
|
|||
def password
|
||||
@user = User.current
|
||||
unless @user.change_password_allowed?
|
||||
flash[:error] = l(:notice_can_t_change_password)
|
||||
flash.now[:error] = l(:notice_can_t_change_password)
|
||||
redirect_to my_account_path
|
||||
return
|
||||
end
|
||||
|
|
|
@ -226,7 +226,14 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
membership = @user.coursememberships.all#@user.coursememberships.all(:conditions => Course.visible_condition(User.current))
|
||||
#@user.coursememberships.all(:conditions => Course.visible_condition(User.current))
|
||||
|
||||
if User.current == @user || User.current.admin?
|
||||
membership = @user.coursememberships.all
|
||||
else
|
||||
membership = @user.coursememberships.all(:conditions => Course.visible_condition(User.current))
|
||||
end
|
||||
|
||||
membership.sort! {|older, newer| newer.created_on <=> older.created_on }
|
||||
@memberships = []
|
||||
membership.collect { |e|
|
||||
|
@ -235,9 +242,9 @@ class UsersController < ApplicationController
|
|||
## 判断课程是否过期 [需封装]
|
||||
@memberships_doing = []
|
||||
@memberships_done = []
|
||||
now_time = Time.now.year
|
||||
#now_time = Time.now.year
|
||||
@memberships.map { |e|
|
||||
end_time = e.course.get_time.year
|
||||
#end_time = e.course.get_time.year
|
||||
isDone = course_endTime_timeout?(e.course)
|
||||
if isDone
|
||||
@memberships_done.push e
|
||||
|
|
|
@ -303,27 +303,27 @@ module WelcomeHelper
|
|||
str << content_tag("span", "发表了") <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(truncate(strip_tags(event.event_description).gsub(/ /,''), length: 30, omission:'...'), event.event_url)
|
||||
link_to(strip_tags(event.event_description).gsub(/ /,''), event.event_url)
|
||||
when 'issue', 'message' , 'bid' , 'wiki-page' , 'document'
|
||||
str << content_tag("span", "发表了") <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url)
|
||||
link_to(event.event_title, event.event_url)
|
||||
when 'reply' ,'Reply', 'Memo'
|
||||
str << content_tag("span", "发表了") <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(truncate(strip_tags(event.event_description).gsub(/ /,''), length: 30, omission:'...'), event.event_url)
|
||||
link_to(strip_tags(event.event_description).gsub(/ /,''), event.event_url)
|
||||
when 'attachment'
|
||||
str << content_tag('span', '上传了') <<
|
||||
content_tag('span', find_all_event_type(event)) <<
|
||||
': '.html_safe <<
|
||||
link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url) <<
|
||||
link_to(event.event_title, event.event_url) <<
|
||||
link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container.project), :class => "attachments_list_color")
|
||||
else
|
||||
str << content_tag("span", "更新了") <<
|
||||
content_tag("span", find_all_event_type(event)) <<
|
||||
': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url)
|
||||
': '.html_safe << link_to(event.event_title, event.event_url)
|
||||
end
|
||||
str
|
||||
rescue Exception => e
|
||||
|
@ -405,7 +405,8 @@ module WelcomeHelper
|
|||
"show_bids" => true,
|
||||
"show_contest" => true
|
||||
}
|
||||
activity.scope_select{|t| ['changesets', 'documents', 'memos', 'messages', 'journals_for_messages', 'bids', 'news', 'contestnotification'].include?(t) ? nil : 'You may think you know what the following code does, may be. but why don"t you close this file and go play with something else, Now?' }
|
||||
activity.scope_select{|t| ['changesets', 'documents', 'memos', 'messages', 'journals_for_messages', 'bids', 'news', 'contestnotification'].include?(t) ?
|
||||
nil : 'You may think you know what the following code does, may be. but why don"t you close this file and go play with something else, Now?' }
|
||||
activity.events_welcome(nil, nil, {:limit => limit, :types => 'welcome'})
|
||||
end
|
||||
|
||||
|
|
|
@ -37,11 +37,9 @@
|
|||
{: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 => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm),
|
||||
:remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
|
||||
<% 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 %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
|
|
|
@ -2,38 +2,35 @@
|
|||
|
||||
<%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
|
||||
:method => :get, :id => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
||||
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
|
||||
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<p style="float:right;">
|
||||
</fieldset>
|
||||
<p style="float:right;">
|
||||
<%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %>
|
||||
</p>
|
||||
</p>
|
||||
<p class="buttons">
|
||||
<%= label_tag('month', l(:label_month)) %>
|
||||
<%= select_month(@month, :prefix => "month", :discard_type => true) %>
|
||||
<%= label_tag('year', l(:label_year)) %>
|
||||
<%= select_year(@year, :prefix => "year", :discard_type => true) %>
|
||||
|
||||
<p class="buttons">
|
||||
<%= label_tag('month', l(:label_month)) %>
|
||||
<%= select_month(@month, :prefix => "month", :discard_type => true) %>
|
||||
<%= label_tag('year', l(:label_year)) %>
|
||||
<%= select_year(@year, :prefix => "year", :discard_type => true) %>
|
||||
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
|
||||
</p>
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= error_messages_for 'query' %>
|
||||
<% if @query.valid? %>
|
||||
<%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
|
||||
|
||||
<p class="legend cal">
|
||||
<%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
|
||||
<p class="legend cal">
|
||||
<span class="starting"><%= l(:text_tip_issue_begin_day) %></span>
|
||||
<span class="ending"><%= l(:text_tip_issue_end_day) %></span>
|
||||
<span class="starting ending"><%= l(:text_tip_issue_begin_end_day) %></span>
|
||||
</p>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
|
|
|
@ -1,15 +1,21 @@
|
|||
<table class="cal">
|
||||
<thead>
|
||||
<tr><th scope="col" title="<%= l(:label_week) %>" class="week-number"></th><% 7.times do |i| %><th scope="col"><%= day_name( (calendar.first_wday+i)%7 ) %></th><% end %></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<% day = calendar.startdt
|
||||
while day <= calendar.enddt %>
|
||||
<%= ("<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>".html_safe) if day.cwday == calendar.first_wday %>
|
||||
<td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>">
|
||||
<p class="day-num"><%= day.day %></p>
|
||||
<% calendar.events_on(day).each do |i| %>
|
||||
<table class="cal" style="width: 100%;table-layout: fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" title="<%= l(:label_week) %>" class="week-number"></th>
|
||||
<% 7.times do |i| %>
|
||||
<th scope="col" style='white-space: nowrap;overflow: hidden;text-overflow: ellipsis;'><%= day_name( (calendar.first_wday+i)%7 ) %></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<% day = calendar.startdt
|
||||
while day <= calendar.enddt %>
|
||||
<%= ("<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>".html_safe) if day.cwday == calendar.first_wday %>
|
||||
<td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>"
|
||||
style="word-break: break-all;word-wrap: break-word;">
|
||||
<p class="day-num"><%= day.day %></p>
|
||||
<% calendar.events_on(day).each do |i| %>
|
||||
<% if i.is_a? Issue %>
|
||||
<div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip">
|
||||
<%= h("#{i.project} -") unless @project && @project == i.project %>
|
||||
|
@ -22,11 +28,11 @@ while day <= calendar.enddt %>
|
|||
<%= link_to_version i%>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<%= '</tr><tr>'.html_safe if day.cwday==calendar.last_wday and day!=calendar.enddt %>
|
||||
<% day = day + 1
|
||||
end %>
|
||||
</tr>
|
||||
</tbody>
|
||||
<% end %>
|
||||
</td>
|
||||
<%= '</tr><tr>'.html_safe if day.cwday==calendar.last_wday and day!=calendar.enddt %>
|
||||
<% day = day + 1
|
||||
end %>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<div>
|
||||
<table class="underline-evreycontent" style="font-size: 14px;">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %></td>
|
||||
<td valign="top" width="50"><%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %></td>
|
||||
<td>
|
||||
<table width="580px" border="0" style="width: 100%;table-layout: fixed">
|
||||
<tr>
|
||||
|
|
|
@ -1,55 +1,31 @@
|
|||
<% is_teacher = is_course_teacher User.current,homework.bid.courses.first %>
|
||||
<% if comprehensive_evaluation != nil && comprehensive_evaluation.count > 0 %>
|
||||
<div style="height: <%= is_teacher ? 250 : 100%>px; padding-bottom: 10px">
|
||||
|
||||
<div style="padding-bottom: 10px">
|
||||
<div style="font-size: 15px">
|
||||
<strong>作业综评:</strong>
|
||||
<strong><%= l(:lable_teacher_evaluation)%>:</strong>
|
||||
<% if teaher_score != "0.00" %>
|
||||
<%= render :partial => 'show_score', locals: {:stars => teaher_score} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div style="font-size: 14px;">
|
||||
<div style="margin-left: 20px;margin-bottom: 10px;margin-top: 10px;"> <%= comprehensive_evaluation.first.notes%> </div>
|
||||
<div style="margin-left: 20px;margin-bottom: 10px;margin-top: 10px;">
|
||||
<%= comprehensive_evaluation.first.notes if !comprehensive_evaluation.nil? && comprehensive_evaluation.count > 0%>
|
||||
</div>
|
||||
</div>
|
||||
<% if(teaher_score == "0.00" && !(!comprehensive_evaluation.nil? && comprehensive_evaluation.count > 0))%>
|
||||
<% if is_teacher %>
|
||||
<%= render :partial => 'evaluation', :locals => {:homework => homework} %>
|
||||
<div>
|
||||
<%= render :partial => 'evaluation_add_jour',
|
||||
:locals => {:homework_attach => homework,
|
||||
:sta => 0,
|
||||
:is_comprehensive_evaluation => 1,
|
||||
:comprehensive_evaluation => comprehensive_evaluation.first.notes} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<% if is_teacher %>
|
||||
<div style="height: 200px; padding-bottom: 10px">
|
||||
<div style="font-size: 15px">
|
||||
<strong>作业综评:</strong>
|
||||
<% if teaher_score != "0.00" %>
|
||||
<%= render :partial => 'show_score', locals: {:stars => teaher_score} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'evaluation', :locals => {:homework => homework} %>
|
||||
<div>
|
||||
<%= render :partial => 'evaluation_add_jour',
|
||||
:locals => {:homework_attach => homework,
|
||||
:sta => 0,
|
||||
:is_comprehensive_evaluation => 1,
|
||||
:comprehensive_evaluation => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
<%#= render :partial => 'teacher_evaluation',
|
||||
:locals => {:homework => homework, :comprehensive_evaluation => comprehensive_evaluation} %>
|
||||
<% else %>
|
||||
<div style="height: 80px; padding-bottom: 10px">
|
||||
<div style="font-size: 15px">
|
||||
<strong>作业综评:</strong>
|
||||
<% if teaher_score != "0.00" %>
|
||||
<%= render :partial => 'show_score', locals: {:stars => teaher_score} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if teaher_score == "0.00" %>
|
||||
<div style="text-align: center;font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 15px; "><strong>老师还未进行评价!</strong></div>
|
||||
<% end %>
|
||||
<div style="text-align: center;font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 15px; ">
|
||||
<strong><%= l(:lable_teacher_evaluation_no) %></strong>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<% if is_teacher %>
|
||||
<%= render :partial => 'teacher_evaluation',:locals => {:homework => homework} %>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1,8 @@
|
|||
<%= render :partial => 'evaluation', :locals => {:homework => homework} %>
|
||||
<div>
|
||||
<%= render :partial => 'evaluation_add_jour',
|
||||
:locals => {:homework_attach => homework,
|
||||
:sta => 0,
|
||||
:is_comprehensive_evaluation => 1,
|
||||
:comprehensive_evaluation => l(:label_leave_a_message)} %>
|
||||
</div>
|
|
@ -44,7 +44,7 @@
|
|||
<%= form_for(@homework) do |f|%>
|
||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||
<strong>标 题 <span style="color: red">*</span>:</strong>
|
||||
<%= f.text_field :name, :required => true, :name => "homework_name", :size => 60, :style => "width:490px;"%>
|
||||
<%= f.text_field :name, :required => true, :name => "homework_name", :size => 60, :style => "width:490px;", :maxlength => 254%>
|
||||
</p>
|
||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||
<strong>提交项目 :</strong>
|
||||
|
@ -60,7 +60,7 @@
|
|||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||
<strong style="vertical-align: top">描 述 :</strong>
|
||||
<span style="margin-left:-10px;padding-right: 20px;">
|
||||
<%= f.text_area :description, :rows => 8, :name => "homework_description", :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
|
||||
<%= f.text_area :description, :rows => 8, :name => "homework_description", :class => 'wiki-edit', :maxlength => 65534, :style => "font-size:small;width:490px;margin-left:10px;" %>
|
||||
</span>
|
||||
</p>
|
||||
<p style="padding-left: 60px">
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
}) do |f|%>
|
||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||
<strong>标 题 <span style="color: red">*</span>:</strong>
|
||||
<%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;" %>
|
||||
<%= f.text_field "name", :required => true, :size => 60, :style => "width:490px;", :maxlength => 254 %>
|
||||
</p>
|
||||
<p style=" padding: 3px 0 3px 0;padding-left: 50px; clear:left;">
|
||||
<strong>提交项目 :</strong>
|
||||
|
@ -39,7 +39,7 @@
|
|||
<%#= f.text_area :description, :rows => 15, :class => 'wiki-edit', :id => 'editor01' %></p>
|
||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script>-->
|
||||
|
||||
<%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>
|
||||
<%= f.text_area "description", :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => 65534 %>
|
||||
</span>
|
||||
</p>
|
||||
<p style="padding-left: 60px">
|
||||
|
|
|
@ -189,7 +189,7 @@
|
|||
</div>
|
||||
|
||||
<div style="padding-bottom: 8px">
|
||||
<% if @course.description && @course.description.size>0 %>
|
||||
<% if @course.description && @course.description.lstrip.rstrip.size>0 %>
|
||||
<div class="font_lighter_sidebar" style="word-break:break-all; word-wrap:break-word;">
|
||||
|
||||
<%= textilizable @course.description %>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<!--[form:message]-->
|
||||
<% unless replying %>
|
||||
<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" %><!--by young-->
|
||||
<%= 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/>
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
);
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function get_options(value) {
|
||||
$.ajax({
|
||||
|
@ -21,17 +19,12 @@
|
|||
url: '/school/get_options/' + encodeURIComponent(value),
|
||||
data: 'text',
|
||||
success: function (data) {
|
||||
|
||||
$("#province").val(value)
|
||||
$("#schoollist").html(data);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<div class="contextual" style="padding-right: 10px;">
|
||||
<%= link_to(l(:button_change_password), {:action => 'password'}, :class => 'icon icon-passwd') if @user.change_password_allowed? %>
|
||||
<%= call_hook(:view_my_account_contextual, :user => @user) %>
|
||||
|
@ -39,9 +32,7 @@
|
|||
|
||||
<h3 style="padding-left: 10px;"><%= l(:label_my_account) %></h3>
|
||||
<%= error_messages_for 'user' %>
|
||||
|
||||
<fieldset class="box" style="margin:10px;">
|
||||
|
||||
<%= labelled_form_for :user, @user,
|
||||
:url => {:action => "account"},
|
||||
:html => {:id => 'my_account_form',
|
||||
|
@ -70,7 +61,6 @@
|
|||
|
||||
<div>
|
||||
<span id='name' style='display:none'>
|
||||
|
||||
<p style="width:530px;padding-left: 26px;">
|
||||
<%= f.text_field :lastname, :required => true %>
|
||||
<span class='font_lighter'><%= l(:field_lastname_eg) %></span>
|
||||
|
@ -82,7 +72,8 @@
|
|||
</span>
|
||||
|
||||
<span id='enterprise' style='display:none'>
|
||||
<p style="width:400px;padding-left: 26px;"><%= l(:label_company_name)%><%= text_field_tag :enterprise_name, @user.firstname %>
|
||||
<p style="width:400px;padding-left: 26px;">
|
||||
<%= l(:label_company_name)%><%= text_field_tag :enterprise_name, @user.firstname %>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
|
@ -107,12 +98,11 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
|
||||
<!-- added by Wen -->
|
||||
|
||||
<p style="padding-left: 26px;">
|
||||
<% if User.current.user_extensions.school.nil? %>
|
||||
<%= l(:field_occupation) %> <span class="required">*</span>
|
||||
<%= l(:field_occupation) %>
|
||||
<span class="required">*</span>
|
||||
<input id="province" name="province" type="text" value="请单击选择省份及学校" readonly>
|
||||
<input id="occupation" name="occupation" type="hidden"/>
|
||||
<input id="occupation_name" type="text" readonly/>
|
||||
|
@ -126,8 +116,7 @@
|
|||
|
||||
<div id="WOpenWindow">
|
||||
<a class="modal_close" href="#"></a>
|
||||
|
||||
<h2>学校列表</h2>
|
||||
<h2><%= l(:lable_school_list)%></h2>
|
||||
|
||||
<div class="pcontent">
|
||||
<ul id="provincelist" class="school_list">
|
||||
|
@ -255,7 +244,9 @@
|
|||
<% end %>
|
||||
<!-- end -->
|
||||
</span>
|
||||
</p>
|
||||
<% else %>
|
||||
<p>
|
||||
<span style="display:none">
|
||||
<select onchange="showtechnical_title(this.value, document.getElementById('userTechnical_title'));" name="identity" id="userIdentity" class="location">
|
||||
<option value=""><%= l(:label_account_identity_choose) %></option>
|
||||
|
@ -263,7 +254,6 @@
|
|||
<option value="1"><%= l(:label_account_identity_student) %></option>
|
||||
<option value="2"><%= l(:label_account_identity_enterprise) %></option>
|
||||
<option value="3"><%= l(:label_account_identity_developer) %></option>
|
||||
|
||||
</select>
|
||||
</span>
|
||||
</p>
|
||||
|
|
|
@ -74,7 +74,6 @@
|
|||
<%= 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} %>
|
||||
<%#= 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(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
|
||||
|
|
||||
|
@ -90,26 +89,48 @@
|
|||
</p>
|
||||
<% else %>
|
||||
<% @newss.each do |news| %>
|
||||
|
||||
<table class="content-text-list">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50"><%= link_to image_tag(url_to_avatar(news.author), :class => "avatar"), user_path(news.author) %></td>
|
||||
<td colspan="2" valign="top" width="50">
|
||||
<%= link_to image_tag(url_to_avatar(news.author), :class => "avatar"), user_path(news.author) %>
|
||||
</td>
|
||||
<td>
|
||||
<table width="580px" border="0">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to_user(news.author) if news.respond_to?(:author) %></strong><span style="margin-left: 4px;" class="font_lighter"><%= l(:label_project_notice) %></span><span><%= link_to h(news.title), news_path(news) %></span>
|
||||
<span style="float: right"><%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @couese) %> </span>
|
||||
<strong>
|
||||
<%= link_to_user(news.author) if news.respond_to?(:author) %>
|
||||
</strong>
|
||||
<span style="margin-left: 4px;" class="font_lighter">
|
||||
<%= l(:label_project_notice) %>
|
||||
</span>
|
||||
<span>
|
||||
<%= link_to h(news.title), news_path(news) %>
|
||||
</span>
|
||||
<span style="float: right">
|
||||
<%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @couese) %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580px">
|
||||
<span class="font_description"><%= textilizable(news, :description) %></span></td>
|
||||
<span class="font_description">
|
||||
<%= textilizable(news, :description) %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"> <%= l :label_update_time %>
|
||||
: <%= format_time(news.created_on) %></span></td>
|
||||
<td width="350" align="right" class="a"><%= link_to l(:label_project_newother), news_path(news) %><%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %></td>
|
||||
<td align="left">
|
||||
<span class="font_lighter">
|
||||
<%= l :label_update_time %>
|
||||
:
|
||||
<%= format_time(news.created_on) %>
|
||||
</span>
|
||||
</td>
|
||||
<td width="350" align="right" class="a">
|
||||
<%= link_to l(:label_project_newother), news_path(news) %>
|
||||
<%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count >= 0 %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
|
|
@ -123,9 +123,10 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580px" >
|
||||
<p class="font_description">
|
||||
<span class="font_description">
|
||||
<%= textilizable(comment.comments) %>
|
||||
</p></td>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"> <%= format_time(comment.created_on) %></span></td>
|
||||
|
|
|
@ -101,21 +101,29 @@
|
|||
|
||||
<table class="content-text-list">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50"><%= link_to image_tag(url_to_avatar(news.author), :class => "avatar"), user_path(news.author) %></td>
|
||||
<td colspan="2" valign="top" width="50">
|
||||
<%= link_to image_tag(url_to_avatar(news.author), :class => "avatar"), user_path(news.author) %>
|
||||
</td>
|
||||
<td>
|
||||
<table width="580px" border="0">
|
||||
<% if @project.project_type == 1 %>
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to_user(news.author) if news.respond_to?(:author) %></strong><span style="margin-left: 4px;" class="font_lighter"><%= l(:label_project_notice) %></span><span><%= link_to h(news.title), news_path(news) %></span>
|
||||
<strong><%= link_to_user(news.author) if news.respond_to?(:author) %></strong>
|
||||
<span style="margin-left: 4px;" class="font_lighter"><%= l(:label_project_notice) %></span>
|
||||
<span><%= link_to h(news.title), news_path(news) %></span>
|
||||
<span style="float: right"><%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @project) %> </span>
|
||||
</td>
|
||||
</tr>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to_user(news.author) if news.respond_to?(:author) %></strong><span style="margin-left: 4px;" class="font_lighter"><%= l(:label_project_newshare) %></span><span> <%= link_to h(news.title), news_path(news) %></span>
|
||||
<span style="float: right" class='delete_icon'> <%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @project) %> </span>
|
||||
<strong><%= link_to_user(news.author) if news.respond_to?(:author) %></strong>
|
||||
<span style="margin-left: 4px;" class="font_lighter"><%= l(:label_project_newshare) %></span>
|
||||
<span> <%= link_to h(news.title), news_path(news) %></span>
|
||||
<span style="float: right" class='delete_icon'>
|
||||
<%= delete_link news_path(news) if User.current.allowed_to?(:manage_news, @project) %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
@ -80,7 +80,9 @@
|
|||
<div id="comments" style="margin-bottom:16px;">
|
||||
|
||||
<div style="margin:15px">
|
||||
<span class="font_description"> <%= textilizable(@news, :description) %> </span>
|
||||
<span class="font_description">
|
||||
<%= textilizable(@news, :description) %>
|
||||
</span>
|
||||
<br/>
|
||||
<%= link_to_attachments @news %>
|
||||
<br/>
|
||||
|
@ -115,22 +117,35 @@
|
|||
<% next if comment.new_record? %>
|
||||
<table width="660px" border="0" align="center">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" ><%= image_tag(url_to_avatar(comment.author), :class => "avatar")%></td>
|
||||
<td colspan="2" valign="top" width="50" >
|
||||
<%= image_tag(url_to_avatar(comment.author), :class => "avatar")%>
|
||||
</td>
|
||||
<td>
|
||||
<table width="580px" border="0">
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><strong><%= link_to_user(comment.author) if comment.respond_to?(:author) %> </strong><span class="font_lighter"><%= l(:label_project_newadd) %></span><%= l(:label_comment_plural) %></td>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to_user(comment.author) if comment.respond_to?(:author) %> </strong>
|
||||
<span class="font_lighter"><%= l(:label_project_newadd) %></span>
|
||||
<%= l(:label_comment_plural) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580px" >
|
||||
<p class="font_description">
|
||||
<span class="font_description">
|
||||
<%= textilizable(comment.comments) %>
|
||||
</p></td>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"> <%= format_time(comment.created_on) %></span></td>
|
||||
<td width="200" align="right" class="a"><%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %></td>
|
||||
<td align="left">
|
||||
<span class="font_lighter"> <%= format_time(comment.created_on) %></span>
|
||||
</td>
|
||||
<td width="200" align="right" class="a">
|
||||
<%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:title => l(:button_delete) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<strong><%= l(:label_tags_bid) %>:<%= link_to "#{bid.name}",
|
||||
:controller => "bids",:action => "show",:id => bid.id %></strong>
|
||||
<br />
|
||||
<strong><%= l(:label_tags_bid_description) %>:</strong><%= bid.description %>
|
||||
<strong><%= l(:label_tags_bid_description) %>:</strong><%= textilizable bid.description %>
|
||||
<%= bid.updated_on %>
|
||||
</p>
|
||||
<div class="line_under"></div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<strong><%= l(:label_tags_contest) %>:<%= link_to "#{contest.name}",
|
||||
:controller => "contests",:action => "show_contest",:id => contest.id %></strong>
|
||||
<br />
|
||||
<strong><%= l(:label_tags_contest_description) %>:</strong><%= contest.description %>
|
||||
<strong><%= l(:label_tags_contest_description) %>:</strong><%= textilizable contest.description %>
|
||||
<%= contest.updated_on %>
|
||||
</p>
|
||||
<div class="line_under"></div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<p class="font_description2">
|
||||
<strong><%= l(:label_course) %>:<%= link_to "#{course.name}",course_path(course) %></strong>
|
||||
<br />
|
||||
<strong><%= l(:label_new_course_description) %>:</strong><%= course.description %>
|
||||
<strong><%= l(:label_new_course_description) %>:</strong><%= textilizable course.description %>
|
||||
<%= course.updated_at %>
|
||||
</p>
|
||||
<div class="line_under"></div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<p class="font_description2">
|
||||
<strong><%= l(:label_tags_issue) %><%= link_to "#{issue.subject}",:controller => "issues",:action => "show",:id => issue.id %></strong>
|
||||
<br />
|
||||
<strong><%= l(:label_tags_issue_description) %>:</strong><%= issue.description %>
|
||||
<strong><%= l(:label_tags_issue_description) %>:</strong><%= textilizable issue.description %>
|
||||
</p>
|
||||
<div class="line_under"></div>
|
||||
<% end %>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<p class="font_description2">
|
||||
<strong><%= l(:label_tags_project_name) %><%= link_to "#{prj.name}",:controller => "open_source_projects",:action => "show",:id => prj.id %></strong>
|
||||
<br />
|
||||
<strong><%= l(:label_tags_project_description) %></strong><%= prj.short_description %>
|
||||
<strong><%= l(:label_tags_project_description) %></strong><%= textilizable prj.short_description %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="line_under"></div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<p class="font_description2">
|
||||
<strong><%= l(:label_tags_project_name) %><%= link_to "#{prj.name}",:controller => "projects",:action => "show",:id => prj.id %></strong>
|
||||
<br />
|
||||
<strong><%= l(:label_tags_project_description) %></strong><%= prj.description %>
|
||||
<strong><%= l(:label_tags_project_description) %></strong><%= textilizable prj.description %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="line_under"></div>
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
|
||||
</div>
|
||||
<div class="course welcome_left" id="welcome_left">
|
||||
<span class="font_welcome_school"> <% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %>
|
||||
<span class="font_welcome_school">
|
||||
<% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %>
|
||||
<% else %>
|
||||
<% if @school_id == "0" %>
|
||||
<% else %>
|
||||
|
|
|
@ -75,9 +75,7 @@
|
|||
</span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% #projects = find_miracle_project(10, 3) %>
|
||||
<% @projects.map do |project| %>
|
||||
<!--<%# cache cache_key_for_project(project) do %> -->
|
||||
<li style="overflow:auto;word-break:break-all;height:100%;word-wrap: break-word;" class='<%= cycle("odd", "even") %>'>
|
||||
<div style="float: left;">
|
||||
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
||||
|
@ -122,7 +120,7 @@
|
|||
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
||||
</div>
|
||||
|
||||
<div class="inner-right" style="float: right; width:86%; height: 100%; ">
|
||||
<div class="inner-right" style="float: right; width:86%; height: 100%; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" >
|
||||
<span style="color: green;">
|
||||
<%= link_to event.event_author, (user_path(event.event_author) if event.event_author),
|
||||
:style => "color:green;", :target => "_blank" %>
|
||||
|
|
|
@ -1634,7 +1634,7 @@ zh:
|
|||
label_issue_cancel_query: 取消查询
|
||||
field_reward_type: 奖励类型
|
||||
label_tags_no: 暂无标签!
|
||||
label_course_description_no: 你还未对该课程添加描述!
|
||||
label_course_description_no: 该课程未添加描述!
|
||||
label_bid_publish: 发布了
|
||||
label_bid_project: 项目
|
||||
label_project_no_follow: 该项目暂未被关注!
|
||||
|
@ -2145,3 +2145,6 @@ zh:
|
|||
lable_sure_exit_project: 是否确认退出该项目
|
||||
lable_input_class: 在此输入课时
|
||||
lable_input_class_vilidate: 学时只能为整数
|
||||
lable_school_list: 学校列表
|
||||
lable_teacher_evaluation_no: 老师还未进行评价
|
||||
lable_teacher_evaluation: 作业综评
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class UpdateHomeworkattachDescription < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :homework_attaches, :description, :text, default: nil
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20141009010934) do
|
||||
ActiveRecord::Schema.define(:version => 20141009055029) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -473,7 +473,7 @@ ActiveRecord::Schema.define(:version => 20141009010934) do
|
|||
t.datetime "updated_at", :null => false
|
||||
t.string "reward"
|
||||
t.string "name"
|
||||
t.string "description"
|
||||
t.text "description"
|
||||
t.integer "state"
|
||||
t.integer "project_id", :default => 0
|
||||
end
|
||||
|
|
|
@ -109,12 +109,17 @@ module Redmine
|
|||
end
|
||||
if cur_objs
|
||||
cur_objs.each do |cur_obj|
|
||||
if cur_obj.class == Issue
|
||||
if cur_obj.project != nil && cur_obj.project.project_status != nil
|
||||
e += [cur_obj]
|
||||
end
|
||||
else
|
||||
#if cur_obj.class.to_s == 'Issue'
|
||||
# if cur_obj.project != nil && cur_obj.project.project_status != nil && cur_obj.project.is_public == 1
|
||||
# e += [cur_obj]
|
||||
# end
|
||||
#else
|
||||
# e += [cur_obj]
|
||||
#end
|
||||
if cur_obj.project != nil && cur_obj.project.project_status != nil && cur_obj.project.is_public == true
|
||||
e += [cur_obj]
|
||||
#else
|
||||
# e += [cur_obj]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -750,8 +750,14 @@ ul.user_course_sort li{list-style-type:none;
|
|||
.font_description{
|
||||
font-size:14px;
|
||||
line-height: 1.5em;
|
||||
|
||||
word-break:break-all;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.font_description img{
|
||||
max-width: 90%;
|
||||
max-height: 90%; /* 设置最大宽度和高度 */
|
||||
}
|
||||
|
||||
.font_description2{
|
||||
font-size:13px;
|
||||
line-height: 1.5em;
|
||||
|
|
Loading…
Reference in New Issue